]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/ChangeLog
Validate explicit locations with early termination
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
fa6eb693
KS
12017-12-07 Keith Seitz <keiths@redhat.com>
2
3 PR breakpoints/22569
4 * location.c (string_to_explicit_location): When terminating
5 parsing early, break out of enclosing loop instead of returning.
6
883fd55a
KS
72017-12-07 Keith Seitz <keiths@redhat.com>
8
9 * NEWS (New commands): Mention set/show print type nested-type-limit.
10 * c-typeprint.c (c_type_print_base): Print out nested types.
11 * dwarf2read.c (struct typedef_field_list): Rename to ...
12 (struct decl_field_list): ... this. Change all uses.
13 (struct field_info) <nested_types_list, nested_types_list_count>:
14 New fields.
15 (add_partial_symbol): Look for nested type definitions in C++, too.
16 (dwarf2_add_typedef): Rename to ...
17 (dwarf2_add_type_defn): ... this.
18 (type_can_define_types): New function.
19 Update assertion to use type_can_define_types.
20 Permit NULL for a field's name.
21 (process_structure_scope): Handle child DIEs of types that can
22 define types.
23 Copy the list of nested types into the type struct.
24 * gdbtypes.h (struct typedef_field): Rename to ...
25 (struct decl_field): ... this. Change all uses.
26 [is_protected, is_private]: New fields.
27 (struct cplus_struct_type) <nested_types, nested_types_count>: New
28 fields.
29 (TYPE_NESTED_TYPES_ARRAY, TYPE_NESTED_TYPES_FIELD)
30 (TYPE_NESTED_TYPES_FIELD_NAME, TYPE_NESTED_TYPES_FIELD_TYPE)
31 (TYPE_NESTED_TYPES_COUNT, TYPE_NESTED_TYPES_FIELD_PROTECTED)
32 (TYPE_NESTED_TYPES_FIELD_PRIVATE): New macros.
33 * typeprint.c (type_print_raw_options, default_ptype_flags): Add
34 default value for print_nested_type_limit.
35 (print_nested_type_limit): New static variable.
36 (set_print_type_nested_types, show_print_type_nested_types): New
37 functions.
38 (_initialize_typeprint): Register new commands for set/show
39 `print-nested-type-limit'.
40 * typeprint.h (struct type_print_options) [print_nested_type_limit]:
41 New field.
42
99598d71
TT
432017-12-07 Tom Tromey <tom@tromey.com>
44
45 PR breakpoints/22511:
46 * breakpoint.c (commands_command_1): Don't throw an exception when
47 no commands have been read.
48
23a8d186
AS
492017-12-07 Adam Stylinski <adam.stylinski@etegent.com>
50
51 PR c++/21222
52 * target-descriptions.c (print_c_tdesc::visit_pre): Change type of
53 range-for variable.
54
30970df7
SM
552017-12-07 Simon Marchi <simon.marchi@ericsson.com>
56
57 * common/selftest.h (struct selftest): Add virtual destructor.
58
824cc835
PM
592017-12-07 Phil Muldoon <pmuldoon@redhat.com>
60
61 * python/py-breakpoint.c (bppy_init): Use string_to_event_location
62 over basic location code. Implement explicit location keywords.
63 (bppy_init_validate_args): New function.
64 * NEWS: Document Python explicit breakpoint locations.
65
9c226a86
JB
662017-12-07 Joel Brobecker <brobecker@adacore.com>
67
68 * MAINTAINERS: Restore target entries for m68hc11-elf,
69 score-elf and xstormy16-elf, incorrectly removed in a previous
70 patch meant to only update the list of active maintainers.
71
649a140c
PA
722017-12-06 Pedro Alves <palves@redhat.com>
73
74 * break-catch-syscall.c (insert_catch_syscall)
75 (remove_catch_syscall): Adjust to pass reference to
76 inf_data->syscalls_counts directly via gdb::array_view.
77 * fbsd-nat.c (fbsd_set_syscall_catchpoint): Adjust to use bool
78 and gdb::array_view.
79 * linux-nat.c (linux_child_set_syscall_catchpoint): Likewise.
80 * remote.c (remote_set_syscall_catchpoint): Likewise.
81 * target-debug.h (target_debug_print_bool): New.
82 (define target_debug_print_gdb_array_view_const_int): New.
83 * target-delegates.c: Regenerate.
84 * target.h (target_ops) <to_set_syscall_catchpoint>: Use
85 gdb::array_view and bool.
86 (target_set_syscall_catchpoint): Likewise.
87
9a93831c
SM
882017-12-06 Simon Marchi <simon.marchi@ericsson.com>
89
90 * break-catch-syscall.c (catch_syscall_completer): Get pointers
91 to syscall group strings after building the string vector.
92
7cc244de
PA
932017-12-06 Pedro Alves <palves@redhat.com>
94
95 * remote.c (remote_query_supported): Don't send "xmlRegisters=" if
96 "qXfer:features:read"" is disabled.
97 (remote_write_qxfer, remote_read_qxfer, remote_search_memory):
98 Check packet_config_support instead of packet->support directly.
99
858c9d13
SM
1002017-12-05 Simon Marchi <simon.marchi@ericsson.com>
101
102 * target-descriptions.c (struct tdesc_feature) <registers>: Use
103 tdesc_reg_up typedef.
104 (struct target_desc) <features>: Use tdesc_feature_up typedef.
105
d4a0e8b5
SM
1062017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
107
108 * target-descriptions.c (struct tdesc_type): Use default
109 destructor.
110 <u>: Remove.
111 <accept>: Remove.
112 (struct tdesc_type_builtin): New.
113 (struct tdesc_type_vector): New.
114 (struct tdesc_type_with_fields): New.
115 (tdesc_predefined_types): Change type to tdesc_type_builtin[].
116 (tdesc_gdb_type): Remove.
117 (tdesc_register_type): Adjust.
118 (tdesc_create_vector): Create tdesc_type_vector.
119 (tdesc_create_struct): Create tdesc_type_with_fields.
120 (tdesc_set_struct_size): Change parameter type.
121 (tdesc_create_union): Create tdesc_type_with_fields.
122 (tdesc_create_flags): Likewise.
123 (tdesc_create_enum): Likewise.
124 (tdesc_add_field): Change parameter type.
125 (tdesc_add_typed_bitfield): Likewise.
126 (tdesc_add_bitfield): Likewise.
127 (tdesc_add_flag): Likewise.
128 (tdesc_add_enum_value): Likewise.
129 (print_c_tdesc) <visit>: Remove overload with tdesc_type
130 parameter, add overloads for tdesc_type_builtin,
131 tdesc_type_with_fields and tdesc_type_vector.
132 <m_printed_type>: Remove.
133 <m_printed_element_type, m_printed_type_with_fields>: Add.
134 * target-descriptions.h (tdesc_create_enum): Change return type.
135 (tdesc_add_typed_bitfield): Change parameter type.
136 (tdesc_add_enum_value): Change parameter type.
137 * xml-tdesc.c (struct tdesc_parsing_data) <current_type>: Change
138 type to tdesc_type_with_fields.
139 (tdesc_start_struct): Adjust.
140 (tdesc_start_flags): Adjust.
141 (tdesc_start_enum): Adjust.
142 (tdesc_start_field): Adjust.
143 * arch/tdesc.h (struct tdesc_type_builtin): Forward-declare.
144 (struct tdesc_type_vector): Forward-declare.
145 (struct tdesc_type_with_fields): Forward-declare.
146 (tdesc_create_struct): Change return type.
147 (tdesc_create_union): Likewise.
148 (tdesc_create_flags): Likewise.
149 (tdesc_add_field): Change parameter type.
150 (tdesc_set_struct_size): Likewise.
151 (tdesc_add_bitfield): Likewise.
152 (tdesc_add_flag): Likewise.
153 * features: Re-generate C files.
154
f0cddbef
SM
1552017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
156
157 * target-descriptions.c (tdesc_arch_reg): Remove typedef.
158 (struct tdesc_arch_reg): Add constructor.
159 (DEF_VEC_O (tdesc_arch_reg)): Remove.
160 (struct tdesc_arch_data): Initialize fields.
161 <arch_regs>: Change type to std::vector.
162 (target_find_description): Adjust.
163 (tdesc_find_type): Adjust.
164 (tdesc_data_init): Call tdesc_arch_data constructor.
165 (tdesc_data_alloc): Allocate tdesc_arch_data with new.
166 (tdesc_data_cleanup): Free data with delete.
167 (tdesc_numbered_register): Adjust.
168 (tdesc_find_arch_register): Adjust.
169 (tdesc_use_registers): Adjust.
170
d05200d1
SM
1712017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
172
173 * target-descriptions.c (tdesc_type_field): Remove typedef.
174 (DEF_VEC_O (tdesc_type_field)): Remove.
175 (struct tdesc_type_field): Add constructor.
176 <name>: Change type to std::string.
177 (struct tdesc_type) <tdesc_type>: Instantiate vector if the type
178 kind uses it.
179 <~tdesc_type>: Destroy vector if the type kind uses it.
180 <u::u::fields>: Change type to std::vector.
181 (tdesc_gdb_type): Adjust.
182 (tdesc_add_field): Adjust.
183 (tdesc_add_typed_bitfield): Adjust.
184 (tdesc_add_field): Adjust.
185 (tdesc_add_enum_value): Adjust.
186 (class print_c_tdesc) <visit>: Adjust.
187
082b9140
SM
1882017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
189
190 * target-descriptions.c (struct tdesc_type) <name>: Change type
191 to std::string.
192 <~tdesc_type>: Don't manually free name.
193 <operator==>: Adjust.
194 (tdesc_named_type): Adjust.
195 (tdesc_find_type): Adjust.
196 (tdesc_gdb_type): Adjust.
197 (class print_c_tdesc) <visit>: Adjust.
198
53c934e9
SM
1992017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
200
201 * target-descriptions.c (tdesc_type_p): Remove typedef.
202 (DEF_VEC_P (tdesc_type_p)): Remove.
203 (struct tdesc_feature) <types>: Change type to std::vector.
204 <~tdesc_feature>: Replace with default implementation.
205 <accept>: Adjust.
206 (tdesc_named_type): Adjust.
207 (tdesc_create_vector): Adjust.
208 (tdesc_create_struct): Adjust.
209 (tdesc_create_union): Adjust.
210 (tdesc_create_flags): Adjust.
211 (tdesc_create_enum): Adjust.
212
a8142ee1
SM
2132017-12-05 Simon Marchi <simon.marchi@ericsson.com>
214
215 * target-descriptions.c (struct tdesc_reg) <tdesc_reg>: Change
216 type of name_ parameter, adjust to std::string change.
217 <name, group, type>: Change type to std::string.
218 <~tdesc_reg>: Replace with default implementation.
219 <operator==>: Adjust.
220 (tdesc_find_register_early): Adjust.
221 (tdesc_register_name): Adjust.
222 (tdesc_register_type): Adjust.
223 (tdesc_register_in_reggroup_p): Adjust.
224 (class print_c_tdesc) <visit>: Adjust.
225 (class print_c_feature) <visit>: Adjust.
858c9d13
SM
226 * features/arc-arcompact.c: Re-generate.
227 * features/arc-v2.c: Re-generate.
a8142ee1 228
c9c895b9
SM
2292017-12-05 Simon Marchi <simon.marchi@ericsson.com>
230
231 * target-descriptions.c (tdesc_reg_p): Remove typedef.
232 (DEF_VEC_P (tdesc_reg_p)): Remove.
233 (struct tdesc_feature) <registers>: Change type to std::vector.
234 <~tdesc_feature>: Don't manually free registers.
235 <accept>: Adjust.
236 <operator==>: Adjust.
237 (tdesc_has_registers): Adjust.
238 (tdesc_find_register_early): Adjust.
239 (tdesc_use_registers): Adjust.
240 (tdesc_create_reg): Adjust.
241
f65ff9f9
SM
2422017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
243
244 * target-descriptions.c (tdesc_feature) <name>: Change type to
245 std::string.
246 <~tdesc_feature>: Don't manually free name.
247 <operator==>: Adjust.
248 (tdesc_find_feature): Adjust.
249 (tdesc_feature_name): Adjust.
250 (class print_c_tdesc) <visit_pre>: Adjust.
251 (class print_c_feature) <visit_pre>: Adjust.
252
3eea796c
SM
2532017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
254
255 * target-descriptions.c (tdesc_feature_p): Remove typedef.
256 (DEF_VEC_P (tdesc_feature_p)): Remove.
257 (struct target_desc) <features>: Change type to std::vector.
258 <~target_desc>: Replace with default implementation.
259 <accept>: Adjust.
260 <operator==>: Adjust.
261 (tdesc_has_registers): Adjust.
262 (tdesc_find_feature): Adjust.
263 (tdesc_use_registers): Adjust.
264 (tdesc_create_feature): Adjust.
265
40e2a983
SM
2662017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
267
268 * target-descriptions.c (arch_p): Remove typedef.
269 (DEF_VEC_P (arch_p)): Remove.
270 (struct target_desc) <compatible>: Change type to std::vector.
271 <~target_desc>: Don't manually free compatible.
272 (tdesc_compatible_p): Adjust.
273 (tdesc_add_compatible): Adjust.
274 (class print_c_tdesc) <visit_pre>: Adjust.
275
129c10bc
SM
2762017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
277
278 * target-descriptions.c (property_s): Remove typedef.
279 (DEF_VEC_O (property_s)): Remove.
280 (struct target_desc) <properties>: Make an std::vector.
281 <~target_desc>: Don't manually free properties.
282 (tdesc_property): Adjust.
283 (set_tdesc_property): Adjust.
284 (class print_c_tdesc) <visit_pre>: Adjust.
285
ed9376bd
SM
2862017-12-05 Simon Marchi <simon.marchi@ericsson.com>
287
288 * common/gdb_assert.h (gdb_static_assert): Redefine using
289 static_assert.
290
798a7429
SM
2912017-12-05 Simon Marchi <simon.marchi@ericsson.com>
292
293 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
294 unused variables.
295 (ada_is_redundant_range_encoding): Likewise.
296 * ada-varobj.c (ada_varobj_get_value_of_array_variable):
297 Likewise.
298 * alpha-tdep.c (alpha_software_single_step): Likewise.
299 * arm-tdep.c (_initialize_arm_tdep): Likewise.
300 * auto-load.c (info_auto_load_cmd): Likewise.
301 * break-catch-syscall.c (insert_catch_syscall): Likewise.
302 (remove_catch_syscall): Likewise.
303 * breakpoint.c (condition_completer): Likewise.
304 (clear_command): Likewise.
305 (update_breakpoint_locations): Likewise.
306 * btrace.c (btrace_disable): Likewise.
307 (btrace_teardown): Likewise.
308 (btrace_maint_update_pt_packets): Likewise.
309 (maint_btrace_clear_cmd): Likewise.
310 * cli/cli-decode.c (lookup_cmd_1): Likewise.
311 (lookup_cmd_composition): Likewise.
312 * cli/cli-dump.c (scan_filename): Likewise.
313 (restore_command): Likewise.
314 * compile/compile-loc2c.c (compute_stack_depth): Likewise.
315 * compile/compile-object-load.c (compile_object_load): Likewise.
316 * compile/compile-object-run.c (compile_object_run): Likewise.
317 * compile/compile.c (compile_to_object): Likewise.
318 * completer.c (filename_completer): Likewise.
319 (complete_files_symbols): Likewise.
320 (complete_expression): Likewise.
321 * corelow.c (core_open): Likewise.
322 * ctf.c (ctf_start): Likewise.
323 (ctf_write_status): Likewise.
324 (ctf_write_uploaded_tsv): Likewise.
325 (ctf_write_definition_end): Likewise.
326 (ctf_open_dir): Likewise.
327 (ctf_xfer_partial): Likewise.
328 (ctf_trace_find): Likewise.
329 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
330 Likewise.
331 * dwarf2loc.c (allocate_piece_closure): Likewise.
332 (indirect_pieced_value): Likewise.
333 (dwarf2_evaluate_loc_desc_full): Likewise.
334 * dwarf2read.c (dw2_expand_marked_cus): Likewise.
335 (dw2_expand_symtabs_matching): Likewise.
336 (dw2_map_symbol_filenames): Likewise.
337 (read_and_check_comp_unit_head): Likewise.
338 (read_cutu_die_from_dwo): Likewise.
339 (lookup_dwo_unit): Likewise.
340 (read_comp_units_from_section): Likewise.
341 (dwarf2_compute_name): Likewise.
342 (handle_DW_AT_stmt_list): Likewise.
343 (create_cus_hash_table): Likewise.
344 (create_dwp_v2_section): Likewise.
345 (dwarf2_rnglists_process): Likewise.
346 (dwarf2_ranges_process): Likewise.
347 (dwarf2_record_block_ranges): Likewise.
348 (is_vtable_name): Likewise.
349 (read_formatted_entries): Likewise.
350 (skip_form_bytes): Likewise.
351 * elfread.c (elf_symtab_read): Likewise.
352 * exec.c (exec_file_command): Likewise.
353 * f-valprint.c (f_val_print): Likewise.
354 (info_common_command_for_block): Likewise.
355 * guile/guile.c (initialize_scheme_side): Likewise.
356 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Likewise.
357 * guile/scm-cmd.c (cmdscm_completer): Likewise.
358 (gdbscm_register_command_x): Likewise.
359 * guile/scm-frame.c (gdbscm_frame_read_var): Likewise.
360 * guile/scm-param.c (gdbscm_parameter_value): Likewise.
361 * guile/scm-ports.c (file_port_magic): Likewise.
362 * guile/scm-pretty-print.c (ppscm_search_pp_list): Likewise.
363 (ppscm_pretty_print_one_value): Likewise.
364 (ppscm_print_children): Likewise.
365 * guile/scm-string.c (gdbscm_string_to_argv): Likewise.
366 * guile/scm-symtab.c (gdbscm_sal_symtab): Likewise.
367 * guile/scm-type.c (gdbscm_type_next_field_x): Likewise.
368 * guile/scm-utils.c (gdbscm_parse_function_args): Likewise.
369 * i386-tdep.c (i386_register_reggroup_p): Likewise.
370 * infcmd.c (run_command_1): Likewise.
371 (until_next_fsm_clean_up): Likewise.
372 * linespec.c (linespec_complete): Likewise.
373 (find_label_symbols): Likewise.
374 * m2-valprint.c (m2_val_print): Likewise.
375 * memattr.c (require_user_regions): Likewise.
376 (lookup_mem_region): Likewise.
377 (disable_mem_command): Likewise.
378 (mem_delete): Likewise.
379 * mep-tdep.c (mep_register_name): Likewise.
380 (mep_analyze_prologue): Likewise.
381 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Likewise.
382 * mi/mi-interp.c (mi_on_sync_execution_done): Likewise.
383 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
384 * microblaze-linux-tdep.c (microblaze_linux_init_abi): Likewise.
385 * minidebug.c (lzma_open): Likewise.
386 * minsyms.c (lookup_minimal_symbol): Likewise.
387 * mips-linux-tdep.c (mips64_fill_fpregset): Likewise.
388 * mips-tdep.c (mips_stub_frame_sniffer): Likewise.
389 (mips_o64_return_value): Likewise.
390 (mips_single_step_through_delay): Likewise.
391 (_initialize_mips_tdep): Likewise.
392 * nios2-tdep.c (nios2_push_dummy_call): Likewise.
393 (nios2_software_single_step): Likewise.
394 * parse.c (find_minsym_type_and_address): Likewise.
395 * psymtab.c (psym_relocate): Likewise.
396 * python/py-breakpoint.c (bppy_get_commands): Likewise.
397 (gdbpy_breakpoint_modified): Likewise.
398 * python/py-infevents.c (create_inferior_call_event_object):
399 Likewise.
400 * python/py-record-btrace.c (btpy_list_item): Likewise.
401 * python/py-type.c (typy_str): Likewise.
402 * python/py-value.c (valpy_call): Likewise.
403 * python/python.c (do_start_initialization): Likewise.
404 * record-btrace.c (record_btrace_insn_history_range): Likewise.
405 (record_btrace_call_history_range): Likewise.
406 (record_btrace_record_method): Likewise.
407 (record_btrace_xfer_partial): Likewise.
408 (btrace_get_frame_function): Likewise.
409 * record-full.c (record_full_open): Likewise.
410 * record.c (get_context_size): Likewise.
411 * registry.h (DEFINE_REGISTRY): Likewise.
412 * remote-fileio.c (remote_fileio_request): Likewise.
413 * remote.c (remote_update_thread_list): Likewise.
414 (remote_check_symbols): Likewise.
415 (remote_commit_resume): Likewise.
416 (remote_interrupt): Likewise.
417 (remote_insert_breakpoint): Likewise.
418 (compare_sections_command): Likewise.
419 * rust-exp.y (super_name): Likewise.
420 (lex_string): Likewise.
421 (convert_ast_to_type): Likewise.
422 (convert_ast_to_expression): Likewise.
423 * rust-lang.c (rust_print_struct_def): Likewise.
424 (rust_print_type): Likewise.
425 (rust_evaluate_subexp): Likewise.
426 * rx-tdep.c (rx_register_type): Likewise.
427 * ser-event.c (serial_event_clear): Likewise.
428 * serial.c (serial_open): Likewise.
429 * spu-tdep.c (spu_overlay_new_objfile): Likewise.
430 * symfile.c (section_is_overlay): Likewise.
431 (overlay_unmapped_address): Likewise.
432 (overlay_mapped_address): Likewise.
433 (simple_overlay_update_1): Likewise.
434 (simple_overlay_update): Likewise.
435 * symtab.c (symbol_find_demangled_name): Likewise.
436 (search_symbols): Likewise.
437 * target-descriptions.c (tdesc_predefined_type): Likewise.
438 * target.c (target_commit_resume): Likewise.
439 * thread.c (print_selected_thread_frame): Likewise.
440 * top.c (new_ui_command): Likewise.
441 (gdb_readline_no_editing): Likewise.
442 * tracefile-tfile.c (tfile_open): Likewise.
443 * tracepoint.c (create_tsv_from_upload): Likewise.
444 * utils.c (quit): Likewise.
445 (defaulted_query): Likewise.
446 * valarith.c (value_concat): Likewise.
447 * xml-syscall.c (xml_list_syscalls_by_group): Likewise.
448 * xml-tdesc.c (target_fetch_description_xml): Likewise.
449 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
450 (xtensa_pseudo_register_write): Likewise.
451
7403715e
TT
4522017-12-04 Tom Tromey <tom@tromey.com>
453
454 * NEWS: Mention Rust trait object inspection.
455
50a1fdd5
PA
4562017-12-04 Pedro Alves <palves@redhat.com>
457
458 PR gdb/22499
459 * amd64-tdep.c (amd64_insn::rex_offset): Rename to...
460 (amd64_insn::enc_prefix_offset): ... this, and tweak comment.
461 (vex2_prefix_p, vex3_prefix_p): New functions.
462 (amd64_get_insn_details): Adjust to rename. Also skip VEX2 and
463 VEX3 prefixes.
464 (fixup_riprel): Set VEX3.!B.
465
1e97a227
SM
4662017-12-03 Simon Marchi <simon.marchi@ericsson.com>
467
468 * target.h (mem_region_vector): Remove.
469 (struct target_ops) <to_memory_map>: Change return type to
470 std::vector<mem_region>.
471 * target-debug.h (target_debug_print_mem_region_vector): Rename
472 to ...
473 (target_debug_print_std_vector_mem_region): ... this.
474 * target-delegates.c: Re-generate.
475
10f64178
PA
4762017-12-03 Pedro Alves <palves@redhat.com>
477
478 * make-target-delegates (munge_type): Also munge '<', '>', and
479 ':'. Avoid double underscores in identifiers, and trailing
480 underscores.
481 * target-debug.h
482 (target_debug_print_VEC_static_tracepoint_marker_p__p): Rename to
483 ...
484 (target_debug_print_VEC_static_tracepoint_marker_p_p): ... this.
485 * target-delegates.c: Regenerate.
486
6d83e819
SM
4872017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
488
489 * common/poison.h (XDELETE): Fix typo.
490
97cbe998
SDJ
4912017-12-01 Andrew Cagney <cagney@redhat.com>
492 Joel Brobecker <brobecker@adacore.com>
493 Sergio Durigan Junior <sergiodj@redhat.com>
494
495 * NEWS (Changes since GDB 8.0: Mention new '--readnever'
496 feature.
497 * coffread.c (coff_symfile_read): Do not map over sections with
498 'coff_locate_sections' if readnever is on.
499 * dwarf2read.c (dwarf2_has_info): Return 0 if
500 readnever is on.
501 * elfread.c (elf_symfile_read): Do not map over sections with
502 'elf_locate_sections' if readnever is on.
503 * main.c (validate_readnow_readnever): New function.
504 (captured_main_1): Add support for --readnever.
505 (print_gdb_help): Document --readnever.
506 * objfile-flags.h (enum objfile_flag) <OBJF_READNEVER>: New
507 flag.
508 * symfile.c (readnever_symbol_files): New global.
509 (symbol_file_add_with_addrs): Set 'OBJF_READNEVER' when
510 'READNEVER_SYMBOL_FILES' is set.
511 (validate_readnow_readnever): New function.
512 (symbol_file_command): Handle '-readnever' option.
513 Call 'validate_readnow_readnever'.
514 (add_symbol_file_command): Handle '-readnever' option.
515 Call 'validate_readnow_readnever'.
516 (_initialize_symfile): Document new '-readnever' option for
517 both 'symbol-file' and 'add-symbol-file' commands.
518 * top.h (readnever_symbol_files): New extern global.
519 * xcoffread.c (xcoff_initial_scan): Do not read debug
520 information if readnever is on.
521
40fc416f
SDJ
5222017-12-01 Sergio Durigan Junior <sergiodj@redhat.com>
523
524 * symfile.c (symbol_file_command): Call
525 'symbol_file_add_main_1' only after processing all command
526 line options.
527 (add_symbol_file_command): Modify logic to make arguments
528 position-independent.
529
ec6a20c2
JB
5302017-12-01 Joel Brobecker <brobecker@adacore.com>
531
532 * ada-lang.c (symbol_list_obstack): Delete.
533 (resolve_subexp): Make sure "candidates" gets xfree'ed.
534 (ada_lookup_symbol_list_worker): Remove the limitation that
535 the result is only good until the next call, now making it
536 the responsibility of the caller to free the result when no
537 longer needed. Adjust the function's intro comment accordingly.
538 (ada_lookup_symbol_list): Adjust the function's intro comment.
539 (ada_iterate_over_symbols): Make sure "results" gets xfree'ed.
540 (ada_lookup_encoded_symbol, get_var_value): Likewise.
541 (_initialize_ada_language): Remove symbol_list_obstack
542 initialization.
543 * ada-exp.y (block_lookup): Make sure "syms" gets xfree'ed.
544 (write_var_or_type, write_name_assoc): Likewise.
545
d0df06af
TT
5462017-12-01 Tom Tromey <tom@tromey.com>
547
548 * Makefile.in (all_deps_files): New variable.
549 Include .Po files using all_deps_files.
550
2ee0c9b3
JB
5512017-12-01 Joel Brobecker <brobecker@adacore.com>
552
553 * MAINTAINERS: Update list of maintainers, moving those who
554 stepped down or became inactive to the "Past Maintainers"
555 section.
556
44122162
RO
5572017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
558
559 * configure.ac Don't check for sys/fault.h, sys/syscall.h,
560 sys/proc.h.
561 (NEW_PROC_API): Remove.
562 (prsysent_t, pr_sigset_t, pr_sigaction64_t, pr_siginfo64_t):
563 Likewise.
564 * common/common.m4 (GDB_AC_COMMON): Don't check for sys/syscall.h.
565 * configure: Regenerate.
566 * config.in: Regenerate.
567 * gdbserver/configure: Regenerate.
568 * gdbserver/config.in: Regenerate.
569
570 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Remove
571 NEW_PROC_API test.
572 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Likewise.
573
574 * linux-btrace.c: Remove HAVE_SYS_SYSCALL_H test.
575
576 * proc-api.c: Remove !NEW_PROC_API support.
577 Remove HAVE_SYS_PROC_H and HAVE_SYS_USER_H tests.
578 Remove tests for macros always defined on Solaris.
579 * proc-events.c: Remove !NEW_PROC_API support.
580 Remove Remove HAVE_SYS_SYSCALL_H, HAVE_SYS_PROC_H and
581 HAVE_SYS_USER_H tests.
582 (init_syscall_table): Remove non-Solaris syscalls.
583 Remove tests for syscalls present on all Solaris versions.
584 Add missing Solaris 10+ syscalls.
585 (signal_table): Remove non-Solaris signals.
586 Remove tests for signals present on all Solaris versions.
587 (fault_table): Remove non-Solaris faults.
588 Remove tests for faults present on all Solaris versions.
589 * proc-flags.c: Remove !NEW_PROC_API support.
590 (pr_flag_table): Remove non-Solaris and pre-Solaris 7 comments.
591 Remove non-Solaris flags.
592 * proc-why.c: Remove !NEW_PROC_API support.
593 (pr_why_table): Remove meaningless comments.
594 Remove tests for reasons present on all Solaris versions.
595 Remove OSF/1 cases.
596 (proc_prettyfprint_why): Likewise.
597
598 * procfs.c: Remove !NEW_PROC_API and DYNAMIC_SYSCALLS support.
599 Remove HAVE_SYS_FAULT_H and HAVE_SYS_SYSCALL_H tests.
600 Remove WA_READ test, IRIX watchpoint support.
601 (gdb_sigset_t, gdb_sigaction_t, gdb_siginfo_t): Replace by base
602 types. Change users.
603 (gdb_praddset, gdb_prdelset, gdb_premptysysset, gdb_praddsysset)
604 (gdb_prdelset, gdb_pr_issyssetmember): Replace by base macros.
605 Change callers.
606 Remove CTL_PROC_NAME_FMT tests.
607 (gdb_prstatus_t, gdb_lwpstatus_t): Replace by base types. Change
608 users.
609 (sysset_t_size): Remove. Use sizeof (sysset_t) in callers.
610 Remove PROCFS_DONT_PIOCSSIG_CURSIG support.
611 (proc_modify_flag): Replace GDBRESET by PCUNSET.
612 Remove PR_ASYNC, PR_KLC tests.
613 (proc_unset_inherit_on_fork): Remove PR_ASYNC test.
614 (proc_parent_pid): Remove PCWATCH etc. tests.
615 (proc_set_watchpoint): Remove !PCWATCH && !PIOCSWATCH support.
616 Remove PCAGENT test.
617 (proc_get_nthreads) [PIOCNTHR && PIOCTLIST]: Remove.
618 Remove SYS_lwpcreate || SYS_lwp_create test.
619 (proc_get_current_thread): Likewise.
620 [PIOCNTHR && PIOCTLIST]: Remove.
621 [PIOCLSTATUS]: Remove.
622 (procfs_debug_inferior): Remove non-Solaris cases, conditionals.
623 [PRFS_STOPEXEC]: Remove.
624 (syscall_is_lwp_exit): Remove non-Solaris cases, conditionals.
625 (syscall_is_exit): Likewise.
626 (syscall_is_exec): Likewise.
627 (syscall_is_lwp_create): Likewise.
628 Remove SYS_syssgi support.
629 (procfs_wait): Remove PR_ASYNC, !PIOCSSPCACT tests.
630 [SYS_syssgi]: Remove.
631 Remove non-Solaris cases, conditionals.
632 (unconditionally_kill_inferior) [PROCFS_NEED_PIOCSSIG_FOR_KILL]:
633 Remove.
634 (procfs_init_inferior) [SYS_syssgi]: Remove.
635 (procfs_set_exec_trap) [PRFS_STOPEXEC]: Remove.
636 (procfs_inferior_created) [SYS_syssgi]: Remove.
637 (procfs_set_watchpoint): Remove !AIX5 test.
638 (procfs_stopped_by_watchpoint): Remove FLTWATCH test, FLTKWATCH
639 case.
640 (mappingflags) [MA_PHYS]: Remove.
641 (info_mappings_callback): Remove PCAGENT test.
642 Remove PIOCOPENLWP || PCAGENT test.
643
e8020e54
RO
6442017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
645
646 * sol-thread.c (info_solthreads): Constify args.
647 Cast args to void *.
648
75059544
JB
6492017-11-29 John Baldwin <jhb@FreeBSD.org>
650
651 * target-float.c [HAVE_LIBMPFR]: Define MPFR_USE_INTMAX_T.
652
f5a91472
JB
6532017-11-29 Joel Brobecker <brobecker@adacore.com>
654
655 * ada-lang.c (to_fixed_range_type): Make sure that the size
656 of the range type being returned is the same as the size
657 of the range type being fixed.
658
bd69330d
PA
6592017-11-29 Pedro Alves <palves@redhat.com>
660
661 PR c++/19436
662 * NEWS: Mention setting breakpoints on functions with C++ ABI
663 tags.
664 * completer.h (completion_match_for_lcd) <match,
665 mark_ignored_range>: New methods.
666 <finish>: Consider ignored ranges.
667 <clear>: Clear ignored ranges.
668 <m_ignored_ranges, m_finished_storage>: New fields.
669 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
670 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
671 completion_match_for_lcd pointer to strncmp_iw_with_mode.
672 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
673 * language.c (default_symbol_name_matcher): Pass the
674 completion_match_for_lcd pointer to strncmp_iw_with_mode.
675 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
676 * utils.c (skip_abi_tag): New function.
677 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
678 Handle ABI tags.
679 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
680 parameter.
681
6822017-11-29 Pedro Alves <palves@redhat.com>
683
684 PR c++/19436
685 * NEWS: Mention setting breakpoints on functions with C++ ABI
686 tags.
687 * completer.h (completion_match_for_lcd) <match,
688 mark_ignored_range>: New methods.
689 <finish>: Consider ignored ranges.
690 <clear>: Clear ignored ranges.
691 <m_ignored_ranges, m_finished_storage>: New fields.
692 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
693 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
694 completion_match_for_lcd pointer to strncmp_iw_with_mode.
695 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
696 * language.c (default_symbol_name_matcher): Pass the
697 completion_match_for_lcd pointer to strncmp_iw_with_mode.
698 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
699 * utils.c (skip_abi_tag): New function.
700 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
701 Handle ABI tags.
702 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
703 parameter.
704
a20714ff
PA
7052017-11-29 Pedro Alves <palves@redhat.com>
706
707 * NEWS: Mention that breakpoints on C++ functions are now set on
708 on all namespaces/classes by default, and mention "break
709 -qualified".
710 * ax-gdb.c (agent_command_1): Adjust to pass a
711 symbol_name_match_type to new_linespec_location.
712 * breakpoint.c (parse_breakpoint_sals): Adjust to
713 get_linespec_location's return type change.
714 (strace_marker_create_sals_from_location): Adjust to pass a
715 symbol_name_match_type to new_linespec_location.
716 (strace_marker_decode_location): Adjust to get_linespec_location's
717 return type change.
718 (strace_command): Adjust to pass a symbol_name_match_type to
719 new_linespec_location.
720 (LOCATION_HELP_STRING): Add paragraph about wildmatching, and
721 mention "-qualified".
722 * c-lang.c (cplus_language_defn): Install cp_search_name_hash.
723 * completer.c (explicit_location_match_type::MATCH_QUALIFIED): New
724 enumerator.
725 (complete_address_and_linespec_locations): New parameter
726 'match_type'. Pass it down.
727 (explicit_options): Add "-qualified".
728 (collect_explicit_location_matches): Pass the requested match type
729 to the linespec completers. Handle MATCH_QUALIFIED.
730 (location_completer): Handle "-qualified" combined with linespecs.
731 * cp-support.c (cp_search_name_hash): New.
732 (cp_symbol_name_matches_1): Implement wild matching for C++.
733 (cp_fq_symbol_name_matches): Reimplement.
734 (cp_get_symbol_name_matcher): Return different matchers depending
735 on the lookup name's match type.
736 (selftests::test_cp_symbol_name_matches): Add wild matching tests.
737 * cp-support.h (cp_search_name_hash): New declaration.
738 * dwarf2read.c
739 (selftests::dw2_expand_symtabs_matching::test_symbols): Add
740 symbols.
741 (test_dw2_expand_symtabs_matching_symbol): Add wild matching
742 tests.
743 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Adjust to
744 pass a symbol_name_match_type to new_linespec_location.
745 * linespec.c (linespec_parse_basic): Lookup function symbols using
746 the parser's symbol name match type.
747 (convert_explicit_location_to_linespec): New
748 symbol_name_match_type parameter. Pass it down to
749 find_linespec_symbols.
750 (convert_explicit_location_to_sals): Pass the location's name
751 match type to convert_explicit_location_to_linespec.
752 (parse_linespec): New match_type parameter. Save it in the
753 parser.
754 (linespec_parser_new): Default to symbol_name_match_type::WILD.
755 (linespec_complete_function): New symbol_name_match_type
756 parameter. Use it.
757 (complete_linespec_component): Pass down the parser's recorded
758 name match type.
759 (linespec_complete_label): New symbol_name_match_type parameter.
760 Use it.
761 (linespec_complete): New symbol_name_match_type parameter. Save
762 it in the parser and pass it down. Adjust to
763 get_linespec_location's prototype change.
764 (find_function_symbols, find_linespec_symbols): New
765 symbol_name_match_type parameter. Pass it down instead of
766 assuming symbol_name_match_type::WILD.
767 * linespec.h (linespec_complete, linespec_complete_function)
768 (linespec_complete_label): New symbol_name_match_type parameter.
769 * location.c (event_location::linespec_location): Now a struct
770 linespec_location.
771 (EL_LINESPEC): Adjust.
772 (initialize_explicit_location): Default to
773 symbol_name_match_type::WILD.
774 (new_linespec_location): New symbol_name_match_type parameter.
775 Record it in the location.
776 (get_linespec_location): Now returns a struct linespec_location.
777 (new_explicit_location): Also copy func_name_match_type.
778 (explicit_to_string_internal)
779 (string_to_explicit_location): Handle "-qualified".
780 (copy_event_location): Adjust to LINESPEC_LOCATION type change.
781 Copy symbol_name_match_type fields.
782 (event_location_deleter::operator()): Adjust to LINESPEC_LOCATION
783 type change.
784 (event_location_to_string): Adjust to LINESPEC_LOCATION type
785 change. Handle "-qualfied".
786 (string_to_explicit_location): Handle "-qualified".
787 (string_to_event_location_basic): New symbol_name_match_type
788 parameter. Pass it down.
789 (string_to_event_location): Handle "-qualified".
790 * location.h (struct linespec_location): New.
791 (explicit_location::func_name_match_type): New field.
792 (new_linespec_location): Now returns a const linespec_location *.
793 (string_to_event_location_basic): New symbol_name_match_type
794 parameter.
795 (explicit_completion_info::saw_explicit_location_option): New
796 field.
797 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Adjust to pass a
798 symbol_name_match_type to new_linespec_location.
799 * python/py-breakpoint.c (bppy_init): Likewise.
800 * python/python.c (gdbpy_decode_line): Likewise.
801
a207cff2
PA
8022017-11-29 Pedro Alves <palves@redhat.com>
803
804 * ada-lang.c (ada_lookup_name_info::matches): Change type of
805 parameter from completion_match to completion_match_result.
806 Adjust.
807 (do_wild_match, do_full_match, ada_symbol_name_matches): Likewise.
808 * completer.c (completion_tracker::maybe_add_completion): Add
809 match_for_lcd parameter and use it.
810 (completion_tracker::add_completion): Likewise.
811 * completer.h (class completion_match_for_lcd): New class.
812 (completion_match_result::match_for_lcd): New field.
813 (completion_match_result::set_match): New method.
814 (completion_tracker): Add comments.
815 (completion_tracker::add_completion): Add match_for_lcd parameter.
816 (completion_tracker::reset_completion_match_result): Reset
817 match_for_lcd too.
818 (completion_tracker::maybe_add_completion): Add match_for_lcd
819 parameter.
820 (completion_tracker::m_lowest_common_denominator_unique): Extend
821 comments.
822 * cp-support.c (cp_symbol_name_matches_1)
823 (cp_fq_symbol_name_matches): Change type of parameter from
824 completion_match to completion_match_result. Adjust.
825 * language.c (default_symbol_name_matcher): Change type of
826 parameter from completion_match to completion_match_result.
827 Adjust.
828 * language.h (completion_match_for_lcd): Forward declare.
829 (default_symbol_name_matcher): Change type of parameter from
830 completion_match to completion_match_result.
831 * symtab.c (compare_symbol_name): Adjust.
832 (completion_list_add_name): Pass the match_for_lcd to the tracker.
833 * symtab.h (ada_lookup_name_info::matches): Change type of
834 parameter from completion_match to completion_match_result.
835 (symbol_name_matcher_ftype): Likewise, and update comments.
836
4024cf2b
PA
8372017-11-29 Pedro Alves <palves@redhat.com>
838
839 * linespec.c (minsym_found, add_minsym): Use msymbol_is_function.
840 * minsyms.c (msymbol_is_text): Delete.
841 (msymbol_is_function): New function.
842 * minsyms.h (msymbol_is_text): Delete.
843 (msymbol_is_function): New declaration.
844 * symtab.c (find_function_alias_target): Use msymbol_is_function.
845
5dcf52c1
TT
8462017-11-29 Tom Tromey <tom@tromey.com>
847
848 * Makefile.in (distclean): Handle the case where rmdir fails.
849
8ca2f0b9
TT
8502017-11-29 Tom Tromey <tom@tromey.com>
851
852 * symfile.c (_initialize_symfile): Update usage text for
853 add-symbol-file, symbol-file, load.
854
02ca603a
TT
8552017-11-29 Tom Tromey <tom@tromey.com>
856
857 * symfile.c (add_symbol_file_command): Error if some arguments to
858 -s are missing. Change unrecognized-argument error message.
859 (_initialize_symfile): Fix usage text for add-symbol-file.
860
18ca7347
TT
8612017-11-27 Tom Tromey <tom@tromey.com>
862
863 * Makefile.in (REMOTE_OBS): Remove.
864 (SFILES): Remove remote sources.
865 (COMMON_SFILES): Add remote sources.
866 (ALLDEPFILES): Remove dcache.c.
867
66599a7d
TT
8682017-11-27 Tom Tromey <tom@tromey.com>
869
870 * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
871 variables.
872 (SFILES): Use SUBDIR_TARGET_SRCS.
873 (COMMON_OBS): Use SUBDIR_TARGET_OBS. Remove waitstatus.o.
874 (CONFIG_SRC_SUBDIR): Add target.
875 (%.o): Remove target rule.
876
4f04fba8
TT
8772017-11-27 Tom Tromey <tom@tromey.com>
878
879 * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
880 registry.o, thread-fsm.o, debug.o.
881 (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
882 thread-fsm.c, debug.c.
883
b5adff3b
TT
8842017-11-27 Tom Tromey <tom@tromey.com>
885
886 * Makefile.in (COMMON_SFILES): New.
887 (SFILES): Move some entries to COMMON_SFILES.
888 (COMMON_OBS): Use COMMON_SFILES.
889
afa0a411
TT
8902017-11-27 Tom Tromey <tom@tromey.com>
891
892 * Makefile.in (YYFILES): Update comment.
893 (YYOBJ): Redefine.
894
8fd8d003
TT
8952017-11-27 Tom Tromey <tom@tromey.com>
896
897 * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
898 (CONFIG_SRC_SUBDIR): Add python.
899 (%.o): Remove python rule.
900 (python/%.o): New rule.
901 * configure: Rebuild.
902 * configure.ac (CONFIG_OBS): Refer to python/python.o
903
bd810fff
TT
9042017-11-27 Tom Tromey <tom@tromey.com>
905
906 * configure: Rebuild.
907 * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
908 * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
909 (CONFIG_SRC_SUBDIR): Add guile.
910 (%.o): Remove guile rule.
911
75787ac1
TT
9122017-11-27 Tom Tromey <tom@tromey.com>
913
914 * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
915 (%.o): Remove unittests rule.
916 (CONFIG_SRC_SUBDIR): Add unittests.
917
5c8a9431
TT
9182017-11-27 Tom Tromey <tom@tromey.com>
919
920 * Makefile.in (SUBDIR_TUI_OBS): Redefine.
921 (CONFIG_SRC_SUBDIR): Add tui.
922 (%.o): Remove tui rule.
923
a26aa30c
TT
9242017-11-27 Tom Tromey <tom@tromey.com>
925
926 * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
927 (%.o): Remove compile rule.
928 (CONFIG_SRC_SUBDIR): Add compile.
929
6f3cdf9a
TT
9302017-11-27 Tom Tromey <tom@tromey.com>
931
932 * Makefile.in (SUBDIR_MI_OBS): Redefine.
933 (%.o): Remove mi rule.
934 (CONFIG_SRC_SUBDIR): Add mi.
935 (COMMON_OBS): Use mi/mi-common.o
936
f06afa53
TT
9372017-11-27 Tom Tromey <tom@tromey.com>
938
939 * Makefile.in (SUBDIR_CLI_OBS): Redefine.
940 (%.o): Remove cli rule.
941 (CONFIG_SRC_SUBDIR): Add cli.
942
b22c88c2
TT
9432017-11-27 Tom Tromey <tom@tromey.com>
944
945 * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
946 * configure: Rebuild.
947 * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
948 (CONFIG_DEP_SUBDIR): New variable.
949 (%.o): Add order-only dependency.
950 ($(CONFIG_DEP_SUBDIR)): New target.
951
ee9a09e9
DC
9522017-11-26 Dominik Czarnota <dominik.b.czarnota@gmail.com>
953
954 PR gdb/21945
955 * findcmd.c (_initialize_mem_search): Update find command help
956 text.
957
e8e7d10c
SM
9582017-11-26 Simon Marchi <simon.marchi@polymtl.ca>
959
960 * python/python.c (do_start_initialization): Change progname
961 type to gdb::unique_xmalloc_ptr. Release the pointer when using
962 Python 2.
963
6a997029
TT
9642017-11-26 Tom Tromey <tom@tromey.com>
965
966 * common/format.h: Add include guards.
967
41272101
TT
9682017-11-26 Tom Tromey <tom@tromey.com>
969
970 * nat/linux-personality.h (class
971 maybe_disable_address_space_randomization): New class.
972 (maybe_disable_address_space_randomization): Don't declare
973 function.
974 * nat/linux-personality.c (restore_personality)
975 (make_disable_asr_cleanup): Remove.
976 (maybe_disable_address_space_randomization): Now a constructor.
977 (~maybe_disable_address_space_randomization): New destructor.
978 * linux-nat.c (linux_nat_create_inferior): Update.
979
44287fd8
TT
9802017-11-26 Tom Tromey <tom@tromey.com>
981
982 * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
983
5ffd2cb7
UW
9842017-11-26 Ulrich Weigand <uweigand@de.ibm.com>
985
986 * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
987 "cooked" register. Access only first four bytes of branch target
988 registers.
989
0e5457dc
SDJ
9902017-11-25 Sergio Durigan Junior <sergiodj@redhat.com>
991
992 PR gdb/22491
993 * stap-probe.c (relocate_address): New function.
994 (stap_probe::get_relocated_address): Use 'relocate_address'.
995 (stap_probe::set_semaphore): Use 'relocate_address' and pass
996 'm_sem_addr'.
997 (stap_probe::clear_semaphore): Likewise.
998
deeeba55
PA
9992017-11-25 Pedro Alves <palves@redhat.com>
1000
1001 * dictionary.c: Include "safe-ctype.h".
1002 * minsyms.c: Include "safe-ctype.h".
1003 * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
1004
a81aaca0
PA
10052017-11-25 Pedro Alves <palves@redhat.com>
1006
1007 * completer.c (complete_line_internal_1): Skip spaces until the
1008 start of the command.
1009
0662b6a7
PA
10102017-11-24 Pedro Alves <palves@redhat.com>
1011
1012 * cp-support.c (cp_symbol_name_matches_1): New, factored out from
1013 cp_fq_symbol_name_matches. Pass language_cplus to
1014 strncmp_with_mode.
1015 (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
1016 (selftests::test_cp_symbol_name_cmp): New.
1017 (_initialize_cp_support): Register "cp_symbol_name_matches"
1018 selftests.
1019 * language.c (default_symbol_name_matcher): Pass language_minimal
1020 to strncmp_iw_with_mode.
1021 * utils.c: Include "cp-support.h" and <algorithm>.
1022 (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
1023 (cp_is_operator): New functions.
1024 (strncmp_iw_with_mode): Use them. Add language parameter. Don't
1025 skip whitespace in the symbol name when the lookup name doesn't
1026 have spaces, and vice versa.
1027 (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
1028 * utils.h (strncmp_iw_with_mode): Add language parameter.
1029
e547c119
JB
10302017-11-24 Joel Brobecker <brobecker@adacore.com>
1031
1032 * ada-lang.c (ada_exception_message_1, ada_exception_message):
1033 New functions.
1034 (print_it_exception): If available, display the exception
1035 message as well.
1036 * NEWS: Document new feature.
1037
d7fcdff9
UW
10382017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1039
1040 * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
1041
30649c14
PR
10422017-11-24 Philipp Rudo <prudo@linux.vnet.ibm.com>
1043
1044 * dtrace-probe.c (dtrace_probe::build_arg_exprs)
1045 (dtrace_probe::is_enabled, dtrace_probe::enable)
1046 (dtrace_probe::disable): Remove keyword 'struct' at for-range
1047 variable
1048 * probe.c (gen_ui_out_table_header_info)
1049 (print_ui_out_not_applicables): Remove keyword 'struct' at
1050 for-range variable
1051
7696f5c9
AH
10522017-11-24 Alan Hayward <alan.hayward@arm.com>
1053
1054 * configure.tgt: Add arch/aarch64.o
1055
8172f16b
SM
10562017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1057
1058 * common/common-utils.h: Include poison.h.
1059 (xfree): Remove declaration, add definition with static_assert.
1060 * common/common-utils.c (xfree): Remove.
1061 * common/poison.h (IsMallocatable): Define.
1062 (IsFreeable): Define.
1063 (free): Delete for non-freeable types.
1064 (xnew): New.
1065 (XNEW): Undef and redefine.
1066 (xcnew): New.
1067 (XCNEW): Undef and redefine.
1068 (xdelete): New.
1069 (XDELETE): Undef and redefine.
1070 (xnewvec): New.
1071 (XNEWVEC): Undef and redefine.
1072 (xcnewvec): New.
1073 (XCNEWVEC): Undef and redefine.
1074 (xresizevec): New.
1075 (XRESIZEVEC): Undef and redefine.
1076 (xdeletevec): New.
1077 (XDELETEVEC): Undef and redefine.
1078 (xnewvar): New.
1079 (XNEWVAR): Undef and redefine.
1080 (xcnewvar): New.
1081 (XCNEWVAR): Undef and redefine.
1082 (xresizevar): New.
1083 (XRESIZEVAR): Undef and redefine.
1084
7aabaf9d
SM
10852017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1086
1087 * gdbthread.h (private_thread_info): Define structure type, add
1088 virtual pure destructor.
1089 (thread_info) <priv>: Change type to unique_ptr.
1090 <private_dtor>: Remove.
1091 * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
1092 (private_thread_info::~private_thread_info): Provide default
1093 implementation.
1094 (thread_info::~thread_info): Don't call private_dtor nor
1095 manually free priv.
1096 * aix-thread.c (private_thread_info): Rename to ...
1097 (aix_thread_info): ... this.
1098 (get_aix_thread_info): New.
1099 (sync_threadlists): Adjust.
1100 (iter_tid): Adjust.
1101 (aix_thread_resume): Adjust.
1102 (aix_thread_fetch_registers): Adjust.
1103 (aix_thread_store_registers): Adjust.
1104 (aix_thread_extra_thread_info): Adjust.
1105 * darwin-nat.h (private_thread_info): Rename to ...
1106 (darwin_thread_info): ... this.
1107 (get_darwin_thread_info): New.
1108 * darwin-nat.c (darwin_init_thread_list): Adjust.
1109 (darwin_check_new_threads): Adjust.
1110 (thread_info_from_private_thread_info): Adjust.
1111 * linux-thread-db.c (private_thread_info): Rename to ...
1112 (thread_db_thread_info): ... this, initialize fields.
1113 (get_thread_db_thread_info): New.
1114 <dying>: Change type to bool.
1115 (update_thread_state): Adjust to type rename.
1116 (record_thread): Adjust to type rename an use of unique_ptr.
1117 (thread_db_pid_to_str): Likewise.
1118 (thread_db_extra_thread_info): Likewise.
1119 (thread_db_thread_handle_to_thread_info): Likewise.
1120 (thread_db_get_thread_local_address): Likewise.
1121 * nto-tdep.h (private_thread_info): Rename to ...
1122 (nto_thread_info): ... this, initialize fields.
1123 (get_nto_thread_info): New.
1124 <name>: Change type to std::string.
1125 * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
1126 use of unique_ptr.
1127 * nto-procfs.c (update_thread_private_data_name): Adjust to
1128 std::string change, allocate nto_private_thread_info with new.
1129 (update_thread_private_data): Adjust to unique_ptr.
1130 * remote.c (private_thread_info): Rename to ...
1131 (remote_thread_info): ... this, initialize data members with
1132 default values.
1133 <extra, name>: Change type to std::string.
1134 <thread_handle>: Change type to non-pointer.
1135 (free_private_thread_info): Remove.
1136 (get_private_info_thread): Rename to...
1137 (get_remote_thread_info): ... this, change return type, adjust to
1138 use of unique_ptr, use remote_thread_info constructor.
1139 (remote_add_thread): Adjust.
1140 (get_private_info_ptid): Rename to...
1141 (get_remote_thread_info): ...this, change return type.
1142 (remote_thread_name): Use get_remote_thread_info, adjust to
1143 change to std::string.
1144 (struct thread_item) <~thread_item>: Remove.
1145 <thread_handle>: Make non pointer.
1146 (start_thread): Adjust to thread_item::thread_handle type
1147 change.
1148 (remote_update_thread_list): Adjust to type name change, move
1149 strings from temporary to long-lived object instead of
1150 duplicating.
1151 (remote_threads_extra_info): Use get_remote_thread_info.
1152 (process_initial_stop_replies): Likewise.
1153 (resume_clear_thread_private_info): Likewise.
1154 (remote_resume): Adjust to type name change.
1155 (remote_commit_resume): Use get_remote_thread_info.
1156 (process_stop_reply): Adjust to type name change.
1157 (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
1158 (remote_stopped_by_hw_breakpoint): Likewise.
1159 (remote_stopped_by_watchpoint): Likewise.
1160 (remote_stopped_data_address): Likewise.
1161 (remote_core_of_thread): Likewise.
1162 (remote_thread_handle_to_thread_info): Use
1163 get_private_info_thread, adjust to thread_handle field type
1164 change.
1165
21fe1c75
SM
11662017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1167
1168 * remote.c (struct thread_item): Add constructor, disable copy
1169 construction and copy assignment, define default move
1170 construction and move assignment.
1171 <extra, name>: Change type to std::string.
1172 <core>: Initialize.
1173 <thread_handle>: Make non-pointer.
1174 (thread_item_t): Remove typedef.
1175 (DEF_VEC_O(thread_item_t)): Remove.
1176 (threads_listing_context) <contains_thread>: New method.
1177 <remove_thread>: New method.
1178 <items>: Change type to std::vector.
1179 (clear_threads_listing_context): Remove.
1180 (threads_listing_context_remove): Remove.
1181 (remote_newthread_step): Use thread_item constructor, adjust to
1182 change to std::vector.
1183 (start_thread): Use thread_item constructor, adjust to change to
1184 std::vector.
1185 (end_thread): Adjust to change to std::vector and std::string.
1186 (remote_get_threads_with_qthreadinfo): Use thread_item
1187 constructor, adjust to std::vector.
1188 (remote_update_thread_list): Adjust to change to std::vector and
1189 std::string, use threads_listing_context methods.
1190 (remove_child_of_pending_fork): Adjust.
1191 (remove_new_fork_children): Adjust.
1192 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
1193 (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
1194 * unittests/rsp-low-selftests.c: New file.
1195 * common/rsp-low.h: Include common/byte-vector.h.
1196 (hex2bin): New overload.
1197 * common/rsp-low.c (hex2bin): New overload.
1198
089354bb
SM
11992017-11-24 Simon Marchi <simon.marchi@ericsson.com>
1200
1201 * inferior.h (private_inferior): Define structure type, add
1202 virtual pure destructor.
1203 (inferior) <priv>: Change type to unique_ptr.
1204 * inferior.c (private_inferior::~private_inferior): Provide
1205 default implementation.
1206 (inferior::~inferior): Don't free priv field.
1207 (exit_inferior_1): Likewise.
1208 * darwin-nat.h (struct darwin_exception_info): Initialize fields.
1209 (darwin_exception_info): Remove typedef.
1210 (DEF_VEC_O (darwin_thread_t)); Remove.
1211 (private_inferior): Rename to ...
1212 (darwin_private_inferior): ... this, extend private_inferior.
1213 (get_darwin_inferior): New.
1214 <threads>: Change type to std::vector of darwin_thread_t pointers.
1215 * darwin-nat.c (darwin_check_new_threads): Adjust.
1216 (find_inferior_task_it): Adjust.
1217 (darwin_find_thread); Adjust.
1218 (darwin_suspend_inferior): Adjust.
1219 (darwin_resume_inferior): Adjust.
1220 (darwin_find_new_inferior): Adjust.
1221 (darwin_decode_notify_message): Adjust.
1222 (darwin_send_reply): Adjust.
1223 (darwin_resume_inferior_threads): Adjust.
1224 (darwin_suspend_inferior_threads): Adjust.
1225 (darwin_decode_message): Adjust.
1226 (darwin_wait): Adjust.
1227 (darwin_interrupt): Adjust.
1228 (darwin_deallocate_threads): Adjust.
1229 (darwin_mourn_inferior): Adjust, don't free private data.
1230 (darwin_reply_to_all_pending_messages): Adjust.
1231 (darwin_stop_inferior): Adjust.
1232 (darwin_setup_exceptions): Adjust.
1233 (darwin_kill_inferior): Adjust.
1234 (darwin_setup_request_notification): Adjust.
1235 (darwin_attach_pid): Adjust.
1236 (darwin_init_thread_list): Adjust.
1237 (darwin_setup_fake_stop_event): Adjust.
1238 (darwin_attach): Adjust.
1239 (darwin_detach): Adjust.
1240 (darwin_xfer_partial): Adjust.
1241 (set_enable_mach_exceptions): Adjust.
1242 (darwin_pid_to_exec_file): Adjust.
1243 (darwin_get_ada_task_ptid): Adjust.
1244 * darwin-nat-info.c (get_task_from_args): Adjust.
1245 (info_mach_ports_command): Adjust.
1246 (info_mach_region_command): Adjust.
1247 (info_mach_exceptions_command): Adjust.
1248 * remote.c (private_inferior): Rename to ...
1249 (remote_private_inferior): ... this, initialize fields.
1250 (get_remote_inferior); New.
1251 (remote_commit_resume): Use get_remote_inferior.
1252 (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
1253
d044bac8
PA
12542017-11-24 Pedro Alves <palves@redhat.com>
1255
1256 * NEWS: Mention linespecs and explicit locations, and completion
1257 improvements.
1258
e8d58cba
YQ
12592017-11-24 Yao Qi <yao.qi@linaro.org>
1260
1261 * regcache.c (regcache::dump): Remove footnote_register_size.
1262
a63f2d2f
YQ
12632017-11-24 Yao Qi <yao.qi@linaro.org>
1264
1265 * regcache.c (cooked_read_test): Add more test for readonly
1266 regcache.
1267
1b30aaa5
YQ
12682017-11-24 Yao Qi <yao.qi@linaro.org>
1269
1270 * gdbarch-selftests.c (test_target_has_registers): Move it to
1271 target.c.
1272 (test_target_has_stack): Likewise.
1273 (test_target_has_memory): Likewise.
1274 (test_target_prepare_to_store): Likewise.
1275 (test_target_store_registers): Likewise.
1276 (test_target_ops): Likewise.
1277 * regcache.c: Include selftest-arch.h and gdbthread.h.
1278 (target_ops_no_register): New class.
1279 (test_target_fetch_registers): New.
1280 (test_target_store_registers): New.
1281 (test_target_xfer_partial): New.
1282 (readwrite_regcache): New.
1283 (cooked_read_test): New.
1284 (_initialize_regcache): Register the test.
1285 * target.c: (test_target_has_registers): Moved from
1286 gdbarch-selftests.c.
1287 (test_target_has_stack): Likewise.
1288 (test_target_has_memory): Likewise.
1289 (test_target_prepare_to_store): Likewise.
1290 (test_target_store_registers): Likewise.
1291 * target.h (test_target_ops): New class.
1292
6654d750
AH
12932017-11-24 Alan Hayward <alan.hayward@arm.com>
1294
1295 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
1296 selftest.
1297
49bdb7ee
AH
12982017-11-24 Alan Hayward <alan.hayward@arm.com>
1299
1300 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
1301 * arch/aarch64.c (aarch64_create_target_description): Create
1302 new target description.
1303 * features/Makefile: Add new files.
1304 * features/aarch64.c: Remove file.
1305 * features/aarch64-core.c: New autogenerated file.
1306 * features/aarch64-fpu.c: New autogenerated file.
1307 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
da434ccb
AH
1308
13092017-11-24 Alan Hayward <alan.hayward@arm.com>
1310
1311 * Makefile.in: Add new files.
1312 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
1313 aarch64_read_description.
1314 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1315 Call aarch64_read_description.
1316 * aarch64-tdep.c (aarch64_read_description): New function.
1317 (aarch64_gdbarch_init): Call aarch64_read_description.
1318 * aarch64-tdep.h (aarch64_read_description): New function.
1319 * arch/aarch64.c: New file.
1320 * configure.tgt: Add new files.
1321
98ead37e
YQ
13222017-11-24 Yao Qi <yao.qi@linaro.org>
1323
1324 * mi/mi-main.c (register_changed_p): Update.
1325 * value.c (value_contents_bits_eq): Change return type.
1326 (value_contents_eq): Likewise.
1327 * value.h: Update comments.
1328
62ad7ce7
YQ
13292017-11-24 Yao Qi <yao.qi@linaro.org>
1330
1331 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
1332 local 'changed'. Remove error.
1333 (register_changed_p): Change return type to bool.
1334
506fe5f4
YQ
13352017-11-24 Yao Qi <yao.qi@linaro.org>
1336
1337 * arch/tic6x.c: New file.
1338 * arch/tic6x.h: New file.
1339 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
1340 tic6x-core.xml and tic6x-gp.xml.
1341 * features/tic6x-c6xp.c: Generated.
1342 * features/tic6x-core.c: Generated.
1343 * features/tic6x-gp.c: Generated.
1344 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
1345 "tic6x-".
1346
00ea2e2a
SM
13472017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1348
1349 * mi/mi-main.c (list_available_thread_groups): Change map value
1350 type to std::vector.
1351
f45e2a77
SM
13522017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1353
1354 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
1355
bd046f64
SM
13562017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1357
1358 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
1359 back to...
1360 <children_requested>: ... this.
1361 (varobj_get_num_children, varobj_update): Adjust.
1362
4c37490d
SM
13632017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1364
1365 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
1366 (ada_value_has_mutated): Likewise.
1367 * c-varobj.c (varobj_is_anonymous_child): Likewise.
1368 (c_is_path_expr_parent): Likewise.
1369 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
1370 (mi_cmd_var_set_frozen): Likewise.
1371 (mi_cmd_var_update_iter): Likewise.
1372 (mi_cmd_var_update): Likewise.
1373 * varobj.c (pretty_printing): Likewise.
1374 (varobj_enable_pretty_printing): Likewise.
1375 (struct varobj_root) <floating, is_valid>: Likewise.
1376 (struct varobj_dynamic) <children_requested>: Likewise.
1377 (delete_variable): Likewise.
1378 (delete_variable_1): Likewise.
1379 (install_variable): Likewise.
1380 (update_type_if_necessary): Likewise.
1381 (install_new_value): Likewise.
1382 (value_of_root): Likewise.
1383 (is_root_p): Likewise.
1384 (varobj_create): Likewise.
1385 (varobj_delete): Likewise.
1386 (varobj_has_more): Likewise.
1387 (varobj_set_frozen): Likewise.
1388 (varobj_get_frozen): Likewise.
1389 (install_dynamic_child): Likewise.
1390 (dynamic_varobj_has_child_method): Likewise.
1391 (update_dynamic_varobj_children): Likewise.
1392 (varobj_get_num_children): Likewise.
1393 (varobj_list_children): Likewise.
1394 (is_path_expr_parent): Likewise.
1395 (varobj_default_is_path_expr_parent): Likewise.
1396 (varobj_is_dynamic_p): Likewise.
1397 (varobj_set_value): Likewise.
1398 (varobj_value_has_mutated): Likewise.
1399 (varobj_update): Likewise.
1400 (check_scope): Likewise.
1401 (value_of_root_1): Likewise.
1402 (varobj_value_get_print_value): Likewise.
1403 (varobj_editable_p): Likewise.
1404 (varobj_value_is_changeable_p): Likewise.
1405 (varobj_floating_p): Likewise.
1406 (varobj_default_value_is_changeable_p): Likewise.
1407 (varobj_invalidate_iter): Likewise.
1408 * varobj.h (struct varobj_update_result) <type_changed,
1409 children_changed, changed, value_installed>: Likewise.
1410 (struct varobj) <updated, frozen, not_fetched>: Likewise.
1411 (struct lang_varobj_ops) <value_is_changeable_p,
1412 value_has_mutated, is_path_expr_parent>: Likewise.
1413 (varobj_delete): Likewise.
1414 (varobj_set_frozen): Likewise.
1415 (varobj_get_frozen): Likewise.
1416 (varobj_set_value): Likewise.
1417 (varobj_update): Likewise.
1418 (varobj_editable_p): Likewise.
1419 (varobj_floating_p): Likewise.
1420 (varobj_has_more): Likewise.
1421 (varobj_is_dynamic_p): Likewise.
1422 (varobj_default_value_is_changeable_p): Likewise.
1423 (varobj_value_is_changeable_p): Likewise.
1424 (varobj_is_anonymous_child): Likewise.
1425 (varobj_default_is_path_expr_parent): Likewise.
1426
9c23b42f
SDJ
14272017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1428
1429 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
1430 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
1431 <type_str>: Convert to 'std::string'.
1432 <expr>: Convert to 'expression_up'.
1433 (dtrace_probe_arg_s): Delete type and VEC.
1434 (dtrace_probe_enabler_s): Likewise.
1435 (struct dtrace_probe): Replace by...
1436 (class dtrace_static_probe_ops): ...this and...
1437 (class dtrace_probe): ...this.
1438 (dtrace_probe_is_linespec): Rename to...
1439 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
1440 to reflect change.
1441 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
1442 Adjust code. Create new instance of 'dtrace_probe'.
1443 (dtrace_build_arg_exprs): Rename to...
1444 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
1445 reflect change.
1446 (dtrace_get_probes): Rename to...
1447 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
1448 to reflect change.
1449 (dtrace_get_arg): Rename to...
1450 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
1451 reflect change.
1452 (dtrace_probe_is_enabled): Rename to...
1453 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
1454 change.
1455 (dtrace_get_probe_address): Rename to...
1456 (dtrace_probe::get_relocated_address): ...this. Adjust code
1457 to reflect change.
1458 (dtrace_get_probe_argument_count): Rename to...
1459 (dtrace_probe::get_argument_count): ...this. Adjust code to
1460 reflect change.
1461 (dtrace_can_evaluate_probe_arguments): Rename to...
1462 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
1463 to reflect change.
1464 (dtrace_evaluate_probe_argument): Rename to...
1465 (dtrace_probe::evaluate_argument): ...this. Adjust code to
1466 reflect change.
1467 (dtrace_compile_to_ax): Rename to...
1468 (dtrace_probe::compile_to_ax): ...this. Adjust code to
1469 reflect change.
1470 (dtrace_probe_destroy): Delete.
1471 (dtrace_type_name): Rename to...
1472 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
1473 reflect change.
1474 (dtrace_probe::get_static_ops): New method.
1475 (dtrace_gen_info_probes_table_header): Rename to...
1476 (dtrace_static_probe_ops::gen_info_probes_table_header):
1477 ...this. Adjust code to reflect change.
1478 (dtrace_gen_info_probes_table_values): Rename to...
1479 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
1480 code to reflect change.
1481 (dtrace_enable_probe): Rename to...
1482 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
1483 change.
1484 (dtrace_disable_probe): Rename to...
1485 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
1486 change.
1487 (struct probe_ops dtrace_probe_ops): Delete.
1488 (info_probes_dtrace_command): Call 'info_probes_for_spops'
1489 instead of 'info_probes_for_ops'.
1490 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
1491 of 'all_probe_ops'.
1492
0e9ae10f
SDJ
14932017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1494 Simon Marchi <simark@simark.ca>
1495
1496 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
1497 variable.
1498 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
1499 <aexpr>: Change type to 'expression_up'.
1500 (stap_probe_arg_s): Delete type and VEC.
1501 (struct stap_probe): Delete. Replace by...
1502 (class stap_static_probe_ops): ...this and...
1503 (class stap_probe): ...this. Rename variables to add 'm_'
1504 prefix. Do not use 'union' for arguments anymore.
1505 (stap_get_expected_argument_type): Receive probe name instead
1506 of 'struct stap_probe'. Adjust code.
1507 (stap_parse_probe_arguments): Rename to...
1508 (stap_probe::parse_arguments): ...this. Adjust code to
1509 reflect change.
1510 (stap_get_probe_address): Rename to...
1511 (stap_probe::get_relocated_address): ...this. Adjust code
1512 to reflect change.
1513 (stap_get_probe_argument_count): Rename to...
1514 (stap_probe::get_argument_count): ...this. Adjust code
1515 to reflect change.
1516 (stap_get_arg): Rename to...
1517 (stap_probe::get_arg_by_number'): ...this. Adjust code to
1518 reflect change.
1519 (can_evaluate_probe_arguments): Rename to...
1520 (stap_probe::can_evaluate_arguments): ...this. Adjust code
1521 to reflect change.
1522 (stap_evaluate_probe_argument): Rename to...
1523 (stap_probe::evaluate_argument): ...this. Adjust code
1524 to reflect change.
1525 (stap_compile_to_ax): Rename to...
1526 (stap_probe::compile_to_ax): ...this. Adjust code to
1527 reflect change.
1528 (stap_probe_destroy): Delete.
1529 (stap_modify_semaphore): Adjust comment.
1530 (stap_set_semaphore): Rename to...
1531 (stap_probe::set_semaphore): ...this. Adjust code to reflect
1532 change.
1533 (stap_clear_semaphore): Rename to...
1534 (stap_probe::clear_semaphore): ...this. Adjust code to
1535 reflect change.
1536 (stap_probe::get_static_ops): New method.
1537 (handle_stap_probe): Adjust code to create instance of
1538 'stap_probe'.
1539 (stap_get_probes): Rename to...
1540 (stap_static_probe_ops::get_probes): ...this. Adjust code to
1541 reflect change.
1542 (stap_probe_is_linespec): Rename to...
1543 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
1544 reflect change.
1545 (stap_type_name): Rename to...
1546 (stap_static_probe_ops::type_name): ...this. Adjust code to
1547 reflect change.
1548 (stap_gen_info_probes_table_header): Rename to...
1549 (stap_static_probe_ops::gen_info_probes_table_header):
1550 ...this. Adjust code to reflect change.
1551 (stap_gen_info_probes_table_values): Rename to...
1552 (stap_probe::gen_info_probes_table_values): ...this. Adjust
1553 code to reflect change.
1554 (struct probe_ops stap_probe_ops): Delete.
1555 (info_probes_stap_command): Use 'info_probes_for_spops'
1556 instead of 'info_probes_for_ops'.
1557 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
1558 of 'all_probe_ops'.
1559
935676c9
SDJ
15602017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1561
1562 * break-catch-throw.c (fetch_probe_arguments): Use
1563 'probe.prob' instead of 'probe.probe'.
1564 * breakpoint.c (create_longjmp_master_breakpoint): Call
1565 'can_evaluate_arguments' and 'get_relocated_address' methods
1566 from probe.
1567 (create_exception_master_breakpoint): Likewise.
1568 (add_location_to_breakpoint): Use 'sal->prob' instead of
1569 'sal->probe'.
1570 (bkpt_probe_insert_location): Call 'set_semaphore' method from
1571 probe.
1572 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
1573 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
1574 of 'probe_ops'.
1575 (probe_key_free): Call 'delete' on probe.
1576 (check_exception_resume): Use 'probe.prob' instead of
1577 'probe.probe'.
1578 * location.c (string_to_event_location_basic): Call
1579 'probe_linespec_to_static_ops'.
1580 * probe.c (class any_static_probe_ops): New class.
1581 (any_static_probe_ops any_static_probe_ops): New variable.
1582 (parse_probes_in_pspace): Receive 'static_probe_ops' as
1583 argument. Adjust code to reflect change.
1584 (parse_probes): Use 'static_probe_ops' instead of
1585 'probe_ops'. Adjust code to reflect change.
1586 (find_probes_in_objfile): Call methods to get name and
1587 provider from probe.
1588 (find_probe_by_pc): Use 'result.prob' instead of
1589 'result.probe'. Call 'get_relocated_address' method from
1590 probe.
1591 (collect_probes): Adjust comment and argument list to receive
1592 'static_probe_ops' instead of 'probe_ops'. Adjust code to
1593 reflect change. Call necessary methods from probe.
1594 (compare_probes): Call methods to get name and provider from
1595 probes.
1596 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
1597 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
1598 adjust code accordingly.
1599 (print_ui_out_not_applicables): Likewise.
1600 (info_probes_for_ops): Rename to...
1601 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
1602 as argument instead of 'probe_ops'. Adjust code. Call
1603 necessary methods from probe.
1604 (info_probes_command): Use 'info_probes_for_spops'.
1605 (enable_probes_command): Pass correct argument to
1606 'collect_probes'. Call methods from probe.
1607 (disable_probes_command): Likewise.
1608 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
1609 (get_probe_argument_count): Move to
1610 'any_static_probe_ops::get_argument_count'.
1611 (can_evaluate_probe_arguments): Move to
1612 'any_static_probe_ops::can_evaluate_arguments'.
1613 (evaluate_probe_argument): Move to
1614 'any_static_probe_ops::evaluate_argument'.
1615 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
1616 'probe.probe'.
1617 (probe_linespec_to_ops): Rename to...
1618 (probe_linespec_to_static_ops): ...this. Adjust code.
1619 (probe_any_is_linespec): Rename to...
1620 (any_static_probe_ops::is_linespec): ...this.
1621 (probe_any_get_probes): Rename to...
1622 (any_static_probe_ops::get_probes): ...this.
1623 (any_static_probe_ops::type_name): New method.
1624 (any_static_probe_ops::gen_info_probes_table_header): New
1625 method.
1626 (compute_probe_arg): Use 'pc_probe.prob' instead of
1627 'pc_probe.probe'. Call methods from probe.
1628 (compile_probe_arg): Likewise.
1629 (std::vector<const probe_ops *> all_probe_ops): Delete.
1630 (std::vector<const static_probe_ops *> all_static_probe_ops):
1631 New variable.
1632 (_initialize_probe): Use 'all_static_probe_ops' instead of
1633 'all_probe_ops'.
1634 * probe.h (struct info_probe_column) <field_name>: Delete
1635 extraneous newline
1636 (info_probe_column_s): Delete type and VEC.
1637 (struct probe_ops): Delete. Replace with...
1638 (class static_probe_ops): ...this and...
1639 (clas probe): ...this.
1640 (struct bound_probe) <bound_probe>: Delete extraneous
1641 newline. Adjust constructor to receive 'probe' instead of
1642 'struct probe'.
1643 <probe>: Rename to...
1644 <prob>: ...this. Delete extraneous newline.
1645 <objfile>: Delete extraneous newline.
1646 (register_probe_ops): Delete unused prototype.
1647 (info_probes_for_ops): Rename to...
1648 (info_probes_for_spops): ...this. Adjust comment.
1649 (get_probe_address): Move to 'probe::get_address'.
1650 (get_probe_argument_count): Move to
1651 'probe::get_argument_count'.
1652 (can_evaluate_probe_arguments): Move to
1653 'probe::can_evaluate_arguments'.
1654 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
1655 * solib-svr4.c (struct svr4_info): Adjust comment.
1656 (struct probe_and_action) <probe>: Rename to...
1657 <prob>: ...this.
1658 (register_solib_event_probe): Receive 'probe' instead of
1659 'struct probe' as argument. Use 'prob' instead of 'probe'
1660 when applicable.
1661 (solib_event_probe_action): Call 'get_argument_count' method
1662 from probe. Adjust comment.
1663 (svr4_handle_solib_event): Adjust comment. Call
1664 'evaluate_argument' method from probe.
1665 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
1666 from probe.
1667 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
1668 'struct probe'. Call 'can_evaluate_arguments' from probe.
1669 * symfile.h: Forward declare 'class probe' instead of 'struct
1670 probe'.
1671 * symtab.h: Likewise.
1672 (struct symtab_and_line) <probe>: Rename to...
1673 <prob>: ...this.
1674 * tracepoint.c (start_tracing): Use 'prob' when applicable.
1675 Call probe methods.
1676 (stop_tracing): Likewise.
1677
8f6cb6c3
JB
16782017-11-22 Joel Brobecker <brobecker@adacore.com>
1679
1680 * ravenscar-thread.c (ravenscar_inferior_created): Remove
1681 trailing newline at end of string in call to warning.
1682
479f8de1
SM
16832017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1684
1685 * osdata.h: Include vector isntead of vec.h.
1686 (osdata_column_s): Remove typedef.
1687 (struct osdata_column): Add constructor.
1688 <name, value>: Change type to std::string.
1689 (DEF_VEC_O (osdata_column_s)): Remove.
1690 (osdata_item_s): Remove typedef.
1691 (struct osdata_item) <columns>: Change type to std::vector.
1692 (DEF_VEC_O (osdata_item_s)): Remove.
1693 (struct osdata): Add constructor.
1694 <type>: Change type to std::string.
1695 <items>: Change type to std::vector.
1696 (osdata_p): Remove typedef.
1697 (DEF_VEC_P (osdata_p)): Remove.
1698 (osdata_parse): Return a unique_ptr.
1699 (osdata_free): Remove.
1700 (make_cleanup_osdata_free): Remove.
1701 (get_osdata): Return a unique_ptr.
1702 (get_osdata_column): Return pointer to std::string, take a
1703 reference to osdata_item as parameter.
1704 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
1705 unique_ptr.
1706 <property_name>: Change type to std::string.
1707 (osdata_start_osdata): Allocate osdata with new and adjust.
1708 (osdata_start_item): Adjust.
1709 (osdata_start_column): Adjust.
1710 (osdata_end_column): Adjust.
1711 (clear_parsing_data): Remove.
1712 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
1713 (osdata_item_clear): Remove.
1714 (get_osdata): return a unique_ptr and adjust.
1715 (get_osdata_column): Return a pointer to std::string and adjust.
1716 (info_osdata): Adjust.
1717 * mi/mi-main.c: Include <map>.
1718 (free_vector_of_osdata_items): Remove.
1719 (list_available_thread_groups): Adjust, use std::map instead of
1720 splay tree.
1721
41bd68f5
SM
17222017-11-22 Simon Marchi <simon.marchi@ericsson.com>
1723
1724 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
1725 case in switch.
1726
7e2fd2f4
SM
17272017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1728
1729 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
1730
0604393c
SM
17312017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1732
1733 * varobj.h (struct varobj_update_result): Add constructor, add
1734 move constructor, disable copy and assign, initialize fields.
1735 <newobj>: Change type to std::vector.
1736 (varobj_update): Return std::vector.
1737 * varobj.c (install_dynamic_child): Change VEC parameters to
1738 std::vector and adjust.
1739 (update_dynamic_varobj_children): Likewise.
1740 (varobj_update): Return std::vector and adjust.
1741 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
1742
ddf0ea08
SM
17432017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1744
1745 * varobj.h (struct varobj) <parent>: Remove const.
1746 <children>: Change type to std::vector.
1747 (varobj_list_children): Return std::vector const reference.
1748 (varobj_restrict_range): Change parameter type to std::vector
1749 const reference.
1750 * varobj.c (varobj_has_more): Adjust.
1751 (varobj_restrict_range): Change parameter type to std::vector
1752 const reference and adjust.
1753 (install_dynamic_child): Adjust.
1754 (update_dynamic_varobj_children): Adjust.
1755 (varobj_list_children): Return std::vector const reference and
1756 adjust.
1757 (varobj_add_child): Adjust.
1758 (update_type_if_necessary): Adjust.
1759 (varobj_update): Adjust.
1760 (delete_variable_1): Adjust.
1761 * ada-varobj.c (ada_value_has_mutated): Adjust.
1762 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
1763
9e5b9d2b
SM
17642017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1765
1766 * varobj.h (struct varobj): Add constructor and destructor,
1767 initialize fields.
1768 * varobj.c (struct varobj_root): Initialize fields.
1769 (struct varobj_dynamic): Initialize fields.
1770 (varobj_create): Use unique_ptr instead of cleanup. Create
1771 varobj with new instead of new_root_variable.
1772 (delete_variable_1): Free variable with delete instead of
1773 free_variable.
1774 (create_child_with_value): Create variable with new instead of
1775 new_variable.
1776 (varobj::varobj): New.
1777 (varobj::~varobj): New (body mostly coming from free_variable).
1778 (new_variable): Remove.
1779 (free_variable): Remove.
1780 (do_free_variable_cleanup): Remove.
1781 (make_cleanup_free_variable): Remove.
1782
fc35dab1
UW
17832017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1784
1785 * core-regset.c: Remove file.
1786 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
1787
2400729e
UW
17882017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1789
1790 * NEWS: Document use of GNU MPFR.
1791 * README: Likewise.
1792
1793 * Makefile.in (LIBMPFR): Add define.
1794 (CLIBS): Add $(LIBMPFR).
1795 * configure.ac: Add --with-mpfr configure option.
1796 * configure: Regenerate.
1797 * config.in: Regenerate.
1798
1799 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
1800 (class mpfr_float_ops): New type.
1801 (mpfr_float_ops::from_target): Two new overloaded functions.
1802 (mpfr_float_ops::to_target): Likewise.
1803 (mpfr_float_ops::to_string): New function.
1804 (mpfr_float_ops::from_string): Likewise.
1805 (mpfr_float_ops::to_longest): Likewise.
1806 (mpfr_float_ops::from_longest): Likewise.
1807 (mpfr_float_ops::from_ulongest): Likewise.
1808 (mpfr_float_ops::to_host_double): Likewise.
1809 (mpfr_float_ops::from_host_double): Likewise.
1810 (mpfr_float_ops::convert): Likewise.
1811 (mpfr_float_ops::binop): Likewise.
1812 (mpfr_float_ops::compare): Likewise.
1813 (get_target_float_ops): Use mpfr_float_ops if available.
1814
7a26362d
UW
18152017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1816
1817 * target-float.c: Do not include <math.h>.
1818 Include <cmath> and <limits>.
1819 (DOUBLEST): Do not define.
1820 (class target_float_ops): New type.
1821 (class host_float_ops): New templated type.
1822 (class decimal_float_ops): New type.
1823
1824 (floatformat_to_doublest): Rename to ...
1825 (host_float_ops<T>::from_target): ... this. Use template type T
1826 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1827 (host_float_ops<T>::from_target): New overload using a type argument.
1828 (floatformat_from_doublest): Rename to ...
1829 (host_float_ops<T>::to_target): ... this. Use template type T
1830 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1831 (host_float_ops<T>::to_target): New overload using a type argument.
1832 (floatformat_printf_format): New function.
1833 (struct printf_length_modifier): New templated type.
1834 (floatformat_to_string): Rename to ...
1835 (host_float_ops<T>::to_string): ... this. Use type instead of
1836 floatformat argument. Use floatformat_printf_format and
1837 printf_length_modifier. Remove special handling of invalid numbers,
1838 infinities and NaN (moved to target_float_to_string).
1839 (struct scanf_length_modifier): New templated type.
1840 (floatformat_from_string): Rename to ...
1841 (host_float_ops<T>::from_string): ... this. Use type instead of
1842 floatformat argument. Use scanf_length_modifier.
1843 (floatformat_to_longest): Rename to ...
1844 (host_float_ops<T>::to_longest): ... this. Use type instead of
1845 floatformat argument. Handle out-of-range values deterministically.
1846 (floatformat_from_longest): Rename to ...
1847 (host_float_ops<T>::from_longest): ... this. Use type instead of
1848 floatformat argument.
1849 (floatformat_from_ulongest): Rename to ...
1850 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
1851 floatformat argument.
1852 (floatformat_to_host_double): Rename to ...
1853 (host_float_ops<T>::to_host_double): ... this. Use type instead of
1854 floatformat argument.
1855 (floatformat_from_host_double): Rename to ...
1856 (host_float_ops<T>::from_host_double): ... this. Use type instead of
1857 floatformat argument.
1858 (floatformat_convert): Rename to ...
1859 (host_float_ops<T>::convert): ... this. Use type instead of
1860 floatformat arguments. Remove handling of no-op conversions.
1861 (floatformat_binop): Rename to ...
1862 (host_float_ops<T>::binop): ... this. Use type instead of
1863 floatformat arguments.
1864 (floatformat_compare): Rename to ...
1865 (host_float_ops<T>::compare): ... this. Use type instead of
1866 floatformat arguments.
1867
1868 (match_endianness): Use type instead of length/byte_order arguments.
1869 (set_decnumber_context): Likewise.
1870 (decimal_from_number): Likewise. Update calls.
1871 (decimal_to_number): Likewise.
1872 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
1873 (decimal_float_ops::to_host_double): New dummy function.
1874 (decimal_float_ops::from_host_double): Likewise.
1875 (decimal_to_string): Rename to ...
1876 (decimal_float_ops::to_string): ... this. Use type instead of
1877 length/byte_order arguments. Update calls.
1878 (decimal_from_string): Rename to ...
1879 (decimal_float_ops::from_string): ... this. Use type instead of
1880 length/byte_order arguments. Update calls.
1881 (decimal_from_longest): Rename to ...
1882 (decimal_float_ops::from_longest): ... this. Use type instead of
1883 length/byte_order arguments. Update calls.
1884 (decimal_from_ulongest): Rename to ...
1885 (decimal_float_ops::from_ulongest): ... this. Use type instead of
1886 length/byte_order arguments. Update calls.
1887 (decimal_to_longest): Rename to ...
1888 (decimal_float_ops::to_longest): ... this. Use type instead of
1889 length/byte_order arguments. Update calls.
1890 (decimal_binop): Rename to ...
1891 (decimal_float_ops::binop): ... this. Use type instead of
1892 length/byte_order arguments. Update calls.
1893 (decimal_compare): Rename to ...
1894 (decimal_float_ops::compare): ... this. Use type instead of
1895 length/byte_order arguments. Update calls.
1896 (decimal_convert): Rename to ...
1897 (decimal_float_ops::convert): ... this. Use type instead of
1898 length/byte_order arguments. Update calls.
1899
1900 (target_float_same_category_p): New function.
1901 (target_float_same_format_p): Likewise.
1902 (target_float_format_length): Likewise.
1903 (enum target_float_ops_kind): New type.
1904 (get_target_float_ops_kind): New function.
1905 (get_target_float_ops): Three new overloaded functions.
1906
1907 (target_float_is_zero): Update call.
1908 (target_float_to_string): Add special handling of invalid numbers,
1909 infinities and NaN (moved from floatformat_to_string). Use
1910 target_float_ops callback.
1911 (target_float_from_string): Use target_float_ops callback.
1912 (target_float_to_longest): Likewise.
1913 (target_float_from_longest): Likewise.
1914 (target_float_from_ulongest): Likewise.
1915 (target_float_to_host_double): Likewise.
1916 (target_float_from_host_double): Likewise.
1917 (target_float_convert): Add special case for no-op conversions.
1918 Use target_float_ops callback.
1919 (target_float_binop): Use target_float_ops callback.
1920 (target_float_compare): Likewise.
1921
a9f26f60
YQ
19222017-11-22 Yao Qi <yao.qi@linaro.org>
1923
1924 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
1925
29f9a567
YQ
19262017-11-22 Yao Qi <yao.qi@linaro.org>
1927
1928 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
1929 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
1930
3b1b69bf
JG
19312017-11-21 Jerome Guitton <guitton@adacore.com>
1932
1933 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
1934 with event ptid from the lower layer before doing the
1935 ravenscar-specific update.
1936
54aa6c67
JB
19372017-11-21 Joel Brobecker <brobecker@adacore.com>
1938
1939 * ravenscar-thread.c (is_ravenscar_task): Also verify that
1940 the ptid's TID is nonzero.
1941
cf3fbed4
JB
19422017-11-21 Joel Brobecker <brobecker@adacore.com>
1943
1944 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
1945 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
1946 Make non-static. Change return type to char *. Adjust code
1947 accordingly. Rewrite the function's documentation.
1948 (read_atcb): Adjust call to get_tcb_types_info accordingly.
1949 * ravenscar-thread.c (ravenscar_inferior_created): Check that
1950 we have enough debugging information in the runtime to support
1951 Ada task debugging before we enable the ravenscar-thread layer.
1952
9edcc12f
JB
19532017-11-21 Joel Brobecker <brobecker@adacore.com>
1954
1955 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
1956 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
1957 * ravenscar-thread.c: Add into comment.
1958 (base_magic_null_ptid): Delete.
1959 (base_ptid): Change documentation.
1960 (ravenscar_active_task): Renames ravenscar_running_thread.
1961 All callers updated throughout.
1962 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
1963 (ravenscar_task_is_currently_active): Likewise.
1964 (get_base_thread_from_ravenscar_task): Ditto.
1965 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
1966 (ravenscar_runtime_initialized): Likewise.
1967 (get_running_thread_id): Add new parameter "cpu". Adjust
1968 implementation to handle this new parameter.
1969 (ravenscar_fetch_registers): Small adjustment to use
1970 is_ravenscar_task and ravenscar_task_is_currently_active in
1971 order to decide whether to use the target beneath or this
1972 module's arch_ops.
1973 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
1974 (ravenscar_stopped_by_sw_breakpoint): Use
1975 get_base_thread_from_ravenscar_task to get the underlying
1976 thread, rather than using base_ptid.
1977 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1978 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1979 Likewise.
1980 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
1981
65d40437
JB
19822017-11-21 Joel Brobecker <brobecker@adacore.com>
1983
1984 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
1985 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
1986 (get_tcb_types_info): Set fieldnos.base_cpu.
1987 (read_atcb): Set task_info->base_cpu.
1988 (info_task): Print "Base CPU" info if set by runtime.
1989
e02544b2
JB
19902017-11-21 Joel Brobecker <brobecker@adacore.com>
1991
1992 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
1993 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1994 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1995 New functions.
1996 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
1997 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
1998 to_stopped_data_address and to_core_of_thread fields of
1999 ravenscar_ops.
2000
ed0f4273
UW
20012017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
2002
2003 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
2004 (struct gdbarch_tdep): New member long_double_abi.
2005 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
2006 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
2007 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
2008 format depending on long_double_abi tdep member.
2009 (ppc_floatformat_for_type): Handle __ibm128 type.
2010
0fc76421
SM
20112017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
2012
2013 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
2014
e6b2f5ef
PA
20152017-11-21 Pedro Alves <palves@redhat.com>
2016
2017 * dwarf2read.c (mapped_index::find_name_components_bounds)
2018 <completion mode, upper bound>: Use std::lower_bound instead of
2019 std::upper_bound.
2020 (test_mapped_index_find_name_component_bounds): Remove incorrect
2021 "t1_fund" from expected symbols.
2022
5c58de74
PA
20232017-11-21 Pedro Alves <palves@redhat.com>
2024
2025 * dwarf2read.c (mapped_index::name_components_casing): New field.
2026 (mapped_index) <build_name_components,
2027 find_name_components_bounds): Declare new methods.
2028 (mapped_index::find_name_components_bounds)
2029 (mapped_index::build_name_components): New methods, factored out
2030 from dw2_expand_symtabs_matching_symbol.
2031 (check_find_bounds_finds)
2032 (test_mapped_index_find_name_component_bounds): New.
2033 (run_test): Rename to ...
2034 (test_dw2_expand_symtabs_matching_symbol): ... this.
2035 (run_test): Reimplement.
2036
e1ef7d7a
PA
20372017-11-21 Pedro Alves <palves@redhat.com>
2038
2039 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
2040 (symbol_end): Use cp_ident_is_alnum.
2041 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
2042 * dwarf2read.c (make_sort_after_prefix_name): New function.
2043 (dw2_expand_symtabs_matching_symbol): Use it.
2044 (test_symbols): Add more symbols.
2045 (run_test): Add tests.
2046
cf724bc9
TT
20472017-11-17 Tom Tromey <tom@tromey.com>
2048
2049 * symtab.h (enum symbol_subclass_kind): New.
2050 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
2051 Remove.
2052 <subclass>: New member.
2053 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
2054 * rust-lang.c (rust_get_trait_object_pointer): Update.
2055 * dwarf2read.c (read_func_scope): Update.
2056 (read_variable): Update.
2057
68e745e3
TT
20582017-11-17 Tom Tromey <tom@tromey.com>
2059
2060 * dwarf2read.c (read_func_scope): Update.
2061 * symtab.h (struct template_symbol): Derive from symbol.
2062 <base>: Remove.
2063
71a3c369
TT
20642017-11-17 Tom Tromey <tom@tromey.com>
2065
2066 * symtab.h (struct symbol) <is_rust_vtable>: New member.
2067 (struct rust_vtable_symbol): New.
2068 (find_symbol_at_address): Declare.
2069 * symtab.c (find_symbol_at_address): New function.
2070 * symfile.h (struct quick_symbol_functions)
2071 <find_compunit_symtab_by_address>: New member.
2072 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
2073 function.
2074 (debug_sym_quick_functions): Link to
2075 debug_qf_find_compunit_symtab_by_address.
2076 * rust-lang.c (rust_get_trait_object_pointer): New function.
2077 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
2078 rust_get_trait_object_pointer.
2079 * psymtab.c (psym_relocate): Clear psymbol_map.
2080 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
2081 functions.
2082 (psym_functions): Link to psym_find_compunit_symtab_by_address.
2083 * objfiles.h (struct objfile) <psymbol_map>: New member.
2084 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
2085 (process_die) <DW_TAG_variable>: New case. Call read_variable.
2086 (rust_containing_type, read_variable): New functions.
2087
7468702d
SM
20882017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2089
2090 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
2091
37269bc9
SM
20922017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2093
2094 * common/filestuff.c: Include <algorithm>.
2095 (open_fds): Change type to std::vector<int>.
2096 (do_mark_open_fd): Adjust.
2097 (unmark_fd_no_cloexec): Adjust.
2098 (do_close): Adjust.
2099
5c632425
SM
21002017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2101
2102 * breakpoint.c (output_thread_groups): Take an std::vector.
2103 (print_one_breakpoint_location): Adjust.
2104
ced9779b
JB
21052017-11-17 Joel Brobecker <brobecker@adacore.com>
2106
2107 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
2108 (ada_evaluate_subexp_for_cast): New function.
2109 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
2110 ada_evaluate_subexp_for_cast.
2111 (ada_evaluate_subexp) <nosideret>: Replace code by call to
2112 eval_skip_value.
2113 * eval.c (evaluate_var_value): Make non-static.
2114 (evaluate_var_msym_value, eval_skip_value): Likewise.
2115 * value.h (evaluate_var_value, evaluate_var_msym_value)
2116 (eval_skip_value): Declare.
2117
b7e22850
JB
21182017-11-16 Joel Brobecker <brobecker@adacore.com>
2119
2120 * ada-lang.c (ada_value_cast): Remove parameter "noside".
2121 Update all callers.
2122
9ccabccd
PA
21232017-11-16 Pedro Alves <palves@redhat.com>
2124
2125 * python/py-unwind.c (pyuw_sniffer): Translate
2126 PyExc_KeyboardInterrupt to a GDB Quit exception.
2127
d930703d
PA
21282017-11-16 Pedro Alves <palves@redhat.com>
2129
2130 * infrun.c (resume_cleanups): Delete.
2131 (resume): No longer install a resume_cleanups cleanup nor call
2132 QUIT.
2133 (proceed): Pass the terminal to the inferior.
2134 (keep_going_pass_signal): No longer install a resume_cleanups
2135 cleanup.
2136
38dc2859
PA
21372017-11-16 Pedro Alves <palves@redhat.com>
2138
2139 * inf-loop.c (inferior_event_handler): Don't swallow the exception
2140 if the prompt is blocked.
2141
688fca4f
PA
21422017-11-16 Pedro Alves <palves@redhat.com>
2143
2144 * breakpoint.c (insert_bp_location): Replace bp_err and
2145 bp_err_message locals by a gdb_exception local.
2146
e2c33ac7
PA
21472017-11-16 Pedro Alves <palves@redhat.com>
2148
2149 * inflow.c (scoped_ignore_sigttou): New class.
2150 (child_terminal_ours_1, new_tty): Use it.
2151
d7236961
UW
21522017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
2153
2154 * target-float.c (decimal_from_number): Add byte_order argument and
2155 call match_endianness. Error if unknown floating-point type.
2156 (decimal_to_number): Add byte_order argument and call match_endianness.
2157 (decimal_from_longest): Update call. Do not call match_endianness.
2158 (decimal_from_ulongest): Likewise.
2159 (decimal_binop): Likewise.
2160 (decimal_is_zero): Likewise.
2161 (decimal_compare): Likewise.
2162 (decimal_convert): Likewise.
2163
d8ae99a7
PM
21642017-11-16 Phil Muldoon <pmuldoon@redhat.com>
2165
2166 * python/python.c (gdbpy_rbreak): New function.
2167 * NEWS: Document Python rbreak feature.
2168
c632b645
YQ
21692017-11-16 Yao Qi <yao.qi@linaro.org>
2170
2171 * features/tic6x-c62x.xml: Remove.
2172 * features/tic6x-c64x.xml: Remove.
2173 * features/tic6x-c64xp.xml: Remove.
2174
a014b87a
JB
21752017-11-15 John Baldwin <jhb@FreeBSD.org>
2176
2177 * symtab.h: Include <array>.
2178
94765011
JB
21792017-11-15 John Baldwin <jhb@FreeBSD.org>
2180
2181 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
2182 (bsd_kvm_proc_cmd): Likewise.
2183
625ad440
SM
21842017-11-15 Simon Marchi <simon.marchi@ericsson.com>
2185
2186 * tui/tui-win.c (window_name_completer): Replace VEC with
2187 std::vector.
2188
c0c11fa9
AC
21892017-11-15 Andrew Cagney <cagney@gnu.org>
2190
2191 * MAINTAINERS: Remove no-longer applicable entries.
2192
34a7ebaf
AC
21932017-11-15 Andrew Cagney <cagney@gnu.org>
2194
2195 * MAINTAINERS: Move self to Past Maintainers.
2196
5334ef39
YQ
21972017-11-15 Yao Qi <yao.qi@linaro.org>
2198
2199 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
2200 * features/nios2-linux.c: Remove.
2201 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
2202 initialize_tdesc_nios2_linux.
2203
a714b0d6
YQ
22042017-11-15 Yao Qi <yao.qi@linaro.org>
2205
2206 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
2207 M68HC11_LAST_HARD_REG + 1.
2208
92ffd475
PC
22092017-11-14 Paul Carroll <pcarroll@codesourcery.com>
2210
2211 PR gdb/22388
2212 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
2213 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
2214 Return TARGET_XFER_EOF if size of returned data is 0.
2215
07431908
SM
22162017-11-14 Simon Marchi <simon.marchi@ericsson.com>
2217
2218 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2219 memory-map-selftests.c.
2220 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
2221 * memory-map.c (memory_map_start_memory): Fix computation of hi
2222 address.
2223 * unittests/memory-map-selftests.c: New file.
2224
31432a67
JB
22252017-11-09 Joel Brobecker <brobecker@adacore.com>
2226
2227 * ada-lang.c: Fix some typos in the general command documenting
2228 how Ada expressions are being evaluated and how their result
2229 is printed.
2230
e793c052
TT
22312017-11-09 Tom Tromey <tom@tromey.com>
2232
2233 * psymtab.c (psymbol_hash): Do not hash string contents.
2234 (psymbol_compare): Add comment.
2235
7e8835c5
TT
22362017-11-09 Tom Tromey <tom@tromey.com>
2237
2238 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
2239
286acbb5
JB
22402017-11-08 Joel Brobecker <brobecker@adacore.com>
2241
2242 * ada-exp.y (write_var_from_sym): Remove parameter
2243 "orig_left_context". Update all callers.
2244
b44ec619
SM
22452017-11-08 Simon Marchi <simon.marchi@ericsson.com>
2246
2247 * tracepoint.h (class collection_list) <stringify>: Return
2248 std::vector<std::string>.
2249 (encode_actions_rsp): Change parameters to
2250 std::vector<std::string> *.
2251 * tracepoint.c (collection_list::stringify): Return
2252 std::vector<std::string> and adjust accordingly.
2253 (encode_actions_rsp): Changee parameters to
2254 std::vector<std::string> and adjust accordingly.
2255 * remote.c (free_actions_list),
2256 free_actions_list_cleanup_wrapper): Remove.
2257 (remote_download_tracepoint): Adjust to std::vector.
2258
2f4732b0
TT
22592017-11-08 Tom Tromey <tom@tromey.com>
2260
2261 * dwarf2read.c (symbolp): Remove typedef.
2262 (read_func_scope): Use std::vector.
2263 (process_structure_scope): Use std::vector.
2264
f9d67a22
PA
22652017-11-08 Pedro Alves <palves@redhat.com>
2266
2267 * ada-lang.c (ada_make_symbol_completion_list): Use
2268 completion_skip_symbol.
2269 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
2270 (symbol_is_function_or_method(symbol*)): New.
2271 (add_symtab_completions): Add complete_symbol_mode parameter. Use
2272 completion_skip_symbol.
2273 (default_collect_symbol_completion_matches_break_on): Use
2274 completion_skip_symbol. Pass down mode.
2275 (collect_file_symbol_completion_matches): Pass down mode.
2276 * symtab.h (symbol_is_function_or_method): New declarations.
2277 (completion_skip_symbol): New template function.
2278
56d87ef7
PA
22792017-11-08 Pedro Alves <palves@redhat.com>
2280
2281 * linespec.c (iterate_over_all_matching_symtabs): Add
2282 search_domain parameter. Pass it down to expand_symtabs_matching.
2283 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
2284 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
2285 search_domain.
2286 (add_all_symbol_names_from_pspace): Add search_domain parameter.
2287 Pass it down.
2288 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
2289 symbols.
2290 (add_matching_symbols_to_info): Add search_domain parameter. Pass
2291 it down.
2292
1b026119
PA
22932017-11-08 Pedro Alves <palves@redhat.com>
2294
2295 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
2296 text_len locals and don't pass them down.
2297 * symtab.c (completion_list_add_name): Remove
2298 sym_text/sym_text_len parameters and adjust.
2299 (completion_list_add_symbol, completion_list_add_msymbol)
2300 (completion_list_objc_symbol, completion_list_add_fields)
2301 (add_symtab_completions): Likewise.
2302 (default_collect_symbol_completion_matches_break_on)
2303 (collect_file_symbol_completion_matches): Remove sym_text_len
2304 local and don't pass it down.
2305 * symtab.h (completion_list_add_name): Remove
2306 sym_text/sym_text_len parameters.
2307
c62446b1
PA
23082017-11-08 Pedro Alves <palves@redhat.com>
2309
2310 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2311 unittests/lookup_name_info-selftests.c.
2312 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
2313 * cp-support.c: Include "selftest.h".
2314 (cp_remove_params_1): Rename from cp_remove_params. Add
2315 'require_param' parameter, and handle it.
2316 (cp_remove_params): Reimplement.
2317 (cp_remove_params_if_any): New.
2318 (selftests::quote): New.
2319 (selftests::check_remove_params): New.
2320 (selftests::test_cp_remove_params): New.
2321 (_initialize_cp_support): Install
2322 selftests::test_cp_remove_params.
2323 * cp-support.h (cp_remove_params_if_any): Declare.
2324 * dwarf2read.c :Include "selftest.h".
2325 (dw2_expand_symtabs_matching_symbol): Use
2326 lookup_name_info::make_ignore_params.
2327 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
2328 (selftests::dw2_expand_symtabs_matching::string_or_null)
2329 (selftests::dw2_expand_symtabs_matching::check_match)
2330 (selftests::dw2_expand_symtabs_matching::test_symbols)
2331 (selftests::dw2_expand_symtabs_matching::run_test): New.
2332 (_initialize_dwarf2_read): Register
2333 selftests::dw2_expand_symtabs_matching::run_test.
2334 * psymtab.c (psym_expand_symtabs_matching): Use
2335 lookup_name_info::make_ignore_params.
2336 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
2337 If the lookup name wants to ignore parameters, strip them.
2338 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
2339 code handling '('.
2340 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
2341 (default_collect_symbol_completion_matches_break_on): Don't try to
2342 strip parameters.
2343 * symtab.h (lookup_name_info::lookup_name_info): Add
2344 'ignore_parameters' parameter.
2345 (lookup_name_info::ignore_parameters)
2346 (lookup_name_info::make_ignore_params): New methods.
2347 (lookup_name_info::m_ignore_parameters): New field.
2348 * unittests/lookup_name_info-selftests.c: New file.
2349
61920122
PA
23502017-11-08 Pedro Alves <palves@redhat.com>
2351
2352 * dwarf2read.c (dw2_expand_marked_cus)
2353 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
2354 (dw2_expand_symtabs_matching): Move further below.
2355 (dw2_expand_marked_cus): Reindent.
2356
3f563c84
PA
23572017-11-08 Pedro Alves <palves@redhat.com>
2358
2359 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
2360 (struct name_component): New.
2361 (mapped_index::name_components): New field.
2362 (mapped_index::symbol_name_at): New method.
2363 (dwarf2_read_index): Call mapped_index ctor.
2364 (dw2_map_matching_symbols): Add comment about name_components
2365 table.
2366 (dw2_expand_symtabs_matching): Factor part to...
2367 (dw2_expand_symtabs_matching_symbol): ... this new function.
2368 Build name components table, and lookup symbols in it before
2369 calling the name matcher.
2370 (dw2_expand_marked_cus): New, factored out from
2371 dw2_expand_symtabs_matching.
2372 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
2373
b5ec771e
PA
23742017-11-08 Pedro Alves <palves@redhat.com>
2375
2376 * ada-lang.c (ada_encode): Rename to ..
2377 (ada_encode_1): ... this. Add throw_errors parameter and handle
2378 it.
2379 (ada_encode): Reimplement.
2380 (match_name): Delete, folded into full_name.
2381 (resolve_subexp): No longer pass the encoded name to
2382 ada_lookup_symbol_list.
2383 (should_use_wild_match): Delete.
2384 (name_match_type_from_name): New.
2385 (ada_lookup_simple_minsym): Use lookup_name_info and the
2386 language's symbol_name_matcher_ftype.
2387 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
2388 (ada_add_block_renamings): Adjust to use lookup_name_info.
2389 (ada_lookup_name): New.
2390 (add_nonlocal_symbols, ada_add_all_symbols)
2391 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
2392 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
2393 (ada_name_for_lookup): Delete.
2394 (ada_lookup_encoded_symbol): Construct a verbatim name.
2395 (wild_match): Reverse sense of return type. Use bool.
2396 (full_match): Reverse sense of return type. Inline bits of old
2397 match_name here.
2398 (ada_add_block_symbols): Adjust to use lookup_name_info.
2399 (symbol_completion_match): Delete, folded into...
2400 (ada_lookup_name_info::matches): ... .this new method.
2401 (symbol_completion_add): Delete.
2402 (ada_collect_symbol_completion_matches): Add name_match_type
2403 parameter. Adjust to use lookup_name_info and
2404 completion_list_add_name.
2405 (get_var_value, ada_add_global_exceptions): Adjust to use
2406 lookup_name_info.
2407 (ada_get_symbol_name_cmp): Delete.
2408 (do_wild_match, do_full_match): New functions.
2409 (ada_lookup_name_info::ada_lookup_name_info): New method.
2410 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
2411 functions.
2412 (ada_language_defn): Install ada_get_symbol_name_matcher.
2413 * ada-lex.l (processId): If name starts with '<', copy it
2414 verbatim.
2415 * block.c (block_iter_match_step, block_iter_match_first)
2416 (block_iter_match_next, block_lookup_symbol)
2417 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
2418 lookup_name_info.
2419 * block.h (block_iter_match_first, block_iter_match_next)
2420 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
2421 * c-lang.c (c_language_defn, cplus_language_defn)
2422 (asm_language_defn, minimal_language_defn): Adjust comments to
2423 refer to la_get_symbol_name_matcher.
2424 * completer.c (complete_files_symbols)
2425 (collect_explicit_location_matches, symbol_completer): Pass a
2426 symbol_name_match_type down.
2427 * completer.h (class completion_match, completion_match_result):
2428 New classes.
2429 (completion_tracker::reset_completion_match_result): New method.
2430 (completion_tracker::m_completion_match_result): New field.
2431 * cp-support.c (make_symbol_overload_list_block): Adjust to use
2432 lookup_name_info.
2433 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
2434 functions.
2435 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
2436 * d-lang.c: Adjust comments to refer to
2437 la_get_symbol_name_matcher.
2438 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
2439 Adjust to use lookup_name_info.
2440 (dict_iter_match_first, dict_iter_match_next)
2441 (iter_match_first_hashed, iter_match_next_hashed)
2442 (iter_match_first_linear, iter_match_next_linear): Adjust to work
2443 with a lookup_name_info.
2444 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
2445 Likewise.
2446 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
2447 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
2448 (gdb_index_symbol_name_matcher): New class.
2449 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
2450 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
2451 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
2452 with a symbol_name_match_type.
2453 (f_language_defn): Adjust comments to refer to
2454 la_get_symbol_name_matcher.
2455 * go-lang.c (go_language_defn): Adjust comments to refer to
2456 la_get_symbol_name_matcher.
2457 * language.c (default_symbol_name_matcher)
2458 (language_get_symbol_name_matcher): New functions.
2459 (unknown_language_defn, auto_language_defn): Adjust comments to
2460 refer to la_get_symbol_name_matcher.
2461 * language.h (symbol_name_cmp_ftype): Delete.
2462 (language_defn) <la_collect_symbol_completion_matches>: Add match
2463 type parameter.
2464 <la_get_symbol_name_cmp>: Delete field.
2465 <la_get_symbol_name_matcher>: New field.
2466 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
2467 (default_symbol_name_matcher, language_get_symbol_name_matcher):
2468 Declare.
2469 * linespec.c (iterate_over_all_matching_symtabs)
2470 (iterate_over_file_blocks): Adjust to use lookup_name_info.
2471 (find_methods): Add language parameter, and use lookup_name_info
2472 and the language's symbol_name_matcher_ftype.
2473 (linespec_complete_function): Adjust.
2474 (lookup_prefix_sym): Use lookup_name_info.
2475 (add_all_symbol_names_from_pspace): Adjust.
2476 (find_superclass_methods): Add language parameter and pass it
2477 down.
2478 (find_method): Pass symbol language down.
2479 (find_linespec_symbols): Don't demangle or Ada encode here.
2480 (search_minsyms_for_name): Add lookup_name_info parameter.
2481 (add_matching_symbols_to_info): Add name_match_type parameter.
2482 Use lookup_name_info.
2483 * m2-lang.c (m2_language_defn): Adjust comments to refer to
2484 la_get_symbol_name_matcher.
2485 * minsyms.c: Include <algorithm>.
2486 (add_minsym_to_demangled_hash_table): Remove table parameter and
2487 add objfile parameter. Use search_name_hash, and add language to
2488 demangled languages vector.
2489 (struct found_minimal_symbols): New struct.
2490 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
2491 New functions.
2492 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
2493 input names here. Use lookup_name_info instead. Lookup up
2494 demangled names once for each language in the demangled names
2495 vector.
2496 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
2497 demangled names once for each language in the demangled names
2498 vector.
2499 (build_minimal_symbol_hash_tables): Adjust.
2500 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
2501 lookup_name_info.
2502 * objc-lang.c (objc_language_defn): Adjust comment to refer to
2503 la_get_symbol_name_matcher.
2504 * objfiles.h: Include <vector>.
2505 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
2506 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
2507 la_get_symbol_name_matcher.
2508 * p-lang.c (pascal_language_defn): Adjust comment to refer to
2509 la_get_symbol_name_matcher.
2510 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
2511 (match_partial_symbol): Use symbol_name_match_type,
2512 lookup_name_info and psymbol_name_matches.
2513 (lookup_partial_symbol): Use lookup_name_info.
2514 (map_block): Use symbol_name_match_type and lookup_name_info.
2515 (psym_map_matching_symbols): Use symbol_name_match_type.
2516 (psymbol_name_matches): New.
2517 (recursively_search_psymtabs): Use lookup_name_info and
2518 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
2519 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
2520 'kind' parameter to 'domain'.
2521 * rust-lang.c (rust_language_defn): Adjust comment to refer to
2522 la_get_symbol_name_matcher.
2523 * symfile-debug.c (debug_qf_map_matching_symbols)
2524 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
2525 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
2526 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
2527 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
2528 Adjust to use symbol_name_match_type.
2529 <expand_symtabs_matching>: Adjust to use lookup_name_info.
2530 (expand_symtabs_matching): Adjust to use lookup_name_info.
2531 * symmisc.c (maintenance_expand_symtabs): Use
2532 lookup_name_info::match_any ().
2533 * symtab.c (symbol_matches_search_name): New.
2534 (eq_symbol_entry): Adjust to use lookup_name_info and the
2535 language's matcher.
2536 (demangle_for_lookup_info::demangle_for_lookup_info): New.
2537 (lookup_name_info::match_any): New.
2538 (iterate_over_symbols, search_symbols): Use lookup_name_info.
2539 (compare_symbol_name): Add language, lookup_name_info and
2540 completion_match_result parameters, and use them.
2541 (completion_list_add_name): Make extern. Add language and
2542 lookup_name_info parameters. Use them.
2543 (completion_list_add_symbol, completion_list_add_msymbol)
2544 (completion_list_objc_symbol): Add lookup_name_info parameters and
2545 adjust. Pass down language.
2546 (completion_list_add_fields): Add lookup_name_info parameters and
2547 adjust. Pass down language.
2548 (add_symtab_completions): Add lookup_name_info parameters and
2549 adjust.
2550 (default_collect_symbol_completion_matches_break_on): Add
2551 name_match_type parameter, and use it. Use lookup_name_info.
2552 (default_collect_symbol_completion_matches)
2553 (collect_symbol_completion_matches): Add name_match_type
2554 parameter, and pass it down.
2555 (collect_symbol_completion_matches_type): Adjust.
2556 (collect_file_symbol_completion_matches): Add name_match_type
2557 parameter, and use lookup_name_info.
2558 * symtab.h: Include <string> and "common/gdb_optional.h".
2559 (enum class symbol_name_match_type): New.
2560 (class ada_lookup_name_info): New.
2561 (struct demangle_for_lookup_info): New.
2562 (class lookup_name_info): New.
2563 (symbol_name_matcher_ftype): New.
2564 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
2565 (symbol_matches_search_name): Declare.
2566 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
2567 (default_collect_symbol_completion_matches)
2568 (collect_symbol_completion_matches)
2569 (collect_file_symbol_completion_matches): Add name_match_type
2570 parameter.
2571 (iterate_over_symbols): Use lookup_name_info.
2572 (completion_list_add_name): Declare.
2573 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
2574 (strncmp_iw_with_mode): Now extern.
2575 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
2576 (strncmp_iw_with_mode): Declare.
2577
5ffa0793
PA
25782017-11-08 Keith Seitz <keiths@redhat.com>
2579 Pedro Alves <palves@redhat.com>
2580
2581 * ada-lang.c (ada_language_defn): Install
2582 default_search_name_hash.
2583 * buildsym.c (struct buildsym_compunit): <language>: New field.
2584 (finish_block_internal): Pass language when creating dictionaries.
2585 (start_buildsym_compunit, start_symtab): New language parameters.
2586 Use them.
2587 (restart_symtab): Pass down compilation unit's language.
2588 * buildsym.h (enum language): Forward declare.
2589 (start_symtab): New 'language' parameter.
2590 * c-lang.c (c_language_defn, cplus_language_defn)
2591 (asm_language_defn, minimal_language_defn): Install
2592 default_search_name_hash.
2593 * coffread.c (coff_start_symtab): Adjust.
2594 * d-lang.c (d_language_defn): Install default_search_name_hash.
2595 * dbxread.c (struct symloc): Add 'pst_language' field.
2596 (PST_LANGUAGE): Define.
2597 (start_psymtab, read_ofile_symtab): Use it.
2598 (process_one_symbol): New 'language' parameter. Pass it down.
2599 * dictionary.c (struct dictionary) <language>: New field.
2600 (DICT_LANGUAGE): Define.
2601 (dict_create_hashed, dict_create_hashed_expandable)
2602 (dict_create_linear, dict_create_linear_expandable): New parameter
2603 'language'. Set the dictionary's language.
2604 (iter_match_first_hashed): Adjust to rename.
2605 (insert_symbol_hashed): Assert we don't see mismatching
2606 languages. Adjust to rename.
2607 (dict_hash): Rename to ...
2608 (default_search_name_hash): ... this and make extern.
2609 * dictionary.h (struct language_defn): Forward declare.
2610 (dict_create_hashed): New parameter 'language'.
2611 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
2612 * f-lang.c (f_language_defn): Install default_search_name_hash.
2613 * go-lang.c (go_language_defn): Install default_search_name_hash.
2614 * jit.c (finalize_symtab): Pass compunit's language to dictionary
2615 creation.
2616 * language.c (unknown_language_defn, auto_language_defn):
2617 * language.h (language_defn::la_search_name_hash): New field.
2618 (default_search_name_hash): Declare.
2619 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
2620 * mdebugread.c (new_block): New parameter 'language'.
2621 * mdebugread.c (parse_symbol): Pass symbol language to block
2622 allocation.
2623 (psymtab_to_symtab_1): Pass down language.
2624 (new_symtab): Pass compunit's language to block allocation.
2625 * objc-lang.c (objc_language_defn): Install
2626 default_search_name_hash.
2627 * opencl-lang.c (opencl_language_defn):
2628 * p-lang.c (pascal_language_defn): Install
2629 default_search_name_hash.
2630 * rust-lang.c (rust_language_defn): Install
2631 default_search_name_hash.
2632 * stabsread.h (enum language): Forward declare.
2633 (process_one_symbol): Add 'language' parameter.
2634 * symtab.c (search_name_hash): New function.
2635 * symtab.h (search_name_hash): Declare.
2636 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
2637
2a1dde5d
PA
26382017-11-08 Pedro Alves <palves@redhat.com>
2639
2640 * cp-name-parser.y (main): Don't initialize extra_chars.
2641
95a6b0a1
TT
26422017-11-07 Tom Tromey <tom@tromey.com>
2643
2644 * event-top.h (command_handler): Constify.
2645 * record-full.c (cmd_record_full_start): Update.
2646 * thread.c (thread_apply_all_command): Update.
2647 * printcmd.c (eval_command): Update.
2648 * mi/mi-main.c (mi_execute_cli_command): Update.
2649 (mi_execute_async_cli_command): Update.
2650 * tui/tui-stack.c (tui_update_command): Update.
2651 * cli/cli-interp.c (safe_execute_command): Constify.
2652 * record.c (record_start): Update.
2653 (record_start, record_stop, cmd_record_start): Update.
2654 * record-btrace.c (cmd_record_btrace_bts_start): Update.
2655 (cmd_record_btrace_pt_start): Update.
2656 (cmd_record_btrace_start): Update.
2657 (cmd_record_btrace_start): Update.
2658 * reverse.c (exec_reverse_once): Update.
2659 * python/python.c (execute_gdb_command): Don't copy the command.
2660 * event-top.c (command_line_handler): Update.
2661 (command_handler): Constify.
2662 * defs.h (deprecated_call_command_hook): Constify.
2663 * cli/cli-script.h (execute_user_command): Constify.
2664 * cli/cli-script.c (execute_user_command): Constify.
2665 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
2666 (enum command_control_type): Update.
2667 * main.c (catch_command_errors): Remove non-const overload.
2668 (catch_command_errors_ftype): Remove.
2669 * python/py-cmd.c (cmdpy_function): Constify.
2670 * guile/scm-cmd.c (cmdscm_function): Constify.
2671 * cli/cli-dump.c (call_dump_func): Constify.
2672 * cli/cli-decode.c (do_const_cfunc): Constify.
2673 (do_sfunc): Constify.
2674 (cmd_func): Constify.
2675 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
2676 * top.h (execute_command): Constify.
2677 * top.c (execute_command): Constify.
2678 (execute_command_to_string): Constify.
2679 (deprecated_call_command_hook): Constify.
2680 * command.h (cmd_func): Constify.
2681 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
2682
eb4c3f4a
TT
26832017-11-07 Tom Tromey <tom@tromey.com>
2684
2685 * ada-lang.c (catch_ada_exception_command): Constify.
2686 (catch_assert_command): Constify.
2687 * break-catch-throw.c (catch_catch_command, catch_throw_command)
2688 (catch_rethrow_command): Constify.
2689 (catch_exception_command_1): Constify.
2690 * breakpoint.h (add_catch_command): Constify.
2691 * break-catch-syscall.c (catch_syscall_command_1): Constify.
2692 (catch_syscall_split_args): Constify.
2693 * break-catch-sig.c (catch_signal_command): Constify.
2694 (catch_signal_split_args): Constify.
2695 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
2696 cmd_const_sfunc_ftype.
2697 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
2698 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2699 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2700 (add_setshow_string_cmd, struct cmd_list_element)
2701 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2702 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2703 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
2704 Constify.
2705 (set_cmd_sfunc): Constify.
2706 (empty_sfunc): Constify.
2707 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2708 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2709 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
2710 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2711 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2712 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
2713 Constify.
2714 (set_cmd_sfunc): Constify.
2715 (cmd_sfunc_ftype): Remove.
2716 * compile/compile.c (set_compile_args): Constify.
2717 * infrun.c (set_disable_randomization): Constify.
2718 * infcmd.c (set_args_command, set_cwd_command): Constify.
2719 * breakpoint.c (set_condition_evaluation_mode): Constify.
2720 (add_catch_command): Constify.
2721 (catch_fork_command_1, catch_exec_command_1)
2722 (catch_load_command_1, catch_unload_command_1): Constify.
2723 (catch_load_or_unload): Constify.
2724 * guile/scm-param.c (pascm_set_func): Constify.
2725 (add_setshow_generic): Constify.
2726 * python/py-param.c (get_set_value): Constify.
2727 * top.h (set_verbose): Constify.
2728 * tui/tui-win.c (tui_set_var_cmd): Constify.
2729 * mi/mi-main.c (set_mi_async_command): Constify.
2730 * cli/cli-logging.c (set_logging_overwrite)
2731 (set_logging_redirect): Constify.
2732 * value.c (set_max_value_size): Constify.
2733 * valprint.c (set_input_radix, set_output_radix): Constify.
2734 * utils.c (set_width_command, set_height_command): Constify.
2735 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
2736 * tracepoint.c (set_disconnected_tracing)
2737 (set_circular_trace_buffer, set_trace_buffer_size)
2738 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
2739 * top.c (set_history_size_command, set_verbose, set_editing)
2740 (set_gdb_datadir, set_history_filename): Constify.
2741 * target.c (set_targetdebug, maint_set_target_async_command)
2742 (maint_set_target_non_stop_command, set_target_permissions)
2743 (set_write_memory_permission): Constify.
2744 (open_target): Constify.
2745 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
2746 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
2747 * symtab.c (set_symbol_cache_size_handler): Constify.
2748 * symfile.c (set_ext_lang_command): Constify.
2749 * symfile-debug.c (set_debug_symfile): Constify.
2750 * source.c (set_directories_command): Constify.
2751 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
2752 * serial.c (set_parity): Constify.
2753 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
2754 * remote.c (set_remote_exec_file, set_remotebreak)
2755 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
2756 * record.c (set_record_insn_history_size)
2757 (set_record_call_history_size): Constify.
2758 * record-full.c (set_record_full_insn_max_num): Constify.
2759 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
2760 * osabi.c (set_osabi): Constify.
2761 * mips-tdep.c (set_mips64_transfers_32bit_regs)
2762 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
2763 * maint.c (maintenance_set_profile_cmd): Constify.
2764 * linux-thread-db.c (set_libthread_db_search_path): Constify.
2765 * language.c (set_language_command, set_range_command)
2766 (set_case_command): Constify.
2767 * infrun.c (set_non_stop, set_observer_mode)
2768 (set_stop_on_solib_events, set_schedlock_func)
2769 (set_exec_direction_func): Constify.
2770 * infcmd.c (set_inferior_tty_command): Constify.
2771 * disasm.c (set_disassembler_options_sfunc): Constify.
2772 * demangle.c (set_demangling_command): Constify.
2773 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
2774 * cris-tdep.c (set_cris_version, set_cris_mode)
2775 (set_cris_dwarf2_cfi): Constify.
2776 * corefile.c (set_gnutarget_command): Constify.
2777 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
2778 (set_target_wide_charset_sfunc): Constify.
2779 * breakpoint.c (update_dprintf_commands): Constify.
2780 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
2781 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
2782 (set_disassembly_style_sfunc): Constify.
2783 * arch-utils.c (set_endian, set_architecture): Constify.
2784 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
2785 * agent.c (set_can_use_agent): Constify.
2786
5fed81ff
TT
27872017-11-07 Tom Tromey <tom@tromey.com>
2788
2789 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
2790 (go32_pde, go32_pte, go32_pte_for_address): Constify.
2791 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
2792 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
2793 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
2794 (parse_int_arg, show_thread_default_detach_sc_cmd)
2795 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
2796 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
2797 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
2798 (show_task_pause_cmd, set_task_detach_sc_cmd)
2799 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
2800 (set_noninvasive_cmd, set_thread_pause_cmd)
2801 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
2802 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
2803 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
2804 * windows-nat.c (display_selectors): Constify.
2805 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
2806 non-const "cfunc".
2807 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
2808 (cmd_cfunc_eq): Likewise.
2809 (struct cmd_list_element): Likewise.
2810 (do_cfunc): Remove.
2811 (cli_user_command_p): Update.
2812 * command.h (add_cmd): Remove non-const overload.
2813 (cmd_cfunc_ftype): Remove typedef.
2814 (cmd_cfunc_eq): Remove non-const overload.
2815 * value.c (show_values): Constify.
2816 * thread.c (thread_apply_all_command): Constify.
2817 * symfile.c (load_command): Constify.
2818 * source.c (directory_command): Constify.
2819 * maint.c (maintenance_internal_error)
2820 (maintenance_demangler_warning, maintenance_space_display)
2821 (maintenance_print_architecture, maintenance_translate_address)
2822 (maintenance_info_selftests, maintenance_internal_warning):
2823 Constify.
2824 * breakpoint.c (disable_trace_command, enable_trace_command):
2825 Constify.
2826 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
2827 Constify.
2828 (add_auto_load_safe_path): Constify.
2829 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
2830 * top.h (show_commands): Constify.
2831 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
2832 * sparc64-tdep.c (adi_examine_command): Constify.
2833 (adi_assign_command): Constify.
2834
1d12d88f
TT
28352017-11-07 Tom Tromey <tom@tromey.com>
2836
2837 * frame.h (info_locals_command, info_args_command): Constify.
2838 * auto-load.h (auto_load_info_scripts): Constify.
2839 * inferior.h (registers_info): Constify.
2840 * copying.c: Rebuild.
2841 * copying.awk: Constify generated commands.
2842 * auto-load.c (auto_load_info_scripts)
2843 (info_auto_load_gdb_scripts): Constify.
2844 * cli/cli-decode.c (struct cmd_list_element): Take a
2845 cmd_const_cfunc_ftype.
2846 * command.h (add_info): Take a cmd_const_cfunc_ftype.
2847 * tui/tui-win.c (tui_all_windows_info): Constify.
2848 * python/py-auto-load.c (info_auto_load_python_scripts):
2849 Constify.
2850 * cli/cli-cmds.c (show_command): Remove non-const overload.
2851 * tracepoint.c (info_tvariables_command, info_scope_command):
2852 Constify.
2853 (info_static_tracepoint_markers_command): Constify.
2854 * thread.c (info_threads_command): Constify.
2855 (print_thread_info_1): Constify.
2856 * target.c (info_target_command): Constify.
2857 * symtab.c (info_sources_command, info_functions_command)
2858 (info_types_command): Constify.
2859 (info_variables_command): Remove non-const overload.
2860 * symfile.c (info_ext_lang_command): Constify.
2861 * stack.c (info_frame_command, info_locals_command)
2862 (info_args_command): Constify.
2863 (backtrace_command): Remove non-const overload.
2864 * source.c (info_source_command, info_line_command): Constify.
2865 * solib.c (info_sharedlibrary_command): Constify.
2866 * skip.c (info_skip_command): Constify.
2867 * ser-go32.c (info_serial_command): Constify.
2868 * reverse.c (info_bookmarks_command): Constify.
2869 * printcmd.c (info_symbol_command, info_address_command)
2870 (info_display_command): Constify.
2871 * osdata.c (info_osdata_command): Constify.
2872 * objc-lang.c (info_selectors_command, info_classes_command):
2873 Constify.
2874 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
2875 * memattr.c (info_mem_command): Constify.
2876 * macrocmd.c (info_macro_command, info_macros_command): Constify.
2877 * linux-fork.c (info_checkpoints_command): Constify.
2878 * infrun.c (info_signals_command): Constify.
2879 * inflow.c (info_terminal_command): Constify.
2880 * inferior.c (info_inferiors_command): Constify.
2881 (print_inferior): Constify.
2882 * infcmd.c (info_program_command, info_all_registers_command)
2883 (info_registers_command, info_vector_command)
2884 (info_float_command): Constify.
2885 (registers_info): Constify.
2886 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
2887 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
2888 Constify.
2889 * f-valprint.c (info_common_command): Constify.
2890 * dcache.c (info_dcache_command): Constify.
2891 (dcache_info_1): Constify.
2892 * darwin-nat-info.c (info_mach_tasks_command)
2893 (info_mach_task_command, info_mach_ports_command)
2894 (info_mach_port_command, info_mach_threads_command)
2895 (info_mach_thread_command, info_mach_regions_command)
2896 (info_mach_regions_recurse_command, info_mach_region_command)
2897 (info_mach_exceptions_command): Constify.
2898 (get_task_from_args): Constify.
2899 * cp-support.c (info_vtbl_command): Constify.
2900 * breakpoint.c (info_watchpoints_command)
2901 (info_tracepoints_command): Constify.
2902 (info_breakpoints_command): Remove non-const overload.
2903 * avr-tdep.c (avr_io_reg_read_command): Constify.
2904 * auxv.c (info_auxv_command): Constify.
2905 * ada-tasks.c (info_tasks_command): Constify.
2906 (info_task): Constify.
2907 * ada-lang.c (info_exceptions_command): Constify.
2908
0b39b52e
TT
29092017-11-07 Tom Tromey <tom@tromey.com>
2910
2911 * solib.h (no_shared_libraries): Constify.
2912 * frame.h (return_command): Constify.
2913 * cli/cli-cmds.h (quit_command): Constify.
2914 * top.h (quit_command, execute_command): Constify.
2915 * target.h (flash_erase_command): Constify.
2916 * inferior.h (set_inferior_args, attach_command): Constify.
2917 * tracepoint.h (start_tracing, stop_tracing): Constify.
2918 * breakpoint.h (break_command, tbreak_command)
2919 (hbreak_command_wrapper, thbreak_command_wrapper)
2920 (rbreak_command_wrapper, watch_command_wrapper)
2921 (awatch_command_wrapper, rwatch_command_wrapper)
2922 (get_tracepoint_by_number): Constify.
2923 * symtab.c (info_variables_command, rbreak_command)
2924 (symtab_symbol_info): Constify.
2925 (info_variables_command): Add non-const overload.
2926 * top.c (dont_repeat_command): Constify.
2927 * breakpoint.c (ignore_command, commands_command)
2928 (condition_command, tbreak_command, hbreak_command)
2929 (thbreak_command, clear_command, break_command)
2930 (info_breakpoints_command, watch_command, rwatch_command)
2931 (awatch_command, trace_command, ftrace_command, strace_command)
2932 (trace_pass_command, break_range_command, dprintf_command)
2933 (agent_printf_command, get_tracepoint_by_number)
2934 (watch_maybe_just_location, trace_pass_command): Constify.
2935 (info_breakpoints_command): Add non-const overload.
2936 * tracefile.c (tsave_command): Constify.
2937 * infcmd.c (attach_command, disconnect_command, signal_command)
2938 (queue_signal_command, stepi_command, nexti_command)
2939 (finish_command, next_command, step_command, until_command)
2940 (advance_command, jump_command, continue_command, run_command)
2941 (start_command, starti_command, interrupt_command)
2942 (run_command_1, set_inferior_args, step_1): Constify.
2943 * inferior.c (add_inferior_command, remove_inferior_command)
2944 (clone_inferior_command): Constify.
2945 * linux-fork.c (checkpoint_command, restart_command): Constify.
2946 * windows-nat.c (signal_event_command): Constify.
2947 * guile/guile.c (guile_repl_command, guile_command): Constify.
2948 * printcmd.c (x_command, display_command, printf_command)
2949 (output_command, set_command, call_command, print_command)
2950 (eval_command): Constify.
2951 (non_const_set_command): Remove.
2952 (_initialize_printcmd): Update.
2953 * source.c (forward_search_command, reverse_search_command):
2954 Constify.
2955 * jit.c (jit_reader_load_command, jit_reader_unload_command):
2956 Constify.
2957 * infrun.c (handle_command): Constify.
2958 * memattr.c (mem_command): Constify.
2959 * stack.c (return_command, up_command, up_silently_command)
2960 (down_command, down_silently_command, frame_command)
2961 (backtrace_command, func_command, backtrace_command_1): Constify.
2962 (backtrace_command): Add non-const overload.
2963 * remote-sim.c (simulator_command): Constify.
2964 * exec.c (set_section_command): Constify.
2965 * tracepoint.c (tdump_command, trace_variable_command)
2966 (tstatus_command, tstop_command, tstart_command)
2967 (end_actions_pseudocommand, while_stepping_pseudocommand)
2968 (collect_pseudocommand, teval_pseudocommand, actions_command)
2969 (start_tracing, stop_tracing): Constify.
2970 * value.c (init_if_undefined_command): Constify.
2971 * tui/tui-stack.c (tui_update_command): Constify.
2972 * tui/tui-win.c (tui_refresh_all_command)
2973 (tui_set_tab_width_command, tui_set_win_height_command)
2974 (tui_set_focus_command, tui_scroll_forward_command)
2975 (tui_scroll_backward_command, tui_scroll_left_command)
2976 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
2977 (tui_set_win_height): Constify.
2978 * tui/tui-layout.c (tui_layout_command): Constify.
2979 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
2980 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
2981 (proc_untrace_sysexit_cmd): Constify.
2982 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
2983 (threadset_test_cmd, threadlist_update_test_cmd)
2984 (threadalive_test): Constify.
2985 * objc-lang.c (print_object_command): Constify.
2986 * command.h (add_com): Constify.
2987 * cli/cli-dump.c (restore_command): Constify.
2988 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
2989 (help_command, complete_command, shell_command, edit_command)
2990 (list_command, disassemble_command, make_command)
2991 (apropos_command, alias_command): Constify.
2992 * cli/cli-script.c (document_command, define_command)
2993 (while_command, if_command, validate_comname): Constify.
2994 * cli/cli-decode.c (struct cmd_list_element): Change type of
2995 "fun".
2996 * target.c (do_monitor_command, flash_erase_command): Constify.
2997 * regcache.c (reg_flush_command): Constify.
2998 * reverse.c (reverse_step, reverse_next, reverse_stepi)
2999 (reverse_nexti, reverse_continue, reverse_finish)
3000 (save_bookmark_command, goto_bookmark_command)
3001 (exec_reverse_once): Constify.
3002 * python/python.c (python_interactive_command, python_command):
3003 Constify.
3004 * typeprint.c (ptype_command, whatis_command, whatis_exp):
3005 Constify.
3006 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
3007 * gcore.c (gcore_command): Constify.
3008
85c4be7c
TT
30092017-11-07 Tom Tromey <tom@tromey.com>
3010
3011 * printcmd.c (x_command): Call set_repeat_arguments.
3012 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
3013 * top.c (repeat_arguments): New global.
3014 (set_repeat_arguments): New function.
3015 (execute_command): Handle repeat_arguments.
3016 (show_commands): Calls set_repeat_arguments.
3017 * command.h (set_repeat_arguments): Declare.
3018
022643b4
TT
30192017-11-07 Tom Tromey <tom@tromey.com>
3020
3021 * stack.c (backtrace_command): Use std::string.
3022 (backtrace_command_1): Make "count_exp" const.
3023
5614fb77
TT
30242017-11-07 Tom Tromey <tom@tromey.com>
3025
3026 * source.c (directory_switch, mod_path, add_path): Constify.
3027 * defs.h (add_path, mod_path, directory_switch): Constify.
3028 * mi/mi-cmd-env.c (env_mod_path): Constify.
3029
6be9a197
TT
30302017-11-07 Tom Tromey <tom@tromey.com>
3031
3032 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
3033 (run_command_1, continue_command, step_1, jump_command)
3034 (signal_command, until_command, advance_command, finish_command)
3035 (attach_command): Update.
3036
c2252c0d
TT
30372017-11-07 Tom Tromey <tom@tromey.com>
3038
3039 * command.h (set_cmd_cfunc): Don't declare.
3040 * cli/cli-decode.c (set_cmd_cfunc): Now static.
3041
1ee870c5
TT
30422017-11-07 Tom Tromey <tom@tromey.com>
3043
3044 * stack.c (select_frame_command): Constify.
3045 * cli/cli-decode.c (add_com_suppress_notification): Constify.
3046 * command.h (add_com_suppress_notification): Constify.
3047
ee7ddd71
TT
30482017-11-07 Tom Tromey <tom@tromey.com>
3049
3050 * breakpoint.c (stop_command): Constify.
3051 * cli/cli-decode.c (struct cmd_list_element): Constify.
3052 * command.h (add_abbrev_prefix_cmd): Constify.
3053
95e95a6d
PA
30542017-11-07 Pedro Alves <palves@redhat.com>
3055
3056 * breakpoint.c (extract_bp_kind): New enum.
3057 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
3058 factored out from ...
3059 (extract_bp_number_and_location): ... here.
3060 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
3061
cc638e86
PA
30622017-11-07 Pedro Alves <palves@redhat.com>
3063
3064 * breakpoint.c (extract_bp_number_and_location): Change return
3065 type to void. Throw error instead of warning.
3066 (enable_disable_command): Adjust.
3067
d0fe4701
XR
30682017-11-07 Xavier Roirand <roirand@adacore.com>
3069 Pedro Alves <palves@redhat.com>
3070
3071 * breakpoint.c (map_breakpoint_number_range): New, factored out
3072 from ...
3073 (map_breakpoint_numbers): ... here.
3074 (find_location_by_number): Change parameters from string to
3075 breakpoint number and location.
3076 (extract_bp_number_and_location): New function.
3077 (enable_disable_bp_num_loc)
3078 (enable_disable_breakpoint_location_range)
3079 (enable_disable_command): New functions, factored out ...
3080 (enable_command, disable_command): ... these functions, and
3081 adjusted to support ranges.
3082 * NEWS: Document enable/disable breakpoint location range feature.
3083
635dc5b2
LM
30842017-11-06 Luis Machado <luis.machado@linaro.org>
3085
3086 * MAINTAINERS (Write After Approval): Update my e-mail address.
3087
556e5da5
PA
30882017-11-06 Pedro Alves <palves@redhat.com>
3089
3090 * gnu-nat.c (gnu_terminal_init): Delete.
3091 (gnu_target): Don't install gnu_terminal_init.
3092 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
3093 (child_terminal_init): ... this function.
3094
d1928160
PA
30952017-11-06 Pedro Alves <palves@redhat.com>
3096
3097 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
3098 sgtty.h.
3099 * config.in, configure: Regenerate.
3100
6aa899ce
PA
31012017-11-06 Pedro Alves <palves@redhat.com>
3102
3103 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
3104 (async_init_signals): Adjust.
3105 (handle_stop_sig): Rename to ...
3106 (handle_sigtstp): ... this.
3107 (async_stop_sig): Rename to ...
3108 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
3109 SIGTSTP path.
3110 * event-top.h: Move signal.h include to the top. Check SIGTSTP
3111 instead of STOP_SIGNAL thoughout.
3112 (handle_stop_sig): Rename to ...
3113 (handle_sigtstp): ... this.
3114 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
3115
a94799ac
PA
31162017-11-06 Pedro Alves <palves@redhat.com>
3117
3118 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
3119 longer set flags twice in row.
3120
726e1356
PA
31212017-11-06 Pedro Alves <palves@redhat.com>
3122
3123 * Makefile.in (SER_HARDWIRE): Update comment.
3124 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
3125 * common/gdb_termios.h: Delete file.
3126 * common/job-control.c: Include termios.h and unistd.h instead of
3127 gdb_termios.h.
3128 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
3129 check.
3130 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
3131 Remove sgtty code.
3132 * configure.ac: No longer check for termio.h and sgtty.h.
3133 * configure: Regenerate.
3134 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
3135 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
3136 Replace PROCESS_GROUP_TYPE references with pid_t references
3137 throughout.
3138 (gdb_getpgrp): Delete.
3139 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
3140 (child_terminal_inferior): Remove comment. Remove sgtty code.
3141 (child_terminal_ours_1): Use tcgetpgrp directly instead of
3142 gdb_getpgrp. Use serial_set_tty_state instead aof
3143 serial_noflush_set_tty_state. Remove sgtty code.
3144 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
3145 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
3146 (inferior_process_group): Now returns pid_t.
3147 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
3148 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
3149 * ser-event.c (serial_event_ops): Update.
3150 * ser-go32.c (dos_noflush_set_tty_state): Delete.
3151 (dos_ops): Update.
3152 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
3153 * ser-pipe.c (pipe_ops): Update.
3154 * ser-tcp.c (tcp_ops): Update.
3155 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
3156 HAVE_TERMIOS checks.
3157 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
3158 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
3159 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
3160 assume termios.
3161 (hardwire_noflush_set_tty_state): Delete.
3162 (hardwire_print_tty_state, hardwire_drain_output)
3163 (hardwire_flush_output, hardwire_flush_input)
3164 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
3165 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
3166 code, and assume termios.
3167 (hardwire_ops): Update.
3168 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
3169 * serial.c (serial_noflush_set_tty_state): Delete.
3170 * serial.h (serial_noflush_set_tty_state): Delete.
3171 (serial_ops::noflush_set_tty_state): Delete.
3172
1cfb73db
UW
31732017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3174
3175 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
3176 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
3177 (COMMON_OBS): Remove doublest.o and dfp.o.
3178 Do not build target-float.c (instead of doublest.c)
3179 with -Wformat-nonliteral.
3180
3181 * doublest.c: Remove file.
3182 * doublest.h: Remove file.
3183 * dfp.c: Remove file.
3184 * dfp.h: Remove file.
3185
3186 * target-float.c: Do not include "doublest.h" and "dfp.h".
3187 (DOUBLEST): Move here from doublest.h.
3188 (enum float_kind): Likewise.
3189 (FLOATFORMAT_CHAR_BIT): Likewise.
3190 (FLOATFORMAT_LARGEST_BYTES): Likewise.
3191 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
3192 (floatformat_precision): Likewise.
3193 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
3194 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
3195 Likewise.
3196 (host_float_format, host_double_format, host_long_double_format):
3197 Likewise.
3198 (floatformat_to_string, floatformat_from_string): Likewise.
3199 (floatformat_to_doublest): Likewise. Also, inline the original
3200 convert_floatformat_to_doublest.
3201 (floatformat_from_doublest): Likewise. Also, inline the original
3202 convert_floatformat_from_doublest.
3203
3204 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
3205 (MAX_DECIMAL_STRING): Move here from dfp.c.
3206 (match_endianness): Likewise.
3207 (set_decnumber_context, decimal_check_errors): Likewise.
3208 (decimal_from_number, decimal_to_number): Likewise.
3209 (decimal_to_string, decimal_from_string): Likewise. Make static.
3210 (decimal_from_longest, decimal_from_ulongest): Likewise.
3211 (decimal_to_longest): Likewise.
3212 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
3213 (decimal_convert): Likewise.
3214
b07e9c46
UW
32152017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3216
3217 * doublest.c: Do not include "gdbtypes.h".
3218 (extract_typed_floating): Remove.
3219 (store_typed_floating): Remove.
3220 (convert_typed_floating): Remove.
3221 * doublest.h (struct type): Remove.
3222 (DOUBLEST_PRINT_FORMAT): Remove.
3223 (DOUBLEST_SCAN_FORMAT): Remove.
3224 (extract_typed_floating): Remove.
3225 (store_typed_floating): Remove.
3226 (convert_typed_floating): Remove.
3227
3228 * dfp.c (decimal_from_doublest): Remove.
3229 (decimal_to_doublest): Remove.
3230 * dfp.h: Do not include "doublest.h".
3231 (decimal_from_doublest): Remove.
3232 (decimal_to_doublest): Remove.
3233
3234 * value.c: Do not include "doublest.h" and "dfp.h".
3235 (value_as_double): Remove.
3236 (unpack_double): Remove.
3237 (value_from_double): Remove.
3238 (value_from_decfloat): Remove.
3239 * value.h: Do not include "doublest.h".
3240 (value_as_double): Remove.
3241 (unpack_double): Remove.
3242 (value_from_double): Remove.
3243 (value_from_decfloat): Remove.
3244
3b2ca824
UW
32452017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3246
3247 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
3248 (i386_extract_return_value): Use target_float_convert.
3249 (i386_store_return_value): Likewise.
3250 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
3251 (i387_value_to_register): Likewise.
3252 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
3253 (ia64_register_to_value): Use target_float_convert.
3254 (ia64_value_to_register): Likewise.
3255 (ia64_extract_return_value): Likewise.
3256 (ia64_store_return_value): Likewise.
3257 (ia64_push_dummy_call): Likewise.
3258 * m68k-tdep.c: Include "target-float.h".
3259 (m68k_register_to_value): Use target_float_convert.
3260 (m68k_value_to_register): Likewise.
3261 (m68k_svr4_extract_return_value): Likewise.
3262 (m68k_svr4_store_return_value): Likewise.
3263 * ppc-sysv-tdep.c: Include "target-float.h".
3264 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
3265 (do_ppc_sysv_return_value): Likewise.
3266 (ppc64_sysv_abi_push_freg): Likewise.
3267 (ppc64_sysv_abi_return_value_base): Likewise.
3268 * rs6000-aix-tdep.c: Include "target-float.h".
3269 (rs6000_push_dummy_call): Use target_float_convert.
3270 (rs6000_return_value): Likewise.
3271 * rs6000-lynx178-tdep.c: Include "target-float.h".
3272 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
3273 (rs6000_lynx178_return_value): Likewise.
3274 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
3275 (rs6000_register_to_value): Use target_float_convert.
3276 (rs6000_value_to_register): Likewise.
3277 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
3278 (arm_extract_return_value): Use target_float_convert.
3279 (arm_store_return_value): Likewise.
3280 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
3281 (sh_register_convert_to_virtual): Use target_float_convert.
3282 (sh_register_convert_to_raw): Likewise.
3283 * sh64-tdep.c: Include "target-float.h".
3284 (sh64_extract_return_value): Use target_float_convert.
3285 (sh64_register_convert_to_virtual): Likewise.
3286 (sh64_register_convert_to_raw): Likewise. Fix argument types.
3287
14ad9311
UW
32882017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3289
3290 * target-float.c (floatformat_to_host_double): New function.
3291 (floatformat_from_host_double): Likewise.
3292 (target_float_to_host_double): Likewise.
3293 (target_float_from_host_double): Likewise.
3294 * target-float.h (target_float_to_host_double): Add prototype.
3295 (target_float_from_host_double): Likewise.
3296
3297 * guile/scm-value.c: Include "target-float.h".
3298 (gdbscm_value_to_real): Use target_float_to_host_double.
3299 Handle integer source values via value_as_long.
3300 * guile/scm-math.c: Include "target-float.h". Do not include
3301 "doublest.h", "dfp.h", and "expression.h".
3302 (vlscm_convert_typed_number): Use target_float_from_host_double.
3303 (vlscm_convert_number): Likewise.
3304
3305 * python/py-value.c (valpy_float): Use target_float_to_host_double.
3306 (convert_value_from_python): Use target_float_from_host_double.
3307
50eff16b
UW
33082017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3309
3310 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
3311 (cast_from_fixed): Likewise.
3312 (ada_scaling_type): New function.
3313 (ada_delta): Return value instead of DOUBLEST. Perform target
3314 arithmetic instead of host arithmetic.
3315 (scaling_factor): Rename to ...
3316 (ada_scaling_factor) ... this. Make non-static. Return value instead
3317 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
3318 (ada_fixed_to_float): Remove.
3319 (ada_float_to_fixed): Remove.
3320 * ada-lang.h (ada_fixed_to_float): Remove.
3321 (ada_float_to_fixed): Remove.
3322 (ada_delta): Return value instead of DOUBLEST.
3323 (ada_scaling_factor): Add prototype.
3324
3325 * ada-typeprint.c: Include "target-float.h".
3326 (print_fixed_point_type): Perform target arithmetic instead of
3327 host arithmetic.
3328 * ada-valprint.c: Include "target-float.h".
3329 (ada_val_print_num): Perform target arithmetic instead of
3330 host arithmetic for fixed-point types.
3331
66c02b9e
UW
33322017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3333
3334 * target-float.c: Include <math.h>.
3335 (floatformat_binop): New function.
3336 (floatformat_compare): Likewise.
3337 (target_float_binop): Likewise.
3338 (target_float_compare): Likewise.
3339 * target-float.h: Include "expression.h".
3340 (target_float_binop): Add prototype.
3341 (target_float_compare): Likewise.
3342
3343 * valarith.c: Do not include "doublest.h" and "dfp.h".
3344 Include "common/byte-vector.h".
3345 (value_args_as_decimal): Remove, replace by ...
3346 (value_args_as_target_float): ... this function. Handle both
3347 binary and decimal target floating-point formats.
3348 (scalar_binop): Handle both binary and decimal FP using
3349 value_args_as_target_float and target_float_binop.
3350 (value_equal): Handle both binary and decimal FP using
3351 value_args_as_target_float and target_float_compare.
3352 (value_less): Likewise.
3353 (value_pos): Handle all scalar types as simple copy.
3354 (value_neg): Handle all scalar types via BINOP_SUB from 0.
3355 * dfp.c (decimal_binop): Throw error instead of internal_error
3356 when called with an unsupported operation code.
3357
f69fdf9b
UW
33582017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3359
3360 * target-float.c (target_float_to_string): New function.
3361 (target_float_from_string): New function.
3362 * target-float.h (target_float_to_string): Add prototype.
3363 (target_float_from_string): Add prototype.
3364
3365 * valprint.c: Include "target-float.h". Do not include
3366 "doublest.h" and "dfp.h".
3367 (print_floating): Use target_float_to_string.
3368 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
3369 (printf_floating): Use target_float_to_string.
3370 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
3371 (print_i387_value): Use target_float_to_string.
3372 * mips-tdep.c: Include "target-float.h".
3373 (mips_print_fp_register): Use target_float_to_string.
3374 * sh64-tdep.c: Include "target-float.h".
3375 (sh64_do_fp_register): Use target_float_to_string.
3376
3377 * parse.c: Include "target-float.h". Do not include
3378 "doublest.h" and "dfp.h".
3379 (parse_float): Use target_float_from_string.
3380 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
3381 (define_symbol): Use target_float_from_string.
3382 * gdbarch-selftests.c: Include "target-float.h".
3383 (register_to_value_test): Use target_float_from_string.
3384
70100014
UW
33852017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3386
3387 * Makefile.c (SFILES): Add target-float.c.
3388 (HFILES_NO_SRCDIR): Add target-float.h.
3389 (COMMON_OBS): Add target-float.o.
3390 * target-float.h: New file.
3391 * target-float.c: New file.
3392
3393 * doublest.c (floatformat_classify): Fix detection of float_zero.
3394
3395 * gdbtypes.c (is_floating_type): New function.
3396 * gdbtypes.h (is_floating_type): Add prototype.
3397
3398 * value.c: Do not include "floatformat.h".
3399 (unpack_double): Use target_float_is_valid.
3400 (is_floating_value): New function.
3401 * value.h (is_floating_value): Add prototype-
3402
3403 * valarith.c: Include "target-float.h".
3404 (value_logical_not): Use target_float_is_zero.
3405
3406 * python/py-value.c: Include "target-float.h".
3407 (valpy_nonzero): Use target_float_is_zero.
3408
ab4b1c46
TT
34092017-11-04 Tom Tromey <tom@tromey.com>
3410
3411 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
3412
454dafbd
TT
34132017-11-04 Tom Tromey <tom@tromey.com>
3414
3415 * breakpoint.c (set_momentary_breakpoint): Return
3416 breakpoint_up.
3417 (until_break_command): Update.
3418 (new_until_break_fsm): Change argument types to
3419 breakpoint_up.
3420 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3421 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
3422 Remove.
3423 * infcmd.c (finish_forward): Update.
3424 * breakpoint.h (set_momentary_breakpoint)
3425 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3426 (make_cleanup_delete_breakpoint): Remove.
3427 (struct breakpoint_deleter): New.
3428 (breakpoint_up): New typedef.
3429 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
3430 (insert_exception_resume_breakpoint): Update.
3431 (insert_exception_resume_from_probe): Update.
3432 (insert_longjmp_resume_breakpoint): Update.
3433 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
3434 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
3435 * infcall.c (call_function_by_hand_dummy): Update
3436
331b71e5
TT
34372017-11-04 Tom Tromey <tom@tromey.com>
3438
3439 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
3440
9f584b37
TT
34412017-11-04 Tom Tromey <tom@tromey.com>
3442
3443 * linux-tdep.c (linux_core_info_proc_mappings): Use
3444 gdb::def_vector.
3445 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
3446 "size" argument.
3447 (linux_corefile_thread): Update.
3448 (linux_make_corefile_notes): Remove unused variable.
3449
779bc38e
TT
34502017-11-04 Tom Tromey <tom@tromey.com>
3451
3452 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
3453 gdb::byte_vector.
3454
ed2b3126
TT
34552017-11-04 Tom Tromey <tom@tromey.com>
3456
3457 * objfiles.c (do_free_objfile_cleanup): Remove.
3458 * compile/compile-object-load.c (compile_object_load): Update.
3459 * objfiles.h (make_cleanup_free_objfile): Remove.
3460
7f6743fd
TT
34612017-11-04 Tom Tromey <tom@tromey.com>
3462
3463 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
3464 (adi_read_versions): Change "tags" to "gdb_byte *".
3465 (adi_print_versions): Likewise.
3466
c80049d3
TT
34672017-11-04 Tom Tromey <tom@tromey.com>
3468
3469 * breakpoint.c
3470 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
3471 from start_rbreak_breakpoints.
3472 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
3473 * breakpoint.h (class scoped_rbreak_breakpoints): New.
3474 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
3475 * symtab.c (do_end_rbreak_breakpoints): Remove.
3476 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
3477
167b0be1
TT
34782017-11-04 Tom Tromey <tom@tromey.com>
3479
3480 * cp-namespace.c (reset_directive_searched): Remove.
3481 (cp_lookup_symbol_via_imports): Use scoped_restore.
3482 * cp-support.c (reset_directive_searched): Remove.
3483 (make_symbol_overload_list_using): Use scoped_restore.
3484 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
3485 (reset_directive_searched): Remove.
3486
5eae7aea
TT
34872017-11-04 Tom Tromey <tom@tromey.com>
3488
3489 * symfile.c (find_separate_debug_file_by_debuglink): Use
3490 unique_xmalloc_ptr.
3491
c6bcad5f
TT
34922017-11-04 Tom Tromey <tom@tromey.com>
3493
3494 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
3495 type of "info".
3496 (compute_stack_depth): Likewise.
3497 (do_compile_dwarf_expr_to_c): Use std::vector.
3498
20dcd8ca
TT
34992017-11-04 Tom Tromey <tom@tromey.com>
3500
3501 * compile/compile-object-load.c (link_callbacks_einfo): Use
3502 std::string.
3503
33c7c59d
TT
35042017-11-04 Tom Tromey <tom@tromey.com>
3505
3506 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3507 Use scoped_free_pendings.
3508 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
3509 scoped_free_pendings.
3510 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
3511 (xcoff_initial_scan): Likewise.
3512 * buildsym.c (reset_symtab_globals): Update comment.
3513 (scoped_free_pendings): Rename from really_free_pendings.
3514 (prepare_for_building): Update comment.
3515 (buildsym_init): Likewise.
3516 * buildsym.h (class scoped_free_pendings): New class.
3517 (really_free_pendings): Don't declare.
3518
67fa57cf
UW
35192017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
3520
3521 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
3522 output when converting a zero value to a special byteorder format.
3523
f26ae15b
YQ
35242017-11-02 Yao Qi <yao.qi@linaro.org>
3525
3526 * frame.c (do_frame_register_read): Remove aspace.
3527 * jit.c (jit_frame_sniffer): Likwise.
3528 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3529 * regcache.c (regcache::regcache): Pass nullptr.
3530 (regcache_print): Caller updated.
3531 * regcache.h (regcache::regcache): Remove one constructor
3532 parameter aspace.
3533
6c6e9412
YQ
35342017-11-02 Yao Qi <yao.qi@linaro.org>
3535
3536 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
3537
8b86c959
YQ
35382017-11-02 Yao Qi <yao.qi@linaro.org>
3539
3540 * breakpoint.c (insert_single_step_breakpoints): Update.
3541 * frame.c (struct frame_info) <aspace>: Add const.
3542 (frame_save_as_regcache): Add const.
3543 (get_frame_address_space): Return const address_space *.
3544 * frame.h (get_frame_address_space): Update declaration.
3545 * infrun.c (struct step_over_info) <aspace>: Add const.
3546 (set_step_over_info): Make aspace const.
3547 (displaced_step_prepare_throw): Change variable const.
3548 (resume): Likewise.
3549 (proceed): Likewise.
3550 (adjust_pc_after_break): Likewise.
3551 (save_waitstatus): Likewise.
3552 (handle_signal_stop): Likewise.
3553 (keep_going_pass_signal): Likewise.
3554 * jit.c (jit_frame_sniffer): Add const.
3555 * mips-tdep.c (mips_single_step_through_delay): Likewise.
3556 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3557 * record-full.c (record_full_wait_1): Likewise.
3558 * regcache.c (regcache::regcache): Change parameter to const.
3559 * regcache.h (regcache::regcache): Likewise.
3560 (regcache::aspace): Return const address_space *.
3561 (regcache) <m_aspace>: Add const.
3562
a01bda52
YQ
35632017-11-02 Yao Qi <yao.qi@linaro.org>
3564
3565 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
3566 * frame.c (create_sentinel_frame): Likewise.
3567 * infrun.c (displaced_step_prepare_throw): Likewise.
3568 (resume): Likewise.
3569 (thread_still_needs_step_over_bp): Likewise.
3570 (proceed): Likewise.
3571 (do_target_wait): Likewise.
3572 (adjust_pc_after_break): Likewise.
3573 (handle_syscall_event): Likewise.
3574 (save_waitstatus): Likewise.
3575 (handle_inferior_event_1): Likewise.
3576 (handle_signal_stop): Likewise.
3577 (keep_going_pass_signal): Likewise.
3578 * linux-nat.c (status_callback): Likewise.
3579 (save_stop_reason): Likewise.
3580 (resume_stopped_resumed_lwps): Likewise.
3581 * record-full.c (record_full_exec_insn): Likewise.
3582 (record_full_wait_1): Likewise.
3583 * regcache.c (get_regcache_aspace): Remove.
3584 * regcache.h (get_regcache_aspace): Remove.
3585
d999647b
YQ
35862017-11-02 Yao Qi <yao.qi@linaro.org>
3587
3588 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
3589 (init_regcache_descr): Use gdbarch_num_regs.
3590 (regcache::regcache): Likewise.
3591 (regcache::get_register_status): Likewise.
3592 (regcache::assert_raw_regnum): Likewise.
3593 (regcache::cooked_read): Likewise.
3594 (regcache::cooked_read_value): Likewise.
3595 (regcache::cooked_write): Likewise.
3596 (regcache::dump): Likewise.
3597 (regcache::num_raw_registers): New method.
3598 * regcache.h (class regcache) <num_raw_registers>: New.
3599
4e888c28
YQ
36002017-11-02 Yao Qi <yao.qi@linaro.org>
3601
3602 * regcache.c (regcache::assert_regnum): New method.
3603 (regcache::invalidate): Call assert_regnum.
3604 (regcache::raw_update): Likewise.
3605 (regcache::raw_write): Likewise.
3606 (regcache::raw_read_part): Likewise.
3607 (regcache::raw_write_part): Likewise.
3608 (regcache::raw_supply): Likewise.
3609 (regcache::raw_supply_integer): Likewise.
3610 (regcache::raw_supply_zeroed): Likewise.
3611 (regcache::raw_collect): Likewise.
3612 (regcache::raw_collect_integer): Likewise.
3613 * regcache.h (regcache::assert_regnum): Declare.
3614
2e1b49b3
YQ
36152017-11-02 Yao Qi <yao.qi@linaro.org>
3616
3617 * regcache.c (regcache::dump): Remove code.
3618
6c5218df
YQ
36192017-11-02 Yao Qi <yao.qi@linaro.org>
3620
3621 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
3622 Remove.
3623 <sizeof_cooked_register_status>: Remove.
3624 (init_regcache_descr): Update.
3625 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
3626 (regcache::save): Likewise.
3627 (regcache::dump): Likewise.
3628
dcc31d28
JB
36292017-11-01 James Bowman <james.bowman@ftdichip.com>
3630
3631 * ft32-tdep.c (ft32_fetch_instruction): New function.
3632 (ft32_analyze_prologue): Use ft32_fetch_instruction().
3633
3a87ae65
SM
36342017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
3635
3636 * cli/cli-script.c (execute_control_command): Rename to ...
3637 (execute_control_command_1): ... this.
3638 (execute_control_command): New function.
3639
09b847f3
SM
36402017-10-31 Simon Marchi <simon.marchi@ericsson.com>
3641
3642 * tracepoint.c (tfind_command): Remove const_cast.
3643
f871c485
MG
36442017-10-30 Mike Gulick <mgulick@mathworks.com>
3645
3646 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
3647
b020ff80
SM
36482017-10-30 Simon Marchi <simon.marchi@ericsson.com>
3649
3650 * common/common-utils.h (in_inclusive_range): New function.
3651 * arm-tdep.c (arm_record_extension_space): Use
3652 in_inclusive_range.
3653 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
3654 * cris-tdep.c (cris_spec_reg_applicable): Use
3655 in_inclusive_range.
3656
1b81856f
PA
36572017-10-30 Pedro Alves <palves@redhat.com>
3658 Simon Marchi <simon.marchi@ericsson.com>
3659
3660 * remote.c (remote_set_syscall_catchpoint): Build a std::string
3661 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
3662
31b833b3
PA
36632017-10-30 Pedro Alves <palves@redhat.com>
3664
3665 * common/common-utils.c (string_appendf, string_vappendf): New
3666 functions.
3667 * common/common-utils.h (string_appendf, string_vappendf): New
3668 declarations.
3669 * unittests/common-utils-selftests.c (string_appendf_func)
3670 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
3671 (string_vappendf_tests): New functions.
3672 (_initialize_common_utils_selftests): Register "string_appendf" and
3673 "string_vappendf tests".
3674
4a250334
PA
36752017-10-30 Pedro Alves <palves@redhat.com>
3676
3677 * unittests/common-utils-selftests.c (format_func): New typedef.
3678 (string_printf_tests, string_vprintf_tests): Tests factored out
3679 and merged to ...
3680 (test_format_func): ... this new function.
3681 (string_printf_tests, string_vprintf_tests): Reimplement on top of
3682 test_format_func.
3683
16c5c17e
SM
36842017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3685
3686 * darwin-nat.c: Remove include of gdb.h.
3687
7ca51576
SM
36882017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3689
3690 * xtensa-xtregs.c: Fix formatting issues.
3691
c1342859
SM
36922017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3693
3694 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
3695
484d8d36
MD
36962017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
3697
3698 PR python/21213
3699 * python/py-infthread.c (thpy_get_inferior): Increment reference
3700 of inferior before returning it.
3701
b5540b5f
SM
37022017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3703
3704 * unittests/common-utils-selftests.c (format): Add
3705 ATTRIBUTE_PRINTF.
3706
5a9dcda1
SM
37072017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
3708
3709 * xml-syscall.c (struct syscall_desc): Add constructor.
3710 <name>: Change type to std::string.
3711 (syscall_desc_up): New typedef.
3712 (syscall_desc_p): Remove typeder.
3713 (DEF_VEC_P(syscall_desc_p)): Remove.
3714 (struct syscall_group_desc): Add constructor.
3715 <name>: Change type to std::string.
3716 <syscalls>: Change type to std::vector.
3717 (syscall_group_desc_up): New typedef.
3718 (syscall_group_desc_p): Remove typedef.
3719 (DEF_VEC_P(syscall_group_desc_p)): Remove.
3720 (struct syscalls_info) <syscalls>: Change type to std::vector of
3721 unique_ptr.
3722 <groups>: Likewise.
3723 <my_gdb_datadir>: Change type to std::string.
3724 (syscalls_info_up): New typedef.
3725 (allocate_syscalls_info): Remove.
3726 (syscalls_info_free_syscalls_desc): Remove.
3727 (syscalls_info_free_syscall_group_desc): Remove.
3728 (free_syscalls_info): Remove.
3729 (make_cleanup_free_syscalls_info): Remove.
3730 (syscall_group_create_syscall_group_desc): Adjust.
3731 (syscall_group_add_syscall): Adjust.
3732 (syscall_create_syscall_desc): Adjust.
3733 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
3734 (init_syscalls_info): Adjust.
3735 (syscall_group_get_group_by_name): Adjust.
3736 (xml_get_syscall_number): Adjust.
3737 (xml_get_syscall_name): Adjust.
3738 (xml_list_of_syscalls): Adjust.
3739 (xml_list_syscalls_by_group): Adjust.
3740 (xml_list_of_groups): Adjust.
3741
45461e0d
SM
37422017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3743
3744 * probe.h: Don't include gdb_vecs.h.
3745 (DEF_VEC_P (probe_p)): Remove.
3746 (find_probes_in_objfile): Return an std::vector.
3747 * probe.c (find_probes_in_objfile): Likewise.
3748 * breakpoint.c (breakpoint_objfile_data)
3749 <longjmp_probes>: Change type to std::vector.
3750 <exception_probes>: Likewise.
3751 (free_breakpoint_probes): Don't manually free vectors.
3752 (create_longjmp_master_breakpoint): Adjust.
3753 (create_exception_master_breakpoint): Adjust.
3754 * solib-svr4.c (svr4_create_probe_breakpoints): Change
3755 parameter type, adjust.
3756 (svr4_create_solib_event_breakpoints): Adjust.
3757
43dce439
SM
37582017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3759
3760 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
3761 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
3762 with new.
3763 (free_breakpoint_probes): Rename to ...
3764 (free_breakpoint_objfile_data): ... this, and call delete on
3765 bp_objfile_data..
3766
6a1b9516
SM
37672017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
3768
3769 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
3770 (loaded_script_ptr): Remove typedef.
3771 (DEF_VEC_P (loaded_script_ptr)): Remove.
3772 (struct collect_matching_scripts_data): Add constructor.
3773 <scripts_p>: Change type to (pointer to) std::vector.
3774 (collect_matching_scripts_data): Adjust.
3775 (sort_scripts_by_name): Make suitable for std::sort.
3776 (print_scripts): Don't sort vector, adjust to std::vector.
3777 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
3778
593e3209
SM
37792017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3780
3781 * symfile.c (filename_language): Make struct, not typedef. Add
3782 constructor.
3783 <ext>: Change type to std::string.
3784 (DEF_VEC_O (filename_language)): Remove.
3785 (filename_language_table): Change type to std::vector.
3786 (add_filename_language): Adjust.
3787 (set_ext_lang_command): Adjust.
3788 (info_ext_lang_command): Adjust.
3789 (deduce_language_from_filename): Adjust.
3790 (class scoped_restore_filename_language_table): Remove.
3791 (test_filename_language): Use scoped_restore.
3792 (test_set_ext_lang_command): Use scoped_restore, adjust to
3793 std::vector change.
3794
32fa66eb
SM
37952017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3796
3797 * symfile.c: Include selftest.h.
3798 (class scoped_restore_filename_language_table): New.
3799 (test_filename_language): New test.
3800 (test_set_ext_lang_command): New test.
3801 (_initialize_symfile): Register tests.
3802
4a27f119
KS
38032017-10-27 Keith Seitz <keiths@redhat.com>
3804
3805 * breakpoint.c (print_breakpoint_location): Use the symbol saved
3806 in the bp_location, falling back to find_pc_sect_function when
3807 needed.
3808 (add_location_to_breakpoint): Save sal->symbol.
3809 * breakpoint.h (struct bp_location) <symbol>: New field.
3810 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
3811 * symtab.h (struct symtab_and_line) <symbol>: New field.
3812
a43f3893
PF
38132017-10-26 Patrick Frants <osscontribute@gmail.com>
3814
7453e6b2 3815 PR gdb/13669
a43f3893
PF
3816 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
3817 to rewind obstack.
3818
23cc4e1b
PA
38192017-10-26 Pedro Alves <palves@redhat.com>
3820
3821 * remote.c (remote_async_terminal_ours_p): Delete.
3822 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
3823 Remove references to 'remote_async_terminal_ours_p'.
3824
6abc18bb
YQ
38252017-10-26 Yao Qi <yao.qi@linaro.org>
3826
3827 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
3828
bd522513
YQ
38292017-10-26 Yao Qi <yao.qi@linaro.org>
3830
3831 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
3832 aspace const.
3833 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
3834 Likewise.
3835 * breakpoint.c (bpstat_check_location): Remove cast.
3836 (breakpoint_hit_catch_fork): Make aspce const.
3837 (breakpoint_hit_catch_solib): Likewise.
3838 (breakpoint_hit_catch_exec): Likewise.
3839 (breakpoint_hit_ranged_breakpoint): Likewise.
3840 (breakpoint_hit_watchpoint): Likewise.
3841 (base_breakpoint_breakpoint_hit): Likewise.
3842 (bkpt_breakpoint_hit): Likewise.
3843 (dprintf_breakpoint_hit): Likewise.
3844 (tracepoint_breakpoint_hit): Likewise.
3845 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
3846
accd0bcd
YQ
38472017-10-26 Yao Qi <yao.qi@linaro.org>
3848
3849 * breakpoint.c (breakpoint_location_address_match): Change
3850 "struct address_space *" to "const address_space".
3851 (breakpoint_location_address_range_overlap): Likewise.
3852 (breakpoint_here_p): Likewise.
3853 (breakpoint_in_range_p): Likewise.
3854 (moribund_breakpoint_here_p): Likewise.
3855 (bp_location_inserted_here_p): Likewise.
3856 (software_breakpoint_inserted_here_p): Likewise.
3857 (hardware_breakpoint_inserted_here_p): Likewise.
3858 (hardware_watchpoint_inserted_in_range): Likewise.
3859 (bpstat_check_location): Likewise.
3860 (bpstat_stop_status): Likewise.
3861 (breakpoint_address_match): Likewise.
3862 (breakpoint_address_match_range): Likewise.
3863 (breakpoint_location_address_match): Likewise.
3864 (breakpoint_location_address_range_overlap): Likewise.
3865 (insert_single_step_breakpoint): Likewise.
3866 (breakpoint_has_location_inserted_here): Likewise.
3867 (single_step_breakpoint_inserted_here_p): Likewise.
3868 (pc_at_non_inline_function): Likewise.
3869 * breakpoint.h (bpstat_stop_status): Update declaration.
3870 (breakpoint_here_p): Likewise.
3871 (breakpoint_in_range_p): Likewise.
3872 (moribund_breakpoint_here_p): Likewise.
3873 (breakpoint_inserted_here_p): Likewise.
3874 (software_breakpoint_inserted_here_p): Likewise.
3875 (hardware_breakpoint_inserted_here_p): Likewise.
3876 (breakpoint_has_location_inserted_here): Likewise.
3877 (single_step_breakpoint_inserted_here_p): Likewise.
3878 (hardware_watchpoint_inserted_in_range): Likewise.
3879 (breakpoint_address_match): Likewise.
3880 (insert_single_step_breakpoint): Likewise.
3881 (pc_at_non_inline_function): Likewise.
3882 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
3883 * record.c (record_check_stopped_by_breakpoint): Likewise.
3884 * record.h (record_check_stopped_by_breakpoint): Likewise.
3885 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
3886
ac7936df
YQ
38872017-10-25 Yao Qi <yao.qi@linaro.org>
3888
3889 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
3890 regcache->arch () instead get_regcache_arch.
3891 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
3892 Likewise.
3893 (aarch64_fbsd_store_inferior_registers): Likewise.
3894 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
3895 (store_gregs_to_thread): Likewise.
3896 (fetch_fpregs_from_thread): Likewise.
3897 (store_fpregs_to_thread): Likewise.
3898 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
3899 (aarch64_store_return_value): Likewise.
3900 (aarch64_software_single_step): Likewise.
3901 * aix-thread.c (aix_thread_wait): Likewise.
3902 (supply_reg32): Likewise.
3903 (supply_sprs64): Likewise.
3904 (supply_sprs32): Likewise.
3905 (fill_gprs64): Likewise.
3906 (fill_gprs32): Likewise.
3907 (fill_sprs64): Likewise.
3908 (fill_sprs32): Likewise.
3909 (store_regs_user_thread): Likewise.
3910 (store_regs_kernel_thread): Likewise.
3911 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
3912 (alphabsd_store_inferior_registers): Likewise.
3913 * alpha-tdep.c (alpha_extract_return_value): Likewise.
3914 (alpha_store_return_value): Likewise.
3915 (alpha_deal_with_atomic_sequence): Likewise.
3916 (alpha_next_pc): Likewise.
3917 (alpha_software_single_step): Likewise.
3918 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
3919 (amd64bsd_store_inferior_registers): Likewise.
3920 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
3921 Likewise.
3922 (amd64_linux_store_inferior_registers): Likewise.
3923 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
3924 (amd64_collect_native_gregset): Likewise.
3925 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
3926 (amd64obsd_collect_uthread): Likewise.
3927 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
3928 (amd64_collect_fpregset): Likewise.
3929 (amd64_supply_fxsave): Likewise.
3930 (amd64_supply_xsave): Likewise.
3931 (amd64_collect_fxsave): Likewise.
3932 (amd64_collect_xsave): Likewise.
3933 * arc-tdep.c (arc_write_pc): Likewise.
3934 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
3935 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
3936 (arm_fbsd_store_inferior_registers): Likewise.
3937 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
3938 (store_vfp_regs): Likewise.
3939 (arm_linux_fetch_inferior_registers): Likewise.
3940 (arm_linux_store_inferior_registers): Likewise.
3941 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
3942 (arm_linux_sigreturn_next_pc): Likewise.
3943 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
3944 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
3945 (fetch_register): Likewise.
3946 (store_register): Likewise.
3947 * arm-tdep.c (arm_is_thumb): Likewise.
3948 (displaced_in_arm_mode): Likewise.
3949 (bx_write_pc): Likewise.
3950 (arm_get_next_pcs_addr_bits_remove): Likewise.
3951 (arm_software_single_step): Likewise.
3952 (arm_extract_return_value): Likewise.
3953 (arm_store_return_value): Likewise.
3954 (arm_write_pc): Likewise.
3955 * bfin-tdep.c (bfin_extract_return_value): Likewise.
3956 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
3957 (bsd_uthread_store_registers): Likewise.
3958 * core-regset.c (fetch_core_registers): Likewise.
3959 * corelow.c (get_core_registers): Likewise.
3960 * cris-tdep.c (cris_store_return_value): Likewise.
3961 (cris_extract_return_value): Likewise.
3962 (find_step_target): Likewise.
3963 (find_step_target): Likewise.
3964 (cris_software_single_step): Likewise.
3965 * ctf.c (ctf_fetch_registers): Likewise.
3966 * darwin-nat.c (cancel_breakpoint): Likewise.
3967 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
3968 * frv-tdep.c (frv_extract_return_value): Likewise.
3969 * ft32-tdep.c (ft32_store_return_value): Likewise.
3970 (ft32_extract_return_value): Likewise.
3971 * go32-nat.c (fetch_register): Likewise.
3972 (go32_fetch_registers): Likewise.
3973 (go32_store_registers): Likewise.
3974 (store_register): Likewise.
3975 * h8300-tdep.c (h8300_extract_return_value): Likewise.
3976 (h8300_store_return_value): Likewise.
3977 * hppa-linux-nat.c (fetch_register): Likewise.
3978 (store_register): Likewise.
3979 (hppa_linux_fetch_inferior_registers): Likewise.
3980 (hppa_linux_store_inferior_registers): Likewise.
3981 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
3982 (i386_darwin_store_inferior_registers): Likewise.
3983 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
3984 (gnu_store_registers): Likewise.
3985 * i386-linux-nat.c (fetch_register): Likewise.
3986 (store_register): Likewise.
3987 (supply_gregset): Likewise.
3988 (fill_gregset): Likewise.
3989 (i386_linux_fetch_inferior_registers): Likewise.
3990 (i386_linux_store_inferior_registers): Likewise.
3991 (i386_linux_resume): Likewise.
3992 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
3993 Likewise.
3994 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
3995 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
3996 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
3997 (i386obsd_collect_uthread): Likewise.
3998 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3999 (i386_supply_gregset): Likewise.
4000 (i386_collect_gregset): Likewise.
4001 (i386_supply_fpregset): Likewise.
4002 (i386_collect_fpregset): Likewise.
4003 (i386_mpx_bd_base): Likewise.
4004 * i386-v4-nat.c (supply_fpregset): Likewise.
4005 (fill_fpregset): Likewise.
4006 * i387-tdep.c (i387_supply_fsave): Likewise.
4007 (i387_collect_fsave): Likewise.
4008 (i387_supply_fxsave): Likewise.
4009 (i387_collect_fxsave): Likewise.
4010 (i387_supply_xsave): Likewise.
4011 (i387_collect_xsave): Likewise.
4012 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
4013 (ia64_linux_store_registers): Likewise.
4014 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
4015 (ia64_extract_return_value): Likewise.
4016 (ia64_store_return_value): Likewise.
4017 (find_func_descr): Likewise.
4018 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
4019 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
4020 (inf_ptrace_store_registers): Likewise.
4021 * infrun.c (use_displaced_stepping): Likewise.
4022 (displaced_step_prepare_throw): Likewise.
4023 (resume): Likewise.
4024 (proceed): Likewise.
4025 (do_target_wait): Likewise.
4026 (adjust_pc_after_break): Likewise.
4027 (handle_inferior_event_1): Likewise.
4028 (handle_signal_stop): Likewise.
4029 (save_infcall_suspend_state): Likewise.
4030 (restore_infcall_suspend_state): Likewise.
4031 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
4032 * jit.c (jit_frame_prev_register): Likewise.
4033 * linux-nat.c (save_stop_reason): Likewise.
4034 (linux_nat_wait_1): Likewise.
4035 (resume_stopped_resumed_lwps): Likewise.
4036 * linux-record.c (record_linux_sockaddr): Likewise.
4037 (record_linux_msghdr): Likewise.
4038 (record_linux_system_call): Likewise.
4039 * linux-tdep.c (linux_collect_thread_registers): Likewise.
4040 * lm32-tdep.c (lm32_extract_return_value): Likewise.
4041 (lm32_store_return_value): Likewise.
4042 * m32c-tdep.c (m32c_read_flg): Likewise.
4043 (m32c_pseudo_register_read): Likewise.
4044 (m32c_pseudo_register_write): Likewise.
4045 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
4046 (m32r_linux_collect_gregset): Likewise.
4047 * m32r-tdep.c (m32r_store_return_value): Likewise.
4048 (m32r_extract_return_value): Likewise.
4049 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
4050 (m68kbsd_collect_fpregset): Likewise.
4051 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
4052 * m68k-linux-nat.c (fetch_register): Likewise.
4053 (old_fetch_inferior_registers): Likewise.
4054 (old_store_inferior_registers): Likewise.
4055 (store_regs): Likewise.
4056 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
4057 (m68k_svr4_store_return_value): Likewise.
4058 * m88k-tdep.c (m88k_store_arguments): Likewise.
4059 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
4060 (mi_cmd_data_write_register_values): Likewise.
4061 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
4062 (mips_fbsd_store_inferior_registers): Likewise.
4063 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
4064 (mips_fbsd_supply_gregs): Likewise.
4065 (mips_fbsd_collect_fpregs): Likewise.
4066 (mips_fbsd_collect_gregs): Likewise.
4067 (mips_fbsd_supply_fpregset): Likewise.
4068 (mips_fbsd_collect_fpregset): Likewise.
4069 (mips_fbsd_supply_gregset): Likewise.
4070 (mips_fbsd_collect_gregset): Likewise.
4071 * mips-linux-nat.c (supply_gregset): Likewise.
4072 (fill_gregset): Likewise.
4073 (supply_fpregset): Likewise.
4074 (fill_fpregset): Likewise.
4075 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
4076 (mips_fill_gregset): Likewise.
4077 (mips_supply_fpregset): Likewise.
4078 (mips_fill_fpregset): Likewise.
4079 (mips64_supply_gregset): Likewise.
4080 (micromips_linux_sigframe_validate): Likewise.
4081 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
4082 (mipsnbsd_fetch_inferior_registers): Likewise.
4083 (mipsnbsd_store_inferior_registers): Likewise.
4084 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
4085 (mipsnbsd_supply_gregset): Likewise.
4086 (mipsnbsd_iterate_over_regset_sections): Likewise.
4087 (mipsnbsd_supply_reg): Likewise.
4088 (mipsnbsd_supply_fpreg): Likewise.
4089 * mips-tdep.c (mips_in_frame_stub): Likewise.
4090 (mips_dummy_id): Likewise.
4091 (is_octeon_bbit_op): Likewise.
4092 (micromips_bc1_pc): Likewise.
4093 (extended_mips16_next_pc): Likewise.
4094 (mips16_next_pc): Likewise.
4095 (deal_with_atomic_sequence): Likewise.
4096 * moxie-tdep.c (moxie_process_readu): Likewise.
4097 * nios2-tdep.c (nios2_get_next_pc): Likewise.
4098 * nto-procfs.c (procfs_store_registers): Likewise.
4099 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
4100 (ppcfbsd_store_inferior_registers): Likewise.
4101 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
4102 (fetch_altivec_register): Likewise.
4103 (get_spe_registers): Likewise.
4104 (fetch_spe_register): Likewise.
4105 (fetch_altivec_registers): Likewise.
4106 (fetch_all_gp_regs): Likewise.
4107 (fetch_all_fp_regs): Likewise.
4108 (store_vsx_register): Likewise.
4109 (store_altivec_register): Likewise.
4110 (set_spe_registers): Likewise.
4111 (store_spe_register): Likewise.
4112 (store_altivec_registers): Likewise.
4113 (store_all_gp_regs): Likewise.
4114 (store_all_fp_regs): Likewise.
4115 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
4116 (ppc_linux_collect_gregset): Likewise.
4117 (ppc_canonicalize_syscall): Likewise.
4118 (ppc_linux_record_signal): Likewise.
4119 (ppu2spu_prev_register): Likewise.
4120 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
4121 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
4122 (ppcobsd_store_registers): Likewise.
4123 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
4124 Likewise.
4125 (ppc_ravenscar_generic_store_registers): Likewise.
4126 * procfs.c (procfs_fetch_registers): Likewise.
4127 (procfs_store_registers): Likewise.
4128 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
4129 (ravenscar_store_registers): Likewise.
4130 (ravenscar_prepare_to_store): Likewise.
4131 * record-btrace.c (record_btrace_fetch_registers): Likewise.
4132 * record-full.c (record_full_wait_1): Likewise.
4133 (record_full_registers_change): Likewise.
4134 (record_full_store_registers): Likewise.
4135 (record_full_core_fetch_registers): Likewise.
4136 (record_full_save): Likewise.
4137 (record_full_goto_insn): Likewise.
4138 * regcache.c (regcache_register_size): Likewise.
4139 (get_regcache_arch): Remove.
4140 (regcache_read_pc): Likewise.
4141 * regcache.h (get_regcache_arch): Remove.
4142 * remote-sim.c (gdbsim_fetch_register): Likewise.
4143 (gdbsim_store_register): Likewise.
4144 * remote.c (fetch_register_using_p): Likewise.
4145 (send_g_packet): Likewise.
4146 (remote_prepare_to_store): Likewise.
4147 (store_registers_using_G): Likewise.
4148 * reverse.c (save_bookmark_command): Likewise.
4149 (goto_bookmark_command): Likewise.
4150 * rs6000-aix-tdep.c (branch_dest): Likewise.
4151 * rs6000-nat.c (rs6000_ptrace64): Likewise.
4152 (fetch_register): Likewise.
4153 * rs6000-tdep.c (ppc_supply_reg): Likewise.
4154 (ppc_collect_reg): Likewise.
4155 (ppc_collect_gregset): Likewise.
4156 (ppc_collect_fpregset): Likewise.
4157 (ppc_collect_vsxregset): Likewise.
4158 (ppc_collect_vrregset): Likewise.
4159 (ppc_displaced_step_hw_singlestep): Likewise.
4160 (rs6000_pseudo_register_read): Likewise.
4161 (rs6000_pseudo_register_write): Likewise.
4162 * s390-linux-nat.c (supply_gregset): Likewise.
4163 (fill_gregset): Likewise.
4164 (s390_linux_fetch_inferior_registers): Likewise.
4165 * s390-linux-tdep.c (s390_write_pc): Likewise.
4166 (s390_software_single_step): Likewise.
4167 (s390_all_but_pc_registers_record): Likewise.
4168 (s390_linux_syscall_record): Likewise.
4169 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
4170 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
4171 (shnbsd_store_inferior_registers): Likewise.
4172 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
4173 (sh_extract_return_value_fpu): Likewise.
4174 (sh_store_return_value_nofpu): Likewise.
4175 (sh_corefile_supply_regset): Likewise.
4176 (sh_corefile_collect_regset): Likewise.
4177 * sh64-tdep.c (sh64_extract_return_value): Likewise.
4178 (sh64_store_return_value): Likewise.
4179 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
4180 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
4181 (sparc_store_inferior_registers): Likewise.
4182 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
4183 (sparc_ravenscar_prepare_to_store): Likewise.
4184 * sparc-tdep.c (sparc32_store_arguments): Likewise.
4185 (sparc_analyze_control_transfer): Likewise.
4186 (sparc_step_trap): Likewise.
4187 (sparc_software_single_step): Likewise.
4188 (sparc32_gdbarch_init): Likewise.
4189 (sparc_supply_rwindow): Likewise.
4190 (sparc_collect_rwindow): Likewise.
4191 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
4192 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
4193 (sparc64nbsd_collect_gregset): Likewise.
4194 (sparc64nbsd_supply_fpregset): Likewise.
4195 (sparc64nbsd_collect_fpregset): Likewise.
4196 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
4197 (sparc64_supply_gregset): Likewise.
4198 (sparc64_collect_gregset): Likewise.
4199 (sparc64_supply_fpregset): Likewise.
4200 (sparc64_collect_fpregset): Likewise.
4201 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
4202 * spu-tdep.c (spu_unwind_sp): Likewise.
4203 (spu2ppu_prev_register): Likewise.
4204 (spu_memory_remove_breakpoint): Likewise.
4205 * stack.c (return_command): Likewise.
4206 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
4207 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
4208 * tracefile.c (trace_save_ctf): Likewise.
4209 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
4210 (do_windows_store_inferior_registers): Likewise.
4211 (windows_resume): Likewise.
4212 * xtensa-linux-nat.c (fill_gregset): Likewise.
4213 (supply_gregset_reg): Likewise.
4214 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
4215 (xtensa_register_read_masked): Likewise.
4216 (xtensa_supply_gregset): Likewise.
4217 (xtensa_extract_return_value): Likewise.
4218 (xtensa_store_return_value): Likewise.
4219
edd079d9
UW
42202017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
4221
4222 * doublest.c (floatformat_from_string): New function.
4223 * doublest.h (floatformat_from_string): Add prototype.
4224
4225 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
4226 (OP_FLOAT): ... this.
4227 * expression.h: Do not include "doublest.h".
4228 (union exp_element): Replace doubleconst and decfloatconst by
4229 new element floatconst.
4230 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
4231 (ada_evaluate_subexp): Likewise.
4232 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
4233 OP_DOUBLE and OP_DECFLOAT.
4234 * expprint.c (print_subexp_standard): Likewise.
4235 (dump_subexp_body_standard): Likewise.
4236 * breakpoint.c (watchpoint_exp_is_const): Likewise.
4237
4238 * parse.c: Include "dfp.h".
4239 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4240 (write_exp_elt_floatcst): New function.
4241 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
4242 and OP_DECFLOAT.
4243 (operator_check_standard): Likewise.
4244 (parse_float): Do not accept suffix. Take type as input. Return bool.
4245 Return target format buffer instead of host DOUBLEST.
4246 Use floatformat_from_string and decimal_from_string to parse
4247 either binary or decimal floating-point types.
4248 (parse_c_float): Remove.
4249 * parser-defs.h: Do not include "doublest.h".
4250 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4251 (write_exp_elt_floatcst): Add prototype.
4252 (parse_float): Update prototype.
4253 (parse_c_float): Remove.
4254
4255 * c-exp.y: Do not include "dfp.h".
4256 (typed_val_float): Use byte buffer instead of DOUBLEST.
4257 (typed_val_decfloat): Remove.
4258 (DECFLOAT): Remove.
4259 (FLOAT): 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 Handle decimal and binary FP types the same way.
4263
4264 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4265 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
4266 (parse_number): Update to new parse_float interface.
4267 Parse suffixes and determine type before calling parse_float.
4268
4269 * f-exp.y: Replace dval by typed_val_float.
4270 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4271 (parse_number): Use parse_float instead of atof.
4272
4273 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4274 (parse_go_float): Remove.
4275 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4276 (parse_number): Call parse_float instead of parse_go_float.
4277 Parse suffixes and determine type before calling parse_float.
4278
4279 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4280 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4281 (parse_number): Update to new parse_float interface.
4282 Parse suffixes and determine type before calling parse_float.
4283
4284 * m2-exp.y: Replace dval by byte buffer val.
4285 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4286 (parse_number): Call parse_float instead of atof.
4287
4288 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4289 (lex_number): Call parse_float instead of strtod.
4290 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
4291 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
4292 Use write_exp_elt_floatcst.
4293 (unit_testing): Remove static variable.
4294 (rust_type): Do not check unit_testing.
4295 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
4296
4297 * ada-exp.y (type_float, type_double): Remove.
4298 (typed_val_float): Use byte buffer instead of DOUBLEST.
4299 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4300 * ada-lex.l (processReal): Use parse_float instead of sscanf.
4301
cc628f3d
AH
43022017-10-25 Alan Hayward <alan.hayward@arm.com>
4303
4304 * aarch64-tdep.h (enum aarch64_regnum): Remove.
4305 * arch/aarch64.h: New file.
4306
09a7c6aa
UW
43072017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4308
4309 * dfp.h (decimal_from_string): Use const reference for argument.
4310 * dfp.c (decimal_from_string): Likewise.
4311
8ba0dd51
UW
43122017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4313
4314 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
4315 * sh64-tdep.c (sh64_do_fp_register): Likewise.
4316 * mips-tdep.c (mips_print_fp_register): Likewise.
4317
16e812b2
UW
43182017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4319
4320 * common/format.h (enum argclass): Replace decfloat_arg by
4321 dec32float_arg, dec64float_arg, and dec128float_arg.
4322 * common/format.c (parse_format_string): Update to return
4323 new decimal float argument classes.
4324
4325 * printcmd.c (printf_decfloat): Rename to ...
4326 (printf_floating): ... this. Add argclass argument, and use it
4327 instead of parsing the format string again. Add support for
4328 binary floating-point values, using floatformat_to_string.
4329 Convert value to the target format if it doesn't already match.
4330 (ui_printf): Call printf_floating instead of printf_decfloat,
4331 also for double_arg / long_double_arg. Pass argclass.
4332
4333 * dfp.c (decimal_to_string): Add format string argument.
4334 * dfp.h (decimal_to_string): Likewise.
4335
4336 * doublest.c (floatformat_to_string): Add format string argument.
4337 * doublest.h (floatformat_to_string): Likewise.
4338
fdf0cbc2
UW
43392017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4340
4341 * doublest.c (floatformat_precision): New routine.
4342 (floatformat_to_string): Likewise.
4343 * doublest.c (floatformat_to_string): Add prototype.
4344
4345 * printcmd.c (print_scalar_formatted): Only call print_floating
4346 on floating-point types.
4347 * valprint.c: Do not include "floatformat.h".
4348 (generic_val_print_decfloat): Remove.
4349 (generic_val_print): Call generic_val_print_float for both
4350 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
4351 (print_floating): Use floatformat_to_string. Handle decimal float.
4352 (print_decimal_floating): Remove, merge into floatformat_to_string.
4353 * value.h (print_decimal_floating): Remove.
4354
4355 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
4356
5033013f
UW
43572017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4358
4359 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
4360
a664f67e
SM
43612017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4362
4363 * memattr.h: Don't include vec.h.
4364 (struct mem_attrib): Initialize fields.
4365 <unknown>: New static method.
4366 (struct mem_region): Add constructors, operator<, initialize
4367 fields.
4368 * memattr.c: Include algorithm.
4369 (default_mem_attrib, unknown_mem_attrib): Remove.
4370 (user_mem_region_list): New global.
4371 (target_mem_region_list, mem_region_list): Change type to
4372 std::vector<mem_region>.
4373 (mem_use_target): Now a function.
4374 (target_mem_regions_valid): Change type to bool.
4375 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
4376 (require_user_regions): Adjust.
4377 (require_target_regions): Adjust.
4378 (create_mem_region): Adjust.
4379 (lookup_mem_region): Adjust.
4380 (invalidate_target_mem_regions): Adjust.
4381 (mem_clear): Rename to...
4382 (user_mem_clear): ... this, and adjust.
4383 (mem_command): Adjust.
4384 (info_mem_command): Adjust.
4385 (mem_enable, enable_mem_command, mem_disable,
4386 disable_mem_command): Adjust.
4387 (mem_delete): Adjust.
4388 (delete_mem_command): Adjust.
4389 * memory-map.h (parse_memory_map): Return an std::vector.
4390 * memory-map.c (parse_memory_map): Likewise.
4391 (struct memory_map_parsing_data): Add constructor.
4392 <memory_map>: Point to std::vector.
4393 (memory_map_start_memory): Adjust.
4394 (memory_map_end_memory): Adjust.
4395 (memory_map_end_property): Adjust.
4396 (clear_result): Remove.
4397 * remote.c (remote_memory_map): Return an std::vector.
4398 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
4399 Remove.
4400 (target_debug_print_mem_region_vector): New.
4401 * target-delegates.c: Regenerate.
4402 * target.h (mem_region_vector): New typedef.
4403 (to_memory_map): Return mem_region_vector.
4404 (target_memory_map): Return an std::vector.
4405 * target.c (target_memory_map): Return an std::vector.
4406 (flash_erase_command): Adjust.
4407
6e17c565
SM
44082017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4409
4410 * memory-map.c (struct memory_map_parsing_data) <property_name>:
4411 Change type to std::string.
4412 (memory_map_start_property): Adjust.
4413 (memory_map_end_property): Adjust.
4414
cfba9872
SM
44152017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4416
4417 * infrun.h: Include common/byte-vector.h.
4418 (struct displaced_step_closure): New struct.
4419 (struct buf_displaced_step_closure): New struct.
4420 * infrun.c (displaced_step_closure::~displaced_step_closure):
4421 Provide default implementation.
4422 (displaced_step_clear): Deallocate step closure with delete.
4423 * aarch64-tdep.c (displaced_step_closure): Rename to ...
4424 (aarch64_displaced_step_closure): ... this, extend
4425 displaced_step_closure.
4426 (aarch64_displaced_step_data) <dsc>: Change type to
4427 aarch64_displaced_step_closure.
4428 (aarch64_displaced_step_copy_insn): Adjust to type change, use
4429 unique_ptr.
4430 (aarch64_displaced_step_fixup): Add cast for displaced step
4431 closure.
4432 * amd64-tdep.c (displaced_step_closure): Rename to ...
4433 (amd64_displaced_step_closure): ... this, extend
4434 displaced_step_closure.
4435 <insn_buf>: Change type to std::vector<gdb_byte>.
4436 <max_len>: Remove.
4437 (fixup_riprel): Change type of DSC parameter, adjust to type
4438 change of insn_buf.
4439 (fixup_displaced_copy): Change type of DSC parameter.
4440 (amd64_displaced_step_copy_insn): Instantiate
4441 amd64_displaced_step_closure.
4442 (amd64_displaced_step_fixup): Add cast for closure type, adjust
4443 to type change of insn_buf.
4444 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
4445 parameter DSC.
4446 (arm_linux_copy_svc): Likewise.
4447 (cleanup_kernel_helper_return): Likewise.
4448 (arm_catch_kernel_helper_return): Likewise.
4449 (arm_linux_displaced_step_copy_insn): Instantiate
4450 arm_displaced_step_closure.
4451 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
4452 (displaced_read_reg): Change type of parameter DSC.
4453 (branch_write_pc): Likewise.
4454 (load_write_pc): Likewise.
4455 (alu_write_pc): Likewise.
4456 (displaced_write_reg): Likewise.
4457 (arm_copy_unmodified): Likewise.
4458 (thumb_copy_unmodified_32bit): Likewise.
4459 (thumb_copy_unmodified_16bit): Likewise.
4460 (cleanup_preload): Likewise.
4461 (install_preload): Likewise.
4462 (arm_copy_preload): Likewise.
4463 (thumb2_copy_preload): Likewise.
4464 (install_preload_reg): Likewise.
4465 (arm_copy_preload_reg): Likewise.
4466 (cleanup_copro_load_store): Likewise.
4467 (install_copro_load_store): Likewise.
4468 (arm_copy_copro_load_store) Likewise.
4469 (thumb2_copy_copro_load_store): Likewise.
4470 (cleanup_branch): Likewise.
4471 (install_b_bl_blx): Likewise.
4472 (arm_copy_b_bl_blx): Likewise.
4473 (thumb2_copy_b_bl_blx): Likewise.
4474 (thumb_copy_b): Likewise.
4475 (install_bx_blx_reg): Likewise.
4476 (arm_copy_bx_blx_reg): Likewise.
4477 (thumb_copy_bx_blx_reg): Likewise.
4478 (cleanup_alu_imm): Likewise.
4479 (arm_copy_alu_imm): Likewise.
4480 (thumb2_copy_alu_imm): Likewise.
4481 (cleanup_alu_reg): Likewise.
4482 (install_alu_reg): Likewise.
4483 (arm_copy_alu_reg): Likewise.
4484 (thumb_copy_alu_reg): Likewise.
4485 (cleanup_alu_shifted_reg): Likewise.
4486 (install_alu_shifted_reg): Likewise.
4487 (arm_copy_alu_shifted_reg): Likewise.
4488 (cleanup_load): Likewise.
4489 (cleanup_store): Likewise.
4490 (arm_copy_extra_ld_st): Likewise.
4491 (install_load_store): Likewise.
4492 (thumb2_copy_load_literal): Likewise.
4493 (thumb2_copy_load_reg_imm): Likewise.
4494 (arm_copy_ldr_str_ldrb_strb): Likewise.
4495 (cleanup_block_load_all): Likewise.
4496 (cleanup_block_store_pc): Likewise.
4497 (cleanup_block_load_pc): Likewise.
4498 (arm_copy_block_xfer): Likewise.
4499 (thumb2_copy_block_xfer): Likewise.
4500 (cleanup_svc): Likewise.
4501 (install_svc): Likewise.
4502 (arm_copy_svc): Likewise.
4503 (thumb_copy_svc): Likewise.
4504 (arm_copy_undef): Likewise.
4505 (thumb_32bit_copy_undef): Likewise.
4506 (arm_copy_unpred): Likewise.
4507 (arm_decode_misc_memhint_neon): Likewise.
4508 (arm_decode_unconditional): Likewise.
4509 (arm_decode_miscellaneous): Likewise.
4510 (arm_decode_dp_misc): Likewise.
4511 (arm_decode_ld_st_word_ubyte): Likewise.
4512 (arm_decode_media): Likewise.
4513 (arm_decode_b_bl_ldmstm): Likewise.
4514 (arm_decode_ext_reg_ld_st): Likewise.
4515 (thumb2_decode_dp_shift_reg): Likewise.
4516 (thumb2_decode_ext_reg_ld_st): Likewise.
4517 (arm_decode_svc_copro): Likewise.
4518 (thumb2_decode_svc_copro): Likewise.
4519 (install_pc_relative): Likewise.
4520 (thumb_copy_pc_relative_16bit): Likewise.
4521 (thumb_decode_pc_relative_16bit): Likewise.
4522 (thumb_copy_pc_relative_32bit): Likewise.
4523 (thumb_copy_16bit_ldr_literal): Likewise.
4524 (thumb_copy_cbnz_cbz): Likewise.
4525 (thumb2_copy_table_branch): Likewise.
4526 (cleanup_pop_pc_16bit_all): Likewise.
4527 (thumb_copy_pop_pc_16bit): Likewise.
4528 (thumb_process_displaced_16bit_insn): Likewise.
4529 (decode_thumb_32bit_ld_mem_hints): Likewise.
4530 (thumb_process_displaced_32bit_insn): Likewise.
4531 (thumb_process_displaced_insn): Likewise.
4532 (arm_process_displaced_insn): Likewise.
4533 (arm_displaced_init_closure): Likewise.
4534 (arm_displaced_step_fixup): Add cast for closure.
4535 * arm-tdep.h: Include infrun.h.
4536 (displaced_step_closure): Rename to ...
4537 (arm_displaced_step_closure): ... this, extend
4538 displaced_step_closure.
4539 <u::svc::copy_svc_os>: Change type of parameter DSC.
4540 <cleanup>: Likewise.
4541 (arm_process_displaced_insn): Likewise.
4542 (arm_displaced_init_closure): Likewise.
4543 (displaced_read_reg): Likewise.
4544 (displaced_write_reg): Likewise.
4545 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4546 Adjust.
4547 * i386-tdep.h: Include infrun.h.
4548 (i386_displaced_step_closure): New typedef.
4549 * i386-tdep.c (i386_displaced_step_copy_insn): Use
4550 i386_displaced_step_closure.
4551 (i386_displaced_step_fixup): Adjust.
4552 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
4553 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
4554 and unique_ptr.
4555 (ppc_displaced_step_fixup): Adjust.
4556 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
4557 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
4558 and unique_ptr.
4559 (s390_displaced_step_fixup): Adjust.
4560
b392b304
SM
45612017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4562
4563 * interps.h (interp_resume, interp_suspend, interp_set_temp):
4564 Remove declarations.
4565
d5833c62
TT
45662017-10-20 Tom Tromey <tom@tromey.com>
4567
4568 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
4569 std::vector.
4570 (gdb_bfd_record_inclusion): Update.
4571 (bfdp): Remove typedef.
4572
06d5bbc8
TT
45732017-10-20 Tom Tromey <tom@tromey.com>
4574
4575 * gdb_bfd.c (gdb_bfd_ref): Use new.
4576 (struct gdb_bfd_data): Add constructor, destructor, and member
4577 initializers.
4578 (gdb_bfd_unref): Use delete.
4579
2712ce2e
TT
45802017-10-20 Tom Tromey <tom@tromey.com>
4581
4582 * exec.c (exec_file_attach): Use new_bfd_ref.
4583 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
4584 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4585 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
4586 new_bfd_ref.
4587 * gdb_bfd.h (new_bfd_ref): New function.
4588
fcc8fb2f
PA
45892017-10-20 Pedro Alves <palves@redhat.com>
4590
4591 * main.c (captured_command_loop): Add attribute noinline.
4592
4c2287b0
SM
45932017-10-19 Simon Marchi <simon.marchi@ericsson.com>
4594
4595 * interps.c (struct interp_factory): Add constructor.
4596 (interp_factory_p): Remove typedef.
4597 (DEF_VEC_P(interp_factory_p)): Remove.
4598 (interpreter_factories): Change type to std::vector.
4599 (interp_factory_register): Adjust.
4600 (interp_lookup): Adjust.
4601 (interpreter_completer): Adjust.
4602
3d415c26
TT
46032017-10-19 Tom Tromey <tom@tromey.com>
4604
4605 * break-catch-syscall.c (catch_syscall_completer): Use
4606 std::string, gdb::unique_xmalloc_ptr.
4607
395423c4
TT
46082017-10-19 Tom Tromey <tom@tromey.com>
4609
4610 * infcall.c (call_function_by_hand_dummy): Use std::string.
4611
54f70bc1
TT
46122017-10-19 Tom Tromey <tom@tromey.com>
4613
4614 * mi/mi-main.c (mi_cmd_execute): Update.
4615 * top.h (prepare_execute_command): Return scoped_value_mark.
4616 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
4617 Add move constructor.
4618 * top.c (prepare_execute_command): Return scoped_value_mark.
4619 (execute_command): Update.
4620
63929e84
PA
46212017-10-19 Pedro Alves <palves@redhat.com>
4622
4623 * xml-support.c (xml_fetch_content_from_file): Check fread's
4624 return.
4625
a75868f5
PA
46262017-10-19 Pedro Alves <palves@redhat.com>
4627
4628 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
4629 async.
4630 (handle_error_fd): New function.
4631 (ser_base_async): Add/delete an event loop file handler for
4632 error_fd.
4633
2edf834e
PA
46342017-10-19 Pedro Alves <palves@redhat.com>
4635
4636 * xml-support.c (xml_fetch_content_from_file): Don't read in
4637 chunks. Instead use fseek to determine the file's size, and read
4638 it in one go.
4639
c8ba13ad
KS
46402017-11-18 Keith Seitz <keiths@redhat.com>
4641
4642 * c-exp.y (oper): Canonicalize conversion operators of user-defined
4643 types.
4644 Add whitespace to front of type name.
4645
37534686
KS
46462017-10-18 Keith Seitz <keiths@redhat.com>
4647
4648 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
4649 DW_AT_accessibility.
4650
28c7c158
YQ
46512017-10-18 Yao Qi <yao.qi@linaro.org>
4652
4653 * features/tic6x-c62x-linux.c: Remove.
4654
30f0b101
TT
46552017-10-17 Tom Tromey <tom@tromey.com>
4656
4657 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
4658 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
4659 (do_mixed_source_and_assembly): Likewise.
4660
57e12da9
TT
46612017-10-17 Tom Tromey <tom@tromey.com>
4662
4663 * regcache.c (regcache::xfer_part): Remove assertion.
4664
7b700999
PA
46652017-10-17 Pedro Alves <palves@redhat.com>
4666
4667 * xml-support.c (xml_fetch_content_from_file): Call
4668 unique_ptr::release() instead unique_ptr::get() when passing
4669 through xrealloc.
4670
d3037ba6
YQ
46712017-10-17 Yao Qi <yao.qi@linaro.org>
4672
4673 * regcache.c (regcache::xfer_part): Remove parameters read and
4674 write, add parameter is_raw. All callers are updated.
4675
83d5a34d
KS
46762017-10-16 Keith Seitz <keiths@redhat.com>
4677
4678 * c-typeprint.c (enum access_specifier): Moved here from
4679 c_type_print_base.
4680 (output_access_specifier): New function.
4681 (c_type_print_base): Consider typedefs when assessing
4682 whether access labels are needed.
4683 Use output_access_specifier as needed.
4684 Output access specifier for typedefs, if needed.
4685 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
4686 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
4687 fields.
4688 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
4689 accessor macros.
4690
87028b87
TT
46912017-10-16 Tom Tromey <tom@tromey.com>
4692
4693 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
4694 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
4695 * target.c (target_fileio_read_stralloc): Update.
4696 * sparc64-tdep.c (adi_is_addr_mapped): Update.
4697 * target.h (target_fileio_read_stralloc): Return
4698 unique_xmalloc_ptr.
4699
b7b030ad
TT
47002017-10-16 Tom Tromey <tom@tromey.com>
4701
4702 * xml-syscall.c (xml_init_syscalls_info): Update.
4703 * xml-support.c (xinclude_start_include): Update.
4704 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
4705 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
4706 (xml_fetch_content_from_file): Likewise.
4707 * osdata.c (get_osdata): Update.
4708 * target.h (target_read_stralloc, target_get_osdata): Return
4709 unique_xmalloc_ptr.
4710 * solib-aix.c (solib_aix_get_library_list): Update.
4711 * solib-target.c (solib_target_current_sos): Update.
4712 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
4713 * xml-tdesc.c (fetch_available_features_from_target): Update.
4714 (target_fetch_description_xml): Update.
4715 (file_read_description_xml): Update.
4716 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
4717 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
4718 (remote_pid_to_exec_file): Update.
4719 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
4720 (target_get_osdata): Likewise.
4721
b80406ac
TT
47222017-10-16 Tom Tromey <tom@tromey.com>
4723
4724 * remote.c (remote_register_number_and_offset): Use std::vector.
4725 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
4726 (putpkt_binary): Use gdb::def_vector.
4727 (compare_sections_command): Use gdb::byte_vector.
4728
a90ecff8
TT
47292017-10-16 Tom Tromey <tom@tromey.com>
4730
4731 * ppc-linux-nat.c (hwdebug_insert_point): Use
4732 gdb::unique_xmalloc_ptr, XDUP.
4733
2dc0e219
TT
47342017-10-16 Tom Tromey <tom@tromey.com>
4735
4736 * probe.c (parse_probes): Use std::string.
4737 (info_probes_for_ops, enable_probes_command)
4738 (disable_probes_command): Remove cleanups.
4739
b05628f0
TT
47402017-10-16 Tom Tromey <tom@tromey.com>
4741
4742 * buildsym.c (block_compar): Remove.
4743 (end_symtab_get_static_block): Use std::vector.
4744
a79b1bc6
SM
47452017-10-16 Simon Marchi <simon.marchi@ericsson.com>
4746
4747 * memrange.h (struct mem_range): Define operator< and operator==.
4748 (mem_range_s): Remove.
4749 (DEF_VEC_O (mem_range_s)): Remove.
4750 (normalize_mem_ranges): Change parameter type to std::vector.
4751 * memrange.c (compare_mem_ranges): Remove.
4752 (normalize_mem_ranges): Change parameter type to std::vector,
4753 adjust to vector change.
4754 * exec.c (section_table_available_memory): Return vector, remove
4755 parameter.
4756 (section_table_read_available_memory): Adjust to std::vector
4757 change.
4758 * remote.c (remote_read_bytes): Adjust to std::vector
4759 change.
4760 * tracepoint.h (traceframe_available_memory): Change parameter
4761 type to std::vector.
4762 * tracepoint.c (traceframe_available_memory): Change parameter
4763 type to std::vector, adjust.
4764 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
4765 std::vector change.
4766 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4767 unittests/memrange-selftests.c.
4768 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
4769 * gdb/unittests/memrange-selftests.c: New file.
4770
63f0e930
PA
47712017-10-16 Pedro Alves <palves@redhat.com>
4772
4773 * elfread.c (probe_key_free): Rename range-for variable.
4774 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
4775 (find_probe_by_pc, collect_probes): Rename range-for variable.
4776
c40c7bfc
YQ
47772017-10-16 Yao Qi <yao.qi@linaro.org>
4778
4779 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
4780 * features/tic6x-c62x.c: Remove.
4781 * features/tic6x-c64x-linux.c: Remove.
4782 * features/tic6x-c64x.c: Remove.
4783 * features/tic6x-c64xp-linux.c: Remove.
4784 * features/tic6x-c64xp.c: Remove.
4785 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
4786 initialize_tdesc_tic6x_*_linux functions.
4787 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
4788 initialize_tdesc_tic6x_* functions.
4789
df27ae6a
YQ
47902017-10-16 Yao Qi <yao.qi@linaro.org>
4791
4792 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
4793 tic6x-c62x.
4794 * regformats/tic6x-c62x.dat: Remove.
4795 * regformats/tic6x-c64x.dat: Remove.
4796 * regformats/tic6x-c64xp.dat: Remove.
4797
86766165
SM
47982017-10-15 Simon Marchi <simon.marchi@ericsson.com>
4799
4800 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
4801 (the !HAVE_LIBEXPAT version).
4802
824dfcc3
SM
48032017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4804
4805 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
4806 const.
4807
2098b393
SM
48082017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4809
4810 * target.h: Include tracepoint.h.
4811 (enum trace_find_type): Move to tracepoint.h.
4812 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
4813 * tracepoint.h: Don't include target.h
4814 (enum trace_find_type): Move from target.h.
4815 (parse_traceframe_info): Return a unique ptr.
4816 * tracepoint.c (current_traceframe_info): Change type to unique
4817 ptr.
4818 (free_traceframe_info): Remove.
4819 (clear_traceframe_info): Don't manually free
4820 current_traceframe_info.
4821 (free_result): Remove.
4822 (parse_traceframe_info): Return a unique ptr.
4823 (get_traceframe_info): Adjust to unique ptr.
4824 * ctf.c (ctf_traceframe_info): Return a unique ptr.
4825 * remote.c (remote_traceframe_info): Return a unique ptr.
4826 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
4827 ptr.
4828 * target-debug.h (target_debug_print_traceframe_info_up): New
4829 macro.
4830 * target-delegates.c: Regenerate.
4831
4cdd21a8
SM
48322017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4833
4834 * memrange.h (struct mem_range): Add constructors.
4835 * tracepoint.h (struct traceframe_info) <memory>: Change type to
4836 std::vector<mem_range>.
4837 * tracepoint.c (free_traceframe_info): Don't manually free
4838 vector.
4839 (traceframe_info_start_memory): Adjust to vector change.
4840 (traceframe_available_memory): Likewise.
4841 * tracefile-tfile.c (build_traceframe_info): Likewise.
4842 * ctf.c (ctf_traceframe_info): Likewise.
4843
d0d292a2
SM
48442017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4845
4846 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
4847 std::vector<int>.
4848 * tracepoint.c (free_traceframe_info): Deallocate with delete.
4849 (traceframe_info_start_tvar): Adjust to vector change.
4850 (parse_traceframe_info): Allocate with new.
4851 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
4852 vector change.
4853 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
4854 change.
4855 tfile_traceframe_info): Allocate with new.
4856 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
4857 change.
4858
8d3c73ef
SM
48592017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4860
4861 * tracepoint.c (traceframe_info): Rename to...
4862 (current_traceframe_info): ...this.
4863 (clear_traceframe_info): Adjust.
4864 (get_traceframe_info): Adjust.
4865
b129dcac
SM
48662017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4867
4868 * nat/linux-osdata.c: Include algorithm.
4869 (compare_processes): Remove.
4870 (struct pid_pgid_entry): New struct.
4871 (linux_xfer_osdata_processgroups): Use std::vector instead of
4872 XNEWVEC.
4873
af5bf4ad
SM
48742017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4875
4876 * objfiles.h: Don't include symfile.h.
4877 (struct partial_symbol): Remove forward-declaration.
4878 (struct objfile) <global_psymbols, static_psymbols>: Change type
4879 to std::vector<partial_symbol *>.
4880 * objfiles.c (objfile::objfile): Don't memset those fields.
4881 (objfile::~objfile): Don't free those fields.
4882 * psympriv.h (struct psymbol_allocation_list): Remove
4883 forward-declaration.
4884 (add_psymbol_to_list): Change psymbol_allocation_list parameter
4885 to std::vector.
4886 (start_psymtab_common): Change parameters to std::vector.
4887 * psymtab.c: Include algorithm.
4888 (require_partial_symbols): Call shrink_to_fit.
4889 (find_pc_sect_psymbol): Adjust to vector change.
4890 (match_partial_symbol): Likewise.
4891 (lookup_partial_symbol): Likewise.
4892 (psym_relocate): Likewise.
4893 (dump_psymtab): Likewise.
4894 (recursively_search_psymtabs): Likewise.
4895 (compare_psymbols): Remove.
4896 (sort_pst_symbols): Adjust to vector change.
4897 (start_psymtab_common): Likewise.
4898 (end_psymtab_common): Likewise.
4899 (psymbol_bcache_full): De-constify return value.
4900 (add_psymbol_to_bcache): Likewise.
4901 (extend_psymbol_list): Remove.
4902 (append_psymbol_to_list): Adjust to vector change.
4903 (add_psymbol_to_list): Likewise.
4904 (init_psymbol_list): Likewise.
4905 (maintenance_info_psymtabs): Likewise.
4906 (maintenance_check_psymtabs): Likewise.
4907 * symfile.h (struct psymbol_allocation_list): Remove.
4908 * symfile.c (reread_symbols): Adjust to vector change.
4909 * dbxread.c (start_psymtab): Change type of parameters.
4910 (dbx_symfile_read): Adjust to vector change.
4911 (read_dbx_symtab): Likewise.
4912 (start_psymtab): Change type of parameters.
4913 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
4914 (create_partial_symtab): Likewise.
4915 (add_partial_symbol): Likewise.
4916 (write_one_signatured_type): Likewise.
4917 (recursively_write_psymbols): Likewise.
4918 * mdebugread.c (parse_partial_symbols): Likewise.
4919 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
4920 (scan_xcoff_symtab): Adjust to vector change.
4921 (xcoff_initial_scan): Likewise.
4922
3ec5942f
SM
49232017-10-13 Simon Marchi <simon.marchi@ericsson.com>
4924
4925 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
4926
2399fe6a
YQ
49272017-10-13 Yao Qi <yao.qi@linaro.org>
4928
4929 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
4930 Remove s390x-*-expedite, add s390x-expedite.
4931
4bf3f4a8
YQ
49322017-10-13 Yao Qi <yao.qi@linaro.org>
4933
4934 * features/s390-gs-linux64.c: Regenerated.
4935 * features/s390x-gs-linux64.c: Regenerated.
4936
9e86da07
TT
49372017-10-13 Tom Tromey <tom@tromey.com>
4938
4939 * compile/compile-object-run.c (do_module_cleanup): Use delete.
4940 * solib.c (update_solib_list, reload_shared_libraries_1): Use
4941 delete.
4942 * symfile.c (symbol_file_add_with_addrs): Use new.
4943 (symbol_file_add_separate): Update comment.
4944 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
4945 * jit.c (jit_object_close_impl): Use new.
4946 (jit_unregister_code): Use delete.
4947 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
4948 (~objfile): Rename from free_objfile.
4949 (free_objfile_separate_debug, do_free_objfile_cleanup)
4950 (free_all_objfiles, objfile_purge_solibs): Use delete.
4951 * objfiles.h (struct objfile): Add constructor and destructor.
4952 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
4953 (allocate_objfile, free_objfile): Don't declare.
4954 (struct objstats): Add initializers.
4955
c2508e90
SM
49562017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4957
4958 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
4959 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
4960 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
4961 * gdbarch.h: Regenerate.
4962 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4963 Adjust comment.
4964 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
4965 (i386_displaced_step_fixup): Adjust comment.
4966 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
4967
a900ff72
TT
49682017-10-12 Tom Tromey <tom@tromey.com>
4969
4970 * prologue-value.h (pv_area::store_would_trash): Return bool.
4971 (pv_area::find_reg): Likewise.
4972 * prologue-value.c (pv_area::store_would_trash): Return bool.
4973 (pv_area::find_reg): Likewise.
4974
f7b7ed97
TT
49752017-10-12 Tom Tromey <tom@tromey.com>
4976
4977 * s390-linux-tdep.c (s390_store, s390_load)
4978 (s390_check_for_saved, s390_analyze_prologue): Update.
4979 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
4980 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
4981 * prologue-value.h (class pv_area): Move from prologue-value.c.
4982 Change names of members. Add constructor, destructor, member
4983 functions.
4984 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
4985 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
4986 (pv_area_fetch, pv_area_scan): Don't declare.
4987 * prologue-value.c (struct pv_area::area_entry): Now member of
4988 pv_area.
4989 (struct pv_area): Move to prologue-value.h.
4990 (pv_area::pv_area): Rename from make_pv_area.
4991 (pv_area::~pv_area): Rename from free_pv_area.
4992 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
4993 (clear_entries, find_entry, overlaps, store_would_trash, store)
4994 (fetch, find_reg, scan): Now member of pv_area.
4995 Remove "area" argument. Update.
4996 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
4997 Update.
4998 * mn10300-tdep.c (push_reg, check_for_saved)
4999 (mn10300_analyze_prologue): Update.
5000 * mep-tdep.c (is_arg_spill, check_for_saved)
5001 (mep_analyze_prologue): Update.
5002 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
5003 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
5004 (m32c_is_struct_return, m32c_analyze_prologue): Update.
5005 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
5006 Update.
5007 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
5008 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
5009
466eecee
SM
50102017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5011
5012 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
5013 * linux-nat.c (linux_nat_delete_thread): New variable.
5014 (lwp_free): Invoke linux_nat_delete_thread if set.
5015 (linux_nat_set_delete_thread): New function.
5016 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
5017 thread delete callback.
5018 * arm-linux-nat.c (arm_linux_delete_thread): New function.
5019 (_initialize_arm_linux_nat): Assign thread delete callback.
5020 * s390-linux-nat.c (s390_delete_thread): New function.
5021 (_initialize_s390_nat): Assign thread delete callback.
5022 * x86-linux-nat.c (x86_linux_add_target): Likewise.
5023 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
5024 function.
5025 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
5026 declaration.
5027 * nat/x86-linux.c (x86_linux_delete_thread): New function.
5028 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
5029
f71c8822
TT
50302017-10-09 Tom Tromey <tom@tromey.com>
5031
5032 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
5033 std::string.
5034 * tui/tui-layout.c (enum tui_status): Use std::string.
5035
981a3fb3
TT
50362017-10-11 Tom Tromey <tom@tromey.com>
5037
5038 * gdbthread.h (thread_command): Constify.
5039 * inferior.h (detach_command): Constify.
5040 * top.h (set_history, show_history): Constify.
5041 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
5042 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
5043 * bsd-kvm.c (bsd_kvm_cmd): Constify.
5044 * printcmd.c (set_command): Constify.
5045 (non_const_set_command): New function.
5046 * dcache.c (set_dcache_command, show_dcache_command): Constify.
5047 * breakpoint.c (enable_command, disable_command, delete_command)
5048 (catch_command, tcatch_command, set_breakpoint_cmd)
5049 (show_breakpoint_cmd): Constify.
5050 * macrocmd.c (macro_command): Constify.
5051 * infcmd.c (unset_command, kill_command, detach_command)
5052 (info_proc_cmd): Constify.
5053 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
5054 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
5055 (info_auto_load_cmd): Constify.
5056 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
5057 (unset_tdesc_cmd): Constify.
5058 * ada-lang.c (set_ada_command, show_ada_command)
5059 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
5060 * guile/guile.c (set_guile_command, show_guile_command)
5061 (info_guile_command): Constify.
5062 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
5063 Constify.
5064 * skip.c (skip_command): Constify.
5065 * compile/compile.c (_initialize_compile): Constify.
5066 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
5067 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
5068 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
5069 (maint_btrace_pt_show_cmd): Constify.
5070 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
5071 Constify.
5072 * python/python.c (user_show_python, user_set_python): Constify.
5073 * mips-tdep.c (set_mips_command, show_mips_command)
5074 (set_mipsfpu_command): Constify.
5075 * record-btrace.c (cmd_record_btrace_start)
5076 (cmd_set_record_btrace, cmd_show_record_btrace)
5077 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
5078 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
5079 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
5080 Constify.
5081 * symfile.c (overlay_command): Constify.
5082 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
5083 * cli/cli-logging.c (set_logging_command, show_logging_command):
5084 Constify.
5085 * cli/cli-dump.c (dump_command, append_command)
5086 (srec_dump_command, ihex_dump_command, verilog_dump_command)
5087 (tekhex_dump_command, binary_dump_command)
5088 (binary_append_command): Constify.
5089 * cli/cli-decode.c (struct cmd_list_element): Change type of
5090 "fun".
5091 * cli/cli-cmds.c (info_command, show_command, set_debug)
5092 (show_debug): Constify.
5093 (show_command): Add non-const overload.
5094 * top.c (set_history, show_history): Constify.
5095 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
5096 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
5097 * target.c (target_command): Constify.
5098 * sparc64-tdep.c (info_adi_command): Constify.
5099 * record-full.c (cmd_record_full_start): Constify.
5100 (set_record_full_command): Constify. Fix typo.
5101 (show_record_full_command): Constify.
5102 * thread.c (thread_command, thread_apply_command): Constify.
5103 * memattr.c (dummy_cmd): Constify.
5104 * value.c (function_command): Constify.
5105 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
5106 * probe.c (info_probes_command): Constify.
5107 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
5108 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
5109 (show_thread_cmd, set_thread_default_cmd)
5110 (show_thread_default_cmd): Constify.
5111 (check_empty): Constify.
5112 * tracepoint.c (tfind_command): Constify.
5113 * cp-support.c (maint_cplus_command): Constify.
5114 * windows-tdep.c (info_w32_command): Constify.
5115 * record.c (cmd_record_start, set_record_command)
5116 (show_record_command, info_record_command, cmd_record_goto):
5117 Constify.
5118 * ravenscar-thread.c (set_ravenscar_command)
5119 (show_ravenscar_command): Constify.
5120 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
5121 Constify.
5122 (add_internal_problem_command): Remove casts.
5123 * arc-tdep.c (maintenance_print_arc_command): Constify.
5124 * valprint.c (set_print, show_print, set_print_raw)
5125 (show_print_raw): Constify.
5126 * maint.c (maintenance_command, maintenance_info_command)
5127 (maintenance_print_command, maintenance_set_cmd)
5128 (maintenance_show_cmd, set_per_command_cmd)
5129 (show_per_command_cmd, maintenance_check_command): Constify.
5130 * language.c (set_check, show_check): Constify.
5131 * typeprint.c (show_print_type, set_print_type): Constify.
5132 * go32-nat.c (go32_info_dos_command): Constify.
5133
fdf44873
TT
51342017-10-11 Tom Tromey <tom@tromey.com>
5135
5136 * breakpoint.c (prepare_re_set_context): Remove.
5137 (breakpoint_re_set_one): Update. Don't use cleanups.
5138 (breakpoint_re_set): Use scoped_restore, std::string, and
5139 scoped_restore_current_language.
5140
81b1e71c
TT
51412017-10-11 Tom Tromey <tom@tromey.com>
5142
5143 * breakpoint.c (commands_command_1): Use std::string.
5144 (cleanup_executing_breakpoints): Remove.
5145 (bpstat_do_actions_1): Use scoped_restore.
5146 (bpstat_check_watchpoint): Use std::string.
5147 (decode_static_tracepoint_spec): Likewise.
5148 (break_range_command): Likewise.
5149 (watch_command_1): Likewise.
5150 (compare_breakpoints): Change argument types.
5151 (clear_command): Use std::vector.
5152 (cleanup_executing_breakpoints): Remove.
5153 (update_global_location_list): Use unique_xmalloc_ptr.
5154 (strace_command): Remove unused declaration.
5155
4f9d9906
JB
51562017-10-11 John Baldwin <jhb@FreeBSD.org>
5157
5158 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
5159 * NEWS: Mention new FreeBSD/arm native configuration.
5160 * configure.host: Add arm*-*-freebsd*.
5161 * configure.nat: Likewise.
5162 * arm-fbsd-nat.c: New file.
5163
7176dfd2
JB
51642017-10-11 John Baldwin <jhb@FreeBSD.org>
5165
5166 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
5167 (ALLDEPFILES): Add arm-fbsd-tdep.c.
5168 * NEWS: Mention new FreeBSD/arm target.
5169 * configure.tgt: Add arm*-*-freebsd*.
5170 * arm-fbsd-tdep.c: New file.
5171 * arm-fbsd-tdep.h: New file.
5172
fe220226
MR
51732017-10-11 Maciej W. Rozycki <macro@imgtec.com>
5174
5175 * linux-tdep.c (linux_make_corefile_notes): Remove call to
5176 `gdbarch_elfcore_write_linux_prpsinfo'.
5177 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
5178 method.
5179 (elf_internal_linux_prpsinfo): Remove declaration.
5180 * gdbarch.h: Regenerate.
5181 * gdbarch.c: Regenerate.
5182
a2f63b2e
MR
51832017-10-11 Maciej W. Rozycki <macro@imgtec.com>
5184
5185 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
5186 `set_gdbarch_elfcore_write_linux_prpsinfo'.
5187
458ca1d0
PA
51882017-10-11 Pedro Alves <palves@redhat.com>
5189
5190 * breakpoint.c (reattach_breakpoints): Delete.
5191 * breakpoint.h (reattach_breakpoints): Delete.
5192
905014d7
SM
51932017-10-11 Simon Marchi <simon.marchi@ericsson.com>
5194
5195 * symfile.c (registered_sym_fns): Make struct, not typedef.
5196 (DEF_VEC_O (registered_sym_fns)): Remove.
5197 (symtab_fns): Change type to std::vector.
5198 (add_symtab_fns): Adjust.
5199 (find_sym_fns): Adjust.
5200
56d704da
AK
52012017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
5202
5203 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
5204 * arc-tdep.h (arc_arch_is_em): New function.
5205 (arc_arch_is_hs): Likewise.
5206
7fa29be9
EB
52072017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
5208
5209 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
5210 parentheses in the declaration.
5211 (macro_lookup_inclusion): Likewise.
5212 (macro_lookup_definition): Likewise.
5213 * p-lang.h (pascal_builtin_types): Likewise.
5214 * tui/tui-data.c (tui_win_list): Likewise.
5215 * tui/tui-data.h (tui_win_list): Likewise.
5216 * utils.h (make_cleanup_free_section_addr_info): Likewise.
5217
d9b477e3
KB
52182017-10-11 Mark Rages <markrages@gmail.com>
5219
5220 * target-memory.c (block_boundaries): Fix for block address not
5221 aligned on block size.
5222
65630365
PA
52232017-10-10 Pedro Alves <palves@redhat.com>
5224 Tom Tromey <tom@tromey.com>
5225
5226 * breakpoint.c (struct captured_breakpoint_query_args)
5227 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
5228 (print_breakpoint): New.
5229 * breakpoint.h (print_breakpoint): Declare.
5230 * common/common-exceptions.h (enum return_reason): Remove
5231 references to catch_exceptions.
5232 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
5233 Delete.
5234 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
5235 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
5236 * gdb.h: Delete.
5237 * gdbthread.h (thread_select): Declare.
5238 * mi/mi-cmd-break.c: Don't include gdb.h.
5239 (breakpoint_notify): Use print_breakpoint.
5240 * mi/mi-cmd-catch.c: Don't include gdb.h.
5241 * mi/mi-interp.c: Don't include gdb.h.
5242 (mi_print_breakpoint_for_event): New.
5243 (mi_breakpoint_created, mi_breakpoint_modified): Use
5244 mi_print_breakpoint_for_event.
5245 * mi/mi-main.c: Don't include gdb.h.
5246 (mi_cmd_thread_select): Parse the global thread ID here. Use
5247 thread_select instead of gdb_thread_select.
5248 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
5249 of using gdb_list_thread_ids.
5250 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
5251 FILEIO_ENOSYS here.
5252 (remote_fileio_request): Use TRY/CATCH instead of
5253 catch_exceptions.
5254 * symfile-mem.c (struct symbol_file_add_from_memory_args)
5255 (symbol_file_add_from_memory_wrapper): Delete.
5256 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
5257 * thread.c: Don't include gdb.h.
5258 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
5259 (thread_alive): Use thread_select.
5260 (do_captured_thread_select): Delete, parts salvaged as ...
5261 (thread_select): ... this new function.
5262 (gdb_thread_select): Delete.
5263
bf469271
PA
52642017-10-10 Pedro Alves <palves@redhat.com>
5265 Tom Tromey <tom@tromey.com>
5266
5267 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
5268 and reverse logic.
5269 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
5270 No longer macros. Instead ...
5271 (enum wp_check_result): They're now values of this new
5272 enumeration.
5273 (watchpoint_check): Change return type to wp_check_result and
5274 parameter type to bpstat.
5275 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
5276 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
5277 catch_errors. Reverse logic of watchpoint_check call.
5278 (breakpoint_re_set_one): Now returns void and takes a breakpoint
5279 pointer as parameter.
5280 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
5281 * common/common-exceptions.c (throw_exception_sjlj): Update
5282 comments to avoid mentioning catch_errors.
5283 * exceptions.c (catch_errors): Delete.
5284 * exceptions.h: Update comments to avoid mentioning catch_errors.
5285 (catch_errors_ftype, catch_errors): Delete.
5286 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
5287 (hook_stop_stub): Delete.
5288 (restore_selected_frame): Change return type to void, and
5289 parameter type to const frame_id &.
5290 (restore_infcall_control_state): Use TRY/CATCH instead of
5291 catch_errors.
5292 * main.c (captured_command_loop): Return void and remove
5293 parameter. Remove references to catch_errors.
5294 (captured_main): Use TRY/CATCH instead of catch_errors.
5295 * objc-lang.c (objc_submethod_helper_data)
5296 (find_objc_msgcall_submethod_helper): Delete.
5297 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
5298 catch_errors.
5299 * record-full.c (record_full_message): Return void.
5300 (record_full_message_args, record_full_message_wrapper): Delete.
5301 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
5302 instead of catch_errors.
5303 * solib-aix.c (solib_aix_open_symbol_file_object): Change
5304 parameter type to int.
5305 * solib-darwin.c (open_symbol_file_object): Ditto.
5306 * solib-dsbt.c (open_symbol_file_object): Ditto.
5307 * solib-frv.c (open_symbol_file_object): Ditto.
5308 * solib-svr4.c (open_symbol_file_object): Ditto.
5309 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
5310 * solib.c (update_solib_list): Use TRY/CATCH instead of
5311 catch_errors.
5312 * solist.h (struct target_so_ops) <open_symbol_file_object>:
5313 Change type.
5314 * symmisc.c (struct print_symbol_args): Remove.
5315 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
5316 (print_symbol): Change type.
5317 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
5318 and remove parameters.
5319 (catch_errors): New.
5320 (get_windows_debug_event): Adjust.
5321
1a56bfa5
TT
53222017-10-09 Tom Tromey <tom@tromey.com>
5323
5324 * mi/mi-main.c (free_splay_tree): Remove.
5325 (list_available_thread_groups): Use splay_tree_up.
5326 * common/gdb_splay_tree.h: New file.
5327
0c478e2d
TT
53282017-10-09 Tom Tromey <tom@tromey.com>
5329
5330 * mi/mi-main.c (do_nothing): Remove.
5331 (list_available_thread_groups): Update.
5332
cbd2b4e3
PA
53332017-10-09 Pedro Alves <palves@redhat.com>
5334
5335 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
5336 reading registers when switching context.
5337
a181c0bf
JB
53382017-10-09 John Baldwin <jhb@FreeBSD.org>
5339
5340 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
5341 (fbsd_convert_siginfo): Likewise.
5342 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
5343
6e66f753
SM
53442017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
5345
5346 * configure.ac (try_guile_versions): Remove guile-2.2.
5347 * configure: Regenerate.
5348
890e9790
TT
53492017-10-09 Tom Tromey <tom@tromey.com>
5350
5351 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
5352 (COMPILE.pre): Use $(CXX).
5353
109483d9
PA
53542017-10-09 Pedro Alves <palves@redhat.com>
5355
5356 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
5357 Use bool.
5358 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5359 * cp-support.h (cp_remove_params): Now returns a
5360 gdb::unique_xmalloc_ptr.
5361 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
5362 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
5363 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
5364 returning a gdb::unique_xmalloc_ptr.
5365 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5366 * stack.c (find_frame_funname): Adjust to cp_remove_params
5367 returning a gdb::unique_xmalloc_ptr.
5368
791afaa2
TT
53692017-10-08 Tom Tromey <tom@tromey.com>
5370
5371 * dwarf2read.c (dwarf2_get_dwz_file): Use
5372 gdb::unique_xmalloc_ptr.
5373 (find_slot_in_mapped_hash): Likewise.
5374 (dwarf2_physname): Likewise.
5375 (create_dwo_unit_in_dwp_v1): Use std::string.
5376 (create_dwo_unit_in_dwp_v2): Likewise.
5377 (lookup_dwo_cutu): Likewise.
5378 (inherit_abstract_dies): Use std::vector.
5379 (read_array_type): Likewise.
5380 (dwarf_decode_macros): Remove unused declaration.
5381 (unsigned_int_compar): Remove.
5382 (dwarf2_build_psymtabs_hard): Use scoped_restore.
5383 (psymtabs_addrmap_cleanup): Remove.
5384
30a9c02f
TT
53852017-10-08 Tom Tromey <tom@tromey.com>
5386
5387 * frame-unwind.c (frame_unwind_try_unwinder): Update.
5388 * frame.h (frame_cleanup_after_sniffer): Declare.
5389 (frame_prepare_for_sniffer): Return void.
5390 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
5391 type of argument.
5392 (frame_prepare_for_sniffer): Return void.
5393
757325a3
TT
53942017-10-08 Tom Tromey <tom@tromey.com>
5395
5396 * utils.h (make_cleanup_value_free): Remove.
5397 * utils.c (do_value_free, struct cleanup): Remove.
5398 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
5399 Use gdb_value_up.
5400 * value.h (struct value_deleter): New.
5401 (gdb_value_up): New typedef.
5402
b9c04fb2
TT
54032017-10-08 Tom Tromey <tom@tromey.com>
5404
5405 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
5406 (make_cleanup_free_search_symbols): Remove.
5407 (search_symbols): Return std::vector.
5408 (symbol_search::compare_search_syms): Now member of
5409 symbol_search. Change arguments.
5410 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
5411 (symtab_symbol_info, rbreak_command): Update.
5412 * symtab.h (struct symbol_search) <next>: Remove.
5413 Add constructors.
5414 (symbol_search::operator<): New function.
5415 (symbol_search::operator==): New function.
5416 (search_symbols): Remove std::vector.
5417 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
5418 (symbol_search::compare_search_syms): Declare.
5419
0d28b0a5
YQ
54202017-10-06 Yao Qi <yao.qi@linaro.org>
5421
5422 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
5423 arch/aarch64-insn.o.
5424 Remove one rule.
5425 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
5426
71917808
YQ
54272017-10-06 Yao Qi <yao.qi@linaro.org>
5428
5429 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
5430 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
5431 arch/arm-linux.o respectively.
5432 * configure.tgt: Likewise.
5433
2081b2b2
YQ
54342017-10-06 Yao Qi <yao.qi@linaro.org>
5435
5436 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
5437 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
5438
a1b85d28
PA
54392017-10-06 Pedro Alves <palves@redhat.com>
5440
5441 * windows-nat.c: Include <algorithm>.
5442
d97987e2
YQ
54432017-10-06 Yao Qi <yao.qi@linaro.org>
5444
5445 * configure.tgt (i386_tobjs): New variable.
5446 (amd64_tobjs): New variable.
5447 Set $cpu_obs and $os_obs.
5448
f38307f5
YQ
54492017-10-06 Yao Qi <yao.qi@linaro.org>
5450
5451 * Makefile.in (CONFIG_SRC_SUBDIR): New.
5452 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
5453 (clean): Remove object files and dependency files.
5454 (distclean): Remove the directory.
5455 * configure.ac: Invoke AC_CONFIG_COMMANDS.
5456 * configure: Re-generated.
5457 * configure.tgt: Replace amd64.o with arch/amd64.o.
5458
2f924de6
JM
54592017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
5460
5461 PR build/22188
5462 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
5463 and SETEND.
5464
2fd9d7ca
PA
54652017-10-05 Pedro Alves <palves@redhat.com>
5466
5467 * linux-nat.c (linux_child_follow_fork): When following the parent
5468 and detaching the child, consult the parent thread's architecture
5469 instead of the child's.
5470
d13b8493
UW
54712017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5472
5473 * ax.h: Do not include "doublest.h".
5474 (union agent_val): Remove.
5475
3b4b2f16
UW
54762017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5477
5478 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
5479 (decimal_to_string): Return std::string object.
5480 (decimal_from_string): Accept std::string object. Return bool.
5481 (decimal_from_integral, decimal_from_doublest): Remove.
5482 (decimal_from_longest): Add prototype.
5483 (decimal_from_ulongest): Likewise.
5484 (decimal_to_longest): Likewise.
5485 (decimal_from_doublest): Likewise.
5486 * dfp.c: Do not include "gdbtypes.h" or "value.h".
5487 (MAX_DECIMAL_STRING): Move here.
5488 (decimal_to_string): Return std::string object.
5489 (decimal_from_string): Accept std::string object. Return bool.
5490 (decimal_from_integral): Remove, replace by ...
5491 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
5492 (decimal_to_longest): New function.
5493 (decimal_from_floating): Remove, replace by ...
5494 (decimal_from_doublest): ... this new function.
5495 (decimal_to_doublest): Update to new decimal_to_string interface.
5496
5497 * value.c (unpack_long): Use decimal_to_longest.
5498 * valops.c (value_cast): Use decimal_from_doublest instead of
5499 decimal_from_floating. Use decimal_from_[u]longest isntead of
5500 decimal_from_integral.
5501 * valarith.c (value_args_as_decimal): Likewise.
5502 * valprint.c (print_decimal_floating): Update to new
5503 decimal_to_string interface.
5504 * printcmd.c (printf_decfloat): Likewise.
5505 * c-exp.y (parse_number): Update to new decimal_from_string interface.
5506
1841ee5d
UW
55072017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5508
5509 * doublest.h: Do not include "floatformat.h". Remove stale comments.
5510 * gdbtypes.c: Include "floatformat.h".
5511 * value.c: Likewise.
5512 * m68k-tdep.c: Likewise.
5513
5514 * findvar.c: Do not include "floatformat.h".
5515 * amd64-darwin-tdep.c: Likewise.
5516 * arm-linux-tdep.c: Likewise.
5517 * i386-darwin-tdep.c: Likewise.
5518 * i387-tdep.c: Likewise.
5519 * m68k-linux-tdep.c: Likewise.
5520 * mep-tdep.c: Likewise.
5521 * mips-tdep.c: Likewise.
5522 * nios2-tdep.c: Likewise.
5523 * s390-linux-tdep.c: Likewise.
5524 * sparc-obsd-tdep.c: Likewise.
5525 * sparc-tdep.c: Likewise.
5526 * sparc64-tdep.c: Likewise.
5527 * spu-tdep.c: Likewise.
5528 * tic6x-tdep.c: Likewise.
5529 * tilegx-tdep.c: Likewise.
5530 * vax-tdep.c: Likewise.
5531 * xstormy16-tdep.c: Likewise.
5532 * xtensa-tdep.c: Likewise.
5533
5534 * top.c: Do not include "doublest.h".
5535 * aarch64-tdep.c: Likewise.
5536 * alpha-tdep.c: Likewise.
5537 * arm-linux-tdep.c: Likewise.
5538 * m68k-linux-tdep.c: Likewise.
5539 * tilegx-tdep.c: Likewise.
5540 * xstormy16-tdep.c: Likewise.
5541
a80a6471
JB
55422017-10-05 John Baldwin <jhb@FreeBSD.org>
5543
5544 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
5545 (mipsn32_fbsd_sigframe): Define.
5546 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
5547 for FreeBSD/mipsn32.
5548
12c4bd7f
JB
55492017-10-05 John Baldwin <jhb@FreeBSD.org>
5550
5551 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
5552 AT_HWCAP.
5553
c91933e9
TG
55542017-10-05 Tristan Gingold <tgingold@free.fr>
5555
5556 * MAINTAINERS (Misc): Update my email address.
5557
5cd63fda
PA
55582017-10-04 Pedro Alves <palves@redhat.com>
5559
5560 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
5561 it instead of target_gdbarch.
5562 (get_remote_state, get_remote_packet_size): Adjust
5563 get_remote_arch_state calls, passing down target_gdbarch
5564 explicitly.
5565 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
5566 'gdbarch' and use it instead of target_gdbarch.
5567 (get_memory_packet_size): Adjust get_remote_arch_state calls,
5568 passing down target_gdbarch explicitly.
5569 (struct stop_reply) <arch>: New field.
5570 (remote_parse_stop_reply): Use the stopped thread's architecture,
5571 not the current inferior's. Save the architecture in the
5572 stop_reply.
5573 (process_stop_reply): Use the stop reply's architecture.
5574 (process_g_packet, remote_fetch_registers)
5575 (remote_prepare_to_store, store_registers_using_G)
5576 (remote_store_registers): Adjust get_remote_arch_state calls,
5577 using the regcache's architecture.
5578 (remote_get_trace_status): Adjust get_remote_arch_state calls,
5579 passing down target_gdbarch explicitly.
5580 * spu-multiarch.c (spu_thread_architecture): Defer to the target
5581 beneath instead of calling target_gdbarch.
5582 * target.c (default_thread_architecture): Use the specified
5583 inferior's architecture, instead of the current inferior's
5584 architecture (via target_gdbarch).
5585
ed4227b7
PA
55862017-10-04 Pedro Alves <palves@redhat.com>
5587
5588 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
5589 case.
5590 (regcache_print): Handle !target_has_registers here instead.
5591
55b11ddf
PA
55922017-10-04 Pedro Alves <palves@redhat.com>
5593
5594 * frame.c (create_test_frame): Delete.
5595 * frame.h (create_test_frame): Delete.
5596 * gdbarch-selftests.c: Include gdbthread.h and target.h.
5597 (class regcache_test): Delete.
5598 (test_target_has_registers, test_target_has_stack)
5599 (test_target_has_memory, test_target_prepare_to_store)
5600 (test_target_store_registers): New functions.
5601 (test_target_ops): New class.
5602 (register_to_value_test): Error out if there's already a
5603 process_stratum (or higher) target pushed. Create a fuller mock
5604 environment, with mock target_ops, inferior, address space, thread
5605 and inferior_ptid.
5606 * progspace.c (struct address_space): Move to ...
5607 * progspace.h (struct address_space): ... here.
5608 * regcache.h (regcache::~regcache, regcache::raw_write)
5609 [GDB_SELF_TEST]: No longer virtual.
5610
4c71c105
SM
56112017-10-04 Simon Marchi <simon.marchi@ericsson.com>
5612
5613 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
5614
73dcd72d
PA
56152017-10-04 Pedro Alves <palves@redhat.com>
5616
5617 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
5618 out of 'between TRY and CATCH'.
5619
44704526
PA
56202017-10-04 Pedro Alves <palves@redhat.com>
5621
5622 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
5623 * common/common-exceptions.h (TRY): Open an outermost scope.
5624 Expand intro comment.
5625 (CATCH): Reindent.
5626 (END_CATCH): Close the outermost scope.
5627 * completer.c (complete_line_internal): Add missing END_CATCH.
5628
bc3b087d
SDJ
56292017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5630
5631 * NEWS (Changes since GDB 8.0): Add entry about new
5632 'set-cwd-on-gdbserver' feature.
5633 (New remote packets): Add entry for QSetWorkingDir.
5634 * common/common-inferior.h (set_inferior_cwd): New prototype.
5635 * infcmd.c (set_inferior_cwd): Remove "static".
5636 (show_cwd_command): Expand text to include remote debugging.
5637 * remote.c: Add PACKET_QSetWorkingDir.
5638 (remote_protocol_features) <QSetWorkingDir>: New entry for
5639 PACKET_QSetWorkingDir.
5640 (extended_remote_set_inferior_cwd): New function.
5641 (extended_remote_create_inferior): Call
5642 "extended_remote_set_inferior_cwd".
5643 (_initialize_remote): Call "add_packet_config_cmd" for
5644 QSetWorkingDir.
5645
d092c5a2
SDJ
56462017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5647
5648 * NEWS (New commands): Mention "set/show cwd".
5649 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
5650 "cd" command's help text.
5651 * common/common-inferior.h (get_inferior_cwd): New prototype.
5652 * infcmd.c (inferior_cwd_scratch): New global variable.
5653 (set_inferior_cwd): New function.
5654 (get_inferior_cwd): Likewise.
5655 (set_cwd_command): Likewise.
5656 (show_cwd_command): Likewise.
5657 (_initialize_infcmd): Add "set/show cwd" commands.
5658 * inferior.h (class inferior) <cwd>: New field.
5659 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
5660 (fork_inferior): Change inferior's cwd before its execution.
5661 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
5662 to CreateProcess.
5663
7da0a886
SDJ
56642017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5665
5666 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
5667 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
5668 (COMMON_OBS): Add gdb_tilde_expand.o.
5669 * common/gdb_tilde_expand.c: New file.
5670 * common/gdb_tilde_expand.h: Likewise.
5671
db8dd160
MR
56722017-10-03 Maciej W. Rozycki <macro@imgtec.com>
5673
5674 * gdbarch.sh (objfile): Remove duplicate declaration.
5675 * gdbarch.h: Regenerate.
5676
f8bfbf22
TT
56772017-10-03 Tom Tromey <tom@tromey.com>
5678
5679 * utils.c (internal_vproblem): Use string_vprintf.
5680
5178ed48
TT
56812017-10-03 Tom Tromey <tom@tromey.com>
5682
5683 * printcmd.c (info_symbol_command): Use std::string.
5684
8cff8730
TT
56852017-10-03 Tom Tromey <tom@tromey.com>
5686
5687 * top.c (gdb_safe_append_history): Use std::string.
5688
895b8f30
TT
56892017-10-03 Tom Tromey <tom@tromey.com>
5690
5691 * event-top.c (stdin_event_handler): Update.
5692 * main.c (captured_main_1): Update.
5693 * top.h (make_delete_ui_cleanup): Remove.
5694 (struct ui): Add constructor and destructor.
5695 (new_ui, delete_ui): Remove.
5696 * top.c (make_delete_ui_cleanup): Remove.
5697 (new_ui_command): Use std::unique_ptr.
5698 (delete_ui_cleanup): Remove.
5699 (ui::ui): Rename from new_ui. Update.
5700 (free_ui): Remove.
5701 (ui::~ui): Rename from delete_ui. Update.
5702
0efef640
TT
57032017-10-03 Tom Tromey <tom@tromey.com>
5704
5705 * symfile.c (load_progress): Use gdb::byte_vector.
5706
245ad7d3
TT
57072017-10-03 Tom Tromey <tom@tromey.com>
5708
5709 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
5710 declaration.
5711 * printcmd.c (x_command): Remove unused declaration.
5712 * symfile.c (symbol_file_command): Remove unused declaration.
5713
e05550d7
TT
57142017-10-03 Tom Tromey <tom@tromey.com>
5715
5716 * utils.c (internal_vproblem): Use std::string.
5717 (defaulted_query): Likewise.
5718
b95de2b7
TT
57192017-10-03 Tom Tromey <tom@tromey.com>
5720
5721 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
5722 * top.c (execute_command_to_string): Update.
5723 * utils.c (make_cleanup_restore_page_info): Remove.
5724 (do_restore_page_info_cleanup): Remove.
5725 (set_batch_flag_and_restore_page_info):
5726 New.
5727 (make_cleanup_restore_page_info): Remove.
5728 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5729 (~set_batch_flag_and_restore_page_info): New
5730 (make_cleanup_restore_uinteger): Remove.
5731 (make_cleanup_restore_integer): Remove.
5732 (struct restore_integer_closure): Remove.
5733 (restore_integer): Remove.
5734 * utils.h (struct set_batch_flag_and_restore_page_info): New
5735 class.
5736 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5737 (make_cleanup_restore_page_info): Remove.
5738 (make_cleanup_restore_uinteger) Remove.
5739 (make_cleanup_restore_integer) Remove.
5740
07036511
TT
57412017-10-03 Tom Tromey <tom@tromey.com>
5742
5743 * record-full.h (record_full_gdb_operation_disable_set): Return
5744 scoped_restore_tmpl<int>.
5745 * infrun.c (adjust_pc_after_break): Update.
5746 (handle_signal_stop): Update.
5747 * record-full.c (record_full_gdb_operation_disable_set): Return
5748 scoped_restore_tmpl<int>.
5749 (record_full_wait_1, record_full_insert_breakpoint)
5750 (record_full_remove_breakpoint, record_full_save)
5751 (record_full_goto_insn): Update.
5752
45320ffa
TT
57532017-10-02 Tom Tromey <tom@tromey.com>
5754
5755 PR rust/22236:
5756 * rust-lang.c (rust_val_print_str): New function.
5757 (val_print_struct): Call it.
5758 (rust_subscript): Preserve name of slice type.
5759
b3e3859b
TT
57602017-10-02 Tom Tromey <tom@tromey.com>
5761
5762 * rust-lang.c (rust_subscript): Handle slices in
5763 EVAL_AVOID_SIDE_EFFECTS case.
5764
01af5e0d
TT
57652017-10-02 Tom Tromey <tom@tromey.com>
5766
5767 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
5768
888e3ddb
TT
57692017-10-02 Tom Tromey <tom@tromey.com>
5770
5771 * rust-lang.h (rust_slice_type): Add "extern".
5772
cc536b21
PA
57732017-10-02 Tom Tromey <tom@tromey.com>
5774 Pedro Alves <palves@redhat.com>
5775
5776 * ada-lang.h (ada_exc_info::operator<): Make const.
5777 (ada_exc_info::operator==): Make const.
5778 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
5779 Make const.
5780
386c8614
TT
57812017-09-29 Tom Tromey <tom@tromey.com>
5782
5783 * target.c (read_whatever_is_readable): Change type of "result".
5784 Update.
5785 (free_memory_read_result_vector): Remove.
5786 (read_memory_robust): Change return type. Update.
5787 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
5788 bin2hex, std::string.
5789 * target.h (memory_read_result_s): Remove typedef.
5790 (free_memory_read_result_vector): Remove.
5791 (read_memory_robust): Return std::vector.
5792
789c4b5e
TT
57932017-09-29 Tom Tromey <tom@tromey.com>
5794
5795 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
5796
ab816a27
TT
57972017-09-29 Tom Tromey <tom@tromey.com>
5798
5799 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
5800 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
5801 operator< and operator==.
5802 (ada_exceptions_list): Return a std::vector.
5803 * ada-lang.c (ada_exc_info::operator<): Rename from
5804 compare_ada_exception_info.
5805 (ada_exc_info::operator==): New.
5806 (sort_remove_dups_ada_exceptions_list): Change type of
5807 "exceptions".
5808 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
5809 (ada_add_global_exceptions): Likewise.
5810 (ada_exceptions_list_1): Return a std::vector.
5811 (ada_exceptions_list): Likewise.
5812
52f9abe4
TT
58132017-09-29 Tom Tromey <tom@tromey.com>
5814
5815 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
5816 'std::set *'.
5817 (print_one_inferior): Update.
5818 (free_vector_of_ints): Remove.
5819 (list_available_thread_groups): Change "ids" to std::set.
5820 (mi_cmd_list_thread_groups): Update.
5821 (struct collect_cores_data) <core>: Now a std::set.
5822 (collect_cores): Update.
5823 (unique): Remove.
5824 (print_one_inferior): Update.
5825
dcd5ddcc
TT
58262017-09-29 Tom Tromey <tom@tromey.com>
5827
5828 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
5829 (mi_execute_async_cli_command): Likewise.
5830 (mi_cmd_trace_frame_collected): Use field_fmt.
5831
45d288cc
TT
58322017-09-29 Tom Tromey <tom@tromey.com>
5833
5834 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
5835 gdb::byte_vector.
5836
6afe2f4a
TT
58372017-09-29 Tom Tromey <tom@tromey.com>
5838
5839 * mi/mi-parse.c (mi_parse): Remove unused declaration.
5840
9813429a
TT
58412017-09-29 Tom Tromey <tom@tromey.com>
5842
5843 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
5844
2d6960b4
TT
58452017-09-29 Tom Tromey <tom@tromey.com>
5846
5847 * varobj.h (varobj_gen_name): Return std::string.
5848 * varobj.c (varobj_gen_name): Return std::string.
5849 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
5850 (mi_cmd_var_delete): Don't copy "name".
5851
784c453a
TT
58522017-09-29 Tom Tromey <tom@tromey.com>
5853
5854 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
5855 (mi_cmd_break_insert_1): Update.
5856
a9bc57b9
TT
58572017-09-29 Tom Tromey <tom@tromey.com>
5858
5859 * target.h (make_scoped_defer_target_commit_resume): Update.
5860 * target.c (make_scoped_defer_target_commit_resume): Rename from
5861 make_cleanup_defer_target_commit_resume. Return a
5862 scoped_restore.
5863 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
5864
9754d8c4
TT
58652017-09-29 Tom Tromey <tom@tromey.com>
5866
5867 * main.c (captured_main_1): Remove unused declaration.
5868 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
5869
99ef965c
TT
58702017-09-29 Tom Tromey <tom@tromey.com>
5871
5872 * symtab.c (search_symbols): Remove unused outer cleanup.
5873 (make_source_files_completion_list): Remove unused declaration.
5874
42518ba7
TT
58752017-09-29 Tom Tromey <tom@tromey.com>
5876
5877 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
5878
726b2169
TT
58792017-09-29 Tom Tromey <tom@tromey.com>
5880
5881 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
5882 gdb::byte_vector.
5883
55b06432
TT
58842017-09-29 Tom Tromey <tom@tromey.com>
5885
5886 * complaints.c (vcomplaint): Use std::string.
5887
8abcee91
TT
58882017-09-29 Tom Tromey <tom@tromey.com>
5889
5890 * tracepoint.c (trace_variable_command): Use std::string.
5891 (encode_actions_1): Remove unused declarations.
5892 (create_tsv_from_upload): Use std::string.
5893
6ad94bc7
TT
58942017-09-29 Tom Tromey <tom@tromey.com>
5895
5896 * cp-support.c (gdb_demangle): Use std::string.
5897
2003f3d8
TT
58982017-09-29 Tom Tromey <tom@tromey.com>
5899
5900 * stack.c (parse_frame_specification): Use std::string
5901 (info_frame_command): Use gdb::unique_xmalloc_ptr.
5902
8f8accb5
TT
59032017-09-29 Tom Tromey <tom@tromey.com>
5904
5905 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
5906
200aa7b1
TT
59072017-09-29 Tom Tromey <tom@tromey.com>
5908
5909 * utils.c (vfprintf_maybe_filtered): Use std::string.
5910 (vfprintf_unfiltered): Likewise.
5911
606aae8a
TT
59122017-09-29 Tom Tromey <tom@tromey.com>
5913
5914 * event-top.c (top_level_prompt): Return std::string.
5915 (display_gdb_prompt): Update.
5916
bd413795
TT
59172017-09-29 Tom Tromey <tom@tromey.com>
5918
5919 * unittests/common-utils-selftests.c (format): New function.
5920 (string_vprintf_tests): New function.
5921 (_initialize_common_utils_selftests): Register new tests.
5922 * common/common-utils.c (string_vprintf): New function.
5923 * common/common-utils.h (string_vprintf): Declare.
5924
256642e8
PA
59252017-09-29 Pedro Alves <palves@redhat.com>
5926
5927 * common/rsp-low.c (unpack_varlen_hex): Constify.
5928 * common/rsp-low.h (unpack_varlen_hex): Constify.
5929 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5930 Constify.
5931 * remote.c (remote_set_permissions, read_ptid)
5932 (remote_current_thread, remote_get_threads_with_qthreadinfo)
5933 (remote_static_tracepoint_marker_at)
5934 (remote_static_tracepoint_markers_by_strid)
5935 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
5936 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
5937 (parse_tracepoint_definition, parse_tsv_definition)
5938 (parse_static_tracepoint_marker_definition): Constify.
5939 * tracepoint.h (parse_static_tracepoint_marker_definition)
5940 (parse_trace_status, parse_tracepoint_status)
5941 (parse_tracepoint_definition, parse_tsv_definition): Constify.
5942
b6bb3468
PA
59432017-09-29 Pedro Alves <palves@redhat.com>
5944
5945 * remote.c (target_buf, target_buf_size): Delete.
5946 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
5947 Use the connection's packet buffer instead.
5948 All callers adjusted.
5949 (_initialize_remote): Remove references to target_buf and
5950 target_buf_size.
5951
b2f8eb7a
PA
59522017-09-28 Pedro Alves <palves@redhat.com>
5953
5954 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5955 unittests/common-utils-selftests.c.
5956 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
5957 (COMMON_OBS): Remove utils-selftests.o.
5958 * utils-selftests.c: Move to ...
5959 * unittests/common-utils-selftests.c: ... here and rename self
5960 test to "string_printf".
5961
08302ed2
DE
59622017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
5963
5964 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
5965 having NULL cus or tus.
5966
96a5a1d3
UW
59672017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5968
5969 * arm-tdep.c: (convert_from_extended): Remove.
5970 (convert_to_extended): Likewise.
5971 (arm_extract_return_value): Use convert_typed_floating.
5972 (arm_store_return_value): Likewise.
5973
5974 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5975 * sh-tdep.c: Do not include "floatformat.h".
5976 (sh_littlebyte_bigword_type): New function.
5977 (sh_register_convert_to_virtual): Use convert_typed_floating.
5978 (sh_register_convert_to_raw): Likewise.
5979 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5980 (sh64_littlebyte_bigword_type): New function.
5981 (sh64_extract_return_value): Use convert_typed_floating.
5982 (sh64_register_convert_to_virtual): Likewise.
5983 (sh64_register_convert_to_raw): Likewise.
5984
0db7851f
UW
59852017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5986
5987 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
5988 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
5989
5990 * gdbtypes.h (union type_specific): Make field floatformat hold
5991 just a single struct floatformat, not an array.
5992 (floatformat_from_type): Move here.
5993 * gdbtypes.c (floatformat_from_type): Move here. Update to
5994 changed TYPE_FLOATFORMAT definition.
5995 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
5996 (recursive_dump_type): Likewise.
5997 (init_float_type): Install correct floatformat for byte order.
5998 (arch_float_type): Likewise.
5999
77b7c781
UW
60002017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6001
6002 * gdbtypes.c (init_type): Change incoming argument from
6003 length-in-bytes to length-in-bits. Assert length is a
6004 multiple of TARGET_CHAR_BITS.
6005 (arch_type, arch_flags_type): Likewise.
6006 (init_integer_type): Update call to init_type.
6007 (init_character_type): Likewise.
6008 (init_boolean_type): Likewise.
6009 (init_float_type): Likewise.
6010 (init_decfloat_type): Likewise.
6011 (init_complex_type): Likewise.
6012 (init_pointer_type): Likewise.
6013 (objfile_type): Likewise.
6014 (arch_integer_type): Update call to arch_type.
6015 (arch_character_type): Likewise.
6016 (arch_boolean_type): Likewise.
6017 (arch_float_type): Likewise.
6018 (arch_decfloat_type): Likewise.
6019 (arch_complex_type): Likewise.
6020 (arch_pointer_type): Likewise.
6021 (gdbtypes_post_init): Likewise.
6022
6023 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
6024 (read_base_type): Likewise.
6025 * mdebugread.c (basic_type): Likewise.
6026 * stabsread.c (dbx_init_float_type): Likewise.
6027 (rs6000_builtin_type): Likewise.
6028 (read_range_type): Likewise. Also, fix call to init_integer_type
6029 with erroneous length argument.
6030
6031 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
6032 * d-lang.c (build_d_types): Likewise.
6033 * f-lang.c (build_fortran_types): Likewise.
6034 * go-lang.c (build_go_types): Likewise.
6035 * opencl-lang.c (build_opencl_types): Likewise.
6036 * jit.c (finalize_symtab): Likewise.
6037 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
6038 (build_std_type_info_type): Likewise.
6039 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
6040 update call to arch_flags_type.
6041
6042 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
6043 arch_type.
6044 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
6045 * windows-tdep.c (windows_get_tlb_type): Likewise.
6046
6047 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
6048 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6049 * m32c-tdep.c (make_types): Likewise.
6050 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
6051 (rl78_psw_type): Update call to arch_flags_type.
6052 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
6053 * rx-tdep.c (rx_psw_type): Likewise.
6054 (rx_fpsw_type): Likewise.
6055 * sparc-tdep.c (sparc_psr_type): Likewise.
6056 (sparc_fsr_type): Likewise.
6057 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
6058 (sparc64_ccr_type): Likewise.
6059 (sparc64_fsr_type): Likewise.
6060 (sparc64_fprs_type): Likewise.
6061
f21b4d5c
TT
60622017-09-27 Tom Tromey <tom@tromey.com>
6063
6064 * findcmd.c (find_command): Constify.
6065
643c2ffa
TT
60662017-09-27 Tom Tromey <tom@tromey.com>
6067
6068 * ada-tasks.c (task_command_1, task_command): Constify.
6069
510e5e56
TT
60702017-09-27 Tom Tromey <tom@tromey.com>
6071
6072 * symtab.c (maintenance_print_symbol_cache)
6073 (maintenance_flush_symbol_cache)
6074 (maintenance_print_symbol_cache_statistics): Constify.
6075
e503b191
TT
60762017-09-27 Tom Tromey <tom@tromey.com>
6077
6078 * inferior.c (detach_inferior_command, kill_inferior_command)
6079 (inferior_command): Constify.
6080
4e001312
TT
60812017-09-27 Tom Tromey <tom@tromey.com>
6082
6083 * regcache.c (regcache_print, maintenance_print_registers)
6084 (maintenance_print_raw_registers)
6085 (maintenance_print_cooked_registers)
6086 (maintenance_print_register_groups)
6087 (maintenance_print_remote_registers): Constify.
6088
77763700
TT
60892017-09-27 Tom Tromey <tom@tromey.com>
6090
6091 * printcmd.c (map_display_numbers, undisplay_command)
6092 (enable_disable_display_command, enable_display_command)
6093 (disable_display_command): Constify.
6094
4495129a
TT
60952017-09-27 Tom Tromey <tom@tromey.com>
6096
6097 * breakpoint.h (delete_command): Don't declare.
6098 * breakpoint.c (delete_command, enable_once_command)
6099 (enable_count_command, enable_delete_command, breakpoint_1)
6100 (maintenance_info_breakpoints, stopin_command, stopat_command)
6101 (delete_command, delete_trace_command, save_breakpoints)
6102 (save_breakpoints_command, save_tracepoints_command): Constify.
6103
3088cf40
TT
61042017-09-27 Tom Tromey <tom@tromey.com>
6105
6106 * macrocmd.c (macro_expand_command, macro_expand_once_command)
6107 (skip_ws, extract_identifier, macro_define_command)
6108 (macro_undef_command, macro_list_command): Constify.
6109
69f476a3
TT
61102017-09-27 Tom Tromey <tom@tromey.com>
6111
6112 * infcmd.c (environment_info, set_environment_command)
6113 (unset_environment_command, path_info, info_proc_cmd_1)
6114 (info_proc_cmd_mappings, info_proc_cmd_stat)
6115 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
6116 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
6117
c4a3e68e
TT
61182017-09-27 Tom Tromey <tom@tromey.com>
6119
6120 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
6121 Constify.
6122
c9d31bd6
TT
61232017-09-27 Tom Tromey <tom@tromey.com>
6124
6125 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
6126
1f3f85eb
TT
61272017-09-27 Tom Tromey <tom@tromey.com>
6128
6129 * demangle.c (demangle_command): Constify.
6130
9c504b5d
TT
61312017-09-27 Tom Tromey <tom@tromey.com>
6132
6133 * progspace.c (maintenance_info_program_spaces_command):
6134 Constify.
6135
6663cf91
TT
61362017-09-27 Tom Tromey <tom@tromey.com>
6137
6138 * compile/compile.c (check_raw_argument, compile_file_command)
6139 (compile_code_command, compile_print_command): Constify.
6140
34e5fa26
TT
61412017-09-27 Tom Tromey <tom@tromey.com>
6142
6143 * reggroups.c (maintenance_print_reggroups): Constify.
6144
8384c356
TT
61452017-09-27 Tom Tromey <tom@tromey.com>
6146
6147 * dwarf2read.c (save_gdb_index_command): Constify.
6148
884beb0c
TT
61492017-09-27 Tom Tromey <tom@tromey.com>
6150
6151 * stap-probe.c (info_probes_stap_command): Constify.
6152
e0b2930c
TT
61532017-09-27 Tom Tromey <tom@tromey.com>
6154
6155 * fork-child.c (unset_exec_wrapper_command): Constify.
6156
f938677d
TT
61572017-09-27 Tom Tromey <tom@tromey.com>
6158
6159 * btrace.c (get_uint, get_context_size, no_chunk)
6160 (maint_btrace_packet_history_cmd)
6161 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
6162 (maint_info_btrace_cmd): Constify.
6163
8949cb87
TT
61642017-09-27 Tom Tromey <tom@tromey.com>
6165
6166 * reverse.c (delete_bookmark_command): Constify.
6167
ac88e2de
TT
61682017-09-27 Tom Tromey <tom@tromey.com>
6169
6170 * remote.c (set_memory_packet_size)
6171 (set_memory_write_packet_size, show_memory_write_packet_size)
6172 (set_memory_read_packet_size, show_memory_read_packet_size)
6173 (compare_sections_command, packet_command, remote_put_command)
6174 (remote_get_command, remote_delete_command): Constify.
6175
bd4c9dfe
TT
61762017-09-27 Tom Tromey <tom@tromey.com>
6177
6178 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
6179 (set_mipsfpu_double_command, set_mipsfpu_none_command)
6180 (set_mipsfpu_auto_command): Constify.
6181
5e93d4c6
TT
61822017-09-27 Tom Tromey <tom@tromey.com>
6183
6184 * cli/cli-cmds.h (cd_command): Constify.
6185 * cli/cli-cmds.c (cd_command): Constify.
6186
fc41a75b
TT
61872017-09-27 Tom Tromey <tom@tromey.com>
6188
6189 * thread.c (thread_name_command, thread_find_command): Constify.
6190
67810076
TT
61912017-09-27 Tom Tromey <tom@tromey.com>
6192
6193 * probe.c (enable_probes_command, disable_probes_command):
6194 Constify.
6195
1d8b34a7
TT
61962017-09-27 Tom Tromey <tom@tromey.com>
6197
6198 * symfile.c (symbol_file_command): Constify.
6199 * gdbcore.h (deprecated_file_changed_hook): Constify.
6200 * exec.c (deprecated_file_changed_hook, exec_file_command)
6201 (file_command): Constify.
6202 * defs.h (symbol_file_command): Constify.
6203
442019e1
TT
62042017-09-27 Tom Tromey <tom@tromey.com>
6205
6206 * remote-fileio.c (set_system_call_allowed)
6207 (show_system_call_allowed): Constify.
6208
2983f7cb
TT
62092017-09-27 Tom Tromey <tom@tromey.com>
6210
6211 * tracepoint.c (delete_trace_variable_command)
6212 (tfind_end_command, tfind_start_command, tfind_pc_command)
6213 (tfind_tracepoint_command, tfind_line_command)
6214 (tfind_range_command, tfind_outside_command): Constify.
6215
4fd41b24
TT
62162017-09-27 Tom Tromey <tom@tromey.com>
6217
6218 * ax-gdb.c (maint_agent_printf_command, agent_command)
6219 (agent_eval_command): Constify.
6220
f2fc3015
TT
62212017-09-27 Tom Tromey <tom@tromey.com>
6222
6223 * tracepoint.c (info_scope_command): Constify.
6224 * python/python.c (gdbpy_decode_line): Constify.
6225 * python/py-breakpoint.c (bppy_init): Constify.
6226 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
6227 * location.h: (new_linespec_location)
6228 (string_to_event_location_basic, string_to_event_location):
6229 Constify.
6230 * location.c (new_linespec_location)
6231 (string_to_event_location_basic, string_to_event_location):
6232 Constify.
6233 * linespec.h (decode_line_with_current_source)
6234 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
6235 * linespec.c (linespec_lex_to_end)
6236 (decode_line_with_current_source)
6237 (decode_line_with_last_displayed): Constify.
6238 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
6239 Constify.
6240 * cli/cli-cmds.c (edit_command, list_command): Constify.
6241 * breakpoint.h (until_break_command, watch_command_wrapper)
6242 (awatch_command_wrapper, rwatch_command_wrapper)
6243 (init_ada_exception_breakpoint): Constify.
6244 * breakpoint.c (break_command_1, dprintf_command)
6245 (break_range_command, watch_command_wrapper)
6246 (rwatch_command_wrapper, awatch_command_wrapper)
6247 (until_break_command, init_ada_exception_breakpoint)
6248 (strace_marker_create_sals_from_location, trace_command)
6249 (ftrace_command, strace_command, struct tracepoint): Constify.
6250 * ax-gdb.c (agent_command_1): Constify.
6251 * ada-lang.c (ada_exception_sal): Constify.
6252
8c2f95f4
TT
62532017-09-27 Tom Tromey <tom@tromey.com>
6254
6255 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
6256 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
6257 (get_context_size, no_chunk, get_insn_history_modifiers)
6258 (cmd_record_insn_history, get_call_history_modifiers)
6259 (cmd_record_call_history): Constify.
6260
a0d65762
TT
62612017-09-27 Tom Tromey <tom@tromey.com>
6262
6263 * source.c (show_substitute_path_command)
6264 (unset_substitute_path_command, set_substitute_path_command):
6265 Constify.
6266
58971144
TT
62672017-09-27 Tom Tromey <tom@tromey.com>
6268
6269 * typeprint.c (maintenance_print_type): Constify.
6270 * maint.c (maintenance_dump_me, maintenance_demangle)
6271 (maintenance_time_display, maintenance_info_sections)
6272 (maintenance_print_statistics, maintenance_deprecate)
6273 (maintenance_undeprecate): Constify.
6274 (maintenance_do_deprecate): Constify. Use std::string.
6275 (maintenance_selftest): Constify.
6276 * gdbtypes.h (maintenance_print_type): Constify.
6277
c482f52c
TT
62782017-09-27 Tom Tromey <tom@tromey.com>
6279
6280 * hppa-tdep.c (unwind_command): Constify.
6281
e100df1a
TT
62822017-09-27 Tom Tromey <tom@tromey.com>
6283
6284 * target-descriptions.c (unset_tdesc_filename_cmd)
6285 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
6286 Constify.
6287
31d56ade
TT
62882017-09-27 Tom Tromey <tom@tromey.com>
6289
6290 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
6291
b961da0b
TT
62922017-09-27 Tom Tromey <tom@tromey.com>
6293
6294 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
6295
e2d8ae16
TT
62962017-09-27 Tom Tromey <tom@tromey.com>
6297
6298 * tui/tui-regs.c (tui_reg_command): Constify.
6299
863779b0
TT
63002017-09-27 Tom Tromey <tom@tromey.com>
6301
6302 * skip.c (skip_file_command, skip_function_command)
6303 (skip_enable_command, skip_disable_command, skip_delete_command):
6304 Constify.
6305
cdb34d4a
TT
63062017-09-27 Tom Tromey <tom@tromey.com>
6307
6308 * record-btrace.c (cmd_record_btrace_bts_start)
6309 (cmd_record_btrace_pt_start): Constify.
6310
e99c83e7
TT
63112017-09-27 Tom Tromey <tom@tromey.com>
6312
6313 * symmisc.c (maintenance_print_symbols)
6314 (maintenance_print_msymbols, maintenance_print_objfiles)
6315 (maintenance_info_symtabs, maintenance_check_symtabs)
6316 (maintenance_expand_symtabs, maintenance_info_line_tables):
6317 Constify.
6318
32faf971
TT
63192017-09-27 Tom Tromey <tom@tromey.com>
6320
6321 * top.c (new_ui_command): Constify.
6322
2cf311eb
TT
63232017-09-27 Tom Tromey <tom@tromey.com>
6324
6325 * symfile.c (add_symbol_file_command)
6326 (remove_symbol_file_command, list_overlays_command)
6327 (map_overlay_command, unmap_overlay_command)
6328 (overlay_auto_command, overlay_manual_command)
6329 (overlay_off_command, overlay_load_command): Constify.
6330
e6738699
TT
63312017-09-27 Tom Tromey <tom@tromey.com>
6332
6333 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
6334 (info_spu_mailbox_command, info_spu_dma_command)
6335 (info_spu_proxydma_command): Constify.
6336
aa360cd5
TT
63372017-09-27 Tom Tromey <tom@tromey.com>
6338
6339 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
6340
898241a5
TT
63412017-09-27 Tom Tromey <tom@tromey.com>
6342
6343 * cli/cli-script.c (user_defined_command): Constify.
6344
2d0ac106
TT
63452017-09-27 Tom Tromey <tom@tromey.com>
6346
6347 * cli/cli-dump.c (dump_memory_command, dump_value_command)
6348 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
6349 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
6350 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
6351 (dump_binary_value, append_binary_memory, append_binary_value):
6352 Constify.
6353 (struct dump_context) <func>: Constify.
6354 (add_dump_command): Update.
6355
dede02ce
TT
63562017-09-27 Tom Tromey <tom@tromey.com>
6357
6358 * cli/cli-cmds.c (show_version, show_configuration)
6359 (source_command, show_user): Constify.
6360
d3cb6b99
TT
63612017-09-27 Tom Tromey <tom@tromey.com>
6362
6363 * target.c (maintenance_print_target_stack): Constify.
6364
1970a12f
TT
63652017-09-27 Tom Tromey <tom@tromey.com>
6366
6367 * interps.c (interpreter_exec_cmd): Constify.
6368
41243651
TT
63692017-09-27 Tom Tromey <tom@tromey.com>
6370
6371 * record-full.c (cmd_record_full_restore): Constify.
6372
4465d9db
TT
63732017-09-27 Tom Tromey <tom@tromey.com>
6374
6375 * memattr.c (enable_mem_command, disable_mem_command)
6376 (delete_mem_command): Constify.
6377
ad25e423
TT
63782017-09-27 Tom Tromey <tom@tromey.com>
6379
6380 * value.c (show_convenience): Constify.
6381
d64097b1
TT
63822017-09-27 Tom Tromey <tom@tromey.com>
6383
6384 * gdbcore.h (core_file_command): Update.
6385 * corefile.c (core_file_command): Constify.
6386
4d4589ef
TT
63872017-09-27 Tom Tromey <tom@tromey.com>
6388
6389 * user-regs.c (maintenance_print_user_registers): Constify.
6390
32a7bf17
TT
63912017-09-27 Tom Tromey <tom@tromey.com>
6392
6393 * cp-namespace.c (maintenance_cplus_namespace): Constify.
6394
4a475551
TT
63952017-09-27 Tom Tromey <tom@tromey.com>
6396
6397 * cp-support.c (first_component_command): Constify.
6398
990b9f9f
TT
63992017-09-27 Tom Tromey <tom@tromey.com>
6400
6401 * psymtab.c (maintenance_print_psymbols)
6402 (maintenance_info_psymtabs, maintenance_check_psymtabs):
6403 Constify.
6404
c281872e
TT
64052017-09-27 Tom Tromey <tom@tromey.com>
6406
6407 * windows-tdep.c (display_tib): Constify.
6408
5b64bf74
TT
64092017-09-27 Tom Tromey <tom@tromey.com>
6410
6411 * linux-fork.c (delete_checkpoint_command)
6412 (detach_checkpoint_command): Constify.
6413
4ada038f
TT
64142017-09-27 Tom Tromey <tom@tromey.com>
6415
6416 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
6417
57f5a81b
TT
64182017-09-27 Tom Tromey <tom@tromey.com>
6419
6420 * arc-tdep.c (dump_arc_instruction_command): Constify.
6421
b0a8e6c4
TT
64222017-09-27 Tom Tromey <tom@tromey.com>
6423
6424 * valprint.c (set_radix, show_radix): Constify.
6425
8d97dc1c
TT
64262017-09-27 Tom Tromey <tom@tromey.com>
6427
6428 * dtrace-probe.c (info_probes_dtrace_command): Constify.
6429
eb7c454d
TT
64302017-09-27 Tom Tromey <tom@tromey.com>
6431
6432 * command.h (not_just_help_class_command): Update.
6433 * cli/cli-decode.h (not_just_help_class_command): Update.
6434 * cli/cli-decode.c (not_just_help_class_command): Constify.
6435
e4e33335
TT
64362017-09-27 Tom Tromey <tom@tromey.com>
6437
6438 * gdb_bfd.c (maintenance_info_bfds): Constify.
6439
0450cc4c
TT
64402017-09-27 Tom Tromey <tom@tromey.com>
6441
6442 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
6443 overloads.
6444 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
6445 (do_const_cfunc): New function.
6446 (cmd_cfunc_eq): New overload.
6447 (cli_user_command_p): Check do_const_cfunc.
6448 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
6449 const_cfunc.
6450 * command.h (add_cmd): Add const overload and no-function
6451 overload.
6452 (set_cmd_cfunc): Add const overload.
6453 (cmd_const_cfunc_ftype): Declare.
6454 (cmd_cfunc_eq): Add const overload.
6455 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
6456 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
6457 overload.
6458
a9bbfbd8
TT
64592017-09-27 Tom Tromey <tom@tromey.com>
6460
6461 * macroexp.c (get_next_token_for_substitution): New function.
6462 (substitute_args): Call it. Check for __VA_OPT__.
6463
5230b05a
WT
64642017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
6465 Pedro Alves <palves@redhat.com>
6466
6467 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
6468 producer_is_icc_lt_14.
6469 (producer_is_icc_lt_14): New function.
6470 (check_producer): Add code for checking version of ICC.
6471 (producer_is_icc): Move to producer.c.
6472 (read_structure_type): Restrict ICC workaround to ICC<14.
6473 * producer.c: Include selftest.h.
6474 (producer_is_icc, producer_parsing_tests, _initialize_producer):
6475 New functions.
6476 * producer.h (producer_is_icc): New declaration.
6477
b32b108a
WT
64782017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
6479
6480 * Makefile.in (SFILES): Add producer.c.
6481 (COMMON_OBS): Add producer.o
6482 * amd64-tdep.c (producer.h): Add new include.
6483 * dwarf2read.c (producer.h): Add new include.
6484 * producer.c: New file.
6485 * producer.h: New file.
6486 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
6487 producer.c.
6488 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
6489 producer.h.
6490
5007d765
MK
64912017-09-26 Matthias Klose <doko@ubuntu.com>
6492
6493 * configure.ac: Search ncursesw before ncurses.
6494 Check ncursesw/ncurses.h before ncurses/ncurses.h.
6495 * gdb_curses.h: Include <ncursesw/ncurses.h>
6496 * config.in, configure: Regenerate.
6497
281c4447
RO
64982017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6499
6500 PR gdb/22185
6501 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
6502 obsolete.
6503 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
6504 Remove i386sol2 support.
6505 * configure.nat <i386sol2>: Remove.
6506 <sol2-64>: Fold into ...
6507 <sol2>: ... this.
6508 Move common settings to default section.
6509 Add sol-thread.o.
6510 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
6511 x86_64-*-solaris2.1[0-9]*>: Rename to ...
6512 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
6513 <i[34567]86-*-solaris*>: Remove.
6514 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
6515
6516 * configure.ac: Remove wctype in libw check.
6517 (_MSE_INT_H): Don't define on Solaris 7-9.
6518 <solaris*>: Remove libthread_db.so.1 check.
6519 * configure: Regenerate.
6520 * config.in: Regenerate.
6521
6522 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
6523 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
6524 (gdb_ps_size_t): Remove.
6525 Use base types in users.
6526 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
6527
6528 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
6529
39b06c20
RO
65302017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6531
6532 PR build/22206
6533 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
6534 (adi_is_addr_mapped): Likewise.
6535 (PSR_ICC): Don't redefine.
6536 (PSR_IMPL): Likewise.
6537
6c3e20f1
TT
65382017-09-25 Tom Tromey <tom@tromey.com>
6539
6540 * regcache.c (regcache::dump): Use string_printf.
6541
b292235f
TT
65422017-09-25 Tom Tromey <tom@tromey.com>
6543
6544 * regcache.c (class regcache_invalidator): New.
6545 (struct register_to_invalidate): Remove.
6546 (make_cleanup_regcache_invalidate): Remove.
6547 (regcache::raw_write): Use regcache_invalidator.
6548
9ac86b52
TT
65492017-09-25 Tom Tromey <tom@tromey.com>
6550
6551 * spu-tdep.c (spu2ppu_sniffer): Update.
6552 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
6553 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
6554 Remove.
6555 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
6556 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
6557 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
6558 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
6559 (frame_pop): Update.
6560
c0e383c6
TT
65612017-09-25 Tom Tromey <tom@tromey.com>
6562
6563 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
6564 * regcache.h (regcache_xfree): Don't declare.
6565 * regcache.c (regcache_xfree): Remove.
6566 (do_regcache_xfree): Use delete.
6567 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
6568 * linux-fork.c (free_fork): Use delete.
6569 (fork_save_infrun_state): Likewise.
6570 * jit.c (jit_dealloc_cache): Use delete.
6571 * infrun.c (discard_infcall_suspend_state): Use delete.
6572
791199cc
TT
65732017-09-25 Tom Tromey <tom@tromey.com>
6574
6575 * regcache.h (regcache_xmalloc): Don't declare.
6576 (regcache_raw_set_cached_value): Update comment.
6577 * regcache.c (regcache_xmalloc): Remove.
6578 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
6579 * jit.c (jit_frame_sniffer): Use new.
6580 * frame.c (frame_save_as_regcache): Use new.
6581
289e23aa
AA
65822017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6583
6584 * NEWS: Advertise support for guarded-storage registers on IBM z.
6585
1b63490c
AA
65862017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6587
6588 * s390-linux-nat.c (have_regset_gs): New static variable.
6589 (s390_linux_fetch_inferior_registers): Handle guarded-storage
6590 control block and guarded-storage broadcast control regsets.
6591 (s390_read_description): Detect whether the target has
6592 guarded-storage support, return appropriate tdesc.
6593 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
6594 (features/s390x-gs-linux64.c): Likewise.
6595 (struct gdbarch_tdep) <have_gs>: New field.
6596 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
6597 (s390_gsbc_regset): New variables.
6598 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
6599 and s390_gsbc_regset, if applicable.
6600 (s390_core_read_description): Check whether core file was from a
6601 target with guarded-storage support; include appropriate regsets.
6602 (s390_gdbarch_init): Add registers for guarded-storage support.
6603 (_initialize_s390_tdep): Initialize new target descriptions that
6604 include registers for guarded-storage support.
6605 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
6606 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
6607 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
6608 (S390_NUM_REGS): Adjust macro definition.
6609 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
6610 (tdesc_s390x_gs_linux64): New declarations.
6611
96235dc1
AA
66122017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6613
6614 * features/s390-gs-linux64.xml: New file.
6615 * features/s390-gs.xml: New file.
6616 * features/s390-gsbc.xml: New file.
6617 * features/s390x-gs-linux64.xml: New file.
6618 * features/Makefile (WHICH): Add s390-gs-linux64 and
6619 s390x-gs-linux64.
6620 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
6621 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
6622 * features/s390-gs-linux64.c: New generated file.
6623 * features/s390x-gs-linux64.c: New file.
6624 * regformats/s390-gs-linux64.dat: New file.
6625 * regformats/s390x-gs-linux64.dat: New file.
6626
b4a7c699
TT
66272017-09-23 Tom Tromey <tom@tromey.com>
6628
6629 * defs.h (make_cleanup_override_quit_handler): Don't declare.
6630
c2f97536
TT
66312017-09-22 Tom Tromey <tom@tromey.com>
6632
6633 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
6634 type to scoped_restore_tmpl.
6635 <scoped_input_handler>: Initialize m_quit_handler directly.
6636
43573013
SDJ
66372017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
6638
6639 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
6640 (cd_command): Likewise. Free "current_directory" before
6641 assigning to it.
6642 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
6643 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
6644 * top.c (gdb_dirbuf): Remove global declaration.
6645 * top.h (gdb_dirbuf): Likewise.
6646
6ec2e0f5
SDJ
66472017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
6648
6649 * gnulib/aclocal.m4: Regenerate.
6650 * gnulib/config.in: Regenerate.
6651 * gnulib/configure: Regenerate.
6652 * gnulib/import/Makefile.am: Regenerate.
6653 * gnulib/import/Makefile.in: Regenerate.
6654 * gnulib/import/assure.h: New file.
6655 * gnulib/import/at-func.c: Likewise
6656 * gnulib/import/chdir-long.c: New file.
6657 * gnulib/import/chdir-long.h: New file.
6658 * gnulib/import/cloexec.c: New file.
6659 * gnulib/import/cloexec.h: New file.
6660 * gnulib/import/close.c: New file.
6661 * gnulib/import/closedir.c: New file.
6662 * gnulib/import/dirent-private.h: New file.
6663 * gnulib/import/dup-safer.c: New file.
6664 * gnulib/import/dup.c: New file.
6665 * gnulib/import/dup2.c: New file.
6666 * gnulib/import/error.c: New file.
6667 * gnulib/import/error.h: New file.
6668 * gnulib/import/exitfail.c: New file.
6669 * gnulib/import/exitfail.h: New file.
6670 * gnulib/import/fchdir.c: New file.
6671 * gnulib/import/fcntl.c: New file.
6672 * gnulib/import/fcntl.in.h: New file.
6673 * gnulib/import/fd-hook.c: New file.
6674 * gnulib/import/fd-hook.h: New file.
6675 * gnulib/import/fd-safer.c: New file.
6676 * gnulib/import/fdopendir.c: New file.
6677 * gnulib/import/filename.h: New file.
6678 * gnulib/import/filenamecat-lgpl.c: New file.
6679 * gnulib/import/filenamecat.h: New file.
6680 * gnulib/import/fstat.c: New file.
6681 * gnulib/import/fstatat.c: New file.
6682 * gnulib/import/getcwd-lgpl.c: New file.
6683 * gnulib/import/getcwd.c: New file.
6684 * gnulib/import/getdtablesize.c: New file.
6685 * gnulib/import/getlogin_r.c: New file.
6686 * gnulib/import/getprogname.c: New file.
6687 * gnulib/import/getprogname.h: New file.
6688 * gnulib/import/gettext.h: New file.
6689 * gnulib/import/glob-libc.h: New file.
6690 * gnulib/import/glob.c: New file.
6691 * gnulib/import/glob.in.h: New file.
6692 * gnulib/import/intprops.h: New file.
6693 * gnulib/import/m4/chdir-long.m4: New file.
6694 * gnulib/import/m4/close.m4: New file.
6695 * gnulib/import/m4/closedir.m4: New file.
6696 * gnulib/import/m4/d-ino.m4: New file.
6697 * gnulib/import/m4/d-type.m4: New file.
6698 * gnulib/import/m4/dup.m4: New file.
6699 * gnulib/import/m4/dup2.m4: New file.
6700 * gnulib/import/m4/error.m4: New file.
6701 * gnulib/import/m4/fchdir.m4: New file.
6702 * gnulib/import/m4/fcntl.m4: New file.
6703 * gnulib/import/m4/fcntl_h.m4: New file.
6704 * gnulib/import/m4/fdopendir.m4: New file.
6705 * gnulib/import/m4/filenamecat.m4: New file.
6706 * gnulib/import/m4/fstat.m4: New file.
6707 * gnulib/import/m4/fstatat.m4: New file.
6708 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
6709 * gnulib/import/m4/getcwd-path-max.m4: New file.
6710 * gnulib/import/m4/getcwd.m4: New file.
6711 * gnulib/import/m4/getdtablesize.m4: New file.
6712 * gnulib/import/m4/getlogin_r.m4: New file.
6713 * gnulib/import/m4/getprogname.m4: New file.
6714 * gnulib/import/m4/glob.m4: New file.
6715 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6716 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6717 * gnulib/import/m4/mempcpy.m4: New file.
6718 * gnulib/import/m4/memrchr.m4: New file.
6719 * gnulib/import/m4/mode_t.m4: New file.
6720 * gnulib/import/m4/msvc-inval.m4: New file.
6721 * gnulib/import/m4/msvc-nothrow.m4: New file.
6722 * gnulib/import/m4/open.m4: New file.
6723 * gnulib/import/m4/openat.m4: New file.
6724 * gnulib/import/m4/opendir.m4: New file.
6725 * gnulib/import/m4/readdir.m4: New file.
6726 * gnulib/import/m4/realloc.m4: New file.
6727 * gnulib/import/m4/rewinddir.m4: New file.
6728 * gnulib/import/m4/save-cwd.m4: New file.
6729 * gnulib/import/m4/strdup.m4: New file.
6730 * gnulib/import/m4/strerror.m4: New file.
6731 * gnulib/import/m4/unistd-safer.m4: New file.
6732 * gnulib/import/mempcpy.c: New file.
6733 * gnulib/import/memrchr.c: New file.
6734 * gnulib/import/msvc-inval.c: New file.
6735 * gnulib/import/msvc-inval.h: New file.
6736 * gnulib/import/msvc-nothrow.c: New file.
6737 * gnulib/import/msvc-nothrow.h: New file.
6738 * gnulib/import/open.c: New file.
6739 * gnulib/import/openat-die.c: New file.
6740 * gnulib/import/openat-priv.h: New file.
6741 * gnulib/import/openat-proc.c: New file.
6742 * gnulib/import/openat.c: New file.
6743 * gnulib/import/openat.h: New file.
6744 * gnulib/import/opendir.c: New file.
6745 * gnulib/import/pipe-safer.c: New file.
6746 * gnulib/import/readdir.c: New file.
6747 * gnulib/import/realloc.c: New file.
6748 * gnulib/import/rewinddir.c: New file.
6749 * gnulib/import/save-cwd.c: New file.
6750 * gnulib/import/save-cwd.h: New file.
6751 * gnulib/import/strdup.c: New file.
6752 * gnulib/import/strerror-override.c: New file.
6753 * gnulib/import/strerror-override.h: New file.
6754 * gnulib/import/strerror.c: New file.
6755 * gnulib/import/unistd--.h: New file.
6756 * gnulib/import/unistd-safer.h: New file.
6757 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
6758 "getcwd" and "glob".
6759 * ser-tcp.c: Undefine "close" before redefining it.
6760
432ae719
SM
67612017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6762
6763 * guile/scm-value.c (gdbscm_value_address): Initialize address,
6764 get rid of res_val.
6765
4fa7574e
RO
67662017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6767
6768 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
6769 <sol2,sparc>: Likewise.
6770 <sol2-64,i386>: Likewise.
6771
6772 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
6773 -Wdeprecated-declarations on *-*-solaris*.
6774 * configure: Regenerate.
6775
6776 * procfs.c: Include "nat/inferior.h".
6777 (procfs_info_proc): Fix typo.
6778
f6327dcb
KB
67792017-09-21 Kevin Buettner <kevinb@redhat.com>
6780
6781 * remote.c (vector): Include.
6782 (struct private_thread_info): Add field, thread_handle.
6783 (free_private_thread_info): Deallocate storage associated with
6784 thread handle.
6785 (get_private_info_thread): Initialize `thread_handle' field.
6786 (struct thread_item): Add field, thread_handle.
6787 (clear_threads_listing_context): Deallocate storage associated
6788 with thread handle.
6789 (start_thread): Add support for "handle" attribute.
6790 (thread_attributes): Add "handle".
6791 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
6792 field.
6793 (remote_update_thread_list): Update thread_handle.
6794 (remote_thread_handle_to_thread_info): New function.
6795 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
6796
fbbe5337
KB
67972017-09-21 Kevin Buettner <kevinb@redhat.com>
6798
6799 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
6800 function.
6801 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
6802 * python/python-internal.h (thread_object_type): Declare.
6803
e04ee09e
KB
68042017-09-21 Kevin Buettner <kevinb@redhat.com>
6805
6806 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
6807 (target_thread_handle_to_thread_info): Declare.
6808 * target.c (target_thread_handle_to_thread_info): New function.
6809 * target-delegates.c: Regenerate.
6810 * gdbthread.h (find_thread_by_handle): Declare.
6811 * thread.c (find_thread_by_handle): New function.
6812 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
6813 function.
6814 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
6815
1e5b66ed
SM
68162017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6817
6818 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
6819
ebe48ba0
SM
68202017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6821
6822 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
6823
0a0bf5dc
YQ
68242017-09-21 Yao Qi <yao.qi@linaro.org>
6825
6826 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
6827 to gdb_target_obs.
6828
d1b0a7bf
TT
68292017-09-20 Tom Tromey <tom@tromey.com>
6830
6831 * breakpoint.c (struct counted_command_line): Remove.
6832 (breakpoint_commands): Update.
6833 (alloc_counted_command_line, incref_counted_command_line)
6834 (decref_counted_command_line, do_cleanup_counted_command_line)
6835 (make_cleanup_decref_counted_command_line): Remove.
6836 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
6837 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
6838 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
6839 (save_breakpoints): Update.
6840 * breakpoint.h (counted_command_line): Now a typedef to
6841 shared_ptr.
6842 (struct breakpoint) <commands>: Now a counted_command_line.
6843 (struct bpstats) <command>: Likewise.
6844
48649e1b
TT
68452017-09-20 Tom Tromey <tom@tromey.com>
6846
6847 * breakpoint.c (struct commands_info, do_map_commands_command):
6848 Remove.
6849 (commands_command_1): Update.
6850 (iterate_over_related_breakpoints): Take a function_view.
6851 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
6852 (delete_command): Update.
6853 (map_breakpoint_numbers): Take a function_view.
6854 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
6855 (disable_command): Update.
6856 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
6857 (enable_command): Update.
6858 (struct disp_data, do_enable_breakpoint_disp)
6859 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
6860 (do_map_enable_delete_breakpoint): Remove.
6861 (enable_once_command, enable_count_command, enable_delete_command)
6862 (delete_trace_variable_command): Update.
6863
04afa70c
TT
68642017-09-20 Tom Tromey <tom@tromey.com>
6865
6866 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
6867 (bpstat_clear): Use delete.
6868 (bpstats): New constructors.
6869 (bpstat_copy, bpstat_stop_status): Use new.
6870 (dprintf_after_condition_true): Update.
6871 * breakpoint.h (bpstats::bpstats): Add constructors.
6872 (bpstats::~bpstats): Add destructor.
6873
c83833f4
PA
68742017-09-20 Pedro Alves <palves@redhat.com>
6875
6876 * eval.c (make_params): Delete, refactored as ...
6877 (class fake_method): ... this new type's ctor.
6878 (fake_method::~fake_method): New.
6879 (evaluate_subexp_standard): Use 'fake_method'.
6880
223ffa71
TT
68812017-09-20 Tom Tromey <tom@tromey.com>
6882
6883 * windows-nat.c (get_windows_debug_event, windows_wait)
6884 (do_initial_windows_stuff, windows_attach): Update.
6885 * utils.c (vwarning, internal_vproblem): Update.
6886 (ui_unregister_input_event_handler_cleanup)
6887 (prepare_to_handle_input): Remove.
6888 (class scoped_input_handler): New.
6889 (defaulted_query, prompt_for_continue): Update.
6890 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
6891 Update.
6892 * top.c (undo_terminal_modifications_before_exit): Update.
6893 * target/target.h (target_terminal_init, target_terminal_inferior)
6894 (target_terminal_ours): Don't declare.
6895 (class target_terminal): New.
6896 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
6897 (target_terminal_ours_for_output)
6898 (make_cleanup_restore_target_terminal): Don't declare.
6899 (target_terminal_info): Remove.
6900 * target.c (enum terminal_state, terminal_state): Remove.
6901 (target_terminal::terminal_state): Define.
6902 (target_terminal::init): Rename from target_terminal_init.
6903 (target_terminal::inferior): Rename from
6904 target_terminal_inferior.
6905 (target_terminal::ours): Rename from target_terminal_ours.
6906 (target_terminal::ours_for_output): Rename from
6907 target_terminal_ours_for_output.
6908 (target_terminal::info): New method.
6909 (cleanup_restore_target_terminal)
6910 (make_cleanup_restore_target_terminal): Remove.
6911 * solib.c (handle_solib_event): Update.
6912 * remote.c (remote_serial_quit_handler): Update.
6913 (remote_terminal_inferior, remote_wait_as): Update.
6914 * record-full.c (record_full_wait_1): Update.
6915 * nto-procfs.c (procfs_create_inferior): Update.
6916 * nat/fork-inferior.c (startup_inferior): Update.
6917 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
6918 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
6919 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
6920 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
6921 (mi_breakpoint_created, mi_breakpoint_deleted)
6922 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
6923 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6924 (mi_user_selected_context_changed, report_initial_inferior):
6925 Update.
6926 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
6927 (linux_nat_terminal_inferior): Update.
6928 * infrun.c (follow_fork_inferior)
6929 (handle_vfork_child_exec_or_exit, do_target_resume)
6930 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
6931 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
6932 Update.
6933 * inflow.c (child_terminal_init, info_terminal_command): Update.
6934 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
6935 (attach_command): Update.
6936 * infcall.c (call_thread_fsm_should_stop): Update.
6937 * gnu-nat.c (gnu_attach): Update.
6938 * extension.c (struct active_ext_lang_state)
6939 (restore_active_ext_lang): Update.
6940 * exceptions.c (print_flush): Update.
6941 * event-top.c (async_enable_stdin, default_quit_handler): Update.
6942 (struct quit_handler_cleanup_data, restore_quit_handler)
6943 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
6944 Remove.
6945 * cp-support.c (gdb_demangle): Update.
6946 * breakpoint.c (update_inserted_breakpoint_locations)
6947 (insert_breakpoint_locations, handle_jit_event)
6948 (disable_breakpoints_in_unloaded_shlib): Update.
6949 * annotate.c (annotate_breakpoints_invalid)
6950 (annotate_frames_invalid): Update.
6951
013af3fc
TT
69522017-09-20 Tom Tromey <tom@tromey.com>
6953
6954 * main.c (catch_command_errors): Rename from
6955 catch_command_errors_const.
6956 (captured_main_1): Update.
6957
06871ae8
PA
69582017-09-20 Pedro Alves <palves@redhat.com>
6959
6960 * cli/cli-cmds.c (list_command): Use print_sal_location.
6961 (print_sal_location): New function.
6962 (ambiguous_line_spec): Use print_sal_location.
6963 * linespec.c (symbol_to_sal): Record the symbol in the sal.
6964 * symtab.c (find_function_start_sal): Likewise.
6965 * symtab.h (symtab_and_line::symbol): New field.
6966
e5f25bc5
PA
69672017-09-20 Pedro Alves <palves@redhat.com>
6968
6969 * linespec.c (minsym_found): Handle non-text minsyms.
6970 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
6971
1b7fa39e
WT
69722017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6973
6974 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
6975 backslash.
6976
37dd0825
WT
69772017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6978
6979 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
6980 vmovups instead vmovaps.
6981 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
6982
4e5a4f58
JB
69832017-09-19 John Baldwin <jhb@FreeBSD.org>
6984
6985 * NEWS (Changes since GDB 8.0): Add starti.
6986 * infcmd.c (enum run_break): New.
6987 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
6988 case.
6989 (run_command): Use enum run_how.
6990 (start_command): Likewise.
6991 (starti_command): New function.
6992 (RUN_ARGS_HELP): New macro.
6993 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
6994 commands. Add starti command.
6995
aa70c9f1
YQ
69962017-09-19 Yao Qi <yao.qi@linaro.org>
6997
6998 * Makefile.in (monitor.o): Remove the rule.
6999
d6541620
YQ
70002017-09-19 Yao Qi <yao.qi@linaro.org>
7001
7002 * annotate.h (struct annotate_arg_emitter): Use
7003 DISABLE_COPY_AND_ASSIGN.
7004 * common/refcounted-object.h (refcounted_object): Likewise.
7005 * completer.h (struct completion_result): Likewise.
7006 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
7007 * filename-seen-cache.h (filename_seen_cache): Likewise.
7008 * gdbcore.h (thread_section_name): Likewise.
7009 * gdb_regex.h (compiled_regex): Likewise.
7010 * gdbthread.h (scoped_restore_current_thread): Likewise.
7011 * inferior.h (scoped_restore_current_inferior): Likewise.
7012 * jit.c (jit_reader): Likewise.
7013 * linespec.h (struct linespec_result): Likewise.
7014 * mi/mi-parse.h (struct mi_parse): Likewise.
7015 * nat/fork-inferior.c (execv_argv): Likewise.
7016 * progspace.h (scoped_restore_current_program_space): Likewise.
7017 * python/python-internal.h (class gdbpy_enter): Likewise.
7018 * regcache.h (regcache): Likewise.
7019 * target-descriptions.c (struct tdesc_reg): Likewise.
7020 (struct tdesc_type): Likewise.
7021 (struct tdesc_feature): Likewise.
7022 * ui-out.h (ui_out_emit_type): Likewise.
7023
0615127c
SM
70242017-09-18 Simon Marchi <simon.marchi@ericsson.com>
7025
7026 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
7027 label abort_expression.
7028
5e187554
SM
70292017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7030
7031 * common/buffer.c (buffer_xml_printf): Adjust.
7032 * common/xml-utils.c (xml_escape_text): Change return type to
7033 std::string, update code accordingly.
7034 * common/xml-utils.h (xml_escape_text): Change return type to
7035 std::string.
7036 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
7037 * windows-tdep.c (windows_xfer_shared_library): Adjust.
7038 * unittests/xml-utils-selftests.c (test_xml_escape_text):
7039 Adjust.
7040
c3d7b541
SM
70412017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7042
7043 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
7044 (SUBDIR_UNITTESTS_OBS): Add new object file.
7045 * unittests/xml-utils-selftests.c: New file.
7046
1526853e
SM
70472017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7048
7049 * common/selftest.h (selftest): New struct/interface.
7050 (register_test): Add name parameter, add new overload.
7051 (run_tests): Add filter parameter.
7052 (for_each_selftest_ftype): New typedef.
7053 (for_each_selftest): New declaration.
7054 * common/selftest.c (tests): Change type to
7055 map<string, unique_ptr<selftest>>.
7056 (simple_selftest): New struct.
7057 (register_test): New function.
7058 (register_test): Add name parameter and use it.
7059 (run_tests): Add filter parameter and use it. Add prints.
7060 Adjust to vector -> map change.
7061 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
7062 registering selftests.
7063 * arm-tdep.c (_initialize_arm_tdep): Likewise.
7064 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
7065 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
7066 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
7067 * findvar.c (_initialize_findvar): Likewise.
7068 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
7069 * maint.c (maintenance_selftest): Update call to run_tests.
7070 (maintenance_info_selftests): New function.
7071 (_initialize_maint_cmds): Register "maintenance info selftests"
7072 command. Update "maintenance selftest" doc.
7073 * regcache.c (_initialize_regcache): Add names when registering
7074 selftests.
7075 * rust-exp.y (_initialize_rust_exp): Likewise.
7076 * selftest-arch.c (gdbarch_selftest): New struct.
7077 (gdbarch_tests): Remove.
7078 (register_test_foreach_arch): Add name parameter. Call
7079 register_test.
7080 (tests_with_arch): Remove, move most content to
7081 gdbarch_selftest::operator().
7082 (_initialize_selftests_foreach_arch): Remove.
7083 * selftest-arch.h (register_test_foreach_arch): Add name
7084 parameter.
7085 (run_tests_with_arch): New declaration.
7086 * utils-selftests.c (_initialize_utils_selftests): Add names
7087 when registering selftests.
7088 * utils.c (_initialize_utils): Likewise.
7089 * unittests/array-view-selftests.c
7090 (_initialize_array_view_selftests): Likewise.
7091 * unittests/environ-selftests.c (_initialize_environ_selftests):
7092 Likewise.
7093 * unittests/function-view-selftests.c
7094 (_initialize_function_view_selftests): Likewise.
7095 * unittests/offset-type-selftests.c
7096 (_initialize_offset_type_selftests): Likewise.
7097 * unittests/optional-selftests.c
7098 (_initialize_optional_selftests): Likewise.
7099 * unittests/scoped_restore-selftests.c
7100 (_initialize_scoped_restore_selftests): Likewise.
7101 * NEWS: Document "maintenance selftest" and "maint info
7102 selftests".
7103
5846367a
SM
71042017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7105
7106 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
7107 scoped_restore.
7108
bd77e8ff
SM
71092017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7110
7111 * mi/mi-main.c (mi_load_progress): Make uiout variable
7112 a unique_ptr.
7113
26a67918
PA
71142017-09-15 Pedro Alves <palves@redhat.com>
7115
7116 * compile/compile-c-types.c (convert_enum, convert_int)
7117 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
7118
3f8a7804
SM
71192017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7120
7121 * dwarf2read.c (copy_string): Remove.
7122 (parse_macro_definition): Replace copy_string with savestring.
7123
8d200706
YQ
71242017-09-15 Yao Qi <yao.qi@linaro.org>
7125
7126 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
7127 gdb_target_obs.
7128 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
7129 Likewise.
7130 (i[34567]86-*-linux*): Likewise.
7131
d185219d
SM
71322017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7133
7134 * dwarf2expr.h (dwarf_stack_value): Add constructor.
7135 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
7136 <stack>: Change type to std::vector.
7137 <stack_len, stack_allocated>: Remove.
7138 <grow_stack>: Remove.
7139 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7140 (dwarf_expr_context::~dwarf_expr_context): Remove.
7141 (dwarf_expr_context::grow_stack): Remove.
7142 (dwarf_expr_context::push): Adjust.
7143 (dwarf_expr_context::pop): Adjust.
7144 (dwarf_expr_context::fetch): Adjust.
7145 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
7146 (dwarf_expr_context::stack_empty_p): Adjust.
7147 (dwarf_expr_context::execute_stack_op): Adjust.
7148
eccd80d6
SM
71492017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7150
7151 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
7152 return type to bool.
7153 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
7154
69009882
SM
71552017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7156
7157 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
7158 Change type to bool.
7159 (dwarf_stack_value) <in_stack_memory>: Likewise.
7160 (dwarf_expr_context) <push_address>: Change parameter type to
7161 bool.
7162 <fetch_in_stack_memory>: Change return type to bool.
7163 <push>: Change parameter type to bool.
7164 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
7165 to bool.
7166 (dwarf_expr_context::push_address): Likewise.
7167 (dwarf_expr_context::fetch_in_stack_memory): Change return type
7168 to bool.
7169 (dwarf_expr_context::execute_stack_op): Adjust.
7170 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
7171
1e467161
SM
71722017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7173
7174 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
7175 (struct dwarf_expr_context) <n_pieces>: Remove.
7176 <pieces>: Change type to std::vector.
7177 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7178 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
7179 pieces.
7180 (dwarf_expr_context::add_piece): Adjust.
7181 * dwarf2loc.c (struct piece_closure): Initialize fields.
7182 <n_pieces>: Remove.
7183 <pieces>: Change type to std::vector.
7184 (allocate_piece_closure): Adjust, change parameter to
7185 std::vector rvalue and std::move it to piece_closure.
7186 (rw_pieced_value): Adjust.
7187 (check_pieced_synthetic_pointer): Adjust.
7188 (indirect_synthetic_pointer): Adjust.
7189 (coerce_pieced_ref): Adjust.
7190 (free_pieced_value_closure): Adjust. Use delete to free
7191 piece_closure.
7192 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
7193 to allocate_piece_closure.
7194 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
7195
0782db84
SM
71962017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7197
7198 * probe.h (probe_ops_cp): Remove typedef.
7199 (DEF_VEC_P (probe_ops_cp)): Remove.
7200 (all_probe_ops): Change type to std::vector.
7201 * probe.c (info_probes_for_ops): Adjust to vector change.
7202 (probe_linespec_to_ops): Likewise.
7203 (all_probe_ops): Change type to std::vector.
7204 (_initialize_probe): Adjust to vector change.
7205 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
7206 * elfread.c (elf_get_probes): Likewise.
7207 * stap-probe.c (_initialize_stap_probe): Likewise.
7208
1eac6bea
SM
72092017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7210
7211 * probe.h (struct bound_probe): Define constructors.
7212 * probe.c (bound_probe_s): Remove typedef.
7213 (DEF_VEC_O (bound_probe_s)): Remove VEC.
7214 (collect_probes): Change return type to std::vector, remove
7215 cleanup.
7216 (compare_probes): Return bool, change parameter type. Change
7217 semantic to "less than".
7218 (gen_ui_out_table_header_info): Change parameter to std::vector
7219 and update.
7220 (exists_probe_with_pops): Likewise.
7221 (info_probes_for_ops): Update to std::vector change.
7222 (enable_probes_command): Likewise.
7223 (disable_probes_command): Likewise.
7224
aaa63a31
SM
72252017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7226
7227 * probe.h (struct probe_ops) <get_probes>: Change parameter from
7228 vec to std::vector.
7229 * probe.c (parse_probes_in_pspace): Update.
7230 (find_probes_in_objfile): Update.
7231 (find_probe_by_pc): Update.
7232 (collect_probes): Update.
7233 (probe_any_get_probes): Update.
7234 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
7235 return type to reference to std::vector.
7236 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
7237 std::vector and update.
7238 (dtrace_process_dof): Likewise.
7239 (dtrace_get_probes): Likewise.
7240 * elfread.c (elf_get_probes): Change return type to std::vector,
7241 store an std::vector in bfd_data.
7242 (probe_key_free): Update to std::vector.
7243 * stap-probe.c (handle_stap_probe): Change parameter to
7244 std::vector and update.
7245 (stap_get_probes): Likewise.
7246 * symfile-debug.c (debug_sym_get_probes): Change return type to
7247 std::vector and update.
7248
cb85b21b
TT
72492017-09-11 Tom Tromey <tom@tromey.com>
7250
7251 * breakpoint.c (program_breakpoint_here_p): Update.
7252 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
7253 from make_show_memory_breakpoints_cleanup. Return a
7254 scoped_restore_tmpl<int>.
7255 (restore_show_memory_breakpoints): Remove.
7256 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
7257 * mem-break.c (memory_validate_breakpoint): Update.
7258 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
7259 (ia64_memory_remove_breakpoint): Update.
7260 (ia64_breakpoint_from_pc): Update.
7261 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
7262 from make_show_memory_breakpoints_cleanup.
7263
8fbc99ef
TT
72642017-09-11 Tom Tromey <tom@tromey.com>
7265
7266 * d-namespace.c (d_lookup_symbol): Use std::string.
7267 (find_symbol_in_baseclass): Likewise.
7268
50feb4bd
TT
72692017-09-11 Tom Tromey <tom@tromey.com>
7270
7271 * ctf.c (ctf_start): Use std::string.
7272
c6dc63a1
TT
72732017-09-11 Tom Tromey <tom@tromey.com>
7274
7275 * ada-lang.c (is_known_support_routine): Update.
7276 (ada_unhandled_exception_name_addr_from_raise): Update.
7277 * guile/scm-frame.c (gdbscm_frame_name): Update.
7278 * python/py-frame.c (frapy_name): Update.
7279 (frapy_function): Update.
7280 * stack.h (find_frame_funname): Update.
7281 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
7282 (print_frame): Update.
7283
d6b9b80f
TT
72842017-09-11 Tom Tromey <tom@tromey.com>
7285
7286 * findcmd.c (put_bits): Take a gdb::byte_vector.
7287 (parse_find_args): Return gdb::byte_vector. "args" now const.
7288 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
7289 cleanups.
7290 (find_command): Update.
7291
a9921622
TT
72922017-09-11 Tom Tromey <tom@tromey.com>
7293
7294 * cli/cli-script.c (class scoped_restore_hook_in): New.
7295 (clear_hook_in_cleanup): Remove.
7296 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
7297 scoped_restore_hook_in.
7298
be0d7abb
TT
72992017-09-11 Tom Tromey <tom@tromey.com>
7300
7301 * cli/cli-script.c (restore_interp): Remove.
7302 (read_command_lines): Use scoped_restore_interp.
7303 * interps.c (scoped_restore_interp::set_temp): Rename from
7304 interp_set_temp.
7305 * interps.h (class scoped_restore_interp): New.
7306 (interp_set_temp): Remove.
7307
00f675ff
TT
73082017-09-11 Tom Tromey <tom@tromey.com>
7309
7310 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7311 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
7312 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
7313 scoped_restore.
7314 (mi_cmd_break_insert_1): Update.
7315 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
7316 scoped_restore.
7317
cb791d59
TT
73182017-09-11 Tom Tromey <tom@tromey.com>
7319
7320 * demangle.c (demangle_command): Update.
7321 * breakpoint.c (disable_command): Update.
7322 (enable_command): Update.
7323 (find_location_by_number): Make "number" const. Use
7324 get_number_trailer.
7325 * cli/cli-utils.c (extract_arg): Return std::string.
7326 * probe.c (parse_probe_linespec): Update. Change types.
7327 (collect_probes): Take string arguments.
7328 (parse_probe_linespec): Likewise.
7329 (info_probes_for_ops): Update.
7330 (enable_probes_command): Update.
7331 (disable_probes_command): Update.
7332 * break-catch-sig.c (catch_signal_split_args): Update.
7333 * mi/mi-parse.c (mi_parse): Update.
7334
2039bd9f
TT
73352017-09-11 Tom Tromey <tom@tromey.com>
7336
7337 * language.h (language_enum): Make argument const.
7338 * language.c (language_enum): Make argument const.
7339
f1735a53
TT
73402017-09-11 Tom Tromey <tom@tromey.com>
7341
7342 * common/common-utils.h (skip_to_space): Remove macro, redeclare
7343 as function.
7344 (skip_to_space): Rename from skip_to_space_const.
7345 * common/common-utils.c (skip_to_space): New function.
7346 (skip_to_space): Rename from skip_to_space_const.
7347 * cli/cli-utils.h (get_number): Rename from get_number_const.
7348 (extract_arg): Rename from extract_arg_const.
7349 * cli/cli-utils.c (get_number): Rename from get_number_const.
7350 (extract_arg): Rename from extract_arg_const.
7351 (number_or_range_parser::get_number): Use ::get_number.
7352 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
7353 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
7354 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
7355 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
7356 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
7357 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
7358 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
7359 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
7360
7d221d74
TT
73612017-09-11 Tom Tromey <tom@tromey.com>
7362
7363 * python/python.c (do_start_initialization): Use
7364 py-event-types.def to initialize types.
7365 Define all object type structures.
7366 * python/python-internal.h: Don't declare event initialization
7367 functions.
7368 * python/py-threadevent.c (thread_event_object_type): Don't
7369 define.
7370 * python/py-stopevent.c (stop_event_object_type): Don't define.
7371 * python/py-signalevent.c (signal_event_object_type): Don't
7372 declare or define.
7373 * python/py-newobjfileevent.c (new_objfile_event_object_type)
7374 (clear_objfiles_event_object_type): Don't declare or define.
7375 * python/py-infevents.c (inferior_call_pre_event_object_type)
7376 (inferior_call_post_event_object_type)
7377 (register_changed_event_object_type)
7378 (memory_changed_event_object_type): Don't declare or define.
7379 * python/py-inferior.c (new_thread_event_object_type)
7380 (new_inferior_event_object_type)
7381 (inferior_deleted_event_object_type): Don't declare or define.
7382 * python/py-exitedevent.c (exited_event_object_type): Don't
7383 declare or define.
7384 * python/py-evts.c (gdbpy_initialize_py_events): Use
7385 py-all-events.def.
7386 * python/py-events.h (thread_event_object_type): Don't declare.
7387 (events_object): Use py-all-events.def.
7388 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
7389 py-event-types.def.
7390 * python/py-event-types.def: New file.
7391 * python/py-continueevent.c (create_continue_event_object): Don't
7392 declare or define.
7393 * python/py-bpevent.c (breakpoint_event_object_type): Don't
7394 declare or define.
7395 * python/py-all-events.def: New file.
7396
35c61a1d
TT
73972017-09-11 Tom Tromey <tom@tromey.com>
7398
7399 * python/py-threadevent.c (create_thread_event_object): Return
7400 gdbpy_ref.
7401 * python/py-stopevent.h (create_stop_event_object)
7402 (create_breakpoint_event_object, create_signal_event_object):
7403 Update.
7404 * python/py-stopevent.c (create_stop_event_object): Return
7405 gdbpy_ref.
7406 (emit_stop_event): Update.
7407 * python/py-signalevent.c (create_signal_event_object): Return
7408 gdbpy_ref.
7409 * python/py-infevents.c (create_inferior_call_event_object):
7410 Update.
7411 * python/py-event.h (create_event_object)
7412 (create_thread_event_object): Update.
7413 * python/py-event.c (create_event_object): Return gdbpy_ref.
7414 * python/py-continueevent.c: Return gdbpy_ref.
7415 * python/py-bpevent.c (create_breakpoint_event_object): Return
7416 gdbpy_ref.
7417
7c96f8c1
TT
74182017-09-11 Tom Tromey <tom@tromey.com>
7419
7420 PR python/15622:
7421 * NEWS: Add entry.
7422 * python/python.c (do_start_initialization): Initialize new event
7423 types.
7424 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
7425 (gdbpy_initialize_inferior_deleted_event)
7426 (gdbpy_initialize_new_thread_event): Declare.
7427 * python/py-threadevent.c (create_thread_event_object): Add option
7428 "thread" parameter.
7429 * python/py-inferior.c (new_thread_event_object_type)
7430 (new_inferior_event_object_type)
7431 (inferior_deleted_event_object_type): Declare.
7432 (python_new_inferior, python_inferior_deleted): New functions.
7433 (add_thread_object): Emit new_thread event.
7434 (gdbpy_initialize_inferior): Attach new functions to corresponding
7435 observers.
7436 (new_thread, new_inferior, inferior_deleted): Define new event
7437 types.
7438 * python/py-evts.c (gdbpy_initialize_py_events): Add new
7439 registries.
7440 * python/py-events.h (events_object) <new_inferior,
7441 inferior_deleted, new_thread>: New fields.
7442 * python/py-event.h (create_thread_event_breakpoint): Add optional
7443 "thread" parameter.
7444
72542b8e
AB
74452017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
7446
7447 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
7448 check current_ui instead.
7449 (internal_vproblem): Likewise.
7450
0d64823e
SM
74512017-09-09 Simon Marchi <simon.marchi@ericsson.com>
7452
7453 * thread.c (print_thread_info_1): Remove unnecessary calls to
7454 uiout->is_mi_like_p.
7455
eb1e02fd
TT
74562017-09-09 Tom Tromey <tom@tromey.com>
7457
7458 * namespace.h (add_using_directive): Update.
7459 * namespace.c (add_using_directive): Change type of excludes to
7460 std::vector.
7461 * dwarf2read.c (read_import_statement): Use std::vector.
7462 (read_namespace): Update.
7463 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
7464
0fc21fd8
TT
74652017-09-09 Tom Tromey <tom@tromey.com>
7466
7467 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
7468
49663d05
TT
74692017-09-09 Tom Tromey <tom@tromey.com>
7470
7471 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
7472
0b868b60
TT
74732017-09-09 Tom Tromey <tom@tromey.com>
7474
7475 * stack.c (func_command): Use gdb::def_vector.
7476
c0470d48
TT
74772017-09-09 Tom Tromey <tom@tromey.com>
7478
7479 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
7480 ui_out_emit_list, ui_out_emit_tuple.
7481 (mi_cmd_var_update): Likewise.
7482
ca5909c7
TT
74832017-09-09 Tom Tromey <tom@tromey.com>
7484
7485 * mi/mi-interp.c (mi_user_selected_context_changed): Use
7486 ui_out_redirect_pop.
7487 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7488 ui_out_redirect_pop.
7489 * utils.c (do_ui_out_redirect_pop)
7490 (make_cleanup_ui_out_redirect_pop): Remove.
7491 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
7492 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
7493 * ui-out.h (ui_out_redirect_pop): New class.
7494
e6a2252a
TT
74952017-09-09 Tom Tromey <tom@tromey.com>
7496
7497 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
7498 (list_available_thread_groups, mi_cmd_list_thread_groups)
7499 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
7500 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
7501 Likewise.
7502
393702cd
TT
75032017-09-09 Tom Tromey <tom@tromey.com>
7504
7505 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
7506 ui_out_emit_tuple.
7507
76f9c9cf
TT
75082017-09-09 Tom Tromey <tom@tromey.com>
7509
7510 * target.c (flash_erase_command): Use ui_out_emit_tuple.
7511 * stack.c (print_frame): Use ui_out_emit_tuple.
7512 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
7513 (info_spu_mailbox_command, info_spu_dma_command)
7514 (info_spu_proxydma_command): Likewise.
7515 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
7516 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
7517 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7518 ui_out_emit_tuple.
7519 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
7520
dc9fe180
TT
75212017-09-09 Tom Tromey <tom@tromey.com>
7522
7523 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
7524 (class ui_out_emit_table): Update comment.
7525 * ui-out.c (do_cleanup_table_end)
7526 (make_cleanup_ui_out_table_begin_end): Remove.
7527 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
7528 (info_spu_dma_cmdlist): Likewise.
7529 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
7530 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
7531 ui_out_emit_table.
7532
f8cc3da6
TT
75332017-09-09 Tom Tromey <tom@tromey.com>
7534
7535 * thread.c (print_thread_info_1): Use ui_out_emit_table,
7536 ui_out_emit_list, gdb::optional.
7537
481695ed
JB
75382017-09-09 John Baldwin <jhb@FreeBSD.org>
7539
7540 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
7541 prototype.
7542 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
7543 prototype.
7544 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
7545 prototype.
7546 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
7547 * ada-exp.y: Remove _initialize_ada_exp prototype.
7548 * ada-lang.c: Remove _initialize_ada_language prototype.
7549 * ada-tasks.c: Remove _initialize_tasks prototype.
7550 * addrmap.c: Remove _initialize_addrmap prototype.
7551 * agent.c: Remove _initialize_agent prototype.
7552 * aix-thread.c: Remove _initialize_aix_thread prototype.
7553 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
7554 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
7555 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
7556 prototype.
7557 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
7558 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
7559 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
7560 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
7561 prototype.
7562 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
7563 prototype.
7564 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
7565 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
7566 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
7567 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
7568 prototype.
7569 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
7570 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
7571 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
7572 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
7573 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7574 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
7575 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
7576 prototype.
7577 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
7578 prototype.
7579 * annotate.c: Remove _initialize_annotate prototype.
7580 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
7581 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
7582 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
7583 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
7584 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
7585 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
7586 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
7587 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
7588 prototype.
7589 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
7590 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
7591 * auto-load.c: Remove _initialize_auto_load prototype.
7592 * auxv.c: Remove _initialize_auxv prototype.
7593 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
7594 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
7595 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
7596 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
7597 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
7598 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
7599 prototype.
7600 * break-catch-throw.c: Remove _initialize_break_catch_throw
7601 prototype.
7602 * breakpoint.c: Remove _initialize_breakpoint prototype.
7603 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
7604 * btrace.c: Remove _initialize_btrace prototype.
7605 * charset.c: Remove _initialize_charset prototype.
7606 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
7607 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
7608 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
7609 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
7610 * cli/cli-script.c: Remove _initialize_cli_script prototype.
7611 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
7612 * coffread.c: Remove _initialize_coffread prototype.
7613 * compile/compile.c: Remove _initialize_compile prototype.
7614 * complaints.c: Remove _initialize_complaints prototype.
7615 * completer.c: Remove _initialize_completer prototype.
7616 * copying.awk: Remove _initialize_copying prototype.
7617 * copying.c: Regenerate.
7618 * core-regset.c: Remove _initialize_core_regset prototype.
7619 * corefile.c: Remove _initialize_core prototype.
7620 * corelow.c: Remove _initialize_corelow prototype.
7621 * cp-abi.c: Remove _initialize_cp_abi prototype.
7622 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
7623 * cp-support.c: Remove _initialize_cp_support prototype.
7624 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
7625 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
7626 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
7627 * ctf.c: Remove _initialize_ctf prototype.
7628 * d-lang.c: Remove _initialize_d_language prototype.
7629 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
7630 prototype.
7631 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
7632 * dbxread.c: Remove _initialize_dbxread prototype.
7633 * dcache.c: Remove _initialize_dcache prototype.
7634 * demangle.c: Remove _initialize_demangler prototype.
7635 * disasm-selftests.c: Remove _initialize_disasm_selftests
7636 prototype.
7637 * disasm.c: Remove _initialize_disasm prototype.
7638 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
7639 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
7640 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
7641 prototype.
7642 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
7643 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
7644 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
7645 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
7646 * elfread.c: Remove _initialize_elfread prototype.
7647 * exec.c: Remove _initialize_exec prototype.
7648 * extension.c: Remove _initialize_extension prototype.
7649 * f-lang.c: Remove _initialize_f_language prototype.
7650 * f-valprint.c: Remove _initialize_f_valprint prototype.
7651 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
7652 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
7653 * filesystem.c: Remove _initialize_filesystem prototype.
7654 * findcmd.c: Remove _initialize_mem_search prototype.
7655 * fork-child.c: Remove _initialize_fork_child prototype.
7656 * frame-base.c: Remove _initialize_frame_base prototype.
7657 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
7658 * frame.c: Remove _initialize_frame prototype.
7659 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
7660 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
7661 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
7662 * gcore.c: Remove _initialize_gcore prototype.
7663 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
7664 * gdbarch.c: Regenerate.
7665 * gdbarch.sh: Remove _initialize_gdbarch prototype.
7666 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
7667 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
7668 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
7669 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
7670 * go-lang.c: Remove _initialize_go_language prototype.
7671 * go32-nat.c: Remove _initialize_go32_nat prototype.
7672 * guile/guile.c: Remove _initialize_guile prototype.
7673 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
7674 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
7675 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
7676 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
7677 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
7678 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
7679 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
7680 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
7681 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
7682 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
7683 prototype.
7684 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
7685 prototype.
7686 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
7687 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
7688 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
7689 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
7690 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
7691 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
7692 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
7693 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
7694 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
7695 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
7696 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
7697 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
7698 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
7699 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7700 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
7701 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
7702 prototype.
7703 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
7704 prototype.
7705 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
7706 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
7707 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
7708 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
7709 * infcall.c: Remove _initialize_infcall prototype.
7710 * infcmd.c: Remove _initialize_infcmd prototype.
7711 * inferior.c: Remove _initialize_inferiors prototype.
7712 * inflow.c: Remove _initialize_inflow prototype.
7713 * infrun.c: Remove _initialize_infrun prototype.
7714 * interps.c: Remove _initialize_interpreter prototype.
7715 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
7716 * jit.c: Remove _initialize_jit prototype.
7717 * language.c: Remove _initialize_language prototype.
7718 * linux-fork.c: Remove _initialize_linux_fork prototype.
7719 * linux-nat.c: Remove _initialize_linux_nat prototype.
7720 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
7721 * linux-thread-db.c: Remove _initialize_thread_db prototype.
7722 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
7723 * m2-lang.c: Remove _initialize_m2_language prototype.
7724 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
7725 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
7726 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
7727 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
7728 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
7729 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7730 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7731 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
7732 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
7733 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
7734 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7735 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7736 * machoread.c: Remove _initialize_machoread prototype.
7737 * macrocmd.c: Remove _initialize_macrocmd prototype.
7738 * macroscope.c: Remove _initialize_macroscope prototype.
7739 * maint.c: Remove _initialize_maint_cmds prototype.
7740 * mdebugread.c: Remove _initialize_mdebugread prototype.
7741 * memattr.c: Remove _initialize_mem prototype.
7742 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
7743 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
7744 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
7745 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
7746 * mi/mi-main.c: Remove _initialize_mi_main prototype.
7747 * microblaze-linux-tdep.c: Remove
7748 _initialize_microblaze_linux_tdep prototype.
7749 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
7750 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
7751 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
7752 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
7753 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
7754 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
7755 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
7756 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
7757 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
7758 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
7759 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
7760 prototype.
7761 * mipsread.c: Remove _initialize_mipsread prototype.
7762 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
7763 prototype.
7764 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
7765 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
7766 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
7767 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
7768 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
7769 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
7770 prototype.
7771 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
7772 * nto-procfs.c: Remove _initialize_procfs prototype.
7773 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
7774 * objc-lang.c: Remove _initialize_objc_language prototype.
7775 * objfiles.c: Remove _initialize_objfiles prototype.
7776 * observer.c: Remove observer_test_first_notification_function,
7777 observer_test_second_notification_function,
7778 observer_test_third_notification_function, and
7779 _initialize_observer prototypes.
7780 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
7781 * osabi.c: Remove _initialize_gdb_osabi prototype.
7782 * osdata.c: Remove _initialize_osdata prototype.
7783 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
7784 * parse.c: Remove _initialize_parse prototype.
7785 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
7786 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
7787 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
7788 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
7789 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
7790 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
7791 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
7792 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
7793 * printcmd.c: Remove _initialize_printcmd prototype.
7794 * probe.c: Remove _initialize_probe prototype.
7795 * proc-api.c: Remove _initialize_proc_api prototype.
7796 * proc-events.c: Remove _initialize_proc_events prototype.
7797 * proc-service.c: Remove _initialize_proc_service prototype.
7798 * procfs.c: Remove _initialize_procfs prototype.
7799 * psymtab.c: Remove _initialize_psymtab prototype.
7800 * python/python.c: Remove _initialize_python prototype.
7801 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
7802 * record-btrace.c: Remove _initialize_record_btrace prototype.
7803 * record-full.c: Remove _initialize_record_full prototype.
7804 * record.c: Remove _initialize_record prototype.
7805 * regcache.c: Remove _initialize_regcache prototype.
7806 * reggroups.c: Remove _initialize_reggroup prototype.
7807 * remote-notif.c: Remove _initialize_notif prototype.
7808 * remote-sim.c: Remove _initialize_remote_sim prototype.
7809 * remote.c: Remove _initialize_remote prototype.
7810 * reverse.c: Remove _initialize_reverse prototype.
7811 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
7812 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
7813 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
7814 prototype.
7815 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
7816 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
7817 * rust-exp.y: Remove _initialize_rust_exp prototype.
7818 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
7819 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
7820 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
7821 * score-tdep.c: Remove _initialize_score_tdep prototype.
7822 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
7823 prototype.
7824 * ser-go32.c: Remove _initialize_ser_dos prototype.
7825 * ser-mingw.c: Remove _initialize_ser_windows prototype.
7826 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
7827 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
7828 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
7829 * serial.c: Remove _initialize_serial prototype.
7830 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
7831 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
7832 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
7833 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
7834 * skip.c: Remove _initialize_step_skip prototype.
7835 * sol-thread.c: Remove _initialize_sol_thread prototype.
7836 * solib-aix.c: Remove _initialize_solib_aix prototype.
7837 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
7838 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
7839 * solib-frv.c: Remove _initialize_frv_solib prototype.
7840 * solib-spu.c: Remove _initialize_spu_solib prototype.
7841 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
7842 * solib-target.c: Remove _initialize_solib_target prototype.
7843 * solib.c: Remove _initialize_solib prototype.
7844 * source.c: Remove _initialize_source prototype.
7845 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
7846 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
7847 prototype.
7848 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
7849 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
7850 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
7851 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
7852 prototype.
7853 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
7854 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
7855 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
7856 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
7857 prototype.
7858 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
7859 prototype.
7860 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
7861 prototype.
7862 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
7863 prototype.
7864 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
7865 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
7866 prototype.
7867 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
7868 prototype.
7869 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
7870 prototype.
7871 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
7872 prototype.
7873 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
7874 prototype.
7875 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
7876 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
7877 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
7878 * stabsread.c: Remove _initialize_stabsread prototype.
7879 * stack.c: Remove _initialize_stack prototype.
7880 * stap-probe.c: Remove _initialize_stap_probe prototype.
7881 * std-regs.c: Remove _initialize_frame_reg prototype.
7882 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
7883 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
7884 * symfile.c: Remove _initialize_symfile prototype.
7885 * symmisc.c: Remove _initialize_symmisc prototype.
7886 * symtab.c: Remove _initialize_symtab prototype.
7887 * target-dcache.c: Remove _initialize_target_dcache prototype.
7888 * target-descriptions.c: Remove _initialize_target_descriptions
7889 prototype.
7890 * thread.c: Remove _initialize_thread prototype.
7891 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
7892 prototype.
7893 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
7894 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
7895 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
7896 prototype.
7897 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
7898 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
7899 * tracefile.c: Remove _initialize_tracefile prototype.
7900 * tracepoint.c: Remove _initialize_tracepoint prototype.
7901 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
7902 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
7903 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
7904 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
7905 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
7906 * tui/tui-win.c: Remove _initialize_tui_win prototype.
7907 * tui/tui.c: Remove _initialize_tui prototype.
7908 * typeprint.c: Remove _initialize_typeprint prototype.
7909 * user-regs.c: Remove _initialize_user_regs prototype.
7910 * utils.c: Remove _initialize_utils prototype.
7911 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
7912 * valarith.c: Remove _initialize_valarith prototype.
7913 * valops.c: Remove _initialize_valops prototype.
7914 * valprint.c: Remove _initialize_valprint prototype.
7915 * value.c: Remove _initialize_values prototype.
7916 * varobj.c: Remove _initialize_varobj prototype.
7917 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
7918 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
7919 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
7920 * windows-nat.c: Remove _initialize_windows_nat,
7921 _initialize_check_for_gdb_ini, and _initialize_loadable
7922 prototypes.
7923 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
7924 * xcoffread.c: Remove _initialize_xcoffread prototype.
7925 * xml-support.c: Remove _initialize_xml_support prototype.
7926 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
7927 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
7928 prototype.
7929 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
7930 prototype.
7931 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
7932
a611b5cb
KS
79332017-09-08 Keith Seitz <keiths@redhat.com>
7934
7935 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
7936 field.
7937
469412dd
CW
79382017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
7939
7940 * f-valprint.c (f_val_print): Remove check for one byte
7941 sized integers. Remove printing of character type.
7942
a5ad232b
FP
79432017-09-08 Frank Penczek <frank.penczek@intel.com>
7944 Christoph Weinmann <christoph.t.weinmann@intel.com>
7945 Bernhard Heckel <bernhard.heckel@intel.com>
7946
7947 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
7948 to maintain proper indentation when printing pointers/refs.
7949
e5014227
JB
79502017-09-07 Joel Brobecker <brobecker@adacore.com>
7951
7952 GDB 8.0.1 released.
7953
63c99141
JB
79542017-09-07 Joel Brobecker <brobecker@adacore.com>
7955
7956 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
7957
69c1e056
TT
79582017-09-05 Tom Tromey <tom@tromey.com>
7959
7960 * parse.c (funcall_chain): Now a std::vector.
7961 (start_arglist, end_arglist): Simplify.
7962 (free_funcalls): Remove.
7963 (parse_exp_in_context_1): Remove cleanup.
7964
fef704bf
TT
79652017-09-05 Tom Tromey <tom@tromey.com>
7966
7967 * go-exp.y (go_parse): Don't create a cleanup.
7968
5613c585
TT
79692017-09-05 Tom Tromey <tom@tromey.com>
7970
7971 * d-exp.y (PrimaryExpression): Use std::string.
7972 (d_parse): Don't create a cleanup.
7973
eae49211
TT
79742017-09-05 Tom Tromey <tom@tromey.com>
7975
7976 * utils.c (do_clear_parser_state): Remove.
7977 (make_cleanup_clear_parser_state): Remove.
7978 * p-exp.y (pascal_parse): Use scoped_restore.
7979 * m2-exp.y (m2_parse): Use scoped_restore.
7980 * f-exp.y (f_parse): Use scoped_restore.
7981 * d-exp.y (d_parse): Use scoped_restore.
7982 * c-exp.y (c_parse): Use scoped_restore.
7983 * ada-exp.y (ada_parse): Use scoped_restore.
7984 * utils.h (make_cleanup_clear_parser_state): Remove.
7985
73b9be8b
KS
79862017-09-06 Keith Seitz <keiths@redhat.com>
7987
7988 * dwarf2read.c (dw2_linkage_name_attr): New function.
7989 (dw2_linkage_name): New function.
7990 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
7991 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
7992 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
7993
a102602b
KR
79942017-09-06 Kamil Rytarowski <n54@gmx.com>
7995
7996 * config/djgpp/djconfig.sh: Correct shell portability issue.
7997
28ad437d
KR
79982017-09-06 Kamil Rytarowski <n54@gmx.com>
7999
8000 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
8001
351787dd
JB
80022017-09-06 John Baldwin <jhb@FreeBSD.org>
8003
8004 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
8005 * NEWS: Mention new FreeBSD/mips native configuration.
8006 * configure.host: Add aarch64*-*-freebsd*.
8007 * configure.nat: Likewise.
8008 * aarch64-fbsd-nat.c: New file.
8009
c0f84956
JB
80102017-09-06 John Baldwin <jhb@FreeBSD.org>
8011
8012 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
8013 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
8014 * NEWS: Mention new FreeBSD/aarch64 target.
8015 * configure.tgt: Add aarch64*-*-freebsd*.
8016 * aarch64-fbsd-tdep.c: New file.
8017 * aarch64-fbsd-tdep.h: New file.
8018
7610297a
KR
80192017-09-06 Kamil Rytarowski <n54@gmx.com>
8020
8021 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
8022
fbd1b771
JK
80232017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8024
8025 * parse.c (find_minsym_type_and_address): Don't relocate addresses
8026 of TLS symbols.
8027
5ca79eae
PW
80282017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8029
8030 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
8031 call.
8032
bf93d7ba
SM
80332017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8034
8035 * infrun.c (follow_exec): Call add_thread after
8036 target_find_description.
8037
1bb7c059
SM
80382017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8039
8040 * infrun.c (handle_inferior_event_1): When exec'ing, read
8041 stop_pc after follow_exec.
8042
fc809827
SM
80432017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8044
8045 * remote.c (process_g_packet): Update error message.
8046
d2fcdd85
YQ
80472017-09-05 Yao Qi <yao.qi@linaro.org>
8048
8049 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
8050 targets.
8051
e69570ee
PA
80522017-09-05 Pedro Alves <palves@redhat.com>
8053
8054 * eval.c (eval_call, evaluate_funcall): New functions, factored
8055 out from ...
8056 (evaluate_subexp_standard): ... this.
8057
22916b07
YQ
80582017-09-05 Yao Qi <yao.qi@linaro.org>
8059
8060 * amd64-tdep.c (amd64_target_description): Create target
8061 descriptions.
8062 (_initialize_amd64_tdep): Don't call functions
8063 initialize_tdesc_amd64_*. Add self tests.
8064 * arch/amd64.c (amd64_create_target_description): Add parameter
8065 is_linux. Call set_tdesc_osabi if is_linux is true.
8066 * arch/amd64.h (amd64_create_target_description): Update the
8067 declaration.
8068 * arch/i386.c (i386_create_target_description): Add parameter
8069 is_linux. Call set_tdesc_osabi if is_linux is true.
8070 * arch/i386.h (i386_create_target_description): Update
8071 declaration.
8072 * configure.tgt: Add i386.o to gdb_target_obs.
8073 * features/Makefile (XMLTOC): Remove i386/*.xml.
8074 * features/i386/amd64-avx-avx512.c: Remove.
8075 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
8076 * features/i386/amd64-avx-mpx.c: Remove.
8077 * features/i386/amd64-avx.c: Remove.
8078 * features/i386/amd64-mpx.c: Remove.
8079 * features/i386/amd64.c: Remove.
8080 * features/i386/i386-avx-avx512.c: Remove.
8081 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
8082 * features/i386/i386-avx-mpx.c: Remove.
8083 * features/i386/i386-avx.c: Remove.
8084 * features/i386/i386-mmx.c: Remove.
8085 * features/i386/i386-mpx.c: Remove.
8086 * features/i386/i386.c: Remove.
8087 * i386-tdep.c: Don't include features/i386/i386*.c., include
8088 target-descriptions.h and arch/i386.h.
8089 (i386_target_description): Create target descriptions.
8090 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
8091 functions. Do self tests.
8092
0854b7b1
YQ
80932017-09-05 Yao Qi <yao.qi@linaro.org>
8094
8095 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
8096 * features/i386/amd64-avx-avx512-linux.c: Removed.
8097 * features/i386/amd64-avx-linux.c: Removed.
8098 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
8099 * features/i386/amd64-avx-mpx-linux.c: Removed.
8100 * features/i386/amd64-linux.c: Removed.
8101 * features/i386/amd64-mpx-linux.c: Removed.
8102 * features/i386/x32-avx-avx512-linux.c: Removed.
8103 * features/i386/x32-avx-linux.c: Removed.
8104 * features/i386/x32-linux.c: Removed.
8105
b4570e4b
YQ
81062017-09-05 Yao Qi <yao.qi@linaro.org>
8107
8108 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
8109 features/i386/*.c.
8110 (amd64_linux_read_description): Call
8111 amd64_create_target_description.
8112 * arch/amd64.c: New file.
8113 * arch/amd64.h: New file.
8114 * configure.tgt (x86_64-*-linux*): Append amd64.o.
8115 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
8116
6c73f67f
YQ
81172017-09-05 Yao Qi <yao.qi@linaro.org>
8118
8119 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
8120 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
8121 (amd64_linux_read_description): Create target descriptions.
8122 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
8123 functions. Add unit tests.
8124 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
8125 x32-core.xml.
8126 * features/i386/64bit-avx.c: Generated.
8127 * features/i386/64bit-avx512.c: Generated.
8128 * features/i386/64bit-core.c: Generated.
8129 * features/i386/64bit-linux.c: Generated.
8130 * features/i386/64bit-mpx.c: Generated.
8131 * features/i386/64bit-pkeys.c: Generated.
8132 * features/i386/64bit-segments.c: Generated.
8133 * features/i386/64bit-sse.c: Generated.
8134 * features/i386/x32-core.c: Generated.
8135 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
8136 c files for amd64-linux and x32-linux.
8137
9d3d478b
YQ
81382017-09-05 Yao Qi <yao.qi@linaro.org>
8139
8140 * amd64-linux-tdep.c (amd64_linux_read_description): New
8141 function.
8142 (amd64_linux_core_read_description): Call
8143 amd64_linux_read_description.
8144 (amd64_linux_init_abi): Likewise.
8145 (amd64_x32_linux_init_abi): Likewise.
8146 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
8147 * x86-linux-nat.c (x86_linux_read_description): Call
8148 amd64_linux_read_description.
8149
b9f1d50f
YQ
81502017-09-05 Yao Qi <yao.qi@linaro.org>
8151
8152 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
8153 comments.
8154
188c9e6d
YQ
81552017-09-05 Yao Qi <yao.qi@linaro.org>
8156
8157 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
8158 * features/i386/i386-avx-avx512-linux.c: Remove.
8159 * features/i386/i386-avx-linux.c: Remove.
8160 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
8161 * features/i386/i386-avx-mpx-linux.c: Remove.
8162 * features/i386/i386-linux.c: Remove.
8163 * features/i386/i386-mmx-linux.c: Remove.
8164 * features/i386/i386-mpx-linux.c: Remove.
8165
5f035c07
YQ
81662017-09-05 Yao Qi <yao.qi@linaro.org>
8167
8168 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
8169 (SFILES): Add arch/i386.c.
8170 (HFILES_NO_SRCDIR): Add arch/i386.h.
8171 * arch/i386.c: New file.
8172 * arch/i386.h: New file.
8173 * arch/tdesc.h (allocate_target_description): Declare.
8174 (set_tdesc_architecture): Declare.
8175 (set_tdesc_osabi): Declare.
8176 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
8177 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
8178 include arch/i386.h.
8179 (i386_linux_read_description): Remove code and call
8180 i386_create_target_description.
8181 (set_tdesc_architecture): New function.
8182 (set_tdesc_osabi): New function.
8183 * target-descriptions.h (allocate_target_description): Remove.
8184
0abe8a89
YQ
81852017-09-05 Yao Qi <yao.qi@linaro.org>
8186
8187 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
8188 * target-descriptions.c (tdesc_create_feature): Likewise, and
8189 adjust code.
8190 * features/i386/32bit-avx.c: Re-generated.
8191 * features/i386/32bit-avx512.c: Re-generated.
8192 * features/i386/32bit-core.c: Re-generated.
8193 * features/i386/32bit-linux.c: Re-generated.
8194 * features/i386/32bit-mpx.c: Re-generated.
8195 * features/i386/32bit-pkeys.c: Re-generated.
8196 * features/i386/32bit-sse.c: Re-generated.
8197
0a188386
YQ
81982017-09-05 Yao Qi <yao.qi@linaro.org>
8199
8200 * regformats/regdef.h (struct reg): Override operator == and !=.
8201
f49ff000
YQ
82022017-09-05 Yao Qi <yao.qi@linaro.org>
8203
8204 * arch/tdesc.h: New file.
8205 * regformats/regdat.sh: Generate code using tdesc_create_reg.
8206 * target-descriptions.c: Update comments.
8207 * target-descriptions.h: Include "arch/tdesc.h". Remove the
8208 declarations.
8209 * features/i386/32bit-avx.c: Re-generated.
8210 * features/i386/32bit-avx512.c: Re-generated.
8211 * features/i386/32bit-core.c: Re-generated.
8212 * features/i386/32bit-linux.c: Re-generated.
8213 * features/i386/32bit-mpx.c: Re-generated.
8214 * features/i386/32bit-pkeys.c: Re-generated.
8215 * features/i386/32bit-sse.c: Re-generated.
8216
f7000548
YQ
82172017-09-05 Yao Qi <yao.qi@linaro.org>
8218
8219 * regformats/regdat.sh: Update generated code.
8220
c9a5e2a5
YQ
82212017-09-05 Yao Qi <yao.qi@linaro.org>
8222
8223 * regformats/regdat.sh: Adjust code order.
8224
d6b687ac
SM
82252017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8226
8227 * expprint.c (dump_subexp_body_standard): Use constant format
8228 string in fprintf_filtered call.
8229
a379bfd0
JB
82302017-09-04 John Baldwin <jhb@FreeBSD.org>
8231
8232 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
8233 NetBSD/i386.
8234 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
8235
f7efc967
JB
82362017-09-04 John Baldwin <jhb@FreeBSD.org>
8237
8238 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
8239
c49fbc6c
JB
82402017-09-04 John Baldwin <jhb@FreeBSD.org>
8241
8242 * bsd-kvm.o: Define _KMEMUSER.
8243 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
8244 * configure: Regenerate.
8245
26562e73
JB
82462017-09-04 John Baldwin <jhb@FreeBSD.org>
8247
8248 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
8249 * i386-fbsd-nat.c: Likewise.
8250
31cf1487
JB
82512017-09-04 John Baldwin <jhb@FreeBSD.org>
8252
8253 * unittests/array-view-selftests.c: Add include of <array>.
8254
5b9f8a7c
JB
82552017-09-04 John Baldwin <jhb@FreeBSD.org>
8256
8257 * spu-tdep.c (flush_ea_cache): Add missing argument to
8258 call_function_by_hand.
8259
d69cf9b2
PA
82602017-09-04 Pedro Alves <palves@redhat.com>
8261
8262 * NEWS (Safer support for debugging with no debug info): New.
8263
3693fdb3
PA
82642017-09-04 Pedro Alves <palves@redhat.com>
8265
8266 * c-exp.y (function_method, function_method_void): Add current
8267 instance flags to TYPE_INSTANCE.
8268 * dwarf2read.c (check_modifier): New.
8269 (compute_delayed_physnames): Assert that only C++ adds delayed
8270 physnames. Mark fn_fields as const/volatile depending on
8271 physname.
8272 * eval.c (make_params): New type_instance_flags parameter. Use
8273 it as the new type's instance flags.
8274 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
8275 flags element and pass it to make_params.
8276 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
8277 instance flags element.
8278 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
8279 * gdbtypes.h: Include "enum-flags.h".
8280 (type_instance_flags): New enum-flags type.
8281 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
8282 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
8283 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
8284 (follow_type_instance_flags): New function.
8285 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
8286 * parser-defs.h (follow_type_instance_flags): Declare.
8287 * valops.c (value_struct_elt_for_reference): const/volatile must
8288 match too.
8289
e68cb8e0
PA
82902017-09-04 Pedro Alves <palves@redhat.com>
8291
8292 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
8293 function/method scopes; lookup the nested name as a function local
8294 static variable.
8295
858be34c
PA
82962017-09-04 Pedro Alves <palves@redhat.com>
8297
8298 (%type <voidval>): Add function_method.
8299 * c-exp.y (exp): New production for calls with no arguments.
8300 (function_method, function_method_void_or_typelist): New
8301 productions.
8302 (exp): New production for "method()::static_var".
8303 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
8304 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8305 Handle OP_FUNC_STATIC_VAR.
8306 * parse.c (operator_length_standard):
8307 Handle OP_FUNC_STATIC_VAR.
8308
dd5901a6
PA
83092017-09-04 Pedro Alves <palves@redhat.com>
8310
8311 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
8312 handling.
8313 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8314 Ditto.
8315 * parse.c (operator_length_standard, operator_check_standard):
8316 Ditto.
8317 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
8318
46a4882b
PA
83192017-09-04 Pedro Alves <palves@redhat.com>
8320
8321 * ax-gdb.c: Include "typeprint.h".
8322 (gen_expr_for_cast): New function.
8323 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
8324 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
8325 type is unknown.
8326 * dwarf2read.c (new_symbol_full): Fallback to int instead of
8327 nodebug_data_symbol.
8328 * eval.c: Include "typeprint.h".
8329 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
8330 Error out if symbol has unknown type.
8331 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
8332 evaluate_subexp_for_cast.
8333 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
8334 OP_VAR_MSYM_VALUE.
8335 (evaluate_subexp_for_cast): New function.
8336 * gdbtypes.c (init_nodebug_var_type): New function.
8337 (objfile_type): Use it to initialize types of variables with no
8338 debug info.
8339 * typeprint.c (error_unknown_type): New.
8340 * typeprint.h (error_unknown_type): New declaration.
8341 * compile/compile-c-types.c (convert_type_basic): Handle
8342 TYPE_CODE_ERROR; warn and fallback to int for variables with
8343 unknown type.
8344
fe13dfec
PA
83452017-09-04 Pedro Alves <palves@redhat.com>
8346
8347 * eval.c (evaluate_var_value): New function, factored out from ...
8348 (evaluate_subexp_standard): ... here.
8349
d008ee21
PA
83502017-09-04 Pedro Alves <palves@redhat.com>
8351
8352 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
8353 Remove useless assignments to 'op'.
8354
827d0c51
PA
83552017-09-04 Pedro Alves <palves@redhat.com>
8356
8357 * eval.c (eval_skip_value): New function.
8358 (evaluate_subexp_standard): Use it.
8359
2c5a2be1
PA
83602017-09-04 Pedro Alves <palves@redhat.com>
8361
8362 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
8363 function name from symbol/minsym and pass it to
8364 error_call_unknown_return_type.
8365
74ea4be4
PA
83662017-09-04 Pedro Alves <palves@redhat.com>
8367
8368 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
8369 * ax-gdb.c (gen_msym_var_ref): New function.
8370 (gen_expr): Handle OP_VAR_MSYM_VALUE.
8371 * eval.c (evaluate_var_msym_value): New function.
8372 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
8373 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
8374 to call_function_by_hand.
8375 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8376 Handle OP_VAR_MSYM_VALUE.
8377 (union exp_element) <msymbol>: New field.
8378 * minsyms.h (struct type): Forward declare.
8379 (find_minsym_type_and_address): Declare.
8380 * parse.c (write_exp_elt_msym): New function.
8381 (write_exp_msymbol): Delete, refactored as ...
8382 (find_minsym_type_and_address): ... this new function.
8383 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
8384 (operator_length_standard, operator_check_standard): Handle
8385 OP_VAR_MSYM_VALUE.
8386 * std-operator.def (OP_VAR_MSYM_VALUE): New.
8387
7022349d
PA
83882017-09-04 Pedro Alves <palves@redhat.com>
8389
8390 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
8391 TYPE_GNU_IFUNC specially here. Throw error if return type is
8392 unknown.
8393 * ada-typeprint.c (print_func_type): Handle functions with unknown
8394 return type.
8395 * c-typeprint.c (c_type_print_base): Handle functions and methods
8396 with unknown return type.
8397 * compile/compile-c-symbols.c (convert_symbol_bmsym)
8398 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
8399 * compile/compile-c-types.c: Include "objfiles.h".
8400 (convert_func): For functions with unknown return type, warn and
8401 default to int.
8402 * compile/compile-object-run.c (compile_object_run): Adjust call
8403 to call_function_by_hand_dummy.
8404 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
8405 call_function_by_hand.
8406 * eval.c (evaluate_subexp_standard): Adjust calls to
8407 call_function_by_hand. Handle functions and methods with unknown
8408 return type. Pass expect_type to call_function_by_hand.
8409 * f-typeprint.c (f_type_print_base): Handle functions with unknown
8410 return type.
8411 * gcore.c (call_target_sbrk): Adjust call to
8412 call_function_by_hand.
8413 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
8414 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
8415 an integer address type instead of nodebug.
8416 * guile/scm-value.c (gdbscm_value_call): Adjust call to
8417 call_function_by_hand.
8418 * infcall.c (error_call_unknown_return_type): New function.
8419 (call_function_by_hand): New "default_return_type" parameter.
8420 Pass it down.
8421 (call_function_by_hand_dummy): New "default_return_type"
8422 parameter. Use it instead of defaulting to int. If there's no
8423 default and the return type is unknown, throw an error. If
8424 there's a default return type, and the called function has no
8425 debug info, then assume the function is prototyped.
8426 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
8427 New "default_return_type" parameter.
8428 (error_call_unknown_return_type): New declaration.
8429 * linux-fork.c (call_lseek): Cast return type of lseek.
8430 (inferior_call_waitpid, checkpoint_command): Adjust calls to
8431 call_function_by_hand.
8432 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
8433 calls to call_function_by_hand.
8434 * m2-typeprint.c (m2_procedure): Handle functions with unknown
8435 return type.
8436 * objc-lang.c (lookup_objc_class, lookup_child_selector)
8437 (value_nsstring, print_object_command): Adjust calls to
8438 call_function_by_hand.
8439 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
8440 functions with unknown return type.
8441 (pascal_type_print_func_varspec_suffix): New function.
8442 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
8443 TYPE_CODE_METHOD>: Use it.
8444 * python/py-value.c (valpy_call): Adjust call to
8445 call_function_by_hand.
8446 * rust-lang.c (rust_evaluate_funcall): Adjust call to
8447 call_function_by_hand.
8448 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
8449 call_function_by_hand.
8450 * valops.c (value_allocate_space_in_inferior): Adjust call to
8451 call_function_by_hand.
8452 * typeprint.c (type_print_unknown_return_type): New function.
8453 * typeprint.h (type_print_unknown_return_type): New declaration.
8454
54990598
PA
84552017-09-04 Pedro Alves <palves@redhat.com>
8456
8457 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
8458 types with more than one parameter as prototyped.
8459
9a24775b
PA
84602017-09-04 Pedro Alves <palves@redhat.com>
8461
8462 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
8463 (disassemble_command): Use gdb_disassembly_flags instead of bare
8464 int.
8465 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
8466 (dump_insns, do_mixed_source_and_assembly_deprecated)
8467 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
8468 Use gdb_disassembly_flags instead of bare int.
8469 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
8470 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
8471 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
8472 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
8473 (enum gdb_disassembly_flag): ... values of this new enumeration.
8474 (gdb_disassembly_flags): Define.
8475 (gdb_disassembly)
8476 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
8477 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
8478 gdb_disassembly_flags instead of bare int.
8479 * record-btrace.c (btrace_insn_history)
8480 (record_btrace_insn_history, record_btrace_insn_history_range)
8481 (record_btrace_insn_history_from): Use gdb_disassembly_flags
8482 instead of bare int.
8483 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
8484 Use gdb_disassembly_flags instead of bare int.
8485 * target-debug.h (target_debug_print_gdb_disassembly_flags):
8486 Define.
8487 * target-delegates.c: Regenerate.
8488 * target.c (target_insn_history, target_insn_history_from)
8489 (target_insn_history_range): Use gdb_disassembly_flags instead of
8490 bare int.
8491 * target.h: Include "disasm.h".
8492 (struct target_ops) <to_insn_history, to_insn_history_from,
8493 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
8494 int.
8495 (target_insn_history, target_insn_history_from)
8496 (target_insn_history_range): Use gdb_disassembly_flags instead of
8497 bare int.
8498
80a65e9b
SM
84992017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8500
8501 * cli/cli-script.c (build_command_line): For if/while commands,
8502 check whether args is empty.
8503
6b66338c
SM
85042017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8505
8506 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
8507 (enum command_control_type): Likewise.
8508 (struct command_line): Likewise.
8509 (free_command_lines): Likewise.
8510 (struct command_lines_deleter): Likewise.
8511 (command_line_up): Likewise.
8512 (read_command_lines): Likewise.
8513 (read_command_lines_1): Likewise.
8514 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
8515 (enum command_control_type): Likewise.
8516 (struct command_line): Likewise.
8517 (free_command_lines): Likewise.
8518 (struct command_lines_deleter): Likewise.
8519 (command_line_up): Likewise.
8520 (read_command_lines): Likewise.
8521 (read_command_lines_1): Likewise.
8522 * breakpoint.h: Include cli/cli-script.h.
8523 * extension-priv.h: Likewise.
8524 * gdbcmd.h: Likewise.
8525
51abb421
PA
85262017-09-04 Pedro Alves <palves@redhat.com>
8527
8528 * ada-lang.c (is_known_support_routine): Move sal declaration to
8529 where it is initialized.
8530 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
8531 (parse_breakpoint_sals, decode_static_tracepoint_spec)
8532 (clear_command, update_static_tracepoint): Remove init_sal
8533 references. Move declarations closer to initializations.
8534 * cli/cli-cmds.c (list_command): Move sal declarations closer to
8535 initializations.
8536 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
8537 references. Move sal declarations closer to initializations.
8538 * frame.c (find_frame_sal): Return a symtab_and_line via function
8539 return instead of output parameter. Remove init_sal references.
8540 * frame.h (find_frame_sal): Return a symtab_and_line via function
8541 return instead of output parameter.
8542 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
8543 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
8544 instead of memset.
8545 (gdbscm_find_pc_line): Remove init_sal reference.
8546 * infcall.c (call_function_by_hand_dummy): Remove init_sal
8547 references. Move declarations closer to initializations.
8548 * infcmd.c (set_step_frame): Update. Move declarations closer to
8549 initializations.
8550 (finish_backward): Remove init_sal references. Move declarations
8551 closer to initializations.
8552 * infrun.c (process_event_stop_test, handle_step_into_function)
8553 (insert_hp_step_resume_breakpoint_at_frame)
8554 (insert_step_resume_breakpoint_at_caller): Likewise.
8555 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
8556 (symbol_to_sal): Likewise.
8557 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
8558 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
8559 to its initialization.
8560 * reverse.c (save_bookmark_command): Use new/delete. Remove
8561 init_sal references. Move declarations closer to initializations.
8562 * source.c (get_current_source_symtab_and_line): Remove brace
8563 initialization.
8564 (set_current_source_symtab_and_line): Now takes the sal by const
8565 reference. Remove brace initialization.
8566 (line_info): Remove init_sal reference.
8567 * source.h (set_current_source_symtab_and_line): Now takes a
8568 symtab_and_line via const reference.
8569 * stack.c (set_current_sal_from_frame): Adjust.
8570 (print_frame_info): Adjust.
8571 (get_last_displayed_sal): Return the sal via function return
8572 instead of via output parameter. Simplify.
8573 (frame_info): Adjust.
8574 * stack.h (get_last_displayed_sal): Return the sal via function
8575 return instead of via output parameter.
8576 * symtab.c (init_sal): Delete.
8577 (find_pc_sect_line): Remove init_sal references. Move
8578 declarations closer to initializations.
8579 (find_function_start_sal): Remove init_sal references. Move
8580 declarations closer to initializations.
8581 * symtab.h (struct symtab_and_line): In-class initialize all
8582 fields.
8583 * tracepoint.c (set_traceframe_context)
8584 (print_one_static_tracepoint_marker): Remove init_sal references.
8585 Move declarations closer to initializations.
8586 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
8587 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
8588 declarations closer to initializations.
8589 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
8590 init_sal references. Adjust.
8591
6c5b2ebe
PA
85922017-09-04 Pedro Alves <palves@redhat.com>
8593
8594 * ax-gdb.c (agent_command_1): Use range-for.
8595 * break-catch-throw.c (re_set_exception_catchpoint): Update.
8596 * breakpoint.c: Include "common/array-view.h".
8597 (init_breakpoint_sal, create_breakpoint_sal): Change sals
8598 parameter from struct symtabs_and_lines to
8599 array_view<symtab_and_line>. Adjust. Use range-for. Update.
8600 (breakpoint_sals_to_pc): Change sals parameter from struct
8601 symtabs_and_lines to std::vector reference.
8602 (check_fast_tracepoint_sals): Change sals parameter from struct
8603 symtabs_and_lines to std::array_view. Use range-for.
8604 (decode_static_tracepoint_spec): Return a std::vector instead of
8605 symtabs_and_lines. Update.
8606 (create_breakpoint): Update.
8607 (break_range_command, until_break_command, clear_command): Update.
8608 (base_breakpoint_decode_location, bkpt_decode_location)
8609 (bkpt_probe_create_sals_from_location)
8610 (bkpt_probe_decode_location, tracepoint_decode_location)
8611 (tracepoint_probe_decode_location)
8612 (strace_marker_create_sals_from_location): Return a std::vector
8613 instead of symtabs_and_lines.
8614 (strace_marker_create_breakpoints_sal): Update.
8615 (strace_marker_decode_location): Return a std::vector instead of
8616 symtabs_and_lines. Update.
8617 (update_breakpoint_locations): Change struct symtabs_and_lines
8618 parameters to gdb::array_view. Adjust.
8619 (location_to_sals): Return a std::vector instead of
8620 symtabs_and_lines. Update.
8621 (breakpoint_re_set_default): Use std::vector instead of struct
8622 symtabs_and_lines.
8623 (decode_location_default): Return a std::vector instead of
8624 symtabs_and_lines. Update.
8625 * breakpoint.h: Include "common/array-view.h".
8626 (struct breakpoint_ops) <decode_location>: Now returns a
8627 std::vector instead of returning a symtabs_and_lines via output
8628 parameter.
8629 (update_breakpoint_locations): Change sals parameters to use
8630 gdb::array_view.
8631 * cli/cli-cmds.c (edit_command, list_command): Update to use
8632 std::vector and gdb::array_view.
8633 (ambiguous_line_spec): Adjust to use gdb::array_view and
8634 range-for.
8635 (compare_symtabs): Rename to ...
8636 (cmp_symtabs): ... this. Change parameters to symtab_and_line
8637 const reference and adjust.
8638 (filter_sals): Rewrite using std::vector and standard algorithms.
8639 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
8640 (jump_command): Update to use std::vector.
8641 * linespec.c (struct linespec_state) <canonical_names>: Update
8642 comment.
8643 (add_sal_to_sals_basic): Delete.
8644 (add_sal_to_sals, filter_results, convert_results_to_lsals)
8645 (decode_line_2, create_sals_line_offset)
8646 (convert_address_location_to_sals, convert_linespec_to_sals)
8647 (convert_explicit_location_to_sals, parse_linespec)
8648 (event_location_to_sals, decode_line_full, decode_line_1)
8649 (decode_line_with_current_source)
8650 (decode_line_with_last_displayed, decode_objc)
8651 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
8652 (linespec_result::~linespec_result): Adjust to use std::vector
8653 instead of symtabs_and_lines.
8654 * linespec.h (linespec_sals::sals): Now a std::vector.
8655 (struct linespec_result): Use std::vector, bool, and in-class
8656 initialization.
8657 (decode_line_1, decode_line_with_current_source)
8658 (decode_line_with_last_displayed): Return std::vector.
8659 * macrocmd.c (info_macros_command): Use std::vector.
8660 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
8661 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
8662 std::vector.
8663 * probe.h (parse_probes): Return a std::vector.
8664 * python/python.c (gdbpy_decode_line): Use std::vector and
8665 gdb::array_view.
8666 * source.c (select_source_symtab, line_info): Use std::vector.
8667 * stack.c (func_command): Use std::vector.
8668 * symtab.h (struct symtabs_and_lines): Delete.
8669 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
8670
7c44b49c
PA
86712017-09-04 Pedro Alves <palves@redhat.com>
8672
8673 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8674 unittests/array-view-selftests.c.
8675 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
8676 * common/array-view.h: New file.
8677 * unittests/array-view-selftests.c: New file.
8678
e439fa14
PA
86792017-09-04 Pedro Alves <palves@redhat.com>
8680
8681 * cli/cli-cmds.c (edit_command): Pass message to
8682 ambiguous_line_spec.
8683 (list_command): Pass message to ambiguous_line_spec. Say
8684 "first"/"last" instead of "start" and "end" to be consistent with
8685 the manual.
8686 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
8687 them to print formatted message.
8688
7525b645
PA
86892017-09-04 Pedro Alves <palves@redhat.com>
8690
8691 * btrace.c (ftrace_add_pt): Pass btrace_insn to
8692 ftrace_update_insns by reference instead of pointer.
8693
badc0020
YQ
86942017-09-04 Yao Qi <yao.qi@linaro.org>
8695
8696 * i386-go32-tdep.c: Include x86-xstate.h.
8697 (i386_go32_init_abi): Call i386_target_description.
8698 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
8699 if xcr0 is X86_XSTATE_X87_MASK.
8700 * i386-tdep.h (tdesc_i386): Remove the declaration.
8701 (tdesc_i386_mmx): Likewise.
8702
d78bdb54
YQ
87032017-09-04 Yao Qi <yao.qi@linaro.org>
8704
8705 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
8706 X86_XSTATE_SSE_MASK instead of 0.
8707
ca1fa5ee
YQ
87082017-09-04 Yao Qi <yao.qi@linaro.org>
8709
8710 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
8711 i386_target_description.
8712 * i386-fbsd-nat.c (i386fbsd_read_description): Call
8713 i386_target_description.
8714 * i386-tdep.c (i386_gdbarch_init): Likewise.
8715
2434b019
YQ
87162017-09-04 Yao Qi <yao.qi@linaro.org>
8717
8718 * amd64-darwin-tdep.c: Include "x86-xstate.h".
8719 (x86_darwin_init_abi_64): Call amd64_target_description.
8720 * amd64-dicos-tdep.c: Likewise.
8721 * amd64-fbsd-nat.c: Likewise.
8722 * amd64-fbsd-tdep.c: Likewise.
8723 * amd64-nbsd-tdep.c: Likewise.
8724 * amd64-obsd-tdep.c: Likewise.
8725 * amd64-sol2-tdep.c: Likewise.
8726 * amd64-windows-tdep.c: Likewise.
8727 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
8728
0860c437
SM
87292017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8730
8731 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
8732 (btrace_function) <insn>: Change type to use std::vector.
8733 * btrace.c (ftrace_debug, ftrace_call_num_insn,
8734 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
8735 ftrace_update_insns, ftrace_compute_global_level_offset,
8736 btrace_stitch_bts, btrace_clear, btrace_insn_get,
8737 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
8738 change to std::vector.
8739 (ftrace_update_insns): Adjust to change to std::vector, change
8740 type of INSN parameter.
8741 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
8742 * record-btrace.c (btrace_call_history_insn_range,
8743 btrace_compute_src_line_range,
8744 record_btrace_frame_prev_register): Adjust to change to
8745 std::vector.
8746 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
8747 to change to std::vector.
8748
0638b7f9
TT
87492017-09-03 Tom Tromey <tom@tromey.com>
8750
8751 * corefile.c (reopen_exec_file): Use std::string.
8752
8f84fb0e
TT
87532017-09-03 Tom Tromey <tom@tromey.com>
8754
8755 * compile/compile.c (compile_register_name_mangled): Return
8756 std::string.
8757 * compile/compile-loc2c.c (pushf_register_address): Update.
8758 (pushf_register): Update.
8759 * compile/compile-c-types.c (convert_array): Update.
8760 * compile/compile-c-symbols.c (generate_vla_size): Update.
8761 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
8762 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
8763 (convert_one_symbol): Update.
8764 (generate_c_for_for_one_variable): Update.
8765 * compile/compile-c-support.c (c_get_range_decl_name): Return a
8766 std::string.
8767 (generate_register_struct): Update.
8768 * compile/compile-internal.h (c_get_range_decl_name): Return a
8769 std::string.
8770 (compile_register_name_mangled): Return std::string.
8771
18e9961f
TT
87722017-09-03 Tom Tromey <tom@tromey.com>
8773
8774 * utils.c (perror_string): Return a std::string.
8775 (throw_perror_with_name, perror_warning_with_name): Update.
8776
45343786
TT
87772017-09-03 Tom Tromey <tom@tromey.com>
8778
8779 * demangle.c (demangle_command): Use std::string,
8780 unique_xmalloc_ptr.
8781
b57af503
TT
87822017-09-03 Tom Tromey <tom@tromey.com>
8783
8784 * cli/cli-setshow.c (do_set_command): Use std::string.
8785
6eecf35f
TT
87862017-09-03 Tom Tromey <tom@tromey.com>
8787
8788 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
8789
56496dd4
TT
87902017-09-03 Tom Tromey <tom@tromey.com>
8791
8792 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
8793
e91a1fa7
TT
87942017-09-03 Tom Tromey <tom@tromey.com>
8795
8796 * mi/mi-cmd-env.c (env_execute_cli_command): Use
8797 gdb::unique_xmalloc_ptr.
8798
7ffd83d7
TT
87992017-09-03 Tom Tromey <tom@tromey.com>
8800
8801 * thread.c (print_thread_info_1): Use string_printf.
8802 (thread_apply_command, thread_apply_all_command): Use
8803 std::string.
8804
1ccbe998
TT
88052017-09-03 Tom Tromey <tom@tromey.com>
8806
8807 * valprint.c (val_print_string): Update.
8808 * gdbcore.h (memory_error_message): Return std::string.
8809 * corefile.c (memory_error_message): Return std::string.
8810 (memory_error): Update.
8811 * breakpoint.c (insert_bp_location): Update.
8812
23fdd69e
SM
88132017-09-03 Simon Marchi <simon.marchi@ericsson.com>
8814
8815 * target/waitstatus.h (target_waitstatus_to_string): Change
8816 return type to std::string.
8817 * target/waitstatus.c (target_waitstatus_to_string): Return
8818 std::string.
8819 * target.h (target_waitstatus_to_string): Remove declaration.
8820 * infrun.c (resume, clear_proceed_status_thread,
8821 print_target_wait_results, do_target_wait, save_waitstatus,
8822 stop_all_threads): Adjust.
8823 * record-btrace.c (record_btrace_wait): Adjust.
8824 * target-debug.h
8825 (target_debug_print_struct_target_waitstatus_p): Adjust.
8826
5c811d30
JK
88272017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8828
8829 PR gdb/22046
8830 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
8831 detection.
8832
0a2dde4a
SDJ
88332017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
8834
8835 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
8836 for setting/unsetting environment variables on the remote target.
8837 (New remote packets): Add entries for QEnvironmentHexEncoded,
8838 QEnvironmentUnset and QEnvironmentReset.
8839 * common/environ.c (gdb_environ::operator=): Extend method to
8840 handle m_user_set_env_list and m_user_unset_env_list.
8841 (gdb_environ::clear): Likewise.
8842 (match_var_in_string): Change type of first parameter from 'char
8843 *' to 'const char *'.
8844 (gdb_environ::set): Extend method to handle
8845 m_user_set_env_list and m_user_unset_env_list.
8846 (gdb_environ::unset): Likewise.
8847 (gdb_environ::clear_user_set_env): New method.
8848 (gdb_environ::user_set_envp): Likewise.
8849 (gdb_environ::user_unset_envp): Likewise.
8850 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
8851 m_user_unset_env_list on move constructor/assignment.
8852 (unset): Add new default parameter 'update_unset_list = true'.
8853 (clear_user_set_env): New method.
8854 (user_set_envp): Likewise.
8855 (user_unset_envp): Likewise.
8856 (m_user_set_env_list): New std::set.
8857 (m_user_unset_env_list): Likewise.
8858 * common/rsp-low.c (hex2str): New function.
8859 (bin2hex): New overload for bin2hex function.
8860 * common/rsp-low.c (hex2str): New prototype.
8861 (str2hex): New overload prototype.
8862 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
8863 QEnvironmentUnset and QEnvironmentReset.
8864 (remote_protocol_features): Add QEnvironmentHexEncoded,
8865 QEnvironmentUnset and QEnvironmentReset packets.
8866 (send_environment_packet): New function.
8867 (extended_remote_environment_support): Likewise.
8868 (extended_remote_create_inferior): Call
8869 extended_remote_environment_support.
8870 (_initialize_remote): Add QEnvironmentHexEncoded,
8871 QEnvironmentUnset and QEnvironmentReset packet configs.
8872 * unittests/environ-selftests.c (gdb_selftest_env_var):
8873 New variable.
8874 (test_vector_initialization): New function.
8875 (test_init_from_host_environ): Likewise.
8876 (test_reinit_from_host_environ): Likewise.
8877 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
8878 Likewise.
8879 (test_unset_set_empty_vector): Likewise.
8880 (test_vector_clear): Likewise.
8881 (test_std_move): Likewise.
8882 (test_move_constructor):
8883 (test_self_move): Likewise.
8884 (test_set_unset_reset): Likewise.
8885 (run_tests): Rewrite in terms of the functions above.
8886
654670a4
WP
88872017-08-31 Weimin Pan <weimin.pan@oracle.com>
8888
8889 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
8890 (adi_available): Use a temp variable of type CORE_ADDR as argument
8891 3 when calling target_auxv_search.
8892 (adi_normalize_address): Use masks and xor operators to calculate
8893 normalized address.
8894 (adi_read_versions, adi_write_versions, adi_print_versions)
8895 (do_examine, do_assign): Use paddress.
8896
7755ddb7
JB
88972017-08-29 John Baldwin <jhb@FreeBSD.org>
8898
8899 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
8900 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
8901 out of loop and add supply of FIR.
8902 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
8903 add collect of FIR.
8904
fd437cbc
SM
89052017-08-28 Simon Marchi <simon.marchi@ericsson.com>
8906
3804a343 8907 PR gdb/21827
fd437cbc
SM
8908 * cli/cli-script.c (define_command): Don't convert command name
8909 to lower case.
8910
988f6b3d
JB
89112017-08-25 Joel Brobecker <brobecker@adacore.com>
8912
8913 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
8914 Update all callers accordingly. Remove all code blocks handling
8915 the case where DISPP is not NULL.
8916
663c44ac
JK
89172017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8918
8919 PR symtab/22003
8920 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
8921 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8922 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
8923
f1902523
JK
89242017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8925
8926 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
8927 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
8928 (read_comp_units_from_section): New parameter abbrev_section, use
8929 read_and_check_comp_unit_head, allocate signatured_type if needed.
8930 (create_all_comp_units): Update read_comp_units_from_section caller.
8931
87215ad1
SDJ
89322017-08-23 Pedro Alves <palves@redhat.com>
8933
8934 PR remote/21852
8935 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
8936 to null_ptid and switch to thread without reading the registers
8937 after adding the inferior.
8938
6e41ddec
JK
89392017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8940
8941 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
8942 compile-gcc.
8943 * compile/compile.c (compile_gcc, show_compile_gcc): New.
8944 (compile_to_object): Implement compile_gcc.
8945 (_initialize_compile): Install "set compile-gcc". Initialize
8946 compile_gcc.
8947
e68c32d5
JK
89482017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8949
8950 * compile/compile.c (compile_to_object): Conditionally call
8951 set_verbose. Conditionally call compile or compile_v0.
8952
58afddc6
WP
89532017-08-07 Weimin Pan <weimin.pan@oracle.com>
8954
8955 * sparc64-tdep.h: (adi_normalize_address): New export.
8956 * sparc-nat.h: (open_adi_tag_fd): New export.
8957 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
8958 * sparc64-linux-tdep.c:
8959 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
8960 (sparc64_linux_handle_segmentation_fault): New function.
8961 (sparc64_linux_init_abi): Register
8962 sparc64_linux_handle_segmentation_fault
8963 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
8964 (sparc64_addr_bits_remove): New function.
8965 (sparc64_init_abi): Register sparc64_addr_bits_remove.
8966 (MAX_PROC_NAME_SIZE): New macro.
8967 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
8968 (sparc64adilist): New variable.
8969 (adi_proc_list): New variable.
8970 (find_adi_info): New function.
8971 (add_adi_info): New function.
8972 (get_adi_info_proc): New function.
8973 (get_adi_info): New function.
8974 (info_adi_command): New function.
8975 (read_maps_entry): New function.
8976 (adi_available): New function.
8977 (adi_normalize_address): New function.
8978 (adi_align_address): New function.
8979 (adi_convert_byte_count): New function.
8980 (adi_tag_fd): New function.
8981 (adi_is_addr_mapped): New function.
8982 (adi_read_versions): New function.
8983 (adi_write_versions): New function.
8984 (adi_print_versions): New function.
8985 (do_examine): New function.
8986 (do_assign): New function.
8987 (adi_examine_command): New function.
8988 (adi_assign_command): New function.
8989 (_initialize_sparc64_adi_tdep): New function.
8990
11db9430
SM
89912017-08-22 Simon Marchi <simon.marchi@ericsson.com>
8992
8993 * breakpoint.c (breakpoints_info): Rename to ...
8994 (info_breakpoints_command): ... this.
8995 (watchpoints_info): Rename to ...
8996 (info_watchpoints_command): ... this.
8997 (tracepoints_info): Rename to ...
8998 (info_tracepoints_command): ... this.
8999 (_initialize_breakpoint): Adjust.
9000 * dcache.c (dcache_info): Rename to ...
9001 (info_display_command): ... this.
9002 (_initialize_dcache): Adjust.
9003 * frame.h (args_info): Rename to ...
9004 (info_args_command): ... this.
9005 (locals_info): Rename to ...
9006 (info_locals_command): ... this.
9007 * infcmd.c (nofp_registers_info): Rename to ...
9008 (info_registers_command): ... this.
9009 (float_info): Rename to ...
9010 (info_float_command): ... this.
9011 (program_info): Rename to ...
9012 (info_program_command): ... this.
9013 (all_registers_info): Rename to ...
9014 (info_all_registers_command): ... this.
9015 (vector_info): Rename to ...
9016 (info_vector_command): ... this.
9017 (float_info): Rename to ...
9018 (info_float_command): ... this.
9019 (_initialize_infcmd): Adjust.
9020 * inferior.h (term_info): Rename to ...
9021 (info_terminal_command): ... this.
9022 * inflow.c (term_info): Rename to ...
9023 (info_terminal_command): ... this.
9024 (_initialize_inflow): Adjust.
9025 * infrun.c (signals_info): Rename to ...
9026 (info_signals_command): ... this.
9027 (_initialize_infrun): Adjust.
9028 * objc-lang.c (classes_info): Rename to ...
9029 (info_classes_command): ... this.
9030 (selectors_info): Rename to ...
9031 (info_selectors_command): ... this.
9032 (_initialize_objc_language): Adjust.
9033 * printcmd.c (sym_info): Rename to ...
9034 (info_symbol_command): ... this.
9035 (address_info): Rename to ...
9036 (info_address_command): ... this.
9037 (display_info): Rename to ...
9038 (info_display_command): ... this.
9039 (_initialize_printcmd): Adjust.
9040 * reverse.c (bookmarks_info): Rename to ...
9041 (info_breakpoints_command): ... this.
9042 (_initialize_reverse): Adjust.
9043 * ser-go32.c (dos_info): Rename to ...
9044 (info_serial_command): ... this.
9045 (_initialize_ser_dos): Adjust.
9046 * skip.c (skip_info): Rename to ...
9047 (info_skip_command): ... this.
9048 (_initialize_step_skip): Adjust.
9049 * source.c (line_info): Rename to ...
9050 (info_line_command): ... this.
9051 (source_info): Rename to ...
9052 (info_source_command)
9053 * stack.c (frame_info): Rename to ...
9054 (info_frame_command): ... this.
9055 (locals_info): Rename to ...
9056 (info_locals_command): ... this.
9057 (args_info): Rename to ...
9058 (info_args_command): ... this.
9059 (_initialize_stack): Adjust.
9060 * symtab.c (sources_info): Rename to ...
9061 (info_sources_command): ... this.
9062 (variables_info): Rename to ...
9063 (info_variables_command): ... this.
9064 (functions_info): Rename to ...
9065 (info_functions_command): ... this.
9066 (types_info): Rename to ...
9067 (info_types_command): ... this.
9068 (_initialize_symtab): Adjust.
9069 * target.c (target_info): Rename to ...
9070 (info_target_command): ... this.
9071 (initialize_targets): Adjust.
9072 * tracepoint.c (tvariables_info): Rename to ...
9073 (info_tvariables_command): ... this.
9074 (scope_info): Rename to ...
9075 (info_scope_command): ... this.
9076 (trace_dump_actions): Adjust.
9077 (_initialize_tracepoint): Adjust.
9078
b270e6f9
TT
90792017-08-22 Tom Tromey <tom@tromey.com>
9080
9081 * breakpoint.h (install_breakpoint): Update.
9082 * breakpoint.c (add_solib_catchpoint): Update.
9083 (install_breakpoint): Change argument to a std::unique_ptr.
9084 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
9085 (create_breakpoint_sal, create_breakpoint): Update.
9086 (watch_command_1, catch_exec_command_1)
9087 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
9088 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
9089 Return the breakpoint.
9090 (set_raw_breakpoint_without_location, set_raw_breakpoint)
9091 (new_single_step_breakpoint): Update.
9092 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
9093 std::unique_ptr.
9094 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9095 std::unique_ptr.
9096 * break-catch-sig.c (create_signal_catchpoint): Use
9097 std::unique_ptr.
9098 * ada-lang.c (create_ada_exception_catchpoint): Use
9099 std::unique_ptr.
9100
36bd8eaa
TT
91012017-08-22 Tom Tromey <tom@tromey.com>
9102
9103 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
9104
56f37645
TT
91052017-08-22 Tom Tromey <tom@tromey.com>
9106
9107 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
9108 (lookup_partial_symbol): Update.
9109
0b581c69
TT
91102017-08-22 Tom Tromey <tom@tromey.com>
9111
9112 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
9113 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
9114 (find_and_open_source, symtab_to_fullname): Update.
9115 * psymtab.c (psymtab_to_fullname): Update.
9116
14278e1f
TT
91172017-08-22 Tom Tromey <tom@tromey.com>
9118
9119 * exec.c (exec_file_attach): Update.
9120 * linux-thread-db.c (try_thread_db_load): Update.
9121 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
9122 * utils.c (gdb_realpath): Change return type.
9123 (gdb_realpath_keepfile): Update.
9124 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
9125 (_initialize_utils): Register the new self test.
9126 * source.c (openp): Update.
9127 (find_and_open_source): Update.
9128 * nto-tdep.c (nto_find_and_open_solib): Update.
9129 * main.c (set_gdb_data_directory): Update.
9130 (captured_main_1): Update.
9131 * dwarf2read.c (dwarf2_get_dwz_file): Update
9132 (dw2_map_symbol_filenames): Update.
9133 * auto-load.c (auto_load_safe_path_vec_update): Update.
9134 (filename_is_in_auto_load_safe_path_vec): Change type of
9135 "filename_realp".
9136 (auto_load_objfile_script): Update.
9137 (file_is_auto_load_safe): Update. Use std::string.
9138 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
9139
4971c9a7
TT
91402017-08-22 Tom Tromey <tom@tromey.com>
9141
9142 * utils.c (gdb_realpath_keepfile): Return a
9143 gdb::unique_xmalloc_ptr.
9144 * exec.c (exec_file_attach): Update.
9145 * utils.h (gdb_realpath_keepfile): Return a
9146 gdb::unique_xmalloc_ptr.
9147
e3e41d58
TT
91482017-08-22 Tom Tromey <tom@tromey.com>
9149
9150 * compile/compile.c (compile_file_command): Use
9151 gdb::unique_xmalloc_ptr, std::string.
9152 * utils.c (gdb_abspath): Change return type.
9153 * source.c (openp): Update.
9154 * objfiles.c (allocate_objfile): Update.
9155 * main.c (set_gdb_data_directory): Update.
9156 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
9157
0d999a6e
ZZ
91582017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
9159
9160 * cli-cmds.c (list_commands): List actual code around more than
9161 one location.
9162
329d5e7e
JB
91632017-08-21 John Baldwin <jhb@FreeBSD.org>
9164
9165 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
9166
bf223d3e
PA
91672017-08-21 Pedro Alves <palves@redhat.com>
9168
9169 PR gdb/19487
9170 * c-exp.y (variable production): Handle function aliases.
9171 * minsyms.c (msymbol_is_text): New function.
9172 * minsyms.h (msymbol_is_text): Declare.
9173 * symtab.c (find_function_alias_target): New function.
9174 * symtab.h (find_function_alias_target): Declare.
9175
c973d0aa
PA
91762017-08-21 Pedro Alves <palves@redhat.com>
9177
9178 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
9179 typedefs.
9180 * typeprint.c (whatis_exp): If handling "whatis", and expression
9181 is OP_TYPE, strip one typedef level. Otherwise don't strip
9182 typedefs here.
9183 * valops.c (value_cast): Save "to" type before resolving
9184 stubs/typedefs. Use that type as resulting value's type.
9185
2989a365
TT
91862017-08-18 Tom Tromey <tom@tromey.com>
9187 Pedro Alves <palves@redhat.com>
9188
9189 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
9190 * sol-thread.c (sol_thread_resume, sol_thread_wait)
9191 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
9192 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
9193 * proc-service.c (ps_xfer_memory): Use scoped_restore.
9194 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
9195 (linux_get_siginfo_data): Add "thread" argument. Use
9196 scoped_restore.
9197 * linux-nat.c (linux_child_follow_fork)
9198 (check_stopped_by_watchpoint): Use scoped_restore.
9199 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
9200 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
9201 (restore_inferior_ptid, save_inferior_ptid): Remove.
9202 * btrace.c (btrace_fetch): Use scoped_restore.
9203 * bsd-uthread.c (bsd_uthread_fetch_registers)
9204 (bsd_uthread_store_registers): Use scoped_restore.
9205 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
9206 scoped_restore.
9207 * aix-thread.c (aix_thread_resume, aix_thread_wait)
9208 (aix_thread_xfer_partial): Use scoped_restore.
9209 * inferior.h (save_inferior_ptid): Remove.
9210
e60eb288
YQ
92112017-08-18 Yao Qi <yao.qi@linaro.org>
9212
9213 PR tdep/21818
9214 * arm-tdep.c (gdb_print_insn_arm): Mark
9215 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
9216
6d580b63
YQ
92172017-08-18 Yao Qi <yao.qi@linaro.org>
9218
9219 * NEWS: Mention GDBserver's new option "--selftest".
9220 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
9221 * selftest.c: Move it to common/selftest.c.
9222 * selftest.h: Move it to common/selftest.h.
9223 * selftest-arch.c (reset): New function.
9224 (tests_with_arch): Call reset.
9225
86dcbf50
YQ
92262017-08-18 Yao Qi <yao.qi@linaro.org>
9227
9228 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
9229 instead of exception_fprintf and printf_filtered.
9230
7649770c
YQ
92312017-08-18 Yao Qi <yao.qi@linaro.org>
9232
9233 * selftest.c (register_self_test): Rename it to
9234 selftests::register_test.
9235 (run_self_tests): selftest::run_tests.
9236 * selftest.h: Update declarations.
9237 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
9238 selftests::register_test_foreach_arch.
9239 * selftest-arch.h: Update declaration.
9240 * aarch64-tdep.c: Update.
9241 * arm-tdep.c: Likewise.
9242 * disasm-selftests.c: Likewise.
9243 * dwarf2loc.c: Likewise.
9244 * dwarf2-frame.c: Likewise.
9245 * findvar.c: Likewise.
9246 * gdbarch-selftests.c: Likewise.
9247 * maint.c (maintenance_selftest): Likewise.
9248 * regcache.c: Likewise.
9249 * rust-exp.y: Likewise.
9250 * selftest-arch.c: Likewise.
9251 * unittests/environ-selftests.c: Likewise.
9252 * unittests/function-view-selftests.c: Likewise.
9253 * unittests/offset-type-selftests.c: Likewise.
9254 * unittests/optional-selftests.c: Likewise.
9255 * unittests/scoped_restore-selftests.c: Likewise.
9256 * utils-selftests.c: Likewise.
9257
b0cba12e
PA
92582017-08-17 Pedro Alves <palves@redhat.com>
9259
9260 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
9261 local.
9262
4c8aa72d
PA
92632017-08-17 Pedro Alves <palves@redhat.com>
9264
9265 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
9266 field.
9267 (reset_die_in_process): Delete, replaced by ...
9268 (process_die_scope): ... this new class. Make it responsible for
9269 freeing cu->line_header too.
9270 (process_die): Use process_die_scope.
9271 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
9272 cu->line_header_die_owner. Don't release the line header if it's
9273 owned by the CU.
9274 (setup_type_unit_groups): Make the CU/DIE own the line header.
9275 Don't release the line header here.
9276
ba713918
AL
92772017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
9278
9279 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
9280
44d0fb3a
RK
92812017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
9282
9283 * NEWS: Mention new shortcuts for nexti and stepi in TUI
9284 Single-Key mode
9285
a5afdb16
RK
92862017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
9287
9288 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
9289 mode command list.
9290
47613aeb
SH
92912017-08-15 Stafford Horne <shorne@gmail.com>
9292
9293 * MAINTAINERS (Write After Approval): Add Stafford Horne.
9294
9c3cc999
SH
92952017-08-15 Stafford Horne <shorne@gmail.com>
9296
9297 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
9298
206726fb
SDJ
92992017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
9300
9301 PR gdb/21954
9302 * infcmd.c (unset_environment_command): Use the 'clear' method on
9303 the environment instead of resetting it.
9304
0335ac6d
JB
93052017-08-15 John Baldwin <jhb@FreeBSD.org>
9306
9307 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
9308 platforms.
9309
d3abe1c8
TT
93102017-08-14 Tom Tromey <tom@tromey.com>
9311
9312 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
9313 (print_binary_chars): Likewise.
9314 (BITS_IN_BYTES): Remove.
9315
d6382fff
TT
93162017-08-14 Tom Tromey <tom@tromey.com>
9317
9318 PR gdb/21675
9319 * valprint.c (LOW_ZERO): Change value to 034.
9320 (print_octal_chars): Add static_asserts for octal constants.
9321 * printcmd.c (print_scalar_formatted): Add 'd' case.
9322
f978cb06
TT
93232017-08-11 Tom Tromey <tom@tromey.com>
9324
9325 * symfile.c (add_symbol_file_command): Use std::vector.
9326
2f5404b3
TT
93272017-08-14 Tom Tromey <tom@tromey.com>
9328
9329 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
9330 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9331 std::move.
9332 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
9333
de7985c3
PA
93342017-08-11 Pedro Alves <palves@redhat.com>
9335
9336 * infrun.c (process_event_stop_test): Adjust
9337 function_name_is_marked_for_skip call.
9338 * skip.c: Include <list>.
9339 (skiplist_entry): Make it a class with private fields, and
9340 getters/setters.
9341 (skiplist_entry_chain): Delete.
9342 (skiplist_entries): New.
9343 (skiplist_entry_count): Delete.
9344 (highest_skiplist_entry_num): New.
9345 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
9346 (add_skiplist_entry): Delete.
9347 (skiplist_entry::skiplist_entry): New.
9348 (skiplist_entry::add_entry): New.
9349 (skip_file_command, skip_function): Adjust.
9350 (compile_skip_regexp): Delete.
9351 (skip_command): Don't compile regexp here. Adjust to use
9352 skiplist_entry::add_entry.
9353 (skip_info): Adjust to use range-for and getters.
9354 (skip_enable_command, skip_disable_command): Adjust to use
9355 range-for and setters.
9356 (skip_delete_command): Adjust to use std::list.
9357 (add_skiplist_entry): Delete.
9358 (skip_file_p): Delete, refactored as ...
9359 (skiplist_entry::do_skip_file_p): ... this new method.
9360 (skip_gfile_p): Delete, refactored as ...
9361 (skiplist_entry::do_gskip_file_p): ... this new method.
9362 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
9363 (skiplist_entry::skip_function_p): ... this new method.
9364 (function_name_is_marked_for_skip): Now returns bool, and takes
9365 the function sal by const reference. Adjust to use range-for and
9366 skiplist_entry methods.
9367 (_initialize_step_skip): Remove references to
9368 skiplist_entry_chain, skiplist_entry_count.
9369 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
9370 takes the function sal by const reference.
9371
be7d3cd5
YQ
93722017-08-11 Yao Qi <yao.qi@linaro.org>
9373
9374 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
9375 (dwarf2_frame_cache): Remove reset_cache_cleanup.
9376 (dwarf2_frame_cache):
9377 * frame-unwind.c (frame_unwind_try_unwinder): Catch
9378 RETURN_MASK_ALL and set *this_case to NULL.
9379 * frame-unwind.h: Update comments.
9380
1c90d9f0
YQ
93812017-08-11 Yao Qi <yao.qi@linaro.org>
9382
9383 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
9384 (dwarf2_frame_state_copy_regs): Remove.
9385 (dwarf2_frame_state_free_regs): Remove.
9386 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
9387 (dwarf2_restore_rule): Call method .alloc_regs instead of
9388 dwarf2_frame_state_alloc_regs.
9389 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
9390 constructor. Call std::move.
9391 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
9392 (dwarf2_frame_cache): Likewise.
9393
9394 [GDB_SELF_TEST]: Include selftest.h and
9395 selftest-arch.h.
9396 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
9397 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
9398 execute_cfa_program_test.
9399
9400 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
9401 copy ctor, assignment operator, move assignment.
9402 <alloc_regs>: New method.
9403 <swap>: New method.
9404 (struct dwarf2_frame_state): Delete dtor.
9405 (dwarf2_frame_state_alloc_regs): Remove declaration.
9406 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
9407 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
9408
afe37d6b
YQ
94092017-08-11 Yao Qi <yao.qi@linaro.org>
9410
9411 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
9412 (dwarf2_frame_state::dwarf2_frame_state): New.
9413 (dwarf2_frame_state::~dwarf2_frame_state): New.
9414 (dwarf2_fetch_cfa_info): Update.
9415 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
9416 rather than a pointer. Update code.
9417 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
9418 dtor.
9419 <data_align, code_align, retaddr_column>: Change them to const.
9420 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
9421 to bool.
9422
b348037f
YQ
94232017-08-11 Yao Qi <yao.qi@linaro.org>
9424
9425 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
9426 <loc.exp>: New field.
9427 * dwarf2-frame.c (execute_cfa_program): Update.
9428 (dwarf2_frame_prev_register): Update.
9429
e7c9de26
PA
94302017-08-10 Pedro Alves <palves@redhat.com>
9431
9432 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
9433
e8c6b620
JB
94342017-08-09 John Baldwin <jhb@FreeBSD.org>
9435
9436 * fbsd-nat.c (struct fbsd_fork_info): Remove.
9437 (fbsd_pending_children): Use std::list.
9438 (fbsd_remember_child): Likewise.
9439 (fbsd_is_child_pending): Likewise.
9440 (fbsd_pending_vfork_done): Use std::forward_list.
9441 (fbsd_add_vfork_done): Likewise.
9442 (fbsd_is_vfork_done_pending): Likewise.
9443 (fbsd_next_vfork_done): Likewise.
9444
e4a26669
JB
94452017-08-09 John Baldwin <jhb@FreeBSD.org>
9446
9447 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
9448 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
9449 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
9450 for `mapfilename'.
9451 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 9452 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 9453
142311d3
JB
94542017-08-09 John Baldwin <jhb@FreeBSD.org>
9455
9456 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
9457 "filestuff.h".
9458 (fbsd_find_memory_regions): Fix `mapfile' initialization.
9459
42fa2e0e
TT
94602017-08-09 Tom Tromey <tom@tromey.com>
9461
9462 * skip.c (skiplist_entry): New constructor.
9463 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
9464 (skiplist_entry::file_is_glob): Now bool.
9465 (skiplist_entry::file, skiplist_entry::function): Now
9466 std::string.
9467 (make_skip_entry): Return a unique_ptr. Use new.
9468 (free_skiplist_entry, free_skiplist_entry_cleanup)
9469 (make_free_skiplist_entry_cleanup): Remove.
9470 (skip_command, skip_disable_command, add_skiplist_entry)
9471 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
9472 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
9473 (function_name_is_marked_for_skip): Update.
9474 (skip_delete_command): Update. Use delete.
9475
cd3af38d
JW
94762017-08-09 Jiong Wang <jiong.wang@arm.com>
9477
9478 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
9479 (aarch64_linux_core_read_description): New function.
9480 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
9481
29592bde
PA
94822017-08-09 Pedro Alves <palves@redhat.com>
9483
9484 * cp-name-parser.y (cp_comp_to_string): Return a
9485 gdb::unique_xmalloc_ptr<char>.
9486 * cp-support.c (replace_typedefs_qualified_name)
9487 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
9488 (cp_canonicalize_string_full): Use op= instead of explicit
9489 convertion.
9490 (cp_class_name_from_physname, method_name_from_physname)
9491 (cp_func_name, cp_remove_params): Adjust to use
9492 gdb::unique_xmalloc_ptr<char>.
9493 * cp-support.h (cp_comp_to_string): Return a
9494 gdb::unique_xmalloc_ptr<char>.
9495 * python/py-type.c (typy_lookup_type): Adjust to use
9496 gdb::unique_xmalloc_ptr<char>.
9497
b3340438
L
94982017-08-09 H.J. Lu <hongjiu.lu@intel.com>
9499
9500 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
9501
e88e8651
YQ
95022017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
9503 Yao Qi <yao.qi@linaro.org>
9504
9505 * cp-support.c (cp_canonicalize_string_full): Use
9506 gdb::unique_xmalloc_ptr<char>.
9507 (cp_canonicalize_string): Likewise.
9508
f5a29eb0
YQ
95092017-08-09 Yao Qi <yao.qi@linaro.org>
9510
9511 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
9512 * regformats/i386/amd64-avx-avx512.dat: Remove.
9513 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
9514 * regformats/i386/amd64-avx-mpx.dat:Remove.
9515 * regformats/i386/amd64-avx.dat: Remove.
9516 * regformats/i386/amd64-mpx.dat: Remove.
9517 * regformats/i386/i386-avx-avx512.dat: Remove.
9518 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
9519 * regformats/i386/i386-avx-mpx.dat: Remove.
9520 * regformats/i386/i386-mmx.dat: Remove.
9521 * regformats/i386/i386-mpx.dat: Remove.
9522
57757c2f
YQ
95232017-08-09 Yao Qi <yao.qi@linaro.org>
9524
9525 * amd64-tdep.h (tdesc_x32): Remove the declaration.
9526 * amd64-tdep.c: Don't include features/i386/x32*.c.
9527 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
9528 functions.
9529 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
9530 and i386/x32-avx-avx512.
9531 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
9532 and i386/x32.xml.
9533 * features/i386/x32-avx-avx512.c: Removed.
9534 * features/i386/x32-avx-avx512.xml: Removed.
9535 * features/i386/x32-avx.c: Removed.
9536 * features/i386/x32-avx.xml: Removed.
9537 * features/i386/x32.c: Removed.
9538 * features/i386/x32.xml: Removed.
9539 * regformats/i386/x32-avx-avx512.dat: Removed.
9540 * regformats/i386/x32-avx.dat: Removed.
9541 * regformats/i386/x32.dat: Removed.
9542
ba7b109b
MR
95432017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9544
9545 PR breakpoints/21886
9546 * mem-break.c (default_memory_insert_breakpoint): Use
9547 `->placed_address' rather than `->reqstd_address' for the
9548 breakpoint location.
9549
e347efc3
MR
95502017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9551
9552 * arch-utils.c (default_print_insn): Remove arch/mach/endian
9553 assertions.
9554
0dba2a6c
MR
95552017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9556
9557 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
9558 a union of `tdep_info', `tdesc_data' and `id'.
9559 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
9560 rather than `info.tdep_info'.
9561 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
9562 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9563 * i386-tdep.c (i386_gdbarch_init): Likewise.
9564 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
9565 * mips-tdep.c (mips_gdbarch_init): Likewise.
9566 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9567 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9568 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
9569 `info.tdep_info'.
9570 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
9571 `info.tdep_info'.
9572 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9573 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
9574 `info.tdep_info'.
9575 * spu-tdep.c (spu_gdbarch_init): Likewise.
9576 * gdbarch.h: Regenerate.
9577
16eb6b2d
LS
95782017-08-07 Leszek Swirski <leszeks@google.com>
9579
7b005726 9580 PR symtab/20899
16eb6b2d
LS
9581 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
9582
74cbb09e
SM
95832017-08-07 Simon Marchi <simon.marchi@ericsson.com>
9584
9585 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
9586 (gdbsim_open): Rename gdb_argv args object to argv.
9587
ee0c3293
TT
95882017-08-05 Tom Tromey <tom@tromey.com>
9589
9590 * compile/compile-object-load.c (compile_object_load): Use
9591 gdb::unique_xmalloc_ptr.
9592 * cli/cli-dump.c (scan_filename): Rename from
9593 scan_filename_with_cleanup. Change return type.
9594 (scan_expression): Rename from scan_expression_with_cleanup.
9595 Change return type.
9596 (dump_memory_to_file, dump_value_to_file, restore_command):
9597 Use gdb::unique_xmalloc_ptr. Update.
9598 * cli/cli-cmds.c (find_and_open_script): Use
9599 gdb::unique_xmalloc_ptr.
9600 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
9601 * symmisc.c (maintenance_print_symbols)
9602 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
9603 * symfile.c (symfile_bfd_open, generic_load)
9604 (add_symbol_file_command, remove_symbol_file_command): Use
9605 gdb::unique_xmalloc_ptr.
9606 * source.c (openp): Use gdb::unique_xmalloc_ptr.
9607 * psymtab.c (maintenance_print_psymbols): Use
9608 gdb::unique_xmalloc_ptr.
9609 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
9610 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
9611 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
9612 (reload_shared_libraries_1): Likewise.
9613
3232fabd
TT
96142017-08-05 Tom Tromey <tom@tromey.com>
9615
9616 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
9617 (rust_op_vector, rust_set_vector): New typedefs.
9618 (current_parser): New global.
9619 (work_obstack): Change to pointer type. Update all users.
9620 (rust_ast, pstate): Remove globals.
9621 (struct rust_parser): New.
9622 (%union) <params, field_inits>: Change type.
9623 (start, tuple_expr, unit_expr, struct_expr_list, literal)
9624 (field_expr, expr_list, maybe_expr_list, type_list): Update.
9625 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
9626 (convert_params_to_types, convert_params_to_expression): Change
9627 type of "params".
9628 (ast_string): Change type of "fields".
9629 (rust_parse): Make a rust_parser. Remove cleanups.
9630 (rust_lex_tests): Make and install an auto_obstack.
9631
f02fd774
YQ
96322017-08-04 Yao Qi <yao.qi@linaro.org>
9633
9634 * configure.srv (ipa_x32_linux_regobj): New.
9635 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
9636 instead of X86_TDESC_AVX512.
9637 (initialize_low_tracepoint): Call
9638 init_registers_x32_avx_avx512_linux.
9639
91975afd
YQ
96402017-08-04 Yao Qi <yao.qi@linaro.org>
9641
9642 * utils.h (gdb_argv): Add namespace std for nullptr_t.
9643
2331fa3a
RK
96442017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
9645
9646 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
9647
744e4fe1
TT
96482017-08-03 Tom Tromey <tom@tromey.com>
9649
9650 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
9651 Remove.
9652 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
9653
1c034b67
TT
96542017-08-03 Tom Tromey <tom@tromey.com>
9655
9656 * python/py-param.c (compute_enum_values): Use gdb_argv.
9657
773a1edc
TT
96582017-08-03 Tom Tromey <tom@tromey.com>
9659
9660 * utils.h (struct gdb_argv_deleter): New.
9661 (gdb_argv): New class.
9662 * utils.c (gdb_argv::reset): New method.
9663 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
9664 * tracefile.c (tsave_command): Use gdb_argv.
9665 * top.c (new_ui_command): Use gdb_argv.
9666 * symmisc.c (maintenance_print_symbols)
9667 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
9668 * symfile.c (symbol_file_command, generic_load)
9669 (remove_symbol_file_command): Use gdb_argv.
9670 * stack.c (backtrace_command): Use gdb_argv.
9671 * source.c (add_path, show_substitute_path_command)
9672 (unset_substitute_path_command, set_substitute_path_command):
9673 Use gdb_argv.
9674 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
9675 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
9676 * remote.c (extended_remote_run, remote_put_command)
9677 (remote_get_command, remote_delete_command): Use gdb_argv.
9678 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
9679 (gdbsim_open): Use gdb_argv.
9680 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
9681 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
9682 * procfs.c (procfs_info_proc): Use gdb_argv.
9683 * interps.c (interpreter_exec_cmd): Use gdb_argv.
9684 * infrun.c (handle_command): Use gdb_argv.
9685 * inferior.c (add_inferior_command, clone_inferior_command):
9686 Use gdb_argv.
9687 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
9688 * exec.c (exec_file_command): Use gdb_argv.
9689 * cli/cli-cmds.c (alias_command): Use gdb_argv.
9690 * compile/compile.c (build_argc_argv): Use gdb_argv.
9691
0d50bde3
TT
96922017-08-03 Tom Tromey <tom@tromey.com>
9693
9694 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
9695
7f968c89
TT
96962017-08-03 Tom Tromey <tom@tromey.com>
9697
9698 * python/python.c (compute_python_string): Return std::string.
9699 (gdbpy_eval_from_control_command): Update.
9700 (do_start_initialization): Use std::string.
9701 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
9702 xstrprintf.
9703 * python/py-breakpoint.c (local_setattro): Use string_printf, not
9704 xstrprintf.
9705
3c9ebddd
TT
97062017-08-03 Tom Tromey <tom@tromey.com>
9707
9708 * top.h (do_restore_instream_cleanup): Remove.
9709 * top.c (do_restore_instream_cleanup): Remove.
9710 (read_command_file): Use scoped_restore.
9711 * cli/cli-script.c (execute_user_command): Use scoped_restore.
9712
b51b225e
TT
97132017-08-03 Tom Tromey <tom@tromey.com>
9714
9715 * cli/cli-script.c (execute_user_command)
9716 (execute_control_command): Use scoped_restore.
9717
ac991630
TT
97182017-08-03 Tom Tromey <tom@tromey.com>
9719
9720 * cli/cli-script.c (do_restore_user_call_depth): Remove.
9721 (execute_user_command): Remove user_call_depth; use
9722 user_args_stack's size instead.
9723
898e0c8e
TT
97242017-08-03 Tom Tromey <tom@tromey.com>
9725
9726 * top.h (in_user_command): Remove.
9727 * top.c (in_user_command): Remove.
9728 * cli/cli-script.c (do_restore_user_call_depth)
9729 (execute_user_command): Update.
9730
26fcd5d7
TT
97312017-08-03 Tom Tromey <tom@tromey.com>
9732
9733 * valops.c (search_struct_method): Use gdb::byte_vector.
9734 * valarith.c (value_concat): Use std::vector.
9735 * target.c (memory_xfer_partial): Use gdb::byte_vector.
9736 (simple_search_memory): Likewise.
9737 * printcmd.c (find_string_backward): Use gdb::byte_vector.
9738 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
9739 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
9740 * elfread.c (elf_rel_plt_read): Use std::string.
9741 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
9742 * cli/cli-dump.c (restore_section_callback): Use
9743 gdb::byte_vector.
9744
7c218e6c
TT
97452017-08-03 Tom Tromey <tom@tromey.com>
9746
9747 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
9748
31b68d4a
TT
97492017-08-03 Tom Tromey <tom@tromey.com>
9750
9751 * tui/tui-regs.c (tui_restore_gdbout): Remove.
9752 (tui_register_format): Use scoped_restore.
9753
2ec845e7
TT
97542017-08-03 Tom Tromey <tom@tromey.com>
9755
9756 * reverse.c (exec_direction_default): Remove.
9757 (exec_reverse_once): Use scoped_restore.
9758 * remote.c (restore_remote_timeout): Remove.
9759 (remote_flash_erase, remote_flash_write, remote_flash_done)
9760 (readchar, remote_serial_write): Use scoped_restore.
9761 * cli/cli-script.c (struct source_cleanup_lines_args)
9762 (source_cleanup_lines): Remove.
9763 (script_from_file): Use scoped_restore.
9764 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
9765 (source_command): Use scoped_restore.
9766
b3bc8453
TT
97672017-08-03 Tom Tromey <tom@tromey.com>
9768
9769 * utils.h (make_cleanup_free_so): Remove.
9770 * utils.c (do_free_so, make_cleanup_free_so): Remove.
9771 * solist.h (struct so_deleter): New.
9772 (so_list_up): New typedef.
9773 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
9774
e3ad2841
TT
97752017-08-03 Tom Tromey <tom@tromey.com>
9776
9777 * utils.h (make_cleanup_restore_current_language): Remove.
9778 * utils.c (do_restore_current_language)
9779 (make_cleanup_restore_current_language): Remove.
9780 * parse.c (parse_exp_in_context_1)
9781 (parse_expression_with_language): Use
9782 scoped_restore_current_language.
9783 * mi/mi-main.c (mi_cmd_execute): Use
9784 scoped_restore_current_language.
9785 * language.h (scoped_restore_current_language): New class.
9786
b80cf838
TT
97872017-08-03 Tom Tromey <tom@tromey.com>
9788
9789 * compile/compile.c (cleanup_unlink_file): Remove.
9790 (compile_to_object): Use gdb::unlinker.
9791 (eval_compile_command): Likewise.
9792
fad0444a
TT
97932017-08-03 Tom Tromey <tom@tromey.com>
9794
9795 * utils.h (make_cleanup_fclose): Remove.
9796 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
9797
6e7bc05c
TT
97982017-08-03 Tom Tromey <tom@tromey.com>
9799
9800 * top.c (open_terminal_stream): Return gdb_file_up.
9801 (new_ui_command): Update.
9802
4a45905b
TT
98032017-08-03 Tom Tromey <tom@tromey.com>
9804
9805 * source.c (print_source_lines_base, forward_search_command)
9806 (reverse_search_command): Use gdb_file_up.
9807
7cd06d6e
TT
98082017-08-03 Tom Tromey <tom@tromey.com>
9809
9810 * fbsd-nat.c (fbsd_find_memory_regions): Update.
9811
ed166945
TT
98122017-08-03 Tom Tromey <tom@tromey.com>
9813
9814 * cli/cli-cmds.c (find_and_open_script): Change return type.
9815 Remove "streamp" and "full_path" parameters.
9816 (source_script_with_search): Update.
9817 * auto-load.c (source_script_file): Update.
9818 * cli/cli-cmds.h (find_and_open_script): Change type.
9819 (open_script): New struct.
9820
d419f42d
TT
98212017-08-03 Tom Tromey <tom@tromey.com>
9822
9823 * xml-support.c (xml_fetch_content_from_file): Update.
9824 * ui-file.c (stdio_file::open): Update.
9825 * tracefile-tfile.c (tfile_start): Update.
9826 * remote.c (remote_file_put, remote_file_get): Update.
9827 * nat/linux-procfs.c (linux_proc_get_int)
9828 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
9829 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
9830 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
9831 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
9832 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
9833 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
9834 * linux-nat.c (linux_proc_pending_signals): Update.
9835 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
9836 (file_closer): Remove.
9837 * compile/compile.c (compile_to_object): Update.
9838 * common/filestuff.h (struct gdb_file_deleter): New.
9839 (gdb_file_up): New typedef.
9840 (gdb_fopen_cloexec): Change return type.
9841 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
9842 * cli/cli-dump.c (fopen_with_cleanup): Remove.
9843 (dump_binary_file, restore_binary_file): Update.
9844 * auto-load.c (auto_load_objfile_script_1): Update.
9845
4a2b031d
TT
98462017-08-03 Tom Tromey <tom@tromey.com>
9847
9848 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
9849 (info_static_tracepoint_markers_command): Likewise.
9850 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
9851 * skip.c (skip_info): Use ui_out_emit_table.
9852 * progspace.c (print_program_space): Use ui_out_emit_table.
9853 * osdata.c (info_osdata): Use ui_out_emit_table.
9854 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
9855 ui_out_emit_table.
9856 * linux-thread-db.c (info_auto_load_libthread_db): Use
9857 ui_out_emit_table.
9858 * inferior.c (print_inferior): Use ui_out_emit_table.
9859 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
9860 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
9861 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
9862 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
9863 * ui-out.h (class ui_out_emit_table): New.
9864
a4f320fd
MR
98652017-08-02 Maciej W. Rozycki <macro@imgtec.com>
9866
9867 * mips-tdep.c (mips_fpu_type_str): New function.
9868 (mips_dump_tdep): Call it.
9869
a2f1f308
MR
98702017-08-01 Maciej W. Rozycki <macro@imgtec.com>
9871
9872 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
9873 `->mips_fpu_type'.
9874
7e5ed83b
XR
98752017-07-31 Xavier Roirand <roirand@adacore.com>
9876
9877 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
9878
4c9dc811
XR
98792017-07-27 Xavier Roirand <roirand@adacore.com>
9880
9881 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
9882
27d41eac
YQ
98832017-07-26 Yao Qi <yao.qi@linaro.org>
9884
9885 * cli/cli-cmds.c (maintenancechecklist): New variable.
9886 * gdbcmd.h (maintenancechecklist): Declare it.
9887 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
9888 Call i386_linux_read_description with different masks.
9889 * maint.c (maintenance_check_command): New function.
9890 (_initialize_maint_cmds): Call add_prefix_cmd.
9891 * target-descriptions.c (tdesc_reg): override operator != and ==.
9892 (tdesc_type): Likewise.
9893 (tdesc_feature): Likewise.
9894 (target_desc): Likewise.
9895 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
9896 (maintenance_check_xml_descriptions): New function.
9897 (_initialize_target_descriptions) Add command "xml-descriptions".
9898 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
9899
ea03d0d3
YQ
99002017-07-26 Yao Qi <yao.qi@linaro.org>
9901
9902 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
9903 Include features/i386/32bit-*.c.
9904 (i386_linux_read_description): Generate target description if it
9905 doesn't exist.
9906 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
9907 functions.
9908 * features/i386/32bit-linux.c: Re-generated.
9909 * features/i386/32bit-sse.c: Likewise.
9910 * target-descriptions.c (print_c_feature::visit): Print code to
9911 set register number if needed.
9912 (print_c_feature) <m_next_regnum>: New field.
9913
25aa13e5
YQ
99142017-07-26 Yao Qi <yao.qi@linaro.org>
9915
9916 * features/Makefile (CFILES): Rename with TDESC_CFILES.
9917 (FEATURE_XMLFILES): New.
9918 (FEATURE_CFILES): New.
9919 New rules.
9920 (clean-cfiles): Remove generated c files.
9921 * features/i386/32bit-avx.c: Generated.
9922 * features/i386/32bit-avx512.c: Generated.
9923 * features/i386/32bit-core.c: Generated.
9924 * features/i386/32bit-linux.c: Generated.
9925 * features/i386/32bit-mpx.c: Generated.
9926 * features/i386/32bit-pkeys.c: Generated.
9927 * features/i386/32bit-sse.c: Generated.
9928 * target-descriptions.c: Include algorithm.
9929 (tdesc_element_visitor): Add method visit_end.
9930 (print_c_tdesc): Implement visit_end.
9931 (print_c_tdesc:: m_filename_after_features): Move it to
9932 protected.
9933 (print_c_feature): New class.
9934 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
9935 name starts with "i386/32bit-".
9936
6eb1e6a8
YQ
99372017-07-26 Yao Qi <yao.qi@linaro.org>
9938
9939 * target-descriptions.c (tdesc_element_visitor): New class.
9940 (tdesc_element): New class.
9941 (tdesc_reg): Inherit from tdesc_element.
9942 (tdesc_reg::accept): New function.
9943 (tdesc_type): Inherit from tdesc_element.
9944 (tdesc_type::accept): New function.
9945 (tdesc_feature): Inherit from tdesc_element.
9946 (tdesc_feature::accept): New function.
9947 (target_desc): Inherit from tdesc_element.
9948 (target_desc::target_desc): New.
9949 (target_desc::~target_desc): New.
9950 (target_desc::accept): New.
9951 (allocate_target_description): Use new.
9952 (free_target_description): Use delete.
9953 (print_c_tdesc): New class.
9954 (maint_print_c_tdesc_cmd): Adjust.
9955
9956 * features/aarch64.c: Re-generated.
9957 * features/arc-arcompact.c: Re-generated.
9958 * features/arc-v2.c: Re-generated.
9959 * features/arm/arm-with-iwmmxt.c: Re-generated.
9960 * features/arm/arm-with-m.c: Re-generated.
9961 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
9962 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
9963 * features/arm/arm-with-neon.c: Re-generated.
9964 * features/arm/arm-with-vfpv2.c: Re-generated.
9965 * features/arm/arm-with-vfpv3.c: Re-generated.
9966 * features/i386/amd64-avx-avx512.c: Re-generated.
9967 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9968 * features/i386/amd64-avx.c: Re-generated.
9969 * features/i386/amd64-avx-linux.c: Re-generated.
9970 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
9971 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9972 * features/i386/amd64-avx-mpx.c: Re-generated.
9973 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
9974 * features/i386/amd64.c: Re-generated.
9975 * features/i386/amd64-linux.c: Re-generated.
9976 * features/i386/amd64-mpx.c: Re-generated.
9977 * features/i386/amd64-mpx-linux.c: Re-generated.
9978 * features/i386/i386-avx-avx512.c: Re-generated.
9979 * features/i386/i386-avx-avx512-linux.c: Re-generated.
9980 * features/i386/i386-avx.c: Re-generated.
9981 * features/i386/i386-avx-linux.c: Re-generated.
9982 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
9983 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
9984 * features/i386/i386-avx-mpx.c: Re-generated.
9985 * features/i386/i386-avx-mpx-linux.c: Re-generated.
9986 * features/i386/i386.c: Re-generated.
9987 * features/i386/i386-linux.c: Re-generated.
9988 * features/i386/i386-mmx.c: Re-generated.
9989 * features/i386/i386-mmx-linux.c: Re-generated.
9990 * features/i386/i386-mpx.c: Re-generated.
9991 * features/i386/i386-mpx-linux.c: Re-generated.
9992 * features/i386/x32-avx-avx512.c: Re-generated.
9993 * features/i386/x32-avx-avx512-linux.c: Re-generated.
9994 * features/i386/x32-avx.c: Re-generated.
9995 * features/i386/x32-avx-linux.c: Re-generated.
9996 * features/i386/x32.c: Re-generated.
9997 * features/i386/x32-linux.c: Re-generated.
9998 * features/microblaze.c: Re-generated.
9999 * features/microblaze-with-stack-protect.c: Re-generated.
10000 * features/mips64-dsp-linux.c: Re-generated.
10001 * features/mips64-linux.c: Re-generated.
10002 * features/mips-dsp-linux.c: Re-generated.
10003 * features/mips-linux.c: Re-generated.
10004 * features/nds32.c: Re-generated.
10005 * features/nios2.c: Re-generated.
10006 * features/nios2-linux.c: Re-generated.
10007 * features/rs6000/powerpc-32.c: Re-generated.
10008 * features/rs6000/powerpc-32l.c: Re-generated.
10009 * features/rs6000/powerpc-403.c: Re-generated.
10010 * features/rs6000/powerpc-403gc.c : Re-generated.
10011 * features/rs6000/powerpc-405.c: Re-generated.
10012 * features/rs6000/powerpc-505.c: Re-generated.
10013 * features/rs6000/powerpc-601.c: Re-generated.
10014 * features/rs6000/powerpc-602.c: Re-generated.
10015 * features/rs6000/powerpc-603.c: Re-generated.
10016 * features/rs6000/powerpc-604.c: Re-generated.
10017 * features/rs6000/powerpc-64.c: Re-generated.
10018 * features/rs6000/powerpc-64l.c: Re-generated.
10019 * features/rs6000/powerpc-7400.c: Re-generated.
10020 * features/rs6000/powerpc-750.c: Re-generated.
10021 * features/rs6000/powerpc-860.c: Re-generated.
10022 * features/rs6000/powerpc-altivec32.c: Re-generated.
10023 * features/rs6000/powerpc-altivec32l.c: Re-generated.
10024 * features/rs6000/powerpc-altivec64.c: Re-generated.
10025 * features/rs6000/powerpc-altivec64l.c: Re-generated.
10026 * features/rs6000/powerpc-cell32l.c: Re-generated.
10027 * features/rs6000/powerpc-cell64l.c: Re-generated.
10028 * features/rs6000/powerpc-e500.c: Re-generated.
10029 * features/rs6000/powerpc-e500l.c: Re-generated.
10030 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
10031 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
10032 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
10033 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
10034 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
10035 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
10036 * features/rs6000/powerpc-vsx32.c: Re-generated.
10037 * features/rs6000/powerpc-vsx32l.c: Re-generated.
10038 * features/rs6000/powerpc-vsx64.c: Re-generated.
10039 * features/rs6000/powerpc-vsx64l.c: Re-generated.
10040 * features/rs6000/rs6000.c: Re-generated.
10041 * features/s390-linux32.c: Re-generated.
10042 * features/s390-linux32v1.c: Re-generated.
10043 * features/s390-linux32v2.c: Re-generated.
10044 * features/s390-linux64.c: Re-generated.
10045 * features/s390-linux64v1.c: Re-generated.
10046 * features/s390-linux64v2.c: Re-generated.
10047 * features/s390-te-linux64.c: Re-generated.
10048 * features/s390-tevx-linux64.c: Re-generated.
10049 * features/s390-vx-linux64.c: Re-generated.
10050 * features/s390x-linux64.c: Re-generated.
10051 * features/s390x-linux64v1.c: Re-generated.
10052 * features/s390x-linux64v2.c: Re-generated.
10053 * features/s390x-te-linux64.c: Re-generated.
10054 * features/s390x-tevx-linux64.c: Re-generated.
10055 * features/s390x-vx-linux64.c: Re-generated.
10056 * features/sparc/sparc32-solaris.c: Re-generated.
10057 * features/sparc/sparc64-solaris.c: Re-generated.
10058 * features/tic6x-c62x.c: Re-generated.
10059 * features/tic6x-c62x-linux.c: Re-generated.
10060 * features/tic6x-c64x.c: Re-generated.
10061 * features/tic6x-c64x-linux.c: Re-generated.
10062 * features/tic6x-c64xp.c: Re-generated.
10063 * features/tic6x-c64xp-linux.c: Re-generated.
10064
35b4818d
YQ
100652017-07-26 Yao Qi <yao.qi@linaro.org>
10066
10067 * i386-linux-tdep.c (i386_linux_read_description): New function.
10068 (i386_linux_core_read_description): Call
10069 i386_linux_read_description.
10070 * i386-linux-tdep.h (i386_linux_read_description): Declare.
10071 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
10072 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
10073 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
10074 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
10075 * x86-linux-nat.c (x86_linux_read_description): Call
10076 i386_linux_read_description.
10077
8e2141c6
YQ
100782017-07-26 Yao Qi <yao.qi@linaro.org>
10079
10080 * NEWS: Mention it.
10081 * features/Makefile (%.c: %.xml): Pass the xml file name to
10082 command "maint print c-tdesc".
10083 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
10084 name from 'arg'.
10085
b468ff4c
YQ
100862017-07-26 Yao Qi <yao.qi@linaro.org>
10087
10088 * target-descriptions.c (target_desc): Add ctor and dtor. Do
10089 in-class initialization.
10090 (tdesc_create_feature): Call new instead of XCNEW.
10091 (free_target_description): Ue delete.
10092
b9c0e1b4
JB
100932017-07-25 John Baldwin <jhb@FreeBSD.org>
10094
10095 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
10096
a04b5337
YQ
100972017-07-25 Yao Qi <yao.qi@linaro.org>
10098
10099 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
10100 constant.
10101 (amd64_x32_init_abi): Likewise.
10102 * amd64-tdep.h (amd64_init_abi): Update declaration.
10103 (amd64_x32_init_abi): Likewise.
10104
02ad7fc2
YQ
101052017-07-25 Yao Qi <yao.qi@linaro.org>
10106
10107 PR tdep/21717
10108 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
10109 condition for FPSCR.
10110 (arm_linux_store_inferior_registers): Likewise.
10111
b6f48cb0
TT
101122017-07-22 Tom Tromey <tom@tromey.com>
10113
10114 * break-catch-syscall.c (struct catch_syscall_inferior_data)
10115 <syscalls_counts>: Now a std::vector.
10116 (get_catch_syscall_inferior_data): Use "new".
10117 (catch_syscall_inferior_data_cleanup): Use "delete".
10118 (insert_catch_syscall, remove_catch_syscall)
10119 (clear_syscall_counts): Update.
10120
e12c9b7a
TT
101212017-07-22 Tom Tromey <tom@tromey.com>
10122
10123 * break-catch-syscall.c (syscall_catchpoint)
10124 <syscalls_to_be_caught>: Now a std::vector<int>
10125 (~syscall_catchpoint): Remove.
10126 (insert_catch_syscall, remove_catch_syscall)
10127 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
10128 (print_mention_catch_syscall, print_recreate_catch_syscall):
10129 Update.
10130 (create_syscall_event_catchpoint): Change type of "filter"
10131 parameter.
10132 (catch_syscall_split_args): Return a std::vector.
10133 (catch_syscall_command_1, catching_syscall_number_1): Update.
10134
4fa8aeac
TT
101352017-07-22 Tom Tromey <tom@tromey.com>
10136
10137 * break-catch-throw.c (struct exception_catchpoint)
10138 <exception_rx>: Now a std::string.
10139 (~exception_catchpoint): Remove.
10140 (print_one_detail_exception_catchpoint): Update.
10141 (handle_gnu_v3_exceptions): Change type of except_rx.
10142 (extract_exception_regexp): Return a std::string.
10143 (catch_exception_command_1): Update.
10144
f746a154
TT
101452017-07-22 Tom Tromey <tom@tromey.com>
10146
10147 * break-catch-sig.c (gdb_signal_type): Remove typedef.
10148 (struct signal_catchpoint) <signals_to_be_caught>: Now a
10149 std::vector.
10150 <catch_all>: Now a bool.
10151 (~signal_catchpoint): Remove.
10152 (signal_catchpoint_insert_location)
10153 (signal_catchpoint_remove_location)
10154 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
10155 (signal_catchpoint_print_mention)
10156 (signal_catchpoint_print_recreate)
10157 (signal_catchpoint_explains_signal): Update.
10158 (create_signal_catchpoint): Change type of "filter" and
10159 "catch_all".
10160 (catch_signal_split_args): Return a std::vector. Change type of
10161 "catch_all".
10162 (catch_signal_command): Update.
10163
47e77640
PA
101642017-07-20 Pedro Alves <palves@redhat.com>
10165
10166 * ada-lang.c (ada_language_defn): Make extern.
10167 (_initialize_ada_language): Remove add_language call.
10168 * c-lang.c (c_language_defn, cplus_language_defn)
10169 (asm_language_defn, minimal_language_defn): Make extern.
10170 (_initialize_c_language): Delete.
10171 * completer.c (compare_cstrings): Delete, moved to utils.h.
10172 * d-lang.c (d_language_defn): Make extern.
10173 (_initialize_d_language): Remove add_language calls.
10174 * defs.h (enum language): Add comment.
10175 * f-lang.c (f_language_defn): Make extern.
10176 (_initialize_f_language): Remove add_language call.
10177 * go-lang.c (go_language_defn): Make extern.
10178 (_initialize_go_language): Remove add_language call.
10179 * language.c: Include <algorithm>.
10180 (languages): Redefine as const array.
10181 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
10182 (set_language_command): Handle "local". Use for-range loop.
10183 (set_language): Remove loop.
10184 (language_enum): Rewrite.
10185 (language_def, language_str): Remove loops.
10186 (add_language): Delete.
10187 (add_set_language_command): New, based on add_languages.
10188 (skip_language_trampoline): Adjust.
10189 (local_language_defn): Delete.
10190 (language_gdbarch_post_init): Adjust.
10191 (_initialize_language): Remove add_language calls. Call
10192 add_set_language_command.
10193 * language.h (add_language): Delete.
10194 (auto_language_defn)
10195 (unknown_language_defn, minimal_language_defn, ada_language_defn)
10196 (asm_language_defn, c_language_defn, cplus_language_defn)
10197 (d_language_defn, f_language_defn, go_language_defn)
10198 (m2_language_defn, objc_language_defn, opencl_language_defn)
10199 (pascal_language_defn, rust_language_defn): Declare.
10200 * m2-lang.c (m2_language_defn): Make extern.
10201 (_initialize_m2_language): Remove add_language call.
10202 * objc-lang.c (objc_language_defn): Make extern.
10203 (_initialize_objc_language): Remove add_language call.
10204 * opencl-lang.c (opencl_language_defn): Make extern.
10205 (_initialize_opencl_language): Remove add_language call.
10206 * p-lang.c (pascal_language_defn): Make extern.
10207 (_initialize_pascal_language): Delete.
10208 * rust-lang.c (rust_language_defn): Make extern.
10209 (_initialize_rust_language): Delete.
10210 * utils.h (compare_cstrings): New static inline function.
10211
edb0c9cb
PA
102122017-07-20 Pedro Alves <palves@redhat.com>
10213
10214 * ada-lang.c (ada_to_fixed_type_1): Adjust.
10215 (get_var_value): Constify parameters.
10216 (get_int_var_value): Change prototype.
10217 (to_fixed_range_type): Adjust.
10218 * ada-lang.h (get_int_var_value): Change prototype.
10219
a778f165
PA
102202017-07-20 Pedro Alves <palves@redhat.com>
10221
10222 * dwarf2read.c (dw2_lookup_symbol): Use
10223 SYMBOL_MATCHES_SEARCH_NAME.
10224 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
10225
42edd901
PA
102262017-07-20 Pedro Alves <palves@redhat.com>
10227
10228 * block.c (block_iter_name_step, block_iter_name_first)
10229 (block_iter_name_next): Delete.
10230 (block_lookup_symbol_primary): Adjust to use
10231 dict_iter_match_first/dict_iter_match_next.
10232 * block.h (block_iter_name_first, block_iter_name_next): Delete
10233 declarations.
10234 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
10235 dict_iter_match_first/dict_iter_match_next.
10236
cf325299
PA
102372017-07-20 Pedro Alves <palves@redhat.com>
10238
10239 * cp-support.c (cp_find_first_component_aux): Add missing case for
10240 end of string.
10241
c5ed0576
DB
102422017-07-18 David Blaikie <dblaikie@gmail.com>
10243
10244 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
10245 of dwo_cu's dwo_file.
10246
27841e76
YQ
102472017-07-18 Yao Qi <yao.qi@linaro.org>
10248
10249 * remote.c (store_registers_using_G): Remove one line comment.
10250
cfb7e58b
YQ
102512017-07-18 Yao Qi <yao.qi@linaro.org>
10252
10253 * regcache.c (regcache_cpy): Simplify it.
10254 (regcache::cpy_no_passthrough): Remove it.
10255 * regcache.h (cpy_no_passthrough): Remove it.
10256 (regcache_dup, regcache_cpy): Update comments.
10257
386535dd
PA
102582017-07-18 Pedro Alves <palves@redhat.com>
10259
10260 * remote-sim.c (sim_command_completer): Adjust to work with a
10261 completion_tracker instead of a VEC.
10262
c45ec17c
PA
102632017-07-17 Pedro Alves <palves@redhat.com>
10264
10265 * completer.c (complete_source_filenames): New function.
10266 (complete_address_and_linespec_locations): New function.
10267 (location_completer): Use complete_address_and_linespec_locations.
10268 (completion_tracker::build_completion_result): Honor the tracker's
10269 request to suppress append.
10270 * completer.h (completion_tracker::suppress_append_ws)
10271 (completion_tracker::set_suppress_append_ws): New methods.
10272 (completion_tracker::m_suppress_append_ws): New field.
10273 (complete_source_filenames): New declaration.
10274 * linespec.c (linespec_complete_what): New.
10275 (struct ls_parser) <complete_what, completion_word,
10276 completion_quote_char, completion_quote_end, completion_tracker>:
10277 New fields.
10278 (string_find_incomplete_keyword_at_end): New.
10279 (linespec_lexer_lex_string): Record quote char. If in completion
10280 mode, don't throw.
10281 (linespec_lexer_consume_token): Advance the completion word point.
10282 (linespec_lexer_peek_token): Save/restore completion info.
10283 (save_stream_and_consume_token): New.
10284 (set_completion_after_number): New.
10285 (linespec_parse_basic): Set what to complete next depending on
10286 token. Handle function and label completions specially.
10287 (parse_linespec): Disable objc shortcut in completion mode. Set
10288 what to complete next depending on token type. Skip keyword if in
10289 completion mode.
10290 (complete_linespec_component, linespec_complete): New.
10291 * linespec.h (linespec_complete): Declare.
10292
be966d42
PA
102932017-07-17 Pedro Alves <palves@redhat.com>
10294
10295 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
10296 Handle 'operator<' / 'operator<<'.
10297
a2459270
PA
102982017-07-17 Pedro Alves <palves@redhat.com>
10299
10300 * completer.c (collect_explicit_location_matches): Handle
10301 MATCH_LABEL.
10302 (convert_explicit_location_to_linespec): New, factored out from
10303 ...
10304 (convert_explicit_location_to_sals): ... this.
10305 (complete_label): New.
10306 (linespec_complete_label, find_label_symbols_in_block): New.
10307 (find_label_symbols): Add completion_mode parameter and adjust to
10308 call find_label_symbols_in_block.
10309 * linespec.h (linespec_complete_label): Declare.
10310
c6756f62
PA
103112017-07-17 Pedro Alves <palves@redhat.com>
10312
10313 * ada-lang.c (ada_collect_symbol_completion_matches): Add
10314 complete_symbol_mode parameter.
10315 * cli/cli-cmds.c (complete_command): Get the completion result out
10316 of the handle_brkchars tracker if used a custom word point.
10317 * completer.c: Include "linespec.h".
10318 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
10319 (advance_to_expression_complete_word_point): New.
10320 (completion_tracker::completes_to_completion_word): New.
10321 (complete_files_symbols): Pass down
10322 complete_symbol_mode::EXPRESSION.
10323 (explicit_options, probe_options): New.
10324 (collect_explicit_location_matches): Complete on the
10325 explictit_loc->foo instead of word. Use
10326 linespec_complete_function. Handle MATCH_LINE. Handle offering
10327 keyword and options completions.
10328 (backup_text_ptr): Delete.
10329 (skip_keyword): New.
10330 (complete_explicit_location): Remove 'word' parameter. Add
10331 language, quoted_arg_start and quoted_arg_end parameters.
10332 Rewrite, parsing left to right.
10333 (location_completer): Rewrite.
10334 (location_completer_handle_brkchars): New function.
10335 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
10336 (enum complete_line_internal_reason): Adjust comments.
10337 (completion_tracker::discard_completions): New.
10338 (completer_handle_brkchars_func_for_completer): Handle
10339 location_completer.
10340 (gdb_custom_word_point_brkchars)
10341 (gdb_org_rl_basic_quote_characters): New.
10342 (gdb_completion_word_break_characters_throw)
10343 (completion_find_completion_word): Handle trackers that use a
10344 custom word point.
10345 (completion_tracker::advance_custom_word_point_by): New.
10346 (completion_tracker::build_completion_result): Don't rely on
10347 readline appending the quote char.
10348 (gdb_rl_attempted_completion_function_throw): Handle trackers that
10349 use a custom word point.
10350 (gdb_rl_attempted_completion_function): Restore
10351 rl_basic_quote_characters.
10352 * completer.h (class completion_tracker): Extend intro comment.
10353 (completion_tracker::set_quote_char)
10354 (completion_tracker::quote_char)
10355 (completion_tracker::set_use_custom_word_point)
10356 (completion_tracker::use_custom_word_point)
10357 (completion_tracker::custom_word_point)
10358 (completion_tracker::set_custom_word_point)
10359 (completion_tracker::advance_custom_word_point_by)
10360 (completion_tracker::completes_to_completion_word)
10361 (completion_tracker::discard_completions): New methods.
10362 (completion_tracker::m_quote_char)
10363 (completion_tracker::m_use_custom_word_point)
10364 (completion_tracker::m_custom_word_point): New fields.
10365 (advance_to_expression_complete_word_point): Declare.
10366 * f-lang.c (f_collect_symbol_completion_matches): Add
10367 complete_symbol_mode parameter.
10368 * language.h (struct language_defn)
10369 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
10370 parameter.
10371 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
10372 (linespec_complete_function): New function.
10373 (linespec_lexer_lex_keyword): Adjust.
10374 * linespec.h (linespec_keywords, linespec_complete_function): New
10375 declarations.
10376 * location.c (find_end_quote): New function.
10377 (explicit_location_lex_one): Add explicit_completion_info
10378 parameter. Save quoting info. Don't throw if being called for
10379 completion. Don't handle Ada operators here.
10380 (is_cp_operator, skip_op_false_positives, first_of)
10381 (explicit_location_lex_one_function): New function.
10382 (string_to_explicit_location): Replace 'dont_throw' parameter with
10383 an explicit_completion_info pointer parameter. Handle it. Don't
10384 use explicit_location_lex_one to lex function names. Use
10385 explicit_location_lex_one_function instead.
10386 * location.h (struct explicit_completion_info): New.
10387 (string_to_explicit_location): Replace 'dont_throw' parameter with
10388 an explicit_completion_info pointer parameter.
10389 * symtab.c (default_collect_symbol_completion_matches_break_on):
10390 Add complete_symbol_mode parameter. Handle LINESPEC mode.
10391 (default_collect_symbol_completion_matches)
10392 (collect_symbol_completion_matches): Add complete_symbol_mode
10393 parameter.
10394 (collect_symbol_completion_matches_type): Pass down
10395 complete_symbol_mode::EXPRESSION.
10396 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10397 parameter. Handle LINESPEC mode.
10398 * symtab.h (complete_symbol_mode): New.
10399 (default_collect_symbol_completion_matches_break_on)
10400 (default_collect_symbol_completion_matches)
10401 (collect_symbol_completion_matches)
10402 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10403 parameter.
10404
1d550c82
PA
104052017-07-17 Pedro Alves <palves@redhat.com>
10406
10407 * utils.c (enum class strncmp_iw_mode): New.
10408 (strcmp_iw): Rename to ...
10409 (strncmp_iw_with_mode): ... this. Add string2_len and mode
10410 parameters. Handle them.
10411 (strncmp_iw): New.
10412 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
10413 * utils.h (strncmp_iw): Declare.
10414 (strcmp_iw): Move describing comments here.
10415
8090b426
PA
104162017-07-17 Pedro Alves <palves@redhat.com>
10417
10418 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
10419 CP_OPERATOR_STR.
10420 * c-typeprint.c (is_type_conversion_operator): Use
10421 CP_OPERATOR_STR.
10422 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
10423 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
10424 CP_OPERATOR_LEN.
10425 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
10426 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
10427 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
10428 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
10429 CP_OPERATOR_STR.
10430 * location.c: Include "cp-support.h".
10431 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
10432 CP_OPERATOR_STR.
10433 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
10434 CP_OPERATOR_LEN.
10435
6a2c1b87
PA
104362017-07-17 Pedro Alves <palves@redhat.com>
10437
10438 * cli/cli-cmds.c (complete_command): Use a completion tracker
10439 along with completion_find_completion_word for handle_brkchars
10440 phase.
10441 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
10442 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
10443 (struct gdb_rl_completion_word_info): New.
10444 (gdb_rl_find_completion_word): New.
10445 (completion_find_completion_word): New.
10446 * completer.h (completion_find_completion_word): Declare.
10447
eb3ff9a5
PA
104482017-07-17 Pedro Alves <palves@redhat.com>
10449
10450 * ada-lang.c (symbol_completion_match): Adjust comments.
10451 (symbol_completion_add): Replace vector parameter with
10452 completion_tracker parameter. Use it.
10453 (ada_make_symbol_completion_list): Rename to...
10454 (ada_collect_symbol_completion_matches): ... this. Add
10455 completion_tracker parameter and use it.
10456 (ada_language_defn): Adjust.
10457 * break-catch-syscall.c (catch_syscall_completer): Adjust
10458 prototype and work with completion_tracker instead of VEC.
10459 * breakpoint.c (condition_completer): Adjust prototype and work
10460 with completion_tracker instead of VEC.
10461 * c-lang.c (c_language_defn, cplus_language_defn)
10462 (asm_language_defn, minimal_language_defn): Adjust to renames.
10463 * cli/cli-cmds.c (complete_command): Rework using
10464 completion_tracker. Catch exceptions when completing.
10465 * cli/cli-decode.c (integer_unlimited_completer)
10466 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
10467 with completion_tracker instead of VEC.
10468 * command.h (struct completion_tracker): Forward declare.
10469 (completer_ftype, completer_handle_brkchars_ftype): Change
10470 types.
10471 (complete_on_cmdlist, complete_on_enum): Adjust.
10472 * completer.c: Include <algorithm>.
10473 (struct gdb_completer_state): New.
10474 (current_completion): New global.
10475 (readline_line_completion_function): Delete.
10476 (noop_completer, filename_completer)
10477 (filename_completer_handle_brkchars, complete_files_symbols)
10478 (linespec_location_completer): Adjust to work with a
10479 completion_tracker instead of a VEC.
10480 (string_or_empty): New.
10481 (collect_explicit_location_matches): Adjust to work with a
10482 completion_tracker instead of a VEC.
10483 (explicit_location_completer): Rename to ...
10484 (complete_explicit_location): ... this and adjust to work with a
10485 completion_tracker instead of a VEC.
10486 (location_completer): Adjust to work with a completion_tracker
10487 instead of a VEC.
10488 (add_struct_fields): Adjust to work with a completion_list instead
10489 of VEC.
10490 (expression_completer): Rename to ...
10491 (complete_expression): ... this and adjust to work with a
10492 completion_tracker instead of a VEC. Use complete_files_symbols.
10493 (expression_completer): Reimplement on top of complete_expression.
10494 (symbol_completer): Adjust to work with a completion_tracker
10495 instead of a VEC.
10496 (enum complete_line_internal_reason): Add describing comments.
10497 (complete_line_internal_normal_command): Adjust to work with a
10498 completion_tracker instead of a VEC.
10499 (complete_line_internal): Rename to ...
10500 (complete_line_internal_1): ... this and adjust to work with a
10501 completion_tracker instead of a VEC. Assert TEXT is NULL in the
10502 handle_brkchars phase.
10503 (new_completion_tracker): Delete.
10504 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
10505 complete_line_internal_1.
10506 (free_completion_tracker): Delete.
10507 (INITIAL_COMPLETION_HTAB_SIZE): New.
10508 (completion_tracker::completion_tracker)
10509 (completion_tracker::~completion_tracker): New.
10510 (maybe_add_completion): Delete.
10511 (completion_tracker::maybe_add_completion)
10512 (completion_tracker::add_completion)
10513 (completion_tracker::add_completions): New.
10514 (throw_max_completions_reached_error): Delete.
10515 (complete_line): Adjust to work with a completion_tracker instead
10516 of a VEC. Don't create a completion_tracker_t or check for max
10517 completions here.
10518 (command_completer, command_completer_handle_brkchars)
10519 (signal_completer, reg_or_group_completer_1)
10520 (reg_or_group_completer, default_completer_handle_brkchars):
10521 Adjust to work with a completion_tracker.
10522 (gdb_completion_word_break_characters_throw): New.
10523 (gdb_completion_word_break_characters): Reimplement.
10524 (line_completion_function): Delete.
10525 (completion_tracker::recompute_lowest_common_denominator)
10526 (expand_preserving_ws)
10527 (completion_tracker::build_completion_result)
10528 (completion_result::completion_result)
10529 (completion_result::completion_result)
10530 (completion_result::~completion_result)
10531 (completion_result::completion_result)
10532 (completion_result::release_match_list, compare_cstrings)
10533 (completion_result::sort_match_list)
10534 (completion_result::reset_match_list)
10535 (gdb_rl_attempted_completion_function_throw)
10536 (gdb_rl_attempted_completion_function): New.
10537 * completer.h (completion_list, struct completion_result)
10538 (class completion_tracker): New.
10539 (complete_line): Add completion_tracker parameter.
10540 (readline_line_completion_function): Delete.
10541 (gdb_rl_attempted_completion_function): New.
10542 (noop_completer, filename_completer, expression_completer)
10543 (location_completer, symbol_completer, command_completer)
10544 (signal_completer, reg_or_group_completer): Update prototypes.
10545 (completion_tracker_t, new_completion_tracker)
10546 (make_cleanup_free_completion_tracker): Delete.
10547 (enum maybe_add_completion_enum): Delete.
10548 (maybe_add_completion): Delete.
10549 (throw_max_completions_reached_error): Delete.
10550 * corefile.c (complete_set_gnutarget): Adjust to work with a
10551 completion_tracker instead of a VEC.
10552 * cp-abi.c (cp_abi_completer): Adjust to work with a
10553 completion_tracker instead of a VEC.
10554 * d-lang.c (d_language_defn): Adjust.
10555 * disasm.c (disassembler_options_completer): Adjust to work with a
10556 completion_tracker instead of a VEC.
10557 * f-lang.c (f_make_symbol_completion_list): Rename to ...
10558 (f_collect_symbol_completion_matches): ... this. Adjust to work
10559 with a completion_tracker instead of a VEC.
10560 (f_language_defn): Adjust.
10561 * go-lang.c (go_language_defn): Adjust.
10562 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
10563 Adjust to work with a completion_tracker instead of a VEC.
10564 * infrun.c (handle_completer): Likewise.
10565 * interps.c (interpreter_completer): Likewise.
10566 * interps.h (interpreter_completer): Likewise.
10567 * language.c (unknown_language_defn, auto_language_defn)
10568 (local_language_defn): Adjust.
10569 * language.h (language_defn::la_make_symbol_completion_list):
10570 Rename to ...
10571 (language_defn::la_collect_symbol_completion_matches): ... this
10572 and adjust to work with a completion_tracker instead of a VEC.
10573 * m2-lang.c (m2_language_defn): Adjust.
10574 * objc-lang.c (objc_language_defn): Adjust.
10575 * opencl-lang.c (opencl_language_defn): Adjust.
10576 * p-lang.c (pascal_language_defn): Adjust.
10577 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
10578 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
10579 with a completion_tracker.
10580 * rust-lang.c (rust_language_defn): Adjust.
10581 * symtab.c (free_completion_list, do_free_completion_list)
10582 (return_val, completion_tracker): Delete.
10583 (completion_list_add_name, completion_list_add_symbol)
10584 (completion_list_add_msymbol, completion_list_objc_symbol)
10585 (completion_list_add_fields, add_symtab_completions): Add
10586 completion_tracker parameter and use it.
10587 (default_make_symbol_completion_list_break_on_1): Rename to...
10588 (default_collect_symbol_completion_matches_break_on): ... this.
10589 Add completion_tracker parameter and use it instead of allocating
10590 a completion tracker here.
10591 (default_make_symbol_completion_list_break_on): Delete old
10592 implementation.
10593 (default_make_symbol_completion_list): Delete.
10594 (default_collect_symbol_completion_matches): New.
10595 (make_symbol_completion_list): Delete.
10596 (collect_symbol_completion_matches): New.
10597 (make_symbol_completion_type): Rename to ...
10598 (collect_symbol_completion_matches_type): ... this. Add
10599 completion_tracker parameter and use it instead of VEC.
10600 (make_file_symbol_completion_list_1): Rename to...
10601 (collect_file_symbol_completion_matches): ... this. Add
10602 completion_tracker parameter and use it instead of VEC.
10603 (make_file_symbol_completion_list): Delete.
10604 (add_filename_to_list): Use completion_list instead of a VEC.
10605 (add_partial_filename_data::list): Now a completion_list.
10606 (make_source_files_completion_list): Work with a completion_list
10607 instead of a VEC.
10608 * symtab.h: Include "completer.h".
10609 (default_make_symbol_completion_list_break_on)
10610 (default_make_symbol_completion_list, make_symbol_completion_list)
10611 (make_symbol_completion_type, make_file_symbol_completion_list)
10612 (make_source_files_completion_list): Delete.
10613 (default_collect_symbol_completion_matches_break_on)
10614 (default_collect_symbol_completion_matches)
10615 (collect_symbol_completion_matches)
10616 (collect_symbol_completion_matches_type)
10617 (collect_file_symbol_completion_matches)
10618 (make_source_files_completion_list): New.
10619 * top.c (init_main): Don't install a rl_completion_entry_function
10620 hook. Install a rl_attempted_completion_function hook instead.
10621 * tui/tui-layout.c (layout_completer): Adjust to work with a
10622 completion_tracker.
10623 * tui/tui-regs.c (tui_reggroup_completer):
10624 * tui/tui-win.c (window_name_completer, focus_completer)
10625 (winheight_completer): Adjust to work with a completion_tracker.
10626 * value.c: Include "completer.h".
10627 (complete_internalvar): Adjust to work with a completion_tracker.
10628 * value.h (complete_internalvar): Likewise.
10629
6e1dbf8c
PA
106302017-07-17 Pedro Alves <palves@redhat.com>
10631
10632 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
10633 renames.
10634 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
10635 comments to completer_ftype's declaration.
10636 <completer_handle_brkchars>: Change type to
10637 completer_handle_brkchars_ftype.
10638 * command.h (completer_ftype): Add describing comment and give
10639 names to parameters.
10640 (completer_ftype_void): Rename to ...
10641 (completer_handle_brkchars_ftype) ... this. Add describing comment.
10642 (set_cmd_completer_handle_brkchars): Adjust.
10643 * completer.c (filename_completer_handle_brkchars): New function.
10644 (complete_line_internal_normal_command): New function, factored
10645 out from ...
10646 (complete_line_internal): ... here.
10647 (command_completer_handle_brkchars)
10648 (default_completer_handle_brkchars)
10649 (completer_handle_brkchars_func_for_completer): New functions.
10650 * completer.h (set_gdb_completion_word_break_characters): Delete
10651 declaration.
10652 (completer_handle_brkchars_func_for_completer): New declaration.
10653 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
10654 completer_handle_brkchars_func_for_completer.
10655
78b13106
PA
106562017-07-17 Pedro Alves <palves@redhat.com>
10657
10658 * completer.c (symbol_completer): New function, based on
10659 make_symbol_completion_list_fn.
10660 * completer.h (symbol_completer): New declaration.
10661 * guile/scm-cmd.c (cmdscm_completers): Adjust.
10662 * python/py-cmd.c (completers): Adjust.
10663 * symtab.c (make_symbol_completion_list_fn): Delete.
10664 * symtab.h (make_symbol_completion_list_fn): Delete.
10665 * cli/cli-decode.c (add_cmd): Adjust.
10666
bbf2f4df
PA
106672017-07-17 Pedro Alves <palves@redhat.com>
10668
10669 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
10670 * dwarf2read.c: Include "filename-seen-cache.h".
10671 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
10672 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
10673 * filename-seen-cache.c: New file.
10674 * filename-seen-cache.h: New file.
10675 * symtab.c: Include "filename-seen-cache.h".
10676 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
10677 (create_filename_seen_cache, clear_filename_seen_cache)
10678 (delete_filename_seen_cache, filename_seen): Delete, parts moved
10679 to filename-seen-cache.h/filename-seen-cache.c.
10680 (output_source_filename, sources_info)
10681 (maybe_add_partial_symtab_filename)
10682 (make_source_files_completion_list): Adjust to use
10683 filename_seen_cache.
10684
330cdd98
PA
106852017-07-17 Pedro Alves <palves@redhat.com>
10686
10687 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
10688 fields.
10689 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
10690 dwarf2_debug_sections*)): New.
10691 (dwarf2_per_objfile::dwarf2_per_objfile(const
10692 dwarf2_per_objfile&)): Declare as deleted.
10693 (dwarf2_per_objfile::operator=): Declare as deleted.
10694 (dwarf2_per_objfile::dwarf2_per_objfile)
10695 (dwarf2_per_objfile::~dwarf2_per_objfile)
10696 (dwarf2_per_objfile::free_cached_comp_units): New.
10697 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
10698 ctor. Call dwarf2_per_objfile's ctor manually.
10699 (dwarf2_locate_sections): Deleted/refactored as ...
10700 (dwarf2_per_objfile::locate_sections): ... this new method.
10701 (free_cached_comp_units): Defer to
10702 dwarf2_per_objfile::free_cached_comp_units.
10703 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
10704
8880f2a9
TT
107052017-07-14 Tom Tromey <tom@tromey.com>
10706
10707 PR rust/21764:
10708 * rust-exp.y (convert_ast_to_expression): Add "want_type"
10709 parameter.
10710 <UNOP_SIZEOF>: Split into separate case.
10711 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
10712
65547233
TT
107132017-07-14 Tom Tromey <tom@tromey.com>
10714
10715 PR rust/21763:
10716 * symtab.c (symbol_matches_domain): Add language_rust to special
10717 case.
10718 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
10719 treat LOC_TYPEDEF symbols as variables.
10720
8f14146e
PA
107212017-07-14 Pedro Alves <palves@redhat.com>
10722
10723 * symtab.c (make_file_symbol_completion_list_1): Iterate over
10724 symtabs matching all symtabs with SRCFILE as file name instead of
10725 only considering the first hit, with lookup_symtab.
10726
2347965c
SM
107272017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10728
10729 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
10730 operator_name parameters.
10731 (gen_expr): Update function call.
10732
40f4af28
SM
107332017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10734
10735 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
10736 parameter.
10737 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
10738 Likewise.
10739 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
10740 parameter, use agent_expr::gdbarch instead, update function
10741 calls.
10742 (locexpr_tracepoint_var_ref): Likewise.
10743 (loclist_tracepoint_var_ref): Likewise.
10744 * ax-gdb.c (gen_trace_static_fields): Likewise.
10745 (gen_traced_pop): Likewise.
10746 (gen_frame_args_address): Likewise.
10747 (gen_frame_locals_address): Likewise.
10748 (gen_var_ref): Likewise.
10749 (gen_struct_ref_recursive): Likewise.
10750 (gen_static_field): Likewise.
10751 (gen_maybe_namespace_elt): Likewise.
10752 (gen_expr): Likewise.
10753 (gen_trace_for_var): Likewise.
10754 (gen_trace_for_expr): Likewise.
10755 (gen_trace_for_return_address): Likewise.
10756
053f8057
SM
107572017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10758
10759 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
10760 parameter.
10761 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
10762
6661ad48
SM
107632017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10764
10765 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
10766 from ax, update calls.
10767 (gen_usual_arithmetic): Likewise.
10768 (gen_integral_promotions): Likewise.
10769 (gen_bitfield_ref): Likewise.
10770 (gen_primitive_field): Likewise.
10771 (gen_struct_ref_recursive): Likewise.
10772 (gen_struct_ref): Likewise.
10773 (gen_maybe_namespace_elt): Likewise.
10774 (gen_struct_elt_for_reference): Likewise.
10775 (gen_namespace_elt): Likewise.
10776 (gen_aggregate_elt_ref): Likewise.
10777 (gen_expr): Get gdbarch from ax, update calls.
10778 (gen_expr_binop_rest): Likewise.
10779
c55a47e7
PA
107802017-07-13 Pedro Alves <palves@redhat.com>
10781
10782 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
10783 as default tdesc.
10784 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
10785 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
10786 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
10787 tdesc_amd64_linux as default tdesc. Get final tdesc from the
10788 tdep.
10789 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
10790 Get final tdesc from the tdep.
10791 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
10792 default tdesc.
10793 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
10794 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
10795 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
10796 Use it as default tdesc.
10797 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
10798 down to amd_init_abi. No longer handle fallback tdesc here.
10799 * amd64-tdep.h (tdesc_x32): Declare.
10800 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
10801 parameter.
10802 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
10803 as default tdesc.
10804
55efceab
AA
108052017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10806
10807 * s390-linux-tdep.c (s390_process_record): Add support for
10808 instructions new in arch12.
10809
0aa37b65
JB
108102017-07-11 John Baldwin <jhb@FreeBSD.org>
10811
10812 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
10813 PT_GETFSBASE and PT_GETGSBASE.
10814 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
10815 PT_SETGSBASE.
10816
48aeef91
JB
108172017-07-11 John Baldwin <jhb@FreeBSD.org>
10818
10819 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
10820 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
10821 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
10822 those rules.
10823 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
10824 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
10825 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
10826 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
10827 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
10828 * features/i386/amd64.xml: Add 64bit-segments.xml.
10829 * features/i386/amd64-avx-avx512.c: Regenerated.
10830 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
10831 * features/i386/amd64-avx-mpx.c: Regenerated.
10832 * features/i386/amd64-avx.c: Regenerated.
10833 * features/i386/amd64-mpx.c: Regenerated.
10834 * features/i386/amd64.c: Regenerated.
10835 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
10836 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10837 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
10838 * regformats/i386/amd64-avx.dat: Regenerated.
10839 * regformats/i386/amd64-mpx.dat: Regenerated.
10840 * regformats/i386/amd64.dat: Regenerated.
10841
77c501bc
YQ
108422017-07-10 Yao Qi <yao.qi@linaro.org>
10843
10844 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10845 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10846
6dc8d757
AK
108472017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
10848
10849 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
10850 unsetenv.
10851 * gnulib/aclocal.m4: Regenerate.
10852 * gnulib/config.in: Regenerate.
10853 * gnulib/configure: Regenerate.
10854 * gnulib/import/Makefile.am: Regenerate.
10855 * gnulib/import/Makefile.in: Regenerate.
10856 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
10857 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
10858 * gnulib/import/m4/environ.m4: New file.
10859 * gnulib/import/m4/setenv.m4: New file.
10860 * gnulib/import/setenv.c: New file.
10861 * gnulib/import/unsetenv.c: New file.
10862
266934d1
SM
108632017-07-09 Simon Marchi <simon.marchi@ericsson.com>
10864
10865 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
10866 address when op is DW_OP_addr.
10867
03278692
TT
108682017-07-09 Tom Tromey <tom@tromey.com>
10869
10870 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
10871 check and apply to outer type.
10872
4b654465
JB
108732017-07-07 John Baldwin <jhb@FreeBSD.org>
10874
10875 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
10876 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
10877 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
10878 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
10879
2af9fc44
JB
108802017-07-07 John Baldwin <jhb@FreeBSD.org>
10881
10882 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
10883
382b69bb
JB
108842017-07-07 John Baldwin <jhb@FreeBSD.org>
10885
10886 * corelow.c (get_core_siginfo): Remove.
10887 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
10888 instead of get_core_siginfo.
10889 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
10890 * gdbarch.h: Re-generate.
10891 * gdbarch.c: Re-generate.
10892 * linux-tdep.c (linux_core_xfer_siginfo): New.
10893 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
10894
6e5eab33
JB
108952017-07-07 John Baldwin <jhb@FreeBSD.org>
10896
10897 * corelow.c (thread_section_name): Move to ...
10898 * gdbcore.h (thread_section_name): ... here.
10899
929edea9
JB
109002017-07-07 John Baldwin <jhb@FreeBSD.org>
10901
10902 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
10903 (struct siginfo32): New.
10904 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
10905 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
10906 via ptrace(PT_LWPINFO).
10907
762c974a
JB
109082017-07-07 John Baldwin <jhb@FreeBSD.org>
10909
10910 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
10911 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
10912 (fbsd_get_siginfo_type): New.
10913 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
10914 (_initialize_fbsd_tdep): New.
10915
33c5cd75
DB
109162017-07-06 David Blaikie <dblaikie@gmail.com>
10917
10918 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
10919 a singular dwo_unit*) to support multiple CUs in the same way that
10920 multiple TUs are supported.
10921 (create_cus_hash_table): Replace create_dwo_cu with a function for
10922 parsing multiple CUs from a DWO file.
10923 (open_and_init_dwo_file): Use create_cus_hash_table rather than
10924 create_dwo_cu.
10925 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
10926 htab_find, rather than comparing the signature to a singleton CU in
10927 the dwo_file.
10928
8455d262
PA
109292017-07-06 Pedro Alves <palves@redhat.com>
10930
10931 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
10932
4da3eb35
PA
109332017-07-04 Pedro Alves <palves@redhat.com>
10934
10935 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
10936 * gdbtypes.h (TYPE_STATIC): Delete.
10937 (struct fn_field) <is_public, is_abstract, is_static, is_final,
10938 is_synchronized, is_native>: Delete.
10939 <dummy>: Bump.
10940 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
10941 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
10942 (TYPE_FN_FIELD_ABSTRACT): Delete.
10943
5bfd255c
SM
109442017-07-03 Simon Marchi <simon.marchi@ericsson.com>
10945
10946 * buffer.h (buffer_finish): Fix spelling mistakes.
10947
25c54127
EZ
109482017-07-01 Eli Zaretskii <eliz@gnu.org>
10949
10950 * .dir-locals.el: Automatically switch to C-style comments in
10951 versions of Emacs that support the feature.
10952
dc4bde35
SDJ
109532017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10954 Pedro Alves <palves@redhat.com>
10955
10956 PR cli/21688
10957 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
10958 (process_next_line): New variable 'inline_cmd'.
10959 Adjust 'if' clauses for "python", "compile" and "guile" to use
10960 'command_name_equals' and check for '!inline_cmd'.
10961
51ed89aa
SDJ
109622017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10963
10964 PR cli/21688
10965 * cli/cli-script.c (command_name_equals_not_inline): New function.
10966 (process_next_line): Adjust 'if' clauses for "python", "compile"
10967 and "guile" to use command_name_equals_not_inline.
10968
eb17d413
PA
109692017-06-29 Pedro Alves <palves@redhat.com>
10970
10971 * completer.c (expression_completer): Call
10972 linespec_location_completer instead of location_completer.
10973
195bcdd5
PA
109742017-06-29 Pedro Alves <palves@redhat.com>
10975
10976 * completer.c (expression_completer): Remove code that recomputes
10977 'text' from 'word'.
10978
adc764e7
YQ
109792017-06-29 Yao Qi <yao.qi@linaro.org>
10980
10981 * regformats/regdat.sh: Generate code with
10982 "ifndef IN_PROCESS_AGENT".
10983
6e75794e
PA
109842017-06-28 Pedro Alves <palves@redhat.com>
10985
10986 * command.h: Include "common/scoped_restore.h".
10987
bc491f2e
YQ
109882017-06-28 Yao Qi <yao.qi@linaro.org>
10989
10990 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
10991 instead of obstack_grow.
10992
41664b45
DG
109932017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
10994
10995 PR gdb/21337
10996 * symfile.c (reread_symbols): Call objfiles_changed just before
10997 read_symbols.
10998
6da67eb1
PA
109992017-06-27 Pedro Alves <palves@redhat.com>
11000
11001 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
11002 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
11003 (completion_list_add_symbol, completion_list_add_msymbol):
11004 ... these new functions.
11005 (add_symtab_completions)
11006 (default_make_symbol_completion_list_break_on_1): Adjust.
11007
23732b1e
PA
110082017-06-27 Pedro Alves <palves@redhat.com>
11009
11010 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
11011 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
11012 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
11013 dtor.
11014 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
11015 'storage_obstack' field an auto_obstack. In-class initialize all
11016 non-bitfield fields. Make minsyms_read bool.
11017 * symfile.c (read_symbols): Adjust.
11018
a4d1e79a
AH
110192017-06-27 Alan Hayward <alan.hayward@arm.com>
11020
11021 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
11022 (gdbsim_store_register): Likewise.
11023
8268c778
PA
110242017-06-27 Pedro Alves <palves@redhat.com>
11025
11026 * c-exp.y (name_obstack): Now an auto_obstack.
11027 (yylex): Use auto_obstack::clear.
11028 (c_parse): Use auto_obstack::clear instead of reinitializing and
11029 freeing the obstack.
11030 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
11031 * d-exp.y (name_obstack): Now an auto_obstack.
11032 (yylex): Use auto_obstack::clear.
11033 (d_parse): Use auto_obstack::clear instead of reinitializing and
11034 freeing the obstack.
11035 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
11036 auto_obstack.
11037 * dwarf2read.c (create_addrmap_from_index)
11038 (dwarf2_build_psymtabs_hard)
11039 (update_enumeration_type_from_children): Likewise.
11040 * gdb_obstack.h (auto_obstack): New type.
11041 * go-exp.y (name_obstack): Now an auto_obstack.
11042 (build_packaged_name): Use auto_obstack::clear.
11043 (go_parse): Use auto_obstack::clear instead of reinitializing and
11044 freeing the obstack.
11045 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
11046 auto_obstack.
11047 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
11048 * rust-exp.y (work_obstack): Now an auto_obstack.
11049 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
11050 reinitializing and freeing the obstack.
11051 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
11052 (host_char_to_target): Use auto_obstack.
11053 * utils.h (make_cleanup_obstack_free): Delete declaration.
11054 * valprint.c (generic_emit_char, generic_printstr): Use
11055 auto_obstack.
11056
db665f42
SM
110572017-06-27 Simon Marchi <simon.marchi@ericsson.com>
11058
11059 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
11060 thread.
11061 (darwin_init_thread_list): Don't update dummy thread.
11062 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
11063
873c0814
SM
110642017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11065
11066 * record-full.c (netorder16): Remove.
11067
8b5a7a6e
SM
110682017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11069
11070 * common/diagnostics.h: Define macros for GCC.
11071 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
11072 * common/vec.h: Include diagnostics.h.
11073 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
11074 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
11075 warning.
11076
d1435379
SM
110772017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11078
11079 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
11080 New macro.
11081 * ada-lex.l: Ignore deprecated register warnings.
11082
cc75e0fd
SM
110832017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11084
11085 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
11086 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
11087
07809eaf
SM
110882017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11089
11090 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
11091 its own line.
11092
f076f034
SM
110932017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11094
11095 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
11096
0dd5cbc5
AH
110972017-06-23 Alan Hayward <alan.hayward@arm.com>
11098
11099 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
11100 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
11101 (xtensa_register_read_masked): Likewise.
11102
d4c6ce5b
SDJ
111032017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
11104
11105 * common/environ.c (gdb_environ::unset): Update comment.
11106
16892a03
AH
111072017-06-22 Alan Hayward <alan.hayward@arm.com>
11108
11109 * python/py-unwind.c (pyuw_sniffer): Allocate space for
11110 registers.
11111
d7dcbefc
AH
111122017-06-22 Alan Hayward <alan.hayward@arm.com>
11113
11114 * record-full.c (record_full_exec_insn): Use byte_vector.
11115
b30ff123
YQ
111162017-06-22 Yao Qi <yao.qi@linaro.org>
11117
11118 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
11119 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
11120
4fa847d7
AH
111212017-06-22 Alan Hayward <alan.hayward@arm.com>
11122
11123 * remote.c (cached_reg): Move from here...
11124 * regcache.h (cached_reg): ...to here.
11125 * python/py-unwind.c (struct reg_info): Remove.
11126 (cached_frame_info): Use cached_reg_t.
11127 (pyuw_prev_register): Likewise.
11128 (pyuw_sniffer): Use cached_reg_t and allocate registers.
11129 (pyuw_dealloc_cache): Free all registers.
11130
f4906a9a
PA
111312017-06-22 Pedro Alves <palves@redhat.com>
11132 Simon Marchi <simon.marchi@ericsson.com>
11133
11134 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
11135 warning.
11136 * common/diagnostics.h: New file.
11137
b45a1208
PA
111382017-06-22 Pedro Alves <palves@redhat.com>
11139
11140 * common/agent.h: Add include guards.
11141
e4da2c61
SM
111422017-06-21 Simon Marchi <simon.marchi@ericsson.com>
11143
11144 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
11145 talk about addressable units instead of bytes.
11146
96160d60
SDJ
111472017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
11148
11149 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
11150 of '::const_iterator'.
11151
9a6c7d9c
SDJ
111522017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
11153
11154 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11155 'unittests/environ-selftests.c'.
11156 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
11157 * charset.c (find_charset_names): Declare object 'iconv_env'.
11158 Update code to use 'iconv_env' object. Remove call to
11159 'free_environ'.
11160 * common/environ.c: Include <utility>.
11161 (make_environ): Delete function.
11162 (free_environ): Delete function.
11163 (gdb_environ::clear): New function.
11164 (gdb_environ::operator=): New function.
11165 (gdb_environ::get): Likewise.
11166 (environ_vector): Delete function.
11167 (set_in_environ): Delete function.
11168 (gdb_environ::set): New function.
11169 (unset_in_environ): Delete function.
11170 (gdb_environ::unset): New function.
11171 (gdb_environ::envp): Likewise.
11172 * common/environ.h: Include <vector>.
11173 (struct gdb_environ): Delete; transform into...
11174 (class gdb_environ): ... this class.
11175 (free_environ): Delete prototype.
11176 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
11177 environ_vector): Likewise.
11178 * infcmd.c (run_command_1): Update code to call
11179 'envp' from 'gdb_environ' class.
11180 (environment_info): Update code to call methods from 'gdb_environ'
11181 class.
11182 (unset_environment_command): Likewise.
11183 (path_info): Likewise.
11184 (path_command): Likewise.
11185 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
11186 (inferior::inferior): Initialize 'environment' using the host's
11187 information.
11188 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
11189 Include "environ.h".
11190 (class inferior) <environment>: Change type from 'struct
11191 gdb_environ' to 'gdb_environ'.
11192 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
11193 methods from 'gdb_environ' class.
11194 * solib.c (solib_find_1): Likewise
11195 * unittests/environ-selftests.c: New file.
11196
75c554cf
YQ
111972017-06-20 Yao Qi <yao.qi@linaro.org>
11198
11199 * features/i386/i386-linux.xml: Exchange the order of including
11200 32bit-linux.xml and 32bit-sse.xml.
11201 * features/i386/i386-linux.c: Regenerated.
11202
72ddacb7
YQ
112032017-06-20 Yao Qi <yao.qi@linaro.org>
11204
11205 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
11206 Delete copy ctor and assignment operator.
11207 (tdesc_type): Likewise.
11208 (tdesc_feature): Likewise.
11209 (tdesc_free_reg): Remove.
11210 (tdesc_create_reg): Use new.
11211 (tdesc_free_type): Remove.
11212 (tdesc_create_vector): Use new.
11213 (tdesc_create_union): Likewise.
11214 (tdesc_create_flags): Likewise.
11215 (tdesc_create_enum): Likewise.
11216 (tdesc_free_feature): Delete.
11217 (free_target_description): Use delete.
11218
325c9fd4
JB
112192017-06-19 John Baldwin <jhb@FreeBSD.org>
11220
11221 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
11222 registers.
11223
16b7a719
PA
112242017-06-19 Pedro Alves <palves@redhat.com>
11225
11226 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
11227 after gdb::unlinker.
11228
1c8e01c9
SDJ
112292017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
11230
11231 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
11232 gdb_environ to access an environment variable.
11233
ffce45d2
TP
112342017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
11235
11236 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
11237 gdb_byte*.
11238
1d4fbac9
SM
112392017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11240
11241 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
11242
8465943a
SM
112432017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11244
11245 * configure: Re-generate.
11246 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
11247
3e019bdc
SM
112482017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11249
11250 * configure: Re-generate.
11251 * warning.m4: Pass -Werror to compiler when checking for
11252 supported warning flags.
11253
cf0dd6f0
SM
112542017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11255
11256 * Makefile.in (COMPILE.pre): Add "-x c++".
11257
6f98355c
YQ
112582017-06-16 Alan Hayward <alan.hayward@arm.com>
11259 Pedro Alves <palves@redhat.com>
11260 Yao Qi <yao.qi@linaro.org>
11261
11262 * defs.h (RequireLongest): New.
11263 (extract_integer): Declare function template.
11264 (extract_signed_integer): Remove the declaration, but define it
11265 static inline.
11266 (extract_unsigned_integer): Likewise.
11267 (store_integer): Declare function template.
11268 (store_signed_integer): Remove the declaration, but define it
11269 static inline.
11270 (store_unsigned_integer): Likewise.
11271 * findvar.c (extract_integer): New function template.
11272 (extract_signed_integer): Remove.
11273 (extract_unsigned_integer): Remove.
11274 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
11275 instantiations.
11276 (store_integer): New function template.
11277 (store_signed_integer): Remove.
11278 (store_unsigned_integer): Remove.
11279 (store_integer): Explicit instantiations.
11280 * regcache.c (regcache_raw_read_signed): Update.
11281 (regcache::raw_read): New function.
11282 (regcache::raw_read_signed): Remove.
11283 (regcache::raw_read_unsigned): Remove.
11284 (regcache_raw_read_unsigned): Update.
11285 (regcache_raw_write_unsigned): Update.
11286 (regcache::raw_write_signed): Remove.
11287 (regcache::raw_write): New function.
11288 (regcache_cooked_read_signed): Update.
11289 (regcache::raw_write_unsigned): Remove.
11290 (regcache::cooked_read_signed): Remove.
11291 (regcache_cooked_read_unsigned): Update.
11292 (regcache::cooked_read_unsigned): Remove.
11293 (regcache_cooked_write_signed): Update.
11294 (regcache_cooked_write_unsigned): Update.
11295 * regcache.h (regcache) <raw_read_signed>: Remove.
11296 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
11297 <raw_read, raw_write>: New.
11298 <cooked_read_signed, cooked_write_signed>: Remove.
11299 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
11300 <cooked_read, cooked_write>: New.
11301 * sh64-tdep.c (sh64_pseudo_register_read): Update.
11302 (sh64_pseudo_register_write): Update.
11303
a87dc45a
AK
113042017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
11305
11306 * arc-tdep.c (arc_disassembler_options): New variable.
11307 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
11308 of default_print_insn.
11309 (arc_delayed_print_insn): Set info->section when needed,
11310 use default_print_insn to retrieve a disassembler.
11311
45159d6a
SDJ
113122017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
11313
11314 PR gdb/21574
11315 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
11316 to mention $SHELL and startup-with-shell.
11317
b46c4cf0
MF
113182017-06-14 Max Filippov <jcmvbkbc@gmail.com>
11319
11320 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
11321
6394c606
YQ
113222017-06-14 Yao Qi <yao.qi@linaro.org>
11323
11324 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
11325 default_print_insn instead of print_insn_aarch64.
11326 * arm-tdep.c (gdb_print_insn_arm): Call
11327 default_print_insn instead of print_insn_big_arm
11328 and print_insn_little_arm.
11329 * i386-tdep.c (i386_print_insn): Call default_print_insn
11330 instead of print_insn_i386.
11331 * ia64-tdep.c (ia64_print_insn): Call
11332 default_print_insn instead of print_insn_ia64.
11333 * mips-tdep.c (gdb_print_insn_mips): Call
11334 default_print_insn instead of print_insn_big_mips
11335 and print_insn_little_mips.
11336 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
11337 instead of print_insn_spu.
11338
d5722aa2
PA
113392017-06-14 Pedro Alves <palves@redhat.com>
11340
11341 * ada-lang.c: Include "common/byte-vector.h".
11342 (ada_value_primitive_packed_val): Use gdb::byte_vector.
11343 * charset.c (wchar_iterator::iterate): Resize the vector instead
11344 of reserving it.
11345 * common/byte-vector.h: Include "common/def-vector.h".
11346 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
11347 * cli/cli-dump.c: Include "common/byte-vector.h".
11348 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
11349 * common/byte-vector.h: New file.
11350 * common/def-vector.h: New file.
11351 * common/default-init-alloc.h: New file.
11352 * dwarf2loc.c: Include "common/byte-vector.h".
11353 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
11354 instead of reserving it.
11355 * dwarf2read.c: Include "common/byte-vector.h".
11356 (data_buf::m_vec): Now a gdb::byte_vector.
11357 * gdb_regex.c: Include "common/def-vector.h".
11358 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
11359 * mi/mi-main.c: Include "common/byte-vector.h".
11360 (mi_cmd_data_read_memory): Use gdb::byte_vector.
11361 * printcmd.c: Include "common/byte-vector.h".
11362 (print_scalar_formatted): Use gdb::byte_vector.
11363 * valprint.c: Include "common/byte-vector.h".
11364 (maybe_negate_by_bytes, print_decimal_chars): Use
11365 gdb::byte_vector.
11366
01ec7a27
SM
113672017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11368
11369 * darwin-nat.c: Include "nat/fork-inferior.h".
11370
848d9074
SM
113712017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11372
11373 * configure.nat: Factor out Darwin bits that are not
11374 architecture-specific. Add fork-inferior.o.
11375
3b912944
SM
113762017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11377
11378 * configure.nat: Factor out AIX bits that are not
11379 architecture-specific. Add fork-inferior.o.
11380
55acdf22
AA
113812017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11382
11383 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
11384 (read_pieced_value, write_pieced_value): ...here. Reduce to
11385 wrappers that just call rw_pieced_value.
11386
f65e2044
AA
113872017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11388
11389 * dwarf2loc.c (write_pieced_value): When writing the data for a
11390 memory piece, use write_memory_with_notification instead of
11391 write_memory.
11392
23f945bf
AA
113932017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11394
11395 * valops.c (read_value_memory): Change embedded_offset to
11396 represent a bit offset instead of a byte offset.
11397 * value.h (read_value_memory): Adjust comment.
11398
f236533e
AA
113992017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11400
11401 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
11402 dest_offset_bits and source_offset_bits.
11403 (write_pieced_value): Likewise.
11404
65d84b76
AA
114052017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11406
11407 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
11408 given by DW_OP_bit_piece.
11409 (write_pieced_value): Likewise.
11410
242d31ab
AA
114112017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11412
11413 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
11414 some other preparations to the places where sufficient information
11415 is available.
11416 (write_pieced_value): Likewise.
11417
03c8af18
AA
114182017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11419
11420 * dwarf2loc.c (bits_to_bytes): New function.
11421 (read_pieced_value): Fix offset calculations for register pieces
11422 on big-endian targets.
11423 (write_pieced_value): Likewise.
11424
840989c1
AA
114252017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11426
11427 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
11428 (write_pieced_value): Likewise.
11429
359b19bb
AA
114302017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11431
11432 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
11433 transfer the source value's least significant bits, instead of its
11434 lowest-addressed ones. Rename type_len to max_offset.
11435 (read_pieced_value): Mirror above changes to write_pieced_value as
11436 applicable.
11437
07c9ca3b
AA
114382017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11439
11440 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
11441 truncate full bytes from dest_offset_bits before using it as an
11442 offset into the buffer.
11443
f1cc9874
AA
114442017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11445
11446 * dwarf2loc.c (write_pieced_value): Include transfer size in
11447 byte-wise check.
11448
cdaac320
AA
114492017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11450
11451 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
11452 calculation of this_size.
11453
af547a96
AA
114542017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11455
11456 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
11457 when targeting a bit-field.
11458 (write_pieced_value): Likewise.
11459
ddd7882a
AA
114602017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11461
11462 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
11463 (allocate_piece_closure): Drop addr_size parameter.
11464 (dwarf2_evaluate_loc_desc_full): Adjust call to
11465 allocate_piece_closure.
11466
e9352324
AA
114672017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11468
11469 PR gdb/21226
11470 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
11471 the LSB end, independent of endianness.
11472
d5d1163e
AA
114732017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11474
11475 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
11476 size capping.
11477
032bb6ea
YQ
114782017-06-13 Yao Qi <yao.qi@linaro.org>
11479
11480 * mips-linux-nat.c: Move include features/mips*-linux.c to
11481 mips-linux-tdep.c.
11482 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
11483 to mips-linux-tdep.c.
11484 * mips-linux-tdep.c: Include features/mips*-linux.c
11485 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
11486 functions.
11487 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
11488 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
11489 (tdesc_mips64_dsp_linux): Declare.
11490
f12f6bad
TT
114912017-06-12 Tom Tromey <tom@tromey.com>
11492
11493 * valprint.h (val_print_type_code_int): Remove.
11494 * valprint.c (generic_val_print_int): Always call
11495 val_print_scalar_formatted.
11496 (val_print_type_code_int): Remove.
11497 * printcmd.c (print_scalar_formatted): Handle options->format==0.
11498 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
11499 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
11500 * ada-valprint.c (ada_val_print_num): Use
11501 val_print_scalar_formatted.
11502
d9109c80
TT
115032017-06-12 Tom Tromey <tom@tromey.com>
11504
11505 * printcmd.c (print_scalar_formatted): Unify the two switches.
11506 Don't convert scalars to LONGEST.
11507
4ac0cb1c
TT
115082017-06-12 Tom Tromey <tom@tromey.com>
11509
11510 PR exp/16225:
11511 * valprint.h (print_decimal_chars): Update.
11512 * valprint.c (maybe_negate_by_bytes): New function.
11513 (print_decimal_chars): Add "is_signed" argument.
11514 * printcmd.c (print_scalar_formatted): Update.
11515
30a25466
TT
115162017-06-12 Tom Tromey <tom@tromey.com>
11517
11518 PR exp/16225:
11519 * valprint.h (print_binary_chars, print_hex_chars): Update.
11520 * valprint.c (val_print_type_code_int): Update.
11521 (print_binary_chars): Add "zero_pad" argument.
11522 (emit_octal_digit): New function.
11523 (print_octal_chars): Don't zero-pad.
11524 (print_decimal_chars): Likewise.
11525 (print_hex_chars): Add "zero_pad" argument.
11526 * sh64-tdep.c (sh64_do_fp_register): Update.
11527 * regcache.c (regcache::dump): Update.
11528 * printcmd.c (print_scalar_formatted): Update.
11529 * infcmd.c (default_print_one_register_info): Update.
11530
b3464d03
PA
115312017-06-12 Pedro Alves <palves@redhat.com>
11532 Alan Hayward <alan.hayward@arm.com>
11533
11534 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
11535 (mips_eabi_push_dummy_call): Rename local 'regsize' to
11536 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
11537 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
11538 Assert that abi_regsize bytes fit in 'ref_valbuf'.
11539
4b76cda9
PA
115402017-06-12 Pedro Alves <palves@redhat.com>
11541
11542 * dwarf2read.c (mapped_symtab::data): Now a vector of
11543 symtab_index_entry instead of vector of
11544 std::unique_ptr<symtab_index_entry>. All users adjusted to check
11545 whether an element's name is NULL instead of checking whether the
11546 element itself is NULL.
11547 (find_slot): Change return type. Adjust.
11548 (hash_expand, , add_index_entry, uniquify_cu_indices)
11549 (write_hash_table): Adjust.
11550
e8f8bcb3
PA
115512017-06-12 Pedro Alves <palves@redhat.com>
11552
11553 * dwarf2read.c (recursively_count_psymbols): New function.
11554 (write_psymtabs_to_index): Call it to compute number of psyms and
11555 pass estimate size of psyms_seen to unordered_set's ctor.
11556
70a1152b
PA
115572017-06-12 Pedro Alves <palves@redhat.com>
11558
11559 * dwarf2read.c (write_hash_table): Check if key already exists
11560 before emplacing.
11561
c2f134ac
PA
115622017-06-12 Pedro Alves <palves@redhat.com>
11563
11564 * dwarf2read.c (data_buf::append_space): Rename to...
11565 (data_buf::grow): ... this, and make private. Adjust all callers.
11566 (data_buf::append_uint): New method.
11567 (add_address_entry, write_one_signatured_type)
11568 (write_psymtabs_to_index): Use it.
11569
a81e6d4d
PA
115702017-06-12 Pedro Alves <palves@redhat.com>
11571
11572 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
11573 (file_write (FILE *, const std::vector<Elem>&)): Delete.
11574 (data_buf::file_write): Call ::fwrite directly.
11575
6fd931f2
PA
115762017-06-12 Pedro Alves <palves@redhat.com>
11577
11578 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
11579 std::vector::erase.
11580
bc8f2430
JK
115812017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
11582
11583 Code cleanup: C++ify .gdb_index producer.
11584 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
11585 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
11586 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
11587 (create_strtab, add_string): Remove.
11588 (file_write, data_buf): New.
11589 (struct symtab_index_entry): Use std::vector for cu_indices.
11590 (struct mapped_symtab): Use std::vector for data.
11591 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
11592 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
11593 Remove.
11594 (find_slot): Change return type. Update it to the new data structures.
11595 (hash_expand, add_index_entry): Update it to the new data structures.
11596 (offset_type_compare): Remove.
11597 (uniquify_cu_indices): Update it to the new data structures.
11598 (c_str_view, c_str_view_hasher, vector_hasher): New.
11599 (add_indices_to_cpool): Remove.
11600 (write_hash_table): Update it to the new data structures.
11601 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
11602 (eq_psymtab_cu_index): Remove.
11603 (psym_index_map): New typedef.
11604 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
11605 reference and std::unordered_map for cu_index_htab.
11606 (add_address_entry, add_address_entry_worker, write_address_map)
11607 (write_psymbols): Update it to the new data structures.
11608 (write_obstack): Remove.
11609 (struct signatured_type_index_data): Change types_list to a data_buf
11610 reference and psyms_seen to a std::unordered_set reference.
11611 (write_one_signatured_type, recursively_write_psymbols)
11612 (write_psymtabs_to_index): Update it to the new data structures.
11613
c4dcb155
SM
116142017-06-11 Simon Marchi <simon.marchi@ericsson.com>
11615
11616 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
11617 separate-debug-file commands.
11618 * symfile.h (separate_debug_file_debug): New global.
11619 * symfile.c (separate_debug_file_debug): New global.
11620 (separate_debug_file_exists, find_separate_debug_file): Add
11621 debug output.
11622 (_initialize_symfile): Add "set debug separate-debug-file"
11623 command.
11624 * build-id.c (build_id_to_debug_bfd,
11625 find_separate_debug_file_by_buildid): Add debug output.
11626
6d45d4b4
SM
116272017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
11628
11629 * gdbarch.sh (displaced_step_free_closure): Remove.
11630 * gdbarch.h, gdbarch.c: Re-generate.
11631 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
11632 displaced_step_free_closure.
11633 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
11634 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
11635 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
11636 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11637 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
11638 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11639 * arch-utils.h (simple_displaced_step_free_closure): Remove.
11640 * arch-utils.c (simple_displaced_step_free_closure): Remove.
11641 * infrun.c (displaced_step_clear): Call xfree instead of
11642 gdbarch_displaced_step_free_closure.
11643
2f91880f
SDJ
116442017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
11645
11646 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
11647 NULL".
11648
b8b6e72f
AH
116492017-06-08 Alan Hayward <alan.hayward@arm.com>
11650
11651 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
11652 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
11653 (mn10300_push_dummy_call): Likewise.
11654
5369082e
AH
116552017-06-08 Alan Hayward <alan.hayward@arm.com>
11656
11657 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
11658
ff4ca5ac
AH
116592017-06-08 Alan Hayward <alan.hayward@arm.com>
11660
11661 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
11662
aefd8b33
SDJ
116632017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11664
11665 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
11666 able to start inferiors using a shell.
11667 (New remote packets): Announce new packet "QStartupWithShell".
11668 * remote.c: Add PACKET_QStartupWithShell.
11669 (extended_remote_create_inferior): Handle new
11670 PACKET_QStartupWithShell.
11671 (remote_protocol_features) <QStartupWithShell>: New entry for
11672 PACKET_QStartupWithShell.
11673 (_initialize_remote): Call "add_packet_config_cmd" for
11674 QStartupShell.
11675
2090129c
SDJ
116762017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11677 Pedro Alves <palves@redhat.com>
11678
11679 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
11680 and "nat/fork-inferior.h".
11681 * common/common-inferior.h: New file, with contents from
11682 "gdb/inferior.h".
11683 * commom/common-utils.c: Include "common-utils.h".
11684 (stringify_argv): New function.
11685 * common/common-utils.h (stringify_argv): New prototype.
11686 * configure.nat: Add "fork-inferior.o" as a dependency for
11687 "*linux*", "fbsd*" and "nbsd*" hosts.
11688 * corefile.c (get_exec_file): Update comment.
11689 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
11690 instead of "startup_inferior".
11691 (darwin_create_inferior): Call "add_thread_silent" after
11692 "fork_inferior".
11693 * fork-child.c: Cleanup unnecessary includes.
11694 (SHELL_FILE): Move to "common/common-fork-child.c".
11695 (environ): Likewise.
11696 (exec_wrapper): Initialize.
11697 (get_exec_wrapper): New function.
11698 (breakup_args): Move to "common/common-fork-child.c"; rename to
11699 "breakup_args_for_exec".
11700 (escape_bang_in_quoted_argument): Move to
11701 "common/common-fork-child.c".
11702 (saved_ui): New variable.
11703 (prefork_hook): New function.
11704 (postfork_hook): Likewise.
11705 (postfork_child_hook): Likewise.
11706 (gdb_startup_inferior): Likewise.
11707 (fork_inferior): Move to "common/common-fork-child.c". Update
11708 function to support gdbserver.
11709 (startup_inferior): Likewise.
11710 * gdbcore.h (get_exec_file): Remove declaration.
11711 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
11712 instead of "startup_inferior". Call "add_thread_silent" after
11713 "fork_inferior".
11714 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
11715 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
11716 instead of "startup_inferior". Call "add_thread_silent" after
11717 "fork_inferior".
11718 * inferior.h: Include "common-inferior.h".
11719 (trace_start_error): Move to "common/common-utils.h".
11720 (trace_start_error_with_name): Likewise.
11721 (fork_inferior): Move prototype to "nat/fork-inferior.h".
11722 (startup_inferior): Likewise.
11723 (gdb_startup_inferior): New prototype.
11724 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
11725 * nat/fork-inferior.h: New file.
11726 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
11727 instead of "startup_inferior". Call "add_thread_silent" after
11728 "fork_inferior".
11729 * target.h (target_terminal_init): Move prototype to
11730 "target/target.h".
11731 (target_terminal_inferior): Likewise.
11732 (target_terminal_ours): Likewise.
11733 * target/target.h (target_terminal_init): New prototype, moved
11734 from "target.h".
11735 (target_terminal_inferior): Likewise.
11736 (target_terminal_ours): Likewise.
11737 * utils.c (gdb_flush_out_err): New function.
11738
043a4934
SDJ
117392017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11740
11741 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
11742 * common/common-gdbthread.h: New file, with parts from
11743 "gdb/gdbthread.h".
11744 * gdbthread.h: Include "common-gdbthread.h".
11745 (switch_to_thread): Moved to "common/common-gdbthread.h".
11746
15652511
SDJ
117472017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11748
11749 * Makefile.in (SFILES): Add "common/job-control.c".
11750 (HFILES_NO_SRCDIR): Add "common/job-control.h".
11751 (COMMON_OBS): Add "job-control.o".
11752 * common/job-control.c: New file, with contents from
11753 "gdb/inflow.c".
11754 * common/job-control.h: New file, with contents from "terminal.h".
11755 * fork-child.c: Include "job-control.h".
11756 * inflow.c: Include "job-control.h".
11757 (gdb_setpgid): Move to "common/common-inflow.c".
11758 (_initialize_inflow): Move setting of "job_control" to
11759 "handle_job_control".
11760 * terminal.h (job_control): Moved to "common/common-terminal.h".
11761 (gdb_setpgid): Likewise.
11762 * top.c: Include "job_control.h".
11763 * utils.c: Likewise.
11764 (job_control): Moved to "job-control.c".
11765
2d7cc5c7
PA
117662017-06-07 Pedro Alves <palves@redhat.com>
11767
11768 * Makefile.in (SFILES): Add gdb_regex.c.
11769 (COMMON_OBS): Add gdb_regex.o.
11770 * ada-lang.c (ada_add_standard_exceptions)
11771 (ada_add_exceptions_from_frame, name_matches_regex)
11772 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
11773 parameter type to compiled_regex. Adjust.
11774 (ada_exceptions_list): Use compiled_regex.
11775 * break-catch-throw.c (exception_catchpoint::pattern): Now a
11776 std::unique_ptr<compiled_regex>.
11777 (exception_catchpoint::~exception_catchpoint): Remove regfree
11778 call.
11779 (check_status_exception_catchpoint): Adjust to use compiled_regex.
11780 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
11781 * breakpoint.c (solib_catchpoint::compiled): Now a
11782 std::unique_ptr<compiled_regex>.
11783 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
11784 (check_status_catch_solib): Adjust to use compiled_regex.
11785 (add_solib_catchpoint): Adjust to use compiled_regex.
11786 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
11787 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
11788 compiled_regex reference. Adjust to use it.
11789 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
11790 declaration. Include "gdb_regex.h".
11791 (apropos_cmd): Change regex parameter to compiled_regex reference.
11792 * gdb_regex.c: New file.
11793 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
11794 declarations.
11795 (class compiled_regex): New.
11796 * linux-tdep.c: Include "common/gdb_optional.h".
11797 (struct mapping_regexes): New, factored out from
11798 mapping_is_anonymous_p, and adjusted to use compiled_regex.
11799 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
11800 gdb::optional and remove cleanups. Adjust to compiled_regex.
11801 * probe.c: Include "common/gdb_optional.h".
11802 (collect_probes): Use compiled_regex and gdb::optional and remove
11803 cleanups.
11804 * skip.c: Include "common/gdb_optional.h".
11805 (skiplist_entry::compiled_function_regexp): Now a
11806 gdb::optional<compiled_regex>.
11807 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
11808 (free_skiplist_entry): Remove regfree call.
11809 (compile_skip_regexp, skip_rfunction_p): Adjust to use
11810 compiled_regex and gdb::optional.
11811 * symtab.c: Include "common/gdb_optional.h".
11812 (search_symbols): Use compiled_regex and gdb::optional.
11813 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
11814 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
11815 to gdb_regex.c.
11816
50d6adef
AH
118172017-06-07 Alan Hayward <alan.hayward@arm.com>
11818
11819 * regcache.c (regcache::save): Avoid buffer use.
11820 (regcache::dump): Likewise.
11821
4a8a33c8
AH
118222017-06-07 Alan Hayward <alan.hayward@arm.com>
11823
11824 * sh-tdep.c (sh_pseudo_register_read): Remove
11825 MAX_REGISTER_SIZE.
11826 (sh_pseudo_register_write): Likewise.
11827 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
11828 (sh64_pseudo_register_write): Likewise
11829
d1be909e
AH
118302017-06-07 Alan Hayward <alan.hayward@arm.com>
11831
11832 * aarch64-tdep.c (aarch64_store_return_value): Use
11833 V_REGISTER_SIZE.
11834 (aarch64_pseudo_read_value): Likewise.
11835 (aarch64_pseudo_write): Likewise.
11836
f4a65042
YQ
118372017-06-06 Yao Qi <yao.qi@linaro.org>
11838
11839 * regformats/regdef.h (set_register_cache): Remove the
11840 declaration.
11841
9f7fb0aa
AH
118422017-06-06 Alan Hayward <alan.hayward@arm.com>
11843
11844 * frame.c (frame_unwind_register_signed): Use
11845 frame_unwind_register_value.
11846
e1e01040
PA
118472017-06-06 Pedro Alves <palves@redhat.com>
11848
11849 PR breakpoints/21553
11850 * breakpoint.c (create_breakpoints_sal_default)
11851 (init_breakpoint_sal, create_breakpoint_sal): Use
11852 gdb::unique_xmalloc_ptr for string parameters.
11853 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11854 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
11855 (base_breakpoint_create_breakpoints_sal)
11856 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
11857 (strace_marker_create_breakpoints_sal)
11858 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
11859 string parameters.
11860 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
11861 gdb::unique_xmalloc_ptr for string parameters.
11862 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11863 parameters.
11864
fbe654c8
AH
118652017-06-06 Alan Hayward <alan.hayward@arm.com>
11866
11867 * alpha-tdep.c (alpha_register_to_value): Use
11868 get_frame_register_value.
11869 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
11870
ae0d01d6
AH
118712017-06-06 Alan Hayward <alan.hayward@arm.com>
11872
11873 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
11874 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
11875 (ia64_value_to_register): Likewise.
11876 (ia64_extract_return_value): Likewise.
11877 (ia64_store_return_value): Likewise.
11878 (ia64_push_dummy_call): Likewise.
11879
49cf576c
JB
118802017-06-04 Joel Brobecker <brobecker@adacore.com>
11881
11882 GDB 8.0 released.
11883
26b6a6ab
SM
118842017-06-03 Simon Marchi <simon.marchi@ericsson.com>
11885
11886 * x86-linux-nat.c (struct arch_lwp_info): Remove.
11887
22827c51
SM
118882017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
11889
11890 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
11891 parameter.
11892 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
11893
0e05cf3a
SM
118942017-06-02 Simon Marchi <simon.marchi@ericsson.com>
11895
11896 * event-loop.c (poll_timers): Unallocate timer using delete
11897 instead of xfree.
11898
c1fc2657
SM
118992017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11900
11901 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
11902 (struct breakpoint) <~breakpoint>: New.
11903 (struct watchpoint): Inherit from breakpoint.
11904 <~watchpoint>: New.
11905 <base>: Remove.
11906 (struct tracepoint): Inherit from breakpoint.
11907 <base>: Remove.
11908 * breakpoint.c (longjmp_breakpoint_ops): Remove.
11909 (struct longjmp_breakpoint): Inherit from breakpoint.
11910 <~longjmp_breakpoint>: New.
11911 <base>: Remove.
11912 (new_breakpoint_from_type): Remove casts.
11913 (watchpoint_in_thread_scope): Remove reference to base field.
11914 (watchpoint_del_at_next_stop): Likewise.
11915 (update_watchpoint): Likewise.
11916 (watchpoint_check): Likewise.
11917 (bpstat_check_watchpoint): Likewise.
11918 (set_longjmp_breakpoint): Likewise.
11919 (struct fork_catchpoint): Inherit from breakpoint.
11920 <base>: Remove.
11921 (struct solib_catchpoint): Inherit from breakpoint.
11922 <~solib_catchpoint>: New.
11923 <base>: Remove.
11924 (dtor_catch_solib): Change to ...
11925 (solib_catchpoint::~solib_catchpoint): ... this.
11926 (breakpoint_hit_catch_solib): Remove reference to base field.
11927 (add_solib_catchpoint): Likewise.
11928 (create_fork_vfork_event_catchpoint): Likewise.
11929 (struct exec_catchpoint): Inherit from breakpoint.
11930 <~exec_catchpoint>: New.
11931 <base>: Remove.
11932 (dtor_catch_exec): Change to ...
11933 (exec_catchpoint::~exec_catchpoint): ... this.
11934 (dtor_watchpoint): Change to ...
11935 (watchpoint::~watchpoint): ... this.
11936 (watch_command_1): Remove reference to base field.
11937 (catch_exec_command_1): Likewise.
11938 (base_breakpoint_dtor): Change to ...
11939 (breakpoint::~breakpoint): ... this.
11940 (base_breakpoint_ops): Remove dtor field value.
11941 (longjmp_bkpt_dtor): Change to ...
11942 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
11943 (strace_marker_create_breakpoints_sal): Remove reference to base
11944 field.
11945 (delete_breakpoint): Don't manually call breakpoint destructor.
11946 (create_tracepoint_from_upload): Remove reference to base field.
11947 (trace_pass_set_count): Likewise.
11948 (initialize_breakpoint_ops): Don't initialize
11949 momentary_breakpoint_ops, don't set dtors.
11950 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
11951 <~ada_catchpoint>: New.
11952 <base>: Remove.
11953 (create_excep_cond_exprs): Remove reference to base field.
11954 (dtor_exception): Change to ...
11955 (ada_catchpoint::~ada_catchpoint): ... this.
11956 (dtor_catch_exception): Remove.
11957 (dtor_catch_exception_unhandled): Remove.
11958 (dtor_catch_assert): Remove.
11959 (create_ada_exception_catchpoint): Remove reference to base
11960 field.
11961 (initialize_ada_catchpoint_ops): Don't set dtors.
11962 * break-catch-sig.c (struct signal_catchpoint): Inherit from
11963 breakpoint.
11964 <~signal_catchpoint>: New.
11965 <base>: Remove.
11966 (signal_catchpoint_dtor): Change to ...
11967 (signal_catchpoint::~signal_catchpoint): ... this.
11968 (create_signal_catchpoint): Remove reference to base field.
11969 (initialize_signal_catchpoint_ops): Don't set dtor.
11970 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
11971 from breakpoint.
11972 <~syscall_catchpoint>: New.
11973 <base>: Remove.
11974 (dtor_catch_syscall): Change to ...
11975 (syscall_catchpoint::~syscall_catchpoint): ... this.
11976 (create_syscall_event_catchpoint): Remove reference to base
11977 field.
11978 (initialize_syscall_catchpoint_ops): Don't set dtor.
11979 * break-catch-throw.c (struct exception_catchpoint): Inherit
11980 from breakpoint.
11981 <~exception_catchpoint>: New.
11982 <base>: Remove.
11983 (dtor_exception_catchpoint): Change to ...
11984 (exception_catchpoint::~exception_catchpoint): ... this.
11985 (handle_gnu_v3_exceptions): Remove reference to base field.
11986 (initialize_throw_catchpoint_ops): Don't set dtor.
11987 * ctf.c (ctf_get_traceframe_address): Remove reference to base
11988 field.
11989 * remote.c (remote_get_tracepoint_status): Likewise.
11990 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
11991 * tracefile.c (tracefile_fetch_registers): Likewise.
11992 * tracepoint.c (actions_command): Likewise.
11993 (validate_actionline): Likewise.
11994 (tfind_1): Likewise.
11995 (get_traceframe_location): Likewise.
11996 (find_matching_tracepoint_location): Likewise.
11997 (parse_tracepoint_status): Likewise.
11998 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
11999
3b0871f4
SM
120002017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
12001
12002 * breakpoint.c (struct longjmp_breakpoint): New struct.
12003 (is_tracepoint_type): Change return type to bool.
12004 (is_longjmp_type): New function.
12005 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
12006 (set_raw_breakpoint_without_location): Use
12007 new_breakpoint_from_type.
12008 (set_raw_breakpoint): Likewise.
12009
a5e364af
SM
120102017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
12011
12012 * breakpoint.c (new_breakpoint_from_type): New function.
12013 (create_breakpoint_sal): Use new_breakpoint_from_type and
12014 unique_ptr.
12015 (create_breakpoint): Likewise.
12016
ae3b3f34
SM
120172017-05-31 Simon Marchi <simon.marchi@ericsson.com>
12018
12019 * memattr.c (mem_info_command): Rename to ...
12020 (info_mem_command): ... this.
12021 (mem_enable_command): Rename to ...
12022 (enable_mem_command): ... this.
12023 (mem_disable_command): Rename to ...
12024 (disable_mem_command): ... this.
12025 (mem_delete_command): Rename to ...
12026 (delete_mem_command): ... this.
12027 (_initialize_mem): Adjust function names.
12028
13ace077
MM
120292017-05-31 Markus Metzger <markus.t.metzger@intel.com>
12030
12031 * btrace.c (handle_pt_insn_events): New.
12032 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
12033 STATUS. Split into this and ...
12034 (handle_pt_insn_event_flags): ... this.
12035
c56ccc05
MM
120362017-05-31 Markus Metzger <markus.t.metzger@intel.com>
12037
12038 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
12039 and struct pt_insn.resynced.
12040 * configure: Regenerated.
12041 * config.in: Regenerated.
12042
08c3f6d2
TW
120432017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12044
12045 * btrace.c (ftrace_find_call_by_number): New function.
12046 (ftrace_new_function): Store objects, not pointers.
12047 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
12048 ftrace_new_gap, ftrace_update_function,
12049 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
12050 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
12051 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
12052 btrace_ends_with_single_insn, btrace_call_get): Account for
12053 btrace_thread_info::functions now storing objects.
12054 * btrace.h (struct btrace_thread_info): Add constructor.
12055 (struct btrace_thread_info) <functions>: Make std::vector.
12056 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
12057 Initialize with default values.
12058 * record-btrace.c (record_btrace_frame_sniffer): Account for
12059 btrace_thread_info::functions now storing objects.
12060
8ffd39f2
TW
120612017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12062
12063 * btrace.c: Remove typedef bfun_s.
12064 (ftrace_new_gap): Directly add gaps to the list of gaps.
12065 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
12066 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
12067 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
12068 instead of gdb VEC.
12069
4aeb0dfc
TW
120702017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12071
12072 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
12073 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
12074 with btrace_thread_info::next_segment and
12075 btrace_thread_info::prev_segment.
12076 * btrace.h: Remove struct btrace_func_link.
12077 (struct btrace_function): Replace pair of function segment pointers
12078 with pair of indices.
12079 * python/py-record-btrace.c (btpy_call_prev_sibling,
12080 btpy_call_next_sibling): Replace references to
12081 btrace_thread_info::segment with btrace_thread_info::next_segment and
12082 btrace_thread_info::prev_segment.
12083 * record-btrace.c (record_btrace_frame_this_id): Use
12084 btrace_find_call_by_number.
12085
eb8f2b9c
TW
120862017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12087
12088 * btrace.c (ftrace_new_function, ftrace_fixup_level,
12089 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
12090 btrace_insn_next, btrace_insn_prev): Remove references to
12091 btrace_thread_info::flow.
12092 * btrace.h (struct btrace_function): Remove FLOW.
12093
42bfe59e
TW
120942017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12095
12096 * btrace.c (ftrace_find_call_by_number): New function.
12097 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
12098 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
12099 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
12100 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
12101 index.
12102 * btrace.h (struct btrace_function): Turn UP into an index.
12103 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
12104 as an index.
12105 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
12106 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
12107 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
12108
b54b03bd
TW
121092017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12110
12111 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12112 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12113 ftrace_update_function, ftrace_compute_global_level_offset,
12114 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
12115 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
12116 btrace_insn_end, btrace_is_empty): Remove references to
12117 btrace_thread_info::begin and btrace_thread_info::end.
12118 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
12119 (struct btrace_thread_info) <functions>: Adjust comment.
12120 * record-btrace.c (record_btrace_start_replaying): Remove reference to
12121 btrace_thread_info::begin.
12122
8286623c
TW
121232017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12124
12125 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12126 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12127 ftrace_update_function): Remove arguments that implicitly were always
12128 BTINFO->END.
12129 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
12130 Don't pass BTINFO->END.
12131
a0f1b963
TW
121322017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12133
12134 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
12135 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
12136 btrace_find_insn_by_number): Replace function segment pointer with
12137 index.
12138 (btrace_insn_cmp): Simplify.
12139 * btrace.h: (struct btrace_insn_iterator) Rename index to
12140 insn_index. Replace function segment pointer with index into function
12141 segment vector.
12142 * record-btrace.c (record_btrace_call_history): Replace function
12143 segment pointer use with index.
12144 (record_btrace_frame_sniffer): Retrieve function call segment through
12145 vector.
12146 (record_btrace_set_replay): Remove defunc't safety check.
12147
f158f208
TW
121482017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12149
12150 * btrace.c (btrace_ends_with_single_insn): New function.
12151 (btrace_call_get, btrace_call_number, btrace_call_begin,
12152 btrace_call_end, btrace_call_next, btrace_call_prev,
12153 btrace_find_call_by_number): Use index into call segment vector
12154 instead of pointer.
12155 (btrace_call_cmp): Simplify.
12156 * btrace.h (struct btrace_call_iterator): Replace function call segment
12157 pointer with index into vector.
12158 * record-btrace.c (record_btrace_call_history): Use index instead of
12159 pointer.
12160
521103fd
TW
121612017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12162
12163 * btrace.c (btrace_insn_begin, btrace_insn_end,
12164 btrace_find_insn_by_number): Add btinfo to iterator.
12165 * btrace.h (struct btrace_insn_iterator): Add btinfo.
12166
17b89b34
TW
121672017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12168
12169 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
12170 and save pointers directly.
12171 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
12172 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
12173 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
12174 changed signature of functions.
12175 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
12176 (btrace_fetch): Remove code that adds btrace_function pointers to
12177 vector of btrace_functions.
12178 (btrace_clear): Simplify freeing vector of btrace_functions.
12179
2b51eddc
TW
121802017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12181
12182 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
12183 Replace VEC_* with std::vector functions.
12184 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
12185 (struct btrace_thread_info)<functions>: Change type to std::vector.
12186
db6be0d5
SM
121872017-05-30 Simon Marchi <simon.marchi@ericsson.com>
12188
12189 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
12190 "Removed targets and native configurations" up. Merge duplicate
12191 "New commands" sub-sections. Add "New options" sub-sections.
12192
b057297a
AH
121932017-05-26 Alan Hayward <alan.hayward@arm.com>
12194
12195 * defs.h (copy_integer_to_size): New declaration.
12196 * findvar.c (copy_integer_to_size): New function.
12197 (do_cint_test): New selftest function.
12198 (copy_integer_to_size_test): Likewise.
12199 (_initialize_findvar): Likewise.
12200 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
12201 (mips_fbsd_collect_reg): Use raw_collect_integer.
12202 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
12203 (mips64_fill_gregset): Use raw_collect_integer
12204 (mips64_fill_fpregset): Use raw_supply_integer.
12205 * regcache.c (regcache::raw_supply_integer): New function.
12206 (regcache::raw_collect_integer): Likewise.
12207 * regcache.h: (regcache::raw_supply_integer): New declaration.
12208 (regcache::raw_collect_integer): Likewise.
12209
b77b02a5
YQ
122102017-05-24 Yao Qi <yao.qi@linaro.org>
12211
12212 * Makefile.in (SFILES): Add gdbarch-selftests.c.
12213 (COMMON_OBS): Add gdbarch-selftests.o.
12214 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
12215 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
12216 * gdbarch-selftests.c: New file.
12217 * regcache.h (regcache) <~regcache>: Mark it virtual if
12218 GDB_SELF_TEST.
12219 <raw_write>: Likewise.
12220
e521e87e
YQ
122212017-05-24 Yao Qi <yao.qi@linaro.org>
12222
12223 * regcache.c (current_regcache): Change it to
12224 regcache::current_regcache.
12225 (regcache_observer_target_changed): Update.
12226 (regcache_thread_ptid_changed): Make it a regcache static
12227 method.
12228 (regcache_thread_ptid_changed): Update.
12229 (class regcache_access): New.
12230 (current_regcache_test): Update.
12231 (_initialize_regcache): Update.
12232 * regcache.h: Include forward_list.
12233 (regcache): Declare regcache_thread_ptid_changed and declare
12234 registers_changed_ptid as friend.
12235
d8e07dda
YQ
122362017-05-24 Yao Qi <yao.qi@linaro.org>
12237
12238 * i387-tdep.c (i387_register_to_value): Use register_size
12239 instead of TYPE_LENGTH.
12240 * m68k-tdep.c (m68k_register_to_value): Likewise.
12241
8c8f9122
YQ
122422017-05-24 Yao Qi <yao.qi@linaro.org>
12243
12244 * i387-tdep.c (i387_convert_register_p): Return false if type
12245 code isn't TYPE_CODE_FLT.
12246
68fce50f
YQ
122472017-05-24 Yao Qi <yao.qi@linaro.org>
12248
12249 * alpha-tdep.c (alpha_convert_register_p): Return true if type
12250 length is 4.
12251 (alpha_register_to_value): Remove type length check.
12252 (alpha_value_to_register): Likewise.
12253
88954b49
YQ
122542017-05-24 Yao Qi <yao.qi@linaro.org>
12255
12256 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
12257 TYPE_CODE_FLT.
12258
e3ec9b69
YQ
122592017-05-24 Yao Qi <yao.qi@linaro.org>
12260
12261 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
12262 TYPE_CODE_FLT or not.
12263
cdd238da
YQ
122642017-05-24 Yao Qi <yao.qi@linaro.org>
12265
12266 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
12267 * avr-tdep.c (avr_gdbarch_init): Likewise.
12268 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12269 * cris-tdep.c (cris_gdbarch_init): Likewise.
12270 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12271 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12272 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12273 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
12274 * mep-tdep.c (mep_gdbarch_init): Likewise.
12275 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12276 * mips-tdep.c (mips_gdbarch_init): Likewise.
12277 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12278 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12279 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12280 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12281 * v850-tdep.c (v850_gdbarch_init): Likewise.
12282
7a3929c4
YQ
122832017-05-24 Yao Qi <yao.qi@linaro.org>
12284
12285 * selftest-arch.c (tests_with_arch): Call registers_changed
12286 and reinit_frame_cache.
12287 * selftest.c (run_self_tests): Likewise.
12288
f4985dba
YQ
122892017-05-24 Yao Qi <yao.qi@linaro.org>
12290
12291 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
12292 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
12293
ab20fa4a
YQ
122942017-05-24 Yao Qi <yao.qi@linaro.org>
12295
12296 * rl78-tdep.c (rl78_gdbarch_init): Don't call
12297 set_gdbarch_print_insn.
12298
f532ab94
YQ
122992017-05-24 Yao Qi <yao.qi@linaro.org>
12300
12301 * h8300-tdep.c (h8300_gdbarch_init): Don't call
12302 set_gdbarch_print_insn.
12303
39503f82
YQ
123042017-05-24 Yao Qi <yao.qi@linaro.org>
12305
12306 * alpha-tdep.c (alpha_gdbarch_init): Don't call
12307 set_gdbarch_print_insn.
12308 * arc-tdep.c (arc_gdbarch_init): Likewise.
12309 * arch-utils.c: include dis-asm.h.
12310 (default_print_insn): New function.
12311 * arch-utils.h (default_print_insn): Declare.
12312 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
12313 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12314 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
12315 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
12316 * frv-tdep.c (frv_gdbarch_init): Likewise.
12317 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12318 * gdbarch.sh (print_insn): Use default_print_insn.
12319 * gdbarch.c: Regenerated.
12320 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
12321 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
12322 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12323 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
12324 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12325 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
12326 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
12327 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
12328 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
12329 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12330 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12331 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12332 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12333 * mt-tdep.c (mt_gdbarch_init): Likewise.
12334 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12335 * nios2-tdep.c (nios2_print_insn): Remove.
12336 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
12337 * rx-tdep.c (rx_gdbarch_init): Likewise.
12338 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
12339 * score-tdep.c (score_print_insn): Remove.
12340 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
12341 * sh-tdep.c (sh_gdbarch_init): Likewise.
12342 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12343 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12344 * tic6x-tdep.c (tic6x_print_insn): Remove.
12345 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
12346 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
12347 * v850-tdep.c (v850_gdbarch_init): Likewise.
12348 * vax-tdep.c (vax_gdbarch_init): Likewise.
12349 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12350 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
12351
f7241d4f
JB
123522017-05-23 John Baldwin <jhb@FreeBSD.org>
12353
12354 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
12355 (MIPS_FP0_REGNUM): Remove.
12356 (MIPS_FSR_REGNUM): Remove.
12357 (mips_fbsd_supply_fpregs): Use mips_regnum.
12358 (mips_fbsd_supply_gregs): Likewise.
12359 (mips_fbsd_collect_fpregs): Likewise.
12360 (mips_fbsd_collect_gregs): Likewise.
12361
d489d81d
JB
123622017-05-23 John Baldwin <jhb@FreeBSD.org>
12363
12364 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
12365 (getpfpregs_supplies): New function.
12366 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
12367 getfpregs_supplies.
12368 (mips_fbsd_store_inferior_registers): Likewise.
12369
e11b3cdc
PA
123702017-05-22 Pedro Alves <palves@redhat.com>
12371
12372 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
12373 maintainer.
12374
0f068fb5
AH
123752017-05-22 Alan Hayward <alan.hayward@arm.com>
12376
12377 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
12378 (store_register): Likewise.
12379 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
12380 (get_decimal_float_return_value): Likewise.
12381 (do_ppc_sysv_return_value): Likewise.
12382 (ppc64_sysv_abi_push_integer): Likewise.
12383 (ppc64_sysv_abi_push_freg): Likewise.
12384 (ppc64_sysv_abi_return_value_base): Likewise.
12385 (ppc64_sysv_abi_return_value): Likewise.
12386 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
12387 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
12388 * rs6000-nat.c: Likewise.
12389 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
12390 (rs6000_value_to_register): Likewise.
12391 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
12392
e6cf65f2
TT
123932017-05-21 Tom Tromey <tom@tromey.com>
12394
12395 PR rust/21466:
12396 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
12397 arrays as "[T]", not "[T; ]".
12398
43cc5389
TT
123992017-05-19 Tom Tromey <tom@tromey.com>
12400
12401 PR rust/21484:
12402 * rust-lang.c (exp_descriptor_rust): New function.
12403 (rust_language_defn): Use it.
12404 * p-lang.c (pascal_language_defn): Update.
12405 * opencl-lang.c (opencl_language_defn): Update.
12406 * objc-lang.c (objc_language_defn): Update.
12407 * m2-lang.c (m2_language_defn): Update.
12408 * language.h (struct language_defn)
12409 <la_watch_location_expression>: New member.
12410 * language.c (unknown_language_defn, auto_language_defn)
12411 (local_language_defn): Update.
12412 * go-lang.c (go_language_defn): Update.
12413 * f-lang.c (f_language_defn): Update.
12414 * d-lang.c (d_language_defn): Update.
12415 * c-lang.h (c_watch_location_expression): Declare.
12416 * c-lang.c (c_watch_location_expression): New function.
12417 (c_language_defn, cplus_language_defn, asm_language_defn)
12418 (minimal_language_defn): Use it.
12419 * breakpoint.c (watch_command_1): Call
12420 la_watch_location_expression.
12421 * ada-lang.c (ada_language_defn): Update.
12422
7a6e7fcc
RO
124232017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12424
6e7e1744
RO
12425 PR tui/21482
12426 * gdb_curses.h (NOMACROS): Define.
12427 (NCURSES_NOMACROS): Define.
12428
124292017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12430
12431 PR tui/21482
7a6e7fcc
RO
12432 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
12433 arg to char *.
12434 * tui/tui-wingeneral.c (box_win): Likewise.
12435 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
12436 (tui_show_source_line): Likewise.
12437 (tui_show_exec_info_content): Likewise.
12438
1933fd8e
VM
124392017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12440
12441 * sparc-tdep.c (sparc_structure_return_p)
12442 (sparc_arg_on_registers_p): New functions.
12443 (sparc32_store_arguments): Use them.
12444 * sparc64-tdep.c (sparc64_16_byte_align_p)
12445 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
12446 Handle TYPE_CODE_ARRAY.
12447
21873064
YQ
124482017-05-17 Yao Qi <yao.qi@linaro.org>
12449
12450 * cli/cli-decode.c (add_alias_cmd): New function.
12451 * command.h (add_alias_cmd): Declare.
12452 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
12453 instead call add_alias_cmd.
12454
2b351b19
PA
124552017-05-17 Pedro Alves <palves@redhat.com>
12456
12457 * Makefile.in (nat_extra_makefile_frag): Rename to ...
12458 (nat_makefile_frag): ... this. All references updated.
12459 * configure.ac: Likewise.
12460 * configure.nat: Likewise. Enhance comments.
12461 * configure: Regenerate.
12462
5f2ad7a3
RO
124632017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12464
12465 * procfs.c (procfs_create_inferior): Change prototype to match
12466 definition.
12467
adf3dde5
EZ
124682017-05-13 Eli Zaretskii <eliz@gnu.org>
12469
12470 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
12471 C++ compiler warning.
12472
6830f270
TT
124732017-05-12 Tom Tromey <tom@tromey.com>
12474
12475 PR rust/21483:
12476 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
12477 recurse, just call value_struct_elt directly.
12478
68f2f2e3
TT
124792017-05-12 Tom Tromey <tom@tromey.com>
12480
12481 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
12482 OP_RUST_ARRAY>: Fix.
12483
256afbc2
TT
124842017-05-12 Tom Tromey <tom@tromey.com>
12485
12486 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
12487
94bb8dfe
YQ
124882017-05-09 Yao Qi <yao.qi@linaro.org>
12489
12490 * regcache.c: Include <forward_list>.
12491 (struct regcache_list): Remove.
12492 (current_regcache): Update.
12493 (get_thread_arch_aspace_regcache): Update for std::forward_list.
12494 (regcache_thread_ptid_changed): Likewise.
12495 (registers_changed_ptid): Likewise.
12496 (current_regcache_size): Likewise.
12497
8248946c
YQ
124982017-05-09 Yao Qi <yao.qi@linaro.org>
12499
12500 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
12501 (current_regcache_size): New function.
12502 (current_regcache_test): New function.
12503 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
12504
313c5961
AH
125052017-05-08 Alan Hayward <alan.hayward@arm.com>
12506
12507 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
12508 (print_gp_register_row): Use get_frame_register_value.
12509
27bfc1d1
AH
125102017-05-08 Alan Hayward <alan.hayward@arm.com>
12511
12512 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
12513 (mips_supply_fpregset): Likewise.
12514 (mips64_supply_gregset): Likewise.
12515
146e6c5c
AH
125162017-05-08 Alan Hayward <alan.hayward@arm.com>
12517
12518 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
12519 regcache->raw_supply_zeroed.
12520
e50f25ec
SDJ
125212017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12522
12523 * configure.nat: Rearrange 'case' statements to match
12524 host before cpu.
12525
21ea5acd
SDJ
125262017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12527
12528 * Makefile.in: Remove "@host_makefile_frag@". Add variables
12529 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
12530 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
12531 "@nat_extra_makefile_frag@".
12532 (Makefile): Remove dependency on "@frags@".
12533 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
12534 (data-directory/Makefile): Likewise.
12535 * config/aarch64/linux.mh: Deleted; moved contents to
12536 "gdb/configure.nat".
12537 * config/alpha/alpha-linux.mh: Likewise.
12538 * config/alpha/nbsd.mh: Likewise.
12539 * config/arm/linux.mh: Likewise.
12540 * config/arm/nbsdelf.mh: Likewise.
12541 * config/i386/cygwin.mh: Likewise.
12542 * config/i386/cygwin64.mh: Likewise.
12543 * config/i386/darwin.mh: Likewise.
12544 * config/i386/fbsd.mh: Likewise.
12545 * config/i386/fbsd64.mh: Likewise.
12546 * config/i386/go32.mh: Likewise.
12547 * config/i386/i386gnu.mh: Likewise.
12548 * config/i386/i386sol2.mh: Likewise.
12549 * config/i386/linux.mh: Likewise.
12550 * config/i386/linux64.mh: Likewise.
12551 * config/i386/mingw.mh: Likewise.
12552 * config/i386/mingw64.mh: Likewise.
12553 * config/i386/nbsd64.mh: Likewise.
12554 * config/i386/nbsdelf.mh: Likewise.
12555 * config/i386/nto.mh: Likewise.
12556 * config/i386/obsd.mh: Likewise.
12557 * config/i386/obsd64.mh: Likewise.
12558 * config/i386/sol2-64.mh: Likewise.
12559 * config/ia64/linux.mh: Likewise.
12560 * config/m32r/linux.mh: Likewise.
12561 * config/m68k/linux.mh: Likewise.
12562 * config/m68k/nbsdelf.mh: Likewise.
12563 * config/m68k/obsd.mh: Likewise.
12564 * config/m88k/obsd.mh: Likewise.
12565 * config/mips/fbsd.mh: Likewise.
12566 * config/mips/linux.mh: Likewise.
12567 * config/mips/nbsd.mh: Likewise.
12568 * config/mips/obsd64.mh: Likewise.
12569 * config/pa/linux.mh: Likewise.
12570 * config/pa/nbsd.mh: Likewise.
12571 * config/pa/obsd.mh: Likewise.
12572 * config/powerpc/aix.mh: Likewise.
12573 * config/powerpc/fbsd.mh: Likewise.
12574 * config/powerpc/linux.mh: Likewise.
12575 * config/powerpc/nbsd.mh: Likewise.
12576 * config/powerpc/obsd.mh: Likewise.
12577 * config/powerpc/ppc64-linux.mh: Likewise.
12578 * config/powerpc/spu-linux.mh: Likewise.
12579 * config/s390/linux.mh: Likewise.
12580 * config/sh/nbsd.mh: Likewise.
12581 * config/sparc/fbsd.mh: Likewise.
12582 * config/sparc/linux.mh: Likewise.
12583 * config/sparc/linux64.mh: Likewise.
12584 * config/sparc/nbsd64.mh: Likewise.
12585 * config/sparc/nbsdelf.mh: Likewise.
12586 * config/sparc/obsd64.mh: Likewise.
12587 * config/sparc/sol2.mh: Likewise.
12588 * config/tilegx/linux.mh: Likewise.
12589 * config/vax/nbsdelf.mh: Likewise.
12590 * config/vax/obsd.mh: Likewise.
12591 * config/xtensa/linux.mh: Likewise.
12592 * config/i386/i386gnu.mn: New file, with excerpts from
12593 "config/i386/i386gnu.mh".
12594 * configure: Regenerate.
12595 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
12596 *.mh files under "gdb/config".
12597 * configure.nat: New file, with contents from the
12598 "gdb/config/*/*.mh" files.
12599
7ed1acaf
TW
126002017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
12601
12602 * btrace.c (btrace_clear): Free insn vector.
12603
e13cb306
PA
126042017-05-05 Pedro Alves <palves@redhat.com>
12605
12606 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
12607 * configure: Regenerate.
12608
5ed8105e
PA
126092017-05-04 Pedro Alves <palves@redhat.com>
12610
12611 * Makefile.in (SFILES): Add progspace-and-thread.c.
12612 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
12613 (COMMON_OBS): Add progspace-and-thread.o.
12614 * breakpoint.c: Include "progspace-and-thread.h".
12615 (update_inserted_breakpoint_locations)
12616 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
12617 Use scoped_restore_current_pspace_and_thread.
12618 (create_std_terminate_master_breakpoint): Use
12619 scoped_restore_current_program_space.
12620 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
12621 (print_breakpoint_location): Use
12622 scoped_restore_current_program_space.
12623 (bp_loc_is_permanent): Use
12624 scoped_restore_current_pspace_and_thread.
12625 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
12626 (download_tracepoint_locations): Use
12627 scoped_restore_current_pspace_and_thread.
12628 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
12629 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
12630 (enum step_over_calls_kind): Moved from inferior.h.
12631 (class scoped_restore_current_thread): New class.
12632 * gdbthread.h (make_cleanup_restore_current_thread): Delete
12633 declaration.
12634 (scoped_restore_current_thread): New class.
12635 * infcmd.c: Include "common/gdb_optional.h".
12636 (continue_1, proceed_after_attach): Use
12637 scoped_restore_current_thread.
12638 (notice_new_inferior): Use scoped_restore_current_thread.
12639 * inferior.c: Include "progspace-and-thread.h".
12640 (restore_inferior, save_current_inferior): Delete.
12641 (add_inferior_command, clone_inferior_command): Use
12642 scoped_restore_current_pspace_and_thread.
12643 * inferior.h (scoped_restore_current_inferior): New class.
12644 * infrun.c: Include "progspace-and-thread.h" and
12645 "common/gdb_optional.h".
12646 (follow_fork_inferior): Use
12647 scoped_restore_current_pspace_and_thread.
12648 (scoped_restore_exited_inferior): New class.
12649 (handle_vfork_child_exec_or_exit): Use
12650 scoped_restore_exited_inferior,
12651 scoped_restore_current_pspace_and_thread,
12652 scoped_restore_current_thread and scoped_restore.
12653 (fetch_inferior_event): Use scoped_restore_current_thread.
12654 * linespec.c (decode_line_full, decode_line_1): Use
12655 scoped_restore_current_program_space.
12656 * mi/mi-main.c: Include "progspace-and-thread.h".
12657 (exec_continue): Use scoped_restore_current_thread.
12658 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
12659 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
12660 * proc-service.c (ps_pglobal_lookup): Use
12661 scoped_restore_current_program_space.
12662 * progspace-and-thread.c: New file.
12663 * progspace-and-thread.h: New file.
12664 * progspace.c (release_program_space, clone_program_space): Use
12665 scoped_restore_current_program_space.
12666 (restore_program_space, save_current_program_space)
12667 (save_current_space_and_thread): Delete.
12668 (switch_to_program_space_and_thread): Moved to
12669 progspace-and-thread.c.
12670 * progspace.h (save_current_program_space)
12671 (save_current_space_and_thread): Delete declarations.
12672 (scoped_restore_current_program_space): New class.
12673 * remote.c (remote_btrace_maybe_reopen): Use
12674 scoped_restore_current_thread.
12675 * symtab.c: Include "progspace-and-thread.h".
12676 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
12677 * thread.c (print_thread_info_1): Use
12678 scoped_restore_current_thread.
12679 (struct current_thread_cleanup): Delete.
12680 (do_restore_current_thread_cleanup)
12681 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
12682 (scoped_restore_current_thread::~scoped_restore_current_thread):
12683 ... this new dtor.
12684 (make_cleanup_restore_current_thread): Rename/convert to ...
12685 (scoped_restore_current_thread::scoped_restore_current_thread):
12686 ... this new ctor.
12687 (thread_apply_all_command): Use scoped_restore_current_thread.
12688 (thread_apply_command): Use scoped_restore_current_thread.
12689 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
12690 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
12691
f6223dbb
PA
126922017-05-04 Pedro Alves <palves@redhat.com>
12693
12694 * thread.c (make_cleanup_restore_current_thread): Move
12695 find_thread_ptid call before the is_stopped call. Assert that the
12696 thread is found. Replace is_stopped call by checking the thread's
12697 state directly. Remove unnecessary NULL-thread check.
12698
3c3ae77e
PA
126992017-05-04 Pedro Alves <palves@redhat.com>
12700
12701 * corelow.c (thread_section_name): New class.
12702 (get_core_register_section, get_core_siginfo): Use it.
12703
45eba0ab
AA
127042017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
12705
12706 * corelow.c (sniff_core_bfd): Remove extra semicolon.
12707 (get_core_register_section): Remove xfree of NULL pointer.
12708
f81fdd35
AH
127092017-05-03 Alan Hayward <alan.hayward@arm.com>
12710
12711 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
12712 * regcache.c (regcache::raw_supply_zeroed): New function.
12713 * regcache.h (regcache::raw_supply_zeroed): New declaration.
12714
35837774
SM
127152017-05-03 Simon Marchi <simon.marchi@ericsson.com>
12716
12717 * gdbarch.sh: Remove commented out definition of
12718 TARGET_CHAR_BIT.
12719 * gdbarch.h: Re-generate.
12720
c94fee56
SDJ
127212017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
12722
12723 * configure: Regenerate.
12724
d17f7b36
SM
127252017-05-02 Simon Marchi <simon.marchi@ericsson.com>
12726
12727 * solib-target.c (solib_target_relocate_section_addresses):
12728 Remove num_section_bases, num_bases, segment_bases variables.
12729
b560ebd6
SM
127302017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12731
12732 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
12733
f2f46dfc
SM
127342017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12735
12736 * solib-target.c: Include <vector>
12737 (struct lm_info_target) <~lm_info_target>: Remove.
12738 <segment_bases, section_bases>: Change type to
12739 std::vector<CORE_ADDR>.
12740 (library_list_start_segment, library_list_start_section,
12741 library_list_end_library,
12742 solib_target_relocate_section_addresses): Adjust.
12743
a0ff9e1a
SM
127442017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12745
12746 * gdbarch.sh (software_single_step): Change return type to
12747 std::vector<CORE_ADDR>.
12748 * gdbarch.c, gdbarch.h: Re-generate.
12749 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
12750 Adjust.
12751 (arm_deal_with_atomic_sequence_raw): Adjust.
12752 (thumb_get_next_pcs_raw): Adjust.
12753 (arm_get_next_pcs_raw): Adjust.
12754 (arm_get_next_pcs): Adjust.
12755 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
12756 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
12757 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
12758 (alpha_software_single_step): Adjust.
12759 * alpha-tdep.h (alpha_software_single_step): Adjust.
12760 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
12761 * arm-tdep.c (arm_software_single_step): Adjust.
12762 (arm_breakpoint_kind_from_current_state): Adjust.
12763 * arm-tdep.h (arm_software_single_step): Adjust.
12764 * breakpoint.c (insert_single_step_breakpoint): Adjust.
12765 * cris-tdep.c (cris_software_single_step): Adjust.
12766 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
12767 (micromips_deal_with_atomic_sequence): Adjust.
12768 (deal_with_atomic_sequence): Adjust.
12769 (mips_software_single_step): Adjust.
12770 * mips-tdep.h (mips_software_single_step): Adjust.
12771 * moxie-tdep.c (moxie_software_single_step): Adjust.
12772 * nios2-tdep.c (nios2_software_single_step): Adjust.
12773 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
12774 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
12775 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
12776 * s390-linux-tdep.c (s390_software_single_step): Adjust.
12777 * sparc-tdep.c (sparc_software_single_step): Adjust.
12778 * spu-tdep.c (spu_software_single_step): Adjust.
12779 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
12780
ea480a30
SM
127812017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12782
12783 * gdbarch.sh: Use semi-colon as field separator instead of colon.
12784 * gdbarch.h: Re-generate.
12785
d050f7d7
TW
127862017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12787
12788 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
12789 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
12790 * python/py-instruction.c, python/py-instruction.h: New file.
12791 * python/py-record.c: Add py-instruction.h include.
12792 (gdbpy_initialize_record): Make gdb.Instruction a super class of
12793 gdb.RecordInstruction.
12794 * python/python-internal.h: Add gdbpy_initialize_instruction
12795 declaration.
12796 * python/python.c (do_start_initialization): Add
12797 gdbpy_initialize_instruction.
12798
14f819c8
TW
127992017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12800
12801 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
12802 Remove.
12803 (btrace_func_from_recpy_func): New function.
12804 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
12805 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
12806 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
12807 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
12808 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
12809 Also, use new helper functions.
12810 (btpy_list_item): Use new helper functions.
12811 (recpy_bt_function_call_history): Use new type name.
12812 (btpy_call_getset): Remove.
12813 (gdbpy_initialize_btrace): Remove code to initialize
12814 gdb.BtraceFunctionCall.
12815 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
12816 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
12817 recpy_bt_func_prev, recpy_bt_func_next): New export.
12818 * python/py-record.c (recpy_func_type): New static object.
12819 (recpy_func_new, recpy_func_level, recpy_func_symbol,
12820 recpy_func_instructions, recpy_func_up, recpy_func_prev,
12821 recpy_func_next): New function.
12822 (recpy_element_hash, recpy_element_richcompare): Updated comment.
12823 (recpy_func_getset): New static object.
12824 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
12825 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
12826
0ed5da75
TW
128272017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12828
12829 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
12830 (btpy_object, btpy_insn_type, btpy_new): Remove.
12831 (btpy_list_object): Use gdb.RecordInstruction type instead of
12832 gdb.BtraceInstruction type.
12833 (btrace_insn_from_recpy_insn): New function.
12834 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
12835 btpy_new.
12836 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
12837 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
12838 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
12839 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
12840 instead of btpy_object.
12841 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12842 btpy_insn_data, btpy_insn_decode): Rename to ...
12843 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
12844 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
12845 recpy_bt_insn_decode): This. Also, use new helper functions.
12846 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
12847 recpy_insn_type.
12848 (btpy_insn_getset): Remove.
12849 (gdbpy_initialize_btrace): Remove code to initialize
12850 gdb.BtraceInstruction. Use recpy_element_object.
12851 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
12852 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
12853 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
12854 * python/py-record.c (recpy_insn_type): New static object.
12855 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
12856 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
12857 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
12858 New function.
12859 (recpy_insn_getset): New static object.
12860 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
12861 * python/py-record.h (recpy_element_object): New typedef.
12862 (recpy_insn_type, recpy_insn_new): New export.
12863
913aeadd
TW
128642017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12865
12866 * py-record-btrace.c (btpy_insn_new): Removed.
12867 (btpy_insn_or_gap_new): New function.
12868 (btpy_insn_error): Removed.
12869 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12870 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
12871 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
12872 btpy_insn_or_gap_new instead of btpy_insn_new.
12873 (btpy_insn_getset): Remove btpy_insn_error.
12874 * py-record.c (recpy_gap_type): New static object.
12875 (recpy_gap_object): New typedef.
12876 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
12877 recpy_gap_reason_string): New function.
12878 (recpy_gap_getset): New static object.
12879 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
12880 * py-record.h (recpy_gap_new): New export.
12881
a3be24ad
TW
128822017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12883
12884 * python/py-record.c (recpy_ptid): Remove.
12885 (recpy_record_getset): Remove recpy_ptid.
12886
ae20e79a
TW
128872017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12888
12889 * btrace.c (btrace_fetch): Set inferior_ptid.
12890 * python/py-record-btrace.c: Add "py-record.h" include.
12891 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
12892 recpy_bt_end, recpy_bt_instruction_history,
12893 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
12894 in gdb.Record object instead of current ptid.
12895 * python/py-record.c: Include new "py-record.h" file.
12896 (recpy_record_object): Moved to py-record.h.
12897 * python/py-record.h: New file.
12898
8d0050ea
TW
128992017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12900
12901 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
12902 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
12903 indentation.
12904
3f380b50
JB
129052017-05-01 Joel Brobecker <brobecker@adacore.com>
12906
12907 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
12908 the past maintainers section.
12909
07495424
YQ
129102017-04-28 Yao Qi <yao.qi@linaro.org>
12911
12912 * infcmd.c (get_return_value): Use regcache ctor, and remove
12913 cleanup.
12914
deb1fa3e
YQ
129152017-04-28 Yao Qi <yao.qi@linaro.org>
12916 Pedro Alves <palves@redhat.com>
12917
12918 * regcache.c (regcache::regcache): New tag dispatch ctor.
12919 (do_cooked_read): Moved above.
12920 (regcache_dup): Use the tag dispatch ctor..
12921 * regcache.h (regcache): Declare ctor, delete copy ctor and
12922 assignment operator, remove friend regcache_dup.
12923
b421c83c
YQ
129242017-04-28 Yao Qi <yao.qi@linaro.org>
12925
12926 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
12927 call method save instead of regcache_cpy.
12928 * regcache.h (struct regcache): Make regcache_dup a friend.
12929
ef79d9a3
YQ
129302017-04-28 Yao Qi <yao.qi@linaro.org>
12931
12932 * regcache.c (struct regcache): Move to regcache.h
12933 (regcache::arch): New method.
12934 (regcache_get_ptid): Update.
12935 (get_regcache_arch): Call arch method.
12936 (get_regcache_aspace): Call method aspace.
12937 (register_buffer): Change it to method.
12938 (regcache_save): Change it to regcache::save.
12939 (regcache_restore): Likewise.
12940 (regcache_cpy_no_passthrough): Remove the declaration.
12941 (regcache_cpy): Call methods restore and cpy_no_passthrough.
12942 (regcache_cpy_no_passthrough): Change it to method
12943 cpy_no_passthrough.
12944 (regcache_register_status): Change it to method
12945 get_register_status.
12946 (regcache_invalidate): Change it to method invalidate.
12947 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
12948 (regcache_raw_update): Change it to method raw_update.
12949 (regcache_raw_read): Likewise.
12950 (regcache_raw_read_signed): Likewise.
12951 (regcache_raw_read_unsigned): Likewise.
12952 (regcache_raw_write_signed): Likewise.
12953 (regcache_raw_write_unsigned): Likewise.
12954 (regcache_cooked_read): Likewise.
12955 (regcache_cooked_read_value): Likewise.
12956 (regcache_cooked_read_signed): Likewise.
12957 (regcache_cooked_read_unsigned): Likewise.
12958 (regcache_cooked_write_signed): Likewise.
12959 (regcache_cooked_write_unsigned): Likewise.
12960 (regcache_raw_set_cached_value): Likewise.
12961 (regcache_raw_write): Likewise.
12962 (regcache_cooked_write): Likewise.
12963 (regcache_xfer_part): Likewise.
12964 (regcache_raw_read_part): Likewise.
12965 (regcache_raw_write_part): Likewise.
12966 (regcache_cooked_read_part): Likewise.
12967 (regcache_cooked_write_part): Likewise.
12968 (regcache_raw_supply): Likewise.
12969 (regcache_raw_collect): Likewise.
12970 (regcache_transfer_regset): Likewise.
12971 (regcache_supply_regset): Likewise.
12972 (regcache_collect_regset): Likewise.
12973 (regcache_debug_print_register): Likewise.
12974 (enum regcache_dump_what): Move it to regcache.h.
12975 (regcache_dump): Change it to method dump.
12976 * regcache.h (enum regcache_dump_what): New.
12977 (class regcache): New.
12978 * target.c (target_fetch_registers): Call method
12979 debug_print_register.
12980 (target_store_registers): Likewise.
12981
f8fdb78e
SM
129822017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12983
12984 * windows-nat.c (struct lm_info_windows): Initialize field.
12985 (windows_make_so): Allocate lm_info_windows with new.
12986 (windows_free_so): Free lm_info_windows with delete.
12987
9ccbfd7b
SM
129882017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12989
12990 * solib-darwin.c (struct lm_info_darwin): Initialize field.
12991 (darwin_current_sos): Allocate lm_info_darwin with new, remove
12992 cleanup.
12993 (darwin_free_so): Free lm_info_darwin with delete.
12994
76e75227
SM
129952017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12996
12997 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
12998 <l_addr_p>: Change type to bool.
12999 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
13000 (svr4_free_so): Free lm_info_svr4 with delete.
13001 (svr4_copy_library_list): Replace memcpy with call to copy
13002 constructor.
13003 (library_list_start_library, svr4_default_sos): Allocate
13004 lm_info_svr4 with new.
13005
51046d9e
SM
130062017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13007
13008 * solib-target.c (struct lm_info_target): Add destructor,
13009 initialize fields.
13010 <name>: Change type to std::string.
13011 (library_list_start_library): Allocate lm_info_target with new.
13012 (solib_target_free_library_list): Free lm_info_target with
13013 delete.
13014 (solib_target_current_sos): Adapt to std::string.
13015 (solib_target_free_so): Free lm_info_target with delete.
13016
4023ae76
SM
130172017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13018
13019 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
13020 fields.
13021 (frv_current_sos): Allocate lm_info_frv with new.
13022 (frv_relocate_main_executable): Free lm_info_frv with delete,
13023 allocate with new.
13024 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
13025
af43057b
SM
130262017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13027
13028 * solib-frv.c (struct lm_info_frv): Fix indentation.
13029
b0911207
SM
130302017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13031
13032 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
13033 map field.
13034 (dsbt_current_sos): Allocate lm_info_dsbt with new.
13035 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
13036 and allocate with new.
13037 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
13038
6c401f72
SM
130392017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13040
13041 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
13042 <filename, member_name>: Change type to std::string.
13043 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
13044 (library_list_start_library): Allocate lm_info_aix with new.
13045 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
13046 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
13047 with copy constructor.
13048
d0e449a1
SM
130492017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13050
13051 * solist.h (struct lm_info): Remove.
13052 (struct lm_info_base): New class.
13053 (struct so_list) <lm_info>: Change type to lm_info_base *.
13054 * nto-tdep.c (struct lm_info): Remove.
13055 (lm_addr): Adjust.
13056 * solib-aix.c (struct lm_info): Rename to ...
13057 (struct lm_info_aix): ... this. Extend lm_info_base.
13058 (lm_info_p): Rename to ...
13059 (lm_info_aix_p): ... this, and adjust.
13060 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
13061 solib_aix_parse_libraries, library_list_start_library,
13062 solib_aix_free_library_list, solib_aix_parse_libraries,
13063 solib_aix_get_library_list,
13064 solib_aix_relocate_section_addresses, solib_aix_free_so,
13065 solib_aix_get_section_offsets,
13066 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
13067 Adjust.
13068 (struct solib_aix_inferior_data) <library_list>: Adjust.
13069 * solib-darwin.c (struct lm_info): Rename to ...
13070 (struct lm_info_darwin): ... this. Extend lm_info_base.
13071 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
13072 * solib-dsbt.c (struct lm_info): Rename to ...
13073 (struct lm_info_dsbt): ... this. Extend lm_info_base.
13074 (struct dsbt_info) <main_executable_lm_info): Adjust.
13075 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
13076 dsbt_relocate_section_addresses): Adjust.
13077 * solib-frv.c (struct lm_info): Rename to ...
13078 (struct lm_info_frv): ... this. Extend lm_info_base.
13079 (main_executable_lm_info): Adjust.
13080 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
13081 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
13082 find_canonical_descriptor_in_load_object,
13083 frv_fdpic_find_canonical_descriptor): Adjust.
13084 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
13085 to lm_info_svr4.
13086 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
13087 svr4_clear_so, svr4_copy_library_list,
13088 library_list_start_library, svr4_default_sos, svr4_read_so_list,
13089 svr4_current_sos, svr4_fetch_objfile_link_map,
13090 solist_update_incremental): Adjust.
13091 * solib-svr4.h (struct lm_info_svr4): Move here from
13092 solib-svr4.c.
13093 * solib-target.c (struct lm_info): Rename to ...
13094 (struct lm_info_target): ... this. Extend lm_info_base.
13095 (lm_info_p): Rename to ...
13096 (lm_info_target_p): ... this.
13097 (solib_target_parse_libraries, library_list_start_segment,
13098 library_list_start_section, library_list_start_library,
13099 library_list_end_library, solib_target_free_library_list,
13100 solib_target_current_sos, solib_target_free_so,
13101 solib_target_relocate_section_addresses): Adjust.
13102 * windows-nat.c (struct lm_info): Rename to ...
13103 (struct lm_info_windows): ... this. Extend lm_info_base.
13104 (windows_make_so, handle_load_dll, handle_unload_dll,
13105 windows_xfer_shared_libraries): Adjust.
13106
434a4023
SM
131072017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13108
13109 * solib-darwin.c (struct darwin_so_list): Remove.
13110 (darwin_current_sos): Allocate an so_list object instead of a
13111 darwin_so_list, separately allocate an lm_info object.
13112 (darwin_free_so): Free lm_info.
13113
428544e8
JB
131142017-04-28 John Baldwin <jhb@FreeBSD.org>
13115
13116 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
13117 with fprintf_filtered.
13118
4621115f
YQ
131192017-04-28 Yao Qi <yao.qi@linaro.org>
13120
13121 * regcache.c (regcache::regcache): New function.
13122 (regcache::~regcache): New function.
13123 (regcache_xmalloc_1): Remove.
13124 (regcache_xmalloc): Call new regcache.
13125 (regcache_xfree): Call delete regcache.
13126 (get_thread_arch_aspace_regcache): Call new regcache.
13127
339053c2
YQ
131282017-04-28 Yao Qi <yao.qi@linaro.org>
13129
13130 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
13131 lwp instead of ptid_get_lwp.
13132
7974a605
YQ
131332017-04-28 Yao Qi <yao.qi@linaro.org>
13134
13135 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
13136 lwp_info instead of getting from inferior_ptid.
13137
e15c3eb4
KS
131382017-04-27 Keith Seitz <keiths@redhat.com>
13139
13140 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
13141 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
13142 (CV_CONVERSION_BADNESS): Define.
13143 (rank_one_type): Remove overly restrictive rvalue reference
13144 rank checks.
13145 Add cv-qualifier checks and subranks for type equality.
13146 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
13147 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
13148 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
13149
72bc1d24
SM
131502017-04-27 Simon Marchi <simon.marchi@ericsson.com>
13151
13152 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
13153 count when creating the object.
13154
55bcecda
UW
131552017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
13156 Ulrich Weigand <uweigand@de.ibm.com>
13157
13158 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
13159 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
13160 is used in AIX.
13161 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
13162 (process_xcoff_symbol): Likewise.
13163 (scan_xcoff_symtab): Likewise.
13164
5c99fcf8
AH
131652017-04-26 Alan Hayward <alan.hayward@arm.com>
13166
13167 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
13168 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
13169 (ia64_access_reg): Use get_frame_register_unsigned.
13170 (ia64_access_rse_reg): Likewise.
13171 (ia64_libunwind_frame_prev_register): Likewise.
13172
b41c5a85
JW
131732017-04-26 Jiong Wang <jiong.wang@arm.com>
13174
13175 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
13176 * gdbarch.c: Regenerated.
13177 * gdbarch.h: Regenerated.
13178 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
13179 visibility external.
13180 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
13181 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
13182 (enum cfa_how_kind): Move to ...
13183 (struct dwarf2_frame_state_reg_info): Likewise.
13184 (struct dwarf2_frame_state): Likewise.
13185 * dwarf2-frame.h: ... here.
13186 (dwarf2_frame_state_alloc_regs): New declaration.
13187 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
13188 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
13189
c185f580
AH
131902017-04-26 Alan Hayward <alan.hayward@arm.com>
13191
13192 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
13193 regcache_raw_read_unsigned.
13194 (xtensa_pseudo_register_write): Likewise.
13195
19c45594
AH
131962017-04-26 Alan Hayward <alan.hayward@arm.com>
13197
13198 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
13199 (nds32_pseudo_register_write): Likewise.
13200
4658f12e
YQ
132012017-04-25 Yao Qi <yao.qi@linaro.org>
13202
13203 * regcache.c (struct regcache) <readonly_p>: Change its type
13204 to bool.
13205 (regcache_xmalloc_1): Update parameter type and callers update.
13206
d581dda8
YQ
132072017-04-25 Yao Qi <yao.qi@linaro.org>
13208
13209 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
13210 set_gdbarch_wchar_bit.
13211 * arm-tdep.c (arm_gdbarch_init): Likewise.
13212
debed3db
PA
132132017-04-25 Pedro Alves <palves@redhat.com>
13214
13215 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
13216 (BothAreRelocatable, memcopy, memmove): Don't define.
13217 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
13218 macros.
13219
b0b92aeb
PA
132202017-04-25 Pedro Alves <palves@redhat.com>
13221
13222 * common/common-defs.h: Include "common/poison.h".
13223 * common/function-view.h: (Not, Or, Requires): Move to traits.h
13224 and adjust.
13225 * common/poison.h: New file.
13226 * common/traits.h: Include <type_traits>.
13227 (Not, Or, Requires): New, moved from common/function-view.h.
13228
16c4d54a
PA
132292017-04-25 Pedro Alves <palves@redhat.com>
13230
13231 * breakpoint.h (struct breakpoint): In-class initialize all
13232 fields. Make boolean fields "bool".
13233 * breakpoint.c (init_raw_breakpoint_without_location): Remove
13234 memset call and initializations no longer necessary.
13235
b5c36682
PA
132362017-04-25 Pedro Alves <palves@redhat.com>
13237
13238 * btrace.c (pt_btrace_insn_flags): Change parameter type to
13239 reference.
13240 (pt_btrace_insn): New function.
13241 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
13242
5625a286
PA
132432017-04-25 Pedro Alves <palves@redhat.com>
13244
13245 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
13246 "base" field and inherit from "bp_location" instead. Add
13247 non-default ctor.
13248 (allocate_location_exception): Use new non-default ctor.
13249 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
13250 (init_bp_location): Convert to ...
13251 (bp_location::bp_location): ... this new ctor, and remove memset
13252 call.
13253 (base_breakpoint_allocate_location): Use the new non-default ctor.
13254 * breakpoint.h (bp_location): Now a class. Declare default and
13255 non-default ctors. In-class initialize all members.
13256 (init_bp_location): Remove declaration.
13257
23bcc18f
PA
132582017-04-25 Pedro Alves <palves@redhat.com>
13259
13260 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
13261 assignment operator.
13262
e1ba3053
YQ
132632017-04-24 Yao Qi <yao.qi@linaro.org>
13264
13265 * doublest.c (convert_doublest_to_floatformat): Call
13266 floatformat_totalsize_bytes.
13267
10f489e5
TT
132682017-04-22 Tom Tromey <tom@tromey.com>
13269
13270 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
13271 ui_out_emit_list.
13272 * stack.c (print_frame): Use ui_out_emit_list.
13273 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13274 ui_out_emit_list.
13275 * mi/mi-main.c (print_one_inferior)
13276 (mi_cmd_data_list_register_names)
13277 (mi_cmd_data_list_register_values, mi_cmd_list_features)
13278 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
13279 ui_out_emit_list.
13280 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
13281 (mi_output_solib_attribs): Use ui_out_emit_list,
13282 ui_out_emit_tuple.
13283 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
13284 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
13285 (mi_cmd_stack_list_args, list_args_or_locals): Use
13286 ui_out_emit_list.
13287 * disasm.c (do_assembly_only): Use ui_out_emit_list.
13288 * breakpoint.c (print_solib_event, output_thread_groups): Use
13289 ui_out_emit_list.
13290
0092b74d
TT
132912017-04-22 Tom Tromey <tom@tromey.com>
13292
13293 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
13294 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
13295 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
13296
a14a62dd
TT
132972017-04-22 Tom Tromey <tom@tromey.com>
13298
13299 * tracepoint.c (tvariables_info_1)
13300 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
13301
46b9c129
TT
133022017-04-22 Tom Tromey <tom@tromey.com>
13303
13304 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
13305 annotate_arg_emitter.
13306 * breakpoint.c (print_mention_watchpoint)
13307 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
13308 * annotate.h (struct annotate_arg_emitter): New.
13309
2e783024
TT
133102017-04-22 Tom Tromey <tom@tromey.com>
13311
13312 * record-btrace.c (record_btrace_insn_history)
13313 (record_btrace_insn_history_range, record_btrace_call_history)
13314 (record_btrace_call_history_range): Use ui_out_emit_tuple.
13315 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
13316 ui_out_emit_tuple.
13317 * stack.c (print_frame_info): Use ui_out_emit_tuple.
13318 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
13319 * skip.c (skip_info): Use ui_out_emit_tuple.
13320 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
13321 * progspace.c (print_program_space): Use ui_out_emit_tuple.
13322 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
13323 * osdata.c (info_osdata): Use ui_out_emit_tuple.
13324 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13325 ui_out_emit_tuple.
13326 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
13327 (output_register, mi_cmd_data_read_memory)
13328 (mi_cmd_data_read_memory_bytes, mi_load_progress)
13329 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
13330 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
13331 Use ui_out_emit_tuple.
13332 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
13333 ui_out_emit_tuple.
13334 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13335 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
13336 * linux-thread-db.c (info_auto_load_libthread_db): Use
13337 ui_out_emit_tuple.
13338 * inferior.c (print_inferior): Use ui_out_emit_tuple.
13339 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
13340 * disasm.c (do_mixed_source_and_assembly_deprecated)
13341 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
13342 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
13343 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
13344 * breakpoint.c (print_one_breakpoint_location)
13345 (print_one_breakpoint): Use ui_out_emit_tuple.
13346 * auto-load.c (print_script, info_auto_load_cmd): Use
13347 ui_out_emit_tuple.
13348 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
13349
9be21bb4
SM
133502017-04-21 Simon Marchi <simon.marchi@ericsson.com>
13351
13352 * thread.c (print_thread_info_1): Remove dead code.
13353
0d4c07af
JK
133542017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13355
13356 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
13357 GDB_SELF_TEST.
13358 * arm-tdep.c (selftests::arm_record_test): Likewise.
13359
4daf993d
YQ
133602017-04-21 Yao Qi <yao.qi@linaro.org>
13361
13362 * regcache.c (regcache_restore): Remove argument 2. Replace
13363 argument 3 with regcache. Get register status from
13364 src->register_status and get register contents from
13365 register_buffer (src, regnum).
13366 (regcache_cpy): Update.
13367
a6c21d4a
PA
133682017-04-19 Pedro Alves <palves@redhat.com>
13369
13370 * gdbthread.h (thread): Add missing closing parenthesis in
13371 comment.
13372
3a3fd0fd
PA
133732017-04-19 Pedro Alves <palves@redhat.com>
13374
13375 * common/refcounted-object.h: New file.
13376 * gdbthread.h: Include "common/refcounted-object.h".
13377 (thread_info): Inherit from refcounted_object and add comments.
13378 (thread_info::incref, thread_info::decref)
13379 (thread_info::m_refcount): Delete.
13380 (thread_info::deletable): Use the refcounted_object::refcount()
13381 method.
13382 * inferior.c (current_inferior_): Add comment.
13383 (set_current_inferior): Increment/decrement refcounts.
13384 (prune_inferiors, remove_inferior_command): Skip inferiors marked
13385 not-deletable instead of comparing with the current inferior.
13386 (initialize_inferiors): Increment the initial inferior's refcount.
13387 * inferior.h (struct inferior): Forward declare.
13388 Include "common/refcounted-object.h".
13389 (current_inferior, set_current_inferior): Move declaration to
13390 before struct inferior's definition, and fix comment.
13391 (inferior): Inherit from refcounted_object. Add comments.
13392 * thread.c (switch_to_thread_no_regs): Reference the thread's
13393 inferior pointer directly instead of doing a ptid lookup.
13394 (switch_to_no_thread): New function.
13395 (switch_to_thread(thread_info *)): New function, factored out
13396 from ...
13397 (switch_to_thread(ptid_t)): ... this.
13398 (restore_current_thread): Delete.
13399 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
13400 fields, and add 'inf' field.
13401 (do_restore_current_thread_cleanup): Check whether old->inf is
13402 alive instead of looking up an inferior by ptid. Use
13403 switch_to_thread and switch_to_no_thread.
13404 (restore_current_thread_cleanup_dtor): Use old->inf directly
13405 instead of lookup up an inferior by id. Decref the inferior.
13406 Don't restore 'removable'.
13407 (make_cleanup_restore_current_thread): Same the inferior pointer
13408 in old, instead of the inferior number. Incref the inferior.
13409 Don't save/clear 'removable'.
13410
9bcb1f16
PA
134112017-04-19 Pedro Alves <palves@redhat.com>
13412
13413 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13414 unittests/scoped_restore-selftests.c.
13415 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
13416 * common/scoped_restore.h (scoped_restore_base): Make "class".
13417 (scoped_restore_base::release): New public method.
13418 (scoped_restore_base::scoped_restore_base): New protected ctor.
13419 (scoped_restore_base::m_saved_var): New protected field.
13420 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
13421 scoped_restore_base base class instead of m_saved_var directly.
13422 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
13423 (scoped_restore_tmpl::scoped_restore_tmpl(const
13424 scoped_restore_tmpl<T>&)): Likewise.
13425 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
13426 method.
13427 (scoped_restore_tmpl::saved_var): New method.
13428 (scoped_restore_tmpl::m_saved_var): Delete.
13429 * inferior.h (inferior::detaching): Now a bool.
13430 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
13431 cleanup.
13432 * unittests/scoped_restore-selftests.c: New file.
13433
26fcd539
PA
134342017-04-19 Pedro Alves <palves@redhat.com>
13435
13436 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
13437 Re-sort in alphabetic order.
13438
fdd243b0
PA
134392017-04-18 Pedro Alves <palves@redhat.com>
13440
13441 * xml-support.c (obstack_xml_printf): Delete.
13442 * xml-support.h (obstack_xml_printf): Delete.
13443
4895cde2
PA
134442017-04-18 Pedro Alves <palves@redhat.com>
13445
13446 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
13447 vdebug, verror, body_text, start_element, end_element, name,
13448 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
13449 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
13450 is_xinclude>: Make private and add m_ prefix.
13451 (gdb_xml_parser::body_text): New method, based on ...
13452 (gdb_xml_body_text): ... this. Adjust.
13453 (gdb_xml_parser::vdebug): New method, based on ...
13454 (gdb_xml_debug): ... this. Adjust.
13455 (gdb_xml_parser::verror): New method, based on ...
13456 (gdb_xml_error): ... this. Adjust.
13457 (gdb_xml_parser::start_element): New method, based on ...
13458 (gdb_xml_start_element): ... this. Adjust.
13459 (gdb_xml_start_element_wrapper): Defer to
13460 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
13461 (gdb_xml_parser::end_element): New method, based on ...
13462 (gdb_xml_end_element_wrapper): ... this. Adjust.
13463 (gdb_xml_parser::~gdb_xml_parser): Adjust.
13464 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
13465 (gdb_xml_parser::use_dtd): New method, based on ...
13466 (gdb_xml_use_dtd): ... this. Adjust.
13467 (gdb_xml_parser::parse): New method, based on ...
13468 (gdb_xml_parse): ... this. Adjust.
13469 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
13470 (xinclude_start_include): Adjust to call the parser's name method.
13471 (xml_xinclude_default, xml_xinclude_start_doctype)
13472 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
13473 method.
13474 (xml_process_xincludes): Adjust to call parser methods.
13475 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
13476 declarations.
13477
bd8a901f
PA
134782017-04-18 Pedro Alves <palves@redhat.com>
13479
13480 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
13481 gdb::optional<std::string>.
13482 * xml-support.c: Include <string>.
13483 (scope_level::scope_level(scope_level &&))
13484 (scope_level::~scope_level): Delete.
13485 (scope_level::body): Now a std::string.
13486 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
13487 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
13488 parameter.
13489 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
13490 (xinclude_parsing_data::output): Now a std::string reference.
13491 (xinclude_start_include): Adjust.
13492 (xml_xinclude_default): Adjust.
13493 (xml_process_xincludes): Add 'output' parameter, and return bool.
13494 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
13495 and return bool.
13496 * xml-tdesc.c: Include <unordered_map> and <string>.
13497 (tdesc_xml_cache): Delete.
13498 (tdesc_xml_cache_s): Delete.
13499 (xml_cache): Now an std::unordered_map.
13500 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
13501 (target_fetch_description_xml): Change return type to
13502 gdb::optional<std::string>, and adjust.
13503 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
13504 (target_fetch_description_xml): Change return type to
13505 gdb::optional<std::string>.
13506
d35d1958
PA
135072017-04-18 Pedro Alves <palves@redhat.com>
13508
13509 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13510 unittests/optional-selftests.c.
13511 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
13512 * unittests/optional-selftests.c: New file.
13513 * unittests/optional/assignment/1.cc: New file.
13514 * unittests/optional/assignment/2.cc: New file.
13515 * unittests/optional/assignment/3.cc: New file.
13516 * unittests/optional/assignment/4.cc: New file.
13517 * unittests/optional/assignment/5.cc: New file.
13518 * unittests/optional/assignment/6.cc: New file.
13519 * unittests/optional/assignment/7.cc: New file.
13520 * unittests/optional/cons/copy.cc: New file.
13521 * unittests/optional/cons/default.cc: New file.
13522 * unittests/optional/cons/move.cc: New file.
13523 * unittests/optional/cons/value.cc: New file.
13524 * unittests/optional/in_place.cc: New file.
13525 * unittests/optional/observers/1.cc: New file.
13526 * unittests/optional/observers/2.cc: New file.
13527
22796e97
PA
135282017-04-18 Pedro Alves <palves@redhat.com>
13529
13530 * common/gdb_optional.h: Include common/traits.h.
13531 (in_place_t): New type.
13532 (in_place): New constexpr variable.
13533 (optional::optional): Remove member initialization of
13534 m_instantiated.
13535 (optional::optional(in_place_t...)): New constructor.
13536 (optional::~optional): Use reset.
13537 (optional::optional(const optional&)): New.
13538 (optional::optional(const optional&&)): New.
13539 (optional::optional(T &)): New.
13540 (optional::optional(T &&)): New.
13541 (operator::operator=(const optional &)): New.
13542 (operator::operator=(optional &&)): New.
13543 (operator::operator= (const T &))
13544 (operator::operator= (T &&))
13545 (operator::emplace (Args &&... args)): Return a T&. Use reset.
13546 (operator::reset): New.
13547 (operator::m_instantiated):: Add in-class initializer.
13548 * common/traits.h: Include <type_traits>.
13549 (struct And): New types.
13550
a7fc9b61
PA
135512017-04-18 Pedro Alves <palves@redhat.com>
13552
13553 * xml-support.c: Include <vector>.
13554 (scope_level::scope_level(const gdb_xml_element *))
13555 (scope_level::scope_level(scope_level&&)): New.
13556 (scope_level::~scope_level): New.
13557 (scope_level_s): Delete.
13558 (gdb_xml_parser::scopes): Now a std::vector.
13559 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
13560 Use std::vector.
13561 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
13562 scope cleanup code.
13563 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
13564 of the scopes member. Use std::vector::emplace_back.
13565
010151c9
PA
135662017-04-18 Pedro Alves <palves@redhat.com>
13567
13568 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
13569 a bool.
13570 (gdb_xml_end_element): Change type of first parameter.
13571 (gdb_xml_cleanup): Rename to ...
13572 (gdb_xml_parser::~gdb_xml_parser): ... this.
13573 (gdb_xml_create_parser_and_cleanup): Delete with ...
13574 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
13575 to this new ctor.
13576 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
13577 using gdb_xml_create_parser_and_cleanup.
13578 (xinclude_parsing_data): Add ctor/dtor.
13579 (xml_xinclude_cleanup): Delete.
13580 (xml_process_xincludes): Create a local xinclude_parsing_data
13581 instead of heap-allocating one. Create a local gdb_xml_parser
13582 instead of heap-allocating one with
13583 gdb_xml_create_parser_and_cleanup.
13584
d56060f0
JB
135852017-04-18 John Baldwin <jhb@FreeBSD.org>
13586
13587 PR threads/20743
13588 * fbsd-nat.c (resume_one_thread_cb): Remove.
13589 (resume_all_threads_cb): Remove.
13590 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
13591 iterate_over_threads.
13592
305d16a9
JB
135932017-04-17 Joel Brobecker <brobecker@adacore.com>
13594
13595 * NEWS: Create a new section for the next release branch.
13596 Rename the section of the current branch, now that it has
13597 been cut.
13598
8bb57231
JB
135992017-04-17 Joel Brobecker <brobecker@adacore.com>
13600
13601 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
13602 * version.in: Bump version to 8.0.50.DATE-git.
13603
096c92dd
SDJ
136042017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
13605
13606 PR gdb/21385
13607 * windows-nat.c (windows_create_inferior): Declare 'allargs'
13608 independently of the host, and fix build breakage on Cygwin.
13609
0550c955
PA
136102017-04-13 Pedro Alves <palves@redhat.com>
13611
13612 * inferior.c (free_inferior): Convert to ...
13613 (inferior::~inferior): ... this dtor.
13614 (inferior::inferior): New ctor, factored out from ...
13615 (add_inferior_silent): ... here. Allocate the inferior with a new
13616 expression.
13617 (delete_inferior): Call delete instead of free_inferior.
13618 * inferior.h (gdb_environ, continuation): Forward declare.
13619 (inferior): Now a class. Add in-class initialization to all
13620 members. Make boolean fields bool, except 'detaching'.
13621 (inferior::inferior): New explicit ctor.
13622 (inferior::~inferior): New.
13623
e3d60dfc
PA
136242017-04-13 Pedro Alves <palves@redhat.com>
13625
13626 * inferior.c (init_inferior_list): Delete.
13627 * inferior.h (init_inferior_list): Delete.
13628
5fd69d0a
PA
136292017-04-13 Pedro Alves <palves@redhat.com>
13630
13631 PR threads/13217
13632 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
13633 (top level): Call it twice, with different thread sets.
13634
c6609450
PA
136352017-04-13 Pedro Alves <palves@redhat.com>
13636
13637 * thread.c: Include <algorithm>.
13638 (thread_array_cleanup): Delete.
13639 (scoped_inc_dec_ref): New class.
13640 (live_threads_count): New function.
13641 (set_thread_refcount): Delete.
13642 (tp_array_compar_ascending): Now a bool.
13643 (tp_array_compar): Convert to a std::sort comparison function.
13644 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
13645 and live_threads_count.
13646
2a00d7ce
PA
136472017-04-13 Pedro Alves <palves@redhat.com>
13648
13649 * infrun.c (follow_fork_inferior): Also switch the current
13650 inferior.
13651
441d7c93
PA
136522017-04-13 Pedro Alves <palves@redhat.com>
13653
13654 * breakpoint.c (watch_command_1): Save watchpoint-frame info
13655 before calling create_internal_breakpoint.
13656
808480f6
PA
136572017-04-13 Pedro Alves <palves@redhat.com>
13658
13659 * fork-child.c (execv_argv): New class.
13660 (breakup_args): Refactored as ...
13661 (execv_argv::init_for_no_shell): .. this method of execv_argv.
13662 Copy arguments to storage and replace separators with NULL
13663 terminators in place.
13664 (escape_bang_in_quoted_argument): Adjust to return bool.
13665 (execv_argv::execv_argv): New ctor.
13666 (execv_argv::init_for_shell): New method, factored out from
13667 fork_inferior. Don't strdup strings into the vector.
13668 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
13669 Remove free_vector_argv call.
13670
ad3d022a
YQ
136712017-04-13 Yao Qi <yao.qi@linaro.org>
13672
13673 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
13674 tdep->rx_psw_type.
13675
e6ddc3bf
YQ
136762017-04-13 Yao Qi <yao.qi@linaro.org>
13677
13678 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
13679 * rx-tdep.c (rx_gdbarch_init): Likewise.
13680
bfb8cf90
PA
136812017-04-13 Pedro Alves <palves@redhat.com>
13682
13683 * breakpoint.h (struct breakpoint): Reindent.
13684
f5336ca5
PA
136852017-04-13 Pedro Alves <palves@redhat.com>
13686
13687 * breakpoint.c (bp_location): Rename to ...
13688 (bp_locations): ... this. All references updated.
13689 (bp_location_count): Rename to ...
13690 (bp_locations_count): ... this. All references updated.
13691 (bp_location_placed_address_before_address_max): Rename to ...
13692 (bp_locations_placed_address_before_address_max): ... this. All
13693 references updated.
13694 (bp_location_shadow_len_after_address_max): Rename to ...
13695 (bp_locations_shadow_len_after_address_max): ... this. All
13696 references updated.
13697 (bp_location_compare_addrs): Rename to ...
13698 (bp_locations_compare_addrs): ... this. All references updated.
13699 (bp_location_compare):Rename to ...
13700 (bp_locations_compare): ... this. All references updated.
13701 (bp_location_target_extensions_update): Rename to ...
13702 (bp_locations_target_extensions_update): ... this. All references
13703 updated.
13704
be628ab8
SDJ
137052017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13706
13707 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
13708 * common/common.m4: Check headers 'termios.h', 'termio.h' and
13709 'sgtty.h'.
13710 * common/gdb_termios.h: New file, with parts of "terminal.h".
13711 * inflow.c: Include "gdb_termios.h".
13712 * ser-unix.c: Include "gdb_termios.h".
13713 * terminal.h: Move terminal-related defines to
13714 "common/gdb_termios.h".
13715
8e9e35b1
TT
137162017-04-12 Tom Tromey <tom@tromey.com>
13717
13718 * probe.c (parse_probes): Update.
13719 * location.h (delete_event_location): Don't declare.
13720 (event_location_deleter::operator()): Update.
13721 * location.c (event_location_deleter::operator()): Rename from
13722 delete_event_location.
13723 * linespec.h (linespec_result) <location>: Change type to
13724 event_location_up.
13725 * linespec.c (canonicalize_linespec, event_location_to_sals)
13726 (decode_objc): Update.
13727 (linespec_result): Don't call delete_event_location.
13728 * breakpoint.c (create_breakpoints_sal)
13729 (bkpt_probe_create_sals_from_location)
13730 (strace_marker_create_sals_from_location): Update.
13731
16e802b9
TT
137322017-04-12 Tom Tromey <tom@tromey.com>
13733
13734 * linespec.h (struct linespec_result): Add constructor and
13735 destructor.
13736 (init_linespec_result, destroy_linespec_result)
13737 (make_cleanup_destroy_linespec_result): Don't declare.
13738 * linespec.c (init_linespec_result): Remove.
13739 (linespec_result::~linespec_result): Rename from
13740 destroy_linespec_result. Update.
13741 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
13742 Remove.
13743 * breakpoint.c (create_breakpoint, break_range_command)
13744 (decode_location_default): Update.
13745 * ax-gdb.c (agent_command_1): Update.
13746
d28cd78a
TT
137472017-04-12 Tom Tromey <tom@tromey.com>
13748
13749 * remote.c (remote_download_tracepoint): Update.
13750 * python/py-breakpoint.c (bppy_get_location): Update.
13751 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
13752 (gdbscm_breakpoint_location): Update.
13753 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
13754 * breakpoint.h (struct breakpoint) <location, location_range_end>:
13755 Change type to event_location_up.
13756 * breakpoint.c (create_overlay_event_breakpoint)
13757 (create_longjmp_master_breakpoint)
13758 (create_std_terminate_master_breakpoint)
13759 (create_exception_master_breakpoint)
13760 (breakpoint_event_location_empty_p, print_breakpoint_location)
13761 (print_one_breakpoint_location, create_thread_event_breakpoint)
13762 (init_breakpoint_sal, create_breakpoint)
13763 (print_recreate_ranged_breakpoint, break_range_command)
13764 (init_ada_exception_breakpoint, say_where): Update.
13765 (base_breakpoint_dtor): Don't call delete_event_location.
13766 (bkpt_print_recreate, tracepoint_print_recreate)
13767 (dprintf_print_recreate, update_static_tracepoint)
13768 (breakpoint_re_set_default): Update.
13769
711799d5
TT
137702017-04-12 Tom Tromey <tom@tromey.com>
13771
13772 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
13773 type of "to_do". Update.
13774 (compute_stack_depth): Use std::vector.
13775
52d214d3
TT
137762017-04-12 Tom Tromey <tom@tromey.com>
13777
13778 * printcmd.c (find_instruction_backward): Use std::vector.
13779
4c404b8b
TT
137802017-04-12 Tom Tromey <tom@tromey.com>
13781
13782 * symfile.c (objfilep): Remove typedef.
13783 (reread_symbols): Use a std::vector.
13784
156d9eab
TT
137852017-04-12 Tom Tromey <tom@tromey.com>
13786
13787 * mi/mi-main.c (exec_direction_forward): Remove.
13788 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
13789 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
13790 scoped_restore.
13791 * guile/guile.c (guile_repl_command, guile_command)
13792 (gdbscm_execute_gdb_command): Use scoped_restore.
13793 * go-exp.y (go_parse): Use scoped_restore.
13794 * d-exp.y (d_parse): Use scoped_restore.
13795 * cli/cli-decode.c (cmd_func): Use scoped_restore.
13796 * c-exp.y (c_parse): Use scoped_restore.
13797
4d89769a
TT
137982017-04-12 Tom Tromey <tom@tromey.com>
13799
13800 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
13801 (mi_parse): Update return type.
13802 (mi_parse_free): Remove.
13803 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
13804 (mi_parse::~mi_parse): Rename from mi_parse_free.
13805 (mi_parse_cleanup): Remove.
13806 (mi_parse): Return a unique_ptr. Use new.
13807 * mi/mi-main.c (mi_execute_command): Update.
13808
4b217cc7
TT
138092017-04-12 Tom Tromey <tom@tromey.com>
13810
13811 * location.c (explicit_location_lex_one): Return a
13812 unique_xmalloc_ptr.
13813 (string_to_explicit_location): Update. Remove cleanups.
13814
59d3651b
TT
138152017-04-12 Tom Tromey <tom@tromey.com>
13816
13817 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
13818 (compare_value_and_voffset): Change type. Update.
13819 (compute_vtable_size): Change type of "offset_vec".
13820 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
13821 (gnuv3_get_typeid): Remove extraneous declaration.
13822
b24b0d6c
TT
138232017-04-12 Tom Tromey <tom@tromey.com>
13824
13825 * charset.h (wchar_iterator): Fix comment.
13826
80a3b8c5
TT
138272017-04-12 Tom Tromey <tom@tromey.com>
13828
13829 * charset.c (iconv_wrapper): New class.
13830 (cleanup_iconv): Remove.
13831 (convert_between_encodings): Use it.
13832
c83dd867
TT
138332017-04-12 Tom Tromey <tom@tromey.com>
13834
13835 * symfile.h (increment_reading_symtab): Update type.
13836 * symfile.c (decrement_reading_symtab): Remove.
13837 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
13838 * psymtab.c (psymtab_to_symtab): Update.
13839 * dwarf2read.c (dw2_instantiate_symtab): Update.
13840
0e8621a0
TT
138412017-04-12 Tom Tromey <tom@tromey.com>
13842
13843 * jit.c (struct jit_reader): Declare separately. Add constructor
13844 and destructor. Change type of "handle".
13845 (loaded_jit_reader): Define separately.
13846 (jit_reader_load): Update. New "new".
13847 (jit_reader_unload_command): Use "delete".
13848 * gdb-dlfcn.h (struct dlclose_deleter): New.
13849 (gdb_dlhandle_up): New typedef.
13850 (gdb_dlopen, gdb_dlsym): Update types.
13851 (gdb_dlclose): Remove.
13852 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
13853 (gdb_dlsym): Change type of "handle".
13854 (make_cleanup_dlclose): Remove.
13855 (dlclose_deleter::operator()): Rename from gdb_dlclose.
13856 * compile/compile-c-support.c (load_libcc): Update.
13857
67d89901
TT
138582017-04-12 Tom Tromey <tom@tromey.com>
13859
13860 * symtab.h (find_pcs_for_symtab_line): Change return type.
13861 * symtab.c (find_pcs_for_symtab_line): Change return type.
13862 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
13863 type of "vec". Update.
13864 (ltpy_get_pcs_for_line): Update.
13865 * linespec.c (decode_digits_ordinary): Update.
13866
93921405
TT
138672017-04-12 Tom Tromey <tom@tromey.com>
13868
13869 * tracepoint.c (actions_command): Update.
13870 * python/python.c (python_command, python_interactive_command):
13871 Update.
13872 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
13873 * guile/guile.c (guile_command): Update.
13874 * defs.h (read_command_lines, read_command_lines_1): Return
13875 command_line_up.
13876 (command_lines_deleter): New struct.
13877 (command_line_up): New typedef.
13878 * compile/compile.c (compile_code_command)
13879 (compile_print_command): Update.
13880 * cli/cli-script.h (get_command_line, copy_command_lines): Return
13881 command_line_up.
13882 (make_cleanup_free_command_lines): Remove.
13883 * cli/cli-script.c (get_command_line, read_command_lines_1)
13884 (copy_command_lines): Return command_line_up.
13885 (while_command, if_command, read_command_lines, define_command)
13886 (document_command): Update.
13887 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
13888 Remove.
13889 * breakpoint.h (breakpoint_set_commands): Change type of
13890 "commands".
13891 * breakpoint.c (breakpoint_set_commands): Change type of
13892 "commands". Update.
13893 (do_map_commands_command, update_dprintf_command_list)
13894 (create_tracepoint_from_upload): Update.
13895
ffc2605c
TT
138962017-04-12 Tom Tromey <tom@tromey.com>
13897
13898 * tracepoint.c (scope_info): Update.
13899 * spu-tdep.c (spu_catch_start): Update.
13900 * python/python.c (gdbpy_decode_line): Update.
13901 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
13902 * python/py-breakpoint.c (bppy_init): Update.
13903 * probe.c (parse_probes): Update.
13904 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
13905 * location.h (event_location_deleter): New struct.
13906 (event_location_up): New typedef.
13907 (new_linespec_location, new_address_location, new_probe_location)
13908 (new_explicit_location, copy_event_location)
13909 (string_to_event_location, string_to_event_location_basic)
13910 (string_to_explicit_location): Update return type.
13911 (make_cleanup_delete_event_location): Remove.
13912 * location.c (new_linespec_location, new_address_location)
13913 (new_probe_location, new_explicit_location, copy_event_location):
13914 Return event_location_up.
13915 (delete_event_location_cleanup)
13916 (make_cleanup_delete_event_location): Remove.
13917 (string_to_explicit_location, string_to_event_location_basic)
13918 (string_to_event_location): Return event_location_up.
13919 * linespec.c (canonicalize_linespec, event_location_to_sals)
13920 (decode_line_with_current_source)
13921 (decode_line_with_last_displayed, decode_objc): Update.
13922 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
13923 * completer.c (location_completer): Update.
13924 * cli/cli-cmds.c (edit_command, list_command): Update.
13925 * breakpoint.c (create_overlay_event_breakpoint)
13926 (create_longjmp_master_breakpoint)
13927 (create_std_terminate_master_breakpoint)
13928 (create_exception_master_breakpoint)
13929 (create_thread_event_breakpoint): Update.
13930 (init_breakpoint_sal): Update. Remove some dead code.
13931 (create_breakpoint_sal): Change type of "location". Update.
13932 (create_breakpoints_sal, create_breakpoint, break_command_1)
13933 (dprintf_command, break_range_command, until_break_command)
13934 (init_ada_exception_breakpoint)
13935 (strace_marker_create_sals_from_location)
13936 (update_static_tracepoint, trace_command, ftrace_command)
13937 (strace_command, create_tracepoint_from_upload): Update.
13938 * break-catch-throw.c (re_set_exception_catchpoint): Update.
13939 * ax-gdb.c (agent_command_1): Update.
13940
8f10c932
PA
139412017-04-12 Pedro Alves <palves@redhat.com>
13942
13943 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
13944 * configure.tgt: Handle i[34567]86-*-go32* and
13945 i[34567]86-*-msdosdjgpp*.
13946 * i386-tdep.c (i386_svr4_reg_to_regnum):
13947 Make extern.
13948 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
13949 i386-go32-tdep.c.
13950 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
13951 * i386-go32-tdep.c: New file.
13952 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
13953 declarations.
13954
0a31ccfb
SM
139552017-04-12 Simon Marchi <simon.marchi@ericsson.com>
13956
13957 * aix-thread.c (pd_status2str): Change return type to const char *.
13958
e9bb3fbb
PA
139592017-04-12 Pedro Alves <palves@redhat.com>
13960
13961 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
13962 calls to set_gdbarch_gnu_triplet_regexp.
13963
53375380
PA
139642017-04-12 Pedro Alves <palves@redhat.com>
13965
13966 PR gdb/21323
13967 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
13968 New enum value.
13969 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
13970 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
13971 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
13972 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
13973 * gdbarch.h, gdbarch.c: Regenerate.
13974 * aarch64-tdep.c (aarch64_gdbarch_init): Override
13975 gdbarch_wchar_bit and gdbarch_wchar_signed.
13976 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
13977 * arm-tdep.c (arm_gdbarch_init): Likewise.
13978 * avr-tdep.c (avr_gdbarch_init): Likewise.
13979 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
13980 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
13981 * i386-tdep.c (i386_go32_init_abi): Likewise.
13982 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
13983 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
13984 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
13985 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
13986 * sh-tdep.c (sh_gdbarch_init): Likewise.
13987 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
13988 * sparc64-tdep.c (sparc64_init_abi): Likewise.
13989 * windows-tdep.c (windows_init_abi): Likewise.
13990 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
13991
53e710ac
PA
139922017-04-12 Pedro Alves <palves@redhat.com>
13993
13994 PR c++/21323
13995 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
13996 cplus_primitive_type_char32_t>: New enum values.
13997 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
13998 and cplus_primitive_type_char32_t.
13999 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
14000 32, use the archtecture's built-in type for char16_t and char32_t,
14001 respectively. Otherwise, fallback to init_integer_type as before,
14002 but make the type unsigned, and issue a complaint.
14003 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
14004
ab0538b8
AH
140052017-04-12 Alan Hayward <alan.hayward@arm.com>
14006
5e0e0422 14007 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
14008 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
14009
5430098f
SDJ
140102017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
14011
14012 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
14013 'const char *'.
14014
7c5ded6a
SDJ
140152017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
14016
14017 * common/common-utils.c (free_vector_argv): New function.
14018 * common/common-utils.h: Include <vector>.
14019 (free_vector_argv): New prototype.
14020 * darwin-nat.c (darwin_create_inferior): Rewrite function
14021 prototype in order to constify "exec_file" and accept a
14022 "std::string" for "allargs".
14023 * fork-child.c: Include <vector>.
14024 (breakup_args): Rewrite function, using C++.
14025 (fork_inferior): Rewrite function header, constify "exec_file_arg"
14026 and accept "std::string" for "allargs". Update the code to
14027 calculate "argv" based on "allargs". Update calls to "exec_fun"
14028 and "execvp".
14029 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
14030 order to constify "exec_file" and accept a "std::string" for
14031 "allargs".
14032 * go32-nat.c (go32_create_inferior): Likewise.
14033 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
14034 * infcmd.c (run_command_1): Constify "exec_file". Use
14035 "std::string" for inferior arguments.
14036 * inferior.h (fork_inferior): Update prototype.
14037 * linux-nat.c (linux_nat_create_inferior): Rewrite function
14038 prototype in order to constify "exec_file" and accept a
14039 "std::string" for "allargs".
14040 * nto-procfs.c (procfs_create_inferior): Likewise.
14041 * procfs.c (procfs_create_inferior): Likewise.
14042 * remote-sim.c (gdbsim_create_inferior): Likewise.
14043 * remote.c (extended_remote_run): Update code to accept
14044 "std::string" as argument.
14045 (extended_remote_create_inferior): Rewrite function prototype in
14046 order to constify "exec_file" and accept a "std::string" for
14047 "allargs".
14048 * rs6000-nat.c (super_create_inferior): Likewise.
14049 (rs6000_create_inferior): Likewise.
14050 * target.h (struct target_ops) <to_create_inferior>: Likewise.
14051 * windows-nat.c (windows_create_inferior): Likewise.
14052
ae0eee42
PA
140532017-04-11 Pedro Alves <palves@redhat.com>
14054
14055 * thread.c: Fix whitespace throughout.
14056
a6acac06
PR
140572017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
14058
14059 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
14060
64403bd1
AH
140612017-04-11 Alan Hayward <alan.hayward@arm.com>
14062
14063 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
14064
a5bef50f
SDJ
140652017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
14066
14067 PR gdb/21364
14068 * osdata.c (info_osdata): Check if 'type' is an empty string
14069 instead of NULL.
14070
9295a5a9
PA
140712017-04-10 Pedro Alves <palves@redhat.com>
14072
14073 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
14074 (ptid_to_global_thread_id, in_thread_list)
14075 (do_captured_list_thread_ids, set_resumed, set_running)
14076 (set_executing, set_stop_requested, finish_thread_state)
14077 (validate_registers_access, can_access_registers_ptid)
14078 (print_thread_info_1, switch_to_thread)
14079 (do_restore_current_thread_cleanup)
14080 (make_cleanup_restore_current_thread, thread_command)
14081 (thread_name_command): Use operator== instead of ptid_equal.
14082
996812e3
PA
140832017-04-10 Pedro Alves <palves@redhat.com>
14084
14085 * thread.c (struct current_thread_cleanup) <next>: Delete field.
14086 (current_thread_cleanup_chain): Delete.
14087 (restore_current_thread_cleanup_dtor)
14088 (make_cleanup_restore_current_thread): Remove references to
14089 current_thread_cleanup_chain.
14090
845b344f
AH
140912017-04-10 Alan Hayward <alan.hayward@arm.com>
14092
14093 * msp430-tdep.c (msp430_pseudo_register_read): Never return
14094 REG_UNKNOWN.
14095
803bdfe4
YQ
140962017-04-10 Yao Qi <yao.qi@linaro.org>
14097
14098 PR gdb/19942
14099 * gdbthread.h (thread_info::deletable): New method.
14100 (thread_info::incref): New method.
14101 (thread_info::decref): New method.
14102 (thread_info::refcount): Move it to private.
14103 * infrun.c (save_stop_context): Call inc_refcount.
14104 (release_stop_context_cleanup): Likewise.
14105 * thread.c (set_thread_exited): New function.
14106 (init_thread_list): Delete "tp" only it is deletable, otherwise
14107 call set_thread_exited.
14108 (delete_thread_1): Call set_thread_exited.
14109 (current_thread_cleanup) <inferior_pid>: Remove.
14110 <thread>: New field.
14111 (restore_current_thread_ptid_changed): Removed.
14112 (do_restore_current_thread_cleanup): Adjust.
14113 (restore_current_thread_cleanup_dtor): Don't call
14114 find_thread_ptid.
14115 (set_thread_refcount): Use dec_refcount.
14116 (make_cleanup_restore_current_thread): Adjust.
14117 (thread_apply_all_command): Call inc_refcount.
14118 (_initialize_thread): Don't call
14119 observer_attach_thread_ptid_changed.
14120
8c25b497
YQ
141212017-04-10 Yao Qi <yao.qi@linaro.org>
14122
14123 * thread.c (delete_thread_1): Hoist code on marking thread as
14124 exited.
14125
8473b447
SM
141262017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
14127
14128 * windows-nat.c (windows_detach): Initialize ptid with
14129 minus_one_ptid.
14130
6670ec13
SM
141312017-04-07 Simon Marchi <simon.marchi@ericsson.com>
14132
14133 * unittests/ptid-selftests.c: Fix erroneous assert messages.
14134
ba2f91bb
AH
141352017-04-07 Alan Hayward <alan.hayward@arm.com>
14136
14137 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
14138 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
14139 (bfin_pseudo_register_write): Likewise
14140
436252de
SM
141412017-04-06 Simon Marchi <simon.marchi@ericsson.com>
14142
14143 * common/ptid.h (struct ptid): Change to...
14144 (class ptid_t): ... this.
14145 <ptid_t>: New constructors.
14146 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
14147 matches>: New methods.
14148 <make_null, make_minus_one>: New static methods.
14149 <pid>: Rename to...
14150 <m_pid>: ...this.
14151 <lwp>: Rename to...
14152 <m_lwp>: ...this.
14153 <tid>: Rename to...
14154 <m_tid>: ...this.
14155 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
14156 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
14157 as references, move comment to class ptid_t.
14158 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
14159 ptid_t static methods.
14160 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
14161 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
14162 Take ptid arguments as references, implement using ptid_t methods.
14163 * unittests/ptid-selftests.c: New file.
14164 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14165 unittests/ptid-selftests.c.
14166 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
14167
0dedf377
TP
141682017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
14169
14170 * python/python.c (python_run_simple_file): Cast mode literal to
14171 non-const char pointer as expected by PyFile_FromString.
14172
4e9868d4
SM
141732017-04-05 Simon Marchi <simon.marchi@ericsson.com>
14174
14175 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
14176 minus_one_ptid and null_ptid.
14177
9bf2a700
PA
141782017-04-05 Pedro Alves <palves@redhat.com>
14179
14180 * warning.m4 (build_warnings): Remove -Wno-write-strings.
14181 * configure: Regenerate.
14182
a121b7c1
PA
141832017-04-05 Pedro Alves <palves@redhat.com>
14184
14185 * ada-exp.y (yyerror): Constify.
14186 * ada-lang.c (bound_name, get_selections)
14187 (ada_variant_discrim_type)
14188 (ada_variant_discrim_name, ada_value_struct_elt)
14189 (ada_lookup_struct_elt_type, is_unchecked_variant)
14190 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
14191 (catch_ada_exception_command_split)
14192 (catch_ada_assert_command_split, catch_assert_command)
14193 (ada_op_name): Constify.
14194 * ada-lang.h (ada_yyerror, get_selections)
14195 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
14196 * arc-tdep.c (arc_print_frame_cache): Constify.
14197 * arm-tdep.c (arm_skip_stub): Constify.
14198 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
14199 (gen_aggregate_elt_ref): Constify.
14200 * bcache.c (print_bcache_statistics): Constify.
14201 * bcache.h (print_bcache_statistics): Constify.
14202 * break-catch-throw.c (catch_exception_command_1):
14203 * breakpoint.c (struct ep_type_description::description):
14204 Constify.
14205 (add_solib_catchpoint): Constify.
14206 (catch_fork_command_1): Add cast.
14207 (add_catch_command): Constify.
14208 * breakpoint.h (add_catch_command, add_solib_catchpoint):
14209 Constify.
14210 * bsd-uthread.c (bsd_uthread_state): Constify.
14211 * buildsym.c (patch_subfile_names): Constify.
14212 * buildsym.h (next_symbol_text_func, patch_subfile_names):
14213 Constify.
14214 * c-exp.y (yyerror): Constify.
14215 (token::oper): Constify.
14216 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
14217 * c-varobj.c (cplus_describe_child): Constify.
14218 * charset.c (find_charset_names): Add cast.
14219 (find_charset_names): Constify array and add const_cast.
14220 * cli/cli-cmds.c (complete_command, cd_command): Constify.
14221 (edit_command): Constify.
14222 * cli/cli-decode.c (lookup_cmd): Constify.
14223 * cli/cli-dump.c (dump_memory_command, dump_value_command):
14224 Constify.
14225 (struct dump_context): Constify.
14226 (add_dump_command, restore_command): Constify.
14227 * cli/cli-script.c (get_command_line): Constify.
14228 * cli/cli-script.h (get_command_line): Constify.
14229 * cli/cli-utils.c (check_for_argument): Constify.
14230 * cli/cli-utils.h (check_for_argument): Constify.
14231 * coff-pe-read.c (struct read_pe_section_data): Constify.
14232 * command.h (lookup_cmd): Constify.
14233 * common/print-utils.c (decimal2str): Constify.
14234 * completer.c (gdb_print_filename): Constify.
14235 * corefile.c (set_gnutarget): Constify.
14236 * cp-name-parser.y (yyerror): Constify.
14237 * cp-valprint.c (cp_print_class_member): Constify.
14238 * cris-tdep.c (cris_register_name, crisv32_register_name):
14239 Constify.
14240 * d-exp.y (yyerror): Constify.
14241 (struct token::oper): Constify.
14242 * d-lang.h (d_yyerror): Constify.
14243 * dbxread.c (struct header_file_location::name): Constify.
14244 (add_old_header_file, add_new_header_file, last_function_name)
14245 (dbx_next_symbol_text, add_bincl_to_list)
14246 (find_corresponding_bincl_psymtab, set_namestring)
14247 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
14248 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
14249 * defs.h (command_line_input, print_address_symbolic)
14250 (deprecated_readline_begin_hook): Constify.
14251 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
14252 Constify.
14253 * event-top.c (handle_line_of_input): Constify and add cast.
14254 * exceptions.c (catch_errors): Constify.
14255 * exceptions.h (catch_errors): Constify.
14256 * expprint.c (print_subexp_standard, op_string, op_name)
14257 (op_name_standard, dump_raw_expression, dump_raw_expression):
14258 * expression.h (op_name, op_string, dump_raw_expression):
14259 Constify.
14260 * f-exp.y (yyerror): Constify.
14261 (struct token::oper): Constify.
14262 (struct f77_boolean_val::name): Constify.
14263 * f-lang.c (f_word_break_characters): Constify.
14264 * f-lang.h (f_yyerror): Constify.
14265 * fork-child.c (fork_inferior): Add cast.
14266 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
14267 (new_variant): Constify.
14268 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
14269 * gdbarch.c: Regenerate.
14270 * gdbcore.h (set_gnutarget): Constify.
14271 * go-exp.y (yyerror): Constify.
14272 (token::oper): Constify.
14273 * go-lang.h (go_yyerror): Constify.
14274 * go32-nat.c (go32_sysinfo): Constify.
14275 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
14276 * guile/scm-cmd.c (cmdscm_function): Constify.
14277 * guile/scm-param.c (pascm_param_value): Constify.
14278 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
14279 (h8300sx_register_name): Constify.
14280 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
14281 Constify.
14282 * ia64-tdep.c (ia64_register_names): Constify.
14283 * infcmd.c (construct_inferior_arguments): Constify.
14284 (path_command, attach_post_wait): Constify.
14285 * language.c (show_range_command, show_case_command)
14286 (unk_lang_error): Constify.
14287 * language.h (language_defn::la_error)
14288 (language_defn::la_name_of_this): Constify.
14289 * linespec.c (decode_line_2): Constify.
14290 * linux-thread-db.c (thread_db_err_str): Constify.
14291 * lm32-tdep.c (lm32_register_name): Constify.
14292 * m2-exp.y (yyerror): Constify.
14293 * m2-lang.h (m2_yyerror): Constify.
14294 * m32r-tdep.c (m32r_register_names): Constify and make static.
14295 * m68hc11-tdep.c (m68hc11_register_names): Constify.
14296 * m88k-tdep.c (m88k_register_name): Constify.
14297 * macroexp.c (appendmem): Constify.
14298 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
14299 (upgrade_type, parse_external, parse_partial_symbols)
14300 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
14301 (new_symbol): Constify.
14302 * memattr.c (mem_info_command): Constify.
14303 * mep-tdep.c (register_name_from_keyword): Constify.
14304 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
14305 Constify.
14306 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
14307 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
14308 * mi/mi-main.c (captured_mi_execute_command): Constify and add
14309 cast.
14310 (mi_execute_async_cli_command): Constify.
14311 * mips-tdep.c (mips_register_name): Constify.
14312 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
14313 (am33_register_name, am33_2_register_name)
14314 * moxie-tdep.c (moxie_register_names): Constify.
14315 * nat/linux-osdata.c (osdata_type): Constify fields.
14316 * nto-tdep.c (nto_parse_redirection): Constify.
14317 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
14318 (lookup_child_selector): Constify.
14319 (objc_methcall::name): Constify.
14320 * objc-lang.h (lookup_objc_class, lookup_child_selector)
14321 (lookup_struct_typedef): Constify.
14322 * objfiles.c (pc_in_section): Constify.
14323 * objfiles.h (pc_in_section): Constify.
14324 * p-exp.y (struct token::oper): Constify.
14325 (yyerror): Constify.
14326 * p-lang.h (pascal_yyerror): Constify.
14327 * parser-defs.h (op_name_standard): Constify.
14328 (op_print::string): Constify.
14329 (exp_descriptor::op_name): Constify.
14330 * printcmd.c (print_address_symbolic): Constify.
14331 * psymtab.c (print_partial_symbols): Constify.
14332 * python/py-breakpoint.c (stop_func): Constify.
14333 (bppy_get_expression): Constify.
14334 * python/py-cmd.c (cmdpy_completer::name): Constify.
14335 (cmdpy_function): Constify.
14336 * python/py-event.c (evpy_add_attribute)
14337 (gdbpy_initialize_event_generic): Constify.
14338 * python/py-event.h (evpy_add_attribute)
14339 (gdbpy_initialize_event_generic): Constify.
14340 * python/py-evts.c (add_new_registry): Constify.
14341 * python/py-finishbreakpoint.c (outofscope_func): Constify.
14342 * python/py-framefilter.c (get_py_iter_from_func): Constify.
14343 * python/py-inferior.c (get_buffer): Add cast.
14344 * python/py-param.c (parm_constant::name): Constify.
14345 * python/py-unwind.c (fprint_frame_id): Constify.
14346 * python/python.c (gdbpy_parameter_value): Constify.
14347 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
14348 * remote.c (memory_packet_config::name): Constify.
14349 (show_packet_config_cmd, remote_write_bytes)
14350 (remote_buffer_add_string):
14351 * reverse.c (exec_reverse_once): Constify.
14352 * rs6000-tdep.c (variant::name, variant::description): Constify.
14353 * rust-exp.y (rustyyerror): Constify.
14354 * rust-lang.c (rust_op_name): Constify.
14355 * rust-lang.h (rustyyerror): Constify.
14356 * serial.h (serial_ops::name): Constify.
14357 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
14358 (sh_sh3e_register_name, sh_sh2e_register_name)
14359 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
14360 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
14361 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
14362 (sh_sh4al_dsp_register_name): Constify.
14363 * sh64-tdep.c (sh64_register_name): Constify.
14364 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
14365 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
14366 * stabsread.c (patch_block_stabs, read_type_number)
14367 (ref_map::stabs, ref_add, process_reference)
14368 (symbol_reference_defined, define_symbol, define_symbol)
14369 (error_type, read_type, read_member_functions, read_cpp_abbrev)
14370 (read_one_struct_field, read_struct_fields, read_baseclasses)
14371 (read_tilde_fields, read_struct_type, read_array_type)
14372 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
14373 (read_huge_number, read_range_type, read_args, common_block_start)
14374 (find_name_end): Constify.
14375 * stabsread.h (common_block_start, define_symbol)
14376 (process_one_symbol, symbol_reference_defined, ref_add):
14377 * symfile.c (get_section_index, add_symbol_file_command):
14378 * symfile.h (get_section_index): Constify.
14379 * target-descriptions.c (tdesc_type::name): Constify.
14380 (tdesc_free_type): Add cast.
14381 * target.c (find_default_run_target):
14382 (add_deprecated_target_alias, find_default_run_target)
14383 (target_announce_detach): Constify.
14384 (do_option): Constify.
14385 * target.h (add_deprecated_target_alias): Constify.
14386 * thread.c (print_thread_info_1): Constify.
14387 * top.c (deprecated_readline_begin_hook, command_line_input):
14388 Constify.
14389 (init_main): Add casts.
14390 * top.h (handle_line_of_input): Constify.
14391 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
14392 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
14393 (tfind_command): Rename to ...
14394 (tfind_command_1): ... this and constify.
14395 (tfind_command): New function.
14396 (tfind_end_command, tfind_start_command): Adjust.
14397 (encode_source_string): Constify.
14398 * tracepoint.h (encode_source_string): Constify.
14399 * tui/tui-data.c (tui_partial_win_by_name): Constify.
14400 * tui/tui-data.h (tui_partial_win_by_name): Constify.
14401 * tui/tui-source.c (tui_set_source_content_nil): Constify.
14402 * tui/tui-source.h (tui_set_source_content_nil): Constify.
14403 * tui/tui-win.c (parse_scrolling_args): Constify.
14404 * tui/tui-windata.c (tui_erase_data_content): Constify.
14405 * tui/tui-windata.h (tui_erase_data_content): Constify.
14406 * tui/tui-winsource.c (tui_erase_source_content): Constify.
14407 * tui/tui.c (tui_enable): Add cast.
14408 * utils.c (defaulted_query): Constify.
14409 (init_page_info): Add cast.
14410 (puts_debug, subset_compare): Constify.
14411 * utils.h (subset_compare): Constify.
14412 * varobj.c (varobj_format_string): Constify.
14413 * varobj.h (varobj_format_string): Constify.
14414 * vax-tdep.c (vax_register_name): Constify.
14415 * windows-nat.c (windows_detach): Constify.
14416 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
14417 * xml-support.c (gdb_xml_end_element): Constify.
14418 * xml-tdesc.c (tdesc_start_reg): Constify.
14419 * xstormy16-tdep.c (xstormy16_register_name): Constify.
14420 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
14421 * xtensa-tdep.h (xtensa_register_t::name): Constify.
14422
995816ba
PA
144232017-04-05 Pedro Alves <palves@redhat.com>
14424
14425 * proc-api.c (struct trans): Constify.
14426 (procfs_note): Constify.
14427 * proc-events.c (struct trans, syscall_table):
14428 * proc-flags.c (struct trans): Constify.
14429 * proc-utils.h (procfs_note): Constify.
14430 * proc-why.c (struct trans): Constify.
14431 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
14432 (procfs_detach): Constify.
14433 * sol-thread.c (struct string_map): Constify.
14434 (td_err_string, td_state_string): Constify.
14435
3e83a920
PA
144362017-04-05 Pedro Alves <palves@redhat.com>
14437
14438 * proc-api.c (procfs_filename): Don't initialize
14439 procfs_filename.
14440 (prepare_to_trace): Assume procfs_filename is non-NULL.
14441 (_initialize_proc_api): Give procfs_filename a default value here.
14442
63160a43
PA
144432017-04-05 Pedro Alves <palves@redhat.com>
14444
14445 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
14446 'cond_string' parameter.
14447 (extract_exception_regexp): Constify 'string' parameter.
14448 (catch_exception_command_1): Constify.
14449 * breakpoint.c (init_catchpoint)
14450 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
14451 parameter.
14452 (ep_parse_optional_if_clause, catch_fork_command_1)
14453 (catch_exec_command_1): Constify.
14454 * breakpoint.h (init_catchpoint): Constify 'cond_string'
14455 parameter.
14456 (ep_parse_optional_if_clause): Constify.
14457 * cli/cli-utils.c (remove_trailing_whitespace)
14458 (check_for_argument): Constify.
14459 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
14460 non-const overload.
14461 (check_for_argument): Likewise.
14462
9b2eba3d
PA
144632017-04-05 Pedro Alves <palves@redhat.com>
14464
14465 * event-top.c (command_line_handler): Add cast to execute_command
14466 call.
14467 * record-btrace.c (cmd_record_btrace_bts_start)
14468 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
14469 (cmd_record_btrace_start): Add cast to execute_command call.
14470 * record-full.c (record_full_goto_insn):
14471 * record.c (record_start, record_stop): Add cast to
14472 execute_command_to_string calls.
14473 (cmd_record_start): Add cast to execute_command calls.
14474
2adadf51
PA
144752017-04-05 Pedro Alves <palves@redhat.com>
14476
14477 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
14478 static inline function.
14479 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
14480 array and use gdb_PyArg_ParseTupleAndKeywords.
14481 * python/py-cmd.c (cmdpy_init): Likewise.
14482 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
14483 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
14484 (infpy_search_memory): Likewise.
14485 * python/py-objfile.c (objfpy_add_separate_debug_file)
14486 (gdbpy_lookup_objfile): Likewise.
14487 * python/py-symbol.c (gdbpy_lookup_symbol)
14488 (gdbpy_lookup_global_symbol): Likewise.
14489 * python/py-type.c (gdbpy_lookup_type): Likewise.
14490 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
14491 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
14492 Likewise.
14493
0d1f4ceb
PA
144942017-04-05 Pedro Alves <palves@redhat.com>
14495
14496 * python/python-internal.h (gdb_PyGetSetDef): New type.
14497 * python/py-block.c (block_object_getset)
14498 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
14499 * python/py-event.c (event_object_getset)
14500 (finish_breakpoint_object_getset): Likewise.
14501 * python/py-inferior.c (inferior_object_getset): Likewise.
14502 * python/py-infthread.c (thread_object_getset): Likewise.
14503 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
14504 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
14505 * python/py-objfile.c (objfile_getset): Likewise.
14506 * python/py-progspace.c (pspace_getset): Likewise.
14507 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
14508 Likewise.
14509 * python/py-record.c (recpy_record_getset): Likewise.
14510 * python/py-symbol.c (symbol_object_getset): Likewise.
14511 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
14512 Likewise.
14513 * python/py-type.c (type_object_getset, field_object_getset):
14514 Likewise.
14515 * python/py-value.c (value_object_getset): Likewise.
14516
4d759979
PA
145172017-04-05 Pedro Alves <palves@redhat.com>
14518
14519 * python/python-internal.h (gdb_PyObject_CallMethod)
14520 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
14521 New functions.
14522 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
14523 (PySys_GetObject, PySys_SetPath): New macros.
14524
fdf9e36f
PA
145252017-04-05 Pedro Alves <palves@redhat.com>
14526
14527 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
14528 info_osdata_command.
14529 * osdata.c (info_osdata_command): Rename to ...
14530 (info_osdata): ... this. Constify 'type' parameter, and remove
14531 the 'from_tty' parameter. Accept NULL TYPE.
14532 (info_osdata_command): New function.
14533 * osdata.h (info_osdata_command): Remove declaration.
14534 (info_osdata): New declaration.
14535
9f33b8b7
PA
145362017-04-05 Pedro Alves <palves@redhat.com>
14537
14538 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
14539 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
14540 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
14541 parameter.
14542 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
14543 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
14544 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
14545 parameter.
14546 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
14547 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
14548 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
14549 (mi_cmd_file_list_exec_source_files)
14550 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
14551 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
14552 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
14553 parameter.
14554 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
14555 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
14556 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
14557 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
14558 (mi_cmd_stack_info_frame): Constify 'command' parameter.
14559 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
14560 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
14561 'command' parameter.
14562 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
14563 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
14564 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
14565 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
14566 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
14567 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
14568 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
14569 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
14570 (mi_cmd_var_set_update_range): Constify 'command' parameter.
14571 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
14572 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
14573 parameter.
14574 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
14575 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
14576 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
14577 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
14578 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
14579 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
14580 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
14581 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
14582 (mi_cmd_data_list_changed_registers)
14583 (mi_cmd_data_write_register_values)
14584 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
14585 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
14586 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
14587 (mi_cmd_list_features, mi_cmd_list_target_features)
14588 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
14589 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
14590 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
14591 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
14592 (mi_cmd_trace_frame_collected): Constify 'command'
14593 parameter.
14594 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
14595 'command' parameter.
14596
67cb5b2d
PA
145972017-04-05 Pedro Alves <palves@redhat.com>
14598
14599 * ada-lang.c (ada_completer_word_break_characters): Now a const
14600 array.
14601 (ada_get_gdb_completer_word_break_characters): Constify.
14602 * completer.c (gdb_completer_command_word_break_characters)
14603 (gdb_completer_file_name_break_characters)
14604 (gdb_completer_quote_characters): Now const arrays.
14605 (get_gdb_completer_quote_characters): Constify.
14606 (set_rl_completer_word_break_characters): New function.
14607 (set_gdb_completion_word_break_characters)
14608 (complete_line_internal): Use it.
14609 * completer.h (get_gdb_completer_quote_characters): Constify.
14610 (set_rl_completer_word_break_characters): Declare.
14611 * f-lang.c (f_word_break_characters): Constify.
14612 * language.c (default_word_break_characters): Constify.
14613 * language.h (language_defn::la_word_break_characters): Constify.
14614 (default_word_break_characters): Constify.
14615 * top.c (init_main): Use set_rl_completer_word_break_characters.
14616
7a114964
PA
146172017-04-05 Pedro Alves <palves@redhat.com>
14618
14619 * aix-thread.c (aix_thread_pid_to_str)
14620 (aix_thread_extra_thread_info): Constify.
14621 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
14622 * bsd-uthread.c (bsd_uthread_extra_thread_info)
14623 (bsd_uthread_pid_to_str): Constify.
14624 * corelow.c (core_pid_to_str): Constify.
14625 * darwin-nat.c (darwin_pid_to_str): Constify.
14626 * fbsd-nat.c (fbsd_pid_to_str): Constify.
14627 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
14628 Constify.
14629 * gnu-nat.c (gnu_pid_to_str): Constify.
14630 * go32-nat.c (go32_pid_to_str): Constify.
14631 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
14632 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
14633 * inferior.c (inferior_pid_to_str): Constify.
14634 * linux-nat.c (linux_nat_pid_to_str): Constify.
14635 * linux-tdep.c (linux_core_pid_to_str): Constify.
14636 * linux-thread-db.c (thread_db_pid_to_str)
14637 (thread_db_extra_thread_info): Constify.
14638 * nto-tdep.c (nto_extra_thread_info): Constify.
14639 * nto-tdep.h (nto_extra_thread_info): Constify.
14640 * obsd-nat.c (obsd_pid_to_str): Constify.
14641 * procfs.c (procfs_pid_to_str): Constify.
14642 * ravenscar-thread.c (ravenscar_extra_thread_info)
14643 (ravenscar_pid_to_str): Constify.
14644 * remote-sim.c (gdbsim_pid_to_str): Constify.
14645 * remote.c (remote_threads_extra_info, remote_pid_to_str):
14646 Constify.
14647 * sol-thread.c (solaris_pid_to_str): Constify.
14648 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
14649 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
14650 * target.c (default_pid_to_str, target_pid_to_str)
14651 (normal_pid_to_str, default_pid_to_str): Constify.
14652 * target.h (target_ops::to_pid_to_str)
14653 (target_ops::to_extra_thread_info): Constify.
14654 (target_pid_to_str, normal_pid_to_str): Constify.
14655 * windows-nat.c (windows_pid_to_str): Constify.
14656 * gdbarch.sh (core_pid_to_str): Constify.
14657 * target-delegates.c: Regenerate.
14658 * gdbarch.h, gdbarch.c: Regenerate.
14659
69bbf465
PA
146602017-04-05 Pedro Alves <palves@redhat.com>
14661
14662 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
14663 the memory of the temporary warning_pre_print override.
14664 * utils.c (warning_pre_print): Constify.
14665 * utils.h (warning_pre_print): Constify.
14666
be47f9e8
PA
146672017-04-05 Pedro Alves <palves@redhat.com>
14668
14669 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
14670 (shell_command): New function.
14671 (make_command): Use std::string.
14672 (init_cli_cmds): Register shell_command instead of shell_escape.
14673
bde6261a
PA
146742017-04-05 Pedro Alves <palves@redhat.com>
14675
14676 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
14677 * tracepoint.c (default_collect): Don't initialize.
14678
b38ef47f
PA
146792017-04-05 Pedro Alves <palves@redhat.com>
14680
14681 * macroexp.c (macro_buffer::shared): Now a bool.
14682 (init_buffer): Update.
14683 (init_shared_buffer): Constify 'addr' parameter.
14684 (substitute_args, expand, macro_expand, macro_expand_next): Remove
14685 casts.
14686
f995bbe8
PA
146872017-04-05 Pedro Alves <palves@redhat.com>
14688
14689 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
14690 * disasm.c (set_disassembler_options): Constify local.
14691 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
14692
4a596fe2
SDJ
146932017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
14694
14695 PR gdb/21352
14696 * tracefile.c (tsave_command): Fix argument parsing for '-r'
14697 option.
14698
2cad08ea
YQ
146992017-04-05 Yao Qi <yao.qi@linaro.org>
14700
14701 * frame.c (frame_unwind_register_unsigned): Call
14702 frame_unwind_register_value.
14703
55a98976
YQ
147042017-04-05 Yao Qi <yao.qi@linaro.org>
14705
14706 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
14707 Use gdb_test_multiple, and don't match anchor.
14708
4ac40124
PA
147092017-04-05 Pedro Alves <palves@redhat.com>
14710
14711 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
14712 (Write After Approval): Remove Simon Marchi.
14713
c053b654
PA
147142017-04-05 Pedro Alves <palves@redhat.com>
14715
14716 * common/gdb_optional.h (optional::optional): Make constexpr and
14717 initialize m_dummy.
14718
4c7bf4f9
JB
147192017-04-04 John Baldwin <jhb@FreeBSD.org>
14720
14721 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14722 (amd64fbsd_jmp_buf_reg_offset): Remove.
14723 (amd64fbsd_supply_uthread): Remove function.
14724 (amd64fbsd_collect_uthread): Remove function.
14725 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
14726 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
14727 (x86_64-*-freebsd*): Remove bsd-uthread.o.
14728 (fbsd-nat.c): Update comment.
14729 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14730 (i386fbsd_jmp_buf_reg_offset): Remove.
14731 (i386fbsd_supply_uthread): Remove function.
14732 (i386fbsd_collect_uthread): Remove function.
14733 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
14734
1e1a8bef
JB
147352017-04-04 John Baldwin <jhb@FreeBSD.org>
14736
14737 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
14738 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
14739 * NEWS: Mention that support for FreeBSD/alpha was removed.
14740 * alpha-fbsd-tdep.c: Delete file.
14741 * config/alpha/fbsd.mh: Delete file.
14742 * configure.host: Delete alpha*-*-freebsd* and
14743 alpha*-*-kfreebsd*-gnu.
14744 * configure.tgt: Delete alpha*-*-freebsd* and
14745 alpha*-*-kfreebsd*-gnu.
14746
49907934
JB
147472017-04-04 John Baldwin <jhb@FreeBSD.org>
14748
14749 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
14750 amd64bsd_store_inferior_registers): Use ptid from regcache.
14751
6f77053d
PA
147522017-04-04 Pedro Alves <palves@redhat.com>
14753
14754 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
14755 data fields, make them private and add "m_" prefixes.
14756 (lnp_state_machine::lnp_state_machine): New ctor.
14757 (record_line, check_line_address, handle_set_discriminator)
14758 (handle_set_address, handle_advance_pc, handle_special_opcode)
14759 (handle_advance_line, handle_set_file, handle_negate_stmt)
14760 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
14761 (end_sequence, advance_line): New methods.
14762 (m_gdbarch, m_record_lines_p): New fields.
14763 (lnp_reader_state): Delete.
14764 (dwarf_record_line): Rename to ...
14765 (lnp_state_machine::record_line): ... adjust.
14766 (init_lnp_state_machine): Delete.
14767 (lnp_state_machine::lnp_state_machine): New.
14768 (check_line_address): Rename to ...
14769 (lnp_state_machine::check_line_address): This.
14770 (dwarf_decode_lines_1): Remove reference to "reader_state".
14771 Adjust lnp_state_machine having a non-default ctor. Use bool.
14772 State machine internal state manipulation moved to
14773 lnp_state_machine methods.
14774
9c541725
PA
147752017-04-04 Pedro Alves <palves@redhat.com>
14776
14777 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14778 unittests/offset-type-selftests.c.
14779 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
14780 * common/offset-type.h: New file.
14781 * common/preprocessor.h: New file.
14782 * common/traits.h: New file.
14783 * common/valid-expr.h: New file.
14784 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
14785 sect_offset and cu_offset strong typedefs throughout.
14786 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
14787 typedefs throughout.
14788 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
14789 sect_offset and cu_offset strong typedefs throughout.
14790 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
14791 typedefs throughout.
14792 * gdbtypes.h: Include "common/offset-type.h".
14793 (cu_offset): Now an offset type (strong typedef) instead of a
14794 struct.
14795 (sect_offset): Likewise.
14796 (union call_site_parameter_u): Rename "param_offset" field to
14797 "param_cu_off".
14798 * unittests/offset-type-selftests.c: New file.
14799
ecfb656c
PA
148002017-04-04 Pedro Alves <palves@redhat.com>
14801
14802 * common/underlying.h: New file.
14803 * dwarf2read.c: Include "common/gdb_optional.h" and
14804 "common/underlying.h".
14805 (dir_index, file_name_index): New types.
14806 (file_entry): Use them.
14807 (file_entry::include): Use to_underlying.
14808 (line_header::add_file_name): Use dir_index.
14809 (read_formatted_entries): Use gdb::optional. Read form before
14810 writting to file_entry.
14811 (dwarf_decode_line_header): Use dir_index.
14812 (lnp_state_machine::current_file): Use to_underlying.
14813 (lnp_state_machine::file): Change type to file_name_index.
14814 (dwarf_record_line): Use to_underlying.
14815 (init_lnp_state_machine): Use file_name_index.
14816 (dwarf_decode_lines_1): Use dir_index and file_name_index.
14817
d194f1fe
PA
148182017-04-04 Pedro Alves <palves@redhat.com>
14819
14820 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
14821 operator bool, has_value and get methods.
14822
fff8551c
PA
148232017-04-04 Pedro Alves <palves@redhat.com>
14824
14825 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
14826 fields.
14827 (line_header): Initialize all data fields. Change type of
14828 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
14829 Change type of include_dirs to std::vector<const char *>. Remove
14830 num_include_dirs, include_dirs_size. Change type of file_names to
14831 std::vector<file_entry>. Remove num_file_names, file_names_size.
14832 (line_header::line_header): New.
14833 (line_header::add_include_dir, line_header::add_file_name): New
14834 methods.
14835 (line_header::include_dir_at): Remove NULL check.
14836 (line_header::file_name_at): Add const overload.
14837 (line_header_up): New unique_ptr typedef.
14838 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
14839 std::vector. Remove free_line_header call.
14840 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
14841 free_line_header call.
14842 (free_cu_line_header): Delete.
14843 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
14844 (setup_type_unit_groups): Use line_header_up instead of cleanups.
14845 Adjust to use std::vector.
14846 (free_line_header): Delete.
14847 (free_line_header_voidp): Use delete.
14848 (add_include_dir): Replace with ...
14849 (line_header::add_include_dir): ... this method. Use std::vector.
14850 (add_file_name): Replace with ...
14851 (line_header::add_file_name): ... this method. Use std::vector.
14852 (add_include_dir_stub): Delete.
14853 (read_formatted_entries): Remove memset.
14854 (dwarf_decode_line_header): Return a line_header_up instead of a
14855 raw pointer. Remove cleanup handling. Pass lambdas to
14856 read_formatted_entries. Adjust to use line_header methods.
14857 (dwarf_decode_lines_1): Adjust to use line_header methods.
14858 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
14859 use std::vector.
14860
d62a8ae2
SM
148612017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
14862
14863 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
14864 instead of struct ptid.
14865
db3a1dc7
AH
148662017-05-04 Alan Hayward <alan.hayward@arm.com>
14867
14868 * frame.c (get_frame_register_bytes): Unwind using value.
14869 (put_frame_register_bytes): Likewise.
14870
b1b45502
IB
148712017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
14872
14873 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
14874 aggregate-like.
14875
ec13808e
JK
148762017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
14877
14878 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
14879
12316564
YQ
148802017-03-29 Yao Qi <yao.qi@linaro.org>
14881
14882 * gdbthread.h (struct thread_info): Declare constructor and
14883 destructor. Add some in-class member initializers.
14884 * thread.c (free_thread): Remove.
14885 (init_thread_list): Call delete instead of free_thread.
14886 (new_thread): Call thread_info constructor.
14887 (thread_info::thread_info): New function.
14888 (thread_info::~thread_info): New function.
14889 (delete_thread_1): Call delete instead of free_thread.
14890 (make_cleanup_restore_current_thread): Move tp and frame to
14891 inner block.
14892
fe5f7374
AK
148932017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14894
14895 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
14896 (arc_skip_prologue): Likewise.
14897 (arc_make_frame_cache): Likewise.
14898 (arc_pv_get_operand): New function.
14899 (arc_is_in_prologue): Likewise.
14900 (arc_analyze_prologue): Likewise.
14901 (arc_print_frame_cache): Likewise.
14902 (MAX_PROLOGUE_LENGTH): New constant.
14903
eea78757
AK
149042017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14905
14906 * configure.tgt: Add arc-insn.o.
14907 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
14908 (dump_arc_instruction_command): New function.
14909 (arc_fprintf_disasm): Likewise.
14910 (arc_disassemble_info): Likewise.
14911 (arc_insn_get_operand_value): Likewise.
14912 (arc_insn_get_operand_value_signed): Likewise.
14913 (arc_insn_get_memory_base_reg): Likewise.
14914 (arc_insn_get_memory_offset): Likewise.
14915 (arc_insn_get_branch_target): Likewise.
14916 (arc_insn_dump): Likewise.
14917 (arc_insn_get_linear_next_pc): Likewise.
14918 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
14919 (arc_disassemble_info): Likewise.
14920 (arc_insn_get_branch_target): Likewise.
14921 (arc_insn_get_linear_next_pc): Likewise.
14922 * NEWS: Mention new "maint print arc arc-instruction".
14923
3be78afd
AK
149242017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14925
14926 * arc-tdep (maintenance_print_arc_list): New variable.
14927 (maintenance_print_arc_command): New function.
14928
296ec4fa
AK
149292017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14930
14931 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
14932 Add "limm" and "reserved".
14933 (arc_cannot_fetch_register, arc_cannot_store_register): Add
14934 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
14935 * arc-tdep.h (arc_regnum): Likewise.
14936
f74f865e
MF
149372017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14938
14939 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14940 for THREADPTR register.
14941 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
14942 register.
14943 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
14944 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
14945 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
14946
0d0bf81a
MF
149472017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14948
14949 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
14950 registers above gdbarch_num_regs (gdbarch) as privileged in
14951 call0 ABI.
14952
0ce4291e
MF
149532017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14954
14955 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14956 for a single specified register or for all registers in
14957 a0_base..a0_base + C0_NREGS range.
14958 (supply_gregset_reg): Call regcache_raw_supply for a single
14959 specified register or for all registers in a0_base..a0_base +
14960 C0_NREGS range.
14961
c56054f9
MF
149622017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14963
14964 * arch/xtensa.h (C0_NREGS): Add definition.
14965 * xtensa-tdep.c (C0_NREGS): Remove definition.
14966
a4398628
MF
149672017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14968
14969 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
14970 Drop xtensa_default_isa initialization.
14971 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
14972
8c43009f
PA
149732017-03-27 Pedro Alves <palves@redhat.com>
14974
14975 * dwarf2read.c (file_entry) <dir_index>: Add comment.
14976 (file_entry::include_dir): New method.
14977 (line_header::include_dir_at, line_header::file_name_at): New
14978 methods.
14979 (setup_type_unit_groups, setup_type_unit_groups)
14980 (psymtab_include_file_name): Simplify using the new methods.
14981 (lnp_state_machine) <the_line_header>: New field.
14982 <file>: Add comment.
14983 (lnp_state_machine::current_file): New method.
14984 (dwarf_record_line): Simplify using the new methods.
14985 (init_lnp_state_machine): Initialize the "the_line_header" field.
14986 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
14987 Simplify using the new methods.
14988
a7e80b9e
PA
149892017-03-27 Pedro Alves <palves@redhat.com>
14990
14991 * cp-name-parser.y (make_empty): Delete.
14992 (demangler_special, nested_name, ptr_operator, array_indicator)
14993 (direct_declarator, declarator_1): Use fill_comp instead of
14994 make_empty.
14995
21047726
PA
149962017-03-27 Pedro Alves <palves@redhat.com>
14997
14998 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
14999 to ATTRIBUTE_PRINTF.
15000 * solib-target.c (library_list_start_list): Print "string" not
15001 "version".
15002 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
15003 gdb_xml_error call.
15004
d721ba37
PA
150052017-03-27 Pedro Alves <palves@redhat.com>
15006
15007 * dwarf2read.c (struct file_and_directory): New.
15008 (dwarf2_get_dwz_file): Adjust to use std::string.
15009 (dw2_get_file_names_reader): Adjust to use file_and_directory.
15010 (find_file_and_directory): Adjust to return a file_and_directory
15011 object.
15012 (read_file_scope): Adjust to use file_and_directory. Remove
15013 make_cleanup/do_cleanups calls.
15014 (open_and_init_dwp_file): Adjust to use std::string. Remove
15015 make_cleanup/do_cleanups calls.
15016 * python/python.c (do_start_initialization): Adjust to ldirname
15017 returning a std::string.
15018 * utils.c (ldirname): Now returns a std::string.
15019 * utils.h (ldirname): Change return type to std::string.
15020 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
15021 returning a std::string.
15022 * xml-tdesc.c (file_read_description_xml): Likewise.
15023
ed771251
AH
150242017-03-24 Alan Hayward <alan.hayward@arm.com>
15025
15026 * regcache.c (regcache_debug_print_register): New function.
15027 * regcache.h (regcache_debug_print_register): New declaration.
15028 * target.c (debug_print_register): Remove.
15029 (target_fetch_registers): Call regcache_debug_print_register.
15030 (target_store_registers): Likewise.
15031
568c1b9f
PB
150322017-03-24 Pádraig Brady <pbrady@fb.com>
15033
15034 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
15035 reference beyond the 'lh->include_dirs' array before accessing to
15036 it.
15037 (psymtab_include_file_name): Likewise.
15038 (dwarf_decode_lines_1): Likewise.
15039 (dwarf_decode_lines): Likewise.
15040 (file_file_name): Likewise.
15041
3e00d44f
SM
150422017-03-23 Simon Marchi <simon.marchi@ericsson.com>
15043
15044 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
15045 inferior_ptid.
15046 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
15047 ps_lsetfpregs): Likewise.
15048 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
15049 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
15050 ps_lsetfpregs): Likewise.
15051 * target.c (target_fetch_registers, target_store_registers):
15052 Remove asserts.
15053
077ae656
AH
150542017-03-23 Alan Hayward <alan.hayward@arm.com>
15055
15056 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
15057
1e2b521d
YQ
150582017-03-23 Yao Qi <yao.qi@linaro.org>
15059
15060 * aarch64-tdep.c (aarch64_process_record_test): Declare.
15061 (_initialize_aarch64_tdep): Register it.
15062 (aarch64_record_load_store): Handle PRFM instruction.
15063 (aarch64_process_record_test): New function.
15064
33877125
YQ
150652017-03-23 Yao Qi <yao.qi@linaro.org>
15066
15067 * aarch64-tdep.c (aarch64_record_load_store): Fix code
15068 indentation.
15069
a0eef940
YQ
150702017-03-23 Yao Qi <yao.qi@linaro.org>
15071
15072 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
15073
3f2a3564
PR
150742017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15075
15076 python/python.c (do_start_initialization): Fix memory leak.
15077
b67aeab0
SM
150782017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
15079
15080 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
15081 using get_ptrace_pid.
15082 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
15083 inferior_ptid.
15084 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
15085 inferior_ptid instead of pid.
15086
ffdbe864
YQ
150872017-03-22 Yao Qi <yao.qi@linaro.org>
15088
15089 * aarch64-tdep.c: Wrap locally used classes in anonymous
15090 namespace.
15091 * arm-tdep.c: Likewise.
15092 * linespec.c: Likewise.
15093 * ui-out.c: Likewise.
15094
9d736fbf
JG
150952017-03-22 Jonah Graham <jonah@kichwacoders.com>
15096
15097 PR gdb/19637
15098 * python/lib/gdb/printer/bound_registers.py: Import sys.
15099
3de88e9a
SM
151002017-03-21 Simon Marchi <simon.marchi@ericsson.com>
15101
15102 * windows-nat.c (do_windows_fetch_inferior_registers): Add
15103 windows_thread_info parameter and use it instead of
15104 current_thread.
15105 (windows_fetch_inferior_registers): Don't set current_thread,
15106 pass the thread to do_windows_fetch_inferior_registers. Use
15107 ptid from regcache instead of inferior_ptid.
15108 (do_windows_store_inferior_registers): Add windows_thread_info
15109 parameter and use it instead of current_thread.
15110 (windows_store_inferior_registers): Don't set current_thread,
15111 pass the thread to do_windows_store_inferior_registers. Use
15112 ptid from regcache instead of inferior_ptid.
15113
0e7b8f61
SM
151142017-03-21 Simon Marchi <simon.marchi@ericsson.com>
15115
15116 * ser-mingw.c (ser_windows_raw): Remove reference to
15117 struct serial::current_timeout.
15118
5badf10a
IR
151192017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
15120
15121 PR tdep/20928
15122 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
15123 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
15124 (sparc64_fsr_type): Fix %fsr decoding.
15125
cee59b3f
TW
151262017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
15127
15128 * python/py-record-btrace.c (btpy_insn_data): Change return type
15129 for Python 2.
15130
639a9038
SM
151312017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
15132
15133 * spu-linux-nat.c (spu_fetch_inferior_registers,
15134 spu_store_inferior_registers): Use ptid from regcache, set and
15135 restore inferior_ptid.
15136 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
15137 Likewise.
15138
bcc0c096
SM
151392017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
15140
15141 * i386-linux-nat.c (fetch_register, store_register,
15142 i386_linux_fetch_inferior_registers,
15143 i386_linux_store_inferior_registers): Use ptid from regcache.
15144 * ia64-linux-nat.c (ia64_linux_fetch_register,
15145 ia64_linux_store_register): Likewise.
15146 * inf-ptrace.c (inf_ptrace_fetch_register,
15147 inf_ptrace_store_register): Likewise.
15148 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
15149 m32r_linux_store_inferior_registers): Likewise.
15150 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
15151 m68kbsd_store_inferior_registers): Likewise.
15152 * m68k-linux-nat.c (fetch_register, store_register,
15153 m68k_linux_fetch_inferior_registers,
15154 m68k_linux_store_inferior_registers): Likewise.
15155 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
15156 m88kbsd_store_inferior_registers): Likewise.
15157 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
15158 mips_fbsd_store_inferior_registers): Likewise.
15159 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
15160 mips64_linux_regsets_store_registers): Likewise.
15161 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
15162 mipsnbsd_store_inferior_registers): Likewise.
15163 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
15164 mips64obsd_store_inferior_registers): Likewise.
15165 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
15166 Likewise.
15167 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
15168 ppcfbsd_store_inferior_registers): Likewise.
15169 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
15170 ppc_linux_store_inferior_registers): Likewise.
15171 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
15172 ppcnbsd_store_inferior_registers): Likewise.
15173 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
15174 ppcobsd_store_registers): Likewise.
15175 * procfs.c (procfs_fetch_registers, procfs_store_registers):
15176 Likewise.
15177 * ravenscar-thread.c (ravenscar_fetch_registers,
15178 ravenscar_store_registers, ravenscar_prepare_to_store):
15179 Likewise.
15180 * record-btrace.c (record_btrace_fetch_registers,
15181 record_btrace_store_registers, record_btrace_prepare_to_store):
15182 Likewise.
15183 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
15184 Lookup inferior using ptid from regcache, instead of
15185 current_inferior.
15186 * remote.c (remote_fetch_registers, remote_store_registers): Use
15187 ptid from regcache.
15188 * rs6000-nat.c (fetch_register, store_register): Likewise.
15189 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
15190 s390_linux_store_inferior_registers): Likewise.
15191 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
15192 shnbsd_store_inferior_registers): Likewise.
15193 * sol-thread.c (sol_thread_fetch_registers,
15194 sol_thread_store_registers): Likewise.
15195 * sparc-nat.c (sparc_fetch_inferior_registers,
15196 sparc_store_inferior_registers): Likewise.
15197 * tilegx-linux-nat.c (fetch_inferior_registers,
15198 store_inferior_registers): Likewise.
15199 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
15200 vaxbsd_store_inferior_registers): Likewise.
15201 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
15202 store_xtregs): Likewise.
15203
c0f55cc6
AV
152042017-03-20 Artemiy Volkov <artemiyv@acm.org>
15205
15206 PR gdb/14441
15207 * NEWS: Mention support for rvalue references in GDB and python.
15208 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
15209 supports both lvalue and rvalue references.
15210
15c0a2a9
AV
152112017-03-20 Artemiy Volkov <artemiyv@acm.org>
15212
15213 PR gdb/14441
15214 * gdbtypes.c (rank_one_type): Implement overloading
15215 resolution rules regarding rvalue references.
15216
aa006118
AV
152172017-03-20 Artemiy Volkov <artemiyv@acm.org>
15218
15219 PR gdb/14441
15220 * aarch64-tdep.c (aarch64_type_align)
15221 (aarch64_extract_return_value, aarch64_store_return_value): Change
15222 lvalue reference type checks to general reference type checks.
15223 * amd64-tdep.c (amd64_classify): Likewise.
15224 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
15225 Likewise.
15226 * arm-tdep.c (arm_type_align, arm_extract_return_value)
15227 (arm_store_return_value): Likewise.
15228 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
15229 * c-typeprint.c (c_print_type): Likewise.
15230 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
15231 (cplus_number_of_children, cplus_describe_child): Likewise.
15232 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
15233 * completer.c (expression_completer): Likewise.
15234 * cp-support.c (make_symbol_overload_list_adl_namespace):
15235 Likewise.
15236 * darwin-nat-info.c (info_mach_region_command): Likewise.
15237 * dwarf2loc.c (entry_data_value_coerce_ref)
15238 (value_of_dwarf_reg_entry): Likewise.
15239 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
15240 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
15241 Likewise.
15242 * findvar.c (extract_typed_address, store_typed_address):
15243 Likewise.
15244 * gdbtypes.c (rank_one_type): Likewise.
15245 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
15246 * infcall.c (value_arg_coerce): Likewise.
15247 * language.c (pointer_type): Likewise.
15248 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
15249 Likewise.
15250 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
15251 * mn10300-tdep.c (mn10300_type_align): Likewise.
15252 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
15253 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
15254 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
15255 Likewise.
15256 * printcmd.c (print_formatted, x_command): Likewise.
15257 * python/py-type.c (typy_get_composite, typy_template_argument):
15258 Likewise.
15259 * python/py-value.c (valpy_referenced_value)
15260 (valpy_get_dynamic_type, value_has_field): Likewise.
15261 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
15262 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
15263 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
15264 * spu-tdep.c (spu_scalar_value_p): Likewise.
15265 * symtab.c (lookup_symbol_aux): Likewise.
15266 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
15267 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
15268 Likewise.
15269 * valops.c (value_cast_pointers, value_cast)
15270 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
15271 (value_struct_elt, value_struct_elt_bitpos)
15272 (value_find_oload_method_list, find_overload_match)
15273 (value_rtti_indirect_type): Likewise.
15274 * valprint.c (val_print_scalar_type_p, generic_val_print):
15275 Likewise.
15276 * value.c (value_actual_type, value_as_address, unpack_long)
15277 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
15278 (coerce_ref): Likewise.
15279 * varobj.c (varobj_get_value_type): Likewise.
15280
3fcf899d
AV
152812017-03-20 Artemiy Volkov <artemiyv@acm.org>
15282
15283 PR gdb/14441
15284 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
15285 table of constants.
15286 * python/lib/gdb/command/explore.py: Support exploring values
15287 of rvalue reference types.
15288 * python/lib/gdb/types.py: Implement get_basic_type() for
15289 rvalue reference types.
15290 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
15291 constant.
15292 * python/py-value.c (valpy_getitem): Add an rvalue reference
15293 check.
15294 (valpy_reference_value): Add new parameter "refcode".
15295 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
15296 New wrappers for valpy_reference_value().
15297 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15298 (gdbpy_invoke_xmethod): Likewise.
15299
4297a3f0
AV
153002017-03-20 Artemiy Volkov <artemiyv@acm.org>
15301
15302 PR gdb/14441
15303 * dwarf2read.c (process_die, read_type_die_1): Handle the
15304 DW_TAG_rvalue_reference_type DIE.
15305 (read_tag_reference_type): Add new parameter "refcode".
15306
e1cb3213
AV
153072017-03-20 Artemiy Volkov <artemiyv@acm.org>
15308
15309 PR gdb/14441
15310 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
15311 (c_type_print_modifier, c_type_print_varspec_suffix)
15312 (c_type_print_base): Support printing rvalue reference types.
15313 * c-valprint.c (c_val_print, c_value_print): Support printing
15314 rvalue reference values.
15315
e4347c89
AV
153162017-03-20 Artemiy Volkov <artemiyv@acm.org>
15317
15318 PR gdb/14441
15319 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
15320 typename.
15321 * cp-support.c (replace_typedefs): Handle
15322 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
15323 * python/py-type.c (typy_lookup_type): Likewise.
15324
53cc15f5
AV
153252017-03-20 Artemiy Volkov <artemiyv@acm.org>
15326
15327 PR gdb/14441
15328 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
15329 * parse.c (insert_type): Change assert statement.
15330 (follow_types): Handle rvalue reference types.
15331 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
15332 constant.
15333
a65cfae5
AV
153342017-03-20 Artemiy Volkov <artemiyv@acm.org>
15335
15336 PR gdb/14441
15337 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
15338 value_ref() interface.
15339 * c-valprint.c (c_value_print): Likewise.
15340 * infcall.c (value_arg_coerce): Likewise.
15341 * python/py-value.c (valpy_reference_value): Likewise.
15342 * valops.c (value_cast, value_reinterpret_cast)
15343 (value_dynamic_cast, typecmp): Likewise.
15344 (value_ref): Parameterize by kind of return value reference type.
15345 * value.h (value_ref): Add new parameter "refcode".
15346
3b224330
AV
153472017-03-20 Artemiy Volkov <artemiyv@acm.org>
15348
15349 PR gdb/14441
15350 * dwarf2read.c (read_tag_reference_type): Use
15351 lookup_lvalue_reference_type() instead of lookup_reference_type().
15352 * eval.c (evaluate_subexp_standard): Likewise.
15353 * f-exp.y: Likewise.
15354 * gdbtypes.c (make_reference_type, lookup_reference_type):
15355 Generalize with rvalue reference types.
15356 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
15357 convenience wrappers for lookup_reference_type().
15358 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
15359 reference kind parameter.
15360 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
15361 wrappers for lookup_reference_type().
15362 * guile/scm-type.c (gdbscm_type_reference): Use
15363 lookup_lvalue_reference_type() instead of lookup_reference_type().
15364 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
15365 * parse.c (follow_types): Likewise.
15366 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
15367 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
15368 Likewise.
15369 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15370 (gdbpy_invoke_xmethod): Likewise.
15371 * stabsread.c: Provide extra argument to make_reference_type()
15372 call.
15373 * valops.c (value_ref, value_rtti_indirect_type): Use
15374 lookup_lvalue_reference_type() instead of lookup_reference_type().
15375
f9aeb8d4
AV
153762017-03-20 Artemiy Volkov <artemiyv@acm.org>
15377
15378 PR gdb/14441
15379 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
15380 (TYPE_IS_REFERENCE): New macro.
15381 (struct type): Add rvalue_reference_type field.
15382 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
15383
51457a05
MAL
153842017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15385
15386 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
15387 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
15388 New function definition.
15389 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
15390 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
15391 New function declaration.
15392 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
15393 * mi/mi-interp.h: New file.
15394 * solib.c (info_sharedlibrary_command): Replace for loop with
15395 ALL_SO_LIBS macro
15396 * solib.h (update_solib_list): New function declaration.
15397 (so_list_head): Move macro.
15398 * solist.h (ALL_SO_LIBS): New macro.
15399
e696b3ad
MAL
154002017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15401
15402 * infcmd.c (post_create_inferior): Remove unused argument in
15403 call to solib_add.
15404 * remote.c (remote_start_remote): Likewise.
15405 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
15406 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
15407 (enable_break): Likewise.
15408 * solib.c (update_solib_list): Remove unused target argument
15409 and its documentation.
15410 (solib_add): Remove unused target argument. Remove unused
15411 argument in call to update_solib_list.
15412 (info_sharedlibrary_command): Remove unused argument in call
15413 to update_solib_list.
15414 (sharedlibrary_command): Remove unused argument in call to
15415 solib_add.
15416 (handle_solib_event): Likewise.
15417 (reload_shared_libraries): Likewise.
15418 * solib.h (solib_add): Remove unused target argument.
15419
dcb84eda
AA
154202017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
15421
15422 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
15423 (s390_displaced_step_fixup): Cover relative branches with the
15424 default fixup handling. This fixes lack of support for some
15425 relative branch instructions.
15426
d9cb6cdc
SM
154272017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15428
15429 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
15430 ptid from regcache.
15431
1afaf9f4
SM
154322017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15433
15434 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
15435 i386_darwin_store_inferior_registers): Use ptid from regcache.
15436
aac12e24
SM
154372017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15438
15439 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
15440 i386bsd_store_inferior_registers): Use ptid from regcache.
15441
bbe1eef1
SM
154422017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15443
15444 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
15445 hppaobsd_store_registers): Use ptid from regcache.
15446
10799020
SM
154472017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15448
15449 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
15450 hppanbsd_store_registers): Use ptid from regcache.
15451
00204cf7
SM
154522017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15453
15454 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
15455 from regcache. Use get_ptrace_pid.
15456
11a33714
SM
154572017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15458
15459 * corelow.c (get_core_register_section): Use ptid from regcache,
15460 update doc.
15461
317cd492
SM
154622017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15463
15464 * bsd-uthread.c (bsd_uthread_fetch_registers,
15465 bsd_uthread_store_registers): Use ptid from regcache, set and
15466 restore inferior_ptid.
15467
9ac8a7c2
SM
154682017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15469
15470 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
15471 fetch_fp_regs, store_register, store_regs, store_fp_register,
15472 store_fp_regs): Use ptid from regcache.
15473
4ac4bb6a
SM
154742017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15475
15476 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
15477 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
15478 store_vfp_regs): Use ptid from regcache.
15479
9bcbdca8
PA
154802017-03-17 Pedro Alves <palves@redhat.com>
15481
15482 PR remote/21188
15483 * ser-base.c (ser_base_wait_for): Add comment.
15484 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
15485 version.
15486 * ser-unix.c (hardwire_raw): Remove reference to
15487 scb->current_timeout.
15488 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
15489 (hardwire_ops): Install ser_base_readchar instead of
15490 hardwire_readchar.
15491 * serial.h (struct serial) <current_timeout, timeout_remaining>:
15492 Remove fields.
15493
7503099f
JG
154942017-03-17 Jonah Graham <jonah@kichwacoders.com>
15495
15496 PR gdb/19637
15497 * python/lib/gdb/printer/bound_registers.py: Add support for
15498 Python 3.
15499
7942e96e
AA
155002017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
15501
15502 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
15503 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
15504 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
15505 byte_offset to subobj_byte_offset. Fix the handling of
15506 DWARF_VALUE_STACK on big-endian targets when coming via an
15507 implicit pointer.
15508 (dwarf2_evaluate_loc_desc): Adjust call to
15509 dwarf2_evaluate_loc_desc_full.
15510 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
15511 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
15512
ba14f379
YQ
155132017-03-16 Yao Qi <yao.qi@linaro.org>
15514
15515 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
15516 and REVSH instructions.
15517
b121eeb9
YQ
155182017-03-16 Yao Qi <yao.qi@linaro.org>
15519
15520 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
15521 (arm_record_test): Declare.
15522 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
15523 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
15524 align with the manual.
15525 (thumb_record_misc): Adjust the code order to align with the
15526 manual.
15527 (thumb2_record_decode_insn_handler): Fix instruction matching.
15528 (instruction_reader_thumb): New class.
15529 (arm_record_test): New function.
15530
728a7913
YQ
155312017-03-16 Yao Qi <yao.qi@linaro.org>
15532
15533 * arm-tdep.c (abstract_memory_reader): New class.
15534 (instruction_reader): New class.
15535 (extract_arm_insn): Add argument 'reader'. Callers updated.
15536 (decode_insn): Likewise.
15537
34b43320
DE
155382017-03-16 Doug Evans <dje@google.com>
15539
a7c0469f
DE
15540 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
15541 member. Change type of TYPE member to SCM. All uses updated.
15542 (lsscm_make_lazy_string_smob): Add assert.
15543 (lsscm_make_lazy_string): Flag bad length values.
15544 (lsscm_elt_type): New function.
15545 (gdbscm_lazy_string_to_value): Rewrite to use
15546 lsscm_safe_lazy_string_to_value.
15547 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
15548 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
15549 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
15550 in incoming type.
15551 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15552 * guile/scm-type.c (tyscm_scm_to_type): New function.
15553
155542017-03-15 Doug Evans <dje@google.com>
15555
34b43320
DE
15556 PR python/17728, python/18439, python/18779
15557 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
15558 member. Change type of TYPE member to PyObject *. All uses updated.
15559 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
15560 (gdbpy_create_lazy_string_object): Flag bad length values.
15561 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
15562 Handle typedefs in incoming type.
15563 (stpy_lazy_string_elt_type): New function.
15564 (gdbpy_extract_lazy_string): Call it.
15565 * python/py-value.c (valpy_lazy_string): Flag bad length values.
15566 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
15567 typedefs in incoming type.
15568
a3a5fecc
DE
155692017-03-16 Doug Evans <dje@google.com>
15570
15571 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15572 * guile/scm-type.c (tyscm_scm_to_type): New function.
15573
28f1c605
JW
155742017-03-16 Jiong Wang <jiong.wang@arm.com>
15575
15576 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
15577 "ULONGEST" for "skip".
15578
87c336f6
AA
155792017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
15580
15581 PR gdb/21220
15582 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
15583 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
15584 (inf_ptrace_peek_poke): ...here. New function. Now also loop
15585 over ptrace peek/poke until end of buffer or error.
15586
cf81cf60
SM
155872017-03-14 Simon Marchi <simon.marchi@ericsson.com>
15588
15589 * parse.c (length_of_subexp): Make static.
15590 * parser-defs.h (length_of_subexp): Remove.
15591
a379284a
AA
155922017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
15593
15594 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
15595 as well.
15596
8a6200ba
PA
155972017-03-14 Pedro Alves <palves@redhat.com>
15598
15599 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
15600 (main): Use std::unique_ptr. Remove calls to
15601 cp_demangled_name_parse_free.
15602
f79ec206
SM
156032017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15604
15605 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
15606 alphabsd_store_inferior_registers): Use regcache->ptid instead
15607 of inferior_ptid.
15608
edb5fb00
SM
156092017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15610
15611 * aix-thread.c (aix_thread_fetch_registers,
15612 aix_thread_store_registers): Use regcache->ptid instead of
15613 inferior_ptid.
15614
55119686
SM
156152017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15616
15617 * aarch64-linux-nat.c (fetch_gregs_from_thread,
15618 store_gregs_to_thread, fetch_fpregs_from_thread,
15619 store_fpregs_to_thread): Use regcache->ptid instead of
15620 inferior_ptid.
15621
6a06fbb7
SM
156222017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15623
15624 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
15625 amd64_linux_fetch_inferior_registers): Use regcache->ptid
15626 instead of inferior_ptid.
15627
c6386875
SM
156282017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15629
15630 * target.c (target_fetch_registers, target_store_registers): Add
15631 assert.
15632
ddaaf0fb
SM
156332017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15634
15635 * regcache.h (regcache_get_ptid): New function.
15636 * regcache.c (regcache_get_ptid): New function.
15637
b9da89d1 156382017-03-13 Mark Wielaard <mark@klomp.org>
15639
15640 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
15641
5f4d1085
KS
156422017-03-10 Keith Seitz <keiths@redhat.com>
15643
15644 PR c++/8218
15645 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
15646
c65d6b55
PA
156472017-03-08 Pedro Alves <palves@redhat.com>
15648
15649 PR gdb/18360
15650 * infrun.c (start_step_over, do_target_resume, resume)
15651 (restart_threads): Assert we're not resuming a thread that is
15652 meant to be stopped.
15653 (infrun_thread_stop_requested_callback): Delete.
15654 (infrun_thread_stop_requested): If the thread is internally
15655 stopped, queue a pending stop event and clear the thread's
15656 inline-frame state.
15657 (handle_stop_requested): New function.
15658 (handle_syscall_event, handle_inferior_event_1): Use
15659 handle_stop_requested.
15660 (handle_stop_requested): New function.
15661 (handle_signal_stop): Set the thread's stop_signal here instead of
15662 at caller.
15663 (finish_step_over): Clear step over info unconditionally.
15664 (handle_signal_stop): If the user had interrupted the event
15665 thread, consider the stop a random signal.
15666 (handle_signal_stop) <signal arrived while stepping over
15667 breakpoint>: Don't restart threads here.
15668 (stop_waiting): Don't clear step-over info here.
15669
15c22686
PA
156702017-03-08 Pedro Alves <palves@redhat.com>
15671
15672 PR 21206
15673 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
15674 goes to argument 2, not 1.
15675
6e5d74e7
PA
156762017-03-08 Pedro Alves <palves@redhat.com>
15677
15678 PR cli/21218
15679 * top.c (gdb_readline_wrapper): Avoid passing NULL to
15680 display_gdb_prompt.
15681 (command_line_input): Add comment.
15682
9753a2f6
PA
156832017-03-08 Pedro Alves <palves@redhat.com>
15684
15685 PR tui/21216
15686 * tui/tui-file.c (tui_file::write): New.
15687 * tui/tui-file.h (tui_file): Override "write".
15688 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
15689 factored out from ...
15690 (tui_puts): ... here.
15691 (tui_putc): Use them.
15692 (tui_write): New function.
15693 * tui/tui-io.h (tui_write): Declare.
15694
1672e0d9
SDJ
156952017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
15696
15697 * Makefile.in (SFILES): Replace "environ.c" with
15698 "common/environ.c".
15699 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
15700 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
15701 to...
15702 * common/environ.c: ... here.
15703 * environ.h: Moved to...
15704 * common/environ.h: ... here.
15705
f7bb4e3a
PB
157062017-03-07 Peter Bergner <bergner@vnet.ibm.com>
15707
15708 * gdbarch.sh (pstring_ptr): New static function.
15709 (gdbarch_disassembler_options): Use it.
15710 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
15711 not valid_disassembler_option->name.
15712 * gdbarch.c: Regenerate.
15713
e45ced6c
PB
157142017-03-07 Peter Bergner <bergner@vnet.ibm.com>
15715
15716 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
15717
5f6fd321
PA
157182017-03-07 Pedro Alves <palves@redhat.com>
15719
15720 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
15721
6dbb839a 157222017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
15723
15724 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
15725 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
15726 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 15727 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 15728
d274ecf4
SM
157292017-03-06 Simon Marchi <simon.marchi@ericsson.com>
15730
15731 * xtensa-linux-nat.c (fetch_gregs): Remove const.
15732
df97be55
SM
157332017-03-03 Simon Marchi <simon.marchi@ericsson.com>
15734
15735 * remote.c (remote_add_target_side_commands): Use range-based
15736 for loop.
15737
7d45f3df
YQ
157382017-03-03 Yao Qi <yao.qi@linaro.org>
15739
15740 PR gdb/21165
15741 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
15742 value is lazy.
15743 * valprint.c (common_val_print): Likewise.
15744
65b48a81
PB
157452017-02-28 Peter Bergner <bergner@vnet.ibm.com>
15746
15747 * NEWS: Mention new set/show disassembler-options commands.
15748 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
15749 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
15750 (prospective_options): New static variable.
15751 (gdb_disassembler::gdb_disassembler): Initialize
15752 m_di.disassembler_options.
15753 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
15754 (get_disassembler_options): New function.
15755 (set_disassembler_options): Likewise.
15756 (set_disassembler_options_sfunc): Likewise.
15757 (show_disassembler_options_sfunc): Likewise.
15758 (disassembler_options_completer): Likewise.
15759 (_initialize_disasm): Likewise.
15760 * disasm.h (get_disassembler_options): New prototype.
15761 (set_disassembler_options): Likewise.
15762 * gdbarch.sh (gdbarch_disassembler_options): New variable.
15763 (gdbarch_verify_disassembler_options): Likewise.
15764 * gdbarch.c: Regenerate.
15765 * gdbarch.h: Likewise.
15766 * arm-tdep.c (num_disassembly_options): Delete.
15767 (set_disassembly_style): Likewise.
15768 (arm_disassembler_options): New static variable.
15769 (set_disassembly_style_sfunc): Convert short style name into long
15770 option name. Call set_disassembler_options.
15771 (show_disassembly_style_sfunc): New function.
15772 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
15773 set_gdbarch_verify_disassembler_options.
15774 (_initialize_arm_tdep): Delete regnames variable and update callers.
15775 (arm_disassembler_options): Initialize.
15776 (disasm_options): New variable.
15777 (num_disassembly_options): Rename from this...
15778 (num_disassembly_styles): ...to this. Compute by scanning through
15779 disasm_options.
15780 (valid_disassembly_styles): Initialize using disasm_options.
15781 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
15782 set_arm_regname_option.
15783 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
15784 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
15785 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
15786 set_gdbarch_verify_disassembler_options.
15787 * s390-tdep.c (s390_disassembler_options): New static variable.
15788 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
15789 set_gdbarch_verify_disassembler_options.
15790
d538e36d
SM
157912017-02-27 Simon Marchi <simon.marchi@ericsson.com>
15792
15793 * remote.c (remote_add_target_side_condition): Remove "struct"
15794 keyword from range-based for loop.
15795
83621223
SM
157962017-02-27 Simon Marchi <simon.marchi@ericsson.com>
15797
15798 * remote.c (remote_add_target_side_condition): Use range-based
15799 for loop. Update comment.
15800
2123df0e
YQ
158012017-02-27 Yao Qi <yao.qi@linaro.org>
15802
15803 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
15804
8e368124
AH
158052017-02-26 Alan Hayward <alan.hayward@arm.com>
15806
15807 * regcache.c (regcache_raw_update): New function.
15808 (regcache_raw_read): Move code to regcache_raw_update.
15809 * regcache.h (regcache_raw_update): New declaration.
15810 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
15811
a49dd8dd
JK
158122017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
15813
15814 * dwarf2read.c (create_debug_type_hash_table): Initialize
15815 header.signature and header.type_offset_in_tu.
15816
34e4bae9
PA
158172017-02-24 Pedro Alves <palves@redhat.com>
15818
15819 * symtab.c (make_file_symbol_completion_list_1): Use
15820 add_symtab_completions.
15821
b0e4b369
AH
158222017-02-24 Alan Hayward <alan.hayward@arm.com>
15823
15824 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
15825
975c21ab
AH
158262017-02-24 Alan Hayward <alan.hayward@arm.com>
15827
15828 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
15829 I386_MAX_REGISTER_SIZE.
15830 (i386_pseudo_register_write): Likewise.
15831 (i386_process_record): Likewise.
15832 * i387-tdep.c (i387_supply_xsave): Likewise.
15833 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
15834 (store_register): Likewise.
15835
14bc53a8
PA
158362017-02-23 Pedro Alves <palves@redhat.com>
15837
15838 * ada-lang.c: Include "common/function-view.h".
15839 (ada_iterate_over_symbols): Adjust to use function_view as
15840 callback type.
15841 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
15842 (ada_make_symbol_completion_list): Use a lambda.
15843 (ada_exc_search_name_matches): Delete.
15844 (name_matches_regex): New.
15845 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
15846 * compile/compile-c-support.c: Include "common/function-view.h".
15847 (print_one_macro): Change prototype to accept a ui_file pointer.
15848 (write_macro_definitions): Use a lambda.
15849 * dwarf2read.c: Include "common/function-view.h".
15850 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
15851 (dw2_expand_symtabs_matching): Adjust to use function_view as
15852 callback type.
15853 * language.h: Include "common/function-view.h".
15854 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
15855 function_view as callback type.
15856 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
15857 * linespec.c: Include "common/function-view.h".
15858 (collect_info::add_symbol): New method.
15859 (struct symbol_and_data_callback, iterate_inline_only, struct
15860 symbol_matcher_data, iterate_name_matcher): Delete.
15861 (iterate_over_all_matching_symtabs): Adjust to use function_view
15862 as callback type and lambdas.
15863 (iterate_over_file_blocks): Adjust to use function_view as
15864 callback type.
15865 (decode_compound_collector): Now a class with private fields.
15866 (decode_compound_collector::release_symbols): New method.
15867 (collect_one_symbol): Rename to...
15868 (decode_compound_collector::operator()): ... this and adjust.
15869 (lookup_prefix_sym): decode_compound_collector construction bits
15870 move to decode_compound_collector ctor. Pass the
15871 decode_compound_collector object directly as callback. Remove
15872 cleanups and use decode_compound_collector::release_symbols
15873 instead.
15874 (symtab_collector): Now a class with private fields.
15875 (symtab_collector::release_symtabs): New method.
15876 (add_symtabs_to_list): Rename to...
15877 (symtab_collector::operator()): ... this and adjust.
15878 (collect_symtabs_from_filename): symtab_collector construction
15879 bits move to symtab_collector ctor. Pass the symtab_collector
15880 object directly as callback. Remove cleanups and use
15881 symtab_collector::release_symtabs instead.
15882 (collect_symbols): Delete.
15883 (add_matching_symbols_to_info): Use lambdas.
15884 * macrocmd.c (print_macro_callback): Delete.
15885 (info_macro_command): Use a lambda.
15886 (info_macros_command): Pass print_macro_definition as callable
15887 directly.
15888 (print_one_macro): Remove 'ignore' parameter.
15889 (macro_list_command): Adjust.
15890 * macrotab.c (macro_for_each_data::fn): Now a function_view.
15891 (macro_for_each_data::user_data): Delete field.
15892 (foreach_macro): Adjust to call the function_view.
15893 (macro_for_each): Adjust to use function_view as callback type.
15894 (foreach_macro_in_scope): Adjust to call the function_view.
15895 (macro_for_each_in_scope): Adjust to use function_view as callback
15896 type.
15897 * macrotab.h: Include "common/function-view.h".
15898 (macro_callback_fn): Declare a prototype instead of a pointer.
15899 Remove "user_data" parameter.
15900 (macro_for_each, macro_for_each_in_scope): Adjust to use
15901 function_view as callback type.
15902 * psymtab.c (partial_map_expand_apply)
15903 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
15904 Adjust to use function_view as callback type and to return bool.
15905 (psym_expand_symtabs_matching): Adjust to use function_view as
15906 callback types.
15907 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
15908 to use function_view as callback type and to return bool.
15909 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
15910 callback types.
15911 * symfile.c (expand_symtabs_matching): Adjust to use function_view
15912 as callback types.
15913 * symfile.h: Include "common/function-view.h".
15914 (expand_symtabs_file_matcher_ftype)
15915 (expand_symtabs_symbol_matcher_ftype)
15916 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
15917 return bool.
15918 (quick_symbol_functions::map_symtabs_matching_filename)
15919 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
15920 function_view as callback type and return bool.
15921 (expand_symtabs_matching): Adjust to use function_view as callback
15922 type.
15923 (maintenance_expand_name_matcher)
15924 (maintenance_expand_file_matcher): Delete.
15925 (maintenance_expand_symtabs): Use lambdas.
15926 * symtab.c (iterate_over_some_symtabs): Adjust to use
15927 function_view as callback types and return bool.
15928 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
15929 of a cleanup.
15930 (lookup_symtab_callback): Delete.
15931 (lookup_symtab): Use a lambda.
15932 (iterate_over_symbols): Adjust to use function_view as callback
15933 type.
15934 (struct search_symbols_data, search_symbols_file_matches)
15935 (search_symbols_name_matches): Delete.
15936 (search_symbols): Use a pair of lambdas.
15937 (struct add_name_data, add_macro_name, symbol_completion_matcher)
15938 (symtab_expansion_callback): Delete.
15939 (default_make_symbol_completion_list_break_on_1): Use lambdas.
15940 * symtab.h: Include "common/function-view.h".
15941 (iterate_over_some_symtabs): Adjust to use function_view as
15942 callback type and return bool.
15943 (iterate_over_symtabs): Adjust to use function_view as callback
15944 type.
15945 (symbol_found_callback_ftype): Remove 'data' parameter and return
15946 bool.
15947 (iterate_over_symbols): Adjust to use function_view as callback
15948 type.
15949
07e253aa
PA
159502017-02-23 Pedro Alves <palves@redhat.com>
15951
15952 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
15953 (%.o) <unittests/%.c>: New pattern.
15954 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
15955 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
15956 * common/function-view.h: New file.
15957 * unittests/function-view-selftests.c: New file.
15958 * configure: Regenerate.
15959
8eaf5320
SM
159602017-02-23 Simon Marchi <simon.marchi@ericsson.com>
15961
15962 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
15963 inferior_ptid.
15964 * go32-nat.c (go32_thread_alive): Likewise.
15965
38768751
YQ
159662017-02-23 Yao Qi <yao.qi@linaro.org>
15967
15968 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
15969 delete.
15970
0a8beaba
YQ
159712017-02-23 Yao Qi <yao.qi@linaro.org>
15972
15973 * varobj.c (varobj_clear_saved_item): Use delete instead of
15974 xfree.
15975 (update_dynamic_varobj_children): Likewise.
15976
58fdfd2c
JK
159772017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15978
15979 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
15980
1b90b139
SM
159812017-02-21 Simon Marchi <simon.marchi@ericsson.com>
15982
15983 * common/enum-flags.h (enum_flags::enum_flags): Initialize
15984 m_enum_value to 0 in default constructor.
15985
2039d74e
EBM
159862017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
15987
15988 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
15989 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
15990 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
15991 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
15992 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
15993 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
15994 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
15995 IS_STORE_CONDITIONAL_INSN.
15996
7814882a
JK
159972017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15998
15999 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
16000
0ae60b63
JK
160012017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16002
16003 * NEWS (Changes since GDB 7.12): Add DWARF-5.
16004
0224619f
JK
160052017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16006
16007 * dwarf2read.c (skip_one_die, read_attribute_value)
16008 (dwarf2_const_value_attr, dump_die_shallow)
16009 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
16010 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
16011
0af92d60
JK
160122017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16013
16014 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
16015 (dwarf_parse_macro_header): Accept DWARF version 5.
16016 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
16017
216f72a1
JK
160182017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16019
16020 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
16021 DW_AT_GNU_*.
16022 * common/common-exceptions.h (enum errors): Likewise.
16023 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
16024 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
16025 (dwarf_expr_context::execute_stack_op): Likewise.
16026 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
16027 Likewise.
16028 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
16029 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
16030 (show_entry_values_debug, call_site_to_target_addr)
16031 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
16032 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
16033 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
16034 (value_of_dwarf_block_entry, indirect_pieced_value)
16035 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
16036 (disassemble_dwarf_expression): Likewise.
16037 * dwarf2read.c (process_die, inherit_abstract_dies)
16038 (read_call_site_scope): Likewise.
16039 * gdbtypes.h (struct func_type, struct call_site_parameter)
16040 (struct call_site): Likewise.
16041 * stack.c (read_frame_arg): Likewise.
16042 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
16043
43988095
JK
160442017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16045
16046 * defs.h (read_unsigned_leb128): New declaration.
16047 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
16048 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
16049 (dwarf2_find_location_expression): Call also
16050 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
16051 * dwarf2loc.h (dwarf2_version): New declaration.
16052 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
16053 rnglists.
16054 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
16055 .debug_rnglists.
16056 (struct dwop_section_names): Add loclists_dwo.
16057 (dwop_section_names): Add .debug_loclists.dwo.
16058 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
16059 (struct dwarf2_per_cu_data): Add dwarf_version.
16060 (struct dwo_sections): Add loclists.
16061 (struct attr_abbrev): Add implicit_const.
16062 (read_indirect_line_string): New declaration.
16063 (read_unsigned_leb128): Delete declaration.
16064 (rcuh_kind): New definition.
16065 (read_and_check_comp_unit_head): Change parameter
16066 is_debug_types_section to section_kind.
16067 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
16068 (read_comp_unit_head): Change parameter abfd to section, add parameter
16069 section_kind. Handle DWARF-5.
16070 (error_check_comp_unit_head): Accept also DWARF version 5.
16071 (read_and_check_comp_unit_head): Change parameter
16072 is_debug_types_section to section_kind.
16073 (read_and_check_type_unit_head): Delete function.
16074 (read_abbrev_offset): Handle DWARF-5.
16075 (create_debug_type_hash_table): Add parameter section_kind. Process
16076 only DW_UT_type. Use signature and type_offset_in_tu from struct
16077 comp_unit_head.
16078 (create_debug_types_hash_table): Update create_debug_type_hash_table
16079 caller.
16080 (create_all_type_units): Call create_debug_type_hash_table.
16081 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
16082 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
16083 caller.
16084 (skip_one_die): Handle DW_FORM_implicit_const.
16085 (dwarf2_rnglists_process): New function.
16086 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
16087 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
16088 (read_attribute_value): Handle DW_FORM_implicit_const,
16089 DW_FORM_line_strp.
16090 (read_attribute): Handle DW_FORM_implicit_const.
16091 (read_indirect_string_at_offset_from): New function from
16092 read_indirect_string_at_offset.
16093 (read_indirect_string_at_offset): Call
16094 read_indirect_string_at_offset_from.
16095 (read_indirect_line_string_at_offset): New function.
16096 (read_indirect_string): New function comment.
16097 (read_indirect_line_string): New function.
16098 (read_unsigned_leb128): Make it global.
16099 (dwarf2_string_attr): Handle DWARF-5.
16100 (add_include_dir_stub, read_formatted_entries): New functions.
16101 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
16102 Handle DWARF-5.
16103 (per_cu_header_read_in): Update read_comp_unit_head caller.
16104 (dwarf2_version): New function.
16105 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
16106 rnglists.
16107 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
16108 fields.
16109
22d2f3ab
JK
161102017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16111
16112 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
16113
5f46c5a5
JK
161142017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16115
16116 * dwarf2read.c (dwarf2_ranges_process): New function from
16117 dwarf2_ranges_read.
16118 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
16119 dwarf2_ranges_process.
16120
78d4d2c5
JK
161212017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16122
16123 * dwarf2read.c (create_debug_type_hash_table): New function from
16124 create_debug_types_hash_table.
16125 (create_debug_types_hash_table): Call create_debug_type_hash_table.
16126 (create_all_type_units, open_and_init_dwo_file): Update
16127 create_debug_types_hash_table callers.
16128
1b076f25
SDJ
161292017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
16130
16131 PR gdb/16188
16132 * fork-child.c (trace_start_error): Fix thinko. va_end should
16133 refer to 'ap', not 'args'.
16134
0db8980c
SDJ
161352017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
16136 Pedro Alves <palves@redhat.com>
16137
16138 PR gdb/16188
16139 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
16140 calls succeeded.
16141 * fork-child.c (trace_start_error): New function.
16142 (trace_start_error_with_name): Likewise.
16143 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
16144 * inf-ptrace.c (inf_ptrace_me): Likewise.
16145 * inferior.h (trace_start_error): New prototype.
16146 (trace_start_error_with_name): Likewise.
16147
99e8a4f9
SDJ
161482017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
16149
16150 PR gdb/21164
16151 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
16152 NULL before using it.
16153 * symmisc.c (maintenance_print_symbols): Likewise.
16154 (maintenance_print_msymbols): Likewise.
16155
4e746bb6
TW
161562017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16157
16158 * NEWS: Add record Python bindings entry.
16159
161602017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16161
16162 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
16163 py-record-full.o.
16164 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
16165 * python/py-record-btrace.c, python/py-record-btrace.h,
16166 python/py-record-full.c, python/py-record-full.h: New file.
16167 * python/py-record.c: Add include for py-record-btrace.h and
16168 py-record-full.h.
16169 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
16170 recpy_instruction_history, recpy_function_call_history, recpy_begin,
16171 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
16172 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
16173 New definition.
16174 (gdbpy_initialize_btrace): New export.
16175 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
16176
161772017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16178
16179 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
16180 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
16181 * python/py-record.c: New file.
16182 * python/python-internal.h (gdbpy_start_recording,
16183 gdbpy_current_recording, gdpy_stop_recording,
16184 gdbpy_initialize_record): New export.
16185 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
16186 (python_GdbMethods): Add gdbpy_start_recording,
16187 gdbpy_current_recording and gdbpy_stop_recording.
16188
161892017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16190
16191 * record-btrace.c (record_btrace_record_method): New function.
16192 (init_record_btrace_ops): Initialize to_record_method.
16193 * record-full.c (record_full_record_method): New function.
16194 (init_record_full_ops, init_record_full_core_ops): Add
16195 record_full_record_method.
16196 * record.h (enum record_method): New enum.
16197 * target-debug.h (target_debug_print_enum_record_method: New define.
16198 * target-delegates.c: Regenerate.
16199 * target.c (target_record_method): New function.
16200 * target.h: Include record.h.
16201 (struct target_ops) <to_record_method>: New field.
16202 (target_record_method): New export.
16203
162042017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16205
16206 * record.h (record_start, record_stop): New export.
16207 * record.c (record_start, record_stop): New function.
16208
162092017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16210
16211 * btrace.c (btrace_fetch): Copy function call segments pointer
16212 into a vector.
16213 (btrace_clear): Clear the vector.
16214 (btrace_find_insn_by_number): Use binary search to find the correct
16215 function call segment.
16216 * btrace.h (brace_fun_p): New typedef.
16217 (struct btrace_thread_info) <functions>: New field.
16218
162192017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16220
16221 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
16222 * btrace.c (btrace_decode_error): ... here. New function.
16223 * btrace.h (btrace_decode_error): New export.
16224
162252017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16226
16227 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
16228 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
16229 btrace_find_insn_by_number): Remove special case for gaps.
16230 * btrace.h (btrace_insn_get_error): New export.
16231 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
16232 * record-btrace.c (btrace_insn_history): Print number for gaps.
16233 (record_btrace_info, record_btrace_goto): Handle gaps.
16234
3f77c769
TT
162352017-02-14 Tom Tromey <tom@tromey.com>
16236
16237 PR python/13598:
16238 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
16239 event.
16240 * python/py-evts.c (gdbpy_initialize_py_events): Add
16241 before_prompt registry.
16242 * python/py-events.h (events_object) <before_prompt>: New field.
16243
4c2c7ac6
MM
162442017-02-14 Markus Metzger <markus.t.metzger@intel.com>
16245
16246 * btrace.c (ftrace_new_switch): Preserve up link and flags.
16247
5cf30ebf
LM
162482017-02-13 Luis Machado <lgustavo@codesourcery.com>
16249
16250 * symfile (_initialize_symfile): Add usage text to the load command's
16251 help text.
16252
26a06916
SM
162532017-02-10 Simon Marchi <simon.marchi@ericsson.com>
16254
16255 * utils.c (defaulted_query): Don't query on secondary UIs.
16256
0b145e37
TT
162572017-02-10 Tom Tromey <tom@tromey.com>
16258
16259 * rust-lang.c (rust_get_disr_info): Remove unused variable.
16260
2d8365c4
TT
162612017-02-10 Tom Tromey <tom@tromey.com>
16262
16263 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
16264 "cleanup" local.
16265 * python/py-type.c (typy_legacy_template_argument): Remove
16266 unnecessary "cleanup" local.
16267
2bb8f231
TT
162682017-02-10 Tom Tromey <tom@tromey.com>
16269
16270 * python/python.c (do_start_initialization): New function, from
16271 _initialize_python.
16272 (_initialize_python): Call do_start_initialization.
16273 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
16274 goto.
16275
1bdfaf42
TT
162762017-02-10 Tom Tromey <tom@tromey.com>
16277
16278 * python/py-prettyprint.c (pretty_print_one_value): Use
16279 gdbpy_ref.
16280
88b6faea
TT
162812017-02-10 Tom Tromey <tom@tromey.com>
16282
16283 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
16284 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
16285 gdbpy_ref.
16286 * python/py-type.c (field_new): Use gdbpy_ref.
16287 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
16288 gdbpy_ref.
16289 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
16290 (py_free_pspace): Likewise.
16291 (pspace_to_pspace_object): Likewise.
16292 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
16293 (py_free_objfile): Likewise.
16294 (objfile_to_objfile_object): Likewise.
16295 * python/py-inferior.c (delete_thread_object): Use
16296 gdbpy_ref.
16297 (infpy_read_memory): Likewise.
16298 (py_free_inferior): Likewise.
16299 * python/py-evtregistry.c (create_eventregistry_object): Use
16300 gdbpy_ref.
16301 * python/py-event.c (create_event_object): Use gdbpy_ref.
16302
7780f186
TT
163032017-02-10 Tom Tromey <tom@tromey.com>
16304
16305 * python/py-ref.h (gdbpy_ref_policy): Now a template.
16306 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
16307 used.
16308 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
16309 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
16310 python/py-exitedevent.c, python/py-finishbreakpoint.c,
16311 python/py-framefilter.c, python/py-function.c,
16312 python/py-inferior.c, python/py-infevents.c,
16313 python/py-linetable.c, python/py-newobjfileevent.c,
16314 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
16315 python/py-signalevent.c, python/py-stopevent.c,
16316 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
16317 python/py-unwind.c, python/py-utils.c, python/py-value.c,
16318 python/py-varobj.c, python/py-xmethods.c, python/python.c,
16319 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
16320
d4b0bb18
TT
163212017-02-10 Tom Tromey <tom@tromey.com>
16322
16323 * ui-out.h (ui_out_emit_type): New class.
16324 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
16325 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
16326 and ui_out_emit_tuple.
16327 (enumerate_locals): Likewise.
16328 (py_mi_print_variables, py_print_locals, py_print_args): Use
16329 ui_out_emit_list.
16330 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
16331 ui_out_emit_list.
16332 * common/gdb_optional.h: New file.
16333
f67f945c
MG
163342017-02-10 Martin Galvan <martingalvan@sourceware.org>
16335
16336 * MAINTAINERS (Write After Approval): Update my e-mail address.
16337
18da0c51
MG
163382017-02-10 Martin Galvan <martingalvan@sourceware.org>
16339
16340 PR gdb/21122
16341 * breakpoint.c (_initialize_breakpoint): Update the help description
16342 of the 'commands' command to indicate that it takes a list argument.
16343
62c14536
SM
163442017-02-09 Simon Marchi <simon.marchi@ericsson.com>
16345
16346 * interps.c (current_interp_set_logging): Remove "return".
16347
ff6fa247
GB
163482017-02-09 Gary Benson <gbenson@redhat.com>
16349
16350 * symtab.c (add_symtab_completions): Prevent NULL pointer
16351 dereference.
16352
a474bd8e
PA
163532017-02-08 Pedro Alves <palves@redhat.com>
16354
16355 * interps.c (interp::interp): Remove reference to quiet_p.
16356 (interp_set): Make static. Remove dead "Switching to" output
16357 code.
16358 (interp_quiet_p, interp_set_quiet): Delete.
16359 (interpreter_exec_cmd): Don't set the interpreter quiet.
16360 * interps.h (interp_quiet_p): Make static.
16361 (class interp) <quiet_p>: Remove field
16362
3d7b173c
JG
163632017-02-08 Jerome Guitton <guitton@adacore.com>
16364
604c4576
JG
16365 * cli/cli-decode.c (find_command_name_length): Make it extern.
16366 * cli/cli-decode.h (find_command_name_length): Declare.
16367 * cli/cli-script.c (command_name_equals, line_first_arg):
16368 New functions.
16369 (process_next_line): Use cli-decode to parse command names.
16370 (build_command_line): Make args a constant pointer.
16371
163722017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 16373
3d7b173c
JG
16374 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
16375 Remove case-insensitive search.
16376
1291063d
JM
163772017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
16378
16379 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
16380 at the end of the line. Avoids an ARI warning.
16381
20b477a7
LM
163822017-02-06 Luis Machado <lgustavo@codesourcery.com>
16383
16384 * NEWS: Mention support for record/replay of Intel 64 rdrand and
16385 rdseed instructions.
16386 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
16387
3f7b46f2
IR
163882017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
16389
16390 PR tdep/20936
16391 Provide and use sparc32 and sparc64 target description XML files.
16392 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
16393 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
16394 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
16395 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
16396 * features/sparc/sparc32-solaris.xml: New file.
16397 * features/sparc/sparc64-solaris.xml: New file.
16398 * features/sparc/sparc32-solaris.c: Generated.
16399 * features/sparc/sparc64-solaris.c: Generated.
16400 * sparc-tdep.h: Account for differences in target descriptions.
16401 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
16402 (sparc32_register_type): Use target provided registers.
16403 (validate_tdesc_registers): New function.
16404 (sparc32_gdbarch_init): Use tdesc_has_registers.
16405 Set pseudoregister functions.
16406 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
16407 (sparc64_register_type): Use target provided registers.
16408 (sparc64_init_abi): Set pseudoregister functions.
16409
f0fd41c1
TT
164102017-02-03 Tom Tromey <tom@tromey.com>
16411
16412 PR rust/21097:
16413 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
16414 with a single member.
16415
d6f9b0fb
PA
164162017-02-03 Pedro Alves <palves@redhat.com>
16417
16418 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
16419 (cli_interp_base::~cli_interp_base): New.
16420 (cli_interp): New struct.
16421 (as_cli_interp): Cast the interp itself to cli_interp.
16422 (cli_interpreter_pre_command_loop): Rename to ...
16423 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
16424 parameter.
16425 (cli_interpreter_init): Rename to ...
16426 (cli_interp::init): ... this. Remove 'self' parameter. Use
16427 boolean. Make extern.
16428 (cli_interpreter_resume): Rename to ...
16429 (cli_interp::resume): ... this. Remove 'data' parameter. Make
16430 extern.
16431 (cli_interpreter_suspend): Rename to ...
16432 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
16433 extern.
16434 (cli_interpreter_exec): Rename to ...
16435 (cli_interp::exec): ... this. Remove 'data' parameter. Make
16436 extern.
16437 (cli_interpreter_supports_command_editing): Rename to ...
16438 (cli_interp_base::supports_command_editing): ... this. Remove
16439 'interp' parameter. Make extern.
16440 (cli_ui_out): Rename to ...
16441 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
16442 Make extern.
16443 (cli_set_logging): Rename to ...
16444 (cli_interp_base::set_logging): ... this. Remove 'interp'
16445 parameter. Make extern.
16446 (cli_interp_procs): Delete.
16447 (cli_interp_factory): Adjust to use "new".
16448 * cli/cli-interp.h: Include "interps.h".
16449 (struct cli_interp_base): New struct.
16450 * interps.c (struct interp): Delete. Fields moved to interps.h.
16451 (interp_new): Delete.
16452 (interp::interp, interp::~interp): New.
16453 (interp_set): Use bool, and return void. Assume the interpreter
16454 has suspend, init and resume methods, and that the all return
16455 void.
16456 (set_top_level_interpreter): interp_set returns void.
16457 (interp_ui_out): Adapt.
16458 (current_interp_set_logging): Adapt.
16459 (interp_data): Delete.
16460 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
16461 (interp_exec): Adapt.
16462 (top_level_interpreter_data): Delete.
16463 * interps.h (interp_init_ftype, interp_resume_ftype)
16464 (interp_suspend_ftype, interp_exec_ftype)
16465 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
16466 (class interp): New.
16467 (interp_new): Delete.
16468 (interp_set): Now returns void. Use bool.
16469 (interp_data, top_level_interpreter_data): Delete.
16470 * mi/mi-common.h: Include interps.h.
16471 (class mi_interp): Inherit from interp. Define a ctor. Declare
16472 init, resume, suspect, exec, interp_ui_out, set_logging and
16473 pre_command_loop methods.
16474 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
16475 (mi_interpreter_init): Rename to ...
16476 (mi_interp::init): ... this. Remove the 'interp' parameter, use
16477 bool, return void and make extern. Adjust.
16478 (mi_interpreter_resume): ... Rename to ...
16479 (mi_interp::resume): ... this. Remove the 'data' parameter,
16480 return void and make extern. Adjust.
16481 (mi_interpreter_suspend): ... Rename to ...
16482 (mi_interp::suspend): ... this. Remove the 'data' parameter,
16483 return void and make extern. Adjust.
16484 (mi_interpreter_exec): ... Rename to ...
16485 (mi_interp::exec): ... this. Remove the 'data' parameter and make
16486 extern. Adjust.
16487 (mi_interpreter_pre_command_loop): ... Rename to ...
16488 (mi_interp::pre_command_loop): ... this. Remove the 'self'
16489 parameter and make extern.
16490 (mi_on_normal_stop_1): Adjust.
16491 (mi_ui_out): Rename to ...
16492 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
16493 parameter and make extern. Adjust.
16494 (mi_set_logging): Rename to ...
16495 (mi_interp::set_logging): ... this. Remove the 'interp'
16496 parameter and make extern. Adjust.
16497 (mi_interp_procs): Delete.
16498 (mi_interp_factory): Adjust to use 'new'.
16499 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
16500 (mi_print_exception, mi_execute_command, mi_load_progress):
16501 Adjust.
16502 * tui/tui-interp.c (tui_interp): New class.
16503 (as_tui_interp): Return a tui_interp pointer.
16504 (tui_on_normal_stop, tui_on_signal_received)
16505 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
16506 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
16507 to use interp::interp_ui_out.
16508 (tui_init): Rename to ...
16509 (tui_interp::init): ... this. Remove the 'self' parameter, use
16510 bool, return void and make extern. Adjust.
16511 (tui_resume): Rename to ...
16512 (tui_interp::resume): ... this. Remove the 'data' parameter,
16513 return void and make extern. Adjust.
16514 (tui_suspend): Rename to ...
16515 (tui_interp::suspend): ... this. Remove the 'data' parameter,
16516 return void and make extern. Adjust.
16517 (tui_ui_out): Rename to ...
16518 (tui_interp::interp_ui_out): ... this. Remove the 'self'
16519 parameter, and make extern. Adjust.
16520 (tui_exec): Rename to ...
16521 (tui_interp::exec): ... this. Remove the 'data' parameter and
16522 make extern.
16523 (tui_interp_procs): Delete.
16524 (tui_interp_factory): Use "new".
16525
65c40c95
TT
165262017-02-02 Tom Tromey <tom@tromey.com>
16527
16528 * rust-exp.y (ends_raw_string, space_then_number)
16529 (rust_identifier_start_p): Return bool.
16530 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
16531 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
16532 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
16533 (rust_chartype_p): Return bool.
16534 (val_print_struct, rust_print_struct_def, rust_print_type):
16535 Update.
16536 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
16537 Return bool.
16538
b50f188d
TT
165392017-02-02 Tom Tromey <tom@tromey.com>
16540
16541 * rust-lang.c: Reindent.
16542
03c85b11
TT
165432017-02-02 Tom Tromey <tom@tromey.com>
16544
16545 * rust-lang.h (rust_crate_for_block): Update.
16546 * rust-lang.c (rust_crate_for_block): Return std::string.
16547 (rust_get_disr_info): Use std:;string, not
16548 gdb::unique_xmalloc_ptr.
16549 * rust-exp.y (crate_name): Update.
16550
9b6da501
PA
165512017-02-02 Pedro Alves <palves@redhat.com>
16552
16553 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
16554 field out of gdb_disassembler_test and make it static.
16555
ec4cb20b
PA
165562017-02-02 Pedro Alves <palves@redhat.com>
16557
16558 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
16559 mi1_interp and mi_interp fields.
16560
5be5dbf0
PA
165612017-02-02 Pedro Alves <palves@redhat.com>
16562
616268b6
PA
16563 * cli/cli-interp.c (struct saved_output_files, saved_output):
16564 Moved from cli/cli-logging.c.
16565 (cli_set_logging): New function.
16566 (cli_interp_procs): Install cli_set_logging.
16567 * cli/cli-interp.h (make_logging_output, cli_set_logging):
16568 Declare.
16569 * cli/cli-logging.c (struct saved_output_files, saved_output):
16570 Moved to cli/cli-interp.c.
16571 (pop_output_files): Don't save outputs here.
16572 (make_logging_output): New function.
16573 (handle_redirections): Don't build tee nor save previous outputs
16574 here.
16575 * interps.c (current_interp_set_logging): Change prototype.
16576 Assume there's always a set_logging_proc method installed.
16577 * interps.h (interp_set_logging_ftype): Change prototype.
16578 (current_interp_set_logging): Change prototype and adjust comment.
16579 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
16580 use make_logging_output.
16581 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
165822017-02-02 Pedro Alves <palves@redhat.com>
16583
5be5dbf0
PA
16584 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
16585 from ...
16586 (set_logging_overwrite): ... here.
16587 (logging_no_redirect_file): Delete.
16588 (set_logging_redirect): Don't handle redirection on the fly.
16589 Instead warn that "logging off" / "logging on" is necessary.
16590 (pop_output_files): Delete references to logging_no_redirect_file.
16591 (show_logging_command): Always speak in terms of what will happen
16592 once logging is reenabled.
16593
c99cc448
PA
165942017-02-02 Pedro Alves <palves@redhat.com>
16595
16596 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
16597
8b172ce7
PA
165982017-02-02 Pedro Alves <palves@redhat.com>
16599
16600 * disasm.c (gdb_pretty_print_insn): Rename to ...
16601 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
16602 Remove gdbarch parameter. Adapt to clear the object's buffers
16603 instead of allocating new buffers, and to print using the object's
16604 gdb_disassembler instead of calling gdb_print_insn.
16605 (dump_insns): Use gdb_pretty_print_disassembler.
16606 * disasm.h (gdb_pretty_print_insn): Delete declaration.
16607 (gdb_pretty_print_disassembler): New class.
16608 * record-btrace.c (btrace_insn_history): Use
16609 gdb_pretty_print_disassembler.
16610
d7e74731
PA
166112017-02-02 Pedro Alves <palves@redhat.com>
16612
16613 * ada-lang.c (type_as_string): Use string_file.
16614 * ada-valprint.c (ada_print_floating): Use string_file.
16615 * ada-varobj.c (ada_varobj_scalar_image)
16616 (ada_varobj_get_value_image): Use string_file.
16617 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
16618 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
16619 * breakpoint.c (update_inserted_breakpoint_locations)
16620 (insert_breakpoint_locations, reattach_breakpoints)
16621 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
16622 (print_it_watchpoint): Use string_file.
16623 (save_breakpoints): Use stdio_file.
16624 * c-exp.y (oper): Use string_file.
16625 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
16626 tee_file.
16627 (pop_output_files): Use delete.
16628 (handle_redirections): Use stdio_file and tee_file.
16629 * cli/cli-setshow.c (do_show_command): Use string_file.
16630 * compile/compile-c-support.c (c_compute_program): Use
16631 string_file.
16632 * compile/compile-c-symbols.c (generate_vla_size): Take a
16633 'string_file &' instead of a 'ui_file *'.
16634 (generate_c_for_for_one_variable): Take a 'string_file &' instead
16635 of a 'ui_file *'. Use string_file.
16636 (generate_c_for_variable_locations): Take a 'string_file &'
16637 instead of a 'ui_file *'.
16638 * compile/compile-internal.h (generate_c_for_for_one_variable):
16639 Take a 'string_file &' instead of a 'ui_file *'.
16640 * compile/compile-loc2c.c (push, pushf, unary, binary)
16641 (print_label, pushf_register_address, pushf_register)
16642 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
16643 'ui_file *'. Adjust.
16644 * compile/compile.c (compile_to_object): Use string_file.
16645 * compile/compile.h (compile_dwarf_expr_to_c)
16646 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
16647 'ui_file *'.
16648 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
16649 (replace_typedefs_qualified_name): Use string_file and
16650 obstack_copy0.
16651 * disasm.c (gdb_pretty_print_insn): Use string_file.
16652 (gdb_disassembly): Adjust reference the null_stream global.
16653 (do_ui_file_delete): Delete.
16654 (gdb_insn_length): Use null_stream.
16655 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
16656 * dwarf2loc.c (dwarf2_compile_property_to_c)
16657 (locexpr_generate_c_location, loclist_generate_c_location): Take a
16658 'string_file &' instead of a 'ui_file *'.
16659 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
16660 * dwarf2read.c (do_ui_file_peek_last): Delete.
16661 (dwarf2_compute_name): Use string_file.
16662 * event-top.c (gdb_setup_readline): Use stdio_file.
16663 * gdbarch.sh (verify_gdbarch): Use string_file.
16664 * gdbtypes.c (safe_parse_type): Use null_stream.
16665 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
16666 string_file.
16667 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
16668 'string_file *' instead of a 'ui_file *'.
16669 (gdbscm_arch_disassemble): Use string_file.
16670 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
16671 * guile/scm-ports.c (class ioscm_file_port): Now a class that
16672 inherits from ui_file.
16673 (ioscm_file_port_delete, ioscm_file_port_rewind)
16674 (ioscm_file_port_put): Delete.
16675 (ioscm_file_port_write): Rename to ...
16676 (ioscm_file_port::write): ... this. Remove file_port_magic
16677 checks.
16678 (ioscm_file_port_new): Delete.
16679 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
16680 ui_file_up.
16681 * guile/scm-type.c (tyscm_type_name): Use string_file.
16682 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
16683 Use string_file.
16684 * infcmd.c (print_return_value_1): Use string_file.
16685 * infrun.c (print_target_wait_results): Use string_file.
16686 * language.c (add_language): Use string_file.
16687 * location.c (explicit_to_string_internal): Use string_file.
16688 * main.c (captured_main_1): Use null_file.
16689 * maint.c (maintenance_print_architecture): Use stdio_file.
16690 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
16691 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
16692 event_channel>: Change type to mi_console_file pointer.
16693 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
16694 (mi_console_file_delete): Delete.
16695 (struct mi_console_file): Delete.
16696 (mi_console_file_magic): Delete.
16697 (mi_console_file_new): Delete.
16698 (mi_console_file::mi_console_file): New.
16699 (mi_console_file_delete): Delete.
16700 (mi_console_file_fputs): Delete.
16701 (mi_console_file::write): New.
16702 (mi_console_raw_packet): Delete.
16703 (mi_console_file::flush): New.
16704 (mi_console_file_flush): Delete.
16705 (mi_console_set_raw): Rename to ...
16706 (mi_console_file::set_raw): ... this.
16707 * mi/mi-console.h (class mi_console_file): New class.
16708 (mi_console_file_new, mi_console_set_raw): Delete.
16709 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
16710 (mi_set_logging): Use delete and tee_file. Adjust.
16711 * mi/mi-main.c (output_register): Use string_file.
16712 (mi_cmd_data_evaluate_expression): Use string_file.
16713 (mi_cmd_data_read_memory): Use string_file.
16714 (mi_cmd_execute, print_variable_or_computed): Use string_file.
16715 * mi/mi-out.c (mi_ui_out::main_stream): New.
16716 (mi_ui_out::rewind): Use main_stream and
16717 string_file.
16718 (mi_ui_out::put): Use main_stream and string_file.
16719 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16720 Allocate a 'string_file' instead.
16721 (mi_out_new): Don't allocate a mem_fileopen stream here.
16722 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16723 (mi_ui_out::main_stream): Declare method.
16724 * printcmd.c (eval_command): Use string_file.
16725 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
16726 * python/py-arch.c (archpy_disassemble): Use string_file.
16727 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
16728 * python/py-frame.c (frapy_str): Use string_file.
16729 * python/py-framefilter.c (py_print_type, py_print_single_arg):
16730 Use string_file.
16731 * python/py-type.c (typy_str): Use string_file.
16732 * python/py-unwind.c (unwind_infopy_str): Use string_file.
16733 * python/py-value.c (valpy_str): Use string_file.
16734 * record-btrace.c (btrace_insn_history): Use string_file.
16735 * regcache.c (regcache_print): Use stdio_file.
16736 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
16737 * remote.c (escape_buffer): Use string_file.
16738 * rust-lang.c (rust_get_disr_info): Use string_file.
16739 * serial.c (serial_open_ops_1): Use stdio_file.
16740 (do_serial_close): Use delete.
16741 * stack.c (print_frame_arg): Use string_file.
16742 (print_frame_args): Remove local mem_fileopen stream, not used.
16743 (print_frame): Use string_file.
16744 * symmisc.c (maintenance_print_symbols): Use stdio_file.
16745 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
16746 Take a 'string_file *' instead of a 'ui_file *'.
16747 * top.c (new_ui): Use stdio_file and stderr_file.
16748 (free_ui): Use delete.
16749 (execute_command_to_string): Use string_file.
16750 (quit_confirm): Use string_file.
16751 * tracepoint.c (collection_list::append_exp): Use string_file.
16752 * tui/tui-disasm.c (tui_disassemble): Use string_file.
16753 * tui/tui-file.c: Don't include "ui-file.h".
16754 (enum streamtype, struct tui_stream): Delete.
16755 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
16756 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
16757 (tui_file::tui_file): New method.
16758 (tui_file_fputs): Delete.
16759 (tui_file_get_strbuf): Delete.
16760 (tui_file::puts): New method.
16761 (tui_file_adjust_strbuf): Delete.
16762 (tui_file_flush): Delete.
16763 (tui_file::flush): New method.
16764 * tui/tui-file.h: Tweak intro comment.
16765 Include ui-file.h.
16766 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
16767 (tui_file_adjust_strbuf): Delete declarations.
16768 (class tui_file): New class.
16769 * tui/tui-io.c (tui_initialize_io): Use tui_file.
16770 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
16771 (tui_register_format): Use string_stream.
16772 * tui/tui-stack.c (tui_make_status_line): Use string_file.
16773 (tui_get_function_from_frame): Use string_file.
16774 * typeprint.c (type_to_string): Use string_file.
16775 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
16776 (null_stream): New global.
16777 (ui_file_delete): Delete.
16778 (ui_file::ui_file): New.
16779 (null_file_isatty): Delete.
16780 (ui_file::~ui_file): New.
16781 (null_file_rewind): Delete.
16782 (ui_file::printf): New.
16783 (null_file_put): Delete.
16784 (null_file_flush): Delete.
16785 (ui_file::putstr): New.
16786 (null_file_write): Delete.
16787 (ui_file::putstrn): New.
16788 (null_file_read): Delete.
16789 (ui_file::putc): New.
16790 (null_file_fputs): Delete.
16791 (null_file_write_async_safe): Delete.
16792 (ui_file::vprintf): New.
16793 (null_file_delete): Delete.
16794 (null_file::write): New.
16795 (null_file_fseek): Delete.
16796 (null_file::puts): New.
16797 (ui_file_data): Delete.
16798 (null_file::write_async_safe): New.
16799 (gdb_flush, ui_file_isatty): Adjust.
16800 (ui_file_put, ui_file_rewind): Delete.
16801 (ui_file_write): Adjust.
16802 (ui_file_write_for_put): Delete.
16803 (ui_file_write_async_safe, ui_file_read): Adjust.
16804 (ui_file_fseek): Delete.
16805 (fputs_unfiltered): Adjust.
16806 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
16807 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
16808 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
16809 (set_ui_file_data): Delete.
16810 (string_file::~string_file, string_file::write)
16811 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
16812 (do_ui_file_as_string, ui_file_as_string): Delete.
16813 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
16814 (struct mem_file): Delete.
16815 (mem_file_new): Delete.
16816 (stdio_file::stdio_file): New.
16817 (mem_file_delete): Delete.
16818 (stdio_file::stdio_file): New.
16819 (mem_fileopen): Delete.
16820 (stdio_file::~stdio_file): New.
16821 (mem_file_rewind): Delete.
16822 (stdio_file::set_stream): New.
16823 (mem_file_put): Delete.
16824 (stdio_file::open): New.
16825 (mem_file_write): Delete.
16826 (stdio_file_magic, struct stdio_file): Delete.
16827 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
16828 (stdio_file::flush): New.
16829 (stdio_file_read): Rename to ...
16830 (stdio_file::read): ... this. Adjust.
16831 (stdio_file_write): Rename to ...
16832 (stdio_file::write): ... this. Adjust.
16833 (stdio_file_write_async_safe): Rename to ...
16834 (stdio_file::write_async_safe) ... this. Adjust.
16835 (stdio_file_fputs): Rename to ...
16836 (stdio_file::puts) ... this. Adjust.
16837 (stdio_file_isatty): Delete.
16838 (stdio_file_fseek): Delete.
16839 (stdio_file::isatty): New.
16840 (stderr_file_write): Rename to ...
16841 (stderr_file::write) ... this. Adjust.
16842 (stderr_file_fputs): Rename to ...
16843 (stderr_file::puts) ... this. Adjust.
16844 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
16845 (stderr_file::stderr_file): New.
16846 (tee_file_magic): Delete.
16847 (struct tee_file): Delete.
16848 (tee_file::tee_file): New.
16849 (tee_file_new): Delete.
16850 (tee_file::~tee_file): New.
16851 (tee_file_delete): Delete.
16852 (tee_file_flush): Rename to ...
16853 (tee_file::flush): ... this. Adjust.
16854 (tee_file_write): Rename to ...
16855 (tee_file::write): ... this. Adjust.
16856 (tee_file::write_async_safe): New.
16857 (tee_file_fputs): Rename to ...
16858 (tee_file::puts): ... this. Adjust.
16859 (tee_file_isatty): Rename to ...
16860 (tee_file::isatty): ... this. Adjust.
16861 * ui-file.h (struct obstack, struct ui_file): Don't
16862 forward-declare.
16863 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
16864 (ui_file_write_ftype)
16865 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
16866 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
16867 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
16868 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
16869 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
16870 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
16871 (set_ui_file_fseek): Delete.
16872 (ui_file_data, ui_file_delete, ui_file_rewind)
16873 (struct ui_file): New.
16874 (ui_file_up): New.
16875 (class null_file): New.
16876 (null_stream): Declare.
16877 (ui_file_write_for_put, ui_file_put): Delete.
16878 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
16879 Delete.
16880 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
16881 (gdb_fopen, tee_file_new): Delete.
16882 (struct string_file): New.
16883 (struct stdio_file): New.
16884 (stdio_file_up): New.
16885 (struct stderr_file): New.
16886 (class tee_file): New.
16887 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
16888 of a 'ui_file *'. Adjust.
16889 * ui-out.h (class ui_out) <field_stream>: Likewise.
16890 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
16891 (null_stream): Delete.
16892 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
16893 Adjust.
16894 * utils.h (struct ui_file): Delete forward declaration..
16895 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
16896 (error_stream): Take a 'string_file &' instead of a
16897 'ui_file *'.
16898 * varobj.c (varobj_value_get_print_value): Use string_file.
16899 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
16900 * gdbarch.c: Regenerate.
16901
187808b0
PA
169022017-02-02 Pedro Alves <palves@redhat.com>
16903
16904 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
16905 (gdb_pretty_print_insn): ... this. Now a free function. Add back
16906 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
16907 Adjust to call gdb_print_insn instead of
16908 gdb_disassembler::print_insn.
16909 (dump_insns, do_mixed_source_and_assembly_deprecated)
16910 (do_mixed_source_and_assembly, do_assembly_only): Add back a
16911 'gdbarch' parameter. Remove gdb_disassembler parameter.
16912 (gdb_disassembly): Don't allocate a gdb_disassembler here.
16913 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
16914 declaration.
16915 (gdb_pretty_print_insn): Re-add declaration.
16916 * record-btrace.c (btrace_insn_history): Don't allocate a
16917 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
16918
7a8eb317
SM
169192017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
16920
16921 * disasm.h (gdb_disassembly): Remove file_string parameter.
16922 * disasm.c (gdb_disassembly): Likewise.
16923 * cli/cli-cmds.c (print_disassembly): Adapt.
16924 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
16925 * stack.c (do_gdb_disassembly): Likewise.
16926
7346ef59
AA
169272017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
16928
16929 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
16930 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
16931 targets. And if the implicit value is longer than needed, extract
16932 the first bytes instead of the "least significant" ones.
16933
cd4007e4
MM
169342017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16935
16936 * btrace.c (btrace_enable): Do not call btrace_add_pc for
16937 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
16938 (btrace_fetch): Assert can_access_registers_ptid.
16939 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
16940 validate_registers_access.
16941
cf77c34e
MM
169422017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16943
16944 * gdbthread.h (can_access_registers_ptid): New.
16945 * thread.c (can_access_registers_ptid): New.
16946
be85ce7d
PA
169472017-02-01 Pedro Alves <palves@redhat.com>
16948
16949 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
16950
29b0b251
PA
169512017-01-31 Pedro Alves <palves@redhat.com>
16952
16953 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
16954 Fix typos.
16955
289b5b24
PA
169562017-01-31 Pedro Alves <palves@redhat.com>
16957
16958 * stack.c (print_frame_args): Remove local mem_fileopen stream,
16959 not used.
16960
b47413b4
PA
169612017-01-31 Pedro Alves <palves@redhat.com>
16962
16963 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
16964
60adb36c
PA
169652017-01-31 Pedro Alves <palves@redhat.com>
16966
16967 * common/scoped_restore.h
16968 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
16969 change the value's parameter type to T2.
16970 (make_scoped_restore): Likewise.
16971
2735833d
WT
169722017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16973 Richard Henderson <rth@redhat.com>
16974
16975 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
16976 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
16977 GS_BASE for older kernels.
16978 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
16979 GS_BASE for older kernels.
16980 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
16981 and GS_BASE to the offset table.
16982 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
16983 system register group.
16984 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
16985 for older kernels.
16986 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
16987 amd64 ABI.
16988 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
16989 AMD64_GSBASE_REGNUM.
16990 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
16991 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
16992 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
16993 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
16994 i386/64bit-segments.xml in those rules.
16995 * features/i386/64bit-segments.xml: New file.
16996 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
16997 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
16998 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
16999 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
17000 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
17001 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
17002 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
17003 * features/i386/amd64-avx-linux.c: Regenerated.
17004 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
17005 * features/i386/amd64-avx-mpx.c: Regenerated.
17006 * features/i386/amd64-avx512-linux.c: Regenerated.
17007 * features/i386/amd64-linux.c: Regenerated.
17008 * features/i386/amd64-mpx-linux.c: Regenerated.
17009 * features/i386/i386-avx-mpx-linux.c: Regenerated.
17010 * features/i386/i386-avx-mpx.c: Regenerated.
17011 * features/i386/x32-avx-linux.c: Regenerated.
17012 * features/i386/x32-avx512-linux.c: Regenerated.
17013 * regformats/i386/amd64-avx-linux.dat: Regenerated.
17014 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
17015 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
17016 * regformats/i386/amd64-linux.dat: Regenerated.
17017 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
17018 * regformats/i386/x32-avx-linux.dat: Regenerated.
17019 * regformats/i386/x32-avx512-linux.dat: Regenerated.
17020 * regformats/i386/x32-linux.dat: Regenerated.
17021
8884e97e
WT
170222017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
17023
17024 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
17025 Set to AMD64_NUM_REGS.
17026
7005d26a
WT
170272017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
17028
17029 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
17030 that checks validity of a register number.
17031
4bd2e1b2
KC
170322017-01-27 Kees Cook <keescook@google.com>
17033
17034 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
17035 fetch_fpregs if target has fpa registers.
17036 (arm_linux_store_inferior_registers): Call store_fpregs if target
17037 has fpa registers.
17038
7cf1de6c
AA
170392017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
17040
17041 * cris-tdep.c (cris_gdbarch_init): Remove check for
17042 info.byte_order and force it to BFD_ENDIAN_LITTLE.
17043
874a1c8c
AT
170442017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
17045
17046 * corelow.c (get_core_register_section): Check for regset
17047 existence before checking for REGSET_VARIABLE_SIZE.
17048
d8b49cf0
YQ
170492017-01-26 Yao Qi <yao.qi@linaro.org>
17050 Pedro Alves <palves@redhat.com>
17051
17052 PR gdb/20939
17053 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
17054 call memory_error, save memaddr instead.
17055 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
17056 negative, cal memory_error.
17057 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
17058
658ca58c
YQ
170592017-01-26 Yao Qi <yao.qi@linaro.org>
17060
17061 * disasm-selftests.c (memory_error_test): New function.
17062 (_initialize_disasm_selftests): Register memory_error_test.
17063
79843d45
YQ
170642017-01-26 Yao Qi <yao.qi@linaro.org>
17065
17066 * Makefile.in (SFILES): Add disasm-selftests.c and
17067 selftest-arch.c.
17068 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
17069 * disasm-selftests.c: New file.
17070 * selftest-arch.c: New file.
17071 * selftest-arch.h: New file.
17072
8cafda32
YQ
170732017-01-26 Yao Qi <yao.qi@linaro.org>
17074
17075 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
17076 to bfd_arch_mep. Don't return 0 if section is not
17077 found. Call print_insn_mep.
17078
e47ad6c0
YQ
170792017-01-26 Pedro Alves <palves@redhat.com>
17080 Yao Qi <yao.qi@linaro.org>
17081
17082 * arm-tdep.c: Include "disasm.h".
17083 (gdb_print_insn_arm): Update code to get gdbarch.
17084 * disasm.c (dis_asm_read_memory): Change it to
17085 gdb_disassembler::dis_asm_read_memory.
17086 (dis_asm_memory_error): Likewise.
17087 (dis_asm_print_address): Likewise.
17088 (gdb_pretty_print_insn): Change it to
17089 gdb_disassembler::pretty_print_insn.
17090 (dump_insns): Add one argument gdb_disassemlber. All
17091 callers updated.
17092 (do_mixed_source_and_assembly_deprecated): Likewise.
17093 (do_mixed_source_and_assembly): Likewise.
17094 (do_assembly_only): Likewise.
17095 (gdb_disassembler::gdb_disassembler): New.
17096 (gdb_disassembler::print_insn): New.
17097 * disasm.h (class gdb_disassembler): New.
17098 (gdb_pretty_print_insn): Remove declaration.
17099 (gdb_disassemble_info): Likewise.
17100 * guile/scm-disasm.c (class gdbscm_disassembler): New.
17101 (gdbscm_disasm_read_memory_worker): Update.
17102 (gdbscm_disasm_read_memory): Update.
17103 (gdbscm_disasm_memory_error): Remove.
17104 (gdbscm_disasm_print_address): Remove.
17105 (gdbscm_disassembler::gdbscm_disassembler): New.
17106 (gdbscm_print_insn_from_port): Update.
17107 * mips-tdep.c: Include disasm.h.
17108 (gdb_print_insn_mips): Update code to get gdbarch.
17109 * record-btrace.c (btrace_insn_history): Update.
17110 * spu-tdep.c: Include disasm.h.
17111 (struct spu_dis_asm_data): Remove.
17112 (struct spu_dis_asm_info): New.
17113 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
17114 SPU id.
17115 (gdb_print_insn_spu): Cast disassemble_info to
17116 spu_dis_asm_info.
17117
80d75874
YQ
171182017-01-26 Yao Qi <yao.qi@linaro.org>
17119
17120 * disasm.c (do_ui_file_delete): Delete.
17121 (gdb_insn_length): Move code creating stream to ...
17122 * utils.c (null_stream): ... here. New function.
17123 * utils.h (null_stream): Declare.
17124
60685cd0
SM
171252017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
17126
17127 * python/py-inferior.c (find_thread_object): Return directly
17128 from the loop. Remove "found" variable.
17129
eb1cdb62
JB
171302017-01-21 Joel Brobecker <brobecker@adacore.com>
17131
17132 GDB 7.12.1 released.
17133
b1ce6568
SM
171342017-01-20 Simon Marchi <simon.marchi@ericsson.com>
17135
17136 * python/py-function.c (fnpy_call): Reorder declarations to have
17137 the gdbpy_enter object declared first.
17138 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
17139
6f8b0407
SM
171402017-01-20 Simon Marchi <simon.marchi@ericsson.com>
17141
fec93fb1 17142 PR python/21068
6f8b0407
SM
17143 * python/python-internal.h (PyMem_RawMalloc): Define for
17144 Python < 3.4.
17145 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
17146 PyMem_RawMalloc instead of PyMem_Malloc.
17147
78cbbba8
LM
171482017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
17149 Luis Machado <lgustavo@codesourcery.com>
17150
17151 * NEWS (New commands): Mention flash-erase.
17152 (New MI commands): Mention target-flash-erase.
17153 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
17154 command.
17155 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
17156 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
17157 * target.c (flash_erase_command): New function.
17158 (initialize_targets): Add new flash-erase command.
17159 * target.h (flash_erase_command): New declaration.
17160
2132fe85
JB
171612017-01-20 Joel Brobecker <brobecker@adacore.com>
17162
17163 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
17164 HAVE_SYS_PROCFS_H is defined.
17165
d1dff226
AH
171662017-01-18 Alan Hayward <alan.hayward@arm.com>
17167
17168 * remote.c (struct cached_reg): Change data into a pointer.
17169 * (stop_reply_dtr): Free data pointers before deleting vector.
17170 (process_stop_reply): Likewise.
17171 (remote_parse_stop_reply): Allocate space for data
17172
9890e433
AH
171732017-01-18 Alan Hayward <alan.hayward@arm.com>
17174
17175 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
17176 MAX_REGISTER_SIZE.
17177 (amd64_pseudo_register_read_value): Likewise.
17178 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
17179 (store_register_using_P): Likewise.
17180 * regcache.c (regcache_xfer_part): Likewise.
17181
7a36499a
IR
171822017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
17183
17184 Split real and pseudo registers.
17185 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
17186 (sparc32_pseudo_regnum): New enum.
17187 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
17188 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
17189 (SPARC32_CP0_REGISTERS): New macro.
17190 (sparc32_pseudo_register_name): New function.
17191 (sparc32_register_name): Use sparc32_pseudo_register_name.
17192 (sparc32_pseudo_register_type): New function.
17193 (sparc32_register_type): Use sparc32_pseudo_register_type.
17194 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
17195 pseudo register numbers.
17196 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
17197 (SPARC64_CP0_REGISTERS): New macro.
17198 (sparc64_pseudo_register_name): New function.
17199 (sparc64_register_name): Use sparc64_pseudo_register_name.
17200 (sparc64_pseudo_register_type): New function.
17201 (sparc64_register_type): Use sparc64_pseudo_register_type.
17202 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
17203 pseudo register numbers.
17204 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
17205 sparc64_store_arguments): Handle pseudo register numbers.
17206
6f8976bf
YQ
172072017-01-13 Yao Qi <yao.qi@linaro.org>
17208
17209 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
17210 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
17211 output.
17212 (getpkt_or_notif_sane_1): Likewise.
17213
e4241ace
YQ
172142017-01-13 Yao Qi <yao.qi@linaro.org>
17215
17216 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
17217 of CC. Pass "-x c++-header" instead of "-x c".
17218
3015c064
SM
172192017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17220
17221 * remote.c (remote_can_async_p): Update comment.
17222
fde1b17d
SM
172232017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17224
17225 * linux-nat.c (linux_nat_can_async_p): Update comment.
17226
ca1ca08b
SM
172272017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17228
17229 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
17230
4ad2da73
SM
172312017-01-11 Simon Marchi <simon.marchi@ericsson.com>
17232
17233 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
17234
c8b23b3f
TT
172352017-01-10 Tom Tromey <tom@tromey.com>
17236
17237 * python/py-type.c (typy_legacy_template_argument): Update.
17238 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
17239 ~demangle_parse_info): Declare new members.
17240 (cp_demangled_name_to_comp): Return unique_ptr.
17241 (cp_demangled_name_parse_free)
17242 (make_cleanup_cp_demangled_name_parse_free)
17243 (cp_new_demangle_parse_info): Remove.
17244 * cp-support.c (do_demangled_name_parse_free_cleanup)
17245 (make_cleanup_cp_demangled_name_parse_free): Remove.
17246 (inspect_type, cp_canonicalize_string_full)
17247 (cp_canonicalize_string): Update.
17248 (mangled_name_to_comp): Change return type.
17249 (cp_class_name_from_physname, method_name_from_physname)
17250 (cp_func_name, cp_remove_params): Update.
17251 * cp-name-parser.y (demangle_parse_info): New constructor, from
17252 cp_new_demangle_parse_info.
17253 (~demangle_parse_info): New destructor, from
17254 cp_demangled_name_parse_free.
17255 (cp_merge_demangle_parse_infos): Update.
17256 (cp_demangled_name_to_comp): Change return type.
17257
1ac32117
TT
172582017-01-10 Tom Tromey <tom@tromey.com>
17259
17260 * top.c (prevent_dont_repeat): Change return type.
17261 * python/python.c (execute_gdb_command): Use std::string.
17262 Update.
17263 * guile/guile.c (gdbscm_execute_gdb_command): Update.
17264 * command.h (prevent_dont_repeat): Change return type.
17265 * breakpoint.c (bpstat_do_actions_1): Update.
17266
0cf08227
TT
172672017-01-10 Tom Tromey <tom@tromey.com>
17268
17269 * value.h (scoped_value_mark::~scoped_value_mark): Call
17270 free_to_mark.
17271 (scoped_value_mark::free_to_mark): New method.
17272 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
17273 scoped_value_mark.
17274
eb115069
TT
172752017-01-10 Tom Tromey <tom@tromey.com>
17276
17277 * python/py-value.c (valpy_dereference, valpy_referenced_value)
17278 (valpy_reference_value, valpy_const_value, valpy_get_address)
17279 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
17280 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
17281 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
17282 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
17283 scoped_value_mark.
17284 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
17285 * value.h (scoped_value_mark): New class.
17286
906768f9
TT
172872017-01-10 Tom Tromey <tom@tromey.com>
17288
17289 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
17290 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
17291 * psymtab.c (discard_psymtabs_upto): Remove.
17292 (make_cleanup_discard_psymtabs): Remove.
17293 (struct psymtab_state): Remove.
17294
bef155c3
TT
172952017-01-10 Tom Tromey <tom@tromey.com>
17296
17297 * record-full.c (record_full_save_cleanups): Remove.
17298 (record_full_save): Use gdb::unlinker.
17299 * gcore.c (do_bfd_delete_cleanup): Remove.
17300 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
17301 cleanups.
17302 * dwarf2read.c (unlink_if_set): Remove.
17303 (write_psymtabs_to_index): Use gdb::unlinker.
17304 * common/gdb_unlinker.h: New file.
17305
192b62ce
TT
173062017-01-10 Tom Tromey <tom@tromey.com>
17307
17308 * windows-tdep.c (windows_xfer_shared_library): Update.
17309 * windows-nat.c (windows_make_so): Update.
17310 * utils.h (make_cleanup_bfd_unref): Remove.
17311 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
17312 * symfile.h (symfile_bfd_open)
17313 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
17314 * symfile.c (read_symbols, symbol_file_add)
17315 (separate_debug_file_exists): Update.
17316 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
17317 (generic_load, reread_symbols): Update.
17318 * symfile-mem.c (symbol_file_add_from_memory): Update.
17319 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
17320 (spu_symbol_file_add_from_memory): Update.
17321 * solist.h (struct target_so_ops) <bfd_open>: Return
17322 gdb_bfd_ref_ptr.
17323 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
17324 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
17325 gdb_bfd_ref_ptr.
17326 (solib_map_sections, reload_shared_libraries_1): Update.
17327 * solib-svr4.c (enable_break): Update.
17328 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
17329 * solib-frv.c (enable_break2): Update.
17330 * solib-dsbt.c (enable_break): Update.
17331 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
17332 gdb_bfd_ref_ptr.
17333 (darwin_solib_get_all_image_info_addr_at_init): Update.
17334 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
17335 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
17336 * record-full.c (record_full_save): Update.
17337 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
17338 * procfs.c (insert_dbx_link_bpt_in_file): Update.
17339 * minidebug.c (find_separate_debug_file_in_section): Return
17340 gdb_bfd_ref_ptr.
17341 * machoread.c (macho_add_oso_symfile): Change abfd to
17342 gdb_bfd_ref_ptr.
17343 (macho_symfile_read_all_oso): Update.
17344 (macho_check_dsym): Return gdb_bfd_ref_ptr.
17345 (macho_symfile_read): Update.
17346 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
17347 (jit_bfd_try_read_symtab): Update.
17348 * gdb_bfd.h (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 (gdb_bfd_ref_policy): New struct.
17353 (gdb_bfd_ref_ptr): New typedef.
17354 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17355 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17356 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17357 gdb_bfd_ref_ptr.
17358 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17359 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17360 (gcore_command): Update.
17361 * exec.c (exec_file_attach): Update.
17362 * elfread.c (elf_symfile_read): Update.
17363 * dwarf2read.c (dwarf2_get_dwz_file): Update.
17364 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
17365 (open_and_init_dwo_file): Update.
17366 (open_dwp_file): Return gdb_bfd_ref_ptr.
17367 (open_and_init_dwp_file): Update.
17368 * corelow.c (core_open): Update.
17369 * compile/compile-object-load.c (compile_object_load): Update.
17370 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
17371 * coffread.c (coff_symfile_read): Update.
17372 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
17373 gdb_bfd_ref_ptr. Rename.
17374 (dump_bfd_file, restore_command): Update.
17375 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17376 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17377 (find_separate_debug_file_by_buildid): Update.
17378
50315b21
TT
173792017-01-10 Tom Tromey <tom@tromey.com>
17380
17381 * common/gdb_ref_ptr.h: New file.
17382 * python/py-ref.h (struct gdbpy_ref_policy): New.
17383 (gdbpy_ref): Now a typedef.
17384
fc4007c9
TT
173852017-01-10 Tom Tromey <tom@tromey.com>
17386
17387 * utils.h (make_cleanup_htab_delete): Don't declare.
17388 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
17389 Remove.
17390 * linespec.c (decode_compound_collector): Add constructor,
17391 destructor.
17392 (lookup_prefix_sym): Remove cleanup.
17393 (symtab_collector): Add constructor, destructor.
17394 (collect_symtabs_from_filename): Remove cleanup.
17395 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
17396 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
17397 Use htab_up.
17398 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
17399 * dwarf2read.c (dw2_expand_symtabs_matching)
17400 (dw2_map_symbol_filenames, dwarf_decode_macros)
17401 (write_psymtabs_to_index): Use htab_up.
17402 * dwarf2loc.c (func_verify_no_selftailcall)
17403 (call_site_find_chain_1, func_verify_no_selftailcall)
17404 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
17405 std::vector, gdb::unique_xmalloc_ptr.
17406 (call_sitep): Remove typedef.
17407 (dwarf2_locexpr_baton_eval): Remove unused variable.
17408
8dbcee67
TT
174092017-01-10 Tom Tromey <tom@tromey.com>
17410
17411 * python/python-internal.h (make_cleanup_py_decref)
17412 (make_cleanup_py_xdecref): Don't declare.
17413 * python/py-utils.c (py_decref, make_cleanup_py_decref)
17414 (py_xdecref, make_cleanup_py_xdecref): Remove.
17415
13df46cc
TT
174162017-01-10 Tom Tromey <tom@tromey.com>
17417
17418 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
17419 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
17420
06fc9bf7
TT
174212017-01-10 Tom Tromey <tom@tromey.com>
17422
17423 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
17424
830a4934
TT
174252017-01-10 Tom Tromey <tom@tromey.com>
17426
17427 * python/py-utils.c (unicode_to_encoded_string)
17428 (python_string_to_target_string)
17429 (python_string_to_target_python_string)
17430 (python_string_to_host_string, gdbpy_obj_to_string)
17431 (get_addr_from_python): Use gdbpy_ref.
17432
4586d543
TT
174332017-01-10 Tom Tromey <tom@tromey.com>
17434
17435 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
17436 gdbpy_ref.
17437
59876f8f
TT
174382017-01-10 Tom Tromey <tom@tromey.com>
17439
17440 * python/python.c (eval_python_command, gdbpy_decode_line)
17441 (gdbpy_run_events, gdbpy_start_type_printers)
17442 (gdbpy_apply_type_printers): Use gdbpy_ref.
17443
97d83487
TT
174442017-01-10 Tom Tromey <tom@tromey.com>
17445
17446 * python/py-param.c (get_doc_string, compute_enum_values): Use
17447 gdbpy_ref.
17448
9205649a
TT
174492017-01-10 Tom Tromey <tom@tromey.com>
17450
17451 * python/py-inferior.c (find_thread_object, build_inferior_list):
17452 Use gdbpy_ref.
17453
74c49d45
TT
174542017-01-10 Tom Tromey <tom@tromey.com>
17455
17456 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17457
16361ffb
TT
174582017-01-10 Tom Tromey <tom@tromey.com>
17459
17460 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
17461 gdbpy_ref.
17462
905f2cca
TT
174632017-01-10 Tom Tromey <tom@tromey.com>
17464
17465 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
17466 extra incref.
17467 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
17468 Use gdbpy_ref.
17469
64081434
TT
174702017-01-10 Tom Tromey <tom@tromey.com>
17471
17472 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17473 gdbpy_ref.
17474
59e9e831
TT
174752017-01-10 Tom Tromey <tom@tromey.com>
17476
17477 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
17478 decref results of PyArg_ParseTupleAndKeywords.
17479
9de10f6d
TT
174802017-01-10 Tom Tromey <tom@tromey.com>
17481
17482 * python/python.c (python_run_simple_file): Use
17483 unique_xmalloc_ptr, gdbpy_ref.
17484
2bd5759d
TT
174852017-01-10 Tom Tromey <tom@tromey.com>
17486
17487 * python/py-prettyprint.c (print_stack_unless_memory_error)
17488 (print_string_repr, print_children): Use gdbpy_ref.
17489 (dummy_python_frame): New class.
17490 (dummy_python_frame::dummy_python_frame): Rename from
17491 push_dummy_python_frame.
17492 (py_restore_tstate): Remove.
17493
3b4e0e01
TT
174942017-01-10 Tom Tromey <tom@tromey.com>
17495
17496 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17497
17a22718
TT
174982017-01-10 Tom Tromey <tom@tromey.com>
17499
17500 * python/python.c (ensure_python_env, restore_python_env):
17501 Remove.
17502 * python/python-internal.h (ensure_python_env): Don't declare.
17503 * varobj.h (varobj_ensure_python_env): Don't declare.
17504 * varobj.c (varobj_ensure_python_env): Remove.
17505
68cdc557
TT
175062017-01-10 Tom Tromey <tom@tromey.com>
17507
17508 * varobj.c (varobj_value_get_print_value): Use
17509 gdbpy_enter_varobj.
17510
1eba6383
TT
175112017-01-10 Tom Tromey <tom@tromey.com>
17512
17513 * python/py-prettyprint.c (print_string_repr, print_children):
17514 Update.
17515 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
17516 of "encoding".
17517 * varobj.c (varobj_value_get_print_value): Update.
17518 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
17519
bde7b3e3
TT
175202017-01-10 Tom Tromey <tom@tromey.com>
17521
17522 * varobj.c (varobj_get_display_hint)
17523 (dynamic_varobj_has_child_method, install_new_value_visualizer)
17524 (varobj_set_visualizer, free_variable): Use
17525 gdbpy_enter_varobj.
17526
a7785f8c
TT
175272017-01-10 Tom Tromey <tom@tromey.com>
17528
17529 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
17530 (do_finish_initialization): New function. Use gdbpy_ref.
17531 (gdbpy_finish_initialization): Use gdbpy_enter. Call
17532 do_finish_initialization.
17533
2865bfce
TT
175342017-01-10 Tom Tromey <tom@tromey.com>
17535
17536 * python/py-param.c (get_set_value, get_show_value): Use
17537 gdbpy_enter, gdbpy_ref.
17538
0e9dcc75
TT
175392017-01-10 Tom Tromey <tom@tromey.com>
17540
17541 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
17542
12a5cedd
TT
175432017-01-10 Tom Tromey <tom@tromey.com>
17544
17545 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
17546
788f2586
TT
175472017-01-10 Tom Tromey <tom@tromey.com>
17548
17549 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
17550 Use gdbpy_enter_varobj.
17551
6cd67bea
TT
175522017-01-10 Tom Tromey <tom@tromey.com>
17553
17554 * varobj.c (gdbpy_enter_varobj): New constructor.
17555 * python/python-internal.h (gdbpy_enter_varobj): New class.
17556 * python/py-varobj.c (py_varobj_get_iterator): Use
17557 gdbpy_enter_varobj.
17558
14b122bf
TT
175592017-01-10 Tom Tromey <tom@tromey.com>
17560
17561 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
17562 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17563 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
17564 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
17565 unique_xmalloc_ptr.
17566 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
17567
bf1ca3b9
TT
175682017-01-10 Tom Tromey <tom@tromey.com>
17569
17570 * python/py-xmethods.c (invoke_match_method): Use
17571 gdbpy_ref.
17572
572a5524
TT
175732017-01-10 Tom Tromey <tom@tromey.com>
17574
17575 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
17576 gdbpy_enter, gdbpy_ref.
17577
396a78b6
TT
175782017-01-10 Tom Tromey <tom@tromey.com>
17579
17580 * python/python.c (python_interactive_command): Use gdbpy_enter.
17581
a88b13c7
TT
175822017-01-10 Tom Tromey <tom@tromey.com>
17583
17584 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
17585 gdbpy_ref.
17586
e9f0c363
TT
175872017-01-10 Tom Tromey <tom@tromey.com>
17588
17589 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
17590 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17591
6349f452
TT
175922017-01-10 Tom Tromey <tom@tromey.com>
17593
17594 * utils.h (htab_deleter): New struct.
17595 (htab_up): New typedef.
17596 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
17597 gdbpy_enter, gdbpy_ref, htab_up.
17598
c0171de6
TT
175992017-01-10 Tom Tromey <tom@tromey.com>
17600
17601 * python/py-unwind.c (pending_frame_invalidate): Remove.
17602 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
17603
f18e226f
TT
176042017-01-10 Tom Tromey <tom@tromey.com>
17605
17606 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
17607 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
17608
c57af3f1
TT
176092017-01-10 Tom Tromey <tom@tromey.com>
17610
17611 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
17612
60e600ec
TT
176132017-01-10 Tom Tromey <tom@tromey.com>
17614
17615 * python/python.c (gdbpy_eval_from_control_command)
17616 (gdbpy_source_script, gdbpy_run_events)
17617 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
17618 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
17619 gdbpy_enter.
17620
bf7da5b0
TT
176212017-01-10 Tom Tromey <tom@tromey.com>
17622
17623 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
17624
2d38bced
TT
176252017-01-10 Tom Tromey <tom@tromey.com>
17626
17627 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
17628
07bc7329
TT
176292017-01-10 Tom Tromey <tom@tromey.com>
17630
17631 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
17632 (python_on_inferior_call_pre, python_on_inferior_call_post)
17633 (python_on_memory_change, python_on_register_change)
17634 (python_inferior_exit, python_new_objfile, add_thread_object)
17635 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
17636
6e7c365e
TT
176372017-01-10 Tom Tromey <tom@tromey.com>
17638
17639 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
17640 (bpfinishpy_handle_exit): Use gdbpy_enter.
17641
6ba0cd40
TT
176422017-01-10 Tom Tromey <tom@tromey.com>
17643
17644 * python/py-cmd.c (cmdpy_destroyer)
17645 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
17646 gdbpy_enter.
17647
de2dc875
TT
176482017-01-10 Tom Tromey <tom@tromey.com>
17649
17650 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17651 gdbpy_enter.
17652 (gdbpy_breakpoint_has_cond): Likewise.
17653
4ecee2c4
TT
176542017-01-10 Tom Tromey <tom@tromey.com>
17655
17656 * python/python.c (gdbpy_enter): New constructor.
17657 (~gdbpy_enter): New destructor.
17658 (restore_python_env, ensure_python_env): Rewrite.
17659 * python/python-internal.h (gdbpy_enter): New class.
17660
37fce74f
TT
176612017-01-10 Tom Tromey <tom@tromey.com>
17662
17663 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
17664
53a0cca3
TT
176652017-01-10 Tom Tromey <tom@tromey.com>
17666
17667 * python/py-value.c (value_has_field, get_field_flag)
17668 (get_field_type, valpy_getitem, convert_value_from_python): Use
17669 gdbpy_ref.
17670
ff3724f5
TT
176712017-01-10 Tom Tromey <tom@tromey.com>
17672
17673 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
17674 gdbpy_ref.
17675
0700aea5
TT
176762017-01-10 Tom Tromey <tom@tromey.com>
17677
17678 * python/py-prettyprint.c (search_pp_list)
17679 (find_pretty_printer_from_objfiles)
17680 (find_pretty_printer_from_progspace)
17681 (find_pretty_printer_from_gdb, find_pretty_printer)
17682 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
17683 gdbpy_ref.
17684
1bb44c9f
TT
176852017-01-10 Tom Tromey <tom@tromey.com>
17686
17687 * python/py-param.c (call_doc_function): Use gdbpy_ref.
17688
87ce03fd
TT
176892017-01-10 Tom Tromey <tom@tromey.com>
17690
17691 * python/py-linetable.c (build_line_table_tuple_from_pcs)
17692 (ltpy_get_all_source_lines): Use gdbpy_ref.
17693
ee0a3fb8
TT
176942017-01-10 Tom Tromey <tom@tromey.com>
17695
17696 * python/py-framefilter.c (extract_sym, extract_value)
17697 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
17698 gdbpy_ref.
17699
bf2a52fa
TT
177002017-01-10 Tom Tromey <tom@tromey.com>
17701
17702 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
17703
f59fe7f8
TT
177042017-01-10 Tom Tromey <tom@tromey.com>
17705
17706 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
17707
80bd970a
TT
177082017-01-10 Tom Tromey <tom@tromey.com>
17709
17710 * python/py-function.c (convert_values_to_python, fnpy_init): Use
17711 gdbpy_ref.
17712
d1b3de2e
TT
177132017-01-10 Tom Tromey <tom@tromey.com>
17714
17715 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
17716
3bb43384
TT
177172017-01-10 Tom Tromey <tom@tromey.com>
17718
17719 * python/py-type.c (convert_field, make_fielditem, typy_fields)
17720 (typy_range): Use gdbpy_ref.
17721
abf5651e
TT
177222017-01-10 Tom Tromey <tom@tromey.com>
17723
17724 * python/py-threadevent.c (create_thread_event_object): Use
17725 gdbpy_ref.
17726 * python/py-stopevent.c (create_stop_event_object): Simplify.
17727 (emit_stop_event): Use gdbpy_ref.
17728 * python/py-signalevent.c (create_signal_event_object): Use
17729 gdbpy_ref.
17730 * python/py-newobjfileevent.c (create_new_objfile_event_object)
17731 (emit_new_objfile_event, create_clear_objfiles_event_object)
17732 (emit_clear_objfiles_event): Use gdbpy_ref.
17733 * python/py-infevents.c (create_inferior_call_event_object)
17734 (create_register_changed_event_object)
17735 (create_memory_changed_event_object, emit_inferior_call_event)
17736 (emit_memory_changed_event, emit_register_changed_event): Use
17737 gdbpy_ref.
17738 * python/py-exitedevent.c (create_exited_event_object)
17739 (emit_exited_event): Use gdbpy_ref.
17740 * python/py-event.h (evpy_emit_event): Remove
17741 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
17742 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
17743 * python/py-continueevent.c (emit_continue_event): Use
17744 gdbpy_ref.
17745 * python/py-breakpoint.c (gdbpy_breakpoint_created)
17746 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
17747 gdbpy_ref.
17748 * python/py-bpevent.c (create_breakpoint_event_object): Use
17749 gdbpy_ref.
17750
a68ff33e
TT
177512017-01-10 Tom Tromey <tom@tromey.com>
17752
17753 * python/py-ref.h: New file.
17754
7becfd03
SM
177552017-01-10 Simon Marchi <simon.marchi@ericsson.com>
17756
17757 * cli-out.c (cli_ui_out::do_redirect): Change return type to
17758 void.
17759 * cli-out.h (cli_ui_out::do_redirect): Likewise.
17760 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
17761 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
17762 * ui-out.c (ui_out::redirect): Likewise.
17763 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
17764 * cli/cli-logging.c (set_logging_redirect): Update call site of
17765 ui_out::redirect.
17766 (handle_redirections): Likewise.
17767 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
17768 * top.c (execute_command_to_string): Likewise.
17769 * utils.c (do_ui_out_redirect_pop): Likewise.
17770
df294654
SM
177712017-01-10 Simon Marchi <simon.marchi@ericsson.com>
17772
17773 * stack.c (_initialize_stack): Update "frame" command help message.
17774
f5e6296e
IB
177752017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
17776
17777 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
17778
0e2d6fa6
YQ
177792017-01-06 Yao Qi <yao.qi@linaro.org>
17780
17781 * x86-linux-nat.h: Include gdb_proc_service.h.
17782
44d6d3f9
YQ
177832017-01-06 Yao Qi <yao.qi@linaro.org>
17784
17785 * ser-base.h: Include serial.h.
17786
656731fe
YQ
177872017-01-06 Yao Qi <yao.qi@linaro.org>
17788
17789 * ppc-linux-tdep.h: Include ppc-tdep.h.
17790
1ca8f924
YQ
177912017-01-06 Yao Qi <yao.qi@linaro.org>
17792
17793 * nat/amd64-linux-siginfo.h: Include signal.h.
17794
bc3008c4
YQ
177952017-01-06 Yao Qi <yao.qi@linaro.org>
17796
17797 * nat/aarch64-linux-hw-point.h: Include break-common.h.
17798
66c80d03
YQ
177992017-01-06 Yao Qi <yao.qi@linaro.org>
17800
17801 * mi/mi-parse.h: Include mi-cmds.h.
17802
051d2dda
YQ
178032017-01-06 Yao Qi <yao.qi@linaro.org>
17804
17805 * inf-loop.c: Don't include "target.h".
17806 * inf-loop.h: Include it here.
17807
8018d34f
YQ
178082017-01-06 Yao Qi <yao.qi@linaro.org>
17809
17810 * dfp.h: Include "dboulest.h" and "expression.h".
17811
c0b8369c
YQ
178122017-01-06 Yao Qi <yao.qi@linaro.org>
17813
17814 * ax-gdb.h: Include "ax.h".
17815
ad5cba2a
YQ
178162017-01-06 Yao Qi <yao.qi@linaro.org>
17817
17818 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
17819 with nat/gdb_ptrace.h.
17820
1c33cd7f
YQ
178212017-01-05 Yao Qi <yao.qi@linaro.org>
17822
17823 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
17824 new line.
17825 (mips64_fbsd_sigframe_init): Likewise.
17826
c988ac1d
JB
178272017-01-04 John Baldwin <jhb@FreeBSD.org>
17828
17829 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
17830 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
17831
b268007c
JB
178322017-01-04 John Baldwin <jhb@FreeBSD.org>
17833
17834 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
17835 * NEWS: Mention new FreeBSD/mips native configuration.
17836 * config/mips/fbsd.mh: New file.
17837 * configure.host: Add mips*-*-freebsd*.
17838 * mips-fbsd-nat.c: New file.
17839
387360da
JB
178402017-01-04 John Baldwin <jhb@FreeBSD.org>
17841
17842 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
17843 (ALLDEPFILES): Add mips-fbsd-tdep.c.
17844 * NEWS: Mention new FreeBSD/mips target.
17845 * configure.tgt: Add mips*-*-freebsd*.
17846 * mips-fbsd-tdep.c: New file.
17847 * mips-fbsd-tdep.h: New file.
17848
2aaaf250
YQ
178492017-01-04 Yao Qi <yao.qi@linaro.org>
17850
17851 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
17852 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
17853
61baf725
JB
178542017-01-01 Joel Brobecker <brobecker@adacore.com>
17855
6dbb839a 17856 Update copyright year range in all GDB files.
61baf725 17857
c113e7ff 178582017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 17859
c113e7ff 17860 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 17861
c113e7ff 17862For older changes see ChangeLog-2016.
c906108c
SS
17863\f
17864Local Variables:
17865mode: change-log
17866left-margin: 8
17867fill-column: 74
17868version-control: never
57da7796 17869coding: utf-8
c906108c 17870End: