]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/ChangeLog
Adjust breakpoint address by clearing non-significant bits
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
a0de8c21
YQ
12017-12-08 Yao Qi <yao.qi@linaro.org>
2
3 * breakpoint.c (adjust_breakpoint_address): Call
4 address_significant.
5
a738ea1d
YQ
62017-12-08 Yao Qi <yao.qi@linaro.org>
7
8 * aarch64-tdep.c (aarch64_gdbarch_init): Install gdbarch
9 significant_addr_bit.
10 * gdbarch.sh (significant_addr_bit): New.
11 * gdbarch.c, gdbarch.h: Re-generated.
12 * target.c (memory_xfer_partial): Call address_significant.
13 * utils.c (address_significant): New function.
14 * utils.h (address_significant): Declare.
15
8e481c3b
TT
162017-12-08 Tom Tromey <tom@tromey.com>
17
18 * printcmd.c (ui_printf): Update. Use std::vector.
19 * common/format.h (struct format_piece): Add constructor.
20 <string>: Now const.
21 (class format_pieces): New class.
22 (parse_format_string, free_format_pieces)
23 (free_format_pieces_cleanup): Remove.
24 * common/format.c (format_pieces::format_pieces): Rename from
25 parse_format_string. Update.
26 (free_format_pieces, free_format_pieces_cleanup): Remove.
27 * breakpoint.c (parse_cmd_to_aexpr): Update. Use std::vector.
28 * ax-gdb.h (gen_printf): Remove argument.
29 * ax-gdb.c (gen_printf): Remove "frags" argument.
30 (maint_agent_printf_command): Update. Use std::vector.
31
6b05c8bd
YQ
322017-12-08 Yao Qi <yao.qi@linaro.org>
33
34 PR breakpionts/22567
35 * linespec.c (minsym_found): Set sal.section.
36
336ef6d2
AA
372017-12-08 Andreas Arnez <arnez@linux.vnet.ibm.com>
38
39 * configure.tgt (s390*-*-linux*): Add symfile-mem.o.
40
fa6eb693
KS
412017-12-07 Keith Seitz <keiths@redhat.com>
42
43 PR breakpoints/22569
44 * location.c (string_to_explicit_location): When terminating
45 parsing early, break out of enclosing loop instead of returning.
46
883fd55a
KS
472017-12-07 Keith Seitz <keiths@redhat.com>
48
49 * NEWS (New commands): Mention set/show print type nested-type-limit.
50 * c-typeprint.c (c_type_print_base): Print out nested types.
51 * dwarf2read.c (struct typedef_field_list): Rename to ...
52 (struct decl_field_list): ... this. Change all uses.
53 (struct field_info) <nested_types_list, nested_types_list_count>:
54 New fields.
55 (add_partial_symbol): Look for nested type definitions in C++, too.
56 (dwarf2_add_typedef): Rename to ...
57 (dwarf2_add_type_defn): ... this.
58 (type_can_define_types): New function.
59 Update assertion to use type_can_define_types.
60 Permit NULL for a field's name.
61 (process_structure_scope): Handle child DIEs of types that can
62 define types.
63 Copy the list of nested types into the type struct.
64 * gdbtypes.h (struct typedef_field): Rename to ...
65 (struct decl_field): ... this. Change all uses.
66 [is_protected, is_private]: New fields.
67 (struct cplus_struct_type) <nested_types, nested_types_count>: New
68 fields.
69 (TYPE_NESTED_TYPES_ARRAY, TYPE_NESTED_TYPES_FIELD)
70 (TYPE_NESTED_TYPES_FIELD_NAME, TYPE_NESTED_TYPES_FIELD_TYPE)
71 (TYPE_NESTED_TYPES_COUNT, TYPE_NESTED_TYPES_FIELD_PROTECTED)
72 (TYPE_NESTED_TYPES_FIELD_PRIVATE): New macros.
73 * typeprint.c (type_print_raw_options, default_ptype_flags): Add
74 default value for print_nested_type_limit.
75 (print_nested_type_limit): New static variable.
76 (set_print_type_nested_types, show_print_type_nested_types): New
77 functions.
78 (_initialize_typeprint): Register new commands for set/show
79 `print-nested-type-limit'.
80 * typeprint.h (struct type_print_options) [print_nested_type_limit]:
81 New field.
82
99598d71
TT
832017-12-07 Tom Tromey <tom@tromey.com>
84
85 PR breakpoints/22511:
86 * breakpoint.c (commands_command_1): Don't throw an exception when
87 no commands have been read.
88
23a8d186
AS
892017-12-07 Adam Stylinski <adam.stylinski@etegent.com>
90
91 PR c++/21222
92 * target-descriptions.c (print_c_tdesc::visit_pre): Change type of
93 range-for variable.
94
30970df7
SM
952017-12-07 Simon Marchi <simon.marchi@ericsson.com>
96
97 * common/selftest.h (struct selftest): Add virtual destructor.
98
824cc835
PM
992017-12-07 Phil Muldoon <pmuldoon@redhat.com>
100
101 * python/py-breakpoint.c (bppy_init): Use string_to_event_location
102 over basic location code. Implement explicit location keywords.
103 (bppy_init_validate_args): New function.
104 * NEWS: Document Python explicit breakpoint locations.
105
9c226a86
JB
1062017-12-07 Joel Brobecker <brobecker@adacore.com>
107
108 * MAINTAINERS: Restore target entries for m68hc11-elf,
109 score-elf and xstormy16-elf, incorrectly removed in a previous
110 patch meant to only update the list of active maintainers.
111
649a140c
PA
1122017-12-06 Pedro Alves <palves@redhat.com>
113
114 * break-catch-syscall.c (insert_catch_syscall)
115 (remove_catch_syscall): Adjust to pass reference to
116 inf_data->syscalls_counts directly via gdb::array_view.
117 * fbsd-nat.c (fbsd_set_syscall_catchpoint): Adjust to use bool
118 and gdb::array_view.
119 * linux-nat.c (linux_child_set_syscall_catchpoint): Likewise.
120 * remote.c (remote_set_syscall_catchpoint): Likewise.
121 * target-debug.h (target_debug_print_bool): New.
122 (define target_debug_print_gdb_array_view_const_int): New.
123 * target-delegates.c: Regenerate.
124 * target.h (target_ops) <to_set_syscall_catchpoint>: Use
125 gdb::array_view and bool.
126 (target_set_syscall_catchpoint): Likewise.
127
9a93831c
SM
1282017-12-06 Simon Marchi <simon.marchi@ericsson.com>
129
130 * break-catch-syscall.c (catch_syscall_completer): Get pointers
131 to syscall group strings after building the string vector.
132
7cc244de
PA
1332017-12-06 Pedro Alves <palves@redhat.com>
134
135 * remote.c (remote_query_supported): Don't send "xmlRegisters=" if
136 "qXfer:features:read"" is disabled.
137 (remote_write_qxfer, remote_read_qxfer, remote_search_memory):
138 Check packet_config_support instead of packet->support directly.
139
858c9d13
SM
1402017-12-05 Simon Marchi <simon.marchi@ericsson.com>
141
142 * target-descriptions.c (struct tdesc_feature) <registers>: Use
143 tdesc_reg_up typedef.
144 (struct target_desc) <features>: Use tdesc_feature_up typedef.
145
d4a0e8b5
SM
1462017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
147
148 * target-descriptions.c (struct tdesc_type): Use default
149 destructor.
150 <u>: Remove.
151 <accept>: Remove.
152 (struct tdesc_type_builtin): New.
153 (struct tdesc_type_vector): New.
154 (struct tdesc_type_with_fields): New.
155 (tdesc_predefined_types): Change type to tdesc_type_builtin[].
156 (tdesc_gdb_type): Remove.
157 (tdesc_register_type): Adjust.
158 (tdesc_create_vector): Create tdesc_type_vector.
159 (tdesc_create_struct): Create tdesc_type_with_fields.
160 (tdesc_set_struct_size): Change parameter type.
161 (tdesc_create_union): Create tdesc_type_with_fields.
162 (tdesc_create_flags): Likewise.
163 (tdesc_create_enum): Likewise.
164 (tdesc_add_field): Change parameter type.
165 (tdesc_add_typed_bitfield): Likewise.
166 (tdesc_add_bitfield): Likewise.
167 (tdesc_add_flag): Likewise.
168 (tdesc_add_enum_value): Likewise.
169 (print_c_tdesc) <visit>: Remove overload with tdesc_type
170 parameter, add overloads for tdesc_type_builtin,
171 tdesc_type_with_fields and tdesc_type_vector.
172 <m_printed_type>: Remove.
173 <m_printed_element_type, m_printed_type_with_fields>: Add.
174 * target-descriptions.h (tdesc_create_enum): Change return type.
175 (tdesc_add_typed_bitfield): Change parameter type.
176 (tdesc_add_enum_value): Change parameter type.
177 * xml-tdesc.c (struct tdesc_parsing_data) <current_type>: Change
178 type to tdesc_type_with_fields.
179 (tdesc_start_struct): Adjust.
180 (tdesc_start_flags): Adjust.
181 (tdesc_start_enum): Adjust.
182 (tdesc_start_field): Adjust.
183 * arch/tdesc.h (struct tdesc_type_builtin): Forward-declare.
184 (struct tdesc_type_vector): Forward-declare.
185 (struct tdesc_type_with_fields): Forward-declare.
186 (tdesc_create_struct): Change return type.
187 (tdesc_create_union): Likewise.
188 (tdesc_create_flags): Likewise.
189 (tdesc_add_field): Change parameter type.
190 (tdesc_set_struct_size): Likewise.
191 (tdesc_add_bitfield): Likewise.
192 (tdesc_add_flag): Likewise.
193 * features: Re-generate C files.
194
f0cddbef
SM
1952017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
196
197 * target-descriptions.c (tdesc_arch_reg): Remove typedef.
198 (struct tdesc_arch_reg): Add constructor.
199 (DEF_VEC_O (tdesc_arch_reg)): Remove.
200 (struct tdesc_arch_data): Initialize fields.
201 <arch_regs>: Change type to std::vector.
202 (target_find_description): Adjust.
203 (tdesc_find_type): Adjust.
204 (tdesc_data_init): Call tdesc_arch_data constructor.
205 (tdesc_data_alloc): Allocate tdesc_arch_data with new.
206 (tdesc_data_cleanup): Free data with delete.
207 (tdesc_numbered_register): Adjust.
208 (tdesc_find_arch_register): Adjust.
209 (tdesc_use_registers): Adjust.
210
d05200d1
SM
2112017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
212
213 * target-descriptions.c (tdesc_type_field): Remove typedef.
214 (DEF_VEC_O (tdesc_type_field)): Remove.
215 (struct tdesc_type_field): Add constructor.
216 <name>: Change type to std::string.
217 (struct tdesc_type) <tdesc_type>: Instantiate vector if the type
218 kind uses it.
219 <~tdesc_type>: Destroy vector if the type kind uses it.
220 <u::u::fields>: Change type to std::vector.
221 (tdesc_gdb_type): Adjust.
222 (tdesc_add_field): Adjust.
223 (tdesc_add_typed_bitfield): Adjust.
224 (tdesc_add_field): Adjust.
225 (tdesc_add_enum_value): Adjust.
226 (class print_c_tdesc) <visit>: Adjust.
227
082b9140
SM
2282017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
229
230 * target-descriptions.c (struct tdesc_type) <name>: Change type
231 to std::string.
232 <~tdesc_type>: Don't manually free name.
233 <operator==>: Adjust.
234 (tdesc_named_type): Adjust.
235 (tdesc_find_type): Adjust.
236 (tdesc_gdb_type): Adjust.
237 (class print_c_tdesc) <visit>: Adjust.
238
53c934e9
SM
2392017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
240
241 * target-descriptions.c (tdesc_type_p): Remove typedef.
242 (DEF_VEC_P (tdesc_type_p)): Remove.
243 (struct tdesc_feature) <types>: Change type to std::vector.
244 <~tdesc_feature>: Replace with default implementation.
245 <accept>: Adjust.
246 (tdesc_named_type): Adjust.
247 (tdesc_create_vector): Adjust.
248 (tdesc_create_struct): Adjust.
249 (tdesc_create_union): Adjust.
250 (tdesc_create_flags): Adjust.
251 (tdesc_create_enum): Adjust.
252
a8142ee1
SM
2532017-12-05 Simon Marchi <simon.marchi@ericsson.com>
254
255 * target-descriptions.c (struct tdesc_reg) <tdesc_reg>: Change
256 type of name_ parameter, adjust to std::string change.
257 <name, group, type>: Change type to std::string.
258 <~tdesc_reg>: Replace with default implementation.
259 <operator==>: Adjust.
260 (tdesc_find_register_early): Adjust.
261 (tdesc_register_name): Adjust.
262 (tdesc_register_type): Adjust.
263 (tdesc_register_in_reggroup_p): Adjust.
264 (class print_c_tdesc) <visit>: Adjust.
265 (class print_c_feature) <visit>: Adjust.
858c9d13
SM
266 * features/arc-arcompact.c: Re-generate.
267 * features/arc-v2.c: Re-generate.
a8142ee1 268
c9c895b9
SM
2692017-12-05 Simon Marchi <simon.marchi@ericsson.com>
270
271 * target-descriptions.c (tdesc_reg_p): Remove typedef.
272 (DEF_VEC_P (tdesc_reg_p)): Remove.
273 (struct tdesc_feature) <registers>: Change type to std::vector.
274 <~tdesc_feature>: Don't manually free registers.
275 <accept>: Adjust.
276 <operator==>: Adjust.
277 (tdesc_has_registers): Adjust.
278 (tdesc_find_register_early): Adjust.
279 (tdesc_use_registers): Adjust.
280 (tdesc_create_reg): Adjust.
281
f65ff9f9
SM
2822017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
283
284 * target-descriptions.c (tdesc_feature) <name>: Change type to
285 std::string.
286 <~tdesc_feature>: Don't manually free name.
287 <operator==>: Adjust.
288 (tdesc_find_feature): Adjust.
289 (tdesc_feature_name): Adjust.
290 (class print_c_tdesc) <visit_pre>: Adjust.
291 (class print_c_feature) <visit_pre>: Adjust.
292
3eea796c
SM
2932017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
294
295 * target-descriptions.c (tdesc_feature_p): Remove typedef.
296 (DEF_VEC_P (tdesc_feature_p)): Remove.
297 (struct target_desc) <features>: Change type to std::vector.
298 <~target_desc>: Replace with default implementation.
299 <accept>: Adjust.
300 <operator==>: Adjust.
301 (tdesc_has_registers): Adjust.
302 (tdesc_find_feature): Adjust.
303 (tdesc_use_registers): Adjust.
304 (tdesc_create_feature): Adjust.
305
40e2a983
SM
3062017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
307
308 * target-descriptions.c (arch_p): Remove typedef.
309 (DEF_VEC_P (arch_p)): Remove.
310 (struct target_desc) <compatible>: Change type to std::vector.
311 <~target_desc>: Don't manually free compatible.
312 (tdesc_compatible_p): Adjust.
313 (tdesc_add_compatible): Adjust.
314 (class print_c_tdesc) <visit_pre>: Adjust.
315
129c10bc
SM
3162017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
317
318 * target-descriptions.c (property_s): Remove typedef.
319 (DEF_VEC_O (property_s)): Remove.
320 (struct target_desc) <properties>: Make an std::vector.
321 <~target_desc>: Don't manually free properties.
322 (tdesc_property): Adjust.
323 (set_tdesc_property): Adjust.
324 (class print_c_tdesc) <visit_pre>: Adjust.
325
ed9376bd
SM
3262017-12-05 Simon Marchi <simon.marchi@ericsson.com>
327
328 * common/gdb_assert.h (gdb_static_assert): Redefine using
329 static_assert.
330
798a7429
SM
3312017-12-05 Simon Marchi <simon.marchi@ericsson.com>
332
333 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
334 unused variables.
335 (ada_is_redundant_range_encoding): Likewise.
336 * ada-varobj.c (ada_varobj_get_value_of_array_variable):
337 Likewise.
338 * alpha-tdep.c (alpha_software_single_step): Likewise.
339 * arm-tdep.c (_initialize_arm_tdep): Likewise.
340 * auto-load.c (info_auto_load_cmd): Likewise.
341 * break-catch-syscall.c (insert_catch_syscall): Likewise.
342 (remove_catch_syscall): Likewise.
343 * breakpoint.c (condition_completer): Likewise.
344 (clear_command): Likewise.
345 (update_breakpoint_locations): Likewise.
346 * btrace.c (btrace_disable): Likewise.
347 (btrace_teardown): Likewise.
348 (btrace_maint_update_pt_packets): Likewise.
349 (maint_btrace_clear_cmd): Likewise.
350 * cli/cli-decode.c (lookup_cmd_1): Likewise.
351 (lookup_cmd_composition): Likewise.
352 * cli/cli-dump.c (scan_filename): Likewise.
353 (restore_command): Likewise.
354 * compile/compile-loc2c.c (compute_stack_depth): Likewise.
355 * compile/compile-object-load.c (compile_object_load): Likewise.
356 * compile/compile-object-run.c (compile_object_run): Likewise.
357 * compile/compile.c (compile_to_object): Likewise.
358 * completer.c (filename_completer): Likewise.
359 (complete_files_symbols): Likewise.
360 (complete_expression): Likewise.
361 * corelow.c (core_open): Likewise.
362 * ctf.c (ctf_start): Likewise.
363 (ctf_write_status): Likewise.
364 (ctf_write_uploaded_tsv): Likewise.
365 (ctf_write_definition_end): Likewise.
366 (ctf_open_dir): Likewise.
367 (ctf_xfer_partial): Likewise.
368 (ctf_trace_find): Likewise.
369 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
370 Likewise.
371 * dwarf2loc.c (allocate_piece_closure): Likewise.
372 (indirect_pieced_value): Likewise.
373 (dwarf2_evaluate_loc_desc_full): Likewise.
374 * dwarf2read.c (dw2_expand_marked_cus): Likewise.
375 (dw2_expand_symtabs_matching): Likewise.
376 (dw2_map_symbol_filenames): Likewise.
377 (read_and_check_comp_unit_head): Likewise.
378 (read_cutu_die_from_dwo): Likewise.
379 (lookup_dwo_unit): Likewise.
380 (read_comp_units_from_section): Likewise.
381 (dwarf2_compute_name): Likewise.
382 (handle_DW_AT_stmt_list): Likewise.
383 (create_cus_hash_table): Likewise.
384 (create_dwp_v2_section): Likewise.
385 (dwarf2_rnglists_process): Likewise.
386 (dwarf2_ranges_process): Likewise.
387 (dwarf2_record_block_ranges): Likewise.
388 (is_vtable_name): Likewise.
389 (read_formatted_entries): Likewise.
390 (skip_form_bytes): Likewise.
391 * elfread.c (elf_symtab_read): Likewise.
392 * exec.c (exec_file_command): Likewise.
393 * f-valprint.c (f_val_print): Likewise.
394 (info_common_command_for_block): Likewise.
395 * guile/guile.c (initialize_scheme_side): Likewise.
396 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Likewise.
397 * guile/scm-cmd.c (cmdscm_completer): Likewise.
398 (gdbscm_register_command_x): Likewise.
399 * guile/scm-frame.c (gdbscm_frame_read_var): Likewise.
400 * guile/scm-param.c (gdbscm_parameter_value): Likewise.
401 * guile/scm-ports.c (file_port_magic): Likewise.
402 * guile/scm-pretty-print.c (ppscm_search_pp_list): Likewise.
403 (ppscm_pretty_print_one_value): Likewise.
404 (ppscm_print_children): Likewise.
405 * guile/scm-string.c (gdbscm_string_to_argv): Likewise.
406 * guile/scm-symtab.c (gdbscm_sal_symtab): Likewise.
407 * guile/scm-type.c (gdbscm_type_next_field_x): Likewise.
408 * guile/scm-utils.c (gdbscm_parse_function_args): Likewise.
409 * i386-tdep.c (i386_register_reggroup_p): Likewise.
410 * infcmd.c (run_command_1): Likewise.
411 (until_next_fsm_clean_up): Likewise.
412 * linespec.c (linespec_complete): Likewise.
413 (find_label_symbols): Likewise.
414 * m2-valprint.c (m2_val_print): Likewise.
415 * memattr.c (require_user_regions): Likewise.
416 (lookup_mem_region): Likewise.
417 (disable_mem_command): Likewise.
418 (mem_delete): Likewise.
419 * mep-tdep.c (mep_register_name): Likewise.
420 (mep_analyze_prologue): Likewise.
421 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Likewise.
422 * mi/mi-interp.c (mi_on_sync_execution_done): Likewise.
423 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
424 * microblaze-linux-tdep.c (microblaze_linux_init_abi): Likewise.
425 * minidebug.c (lzma_open): Likewise.
426 * minsyms.c (lookup_minimal_symbol): Likewise.
427 * mips-linux-tdep.c (mips64_fill_fpregset): Likewise.
428 * mips-tdep.c (mips_stub_frame_sniffer): Likewise.
429 (mips_o64_return_value): Likewise.
430 (mips_single_step_through_delay): Likewise.
431 (_initialize_mips_tdep): Likewise.
432 * nios2-tdep.c (nios2_push_dummy_call): Likewise.
433 (nios2_software_single_step): Likewise.
434 * parse.c (find_minsym_type_and_address): Likewise.
435 * psymtab.c (psym_relocate): Likewise.
436 * python/py-breakpoint.c (bppy_get_commands): Likewise.
437 (gdbpy_breakpoint_modified): Likewise.
438 * python/py-infevents.c (create_inferior_call_event_object):
439 Likewise.
440 * python/py-record-btrace.c (btpy_list_item): Likewise.
441 * python/py-type.c (typy_str): Likewise.
442 * python/py-value.c (valpy_call): Likewise.
443 * python/python.c (do_start_initialization): Likewise.
444 * record-btrace.c (record_btrace_insn_history_range): Likewise.
445 (record_btrace_call_history_range): Likewise.
446 (record_btrace_record_method): Likewise.
447 (record_btrace_xfer_partial): Likewise.
448 (btrace_get_frame_function): Likewise.
449 * record-full.c (record_full_open): Likewise.
450 * record.c (get_context_size): Likewise.
451 * registry.h (DEFINE_REGISTRY): Likewise.
452 * remote-fileio.c (remote_fileio_request): Likewise.
453 * remote.c (remote_update_thread_list): Likewise.
454 (remote_check_symbols): Likewise.
455 (remote_commit_resume): Likewise.
456 (remote_interrupt): Likewise.
457 (remote_insert_breakpoint): Likewise.
458 (compare_sections_command): Likewise.
459 * rust-exp.y (super_name): Likewise.
460 (lex_string): Likewise.
461 (convert_ast_to_type): Likewise.
462 (convert_ast_to_expression): Likewise.
463 * rust-lang.c (rust_print_struct_def): Likewise.
464 (rust_print_type): Likewise.
465 (rust_evaluate_subexp): Likewise.
466 * rx-tdep.c (rx_register_type): Likewise.
467 * ser-event.c (serial_event_clear): Likewise.
468 * serial.c (serial_open): Likewise.
469 * spu-tdep.c (spu_overlay_new_objfile): Likewise.
470 * symfile.c (section_is_overlay): Likewise.
471 (overlay_unmapped_address): Likewise.
472 (overlay_mapped_address): Likewise.
473 (simple_overlay_update_1): Likewise.
474 (simple_overlay_update): Likewise.
475 * symtab.c (symbol_find_demangled_name): Likewise.
476 (search_symbols): Likewise.
477 * target-descriptions.c (tdesc_predefined_type): Likewise.
478 * target.c (target_commit_resume): Likewise.
479 * thread.c (print_selected_thread_frame): Likewise.
480 * top.c (new_ui_command): Likewise.
481 (gdb_readline_no_editing): Likewise.
482 * tracefile-tfile.c (tfile_open): Likewise.
483 * tracepoint.c (create_tsv_from_upload): Likewise.
484 * utils.c (quit): Likewise.
485 (defaulted_query): Likewise.
486 * valarith.c (value_concat): Likewise.
487 * xml-syscall.c (xml_list_syscalls_by_group): Likewise.
488 * xml-tdesc.c (target_fetch_description_xml): Likewise.
489 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
490 (xtensa_pseudo_register_write): Likewise.
491
7403715e
TT
4922017-12-04 Tom Tromey <tom@tromey.com>
493
494 * NEWS: Mention Rust trait object inspection.
495
50a1fdd5
PA
4962017-12-04 Pedro Alves <palves@redhat.com>
497
498 PR gdb/22499
499 * amd64-tdep.c (amd64_insn::rex_offset): Rename to...
500 (amd64_insn::enc_prefix_offset): ... this, and tweak comment.
501 (vex2_prefix_p, vex3_prefix_p): New functions.
502 (amd64_get_insn_details): Adjust to rename. Also skip VEX2 and
503 VEX3 prefixes.
504 (fixup_riprel): Set VEX3.!B.
505
1e97a227
SM
5062017-12-03 Simon Marchi <simon.marchi@ericsson.com>
507
508 * target.h (mem_region_vector): Remove.
509 (struct target_ops) <to_memory_map>: Change return type to
510 std::vector<mem_region>.
511 * target-debug.h (target_debug_print_mem_region_vector): Rename
512 to ...
513 (target_debug_print_std_vector_mem_region): ... this.
514 * target-delegates.c: Re-generate.
515
10f64178
PA
5162017-12-03 Pedro Alves <palves@redhat.com>
517
518 * make-target-delegates (munge_type): Also munge '<', '>', and
519 ':'. Avoid double underscores in identifiers, and trailing
520 underscores.
521 * target-debug.h
522 (target_debug_print_VEC_static_tracepoint_marker_p__p): Rename to
523 ...
524 (target_debug_print_VEC_static_tracepoint_marker_p_p): ... this.
525 * target-delegates.c: Regenerate.
526
6d83e819
SM
5272017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
528
529 * common/poison.h (XDELETE): Fix typo.
530
97cbe998
SDJ
5312017-12-01 Andrew Cagney <cagney@redhat.com>
532 Joel Brobecker <brobecker@adacore.com>
533 Sergio Durigan Junior <sergiodj@redhat.com>
534
535 * NEWS (Changes since GDB 8.0: Mention new '--readnever'
536 feature.
537 * coffread.c (coff_symfile_read): Do not map over sections with
538 'coff_locate_sections' if readnever is on.
539 * dwarf2read.c (dwarf2_has_info): Return 0 if
540 readnever is on.
541 * elfread.c (elf_symfile_read): Do not map over sections with
542 'elf_locate_sections' if readnever is on.
543 * main.c (validate_readnow_readnever): New function.
544 (captured_main_1): Add support for --readnever.
545 (print_gdb_help): Document --readnever.
546 * objfile-flags.h (enum objfile_flag) <OBJF_READNEVER>: New
547 flag.
548 * symfile.c (readnever_symbol_files): New global.
549 (symbol_file_add_with_addrs): Set 'OBJF_READNEVER' when
550 'READNEVER_SYMBOL_FILES' is set.
551 (validate_readnow_readnever): New function.
552 (symbol_file_command): Handle '-readnever' option.
553 Call 'validate_readnow_readnever'.
554 (add_symbol_file_command): Handle '-readnever' option.
555 Call 'validate_readnow_readnever'.
556 (_initialize_symfile): Document new '-readnever' option for
557 both 'symbol-file' and 'add-symbol-file' commands.
558 * top.h (readnever_symbol_files): New extern global.
559 * xcoffread.c (xcoff_initial_scan): Do not read debug
560 information if readnever is on.
561
40fc416f
SDJ
5622017-12-01 Sergio Durigan Junior <sergiodj@redhat.com>
563
564 * symfile.c (symbol_file_command): Call
565 'symbol_file_add_main_1' only after processing all command
566 line options.
567 (add_symbol_file_command): Modify logic to make arguments
568 position-independent.
569
ec6a20c2
JB
5702017-12-01 Joel Brobecker <brobecker@adacore.com>
571
572 * ada-lang.c (symbol_list_obstack): Delete.
573 (resolve_subexp): Make sure "candidates" gets xfree'ed.
574 (ada_lookup_symbol_list_worker): Remove the limitation that
575 the result is only good until the next call, now making it
576 the responsibility of the caller to free the result when no
577 longer needed. Adjust the function's intro comment accordingly.
578 (ada_lookup_symbol_list): Adjust the function's intro comment.
579 (ada_iterate_over_symbols): Make sure "results" gets xfree'ed.
580 (ada_lookup_encoded_symbol, get_var_value): Likewise.
581 (_initialize_ada_language): Remove symbol_list_obstack
582 initialization.
583 * ada-exp.y (block_lookup): Make sure "syms" gets xfree'ed.
584 (write_var_or_type, write_name_assoc): Likewise.
585
d0df06af
TT
5862017-12-01 Tom Tromey <tom@tromey.com>
587
588 * Makefile.in (all_deps_files): New variable.
589 Include .Po files using all_deps_files.
590
2ee0c9b3
JB
5912017-12-01 Joel Brobecker <brobecker@adacore.com>
592
593 * MAINTAINERS: Update list of maintainers, moving those who
594 stepped down or became inactive to the "Past Maintainers"
595 section.
596
44122162
RO
5972017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
598
599 * configure.ac Don't check for sys/fault.h, sys/syscall.h,
600 sys/proc.h.
601 (NEW_PROC_API): Remove.
602 (prsysent_t, pr_sigset_t, pr_sigaction64_t, pr_siginfo64_t):
603 Likewise.
604 * common/common.m4 (GDB_AC_COMMON): Don't check for sys/syscall.h.
605 * configure: Regenerate.
606 * config.in: Regenerate.
607 * gdbserver/configure: Regenerate.
608 * gdbserver/config.in: Regenerate.
609
610 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Remove
611 NEW_PROC_API test.
612 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Likewise.
613
614 * linux-btrace.c: Remove HAVE_SYS_SYSCALL_H test.
615
616 * proc-api.c: Remove !NEW_PROC_API support.
617 Remove HAVE_SYS_PROC_H and HAVE_SYS_USER_H tests.
618 Remove tests for macros always defined on Solaris.
619 * proc-events.c: Remove !NEW_PROC_API support.
620 Remove Remove HAVE_SYS_SYSCALL_H, HAVE_SYS_PROC_H and
621 HAVE_SYS_USER_H tests.
622 (init_syscall_table): Remove non-Solaris syscalls.
623 Remove tests for syscalls present on all Solaris versions.
624 Add missing Solaris 10+ syscalls.
625 (signal_table): Remove non-Solaris signals.
626 Remove tests for signals present on all Solaris versions.
627 (fault_table): Remove non-Solaris faults.
628 Remove tests for faults present on all Solaris versions.
629 * proc-flags.c: Remove !NEW_PROC_API support.
630 (pr_flag_table): Remove non-Solaris and pre-Solaris 7 comments.
631 Remove non-Solaris flags.
632 * proc-why.c: Remove !NEW_PROC_API support.
633 (pr_why_table): Remove meaningless comments.
634 Remove tests for reasons present on all Solaris versions.
635 Remove OSF/1 cases.
636 (proc_prettyfprint_why): Likewise.
637
638 * procfs.c: Remove !NEW_PROC_API and DYNAMIC_SYSCALLS support.
639 Remove HAVE_SYS_FAULT_H and HAVE_SYS_SYSCALL_H tests.
640 Remove WA_READ test, IRIX watchpoint support.
641 (gdb_sigset_t, gdb_sigaction_t, gdb_siginfo_t): Replace by base
642 types. Change users.
643 (gdb_praddset, gdb_prdelset, gdb_premptysysset, gdb_praddsysset)
644 (gdb_prdelset, gdb_pr_issyssetmember): Replace by base macros.
645 Change callers.
646 Remove CTL_PROC_NAME_FMT tests.
647 (gdb_prstatus_t, gdb_lwpstatus_t): Replace by base types. Change
648 users.
649 (sysset_t_size): Remove. Use sizeof (sysset_t) in callers.
650 Remove PROCFS_DONT_PIOCSSIG_CURSIG support.
651 (proc_modify_flag): Replace GDBRESET by PCUNSET.
652 Remove PR_ASYNC, PR_KLC tests.
653 (proc_unset_inherit_on_fork): Remove PR_ASYNC test.
654 (proc_parent_pid): Remove PCWATCH etc. tests.
655 (proc_set_watchpoint): Remove !PCWATCH && !PIOCSWATCH support.
656 Remove PCAGENT test.
657 (proc_get_nthreads) [PIOCNTHR && PIOCTLIST]: Remove.
658 Remove SYS_lwpcreate || SYS_lwp_create test.
659 (proc_get_current_thread): Likewise.
660 [PIOCNTHR && PIOCTLIST]: Remove.
661 [PIOCLSTATUS]: Remove.
662 (procfs_debug_inferior): Remove non-Solaris cases, conditionals.
663 [PRFS_STOPEXEC]: Remove.
664 (syscall_is_lwp_exit): Remove non-Solaris cases, conditionals.
665 (syscall_is_exit): Likewise.
666 (syscall_is_exec): Likewise.
667 (syscall_is_lwp_create): Likewise.
668 Remove SYS_syssgi support.
669 (procfs_wait): Remove PR_ASYNC, !PIOCSSPCACT tests.
670 [SYS_syssgi]: Remove.
671 Remove non-Solaris cases, conditionals.
672 (unconditionally_kill_inferior) [PROCFS_NEED_PIOCSSIG_FOR_KILL]:
673 Remove.
674 (procfs_init_inferior) [SYS_syssgi]: Remove.
675 (procfs_set_exec_trap) [PRFS_STOPEXEC]: Remove.
676 (procfs_inferior_created) [SYS_syssgi]: Remove.
677 (procfs_set_watchpoint): Remove !AIX5 test.
678 (procfs_stopped_by_watchpoint): Remove FLTWATCH test, FLTKWATCH
679 case.
680 (mappingflags) [MA_PHYS]: Remove.
681 (info_mappings_callback): Remove PCAGENT test.
682 Remove PIOCOPENLWP || PCAGENT test.
683
e8020e54
RO
6842017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
685
686 * sol-thread.c (info_solthreads): Constify args.
687 Cast args to void *.
688
75059544
JB
6892017-11-29 John Baldwin <jhb@FreeBSD.org>
690
691 * target-float.c [HAVE_LIBMPFR]: Define MPFR_USE_INTMAX_T.
692
f5a91472
JB
6932017-11-29 Joel Brobecker <brobecker@adacore.com>
694
695 * ada-lang.c (to_fixed_range_type): Make sure that the size
696 of the range type being returned is the same as the size
697 of the range type being fixed.
698
bd69330d
PA
6992017-11-29 Pedro Alves <palves@redhat.com>
700
701 PR c++/19436
702 * NEWS: Mention setting breakpoints on functions with C++ ABI
703 tags.
704 * completer.h (completion_match_for_lcd) <match,
705 mark_ignored_range>: New methods.
706 <finish>: Consider ignored ranges.
707 <clear>: Clear ignored ranges.
708 <m_ignored_ranges, m_finished_storage>: New fields.
709 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
710 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
711 completion_match_for_lcd pointer to strncmp_iw_with_mode.
712 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
713 * language.c (default_symbol_name_matcher): Pass the
714 completion_match_for_lcd pointer to strncmp_iw_with_mode.
715 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
716 * utils.c (skip_abi_tag): New function.
717 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
718 Handle ABI tags.
719 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
720 parameter.
721
7222017-11-29 Pedro Alves <palves@redhat.com>
723
724 PR c++/19436
725 * NEWS: Mention setting breakpoints on functions with C++ ABI
726 tags.
727 * completer.h (completion_match_for_lcd) <match,
728 mark_ignored_range>: New methods.
729 <finish>: Consider ignored ranges.
730 <clear>: Clear ignored ranges.
731 <m_ignored_ranges, m_finished_storage>: New fields.
732 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
733 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
734 completion_match_for_lcd pointer to strncmp_iw_with_mode.
735 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
736 * language.c (default_symbol_name_matcher): Pass the
737 completion_match_for_lcd pointer to strncmp_iw_with_mode.
738 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
739 * utils.c (skip_abi_tag): New function.
740 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
741 Handle ABI tags.
742 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
743 parameter.
744
a20714ff
PA
7452017-11-29 Pedro Alves <palves@redhat.com>
746
747 * NEWS: Mention that breakpoints on C++ functions are now set on
748 on all namespaces/classes by default, and mention "break
749 -qualified".
750 * ax-gdb.c (agent_command_1): Adjust to pass a
751 symbol_name_match_type to new_linespec_location.
752 * breakpoint.c (parse_breakpoint_sals): Adjust to
753 get_linespec_location's return type change.
754 (strace_marker_create_sals_from_location): Adjust to pass a
755 symbol_name_match_type to new_linespec_location.
756 (strace_marker_decode_location): Adjust to get_linespec_location's
757 return type change.
758 (strace_command): Adjust to pass a symbol_name_match_type to
759 new_linespec_location.
760 (LOCATION_HELP_STRING): Add paragraph about wildmatching, and
761 mention "-qualified".
762 * c-lang.c (cplus_language_defn): Install cp_search_name_hash.
763 * completer.c (explicit_location_match_type::MATCH_QUALIFIED): New
764 enumerator.
765 (complete_address_and_linespec_locations): New parameter
766 'match_type'. Pass it down.
767 (explicit_options): Add "-qualified".
768 (collect_explicit_location_matches): Pass the requested match type
769 to the linespec completers. Handle MATCH_QUALIFIED.
770 (location_completer): Handle "-qualified" combined with linespecs.
771 * cp-support.c (cp_search_name_hash): New.
772 (cp_symbol_name_matches_1): Implement wild matching for C++.
773 (cp_fq_symbol_name_matches): Reimplement.
774 (cp_get_symbol_name_matcher): Return different matchers depending
775 on the lookup name's match type.
776 (selftests::test_cp_symbol_name_matches): Add wild matching tests.
777 * cp-support.h (cp_search_name_hash): New declaration.
778 * dwarf2read.c
779 (selftests::dw2_expand_symtabs_matching::test_symbols): Add
780 symbols.
781 (test_dw2_expand_symtabs_matching_symbol): Add wild matching
782 tests.
783 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Adjust to
784 pass a symbol_name_match_type to new_linespec_location.
785 * linespec.c (linespec_parse_basic): Lookup function symbols using
786 the parser's symbol name match type.
787 (convert_explicit_location_to_linespec): New
788 symbol_name_match_type parameter. Pass it down to
789 find_linespec_symbols.
790 (convert_explicit_location_to_sals): Pass the location's name
791 match type to convert_explicit_location_to_linespec.
792 (parse_linespec): New match_type parameter. Save it in the
793 parser.
794 (linespec_parser_new): Default to symbol_name_match_type::WILD.
795 (linespec_complete_function): New symbol_name_match_type
796 parameter. Use it.
797 (complete_linespec_component): Pass down the parser's recorded
798 name match type.
799 (linespec_complete_label): New symbol_name_match_type parameter.
800 Use it.
801 (linespec_complete): New symbol_name_match_type parameter. Save
802 it in the parser and pass it down. Adjust to
803 get_linespec_location's prototype change.
804 (find_function_symbols, find_linespec_symbols): New
805 symbol_name_match_type parameter. Pass it down instead of
806 assuming symbol_name_match_type::WILD.
807 * linespec.h (linespec_complete, linespec_complete_function)
808 (linespec_complete_label): New symbol_name_match_type parameter.
809 * location.c (event_location::linespec_location): Now a struct
810 linespec_location.
811 (EL_LINESPEC): Adjust.
812 (initialize_explicit_location): Default to
813 symbol_name_match_type::WILD.
814 (new_linespec_location): New symbol_name_match_type parameter.
815 Record it in the location.
816 (get_linespec_location): Now returns a struct linespec_location.
817 (new_explicit_location): Also copy func_name_match_type.
818 (explicit_to_string_internal)
819 (string_to_explicit_location): Handle "-qualified".
820 (copy_event_location): Adjust to LINESPEC_LOCATION type change.
821 Copy symbol_name_match_type fields.
822 (event_location_deleter::operator()): Adjust to LINESPEC_LOCATION
823 type change.
824 (event_location_to_string): Adjust to LINESPEC_LOCATION type
825 change. Handle "-qualfied".
826 (string_to_explicit_location): Handle "-qualified".
827 (string_to_event_location_basic): New symbol_name_match_type
828 parameter. Pass it down.
829 (string_to_event_location): Handle "-qualified".
830 * location.h (struct linespec_location): New.
831 (explicit_location::func_name_match_type): New field.
832 (new_linespec_location): Now returns a const linespec_location *.
833 (string_to_event_location_basic): New symbol_name_match_type
834 parameter.
835 (explicit_completion_info::saw_explicit_location_option): New
836 field.
837 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Adjust to pass a
838 symbol_name_match_type to new_linespec_location.
839 * python/py-breakpoint.c (bppy_init): Likewise.
840 * python/python.c (gdbpy_decode_line): Likewise.
841
a207cff2
PA
8422017-11-29 Pedro Alves <palves@redhat.com>
843
844 * ada-lang.c (ada_lookup_name_info::matches): Change type of
845 parameter from completion_match to completion_match_result.
846 Adjust.
847 (do_wild_match, do_full_match, ada_symbol_name_matches): Likewise.
848 * completer.c (completion_tracker::maybe_add_completion): Add
849 match_for_lcd parameter and use it.
850 (completion_tracker::add_completion): Likewise.
851 * completer.h (class completion_match_for_lcd): New class.
852 (completion_match_result::match_for_lcd): New field.
853 (completion_match_result::set_match): New method.
854 (completion_tracker): Add comments.
855 (completion_tracker::add_completion): Add match_for_lcd parameter.
856 (completion_tracker::reset_completion_match_result): Reset
857 match_for_lcd too.
858 (completion_tracker::maybe_add_completion): Add match_for_lcd
859 parameter.
860 (completion_tracker::m_lowest_common_denominator_unique): Extend
861 comments.
862 * cp-support.c (cp_symbol_name_matches_1)
863 (cp_fq_symbol_name_matches): Change type of parameter from
864 completion_match to completion_match_result. Adjust.
865 * language.c (default_symbol_name_matcher): Change type of
866 parameter from completion_match to completion_match_result.
867 Adjust.
868 * language.h (completion_match_for_lcd): Forward declare.
869 (default_symbol_name_matcher): Change type of parameter from
870 completion_match to completion_match_result.
871 * symtab.c (compare_symbol_name): Adjust.
872 (completion_list_add_name): Pass the match_for_lcd to the tracker.
873 * symtab.h (ada_lookup_name_info::matches): Change type of
874 parameter from completion_match to completion_match_result.
875 (symbol_name_matcher_ftype): Likewise, and update comments.
876
4024cf2b
PA
8772017-11-29 Pedro Alves <palves@redhat.com>
878
879 * linespec.c (minsym_found, add_minsym): Use msymbol_is_function.
880 * minsyms.c (msymbol_is_text): Delete.
881 (msymbol_is_function): New function.
882 * minsyms.h (msymbol_is_text): Delete.
883 (msymbol_is_function): New declaration.
884 * symtab.c (find_function_alias_target): Use msymbol_is_function.
885
5dcf52c1
TT
8862017-11-29 Tom Tromey <tom@tromey.com>
887
888 * Makefile.in (distclean): Handle the case where rmdir fails.
889
8ca2f0b9
TT
8902017-11-29 Tom Tromey <tom@tromey.com>
891
892 * symfile.c (_initialize_symfile): Update usage text for
893 add-symbol-file, symbol-file, load.
894
02ca603a
TT
8952017-11-29 Tom Tromey <tom@tromey.com>
896
897 * symfile.c (add_symbol_file_command): Error if some arguments to
898 -s are missing. Change unrecognized-argument error message.
899 (_initialize_symfile): Fix usage text for add-symbol-file.
900
18ca7347
TT
9012017-11-27 Tom Tromey <tom@tromey.com>
902
903 * Makefile.in (REMOTE_OBS): Remove.
904 (SFILES): Remove remote sources.
905 (COMMON_SFILES): Add remote sources.
906 (ALLDEPFILES): Remove dcache.c.
907
66599a7d
TT
9082017-11-27 Tom Tromey <tom@tromey.com>
909
910 * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
911 variables.
912 (SFILES): Use SUBDIR_TARGET_SRCS.
913 (COMMON_OBS): Use SUBDIR_TARGET_OBS. Remove waitstatus.o.
914 (CONFIG_SRC_SUBDIR): Add target.
915 (%.o): Remove target rule.
916
4f04fba8
TT
9172017-11-27 Tom Tromey <tom@tromey.com>
918
919 * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
920 registry.o, thread-fsm.o, debug.o.
921 (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
922 thread-fsm.c, debug.c.
923
b5adff3b
TT
9242017-11-27 Tom Tromey <tom@tromey.com>
925
926 * Makefile.in (COMMON_SFILES): New.
927 (SFILES): Move some entries to COMMON_SFILES.
928 (COMMON_OBS): Use COMMON_SFILES.
929
afa0a411
TT
9302017-11-27 Tom Tromey <tom@tromey.com>
931
932 * Makefile.in (YYFILES): Update comment.
933 (YYOBJ): Redefine.
934
8fd8d003
TT
9352017-11-27 Tom Tromey <tom@tromey.com>
936
937 * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
938 (CONFIG_SRC_SUBDIR): Add python.
939 (%.o): Remove python rule.
940 (python/%.o): New rule.
941 * configure: Rebuild.
942 * configure.ac (CONFIG_OBS): Refer to python/python.o
943
bd810fff
TT
9442017-11-27 Tom Tromey <tom@tromey.com>
945
946 * configure: Rebuild.
947 * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
948 * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
949 (CONFIG_SRC_SUBDIR): Add guile.
950 (%.o): Remove guile rule.
951
75787ac1
TT
9522017-11-27 Tom Tromey <tom@tromey.com>
953
954 * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
955 (%.o): Remove unittests rule.
956 (CONFIG_SRC_SUBDIR): Add unittests.
957
5c8a9431
TT
9582017-11-27 Tom Tromey <tom@tromey.com>
959
960 * Makefile.in (SUBDIR_TUI_OBS): Redefine.
961 (CONFIG_SRC_SUBDIR): Add tui.
962 (%.o): Remove tui rule.
963
a26aa30c
TT
9642017-11-27 Tom Tromey <tom@tromey.com>
965
966 * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
967 (%.o): Remove compile rule.
968 (CONFIG_SRC_SUBDIR): Add compile.
969
6f3cdf9a
TT
9702017-11-27 Tom Tromey <tom@tromey.com>
971
972 * Makefile.in (SUBDIR_MI_OBS): Redefine.
973 (%.o): Remove mi rule.
974 (CONFIG_SRC_SUBDIR): Add mi.
975 (COMMON_OBS): Use mi/mi-common.o
976
f06afa53
TT
9772017-11-27 Tom Tromey <tom@tromey.com>
978
979 * Makefile.in (SUBDIR_CLI_OBS): Redefine.
980 (%.o): Remove cli rule.
981 (CONFIG_SRC_SUBDIR): Add cli.
982
b22c88c2
TT
9832017-11-27 Tom Tromey <tom@tromey.com>
984
985 * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
986 * configure: Rebuild.
987 * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
988 (CONFIG_DEP_SUBDIR): New variable.
989 (%.o): Add order-only dependency.
990 ($(CONFIG_DEP_SUBDIR)): New target.
991
ee9a09e9
DC
9922017-11-26 Dominik Czarnota <dominik.b.czarnota@gmail.com>
993
994 PR gdb/21945
995 * findcmd.c (_initialize_mem_search): Update find command help
996 text.
997
e8e7d10c
SM
9982017-11-26 Simon Marchi <simon.marchi@polymtl.ca>
999
1000 * python/python.c (do_start_initialization): Change progname
1001 type to gdb::unique_xmalloc_ptr. Release the pointer when using
1002 Python 2.
1003
6a997029
TT
10042017-11-26 Tom Tromey <tom@tromey.com>
1005
1006 * common/format.h: Add include guards.
1007
41272101
TT
10082017-11-26 Tom Tromey <tom@tromey.com>
1009
1010 * nat/linux-personality.h (class
1011 maybe_disable_address_space_randomization): New class.
1012 (maybe_disable_address_space_randomization): Don't declare
1013 function.
1014 * nat/linux-personality.c (restore_personality)
1015 (make_disable_asr_cleanup): Remove.
1016 (maybe_disable_address_space_randomization): Now a constructor.
1017 (~maybe_disable_address_space_randomization): New destructor.
1018 * linux-nat.c (linux_nat_create_inferior): Update.
1019
44287fd8
TT
10202017-11-26 Tom Tromey <tom@tromey.com>
1021
1022 * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
1023
5ffd2cb7
UW
10242017-11-26 Ulrich Weigand <uweigand@de.ibm.com>
1025
1026 * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
1027 "cooked" register. Access only first four bytes of branch target
1028 registers.
1029
0e5457dc
SDJ
10302017-11-25 Sergio Durigan Junior <sergiodj@redhat.com>
1031
1032 PR gdb/22491
1033 * stap-probe.c (relocate_address): New function.
1034 (stap_probe::get_relocated_address): Use 'relocate_address'.
1035 (stap_probe::set_semaphore): Use 'relocate_address' and pass
1036 'm_sem_addr'.
1037 (stap_probe::clear_semaphore): Likewise.
1038
deeeba55
PA
10392017-11-25 Pedro Alves <palves@redhat.com>
1040
1041 * dictionary.c: Include "safe-ctype.h".
1042 * minsyms.c: Include "safe-ctype.h".
1043 * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
1044
a81aaca0
PA
10452017-11-25 Pedro Alves <palves@redhat.com>
1046
1047 * completer.c (complete_line_internal_1): Skip spaces until the
1048 start of the command.
1049
0662b6a7
PA
10502017-11-24 Pedro Alves <palves@redhat.com>
1051
1052 * cp-support.c (cp_symbol_name_matches_1): New, factored out from
1053 cp_fq_symbol_name_matches. Pass language_cplus to
1054 strncmp_with_mode.
1055 (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
1056 (selftests::test_cp_symbol_name_cmp): New.
1057 (_initialize_cp_support): Register "cp_symbol_name_matches"
1058 selftests.
1059 * language.c (default_symbol_name_matcher): Pass language_minimal
1060 to strncmp_iw_with_mode.
1061 * utils.c: Include "cp-support.h" and <algorithm>.
1062 (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
1063 (cp_is_operator): New functions.
1064 (strncmp_iw_with_mode): Use them. Add language parameter. Don't
1065 skip whitespace in the symbol name when the lookup name doesn't
1066 have spaces, and vice versa.
1067 (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
1068 * utils.h (strncmp_iw_with_mode): Add language parameter.
1069
e547c119
JB
10702017-11-24 Joel Brobecker <brobecker@adacore.com>
1071
1072 * ada-lang.c (ada_exception_message_1, ada_exception_message):
1073 New functions.
1074 (print_it_exception): If available, display the exception
1075 message as well.
1076 * NEWS: Document new feature.
1077
d7fcdff9
UW
10782017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1079
1080 * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
1081
30649c14
PR
10822017-11-24 Philipp Rudo <prudo@linux.vnet.ibm.com>
1083
1084 * dtrace-probe.c (dtrace_probe::build_arg_exprs)
1085 (dtrace_probe::is_enabled, dtrace_probe::enable)
1086 (dtrace_probe::disable): Remove keyword 'struct' at for-range
1087 variable
1088 * probe.c (gen_ui_out_table_header_info)
1089 (print_ui_out_not_applicables): Remove keyword 'struct' at
1090 for-range variable
1091
7696f5c9
AH
10922017-11-24 Alan Hayward <alan.hayward@arm.com>
1093
1094 * configure.tgt: Add arch/aarch64.o
1095
8172f16b
SM
10962017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1097
1098 * common/common-utils.h: Include poison.h.
1099 (xfree): Remove declaration, add definition with static_assert.
1100 * common/common-utils.c (xfree): Remove.
1101 * common/poison.h (IsMallocatable): Define.
1102 (IsFreeable): Define.
1103 (free): Delete for non-freeable types.
1104 (xnew): New.
1105 (XNEW): Undef and redefine.
1106 (xcnew): New.
1107 (XCNEW): Undef and redefine.
1108 (xdelete): New.
1109 (XDELETE): Undef and redefine.
1110 (xnewvec): New.
1111 (XNEWVEC): Undef and redefine.
1112 (xcnewvec): New.
1113 (XCNEWVEC): Undef and redefine.
1114 (xresizevec): New.
1115 (XRESIZEVEC): Undef and redefine.
1116 (xdeletevec): New.
1117 (XDELETEVEC): Undef and redefine.
1118 (xnewvar): New.
1119 (XNEWVAR): Undef and redefine.
1120 (xcnewvar): New.
1121 (XCNEWVAR): Undef and redefine.
1122 (xresizevar): New.
1123 (XRESIZEVAR): Undef and redefine.
1124
7aabaf9d
SM
11252017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1126
1127 * gdbthread.h (private_thread_info): Define structure type, add
1128 virtual pure destructor.
1129 (thread_info) <priv>: Change type to unique_ptr.
1130 <private_dtor>: Remove.
1131 * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
1132 (private_thread_info::~private_thread_info): Provide default
1133 implementation.
1134 (thread_info::~thread_info): Don't call private_dtor nor
1135 manually free priv.
1136 * aix-thread.c (private_thread_info): Rename to ...
1137 (aix_thread_info): ... this.
1138 (get_aix_thread_info): New.
1139 (sync_threadlists): Adjust.
1140 (iter_tid): Adjust.
1141 (aix_thread_resume): Adjust.
1142 (aix_thread_fetch_registers): Adjust.
1143 (aix_thread_store_registers): Adjust.
1144 (aix_thread_extra_thread_info): Adjust.
1145 * darwin-nat.h (private_thread_info): Rename to ...
1146 (darwin_thread_info): ... this.
1147 (get_darwin_thread_info): New.
1148 * darwin-nat.c (darwin_init_thread_list): Adjust.
1149 (darwin_check_new_threads): Adjust.
1150 (thread_info_from_private_thread_info): Adjust.
1151 * linux-thread-db.c (private_thread_info): Rename to ...
1152 (thread_db_thread_info): ... this, initialize fields.
1153 (get_thread_db_thread_info): New.
1154 <dying>: Change type to bool.
1155 (update_thread_state): Adjust to type rename.
1156 (record_thread): Adjust to type rename an use of unique_ptr.
1157 (thread_db_pid_to_str): Likewise.
1158 (thread_db_extra_thread_info): Likewise.
1159 (thread_db_thread_handle_to_thread_info): Likewise.
1160 (thread_db_get_thread_local_address): Likewise.
1161 * nto-tdep.h (private_thread_info): Rename to ...
1162 (nto_thread_info): ... this, initialize fields.
1163 (get_nto_thread_info): New.
1164 <name>: Change type to std::string.
1165 * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
1166 use of unique_ptr.
1167 * nto-procfs.c (update_thread_private_data_name): Adjust to
1168 std::string change, allocate nto_private_thread_info with new.
1169 (update_thread_private_data): Adjust to unique_ptr.
1170 * remote.c (private_thread_info): Rename to ...
1171 (remote_thread_info): ... this, initialize data members with
1172 default values.
1173 <extra, name>: Change type to std::string.
1174 <thread_handle>: Change type to non-pointer.
1175 (free_private_thread_info): Remove.
1176 (get_private_info_thread): Rename to...
1177 (get_remote_thread_info): ... this, change return type, adjust to
1178 use of unique_ptr, use remote_thread_info constructor.
1179 (remote_add_thread): Adjust.
1180 (get_private_info_ptid): Rename to...
1181 (get_remote_thread_info): ...this, change return type.
1182 (remote_thread_name): Use get_remote_thread_info, adjust to
1183 change to std::string.
1184 (struct thread_item) <~thread_item>: Remove.
1185 <thread_handle>: Make non pointer.
1186 (start_thread): Adjust to thread_item::thread_handle type
1187 change.
1188 (remote_update_thread_list): Adjust to type name change, move
1189 strings from temporary to long-lived object instead of
1190 duplicating.
1191 (remote_threads_extra_info): Use get_remote_thread_info.
1192 (process_initial_stop_replies): Likewise.
1193 (resume_clear_thread_private_info): Likewise.
1194 (remote_resume): Adjust to type name change.
1195 (remote_commit_resume): Use get_remote_thread_info.
1196 (process_stop_reply): Adjust to type name change.
1197 (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
1198 (remote_stopped_by_hw_breakpoint): Likewise.
1199 (remote_stopped_by_watchpoint): Likewise.
1200 (remote_stopped_data_address): Likewise.
1201 (remote_core_of_thread): Likewise.
1202 (remote_thread_handle_to_thread_info): Use
1203 get_private_info_thread, adjust to thread_handle field type
1204 change.
1205
21fe1c75
SM
12062017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1207
1208 * remote.c (struct thread_item): Add constructor, disable copy
1209 construction and copy assignment, define default move
1210 construction and move assignment.
1211 <extra, name>: Change type to std::string.
1212 <core>: Initialize.
1213 <thread_handle>: Make non-pointer.
1214 (thread_item_t): Remove typedef.
1215 (DEF_VEC_O(thread_item_t)): Remove.
1216 (threads_listing_context) <contains_thread>: New method.
1217 <remove_thread>: New method.
1218 <items>: Change type to std::vector.
1219 (clear_threads_listing_context): Remove.
1220 (threads_listing_context_remove): Remove.
1221 (remote_newthread_step): Use thread_item constructor, adjust to
1222 change to std::vector.
1223 (start_thread): Use thread_item constructor, adjust to change to
1224 std::vector.
1225 (end_thread): Adjust to change to std::vector and std::string.
1226 (remote_get_threads_with_qthreadinfo): Use thread_item
1227 constructor, adjust to std::vector.
1228 (remote_update_thread_list): Adjust to change to std::vector and
1229 std::string, use threads_listing_context methods.
1230 (remove_child_of_pending_fork): Adjust.
1231 (remove_new_fork_children): Adjust.
1232 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
1233 (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
1234 * unittests/rsp-low-selftests.c: New file.
1235 * common/rsp-low.h: Include common/byte-vector.h.
1236 (hex2bin): New overload.
1237 * common/rsp-low.c (hex2bin): New overload.
1238
089354bb
SM
12392017-11-24 Simon Marchi <simon.marchi@ericsson.com>
1240
1241 * inferior.h (private_inferior): Define structure type, add
1242 virtual pure destructor.
1243 (inferior) <priv>: Change type to unique_ptr.
1244 * inferior.c (private_inferior::~private_inferior): Provide
1245 default implementation.
1246 (inferior::~inferior): Don't free priv field.
1247 (exit_inferior_1): Likewise.
1248 * darwin-nat.h (struct darwin_exception_info): Initialize fields.
1249 (darwin_exception_info): Remove typedef.
1250 (DEF_VEC_O (darwin_thread_t)); Remove.
1251 (private_inferior): Rename to ...
1252 (darwin_private_inferior): ... this, extend private_inferior.
1253 (get_darwin_inferior): New.
1254 <threads>: Change type to std::vector of darwin_thread_t pointers.
1255 * darwin-nat.c (darwin_check_new_threads): Adjust.
1256 (find_inferior_task_it): Adjust.
1257 (darwin_find_thread); Adjust.
1258 (darwin_suspend_inferior): Adjust.
1259 (darwin_resume_inferior): Adjust.
1260 (darwin_find_new_inferior): Adjust.
1261 (darwin_decode_notify_message): Adjust.
1262 (darwin_send_reply): Adjust.
1263 (darwin_resume_inferior_threads): Adjust.
1264 (darwin_suspend_inferior_threads): Adjust.
1265 (darwin_decode_message): Adjust.
1266 (darwin_wait): Adjust.
1267 (darwin_interrupt): Adjust.
1268 (darwin_deallocate_threads): Adjust.
1269 (darwin_mourn_inferior): Adjust, don't free private data.
1270 (darwin_reply_to_all_pending_messages): Adjust.
1271 (darwin_stop_inferior): Adjust.
1272 (darwin_setup_exceptions): Adjust.
1273 (darwin_kill_inferior): Adjust.
1274 (darwin_setup_request_notification): Adjust.
1275 (darwin_attach_pid): Adjust.
1276 (darwin_init_thread_list): Adjust.
1277 (darwin_setup_fake_stop_event): Adjust.
1278 (darwin_attach): Adjust.
1279 (darwin_detach): Adjust.
1280 (darwin_xfer_partial): Adjust.
1281 (set_enable_mach_exceptions): Adjust.
1282 (darwin_pid_to_exec_file): Adjust.
1283 (darwin_get_ada_task_ptid): Adjust.
1284 * darwin-nat-info.c (get_task_from_args): Adjust.
1285 (info_mach_ports_command): Adjust.
1286 (info_mach_region_command): Adjust.
1287 (info_mach_exceptions_command): Adjust.
1288 * remote.c (private_inferior): Rename to ...
1289 (remote_private_inferior): ... this, initialize fields.
1290 (get_remote_inferior); New.
1291 (remote_commit_resume): Use get_remote_inferior.
1292 (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
1293
d044bac8
PA
12942017-11-24 Pedro Alves <palves@redhat.com>
1295
1296 * NEWS: Mention linespecs and explicit locations, and completion
1297 improvements.
1298
e8d58cba
YQ
12992017-11-24 Yao Qi <yao.qi@linaro.org>
1300
1301 * regcache.c (regcache::dump): Remove footnote_register_size.
1302
a63f2d2f
YQ
13032017-11-24 Yao Qi <yao.qi@linaro.org>
1304
1305 * regcache.c (cooked_read_test): Add more test for readonly
1306 regcache.
1307
1b30aaa5
YQ
13082017-11-24 Yao Qi <yao.qi@linaro.org>
1309
1310 * gdbarch-selftests.c (test_target_has_registers): Move it to
1311 target.c.
1312 (test_target_has_stack): Likewise.
1313 (test_target_has_memory): Likewise.
1314 (test_target_prepare_to_store): Likewise.
1315 (test_target_store_registers): Likewise.
1316 (test_target_ops): Likewise.
1317 * regcache.c: Include selftest-arch.h and gdbthread.h.
1318 (target_ops_no_register): New class.
1319 (test_target_fetch_registers): New.
1320 (test_target_store_registers): New.
1321 (test_target_xfer_partial): New.
1322 (readwrite_regcache): New.
1323 (cooked_read_test): New.
1324 (_initialize_regcache): Register the test.
1325 * target.c: (test_target_has_registers): Moved from
1326 gdbarch-selftests.c.
1327 (test_target_has_stack): Likewise.
1328 (test_target_has_memory): Likewise.
1329 (test_target_prepare_to_store): Likewise.
1330 (test_target_store_registers): Likewise.
1331 * target.h (test_target_ops): New class.
1332
6654d750
AH
13332017-11-24 Alan Hayward <alan.hayward@arm.com>
1334
1335 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
1336 selftest.
1337
49bdb7ee
AH
13382017-11-24 Alan Hayward <alan.hayward@arm.com>
1339
1340 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
1341 * arch/aarch64.c (aarch64_create_target_description): Create
1342 new target description.
1343 * features/Makefile: Add new files.
1344 * features/aarch64.c: Remove file.
1345 * features/aarch64-core.c: New autogenerated file.
1346 * features/aarch64-fpu.c: New autogenerated file.
1347 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
da434ccb
AH
1348
13492017-11-24 Alan Hayward <alan.hayward@arm.com>
1350
1351 * Makefile.in: Add new files.
1352 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
1353 aarch64_read_description.
1354 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1355 Call aarch64_read_description.
1356 * aarch64-tdep.c (aarch64_read_description): New function.
1357 (aarch64_gdbarch_init): Call aarch64_read_description.
1358 * aarch64-tdep.h (aarch64_read_description): New function.
1359 * arch/aarch64.c: New file.
1360 * configure.tgt: Add new files.
1361
98ead37e
YQ
13622017-11-24 Yao Qi <yao.qi@linaro.org>
1363
1364 * mi/mi-main.c (register_changed_p): Update.
1365 * value.c (value_contents_bits_eq): Change return type.
1366 (value_contents_eq): Likewise.
1367 * value.h: Update comments.
1368
62ad7ce7
YQ
13692017-11-24 Yao Qi <yao.qi@linaro.org>
1370
1371 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
1372 local 'changed'. Remove error.
1373 (register_changed_p): Change return type to bool.
1374
506fe5f4
YQ
13752017-11-24 Yao Qi <yao.qi@linaro.org>
1376
1377 * arch/tic6x.c: New file.
1378 * arch/tic6x.h: New file.
1379 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
1380 tic6x-core.xml and tic6x-gp.xml.
1381 * features/tic6x-c6xp.c: Generated.
1382 * features/tic6x-core.c: Generated.
1383 * features/tic6x-gp.c: Generated.
1384 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
1385 "tic6x-".
1386
00ea2e2a
SM
13872017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1388
1389 * mi/mi-main.c (list_available_thread_groups): Change map value
1390 type to std::vector.
1391
f45e2a77
SM
13922017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1393
1394 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
1395
bd046f64
SM
13962017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1397
1398 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
1399 back to...
1400 <children_requested>: ... this.
1401 (varobj_get_num_children, varobj_update): Adjust.
1402
4c37490d
SM
14032017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1404
1405 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
1406 (ada_value_has_mutated): Likewise.
1407 * c-varobj.c (varobj_is_anonymous_child): Likewise.
1408 (c_is_path_expr_parent): Likewise.
1409 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
1410 (mi_cmd_var_set_frozen): Likewise.
1411 (mi_cmd_var_update_iter): Likewise.
1412 (mi_cmd_var_update): Likewise.
1413 * varobj.c (pretty_printing): Likewise.
1414 (varobj_enable_pretty_printing): Likewise.
1415 (struct varobj_root) <floating, is_valid>: Likewise.
1416 (struct varobj_dynamic) <children_requested>: Likewise.
1417 (delete_variable): Likewise.
1418 (delete_variable_1): Likewise.
1419 (install_variable): Likewise.
1420 (update_type_if_necessary): Likewise.
1421 (install_new_value): Likewise.
1422 (value_of_root): Likewise.
1423 (is_root_p): Likewise.
1424 (varobj_create): Likewise.
1425 (varobj_delete): Likewise.
1426 (varobj_has_more): Likewise.
1427 (varobj_set_frozen): Likewise.
1428 (varobj_get_frozen): Likewise.
1429 (install_dynamic_child): Likewise.
1430 (dynamic_varobj_has_child_method): Likewise.
1431 (update_dynamic_varobj_children): Likewise.
1432 (varobj_get_num_children): Likewise.
1433 (varobj_list_children): Likewise.
1434 (is_path_expr_parent): Likewise.
1435 (varobj_default_is_path_expr_parent): Likewise.
1436 (varobj_is_dynamic_p): Likewise.
1437 (varobj_set_value): Likewise.
1438 (varobj_value_has_mutated): Likewise.
1439 (varobj_update): Likewise.
1440 (check_scope): Likewise.
1441 (value_of_root_1): Likewise.
1442 (varobj_value_get_print_value): Likewise.
1443 (varobj_editable_p): Likewise.
1444 (varobj_value_is_changeable_p): Likewise.
1445 (varobj_floating_p): Likewise.
1446 (varobj_default_value_is_changeable_p): Likewise.
1447 (varobj_invalidate_iter): Likewise.
1448 * varobj.h (struct varobj_update_result) <type_changed,
1449 children_changed, changed, value_installed>: Likewise.
1450 (struct varobj) <updated, frozen, not_fetched>: Likewise.
1451 (struct lang_varobj_ops) <value_is_changeable_p,
1452 value_has_mutated, is_path_expr_parent>: Likewise.
1453 (varobj_delete): Likewise.
1454 (varobj_set_frozen): Likewise.
1455 (varobj_get_frozen): Likewise.
1456 (varobj_set_value): Likewise.
1457 (varobj_update): Likewise.
1458 (varobj_editable_p): Likewise.
1459 (varobj_floating_p): Likewise.
1460 (varobj_has_more): Likewise.
1461 (varobj_is_dynamic_p): Likewise.
1462 (varobj_default_value_is_changeable_p): Likewise.
1463 (varobj_value_is_changeable_p): Likewise.
1464 (varobj_is_anonymous_child): Likewise.
1465 (varobj_default_is_path_expr_parent): Likewise.
1466
9c23b42f
SDJ
14672017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1468
1469 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
1470 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
1471 <type_str>: Convert to 'std::string'.
1472 <expr>: Convert to 'expression_up'.
1473 (dtrace_probe_arg_s): Delete type and VEC.
1474 (dtrace_probe_enabler_s): Likewise.
1475 (struct dtrace_probe): Replace by...
1476 (class dtrace_static_probe_ops): ...this and...
1477 (class dtrace_probe): ...this.
1478 (dtrace_probe_is_linespec): Rename to...
1479 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
1480 to reflect change.
1481 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
1482 Adjust code. Create new instance of 'dtrace_probe'.
1483 (dtrace_build_arg_exprs): Rename to...
1484 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
1485 reflect change.
1486 (dtrace_get_probes): Rename to...
1487 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
1488 to reflect change.
1489 (dtrace_get_arg): Rename to...
1490 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
1491 reflect change.
1492 (dtrace_probe_is_enabled): Rename to...
1493 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
1494 change.
1495 (dtrace_get_probe_address): Rename to...
1496 (dtrace_probe::get_relocated_address): ...this. Adjust code
1497 to reflect change.
1498 (dtrace_get_probe_argument_count): Rename to...
1499 (dtrace_probe::get_argument_count): ...this. Adjust code to
1500 reflect change.
1501 (dtrace_can_evaluate_probe_arguments): Rename to...
1502 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
1503 to reflect change.
1504 (dtrace_evaluate_probe_argument): Rename to...
1505 (dtrace_probe::evaluate_argument): ...this. Adjust code to
1506 reflect change.
1507 (dtrace_compile_to_ax): Rename to...
1508 (dtrace_probe::compile_to_ax): ...this. Adjust code to
1509 reflect change.
1510 (dtrace_probe_destroy): Delete.
1511 (dtrace_type_name): Rename to...
1512 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
1513 reflect change.
1514 (dtrace_probe::get_static_ops): New method.
1515 (dtrace_gen_info_probes_table_header): Rename to...
1516 (dtrace_static_probe_ops::gen_info_probes_table_header):
1517 ...this. Adjust code to reflect change.
1518 (dtrace_gen_info_probes_table_values): Rename to...
1519 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
1520 code to reflect change.
1521 (dtrace_enable_probe): Rename to...
1522 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
1523 change.
1524 (dtrace_disable_probe): Rename to...
1525 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
1526 change.
1527 (struct probe_ops dtrace_probe_ops): Delete.
1528 (info_probes_dtrace_command): Call 'info_probes_for_spops'
1529 instead of 'info_probes_for_ops'.
1530 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
1531 of 'all_probe_ops'.
1532
0e9ae10f
SDJ
15332017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1534 Simon Marchi <simark@simark.ca>
1535
1536 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
1537 variable.
1538 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
1539 <aexpr>: Change type to 'expression_up'.
1540 (stap_probe_arg_s): Delete type and VEC.
1541 (struct stap_probe): Delete. Replace by...
1542 (class stap_static_probe_ops): ...this and...
1543 (class stap_probe): ...this. Rename variables to add 'm_'
1544 prefix. Do not use 'union' for arguments anymore.
1545 (stap_get_expected_argument_type): Receive probe name instead
1546 of 'struct stap_probe'. Adjust code.
1547 (stap_parse_probe_arguments): Rename to...
1548 (stap_probe::parse_arguments): ...this. Adjust code to
1549 reflect change.
1550 (stap_get_probe_address): Rename to...
1551 (stap_probe::get_relocated_address): ...this. Adjust code
1552 to reflect change.
1553 (stap_get_probe_argument_count): Rename to...
1554 (stap_probe::get_argument_count): ...this. Adjust code
1555 to reflect change.
1556 (stap_get_arg): Rename to...
1557 (stap_probe::get_arg_by_number'): ...this. Adjust code to
1558 reflect change.
1559 (can_evaluate_probe_arguments): Rename to...
1560 (stap_probe::can_evaluate_arguments): ...this. Adjust code
1561 to reflect change.
1562 (stap_evaluate_probe_argument): Rename to...
1563 (stap_probe::evaluate_argument): ...this. Adjust code
1564 to reflect change.
1565 (stap_compile_to_ax): Rename to...
1566 (stap_probe::compile_to_ax): ...this. Adjust code to
1567 reflect change.
1568 (stap_probe_destroy): Delete.
1569 (stap_modify_semaphore): Adjust comment.
1570 (stap_set_semaphore): Rename to...
1571 (stap_probe::set_semaphore): ...this. Adjust code to reflect
1572 change.
1573 (stap_clear_semaphore): Rename to...
1574 (stap_probe::clear_semaphore): ...this. Adjust code to
1575 reflect change.
1576 (stap_probe::get_static_ops): New method.
1577 (handle_stap_probe): Adjust code to create instance of
1578 'stap_probe'.
1579 (stap_get_probes): Rename to...
1580 (stap_static_probe_ops::get_probes): ...this. Adjust code to
1581 reflect change.
1582 (stap_probe_is_linespec): Rename to...
1583 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
1584 reflect change.
1585 (stap_type_name): Rename to...
1586 (stap_static_probe_ops::type_name): ...this. Adjust code to
1587 reflect change.
1588 (stap_gen_info_probes_table_header): Rename to...
1589 (stap_static_probe_ops::gen_info_probes_table_header):
1590 ...this. Adjust code to reflect change.
1591 (stap_gen_info_probes_table_values): Rename to...
1592 (stap_probe::gen_info_probes_table_values): ...this. Adjust
1593 code to reflect change.
1594 (struct probe_ops stap_probe_ops): Delete.
1595 (info_probes_stap_command): Use 'info_probes_for_spops'
1596 instead of 'info_probes_for_ops'.
1597 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
1598 of 'all_probe_ops'.
1599
935676c9
SDJ
16002017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1601
1602 * break-catch-throw.c (fetch_probe_arguments): Use
1603 'probe.prob' instead of 'probe.probe'.
1604 * breakpoint.c (create_longjmp_master_breakpoint): Call
1605 'can_evaluate_arguments' and 'get_relocated_address' methods
1606 from probe.
1607 (create_exception_master_breakpoint): Likewise.
1608 (add_location_to_breakpoint): Use 'sal->prob' instead of
1609 'sal->probe'.
1610 (bkpt_probe_insert_location): Call 'set_semaphore' method from
1611 probe.
1612 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
1613 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
1614 of 'probe_ops'.
1615 (probe_key_free): Call 'delete' on probe.
1616 (check_exception_resume): Use 'probe.prob' instead of
1617 'probe.probe'.
1618 * location.c (string_to_event_location_basic): Call
1619 'probe_linespec_to_static_ops'.
1620 * probe.c (class any_static_probe_ops): New class.
1621 (any_static_probe_ops any_static_probe_ops): New variable.
1622 (parse_probes_in_pspace): Receive 'static_probe_ops' as
1623 argument. Adjust code to reflect change.
1624 (parse_probes): Use 'static_probe_ops' instead of
1625 'probe_ops'. Adjust code to reflect change.
1626 (find_probes_in_objfile): Call methods to get name and
1627 provider from probe.
1628 (find_probe_by_pc): Use 'result.prob' instead of
1629 'result.probe'. Call 'get_relocated_address' method from
1630 probe.
1631 (collect_probes): Adjust comment and argument list to receive
1632 'static_probe_ops' instead of 'probe_ops'. Adjust code to
1633 reflect change. Call necessary methods from probe.
1634 (compare_probes): Call methods to get name and provider from
1635 probes.
1636 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
1637 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
1638 adjust code accordingly.
1639 (print_ui_out_not_applicables): Likewise.
1640 (info_probes_for_ops): Rename to...
1641 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
1642 as argument instead of 'probe_ops'. Adjust code. Call
1643 necessary methods from probe.
1644 (info_probes_command): Use 'info_probes_for_spops'.
1645 (enable_probes_command): Pass correct argument to
1646 'collect_probes'. Call methods from probe.
1647 (disable_probes_command): Likewise.
1648 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
1649 (get_probe_argument_count): Move to
1650 'any_static_probe_ops::get_argument_count'.
1651 (can_evaluate_probe_arguments): Move to
1652 'any_static_probe_ops::can_evaluate_arguments'.
1653 (evaluate_probe_argument): Move to
1654 'any_static_probe_ops::evaluate_argument'.
1655 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
1656 'probe.probe'.
1657 (probe_linespec_to_ops): Rename to...
1658 (probe_linespec_to_static_ops): ...this. Adjust code.
1659 (probe_any_is_linespec): Rename to...
1660 (any_static_probe_ops::is_linespec): ...this.
1661 (probe_any_get_probes): Rename to...
1662 (any_static_probe_ops::get_probes): ...this.
1663 (any_static_probe_ops::type_name): New method.
1664 (any_static_probe_ops::gen_info_probes_table_header): New
1665 method.
1666 (compute_probe_arg): Use 'pc_probe.prob' instead of
1667 'pc_probe.probe'. Call methods from probe.
1668 (compile_probe_arg): Likewise.
1669 (std::vector<const probe_ops *> all_probe_ops): Delete.
1670 (std::vector<const static_probe_ops *> all_static_probe_ops):
1671 New variable.
1672 (_initialize_probe): Use 'all_static_probe_ops' instead of
1673 'all_probe_ops'.
1674 * probe.h (struct info_probe_column) <field_name>: Delete
1675 extraneous newline
1676 (info_probe_column_s): Delete type and VEC.
1677 (struct probe_ops): Delete. Replace with...
1678 (class static_probe_ops): ...this and...
1679 (clas probe): ...this.
1680 (struct bound_probe) <bound_probe>: Delete extraneous
1681 newline. Adjust constructor to receive 'probe' instead of
1682 'struct probe'.
1683 <probe>: Rename to...
1684 <prob>: ...this. Delete extraneous newline.
1685 <objfile>: Delete extraneous newline.
1686 (register_probe_ops): Delete unused prototype.
1687 (info_probes_for_ops): Rename to...
1688 (info_probes_for_spops): ...this. Adjust comment.
1689 (get_probe_address): Move to 'probe::get_address'.
1690 (get_probe_argument_count): Move to
1691 'probe::get_argument_count'.
1692 (can_evaluate_probe_arguments): Move to
1693 'probe::can_evaluate_arguments'.
1694 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
1695 * solib-svr4.c (struct svr4_info): Adjust comment.
1696 (struct probe_and_action) <probe>: Rename to...
1697 <prob>: ...this.
1698 (register_solib_event_probe): Receive 'probe' instead of
1699 'struct probe' as argument. Use 'prob' instead of 'probe'
1700 when applicable.
1701 (solib_event_probe_action): Call 'get_argument_count' method
1702 from probe. Adjust comment.
1703 (svr4_handle_solib_event): Adjust comment. Call
1704 'evaluate_argument' method from probe.
1705 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
1706 from probe.
1707 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
1708 'struct probe'. Call 'can_evaluate_arguments' from probe.
1709 * symfile.h: Forward declare 'class probe' instead of 'struct
1710 probe'.
1711 * symtab.h: Likewise.
1712 (struct symtab_and_line) <probe>: Rename to...
1713 <prob>: ...this.
1714 * tracepoint.c (start_tracing): Use 'prob' when applicable.
1715 Call probe methods.
1716 (stop_tracing): Likewise.
1717
8f6cb6c3
JB
17182017-11-22 Joel Brobecker <brobecker@adacore.com>
1719
1720 * ravenscar-thread.c (ravenscar_inferior_created): Remove
1721 trailing newline at end of string in call to warning.
1722
479f8de1
SM
17232017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1724
1725 * osdata.h: Include vector isntead of vec.h.
1726 (osdata_column_s): Remove typedef.
1727 (struct osdata_column): Add constructor.
1728 <name, value>: Change type to std::string.
1729 (DEF_VEC_O (osdata_column_s)): Remove.
1730 (osdata_item_s): Remove typedef.
1731 (struct osdata_item) <columns>: Change type to std::vector.
1732 (DEF_VEC_O (osdata_item_s)): Remove.
1733 (struct osdata): Add constructor.
1734 <type>: Change type to std::string.
1735 <items>: Change type to std::vector.
1736 (osdata_p): Remove typedef.
1737 (DEF_VEC_P (osdata_p)): Remove.
1738 (osdata_parse): Return a unique_ptr.
1739 (osdata_free): Remove.
1740 (make_cleanup_osdata_free): Remove.
1741 (get_osdata): Return a unique_ptr.
1742 (get_osdata_column): Return pointer to std::string, take a
1743 reference to osdata_item as parameter.
1744 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
1745 unique_ptr.
1746 <property_name>: Change type to std::string.
1747 (osdata_start_osdata): Allocate osdata with new and adjust.
1748 (osdata_start_item): Adjust.
1749 (osdata_start_column): Adjust.
1750 (osdata_end_column): Adjust.
1751 (clear_parsing_data): Remove.
1752 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
1753 (osdata_item_clear): Remove.
1754 (get_osdata): return a unique_ptr and adjust.
1755 (get_osdata_column): Return a pointer to std::string and adjust.
1756 (info_osdata): Adjust.
1757 * mi/mi-main.c: Include <map>.
1758 (free_vector_of_osdata_items): Remove.
1759 (list_available_thread_groups): Adjust, use std::map instead of
1760 splay tree.
1761
41bd68f5
SM
17622017-11-22 Simon Marchi <simon.marchi@ericsson.com>
1763
1764 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
1765 case in switch.
1766
7e2fd2f4
SM
17672017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1768
1769 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
1770
0604393c
SM
17712017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1772
1773 * varobj.h (struct varobj_update_result): Add constructor, add
1774 move constructor, disable copy and assign, initialize fields.
1775 <newobj>: Change type to std::vector.
1776 (varobj_update): Return std::vector.
1777 * varobj.c (install_dynamic_child): Change VEC parameters to
1778 std::vector and adjust.
1779 (update_dynamic_varobj_children): Likewise.
1780 (varobj_update): Return std::vector and adjust.
1781 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
1782
ddf0ea08
SM
17832017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1784
1785 * varobj.h (struct varobj) <parent>: Remove const.
1786 <children>: Change type to std::vector.
1787 (varobj_list_children): Return std::vector const reference.
1788 (varobj_restrict_range): Change parameter type to std::vector
1789 const reference.
1790 * varobj.c (varobj_has_more): Adjust.
1791 (varobj_restrict_range): Change parameter type to std::vector
1792 const reference and adjust.
1793 (install_dynamic_child): Adjust.
1794 (update_dynamic_varobj_children): Adjust.
1795 (varobj_list_children): Return std::vector const reference and
1796 adjust.
1797 (varobj_add_child): Adjust.
1798 (update_type_if_necessary): Adjust.
1799 (varobj_update): Adjust.
1800 (delete_variable_1): Adjust.
1801 * ada-varobj.c (ada_value_has_mutated): Adjust.
1802 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
1803
9e5b9d2b
SM
18042017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1805
1806 * varobj.h (struct varobj): Add constructor and destructor,
1807 initialize fields.
1808 * varobj.c (struct varobj_root): Initialize fields.
1809 (struct varobj_dynamic): Initialize fields.
1810 (varobj_create): Use unique_ptr instead of cleanup. Create
1811 varobj with new instead of new_root_variable.
1812 (delete_variable_1): Free variable with delete instead of
1813 free_variable.
1814 (create_child_with_value): Create variable with new instead of
1815 new_variable.
1816 (varobj::varobj): New.
1817 (varobj::~varobj): New (body mostly coming from free_variable).
1818 (new_variable): Remove.
1819 (free_variable): Remove.
1820 (do_free_variable_cleanup): Remove.
1821 (make_cleanup_free_variable): Remove.
1822
fc35dab1
UW
18232017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1824
1825 * core-regset.c: Remove file.
1826 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
1827
2400729e
UW
18282017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1829
1830 * NEWS: Document use of GNU MPFR.
1831 * README: Likewise.
1832
1833 * Makefile.in (LIBMPFR): Add define.
1834 (CLIBS): Add $(LIBMPFR).
1835 * configure.ac: Add --with-mpfr configure option.
1836 * configure: Regenerate.
1837 * config.in: Regenerate.
1838
1839 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
1840 (class mpfr_float_ops): New type.
1841 (mpfr_float_ops::from_target): Two new overloaded functions.
1842 (mpfr_float_ops::to_target): Likewise.
1843 (mpfr_float_ops::to_string): New function.
1844 (mpfr_float_ops::from_string): Likewise.
1845 (mpfr_float_ops::to_longest): Likewise.
1846 (mpfr_float_ops::from_longest): Likewise.
1847 (mpfr_float_ops::from_ulongest): Likewise.
1848 (mpfr_float_ops::to_host_double): Likewise.
1849 (mpfr_float_ops::from_host_double): Likewise.
1850 (mpfr_float_ops::convert): Likewise.
1851 (mpfr_float_ops::binop): Likewise.
1852 (mpfr_float_ops::compare): Likewise.
1853 (get_target_float_ops): Use mpfr_float_ops if available.
1854
7a26362d
UW
18552017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1856
1857 * target-float.c: Do not include <math.h>.
1858 Include <cmath> and <limits>.
1859 (DOUBLEST): Do not define.
1860 (class target_float_ops): New type.
1861 (class host_float_ops): New templated type.
1862 (class decimal_float_ops): New type.
1863
1864 (floatformat_to_doublest): Rename to ...
1865 (host_float_ops<T>::from_target): ... this. Use template type T
1866 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1867 (host_float_ops<T>::from_target): New overload using a type argument.
1868 (floatformat_from_doublest): Rename to ...
1869 (host_float_ops<T>::to_target): ... this. Use template type T
1870 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1871 (host_float_ops<T>::to_target): New overload using a type argument.
1872 (floatformat_printf_format): New function.
1873 (struct printf_length_modifier): New templated type.
1874 (floatformat_to_string): Rename to ...
1875 (host_float_ops<T>::to_string): ... this. Use type instead of
1876 floatformat argument. Use floatformat_printf_format and
1877 printf_length_modifier. Remove special handling of invalid numbers,
1878 infinities and NaN (moved to target_float_to_string).
1879 (struct scanf_length_modifier): New templated type.
1880 (floatformat_from_string): Rename to ...
1881 (host_float_ops<T>::from_string): ... this. Use type instead of
1882 floatformat argument. Use scanf_length_modifier.
1883 (floatformat_to_longest): Rename to ...
1884 (host_float_ops<T>::to_longest): ... this. Use type instead of
1885 floatformat argument. Handle out-of-range values deterministically.
1886 (floatformat_from_longest): Rename to ...
1887 (host_float_ops<T>::from_longest): ... this. Use type instead of
1888 floatformat argument.
1889 (floatformat_from_ulongest): Rename to ...
1890 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
1891 floatformat argument.
1892 (floatformat_to_host_double): Rename to ...
1893 (host_float_ops<T>::to_host_double): ... this. Use type instead of
1894 floatformat argument.
1895 (floatformat_from_host_double): Rename to ...
1896 (host_float_ops<T>::from_host_double): ... this. Use type instead of
1897 floatformat argument.
1898 (floatformat_convert): Rename to ...
1899 (host_float_ops<T>::convert): ... this. Use type instead of
1900 floatformat arguments. Remove handling of no-op conversions.
1901 (floatformat_binop): Rename to ...
1902 (host_float_ops<T>::binop): ... this. Use type instead of
1903 floatformat arguments.
1904 (floatformat_compare): Rename to ...
1905 (host_float_ops<T>::compare): ... this. Use type instead of
1906 floatformat arguments.
1907
1908 (match_endianness): Use type instead of length/byte_order arguments.
1909 (set_decnumber_context): Likewise.
1910 (decimal_from_number): Likewise. Update calls.
1911 (decimal_to_number): Likewise.
1912 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
1913 (decimal_float_ops::to_host_double): New dummy function.
1914 (decimal_float_ops::from_host_double): Likewise.
1915 (decimal_to_string): Rename to ...
1916 (decimal_float_ops::to_string): ... this. Use type instead of
1917 length/byte_order arguments. Update calls.
1918 (decimal_from_string): Rename to ...
1919 (decimal_float_ops::from_string): ... this. Use type instead of
1920 length/byte_order arguments. Update calls.
1921 (decimal_from_longest): Rename to ...
1922 (decimal_float_ops::from_longest): ... this. Use type instead of
1923 length/byte_order arguments. Update calls.
1924 (decimal_from_ulongest): Rename to ...
1925 (decimal_float_ops::from_ulongest): ... this. Use type instead of
1926 length/byte_order arguments. Update calls.
1927 (decimal_to_longest): Rename to ...
1928 (decimal_float_ops::to_longest): ... this. Use type instead of
1929 length/byte_order arguments. Update calls.
1930 (decimal_binop): Rename to ...
1931 (decimal_float_ops::binop): ... this. Use type instead of
1932 length/byte_order arguments. Update calls.
1933 (decimal_compare): Rename to ...
1934 (decimal_float_ops::compare): ... this. Use type instead of
1935 length/byte_order arguments. Update calls.
1936 (decimal_convert): Rename to ...
1937 (decimal_float_ops::convert): ... this. Use type instead of
1938 length/byte_order arguments. Update calls.
1939
1940 (target_float_same_category_p): New function.
1941 (target_float_same_format_p): Likewise.
1942 (target_float_format_length): Likewise.
1943 (enum target_float_ops_kind): New type.
1944 (get_target_float_ops_kind): New function.
1945 (get_target_float_ops): Three new overloaded functions.
1946
1947 (target_float_is_zero): Update call.
1948 (target_float_to_string): Add special handling of invalid numbers,
1949 infinities and NaN (moved from floatformat_to_string). Use
1950 target_float_ops callback.
1951 (target_float_from_string): Use target_float_ops callback.
1952 (target_float_to_longest): Likewise.
1953 (target_float_from_longest): Likewise.
1954 (target_float_from_ulongest): Likewise.
1955 (target_float_to_host_double): Likewise.
1956 (target_float_from_host_double): Likewise.
1957 (target_float_convert): Add special case for no-op conversions.
1958 Use target_float_ops callback.
1959 (target_float_binop): Use target_float_ops callback.
1960 (target_float_compare): Likewise.
1961
a9f26f60
YQ
19622017-11-22 Yao Qi <yao.qi@linaro.org>
1963
1964 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
1965
29f9a567
YQ
19662017-11-22 Yao Qi <yao.qi@linaro.org>
1967
1968 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
1969 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
1970
3b1b69bf
JG
19712017-11-21 Jerome Guitton <guitton@adacore.com>
1972
1973 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
1974 with event ptid from the lower layer before doing the
1975 ravenscar-specific update.
1976
54aa6c67
JB
19772017-11-21 Joel Brobecker <brobecker@adacore.com>
1978
1979 * ravenscar-thread.c (is_ravenscar_task): Also verify that
1980 the ptid's TID is nonzero.
1981
cf3fbed4
JB
19822017-11-21 Joel Brobecker <brobecker@adacore.com>
1983
1984 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
1985 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
1986 Make non-static. Change return type to char *. Adjust code
1987 accordingly. Rewrite the function's documentation.
1988 (read_atcb): Adjust call to get_tcb_types_info accordingly.
1989 * ravenscar-thread.c (ravenscar_inferior_created): Check that
1990 we have enough debugging information in the runtime to support
1991 Ada task debugging before we enable the ravenscar-thread layer.
1992
9edcc12f
JB
19932017-11-21 Joel Brobecker <brobecker@adacore.com>
1994
1995 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
1996 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
1997 * ravenscar-thread.c: Add into comment.
1998 (base_magic_null_ptid): Delete.
1999 (base_ptid): Change documentation.
2000 (ravenscar_active_task): Renames ravenscar_running_thread.
2001 All callers updated throughout.
2002 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
2003 (ravenscar_task_is_currently_active): Likewise.
2004 (get_base_thread_from_ravenscar_task): Ditto.
2005 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
2006 (ravenscar_runtime_initialized): Likewise.
2007 (get_running_thread_id): Add new parameter "cpu". Adjust
2008 implementation to handle this new parameter.
2009 (ravenscar_fetch_registers): Small adjustment to use
2010 is_ravenscar_task and ravenscar_task_is_currently_active in
2011 order to decide whether to use the target beneath or this
2012 module's arch_ops.
2013 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
2014 (ravenscar_stopped_by_sw_breakpoint): Use
2015 get_base_thread_from_ravenscar_task to get the underlying
2016 thread, rather than using base_ptid.
2017 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
2018 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
2019 Likewise.
2020 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
2021
65d40437
JB
20222017-11-21 Joel Brobecker <brobecker@adacore.com>
2023
2024 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
2025 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
2026 (get_tcb_types_info): Set fieldnos.base_cpu.
2027 (read_atcb): Set task_info->base_cpu.
2028 (info_task): Print "Base CPU" info if set by runtime.
2029
e02544b2
JB
20302017-11-21 Joel Brobecker <brobecker@adacore.com>
2031
2032 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
2033 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
2034 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
2035 New functions.
2036 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
2037 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
2038 to_stopped_data_address and to_core_of_thread fields of
2039 ravenscar_ops.
2040
ed0f4273
UW
20412017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
2042
2043 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
2044 (struct gdbarch_tdep): New member long_double_abi.
2045 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
2046 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
2047 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
2048 format depending on long_double_abi tdep member.
2049 (ppc_floatformat_for_type): Handle __ibm128 type.
2050
0fc76421
SM
20512017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
2052
2053 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
2054
e6b2f5ef
PA
20552017-11-21 Pedro Alves <palves@redhat.com>
2056
2057 * dwarf2read.c (mapped_index::find_name_components_bounds)
2058 <completion mode, upper bound>: Use std::lower_bound instead of
2059 std::upper_bound.
2060 (test_mapped_index_find_name_component_bounds): Remove incorrect
2061 "t1_fund" from expected symbols.
2062
5c58de74
PA
20632017-11-21 Pedro Alves <palves@redhat.com>
2064
2065 * dwarf2read.c (mapped_index::name_components_casing): New field.
2066 (mapped_index) <build_name_components,
2067 find_name_components_bounds): Declare new methods.
2068 (mapped_index::find_name_components_bounds)
2069 (mapped_index::build_name_components): New methods, factored out
2070 from dw2_expand_symtabs_matching_symbol.
2071 (check_find_bounds_finds)
2072 (test_mapped_index_find_name_component_bounds): New.
2073 (run_test): Rename to ...
2074 (test_dw2_expand_symtabs_matching_symbol): ... this.
2075 (run_test): Reimplement.
2076
e1ef7d7a
PA
20772017-11-21 Pedro Alves <palves@redhat.com>
2078
2079 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
2080 (symbol_end): Use cp_ident_is_alnum.
2081 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
2082 * dwarf2read.c (make_sort_after_prefix_name): New function.
2083 (dw2_expand_symtabs_matching_symbol): Use it.
2084 (test_symbols): Add more symbols.
2085 (run_test): Add tests.
2086
cf724bc9
TT
20872017-11-17 Tom Tromey <tom@tromey.com>
2088
2089 * symtab.h (enum symbol_subclass_kind): New.
2090 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
2091 Remove.
2092 <subclass>: New member.
2093 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
2094 * rust-lang.c (rust_get_trait_object_pointer): Update.
2095 * dwarf2read.c (read_func_scope): Update.
2096 (read_variable): Update.
2097
68e745e3
TT
20982017-11-17 Tom Tromey <tom@tromey.com>
2099
2100 * dwarf2read.c (read_func_scope): Update.
2101 * symtab.h (struct template_symbol): Derive from symbol.
2102 <base>: Remove.
2103
71a3c369
TT
21042017-11-17 Tom Tromey <tom@tromey.com>
2105
2106 * symtab.h (struct symbol) <is_rust_vtable>: New member.
2107 (struct rust_vtable_symbol): New.
2108 (find_symbol_at_address): Declare.
2109 * symtab.c (find_symbol_at_address): New function.
2110 * symfile.h (struct quick_symbol_functions)
2111 <find_compunit_symtab_by_address>: New member.
2112 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
2113 function.
2114 (debug_sym_quick_functions): Link to
2115 debug_qf_find_compunit_symtab_by_address.
2116 * rust-lang.c (rust_get_trait_object_pointer): New function.
2117 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
2118 rust_get_trait_object_pointer.
2119 * psymtab.c (psym_relocate): Clear psymbol_map.
2120 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
2121 functions.
2122 (psym_functions): Link to psym_find_compunit_symtab_by_address.
2123 * objfiles.h (struct objfile) <psymbol_map>: New member.
2124 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
2125 (process_die) <DW_TAG_variable>: New case. Call read_variable.
2126 (rust_containing_type, read_variable): New functions.
2127
7468702d
SM
21282017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2129
2130 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
2131
37269bc9
SM
21322017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2133
2134 * common/filestuff.c: Include <algorithm>.
2135 (open_fds): Change type to std::vector<int>.
2136 (do_mark_open_fd): Adjust.
2137 (unmark_fd_no_cloexec): Adjust.
2138 (do_close): Adjust.
2139
5c632425
SM
21402017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2141
2142 * breakpoint.c (output_thread_groups): Take an std::vector.
2143 (print_one_breakpoint_location): Adjust.
2144
ced9779b
JB
21452017-11-17 Joel Brobecker <brobecker@adacore.com>
2146
2147 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
2148 (ada_evaluate_subexp_for_cast): New function.
2149 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
2150 ada_evaluate_subexp_for_cast.
2151 (ada_evaluate_subexp) <nosideret>: Replace code by call to
2152 eval_skip_value.
2153 * eval.c (evaluate_var_value): Make non-static.
2154 (evaluate_var_msym_value, eval_skip_value): Likewise.
2155 * value.h (evaluate_var_value, evaluate_var_msym_value)
2156 (eval_skip_value): Declare.
2157
b7e22850
JB
21582017-11-16 Joel Brobecker <brobecker@adacore.com>
2159
2160 * ada-lang.c (ada_value_cast): Remove parameter "noside".
2161 Update all callers.
2162
9ccabccd
PA
21632017-11-16 Pedro Alves <palves@redhat.com>
2164
2165 * python/py-unwind.c (pyuw_sniffer): Translate
2166 PyExc_KeyboardInterrupt to a GDB Quit exception.
2167
d930703d
PA
21682017-11-16 Pedro Alves <palves@redhat.com>
2169
2170 * infrun.c (resume_cleanups): Delete.
2171 (resume): No longer install a resume_cleanups cleanup nor call
2172 QUIT.
2173 (proceed): Pass the terminal to the inferior.
2174 (keep_going_pass_signal): No longer install a resume_cleanups
2175 cleanup.
2176
38dc2859
PA
21772017-11-16 Pedro Alves <palves@redhat.com>
2178
2179 * inf-loop.c (inferior_event_handler): Don't swallow the exception
2180 if the prompt is blocked.
2181
688fca4f
PA
21822017-11-16 Pedro Alves <palves@redhat.com>
2183
2184 * breakpoint.c (insert_bp_location): Replace bp_err and
2185 bp_err_message locals by a gdb_exception local.
2186
e2c33ac7
PA
21872017-11-16 Pedro Alves <palves@redhat.com>
2188
2189 * inflow.c (scoped_ignore_sigttou): New class.
2190 (child_terminal_ours_1, new_tty): Use it.
2191
d7236961
UW
21922017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
2193
2194 * target-float.c (decimal_from_number): Add byte_order argument and
2195 call match_endianness. Error if unknown floating-point type.
2196 (decimal_to_number): Add byte_order argument and call match_endianness.
2197 (decimal_from_longest): Update call. Do not call match_endianness.
2198 (decimal_from_ulongest): Likewise.
2199 (decimal_binop): Likewise.
2200 (decimal_is_zero): Likewise.
2201 (decimal_compare): Likewise.
2202 (decimal_convert): Likewise.
2203
d8ae99a7
PM
22042017-11-16 Phil Muldoon <pmuldoon@redhat.com>
2205
2206 * python/python.c (gdbpy_rbreak): New function.
2207 * NEWS: Document Python rbreak feature.
2208
c632b645
YQ
22092017-11-16 Yao Qi <yao.qi@linaro.org>
2210
2211 * features/tic6x-c62x.xml: Remove.
2212 * features/tic6x-c64x.xml: Remove.
2213 * features/tic6x-c64xp.xml: Remove.
2214
a014b87a
JB
22152017-11-15 John Baldwin <jhb@FreeBSD.org>
2216
2217 * symtab.h: Include <array>.
2218
94765011
JB
22192017-11-15 John Baldwin <jhb@FreeBSD.org>
2220
2221 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
2222 (bsd_kvm_proc_cmd): Likewise.
2223
625ad440
SM
22242017-11-15 Simon Marchi <simon.marchi@ericsson.com>
2225
2226 * tui/tui-win.c (window_name_completer): Replace VEC with
2227 std::vector.
2228
c0c11fa9
AC
22292017-11-15 Andrew Cagney <cagney@gnu.org>
2230
2231 * MAINTAINERS: Remove no-longer applicable entries.
2232
34a7ebaf
AC
22332017-11-15 Andrew Cagney <cagney@gnu.org>
2234
2235 * MAINTAINERS: Move self to Past Maintainers.
2236
5334ef39
YQ
22372017-11-15 Yao Qi <yao.qi@linaro.org>
2238
2239 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
2240 * features/nios2-linux.c: Remove.
2241 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
2242 initialize_tdesc_nios2_linux.
2243
a714b0d6
YQ
22442017-11-15 Yao Qi <yao.qi@linaro.org>
2245
2246 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
2247 M68HC11_LAST_HARD_REG + 1.
2248
92ffd475
PC
22492017-11-14 Paul Carroll <pcarroll@codesourcery.com>
2250
2251 PR gdb/22388
2252 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
2253 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
2254 Return TARGET_XFER_EOF if size of returned data is 0.
2255
07431908
SM
22562017-11-14 Simon Marchi <simon.marchi@ericsson.com>
2257
2258 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2259 memory-map-selftests.c.
2260 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
2261 * memory-map.c (memory_map_start_memory): Fix computation of hi
2262 address.
2263 * unittests/memory-map-selftests.c: New file.
2264
31432a67
JB
22652017-11-09 Joel Brobecker <brobecker@adacore.com>
2266
2267 * ada-lang.c: Fix some typos in the general command documenting
2268 how Ada expressions are being evaluated and how their result
2269 is printed.
2270
e793c052
TT
22712017-11-09 Tom Tromey <tom@tromey.com>
2272
2273 * psymtab.c (psymbol_hash): Do not hash string contents.
2274 (psymbol_compare): Add comment.
2275
7e8835c5
TT
22762017-11-09 Tom Tromey <tom@tromey.com>
2277
2278 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
2279
286acbb5
JB
22802017-11-08 Joel Brobecker <brobecker@adacore.com>
2281
2282 * ada-exp.y (write_var_from_sym): Remove parameter
2283 "orig_left_context". Update all callers.
2284
b44ec619
SM
22852017-11-08 Simon Marchi <simon.marchi@ericsson.com>
2286
2287 * tracepoint.h (class collection_list) <stringify>: Return
2288 std::vector<std::string>.
2289 (encode_actions_rsp): Change parameters to
2290 std::vector<std::string> *.
2291 * tracepoint.c (collection_list::stringify): Return
2292 std::vector<std::string> and adjust accordingly.
2293 (encode_actions_rsp): Changee parameters to
2294 std::vector<std::string> and adjust accordingly.
2295 * remote.c (free_actions_list),
2296 free_actions_list_cleanup_wrapper): Remove.
2297 (remote_download_tracepoint): Adjust to std::vector.
2298
2f4732b0
TT
22992017-11-08 Tom Tromey <tom@tromey.com>
2300
2301 * dwarf2read.c (symbolp): Remove typedef.
2302 (read_func_scope): Use std::vector.
2303 (process_structure_scope): Use std::vector.
2304
f9d67a22
PA
23052017-11-08 Pedro Alves <palves@redhat.com>
2306
2307 * ada-lang.c (ada_make_symbol_completion_list): Use
2308 completion_skip_symbol.
2309 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
2310 (symbol_is_function_or_method(symbol*)): New.
2311 (add_symtab_completions): Add complete_symbol_mode parameter. Use
2312 completion_skip_symbol.
2313 (default_collect_symbol_completion_matches_break_on): Use
2314 completion_skip_symbol. Pass down mode.
2315 (collect_file_symbol_completion_matches): Pass down mode.
2316 * symtab.h (symbol_is_function_or_method): New declarations.
2317 (completion_skip_symbol): New template function.
2318
56d87ef7
PA
23192017-11-08 Pedro Alves <palves@redhat.com>
2320
2321 * linespec.c (iterate_over_all_matching_symtabs): Add
2322 search_domain parameter. Pass it down to expand_symtabs_matching.
2323 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
2324 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
2325 search_domain.
2326 (add_all_symbol_names_from_pspace): Add search_domain parameter.
2327 Pass it down.
2328 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
2329 symbols.
2330 (add_matching_symbols_to_info): Add search_domain parameter. Pass
2331 it down.
2332
1b026119
PA
23332017-11-08 Pedro Alves <palves@redhat.com>
2334
2335 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
2336 text_len locals and don't pass them down.
2337 * symtab.c (completion_list_add_name): Remove
2338 sym_text/sym_text_len parameters and adjust.
2339 (completion_list_add_symbol, completion_list_add_msymbol)
2340 (completion_list_objc_symbol, completion_list_add_fields)
2341 (add_symtab_completions): Likewise.
2342 (default_collect_symbol_completion_matches_break_on)
2343 (collect_file_symbol_completion_matches): Remove sym_text_len
2344 local and don't pass it down.
2345 * symtab.h (completion_list_add_name): Remove
2346 sym_text/sym_text_len parameters.
2347
c62446b1
PA
23482017-11-08 Pedro Alves <palves@redhat.com>
2349
2350 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2351 unittests/lookup_name_info-selftests.c.
2352 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
2353 * cp-support.c: Include "selftest.h".
2354 (cp_remove_params_1): Rename from cp_remove_params. Add
2355 'require_param' parameter, and handle it.
2356 (cp_remove_params): Reimplement.
2357 (cp_remove_params_if_any): New.
2358 (selftests::quote): New.
2359 (selftests::check_remove_params): New.
2360 (selftests::test_cp_remove_params): New.
2361 (_initialize_cp_support): Install
2362 selftests::test_cp_remove_params.
2363 * cp-support.h (cp_remove_params_if_any): Declare.
2364 * dwarf2read.c :Include "selftest.h".
2365 (dw2_expand_symtabs_matching_symbol): Use
2366 lookup_name_info::make_ignore_params.
2367 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
2368 (selftests::dw2_expand_symtabs_matching::string_or_null)
2369 (selftests::dw2_expand_symtabs_matching::check_match)
2370 (selftests::dw2_expand_symtabs_matching::test_symbols)
2371 (selftests::dw2_expand_symtabs_matching::run_test): New.
2372 (_initialize_dwarf2_read): Register
2373 selftests::dw2_expand_symtabs_matching::run_test.
2374 * psymtab.c (psym_expand_symtabs_matching): Use
2375 lookup_name_info::make_ignore_params.
2376 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
2377 If the lookup name wants to ignore parameters, strip them.
2378 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
2379 code handling '('.
2380 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
2381 (default_collect_symbol_completion_matches_break_on): Don't try to
2382 strip parameters.
2383 * symtab.h (lookup_name_info::lookup_name_info): Add
2384 'ignore_parameters' parameter.
2385 (lookup_name_info::ignore_parameters)
2386 (lookup_name_info::make_ignore_params): New methods.
2387 (lookup_name_info::m_ignore_parameters): New field.
2388 * unittests/lookup_name_info-selftests.c: New file.
2389
61920122
PA
23902017-11-08 Pedro Alves <palves@redhat.com>
2391
2392 * dwarf2read.c (dw2_expand_marked_cus)
2393 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
2394 (dw2_expand_symtabs_matching): Move further below.
2395 (dw2_expand_marked_cus): Reindent.
2396
3f563c84
PA
23972017-11-08 Pedro Alves <palves@redhat.com>
2398
2399 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
2400 (struct name_component): New.
2401 (mapped_index::name_components): New field.
2402 (mapped_index::symbol_name_at): New method.
2403 (dwarf2_read_index): Call mapped_index ctor.
2404 (dw2_map_matching_symbols): Add comment about name_components
2405 table.
2406 (dw2_expand_symtabs_matching): Factor part to...
2407 (dw2_expand_symtabs_matching_symbol): ... this new function.
2408 Build name components table, and lookup symbols in it before
2409 calling the name matcher.
2410 (dw2_expand_marked_cus): New, factored out from
2411 dw2_expand_symtabs_matching.
2412 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
2413
b5ec771e
PA
24142017-11-08 Pedro Alves <palves@redhat.com>
2415
2416 * ada-lang.c (ada_encode): Rename to ..
2417 (ada_encode_1): ... this. Add throw_errors parameter and handle
2418 it.
2419 (ada_encode): Reimplement.
2420 (match_name): Delete, folded into full_name.
2421 (resolve_subexp): No longer pass the encoded name to
2422 ada_lookup_symbol_list.
2423 (should_use_wild_match): Delete.
2424 (name_match_type_from_name): New.
2425 (ada_lookup_simple_minsym): Use lookup_name_info and the
2426 language's symbol_name_matcher_ftype.
2427 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
2428 (ada_add_block_renamings): Adjust to use lookup_name_info.
2429 (ada_lookup_name): New.
2430 (add_nonlocal_symbols, ada_add_all_symbols)
2431 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
2432 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
2433 (ada_name_for_lookup): Delete.
2434 (ada_lookup_encoded_symbol): Construct a verbatim name.
2435 (wild_match): Reverse sense of return type. Use bool.
2436 (full_match): Reverse sense of return type. Inline bits of old
2437 match_name here.
2438 (ada_add_block_symbols): Adjust to use lookup_name_info.
2439 (symbol_completion_match): Delete, folded into...
2440 (ada_lookup_name_info::matches): ... .this new method.
2441 (symbol_completion_add): Delete.
2442 (ada_collect_symbol_completion_matches): Add name_match_type
2443 parameter. Adjust to use lookup_name_info and
2444 completion_list_add_name.
2445 (get_var_value, ada_add_global_exceptions): Adjust to use
2446 lookup_name_info.
2447 (ada_get_symbol_name_cmp): Delete.
2448 (do_wild_match, do_full_match): New functions.
2449 (ada_lookup_name_info::ada_lookup_name_info): New method.
2450 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
2451 functions.
2452 (ada_language_defn): Install ada_get_symbol_name_matcher.
2453 * ada-lex.l (processId): If name starts with '<', copy it
2454 verbatim.
2455 * block.c (block_iter_match_step, block_iter_match_first)
2456 (block_iter_match_next, block_lookup_symbol)
2457 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
2458 lookup_name_info.
2459 * block.h (block_iter_match_first, block_iter_match_next)
2460 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
2461 * c-lang.c (c_language_defn, cplus_language_defn)
2462 (asm_language_defn, minimal_language_defn): Adjust comments to
2463 refer to la_get_symbol_name_matcher.
2464 * completer.c (complete_files_symbols)
2465 (collect_explicit_location_matches, symbol_completer): Pass a
2466 symbol_name_match_type down.
2467 * completer.h (class completion_match, completion_match_result):
2468 New classes.
2469 (completion_tracker::reset_completion_match_result): New method.
2470 (completion_tracker::m_completion_match_result): New field.
2471 * cp-support.c (make_symbol_overload_list_block): Adjust to use
2472 lookup_name_info.
2473 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
2474 functions.
2475 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
2476 * d-lang.c: Adjust comments to refer to
2477 la_get_symbol_name_matcher.
2478 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
2479 Adjust to use lookup_name_info.
2480 (dict_iter_match_first, dict_iter_match_next)
2481 (iter_match_first_hashed, iter_match_next_hashed)
2482 (iter_match_first_linear, iter_match_next_linear): Adjust to work
2483 with a lookup_name_info.
2484 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
2485 Likewise.
2486 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
2487 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
2488 (gdb_index_symbol_name_matcher): New class.
2489 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
2490 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
2491 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
2492 with a symbol_name_match_type.
2493 (f_language_defn): Adjust comments to refer to
2494 la_get_symbol_name_matcher.
2495 * go-lang.c (go_language_defn): Adjust comments to refer to
2496 la_get_symbol_name_matcher.
2497 * language.c (default_symbol_name_matcher)
2498 (language_get_symbol_name_matcher): New functions.
2499 (unknown_language_defn, auto_language_defn): Adjust comments to
2500 refer to la_get_symbol_name_matcher.
2501 * language.h (symbol_name_cmp_ftype): Delete.
2502 (language_defn) <la_collect_symbol_completion_matches>: Add match
2503 type parameter.
2504 <la_get_symbol_name_cmp>: Delete field.
2505 <la_get_symbol_name_matcher>: New field.
2506 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
2507 (default_symbol_name_matcher, language_get_symbol_name_matcher):
2508 Declare.
2509 * linespec.c (iterate_over_all_matching_symtabs)
2510 (iterate_over_file_blocks): Adjust to use lookup_name_info.
2511 (find_methods): Add language parameter, and use lookup_name_info
2512 and the language's symbol_name_matcher_ftype.
2513 (linespec_complete_function): Adjust.
2514 (lookup_prefix_sym): Use lookup_name_info.
2515 (add_all_symbol_names_from_pspace): Adjust.
2516 (find_superclass_methods): Add language parameter and pass it
2517 down.
2518 (find_method): Pass symbol language down.
2519 (find_linespec_symbols): Don't demangle or Ada encode here.
2520 (search_minsyms_for_name): Add lookup_name_info parameter.
2521 (add_matching_symbols_to_info): Add name_match_type parameter.
2522 Use lookup_name_info.
2523 * m2-lang.c (m2_language_defn): Adjust comments to refer to
2524 la_get_symbol_name_matcher.
2525 * minsyms.c: Include <algorithm>.
2526 (add_minsym_to_demangled_hash_table): Remove table parameter and
2527 add objfile parameter. Use search_name_hash, and add language to
2528 demangled languages vector.
2529 (struct found_minimal_symbols): New struct.
2530 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
2531 New functions.
2532 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
2533 input names here. Use lookup_name_info instead. Lookup up
2534 demangled names once for each language in the demangled names
2535 vector.
2536 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
2537 demangled names once for each language in the demangled names
2538 vector.
2539 (build_minimal_symbol_hash_tables): Adjust.
2540 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
2541 lookup_name_info.
2542 * objc-lang.c (objc_language_defn): Adjust comment to refer to
2543 la_get_symbol_name_matcher.
2544 * objfiles.h: Include <vector>.
2545 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
2546 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
2547 la_get_symbol_name_matcher.
2548 * p-lang.c (pascal_language_defn): Adjust comment to refer to
2549 la_get_symbol_name_matcher.
2550 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
2551 (match_partial_symbol): Use symbol_name_match_type,
2552 lookup_name_info and psymbol_name_matches.
2553 (lookup_partial_symbol): Use lookup_name_info.
2554 (map_block): Use symbol_name_match_type and lookup_name_info.
2555 (psym_map_matching_symbols): Use symbol_name_match_type.
2556 (psymbol_name_matches): New.
2557 (recursively_search_psymtabs): Use lookup_name_info and
2558 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
2559 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
2560 'kind' parameter to 'domain'.
2561 * rust-lang.c (rust_language_defn): Adjust comment to refer to
2562 la_get_symbol_name_matcher.
2563 * symfile-debug.c (debug_qf_map_matching_symbols)
2564 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
2565 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
2566 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
2567 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
2568 Adjust to use symbol_name_match_type.
2569 <expand_symtabs_matching>: Adjust to use lookup_name_info.
2570 (expand_symtabs_matching): Adjust to use lookup_name_info.
2571 * symmisc.c (maintenance_expand_symtabs): Use
2572 lookup_name_info::match_any ().
2573 * symtab.c (symbol_matches_search_name): New.
2574 (eq_symbol_entry): Adjust to use lookup_name_info and the
2575 language's matcher.
2576 (demangle_for_lookup_info::demangle_for_lookup_info): New.
2577 (lookup_name_info::match_any): New.
2578 (iterate_over_symbols, search_symbols): Use lookup_name_info.
2579 (compare_symbol_name): Add language, lookup_name_info and
2580 completion_match_result parameters, and use them.
2581 (completion_list_add_name): Make extern. Add language and
2582 lookup_name_info parameters. Use them.
2583 (completion_list_add_symbol, completion_list_add_msymbol)
2584 (completion_list_objc_symbol): Add lookup_name_info parameters and
2585 adjust. Pass down language.
2586 (completion_list_add_fields): Add lookup_name_info parameters and
2587 adjust. Pass down language.
2588 (add_symtab_completions): Add lookup_name_info parameters and
2589 adjust.
2590 (default_collect_symbol_completion_matches_break_on): Add
2591 name_match_type parameter, and use it. Use lookup_name_info.
2592 (default_collect_symbol_completion_matches)
2593 (collect_symbol_completion_matches): Add name_match_type
2594 parameter, and pass it down.
2595 (collect_symbol_completion_matches_type): Adjust.
2596 (collect_file_symbol_completion_matches): Add name_match_type
2597 parameter, and use lookup_name_info.
2598 * symtab.h: Include <string> and "common/gdb_optional.h".
2599 (enum class symbol_name_match_type): New.
2600 (class ada_lookup_name_info): New.
2601 (struct demangle_for_lookup_info): New.
2602 (class lookup_name_info): New.
2603 (symbol_name_matcher_ftype): New.
2604 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
2605 (symbol_matches_search_name): Declare.
2606 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
2607 (default_collect_symbol_completion_matches)
2608 (collect_symbol_completion_matches)
2609 (collect_file_symbol_completion_matches): Add name_match_type
2610 parameter.
2611 (iterate_over_symbols): Use lookup_name_info.
2612 (completion_list_add_name): Declare.
2613 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
2614 (strncmp_iw_with_mode): Now extern.
2615 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
2616 (strncmp_iw_with_mode): Declare.
2617
5ffa0793
PA
26182017-11-08 Keith Seitz <keiths@redhat.com>
2619 Pedro Alves <palves@redhat.com>
2620
2621 * ada-lang.c (ada_language_defn): Install
2622 default_search_name_hash.
2623 * buildsym.c (struct buildsym_compunit): <language>: New field.
2624 (finish_block_internal): Pass language when creating dictionaries.
2625 (start_buildsym_compunit, start_symtab): New language parameters.
2626 Use them.
2627 (restart_symtab): Pass down compilation unit's language.
2628 * buildsym.h (enum language): Forward declare.
2629 (start_symtab): New 'language' parameter.
2630 * c-lang.c (c_language_defn, cplus_language_defn)
2631 (asm_language_defn, minimal_language_defn): Install
2632 default_search_name_hash.
2633 * coffread.c (coff_start_symtab): Adjust.
2634 * d-lang.c (d_language_defn): Install default_search_name_hash.
2635 * dbxread.c (struct symloc): Add 'pst_language' field.
2636 (PST_LANGUAGE): Define.
2637 (start_psymtab, read_ofile_symtab): Use it.
2638 (process_one_symbol): New 'language' parameter. Pass it down.
2639 * dictionary.c (struct dictionary) <language>: New field.
2640 (DICT_LANGUAGE): Define.
2641 (dict_create_hashed, dict_create_hashed_expandable)
2642 (dict_create_linear, dict_create_linear_expandable): New parameter
2643 'language'. Set the dictionary's language.
2644 (iter_match_first_hashed): Adjust to rename.
2645 (insert_symbol_hashed): Assert we don't see mismatching
2646 languages. Adjust to rename.
2647 (dict_hash): Rename to ...
2648 (default_search_name_hash): ... this and make extern.
2649 * dictionary.h (struct language_defn): Forward declare.
2650 (dict_create_hashed): New parameter 'language'.
2651 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
2652 * f-lang.c (f_language_defn): Install default_search_name_hash.
2653 * go-lang.c (go_language_defn): Install default_search_name_hash.
2654 * jit.c (finalize_symtab): Pass compunit's language to dictionary
2655 creation.
2656 * language.c (unknown_language_defn, auto_language_defn):
2657 * language.h (language_defn::la_search_name_hash): New field.
2658 (default_search_name_hash): Declare.
2659 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
2660 * mdebugread.c (new_block): New parameter 'language'.
2661 * mdebugread.c (parse_symbol): Pass symbol language to block
2662 allocation.
2663 (psymtab_to_symtab_1): Pass down language.
2664 (new_symtab): Pass compunit's language to block allocation.
2665 * objc-lang.c (objc_language_defn): Install
2666 default_search_name_hash.
2667 * opencl-lang.c (opencl_language_defn):
2668 * p-lang.c (pascal_language_defn): Install
2669 default_search_name_hash.
2670 * rust-lang.c (rust_language_defn): Install
2671 default_search_name_hash.
2672 * stabsread.h (enum language): Forward declare.
2673 (process_one_symbol): Add 'language' parameter.
2674 * symtab.c (search_name_hash): New function.
2675 * symtab.h (search_name_hash): Declare.
2676 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
2677
2a1dde5d
PA
26782017-11-08 Pedro Alves <palves@redhat.com>
2679
2680 * cp-name-parser.y (main): Don't initialize extra_chars.
2681
95a6b0a1
TT
26822017-11-07 Tom Tromey <tom@tromey.com>
2683
2684 * event-top.h (command_handler): Constify.
2685 * record-full.c (cmd_record_full_start): Update.
2686 * thread.c (thread_apply_all_command): Update.
2687 * printcmd.c (eval_command): Update.
2688 * mi/mi-main.c (mi_execute_cli_command): Update.
2689 (mi_execute_async_cli_command): Update.
2690 * tui/tui-stack.c (tui_update_command): Update.
2691 * cli/cli-interp.c (safe_execute_command): Constify.
2692 * record.c (record_start): Update.
2693 (record_start, record_stop, cmd_record_start): Update.
2694 * record-btrace.c (cmd_record_btrace_bts_start): Update.
2695 (cmd_record_btrace_pt_start): Update.
2696 (cmd_record_btrace_start): Update.
2697 (cmd_record_btrace_start): Update.
2698 * reverse.c (exec_reverse_once): Update.
2699 * python/python.c (execute_gdb_command): Don't copy the command.
2700 * event-top.c (command_line_handler): Update.
2701 (command_handler): Constify.
2702 * defs.h (deprecated_call_command_hook): Constify.
2703 * cli/cli-script.h (execute_user_command): Constify.
2704 * cli/cli-script.c (execute_user_command): Constify.
2705 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
2706 (enum command_control_type): Update.
2707 * main.c (catch_command_errors): Remove non-const overload.
2708 (catch_command_errors_ftype): Remove.
2709 * python/py-cmd.c (cmdpy_function): Constify.
2710 * guile/scm-cmd.c (cmdscm_function): Constify.
2711 * cli/cli-dump.c (call_dump_func): Constify.
2712 * cli/cli-decode.c (do_const_cfunc): Constify.
2713 (do_sfunc): Constify.
2714 (cmd_func): Constify.
2715 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
2716 * top.h (execute_command): Constify.
2717 * top.c (execute_command): Constify.
2718 (execute_command_to_string): Constify.
2719 (deprecated_call_command_hook): Constify.
2720 * command.h (cmd_func): Constify.
2721 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
2722
eb4c3f4a
TT
27232017-11-07 Tom Tromey <tom@tromey.com>
2724
2725 * ada-lang.c (catch_ada_exception_command): Constify.
2726 (catch_assert_command): Constify.
2727 * break-catch-throw.c (catch_catch_command, catch_throw_command)
2728 (catch_rethrow_command): Constify.
2729 (catch_exception_command_1): Constify.
2730 * breakpoint.h (add_catch_command): Constify.
2731 * break-catch-syscall.c (catch_syscall_command_1): Constify.
2732 (catch_syscall_split_args): Constify.
2733 * break-catch-sig.c (catch_signal_command): Constify.
2734 (catch_signal_split_args): Constify.
2735 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
2736 cmd_const_sfunc_ftype.
2737 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
2738 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2739 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2740 (add_setshow_string_cmd, struct cmd_list_element)
2741 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2742 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2743 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
2744 Constify.
2745 (set_cmd_sfunc): Constify.
2746 (empty_sfunc): Constify.
2747 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2748 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2749 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
2750 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2751 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2752 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
2753 Constify.
2754 (set_cmd_sfunc): Constify.
2755 (cmd_sfunc_ftype): Remove.
2756 * compile/compile.c (set_compile_args): Constify.
2757 * infrun.c (set_disable_randomization): Constify.
2758 * infcmd.c (set_args_command, set_cwd_command): Constify.
2759 * breakpoint.c (set_condition_evaluation_mode): Constify.
2760 (add_catch_command): Constify.
2761 (catch_fork_command_1, catch_exec_command_1)
2762 (catch_load_command_1, catch_unload_command_1): Constify.
2763 (catch_load_or_unload): Constify.
2764 * guile/scm-param.c (pascm_set_func): Constify.
2765 (add_setshow_generic): Constify.
2766 * python/py-param.c (get_set_value): Constify.
2767 * top.h (set_verbose): Constify.
2768 * tui/tui-win.c (tui_set_var_cmd): Constify.
2769 * mi/mi-main.c (set_mi_async_command): Constify.
2770 * cli/cli-logging.c (set_logging_overwrite)
2771 (set_logging_redirect): Constify.
2772 * value.c (set_max_value_size): Constify.
2773 * valprint.c (set_input_radix, set_output_radix): Constify.
2774 * utils.c (set_width_command, set_height_command): Constify.
2775 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
2776 * tracepoint.c (set_disconnected_tracing)
2777 (set_circular_trace_buffer, set_trace_buffer_size)
2778 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
2779 * top.c (set_history_size_command, set_verbose, set_editing)
2780 (set_gdb_datadir, set_history_filename): Constify.
2781 * target.c (set_targetdebug, maint_set_target_async_command)
2782 (maint_set_target_non_stop_command, set_target_permissions)
2783 (set_write_memory_permission): Constify.
2784 (open_target): Constify.
2785 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
2786 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
2787 * symtab.c (set_symbol_cache_size_handler): Constify.
2788 * symfile.c (set_ext_lang_command): Constify.
2789 * symfile-debug.c (set_debug_symfile): Constify.
2790 * source.c (set_directories_command): Constify.
2791 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
2792 * serial.c (set_parity): Constify.
2793 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
2794 * remote.c (set_remote_exec_file, set_remotebreak)
2795 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
2796 * record.c (set_record_insn_history_size)
2797 (set_record_call_history_size): Constify.
2798 * record-full.c (set_record_full_insn_max_num): Constify.
2799 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
2800 * osabi.c (set_osabi): Constify.
2801 * mips-tdep.c (set_mips64_transfers_32bit_regs)
2802 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
2803 * maint.c (maintenance_set_profile_cmd): Constify.
2804 * linux-thread-db.c (set_libthread_db_search_path): Constify.
2805 * language.c (set_language_command, set_range_command)
2806 (set_case_command): Constify.
2807 * infrun.c (set_non_stop, set_observer_mode)
2808 (set_stop_on_solib_events, set_schedlock_func)
2809 (set_exec_direction_func): Constify.
2810 * infcmd.c (set_inferior_tty_command): Constify.
2811 * disasm.c (set_disassembler_options_sfunc): Constify.
2812 * demangle.c (set_demangling_command): Constify.
2813 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
2814 * cris-tdep.c (set_cris_version, set_cris_mode)
2815 (set_cris_dwarf2_cfi): Constify.
2816 * corefile.c (set_gnutarget_command): Constify.
2817 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
2818 (set_target_wide_charset_sfunc): Constify.
2819 * breakpoint.c (update_dprintf_commands): Constify.
2820 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
2821 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
2822 (set_disassembly_style_sfunc): Constify.
2823 * arch-utils.c (set_endian, set_architecture): Constify.
2824 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
2825 * agent.c (set_can_use_agent): Constify.
2826
5fed81ff
TT
28272017-11-07 Tom Tromey <tom@tromey.com>
2828
2829 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
2830 (go32_pde, go32_pte, go32_pte_for_address): Constify.
2831 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
2832 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
2833 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
2834 (parse_int_arg, show_thread_default_detach_sc_cmd)
2835 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
2836 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
2837 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
2838 (show_task_pause_cmd, set_task_detach_sc_cmd)
2839 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
2840 (set_noninvasive_cmd, set_thread_pause_cmd)
2841 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
2842 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
2843 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
2844 * windows-nat.c (display_selectors): Constify.
2845 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
2846 non-const "cfunc".
2847 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
2848 (cmd_cfunc_eq): Likewise.
2849 (struct cmd_list_element): Likewise.
2850 (do_cfunc): Remove.
2851 (cli_user_command_p): Update.
2852 * command.h (add_cmd): Remove non-const overload.
2853 (cmd_cfunc_ftype): Remove typedef.
2854 (cmd_cfunc_eq): Remove non-const overload.
2855 * value.c (show_values): Constify.
2856 * thread.c (thread_apply_all_command): Constify.
2857 * symfile.c (load_command): Constify.
2858 * source.c (directory_command): Constify.
2859 * maint.c (maintenance_internal_error)
2860 (maintenance_demangler_warning, maintenance_space_display)
2861 (maintenance_print_architecture, maintenance_translate_address)
2862 (maintenance_info_selftests, maintenance_internal_warning):
2863 Constify.
2864 * breakpoint.c (disable_trace_command, enable_trace_command):
2865 Constify.
2866 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
2867 Constify.
2868 (add_auto_load_safe_path): Constify.
2869 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
2870 * top.h (show_commands): Constify.
2871 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
2872 * sparc64-tdep.c (adi_examine_command): Constify.
2873 (adi_assign_command): Constify.
2874
1d12d88f
TT
28752017-11-07 Tom Tromey <tom@tromey.com>
2876
2877 * frame.h (info_locals_command, info_args_command): Constify.
2878 * auto-load.h (auto_load_info_scripts): Constify.
2879 * inferior.h (registers_info): Constify.
2880 * copying.c: Rebuild.
2881 * copying.awk: Constify generated commands.
2882 * auto-load.c (auto_load_info_scripts)
2883 (info_auto_load_gdb_scripts): Constify.
2884 * cli/cli-decode.c (struct cmd_list_element): Take a
2885 cmd_const_cfunc_ftype.
2886 * command.h (add_info): Take a cmd_const_cfunc_ftype.
2887 * tui/tui-win.c (tui_all_windows_info): Constify.
2888 * python/py-auto-load.c (info_auto_load_python_scripts):
2889 Constify.
2890 * cli/cli-cmds.c (show_command): Remove non-const overload.
2891 * tracepoint.c (info_tvariables_command, info_scope_command):
2892 Constify.
2893 (info_static_tracepoint_markers_command): Constify.
2894 * thread.c (info_threads_command): Constify.
2895 (print_thread_info_1): Constify.
2896 * target.c (info_target_command): Constify.
2897 * symtab.c (info_sources_command, info_functions_command)
2898 (info_types_command): Constify.
2899 (info_variables_command): Remove non-const overload.
2900 * symfile.c (info_ext_lang_command): Constify.
2901 * stack.c (info_frame_command, info_locals_command)
2902 (info_args_command): Constify.
2903 (backtrace_command): Remove non-const overload.
2904 * source.c (info_source_command, info_line_command): Constify.
2905 * solib.c (info_sharedlibrary_command): Constify.
2906 * skip.c (info_skip_command): Constify.
2907 * ser-go32.c (info_serial_command): Constify.
2908 * reverse.c (info_bookmarks_command): Constify.
2909 * printcmd.c (info_symbol_command, info_address_command)
2910 (info_display_command): Constify.
2911 * osdata.c (info_osdata_command): Constify.
2912 * objc-lang.c (info_selectors_command, info_classes_command):
2913 Constify.
2914 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
2915 * memattr.c (info_mem_command): Constify.
2916 * macrocmd.c (info_macro_command, info_macros_command): Constify.
2917 * linux-fork.c (info_checkpoints_command): Constify.
2918 * infrun.c (info_signals_command): Constify.
2919 * inflow.c (info_terminal_command): Constify.
2920 * inferior.c (info_inferiors_command): Constify.
2921 (print_inferior): Constify.
2922 * infcmd.c (info_program_command, info_all_registers_command)
2923 (info_registers_command, info_vector_command)
2924 (info_float_command): Constify.
2925 (registers_info): Constify.
2926 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
2927 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
2928 Constify.
2929 * f-valprint.c (info_common_command): Constify.
2930 * dcache.c (info_dcache_command): Constify.
2931 (dcache_info_1): Constify.
2932 * darwin-nat-info.c (info_mach_tasks_command)
2933 (info_mach_task_command, info_mach_ports_command)
2934 (info_mach_port_command, info_mach_threads_command)
2935 (info_mach_thread_command, info_mach_regions_command)
2936 (info_mach_regions_recurse_command, info_mach_region_command)
2937 (info_mach_exceptions_command): Constify.
2938 (get_task_from_args): Constify.
2939 * cp-support.c (info_vtbl_command): Constify.
2940 * breakpoint.c (info_watchpoints_command)
2941 (info_tracepoints_command): Constify.
2942 (info_breakpoints_command): Remove non-const overload.
2943 * avr-tdep.c (avr_io_reg_read_command): Constify.
2944 * auxv.c (info_auxv_command): Constify.
2945 * ada-tasks.c (info_tasks_command): Constify.
2946 (info_task): Constify.
2947 * ada-lang.c (info_exceptions_command): Constify.
2948
0b39b52e
TT
29492017-11-07 Tom Tromey <tom@tromey.com>
2950
2951 * solib.h (no_shared_libraries): Constify.
2952 * frame.h (return_command): Constify.
2953 * cli/cli-cmds.h (quit_command): Constify.
2954 * top.h (quit_command, execute_command): Constify.
2955 * target.h (flash_erase_command): Constify.
2956 * inferior.h (set_inferior_args, attach_command): Constify.
2957 * tracepoint.h (start_tracing, stop_tracing): Constify.
2958 * breakpoint.h (break_command, tbreak_command)
2959 (hbreak_command_wrapper, thbreak_command_wrapper)
2960 (rbreak_command_wrapper, watch_command_wrapper)
2961 (awatch_command_wrapper, rwatch_command_wrapper)
2962 (get_tracepoint_by_number): Constify.
2963 * symtab.c (info_variables_command, rbreak_command)
2964 (symtab_symbol_info): Constify.
2965 (info_variables_command): Add non-const overload.
2966 * top.c (dont_repeat_command): Constify.
2967 * breakpoint.c (ignore_command, commands_command)
2968 (condition_command, tbreak_command, hbreak_command)
2969 (thbreak_command, clear_command, break_command)
2970 (info_breakpoints_command, watch_command, rwatch_command)
2971 (awatch_command, trace_command, ftrace_command, strace_command)
2972 (trace_pass_command, break_range_command, dprintf_command)
2973 (agent_printf_command, get_tracepoint_by_number)
2974 (watch_maybe_just_location, trace_pass_command): Constify.
2975 (info_breakpoints_command): Add non-const overload.
2976 * tracefile.c (tsave_command): Constify.
2977 * infcmd.c (attach_command, disconnect_command, signal_command)
2978 (queue_signal_command, stepi_command, nexti_command)
2979 (finish_command, next_command, step_command, until_command)
2980 (advance_command, jump_command, continue_command, run_command)
2981 (start_command, starti_command, interrupt_command)
2982 (run_command_1, set_inferior_args, step_1): Constify.
2983 * inferior.c (add_inferior_command, remove_inferior_command)
2984 (clone_inferior_command): Constify.
2985 * linux-fork.c (checkpoint_command, restart_command): Constify.
2986 * windows-nat.c (signal_event_command): Constify.
2987 * guile/guile.c (guile_repl_command, guile_command): Constify.
2988 * printcmd.c (x_command, display_command, printf_command)
2989 (output_command, set_command, call_command, print_command)
2990 (eval_command): Constify.
2991 (non_const_set_command): Remove.
2992 (_initialize_printcmd): Update.
2993 * source.c (forward_search_command, reverse_search_command):
2994 Constify.
2995 * jit.c (jit_reader_load_command, jit_reader_unload_command):
2996 Constify.
2997 * infrun.c (handle_command): Constify.
2998 * memattr.c (mem_command): Constify.
2999 * stack.c (return_command, up_command, up_silently_command)
3000 (down_command, down_silently_command, frame_command)
3001 (backtrace_command, func_command, backtrace_command_1): Constify.
3002 (backtrace_command): Add non-const overload.
3003 * remote-sim.c (simulator_command): Constify.
3004 * exec.c (set_section_command): Constify.
3005 * tracepoint.c (tdump_command, trace_variable_command)
3006 (tstatus_command, tstop_command, tstart_command)
3007 (end_actions_pseudocommand, while_stepping_pseudocommand)
3008 (collect_pseudocommand, teval_pseudocommand, actions_command)
3009 (start_tracing, stop_tracing): Constify.
3010 * value.c (init_if_undefined_command): Constify.
3011 * tui/tui-stack.c (tui_update_command): Constify.
3012 * tui/tui-win.c (tui_refresh_all_command)
3013 (tui_set_tab_width_command, tui_set_win_height_command)
3014 (tui_set_focus_command, tui_scroll_forward_command)
3015 (tui_scroll_backward_command, tui_scroll_left_command)
3016 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
3017 (tui_set_win_height): Constify.
3018 * tui/tui-layout.c (tui_layout_command): Constify.
3019 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
3020 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
3021 (proc_untrace_sysexit_cmd): Constify.
3022 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
3023 (threadset_test_cmd, threadlist_update_test_cmd)
3024 (threadalive_test): Constify.
3025 * objc-lang.c (print_object_command): Constify.
3026 * command.h (add_com): Constify.
3027 * cli/cli-dump.c (restore_command): Constify.
3028 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
3029 (help_command, complete_command, shell_command, edit_command)
3030 (list_command, disassemble_command, make_command)
3031 (apropos_command, alias_command): Constify.
3032 * cli/cli-script.c (document_command, define_command)
3033 (while_command, if_command, validate_comname): Constify.
3034 * cli/cli-decode.c (struct cmd_list_element): Change type of
3035 "fun".
3036 * target.c (do_monitor_command, flash_erase_command): Constify.
3037 * regcache.c (reg_flush_command): Constify.
3038 * reverse.c (reverse_step, reverse_next, reverse_stepi)
3039 (reverse_nexti, reverse_continue, reverse_finish)
3040 (save_bookmark_command, goto_bookmark_command)
3041 (exec_reverse_once): Constify.
3042 * python/python.c (python_interactive_command, python_command):
3043 Constify.
3044 * typeprint.c (ptype_command, whatis_command, whatis_exp):
3045 Constify.
3046 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
3047 * gcore.c (gcore_command): Constify.
3048
85c4be7c
TT
30492017-11-07 Tom Tromey <tom@tromey.com>
3050
3051 * printcmd.c (x_command): Call set_repeat_arguments.
3052 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
3053 * top.c (repeat_arguments): New global.
3054 (set_repeat_arguments): New function.
3055 (execute_command): Handle repeat_arguments.
3056 (show_commands): Calls set_repeat_arguments.
3057 * command.h (set_repeat_arguments): Declare.
3058
022643b4
TT
30592017-11-07 Tom Tromey <tom@tromey.com>
3060
3061 * stack.c (backtrace_command): Use std::string.
3062 (backtrace_command_1): Make "count_exp" const.
3063
5614fb77
TT
30642017-11-07 Tom Tromey <tom@tromey.com>
3065
3066 * source.c (directory_switch, mod_path, add_path): Constify.
3067 * defs.h (add_path, mod_path, directory_switch): Constify.
3068 * mi/mi-cmd-env.c (env_mod_path): Constify.
3069
6be9a197
TT
30702017-11-07 Tom Tromey <tom@tromey.com>
3071
3072 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
3073 (run_command_1, continue_command, step_1, jump_command)
3074 (signal_command, until_command, advance_command, finish_command)
3075 (attach_command): Update.
3076
c2252c0d
TT
30772017-11-07 Tom Tromey <tom@tromey.com>
3078
3079 * command.h (set_cmd_cfunc): Don't declare.
3080 * cli/cli-decode.c (set_cmd_cfunc): Now static.
3081
1ee870c5
TT
30822017-11-07 Tom Tromey <tom@tromey.com>
3083
3084 * stack.c (select_frame_command): Constify.
3085 * cli/cli-decode.c (add_com_suppress_notification): Constify.
3086 * command.h (add_com_suppress_notification): Constify.
3087
ee7ddd71
TT
30882017-11-07 Tom Tromey <tom@tromey.com>
3089
3090 * breakpoint.c (stop_command): Constify.
3091 * cli/cli-decode.c (struct cmd_list_element): Constify.
3092 * command.h (add_abbrev_prefix_cmd): Constify.
3093
95e95a6d
PA
30942017-11-07 Pedro Alves <palves@redhat.com>
3095
3096 * breakpoint.c (extract_bp_kind): New enum.
3097 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
3098 factored out from ...
3099 (extract_bp_number_and_location): ... here.
3100 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
3101
cc638e86
PA
31022017-11-07 Pedro Alves <palves@redhat.com>
3103
3104 * breakpoint.c (extract_bp_number_and_location): Change return
3105 type to void. Throw error instead of warning.
3106 (enable_disable_command): Adjust.
3107
d0fe4701
XR
31082017-11-07 Xavier Roirand <roirand@adacore.com>
3109 Pedro Alves <palves@redhat.com>
3110
3111 * breakpoint.c (map_breakpoint_number_range): New, factored out
3112 from ...
3113 (map_breakpoint_numbers): ... here.
3114 (find_location_by_number): Change parameters from string to
3115 breakpoint number and location.
3116 (extract_bp_number_and_location): New function.
3117 (enable_disable_bp_num_loc)
3118 (enable_disable_breakpoint_location_range)
3119 (enable_disable_command): New functions, factored out ...
3120 (enable_command, disable_command): ... these functions, and
3121 adjusted to support ranges.
3122 * NEWS: Document enable/disable breakpoint location range feature.
3123
635dc5b2
LM
31242017-11-06 Luis Machado <luis.machado@linaro.org>
3125
3126 * MAINTAINERS (Write After Approval): Update my e-mail address.
3127
556e5da5
PA
31282017-11-06 Pedro Alves <palves@redhat.com>
3129
3130 * gnu-nat.c (gnu_terminal_init): Delete.
3131 (gnu_target): Don't install gnu_terminal_init.
3132 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
3133 (child_terminal_init): ... this function.
3134
d1928160
PA
31352017-11-06 Pedro Alves <palves@redhat.com>
3136
3137 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
3138 sgtty.h.
3139 * config.in, configure: Regenerate.
3140
6aa899ce
PA
31412017-11-06 Pedro Alves <palves@redhat.com>
3142
3143 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
3144 (async_init_signals): Adjust.
3145 (handle_stop_sig): Rename to ...
3146 (handle_sigtstp): ... this.
3147 (async_stop_sig): Rename to ...
3148 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
3149 SIGTSTP path.
3150 * event-top.h: Move signal.h include to the top. Check SIGTSTP
3151 instead of STOP_SIGNAL thoughout.
3152 (handle_stop_sig): Rename to ...
3153 (handle_sigtstp): ... this.
3154 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
3155
a94799ac
PA
31562017-11-06 Pedro Alves <palves@redhat.com>
3157
3158 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
3159 longer set flags twice in row.
3160
726e1356
PA
31612017-11-06 Pedro Alves <palves@redhat.com>
3162
3163 * Makefile.in (SER_HARDWIRE): Update comment.
3164 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
3165 * common/gdb_termios.h: Delete file.
3166 * common/job-control.c: Include termios.h and unistd.h instead of
3167 gdb_termios.h.
3168 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
3169 check.
3170 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
3171 Remove sgtty code.
3172 * configure.ac: No longer check for termio.h and sgtty.h.
3173 * configure: Regenerate.
3174 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
3175 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
3176 Replace PROCESS_GROUP_TYPE references with pid_t references
3177 throughout.
3178 (gdb_getpgrp): Delete.
3179 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
3180 (child_terminal_inferior): Remove comment. Remove sgtty code.
3181 (child_terminal_ours_1): Use tcgetpgrp directly instead of
3182 gdb_getpgrp. Use serial_set_tty_state instead aof
3183 serial_noflush_set_tty_state. Remove sgtty code.
3184 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
3185 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
3186 (inferior_process_group): Now returns pid_t.
3187 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
3188 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
3189 * ser-event.c (serial_event_ops): Update.
3190 * ser-go32.c (dos_noflush_set_tty_state): Delete.
3191 (dos_ops): Update.
3192 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
3193 * ser-pipe.c (pipe_ops): Update.
3194 * ser-tcp.c (tcp_ops): Update.
3195 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
3196 HAVE_TERMIOS checks.
3197 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
3198 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
3199 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
3200 assume termios.
3201 (hardwire_noflush_set_tty_state): Delete.
3202 (hardwire_print_tty_state, hardwire_drain_output)
3203 (hardwire_flush_output, hardwire_flush_input)
3204 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
3205 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
3206 code, and assume termios.
3207 (hardwire_ops): Update.
3208 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
3209 * serial.c (serial_noflush_set_tty_state): Delete.
3210 * serial.h (serial_noflush_set_tty_state): Delete.
3211 (serial_ops::noflush_set_tty_state): Delete.
3212
1cfb73db
UW
32132017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3214
3215 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
3216 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
3217 (COMMON_OBS): Remove doublest.o and dfp.o.
3218 Do not build target-float.c (instead of doublest.c)
3219 with -Wformat-nonliteral.
3220
3221 * doublest.c: Remove file.
3222 * doublest.h: Remove file.
3223 * dfp.c: Remove file.
3224 * dfp.h: Remove file.
3225
3226 * target-float.c: Do not include "doublest.h" and "dfp.h".
3227 (DOUBLEST): Move here from doublest.h.
3228 (enum float_kind): Likewise.
3229 (FLOATFORMAT_CHAR_BIT): Likewise.
3230 (FLOATFORMAT_LARGEST_BYTES): Likewise.
3231 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
3232 (floatformat_precision): Likewise.
3233 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
3234 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
3235 Likewise.
3236 (host_float_format, host_double_format, host_long_double_format):
3237 Likewise.
3238 (floatformat_to_string, floatformat_from_string): Likewise.
3239 (floatformat_to_doublest): Likewise. Also, inline the original
3240 convert_floatformat_to_doublest.
3241 (floatformat_from_doublest): Likewise. Also, inline the original
3242 convert_floatformat_from_doublest.
3243
3244 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
3245 (MAX_DECIMAL_STRING): Move here from dfp.c.
3246 (match_endianness): Likewise.
3247 (set_decnumber_context, decimal_check_errors): Likewise.
3248 (decimal_from_number, decimal_to_number): Likewise.
3249 (decimal_to_string, decimal_from_string): Likewise. Make static.
3250 (decimal_from_longest, decimal_from_ulongest): Likewise.
3251 (decimal_to_longest): Likewise.
3252 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
3253 (decimal_convert): Likewise.
3254
b07e9c46
UW
32552017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3256
3257 * doublest.c: Do not include "gdbtypes.h".
3258 (extract_typed_floating): Remove.
3259 (store_typed_floating): Remove.
3260 (convert_typed_floating): Remove.
3261 * doublest.h (struct type): Remove.
3262 (DOUBLEST_PRINT_FORMAT): Remove.
3263 (DOUBLEST_SCAN_FORMAT): Remove.
3264 (extract_typed_floating): Remove.
3265 (store_typed_floating): Remove.
3266 (convert_typed_floating): Remove.
3267
3268 * dfp.c (decimal_from_doublest): Remove.
3269 (decimal_to_doublest): Remove.
3270 * dfp.h: Do not include "doublest.h".
3271 (decimal_from_doublest): Remove.
3272 (decimal_to_doublest): Remove.
3273
3274 * value.c: Do not include "doublest.h" and "dfp.h".
3275 (value_as_double): Remove.
3276 (unpack_double): Remove.
3277 (value_from_double): Remove.
3278 (value_from_decfloat): Remove.
3279 * value.h: Do not include "doublest.h".
3280 (value_as_double): Remove.
3281 (unpack_double): Remove.
3282 (value_from_double): Remove.
3283 (value_from_decfloat): Remove.
3284
3b2ca824
UW
32852017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3286
3287 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
3288 (i386_extract_return_value): Use target_float_convert.
3289 (i386_store_return_value): Likewise.
3290 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
3291 (i387_value_to_register): Likewise.
3292 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
3293 (ia64_register_to_value): Use target_float_convert.
3294 (ia64_value_to_register): Likewise.
3295 (ia64_extract_return_value): Likewise.
3296 (ia64_store_return_value): Likewise.
3297 (ia64_push_dummy_call): Likewise.
3298 * m68k-tdep.c: Include "target-float.h".
3299 (m68k_register_to_value): Use target_float_convert.
3300 (m68k_value_to_register): Likewise.
3301 (m68k_svr4_extract_return_value): Likewise.
3302 (m68k_svr4_store_return_value): Likewise.
3303 * ppc-sysv-tdep.c: Include "target-float.h".
3304 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
3305 (do_ppc_sysv_return_value): Likewise.
3306 (ppc64_sysv_abi_push_freg): Likewise.
3307 (ppc64_sysv_abi_return_value_base): Likewise.
3308 * rs6000-aix-tdep.c: Include "target-float.h".
3309 (rs6000_push_dummy_call): Use target_float_convert.
3310 (rs6000_return_value): Likewise.
3311 * rs6000-lynx178-tdep.c: Include "target-float.h".
3312 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
3313 (rs6000_lynx178_return_value): Likewise.
3314 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
3315 (rs6000_register_to_value): Use target_float_convert.
3316 (rs6000_value_to_register): Likewise.
3317 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
3318 (arm_extract_return_value): Use target_float_convert.
3319 (arm_store_return_value): Likewise.
3320 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
3321 (sh_register_convert_to_virtual): Use target_float_convert.
3322 (sh_register_convert_to_raw): Likewise.
3323 * sh64-tdep.c: Include "target-float.h".
3324 (sh64_extract_return_value): Use target_float_convert.
3325 (sh64_register_convert_to_virtual): Likewise.
3326 (sh64_register_convert_to_raw): Likewise. Fix argument types.
3327
14ad9311
UW
33282017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3329
3330 * target-float.c (floatformat_to_host_double): New function.
3331 (floatformat_from_host_double): Likewise.
3332 (target_float_to_host_double): Likewise.
3333 (target_float_from_host_double): Likewise.
3334 * target-float.h (target_float_to_host_double): Add prototype.
3335 (target_float_from_host_double): Likewise.
3336
3337 * guile/scm-value.c: Include "target-float.h".
3338 (gdbscm_value_to_real): Use target_float_to_host_double.
3339 Handle integer source values via value_as_long.
3340 * guile/scm-math.c: Include "target-float.h". Do not include
3341 "doublest.h", "dfp.h", and "expression.h".
3342 (vlscm_convert_typed_number): Use target_float_from_host_double.
3343 (vlscm_convert_number): Likewise.
3344
3345 * python/py-value.c (valpy_float): Use target_float_to_host_double.
3346 (convert_value_from_python): Use target_float_from_host_double.
3347
50eff16b
UW
33482017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3349
3350 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
3351 (cast_from_fixed): Likewise.
3352 (ada_scaling_type): New function.
3353 (ada_delta): Return value instead of DOUBLEST. Perform target
3354 arithmetic instead of host arithmetic.
3355 (scaling_factor): Rename to ...
3356 (ada_scaling_factor) ... this. Make non-static. Return value instead
3357 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
3358 (ada_fixed_to_float): Remove.
3359 (ada_float_to_fixed): Remove.
3360 * ada-lang.h (ada_fixed_to_float): Remove.
3361 (ada_float_to_fixed): Remove.
3362 (ada_delta): Return value instead of DOUBLEST.
3363 (ada_scaling_factor): Add prototype.
3364
3365 * ada-typeprint.c: Include "target-float.h".
3366 (print_fixed_point_type): Perform target arithmetic instead of
3367 host arithmetic.
3368 * ada-valprint.c: Include "target-float.h".
3369 (ada_val_print_num): Perform target arithmetic instead of
3370 host arithmetic for fixed-point types.
3371
66c02b9e
UW
33722017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3373
3374 * target-float.c: Include <math.h>.
3375 (floatformat_binop): New function.
3376 (floatformat_compare): Likewise.
3377 (target_float_binop): Likewise.
3378 (target_float_compare): Likewise.
3379 * target-float.h: Include "expression.h".
3380 (target_float_binop): Add prototype.
3381 (target_float_compare): Likewise.
3382
3383 * valarith.c: Do not include "doublest.h" and "dfp.h".
3384 Include "common/byte-vector.h".
3385 (value_args_as_decimal): Remove, replace by ...
3386 (value_args_as_target_float): ... this function. Handle both
3387 binary and decimal target floating-point formats.
3388 (scalar_binop): Handle both binary and decimal FP using
3389 value_args_as_target_float and target_float_binop.
3390 (value_equal): Handle both binary and decimal FP using
3391 value_args_as_target_float and target_float_compare.
3392 (value_less): Likewise.
3393 (value_pos): Handle all scalar types as simple copy.
3394 (value_neg): Handle all scalar types via BINOP_SUB from 0.
3395 * dfp.c (decimal_binop): Throw error instead of internal_error
3396 when called with an unsupported operation code.
3397
f69fdf9b
UW
33982017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3399
3400 * target-float.c (target_float_to_string): New function.
3401 (target_float_from_string): New function.
3402 * target-float.h (target_float_to_string): Add prototype.
3403 (target_float_from_string): Add prototype.
3404
3405 * valprint.c: Include "target-float.h". Do not include
3406 "doublest.h" and "dfp.h".
3407 (print_floating): Use target_float_to_string.
3408 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
3409 (printf_floating): Use target_float_to_string.
3410 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
3411 (print_i387_value): Use target_float_to_string.
3412 * mips-tdep.c: Include "target-float.h".
3413 (mips_print_fp_register): Use target_float_to_string.
3414 * sh64-tdep.c: Include "target-float.h".
3415 (sh64_do_fp_register): Use target_float_to_string.
3416
3417 * parse.c: Include "target-float.h". Do not include
3418 "doublest.h" and "dfp.h".
3419 (parse_float): Use target_float_from_string.
3420 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
3421 (define_symbol): Use target_float_from_string.
3422 * gdbarch-selftests.c: Include "target-float.h".
3423 (register_to_value_test): Use target_float_from_string.
3424
70100014
UW
34252017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3426
3427 * Makefile.c (SFILES): Add target-float.c.
3428 (HFILES_NO_SRCDIR): Add target-float.h.
3429 (COMMON_OBS): Add target-float.o.
3430 * target-float.h: New file.
3431 * target-float.c: New file.
3432
3433 * doublest.c (floatformat_classify): Fix detection of float_zero.
3434
3435 * gdbtypes.c (is_floating_type): New function.
3436 * gdbtypes.h (is_floating_type): Add prototype.
3437
3438 * value.c: Do not include "floatformat.h".
3439 (unpack_double): Use target_float_is_valid.
3440 (is_floating_value): New function.
3441 * value.h (is_floating_value): Add prototype-
3442
3443 * valarith.c: Include "target-float.h".
3444 (value_logical_not): Use target_float_is_zero.
3445
3446 * python/py-value.c: Include "target-float.h".
3447 (valpy_nonzero): Use target_float_is_zero.
3448
ab4b1c46
TT
34492017-11-04 Tom Tromey <tom@tromey.com>
3450
3451 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
3452
454dafbd
TT
34532017-11-04 Tom Tromey <tom@tromey.com>
3454
3455 * breakpoint.c (set_momentary_breakpoint): Return
3456 breakpoint_up.
3457 (until_break_command): Update.
3458 (new_until_break_fsm): Change argument types to
3459 breakpoint_up.
3460 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3461 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
3462 Remove.
3463 * infcmd.c (finish_forward): Update.
3464 * breakpoint.h (set_momentary_breakpoint)
3465 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3466 (make_cleanup_delete_breakpoint): Remove.
3467 (struct breakpoint_deleter): New.
3468 (breakpoint_up): New typedef.
3469 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
3470 (insert_exception_resume_breakpoint): Update.
3471 (insert_exception_resume_from_probe): Update.
3472 (insert_longjmp_resume_breakpoint): Update.
3473 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
3474 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
3475 * infcall.c (call_function_by_hand_dummy): Update
3476
331b71e5
TT
34772017-11-04 Tom Tromey <tom@tromey.com>
3478
3479 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
3480
9f584b37
TT
34812017-11-04 Tom Tromey <tom@tromey.com>
3482
3483 * linux-tdep.c (linux_core_info_proc_mappings): Use
3484 gdb::def_vector.
3485 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
3486 "size" argument.
3487 (linux_corefile_thread): Update.
3488 (linux_make_corefile_notes): Remove unused variable.
3489
779bc38e
TT
34902017-11-04 Tom Tromey <tom@tromey.com>
3491
3492 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
3493 gdb::byte_vector.
3494
ed2b3126
TT
34952017-11-04 Tom Tromey <tom@tromey.com>
3496
3497 * objfiles.c (do_free_objfile_cleanup): Remove.
3498 * compile/compile-object-load.c (compile_object_load): Update.
3499 * objfiles.h (make_cleanup_free_objfile): Remove.
3500
7f6743fd
TT
35012017-11-04 Tom Tromey <tom@tromey.com>
3502
3503 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
3504 (adi_read_versions): Change "tags" to "gdb_byte *".
3505 (adi_print_versions): Likewise.
3506
c80049d3
TT
35072017-11-04 Tom Tromey <tom@tromey.com>
3508
3509 * breakpoint.c
3510 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
3511 from start_rbreak_breakpoints.
3512 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
3513 * breakpoint.h (class scoped_rbreak_breakpoints): New.
3514 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
3515 * symtab.c (do_end_rbreak_breakpoints): Remove.
3516 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
3517
167b0be1
TT
35182017-11-04 Tom Tromey <tom@tromey.com>
3519
3520 * cp-namespace.c (reset_directive_searched): Remove.
3521 (cp_lookup_symbol_via_imports): Use scoped_restore.
3522 * cp-support.c (reset_directive_searched): Remove.
3523 (make_symbol_overload_list_using): Use scoped_restore.
3524 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
3525 (reset_directive_searched): Remove.
3526
5eae7aea
TT
35272017-11-04 Tom Tromey <tom@tromey.com>
3528
3529 * symfile.c (find_separate_debug_file_by_debuglink): Use
3530 unique_xmalloc_ptr.
3531
c6bcad5f
TT
35322017-11-04 Tom Tromey <tom@tromey.com>
3533
3534 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
3535 type of "info".
3536 (compute_stack_depth): Likewise.
3537 (do_compile_dwarf_expr_to_c): Use std::vector.
3538
20dcd8ca
TT
35392017-11-04 Tom Tromey <tom@tromey.com>
3540
3541 * compile/compile-object-load.c (link_callbacks_einfo): Use
3542 std::string.
3543
33c7c59d
TT
35442017-11-04 Tom Tromey <tom@tromey.com>
3545
3546 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3547 Use scoped_free_pendings.
3548 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
3549 scoped_free_pendings.
3550 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
3551 (xcoff_initial_scan): Likewise.
3552 * buildsym.c (reset_symtab_globals): Update comment.
3553 (scoped_free_pendings): Rename from really_free_pendings.
3554 (prepare_for_building): Update comment.
3555 (buildsym_init): Likewise.
3556 * buildsym.h (class scoped_free_pendings): New class.
3557 (really_free_pendings): Don't declare.
3558
67fa57cf
UW
35592017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
3560
3561 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
3562 output when converting a zero value to a special byteorder format.
3563
f26ae15b
YQ
35642017-11-02 Yao Qi <yao.qi@linaro.org>
3565
3566 * frame.c (do_frame_register_read): Remove aspace.
3567 * jit.c (jit_frame_sniffer): Likwise.
3568 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3569 * regcache.c (regcache::regcache): Pass nullptr.
3570 (regcache_print): Caller updated.
3571 * regcache.h (regcache::regcache): Remove one constructor
3572 parameter aspace.
3573
6c6e9412
YQ
35742017-11-02 Yao Qi <yao.qi@linaro.org>
3575
3576 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
3577
8b86c959
YQ
35782017-11-02 Yao Qi <yao.qi@linaro.org>
3579
3580 * breakpoint.c (insert_single_step_breakpoints): Update.
3581 * frame.c (struct frame_info) <aspace>: Add const.
3582 (frame_save_as_regcache): Add const.
3583 (get_frame_address_space): Return const address_space *.
3584 * frame.h (get_frame_address_space): Update declaration.
3585 * infrun.c (struct step_over_info) <aspace>: Add const.
3586 (set_step_over_info): Make aspace const.
3587 (displaced_step_prepare_throw): Change variable const.
3588 (resume): Likewise.
3589 (proceed): Likewise.
3590 (adjust_pc_after_break): Likewise.
3591 (save_waitstatus): Likewise.
3592 (handle_signal_stop): Likewise.
3593 (keep_going_pass_signal): Likewise.
3594 * jit.c (jit_frame_sniffer): Add const.
3595 * mips-tdep.c (mips_single_step_through_delay): Likewise.
3596 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3597 * record-full.c (record_full_wait_1): Likewise.
3598 * regcache.c (regcache::regcache): Change parameter to const.
3599 * regcache.h (regcache::regcache): Likewise.
3600 (regcache::aspace): Return const address_space *.
3601 (regcache) <m_aspace>: Add const.
3602
a01bda52
YQ
36032017-11-02 Yao Qi <yao.qi@linaro.org>
3604
3605 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
3606 * frame.c (create_sentinel_frame): Likewise.
3607 * infrun.c (displaced_step_prepare_throw): Likewise.
3608 (resume): Likewise.
3609 (thread_still_needs_step_over_bp): Likewise.
3610 (proceed): Likewise.
3611 (do_target_wait): Likewise.
3612 (adjust_pc_after_break): Likewise.
3613 (handle_syscall_event): Likewise.
3614 (save_waitstatus): Likewise.
3615 (handle_inferior_event_1): Likewise.
3616 (handle_signal_stop): Likewise.
3617 (keep_going_pass_signal): Likewise.
3618 * linux-nat.c (status_callback): Likewise.
3619 (save_stop_reason): Likewise.
3620 (resume_stopped_resumed_lwps): Likewise.
3621 * record-full.c (record_full_exec_insn): Likewise.
3622 (record_full_wait_1): Likewise.
3623 * regcache.c (get_regcache_aspace): Remove.
3624 * regcache.h (get_regcache_aspace): Remove.
3625
d999647b
YQ
36262017-11-02 Yao Qi <yao.qi@linaro.org>
3627
3628 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
3629 (init_regcache_descr): Use gdbarch_num_regs.
3630 (regcache::regcache): Likewise.
3631 (regcache::get_register_status): Likewise.
3632 (regcache::assert_raw_regnum): Likewise.
3633 (regcache::cooked_read): Likewise.
3634 (regcache::cooked_read_value): Likewise.
3635 (regcache::cooked_write): Likewise.
3636 (regcache::dump): Likewise.
3637 (regcache::num_raw_registers): New method.
3638 * regcache.h (class regcache) <num_raw_registers>: New.
3639
4e888c28
YQ
36402017-11-02 Yao Qi <yao.qi@linaro.org>
3641
3642 * regcache.c (regcache::assert_regnum): New method.
3643 (regcache::invalidate): Call assert_regnum.
3644 (regcache::raw_update): Likewise.
3645 (regcache::raw_write): Likewise.
3646 (regcache::raw_read_part): Likewise.
3647 (regcache::raw_write_part): Likewise.
3648 (regcache::raw_supply): Likewise.
3649 (regcache::raw_supply_integer): Likewise.
3650 (regcache::raw_supply_zeroed): Likewise.
3651 (regcache::raw_collect): Likewise.
3652 (regcache::raw_collect_integer): Likewise.
3653 * regcache.h (regcache::assert_regnum): Declare.
3654
2e1b49b3
YQ
36552017-11-02 Yao Qi <yao.qi@linaro.org>
3656
3657 * regcache.c (regcache::dump): Remove code.
3658
6c5218df
YQ
36592017-11-02 Yao Qi <yao.qi@linaro.org>
3660
3661 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
3662 Remove.
3663 <sizeof_cooked_register_status>: Remove.
3664 (init_regcache_descr): Update.
3665 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
3666 (regcache::save): Likewise.
3667 (regcache::dump): Likewise.
3668
dcc31d28
JB
36692017-11-01 James Bowman <james.bowman@ftdichip.com>
3670
3671 * ft32-tdep.c (ft32_fetch_instruction): New function.
3672 (ft32_analyze_prologue): Use ft32_fetch_instruction().
3673
3a87ae65
SM
36742017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
3675
3676 * cli/cli-script.c (execute_control_command): Rename to ...
3677 (execute_control_command_1): ... this.
3678 (execute_control_command): New function.
3679
09b847f3
SM
36802017-10-31 Simon Marchi <simon.marchi@ericsson.com>
3681
3682 * tracepoint.c (tfind_command): Remove const_cast.
3683
f871c485
MG
36842017-10-30 Mike Gulick <mgulick@mathworks.com>
3685
3686 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
3687
b020ff80
SM
36882017-10-30 Simon Marchi <simon.marchi@ericsson.com>
3689
3690 * common/common-utils.h (in_inclusive_range): New function.
3691 * arm-tdep.c (arm_record_extension_space): Use
3692 in_inclusive_range.
3693 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
3694 * cris-tdep.c (cris_spec_reg_applicable): Use
3695 in_inclusive_range.
3696
1b81856f
PA
36972017-10-30 Pedro Alves <palves@redhat.com>
3698 Simon Marchi <simon.marchi@ericsson.com>
3699
3700 * remote.c (remote_set_syscall_catchpoint): Build a std::string
3701 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
3702
31b833b3
PA
37032017-10-30 Pedro Alves <palves@redhat.com>
3704
3705 * common/common-utils.c (string_appendf, string_vappendf): New
3706 functions.
3707 * common/common-utils.h (string_appendf, string_vappendf): New
3708 declarations.
3709 * unittests/common-utils-selftests.c (string_appendf_func)
3710 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
3711 (string_vappendf_tests): New functions.
3712 (_initialize_common_utils_selftests): Register "string_appendf" and
3713 "string_vappendf tests".
3714
4a250334
PA
37152017-10-30 Pedro Alves <palves@redhat.com>
3716
3717 * unittests/common-utils-selftests.c (format_func): New typedef.
3718 (string_printf_tests, string_vprintf_tests): Tests factored out
3719 and merged to ...
3720 (test_format_func): ... this new function.
3721 (string_printf_tests, string_vprintf_tests): Reimplement on top of
3722 test_format_func.
3723
16c5c17e
SM
37242017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3725
3726 * darwin-nat.c: Remove include of gdb.h.
3727
7ca51576
SM
37282017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3729
3730 * xtensa-xtregs.c: Fix formatting issues.
3731
c1342859
SM
37322017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3733
3734 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
3735
484d8d36
MD
37362017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
3737
3738 PR python/21213
3739 * python/py-infthread.c (thpy_get_inferior): Increment reference
3740 of inferior before returning it.
3741
b5540b5f
SM
37422017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3743
3744 * unittests/common-utils-selftests.c (format): Add
3745 ATTRIBUTE_PRINTF.
3746
5a9dcda1
SM
37472017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
3748
3749 * xml-syscall.c (struct syscall_desc): Add constructor.
3750 <name>: Change type to std::string.
3751 (syscall_desc_up): New typedef.
3752 (syscall_desc_p): Remove typeder.
3753 (DEF_VEC_P(syscall_desc_p)): Remove.
3754 (struct syscall_group_desc): Add constructor.
3755 <name>: Change type to std::string.
3756 <syscalls>: Change type to std::vector.
3757 (syscall_group_desc_up): New typedef.
3758 (syscall_group_desc_p): Remove typedef.
3759 (DEF_VEC_P(syscall_group_desc_p)): Remove.
3760 (struct syscalls_info) <syscalls>: Change type to std::vector of
3761 unique_ptr.
3762 <groups>: Likewise.
3763 <my_gdb_datadir>: Change type to std::string.
3764 (syscalls_info_up): New typedef.
3765 (allocate_syscalls_info): Remove.
3766 (syscalls_info_free_syscalls_desc): Remove.
3767 (syscalls_info_free_syscall_group_desc): Remove.
3768 (free_syscalls_info): Remove.
3769 (make_cleanup_free_syscalls_info): Remove.
3770 (syscall_group_create_syscall_group_desc): Adjust.
3771 (syscall_group_add_syscall): Adjust.
3772 (syscall_create_syscall_desc): Adjust.
3773 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
3774 (init_syscalls_info): Adjust.
3775 (syscall_group_get_group_by_name): Adjust.
3776 (xml_get_syscall_number): Adjust.
3777 (xml_get_syscall_name): Adjust.
3778 (xml_list_of_syscalls): Adjust.
3779 (xml_list_syscalls_by_group): Adjust.
3780 (xml_list_of_groups): Adjust.
3781
45461e0d
SM
37822017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3783
3784 * probe.h: Don't include gdb_vecs.h.
3785 (DEF_VEC_P (probe_p)): Remove.
3786 (find_probes_in_objfile): Return an std::vector.
3787 * probe.c (find_probes_in_objfile): Likewise.
3788 * breakpoint.c (breakpoint_objfile_data)
3789 <longjmp_probes>: Change type to std::vector.
3790 <exception_probes>: Likewise.
3791 (free_breakpoint_probes): Don't manually free vectors.
3792 (create_longjmp_master_breakpoint): Adjust.
3793 (create_exception_master_breakpoint): Adjust.
3794 * solib-svr4.c (svr4_create_probe_breakpoints): Change
3795 parameter type, adjust.
3796 (svr4_create_solib_event_breakpoints): Adjust.
3797
43dce439
SM
37982017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3799
3800 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
3801 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
3802 with new.
3803 (free_breakpoint_probes): Rename to ...
3804 (free_breakpoint_objfile_data): ... this, and call delete on
3805 bp_objfile_data..
3806
6a1b9516
SM
38072017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
3808
3809 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
3810 (loaded_script_ptr): Remove typedef.
3811 (DEF_VEC_P (loaded_script_ptr)): Remove.
3812 (struct collect_matching_scripts_data): Add constructor.
3813 <scripts_p>: Change type to (pointer to) std::vector.
3814 (collect_matching_scripts_data): Adjust.
3815 (sort_scripts_by_name): Make suitable for std::sort.
3816 (print_scripts): Don't sort vector, adjust to std::vector.
3817 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
3818
593e3209
SM
38192017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3820
3821 * symfile.c (filename_language): Make struct, not typedef. Add
3822 constructor.
3823 <ext>: Change type to std::string.
3824 (DEF_VEC_O (filename_language)): Remove.
3825 (filename_language_table): Change type to std::vector.
3826 (add_filename_language): Adjust.
3827 (set_ext_lang_command): Adjust.
3828 (info_ext_lang_command): Adjust.
3829 (deduce_language_from_filename): Adjust.
3830 (class scoped_restore_filename_language_table): Remove.
3831 (test_filename_language): Use scoped_restore.
3832 (test_set_ext_lang_command): Use scoped_restore, adjust to
3833 std::vector change.
3834
32fa66eb
SM
38352017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3836
3837 * symfile.c: Include selftest.h.
3838 (class scoped_restore_filename_language_table): New.
3839 (test_filename_language): New test.
3840 (test_set_ext_lang_command): New test.
3841 (_initialize_symfile): Register tests.
3842
4a27f119
KS
38432017-10-27 Keith Seitz <keiths@redhat.com>
3844
3845 * breakpoint.c (print_breakpoint_location): Use the symbol saved
3846 in the bp_location, falling back to find_pc_sect_function when
3847 needed.
3848 (add_location_to_breakpoint): Save sal->symbol.
3849 * breakpoint.h (struct bp_location) <symbol>: New field.
3850 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
3851 * symtab.h (struct symtab_and_line) <symbol>: New field.
3852
a43f3893
PF
38532017-10-26 Patrick Frants <osscontribute@gmail.com>
3854
7453e6b2 3855 PR gdb/13669
a43f3893
PF
3856 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
3857 to rewind obstack.
3858
23cc4e1b
PA
38592017-10-26 Pedro Alves <palves@redhat.com>
3860
3861 * remote.c (remote_async_terminal_ours_p): Delete.
3862 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
3863 Remove references to 'remote_async_terminal_ours_p'.
3864
6abc18bb
YQ
38652017-10-26 Yao Qi <yao.qi@linaro.org>
3866
3867 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
3868
bd522513
YQ
38692017-10-26 Yao Qi <yao.qi@linaro.org>
3870
3871 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
3872 aspace const.
3873 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
3874 Likewise.
3875 * breakpoint.c (bpstat_check_location): Remove cast.
3876 (breakpoint_hit_catch_fork): Make aspce const.
3877 (breakpoint_hit_catch_solib): Likewise.
3878 (breakpoint_hit_catch_exec): Likewise.
3879 (breakpoint_hit_ranged_breakpoint): Likewise.
3880 (breakpoint_hit_watchpoint): Likewise.
3881 (base_breakpoint_breakpoint_hit): Likewise.
3882 (bkpt_breakpoint_hit): Likewise.
3883 (dprintf_breakpoint_hit): Likewise.
3884 (tracepoint_breakpoint_hit): Likewise.
3885 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
3886
accd0bcd
YQ
38872017-10-26 Yao Qi <yao.qi@linaro.org>
3888
3889 * breakpoint.c (breakpoint_location_address_match): Change
3890 "struct address_space *" to "const address_space".
3891 (breakpoint_location_address_range_overlap): Likewise.
3892 (breakpoint_here_p): Likewise.
3893 (breakpoint_in_range_p): Likewise.
3894 (moribund_breakpoint_here_p): Likewise.
3895 (bp_location_inserted_here_p): Likewise.
3896 (software_breakpoint_inserted_here_p): Likewise.
3897 (hardware_breakpoint_inserted_here_p): Likewise.
3898 (hardware_watchpoint_inserted_in_range): Likewise.
3899 (bpstat_check_location): Likewise.
3900 (bpstat_stop_status): Likewise.
3901 (breakpoint_address_match): Likewise.
3902 (breakpoint_address_match_range): Likewise.
3903 (breakpoint_location_address_match): Likewise.
3904 (breakpoint_location_address_range_overlap): Likewise.
3905 (insert_single_step_breakpoint): Likewise.
3906 (breakpoint_has_location_inserted_here): Likewise.
3907 (single_step_breakpoint_inserted_here_p): Likewise.
3908 (pc_at_non_inline_function): Likewise.
3909 * breakpoint.h (bpstat_stop_status): Update declaration.
3910 (breakpoint_here_p): Likewise.
3911 (breakpoint_in_range_p): Likewise.
3912 (moribund_breakpoint_here_p): Likewise.
3913 (breakpoint_inserted_here_p): Likewise.
3914 (software_breakpoint_inserted_here_p): Likewise.
3915 (hardware_breakpoint_inserted_here_p): Likewise.
3916 (breakpoint_has_location_inserted_here): Likewise.
3917 (single_step_breakpoint_inserted_here_p): Likewise.
3918 (hardware_watchpoint_inserted_in_range): Likewise.
3919 (breakpoint_address_match): Likewise.
3920 (insert_single_step_breakpoint): Likewise.
3921 (pc_at_non_inline_function): Likewise.
3922 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
3923 * record.c (record_check_stopped_by_breakpoint): Likewise.
3924 * record.h (record_check_stopped_by_breakpoint): Likewise.
3925 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
3926
ac7936df
YQ
39272017-10-25 Yao Qi <yao.qi@linaro.org>
3928
3929 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
3930 regcache->arch () instead get_regcache_arch.
3931 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
3932 Likewise.
3933 (aarch64_fbsd_store_inferior_registers): Likewise.
3934 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
3935 (store_gregs_to_thread): Likewise.
3936 (fetch_fpregs_from_thread): Likewise.
3937 (store_fpregs_to_thread): Likewise.
3938 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
3939 (aarch64_store_return_value): Likewise.
3940 (aarch64_software_single_step): Likewise.
3941 * aix-thread.c (aix_thread_wait): Likewise.
3942 (supply_reg32): Likewise.
3943 (supply_sprs64): Likewise.
3944 (supply_sprs32): Likewise.
3945 (fill_gprs64): Likewise.
3946 (fill_gprs32): Likewise.
3947 (fill_sprs64): Likewise.
3948 (fill_sprs32): Likewise.
3949 (store_regs_user_thread): Likewise.
3950 (store_regs_kernel_thread): Likewise.
3951 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
3952 (alphabsd_store_inferior_registers): Likewise.
3953 * alpha-tdep.c (alpha_extract_return_value): Likewise.
3954 (alpha_store_return_value): Likewise.
3955 (alpha_deal_with_atomic_sequence): Likewise.
3956 (alpha_next_pc): Likewise.
3957 (alpha_software_single_step): Likewise.
3958 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
3959 (amd64bsd_store_inferior_registers): Likewise.
3960 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
3961 Likewise.
3962 (amd64_linux_store_inferior_registers): Likewise.
3963 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
3964 (amd64_collect_native_gregset): Likewise.
3965 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
3966 (amd64obsd_collect_uthread): Likewise.
3967 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
3968 (amd64_collect_fpregset): Likewise.
3969 (amd64_supply_fxsave): Likewise.
3970 (amd64_supply_xsave): Likewise.
3971 (amd64_collect_fxsave): Likewise.
3972 (amd64_collect_xsave): Likewise.
3973 * arc-tdep.c (arc_write_pc): Likewise.
3974 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
3975 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
3976 (arm_fbsd_store_inferior_registers): Likewise.
3977 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
3978 (store_vfp_regs): Likewise.
3979 (arm_linux_fetch_inferior_registers): Likewise.
3980 (arm_linux_store_inferior_registers): Likewise.
3981 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
3982 (arm_linux_sigreturn_next_pc): Likewise.
3983 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
3984 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
3985 (fetch_register): Likewise.
3986 (store_register): Likewise.
3987 * arm-tdep.c (arm_is_thumb): Likewise.
3988 (displaced_in_arm_mode): Likewise.
3989 (bx_write_pc): Likewise.
3990 (arm_get_next_pcs_addr_bits_remove): Likewise.
3991 (arm_software_single_step): Likewise.
3992 (arm_extract_return_value): Likewise.
3993 (arm_store_return_value): Likewise.
3994 (arm_write_pc): Likewise.
3995 * bfin-tdep.c (bfin_extract_return_value): Likewise.
3996 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
3997 (bsd_uthread_store_registers): Likewise.
3998 * core-regset.c (fetch_core_registers): Likewise.
3999 * corelow.c (get_core_registers): Likewise.
4000 * cris-tdep.c (cris_store_return_value): Likewise.
4001 (cris_extract_return_value): Likewise.
4002 (find_step_target): Likewise.
4003 (find_step_target): Likewise.
4004 (cris_software_single_step): Likewise.
4005 * ctf.c (ctf_fetch_registers): Likewise.
4006 * darwin-nat.c (cancel_breakpoint): Likewise.
4007 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
4008 * frv-tdep.c (frv_extract_return_value): Likewise.
4009 * ft32-tdep.c (ft32_store_return_value): Likewise.
4010 (ft32_extract_return_value): Likewise.
4011 * go32-nat.c (fetch_register): Likewise.
4012 (go32_fetch_registers): Likewise.
4013 (go32_store_registers): Likewise.
4014 (store_register): Likewise.
4015 * h8300-tdep.c (h8300_extract_return_value): Likewise.
4016 (h8300_store_return_value): Likewise.
4017 * hppa-linux-nat.c (fetch_register): Likewise.
4018 (store_register): Likewise.
4019 (hppa_linux_fetch_inferior_registers): Likewise.
4020 (hppa_linux_store_inferior_registers): Likewise.
4021 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
4022 (i386_darwin_store_inferior_registers): Likewise.
4023 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
4024 (gnu_store_registers): Likewise.
4025 * i386-linux-nat.c (fetch_register): Likewise.
4026 (store_register): Likewise.
4027 (supply_gregset): Likewise.
4028 (fill_gregset): Likewise.
4029 (i386_linux_fetch_inferior_registers): Likewise.
4030 (i386_linux_store_inferior_registers): Likewise.
4031 (i386_linux_resume): Likewise.
4032 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
4033 Likewise.
4034 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
4035 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
4036 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
4037 (i386obsd_collect_uthread): Likewise.
4038 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
4039 (i386_supply_gregset): Likewise.
4040 (i386_collect_gregset): Likewise.
4041 (i386_supply_fpregset): Likewise.
4042 (i386_collect_fpregset): Likewise.
4043 (i386_mpx_bd_base): Likewise.
4044 * i386-v4-nat.c (supply_fpregset): Likewise.
4045 (fill_fpregset): Likewise.
4046 * i387-tdep.c (i387_supply_fsave): Likewise.
4047 (i387_collect_fsave): Likewise.
4048 (i387_supply_fxsave): Likewise.
4049 (i387_collect_fxsave): Likewise.
4050 (i387_supply_xsave): Likewise.
4051 (i387_collect_xsave): Likewise.
4052 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
4053 (ia64_linux_store_registers): Likewise.
4054 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
4055 (ia64_extract_return_value): Likewise.
4056 (ia64_store_return_value): Likewise.
4057 (find_func_descr): Likewise.
4058 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
4059 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
4060 (inf_ptrace_store_registers): Likewise.
4061 * infrun.c (use_displaced_stepping): Likewise.
4062 (displaced_step_prepare_throw): Likewise.
4063 (resume): Likewise.
4064 (proceed): Likewise.
4065 (do_target_wait): Likewise.
4066 (adjust_pc_after_break): Likewise.
4067 (handle_inferior_event_1): Likewise.
4068 (handle_signal_stop): Likewise.
4069 (save_infcall_suspend_state): Likewise.
4070 (restore_infcall_suspend_state): Likewise.
4071 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
4072 * jit.c (jit_frame_prev_register): Likewise.
4073 * linux-nat.c (save_stop_reason): Likewise.
4074 (linux_nat_wait_1): Likewise.
4075 (resume_stopped_resumed_lwps): Likewise.
4076 * linux-record.c (record_linux_sockaddr): Likewise.
4077 (record_linux_msghdr): Likewise.
4078 (record_linux_system_call): Likewise.
4079 * linux-tdep.c (linux_collect_thread_registers): Likewise.
4080 * lm32-tdep.c (lm32_extract_return_value): Likewise.
4081 (lm32_store_return_value): Likewise.
4082 * m32c-tdep.c (m32c_read_flg): Likewise.
4083 (m32c_pseudo_register_read): Likewise.
4084 (m32c_pseudo_register_write): Likewise.
4085 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
4086 (m32r_linux_collect_gregset): Likewise.
4087 * m32r-tdep.c (m32r_store_return_value): Likewise.
4088 (m32r_extract_return_value): Likewise.
4089 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
4090 (m68kbsd_collect_fpregset): Likewise.
4091 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
4092 * m68k-linux-nat.c (fetch_register): Likewise.
4093 (old_fetch_inferior_registers): Likewise.
4094 (old_store_inferior_registers): Likewise.
4095 (store_regs): Likewise.
4096 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
4097 (m68k_svr4_store_return_value): Likewise.
4098 * m88k-tdep.c (m88k_store_arguments): Likewise.
4099 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
4100 (mi_cmd_data_write_register_values): Likewise.
4101 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
4102 (mips_fbsd_store_inferior_registers): Likewise.
4103 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
4104 (mips_fbsd_supply_gregs): Likewise.
4105 (mips_fbsd_collect_fpregs): Likewise.
4106 (mips_fbsd_collect_gregs): Likewise.
4107 (mips_fbsd_supply_fpregset): Likewise.
4108 (mips_fbsd_collect_fpregset): Likewise.
4109 (mips_fbsd_supply_gregset): Likewise.
4110 (mips_fbsd_collect_gregset): Likewise.
4111 * mips-linux-nat.c (supply_gregset): Likewise.
4112 (fill_gregset): Likewise.
4113 (supply_fpregset): Likewise.
4114 (fill_fpregset): Likewise.
4115 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
4116 (mips_fill_gregset): Likewise.
4117 (mips_supply_fpregset): Likewise.
4118 (mips_fill_fpregset): Likewise.
4119 (mips64_supply_gregset): Likewise.
4120 (micromips_linux_sigframe_validate): Likewise.
4121 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
4122 (mipsnbsd_fetch_inferior_registers): Likewise.
4123 (mipsnbsd_store_inferior_registers): Likewise.
4124 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
4125 (mipsnbsd_supply_gregset): Likewise.
4126 (mipsnbsd_iterate_over_regset_sections): Likewise.
4127 (mipsnbsd_supply_reg): Likewise.
4128 (mipsnbsd_supply_fpreg): Likewise.
4129 * mips-tdep.c (mips_in_frame_stub): Likewise.
4130 (mips_dummy_id): Likewise.
4131 (is_octeon_bbit_op): Likewise.
4132 (micromips_bc1_pc): Likewise.
4133 (extended_mips16_next_pc): Likewise.
4134 (mips16_next_pc): Likewise.
4135 (deal_with_atomic_sequence): Likewise.
4136 * moxie-tdep.c (moxie_process_readu): Likewise.
4137 * nios2-tdep.c (nios2_get_next_pc): Likewise.
4138 * nto-procfs.c (procfs_store_registers): Likewise.
4139 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
4140 (ppcfbsd_store_inferior_registers): Likewise.
4141 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
4142 (fetch_altivec_register): Likewise.
4143 (get_spe_registers): Likewise.
4144 (fetch_spe_register): Likewise.
4145 (fetch_altivec_registers): Likewise.
4146 (fetch_all_gp_regs): Likewise.
4147 (fetch_all_fp_regs): Likewise.
4148 (store_vsx_register): Likewise.
4149 (store_altivec_register): Likewise.
4150 (set_spe_registers): Likewise.
4151 (store_spe_register): Likewise.
4152 (store_altivec_registers): Likewise.
4153 (store_all_gp_regs): Likewise.
4154 (store_all_fp_regs): Likewise.
4155 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
4156 (ppc_linux_collect_gregset): Likewise.
4157 (ppc_canonicalize_syscall): Likewise.
4158 (ppc_linux_record_signal): Likewise.
4159 (ppu2spu_prev_register): Likewise.
4160 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
4161 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
4162 (ppcobsd_store_registers): Likewise.
4163 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
4164 Likewise.
4165 (ppc_ravenscar_generic_store_registers): Likewise.
4166 * procfs.c (procfs_fetch_registers): Likewise.
4167 (procfs_store_registers): Likewise.
4168 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
4169 (ravenscar_store_registers): Likewise.
4170 (ravenscar_prepare_to_store): Likewise.
4171 * record-btrace.c (record_btrace_fetch_registers): Likewise.
4172 * record-full.c (record_full_wait_1): Likewise.
4173 (record_full_registers_change): Likewise.
4174 (record_full_store_registers): Likewise.
4175 (record_full_core_fetch_registers): Likewise.
4176 (record_full_save): Likewise.
4177 (record_full_goto_insn): Likewise.
4178 * regcache.c (regcache_register_size): Likewise.
4179 (get_regcache_arch): Remove.
4180 (regcache_read_pc): Likewise.
4181 * regcache.h (get_regcache_arch): Remove.
4182 * remote-sim.c (gdbsim_fetch_register): Likewise.
4183 (gdbsim_store_register): Likewise.
4184 * remote.c (fetch_register_using_p): Likewise.
4185 (send_g_packet): Likewise.
4186 (remote_prepare_to_store): Likewise.
4187 (store_registers_using_G): Likewise.
4188 * reverse.c (save_bookmark_command): Likewise.
4189 (goto_bookmark_command): Likewise.
4190 * rs6000-aix-tdep.c (branch_dest): Likewise.
4191 * rs6000-nat.c (rs6000_ptrace64): Likewise.
4192 (fetch_register): Likewise.
4193 * rs6000-tdep.c (ppc_supply_reg): Likewise.
4194 (ppc_collect_reg): Likewise.
4195 (ppc_collect_gregset): Likewise.
4196 (ppc_collect_fpregset): Likewise.
4197 (ppc_collect_vsxregset): Likewise.
4198 (ppc_collect_vrregset): Likewise.
4199 (ppc_displaced_step_hw_singlestep): Likewise.
4200 (rs6000_pseudo_register_read): Likewise.
4201 (rs6000_pseudo_register_write): Likewise.
4202 * s390-linux-nat.c (supply_gregset): Likewise.
4203 (fill_gregset): Likewise.
4204 (s390_linux_fetch_inferior_registers): Likewise.
4205 * s390-linux-tdep.c (s390_write_pc): Likewise.
4206 (s390_software_single_step): Likewise.
4207 (s390_all_but_pc_registers_record): Likewise.
4208 (s390_linux_syscall_record): Likewise.
4209 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
4210 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
4211 (shnbsd_store_inferior_registers): Likewise.
4212 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
4213 (sh_extract_return_value_fpu): Likewise.
4214 (sh_store_return_value_nofpu): Likewise.
4215 (sh_corefile_supply_regset): Likewise.
4216 (sh_corefile_collect_regset): Likewise.
4217 * sh64-tdep.c (sh64_extract_return_value): Likewise.
4218 (sh64_store_return_value): Likewise.
4219 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
4220 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
4221 (sparc_store_inferior_registers): Likewise.
4222 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
4223 (sparc_ravenscar_prepare_to_store): Likewise.
4224 * sparc-tdep.c (sparc32_store_arguments): Likewise.
4225 (sparc_analyze_control_transfer): Likewise.
4226 (sparc_step_trap): Likewise.
4227 (sparc_software_single_step): Likewise.
4228 (sparc32_gdbarch_init): Likewise.
4229 (sparc_supply_rwindow): Likewise.
4230 (sparc_collect_rwindow): Likewise.
4231 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
4232 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
4233 (sparc64nbsd_collect_gregset): Likewise.
4234 (sparc64nbsd_supply_fpregset): Likewise.
4235 (sparc64nbsd_collect_fpregset): Likewise.
4236 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
4237 (sparc64_supply_gregset): Likewise.
4238 (sparc64_collect_gregset): Likewise.
4239 (sparc64_supply_fpregset): Likewise.
4240 (sparc64_collect_fpregset): Likewise.
4241 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
4242 * spu-tdep.c (spu_unwind_sp): Likewise.
4243 (spu2ppu_prev_register): Likewise.
4244 (spu_memory_remove_breakpoint): Likewise.
4245 * stack.c (return_command): Likewise.
4246 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
4247 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
4248 * tracefile.c (trace_save_ctf): Likewise.
4249 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
4250 (do_windows_store_inferior_registers): Likewise.
4251 (windows_resume): Likewise.
4252 * xtensa-linux-nat.c (fill_gregset): Likewise.
4253 (supply_gregset_reg): Likewise.
4254 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
4255 (xtensa_register_read_masked): Likewise.
4256 (xtensa_supply_gregset): Likewise.
4257 (xtensa_extract_return_value): Likewise.
4258 (xtensa_store_return_value): Likewise.
4259
edd079d9
UW
42602017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
4261
4262 * doublest.c (floatformat_from_string): New function.
4263 * doublest.h (floatformat_from_string): Add prototype.
4264
4265 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
4266 (OP_FLOAT): ... this.
4267 * expression.h: Do not include "doublest.h".
4268 (union exp_element): Replace doubleconst and decfloatconst by
4269 new element floatconst.
4270 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
4271 (ada_evaluate_subexp): Likewise.
4272 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
4273 OP_DOUBLE and OP_DECFLOAT.
4274 * expprint.c (print_subexp_standard): Likewise.
4275 (dump_subexp_body_standard): Likewise.
4276 * breakpoint.c (watchpoint_exp_is_const): Likewise.
4277
4278 * parse.c: Include "dfp.h".
4279 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4280 (write_exp_elt_floatcst): New function.
4281 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
4282 and OP_DECFLOAT.
4283 (operator_check_standard): Likewise.
4284 (parse_float): Do not accept suffix. Take type as input. Return bool.
4285 Return target format buffer instead of host DOUBLEST.
4286 Use floatformat_from_string and decimal_from_string to parse
4287 either binary or decimal floating-point types.
4288 (parse_c_float): Remove.
4289 * parser-defs.h: Do not include "doublest.h".
4290 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4291 (write_exp_elt_floatcst): Add prototype.
4292 (parse_float): Update prototype.
4293 (parse_c_float): Remove.
4294
4295 * c-exp.y: Do not include "dfp.h".
4296 (typed_val_float): Use byte buffer instead of DOUBLEST.
4297 (typed_val_decfloat): Remove.
4298 (DECFLOAT): Remove.
4299 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4300 (parse_number): Update to new parse_float interface.
4301 Parse suffixes and determine type before calling parse_float.
4302 Handle decimal and binary FP types the same way.
4303
4304 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4305 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
4306 (parse_number): Update to new parse_float interface.
4307 Parse suffixes and determine type before calling parse_float.
4308
4309 * f-exp.y: Replace dval by typed_val_float.
4310 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4311 (parse_number): Use parse_float instead of atof.
4312
4313 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4314 (parse_go_float): Remove.
4315 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4316 (parse_number): Call parse_float instead of parse_go_float.
4317 Parse suffixes and determine type before calling parse_float.
4318
4319 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4320 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4321 (parse_number): Update to new parse_float interface.
4322 Parse suffixes and determine type before calling parse_float.
4323
4324 * m2-exp.y: Replace dval by byte buffer val.
4325 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4326 (parse_number): Call parse_float instead of atof.
4327
4328 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4329 (lex_number): Call parse_float instead of strtod.
4330 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
4331 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
4332 Use write_exp_elt_floatcst.
4333 (unit_testing): Remove static variable.
4334 (rust_type): Do not check unit_testing.
4335 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
4336
4337 * ada-exp.y (type_float, type_double): Remove.
4338 (typed_val_float): Use byte buffer instead of DOUBLEST.
4339 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4340 * ada-lex.l (processReal): Use parse_float instead of sscanf.
4341
cc628f3d
AH
43422017-10-25 Alan Hayward <alan.hayward@arm.com>
4343
4344 * aarch64-tdep.h (enum aarch64_regnum): Remove.
4345 * arch/aarch64.h: New file.
4346
09a7c6aa
UW
43472017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4348
4349 * dfp.h (decimal_from_string): Use const reference for argument.
4350 * dfp.c (decimal_from_string): Likewise.
4351
8ba0dd51
UW
43522017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4353
4354 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
4355 * sh64-tdep.c (sh64_do_fp_register): Likewise.
4356 * mips-tdep.c (mips_print_fp_register): Likewise.
4357
16e812b2
UW
43582017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4359
4360 * common/format.h (enum argclass): Replace decfloat_arg by
4361 dec32float_arg, dec64float_arg, and dec128float_arg.
4362 * common/format.c (parse_format_string): Update to return
4363 new decimal float argument classes.
4364
4365 * printcmd.c (printf_decfloat): Rename to ...
4366 (printf_floating): ... this. Add argclass argument, and use it
4367 instead of parsing the format string again. Add support for
4368 binary floating-point values, using floatformat_to_string.
4369 Convert value to the target format if it doesn't already match.
4370 (ui_printf): Call printf_floating instead of printf_decfloat,
4371 also for double_arg / long_double_arg. Pass argclass.
4372
4373 * dfp.c (decimal_to_string): Add format string argument.
4374 * dfp.h (decimal_to_string): Likewise.
4375
4376 * doublest.c (floatformat_to_string): Add format string argument.
4377 * doublest.h (floatformat_to_string): Likewise.
4378
fdf0cbc2
UW
43792017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4380
4381 * doublest.c (floatformat_precision): New routine.
4382 (floatformat_to_string): Likewise.
4383 * doublest.c (floatformat_to_string): Add prototype.
4384
4385 * printcmd.c (print_scalar_formatted): Only call print_floating
4386 on floating-point types.
4387 * valprint.c: Do not include "floatformat.h".
4388 (generic_val_print_decfloat): Remove.
4389 (generic_val_print): Call generic_val_print_float for both
4390 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
4391 (print_floating): Use floatformat_to_string. Handle decimal float.
4392 (print_decimal_floating): Remove, merge into floatformat_to_string.
4393 * value.h (print_decimal_floating): Remove.
4394
4395 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
4396
5033013f
UW
43972017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4398
4399 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
4400
a664f67e
SM
44012017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4402
4403 * memattr.h: Don't include vec.h.
4404 (struct mem_attrib): Initialize fields.
4405 <unknown>: New static method.
4406 (struct mem_region): Add constructors, operator<, initialize
4407 fields.
4408 * memattr.c: Include algorithm.
4409 (default_mem_attrib, unknown_mem_attrib): Remove.
4410 (user_mem_region_list): New global.
4411 (target_mem_region_list, mem_region_list): Change type to
4412 std::vector<mem_region>.
4413 (mem_use_target): Now a function.
4414 (target_mem_regions_valid): Change type to bool.
4415 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
4416 (require_user_regions): Adjust.
4417 (require_target_regions): Adjust.
4418 (create_mem_region): Adjust.
4419 (lookup_mem_region): Adjust.
4420 (invalidate_target_mem_regions): Adjust.
4421 (mem_clear): Rename to...
4422 (user_mem_clear): ... this, and adjust.
4423 (mem_command): Adjust.
4424 (info_mem_command): Adjust.
4425 (mem_enable, enable_mem_command, mem_disable,
4426 disable_mem_command): Adjust.
4427 (mem_delete): Adjust.
4428 (delete_mem_command): Adjust.
4429 * memory-map.h (parse_memory_map): Return an std::vector.
4430 * memory-map.c (parse_memory_map): Likewise.
4431 (struct memory_map_parsing_data): Add constructor.
4432 <memory_map>: Point to std::vector.
4433 (memory_map_start_memory): Adjust.
4434 (memory_map_end_memory): Adjust.
4435 (memory_map_end_property): Adjust.
4436 (clear_result): Remove.
4437 * remote.c (remote_memory_map): Return an std::vector.
4438 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
4439 Remove.
4440 (target_debug_print_mem_region_vector): New.
4441 * target-delegates.c: Regenerate.
4442 * target.h (mem_region_vector): New typedef.
4443 (to_memory_map): Return mem_region_vector.
4444 (target_memory_map): Return an std::vector.
4445 * target.c (target_memory_map): Return an std::vector.
4446 (flash_erase_command): Adjust.
4447
6e17c565
SM
44482017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4449
4450 * memory-map.c (struct memory_map_parsing_data) <property_name>:
4451 Change type to std::string.
4452 (memory_map_start_property): Adjust.
4453 (memory_map_end_property): Adjust.
4454
cfba9872
SM
44552017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4456
4457 * infrun.h: Include common/byte-vector.h.
4458 (struct displaced_step_closure): New struct.
4459 (struct buf_displaced_step_closure): New struct.
4460 * infrun.c (displaced_step_closure::~displaced_step_closure):
4461 Provide default implementation.
4462 (displaced_step_clear): Deallocate step closure with delete.
4463 * aarch64-tdep.c (displaced_step_closure): Rename to ...
4464 (aarch64_displaced_step_closure): ... this, extend
4465 displaced_step_closure.
4466 (aarch64_displaced_step_data) <dsc>: Change type to
4467 aarch64_displaced_step_closure.
4468 (aarch64_displaced_step_copy_insn): Adjust to type change, use
4469 unique_ptr.
4470 (aarch64_displaced_step_fixup): Add cast for displaced step
4471 closure.
4472 * amd64-tdep.c (displaced_step_closure): Rename to ...
4473 (amd64_displaced_step_closure): ... this, extend
4474 displaced_step_closure.
4475 <insn_buf>: Change type to std::vector<gdb_byte>.
4476 <max_len>: Remove.
4477 (fixup_riprel): Change type of DSC parameter, adjust to type
4478 change of insn_buf.
4479 (fixup_displaced_copy): Change type of DSC parameter.
4480 (amd64_displaced_step_copy_insn): Instantiate
4481 amd64_displaced_step_closure.
4482 (amd64_displaced_step_fixup): Add cast for closure type, adjust
4483 to type change of insn_buf.
4484 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
4485 parameter DSC.
4486 (arm_linux_copy_svc): Likewise.
4487 (cleanup_kernel_helper_return): Likewise.
4488 (arm_catch_kernel_helper_return): Likewise.
4489 (arm_linux_displaced_step_copy_insn): Instantiate
4490 arm_displaced_step_closure.
4491 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
4492 (displaced_read_reg): Change type of parameter DSC.
4493 (branch_write_pc): Likewise.
4494 (load_write_pc): Likewise.
4495 (alu_write_pc): Likewise.
4496 (displaced_write_reg): Likewise.
4497 (arm_copy_unmodified): Likewise.
4498 (thumb_copy_unmodified_32bit): Likewise.
4499 (thumb_copy_unmodified_16bit): Likewise.
4500 (cleanup_preload): Likewise.
4501 (install_preload): Likewise.
4502 (arm_copy_preload): Likewise.
4503 (thumb2_copy_preload): Likewise.
4504 (install_preload_reg): Likewise.
4505 (arm_copy_preload_reg): Likewise.
4506 (cleanup_copro_load_store): Likewise.
4507 (install_copro_load_store): Likewise.
4508 (arm_copy_copro_load_store) Likewise.
4509 (thumb2_copy_copro_load_store): Likewise.
4510 (cleanup_branch): Likewise.
4511 (install_b_bl_blx): Likewise.
4512 (arm_copy_b_bl_blx): Likewise.
4513 (thumb2_copy_b_bl_blx): Likewise.
4514 (thumb_copy_b): Likewise.
4515 (install_bx_blx_reg): Likewise.
4516 (arm_copy_bx_blx_reg): Likewise.
4517 (thumb_copy_bx_blx_reg): Likewise.
4518 (cleanup_alu_imm): Likewise.
4519 (arm_copy_alu_imm): Likewise.
4520 (thumb2_copy_alu_imm): Likewise.
4521 (cleanup_alu_reg): Likewise.
4522 (install_alu_reg): Likewise.
4523 (arm_copy_alu_reg): Likewise.
4524 (thumb_copy_alu_reg): Likewise.
4525 (cleanup_alu_shifted_reg): Likewise.
4526 (install_alu_shifted_reg): Likewise.
4527 (arm_copy_alu_shifted_reg): Likewise.
4528 (cleanup_load): Likewise.
4529 (cleanup_store): Likewise.
4530 (arm_copy_extra_ld_st): Likewise.
4531 (install_load_store): Likewise.
4532 (thumb2_copy_load_literal): Likewise.
4533 (thumb2_copy_load_reg_imm): Likewise.
4534 (arm_copy_ldr_str_ldrb_strb): Likewise.
4535 (cleanup_block_load_all): Likewise.
4536 (cleanup_block_store_pc): Likewise.
4537 (cleanup_block_load_pc): Likewise.
4538 (arm_copy_block_xfer): Likewise.
4539 (thumb2_copy_block_xfer): Likewise.
4540 (cleanup_svc): Likewise.
4541 (install_svc): Likewise.
4542 (arm_copy_svc): Likewise.
4543 (thumb_copy_svc): Likewise.
4544 (arm_copy_undef): Likewise.
4545 (thumb_32bit_copy_undef): Likewise.
4546 (arm_copy_unpred): Likewise.
4547 (arm_decode_misc_memhint_neon): Likewise.
4548 (arm_decode_unconditional): Likewise.
4549 (arm_decode_miscellaneous): Likewise.
4550 (arm_decode_dp_misc): Likewise.
4551 (arm_decode_ld_st_word_ubyte): Likewise.
4552 (arm_decode_media): Likewise.
4553 (arm_decode_b_bl_ldmstm): Likewise.
4554 (arm_decode_ext_reg_ld_st): Likewise.
4555 (thumb2_decode_dp_shift_reg): Likewise.
4556 (thumb2_decode_ext_reg_ld_st): Likewise.
4557 (arm_decode_svc_copro): Likewise.
4558 (thumb2_decode_svc_copro): Likewise.
4559 (install_pc_relative): Likewise.
4560 (thumb_copy_pc_relative_16bit): Likewise.
4561 (thumb_decode_pc_relative_16bit): Likewise.
4562 (thumb_copy_pc_relative_32bit): Likewise.
4563 (thumb_copy_16bit_ldr_literal): Likewise.
4564 (thumb_copy_cbnz_cbz): Likewise.
4565 (thumb2_copy_table_branch): Likewise.
4566 (cleanup_pop_pc_16bit_all): Likewise.
4567 (thumb_copy_pop_pc_16bit): Likewise.
4568 (thumb_process_displaced_16bit_insn): Likewise.
4569 (decode_thumb_32bit_ld_mem_hints): Likewise.
4570 (thumb_process_displaced_32bit_insn): Likewise.
4571 (thumb_process_displaced_insn): Likewise.
4572 (arm_process_displaced_insn): Likewise.
4573 (arm_displaced_init_closure): Likewise.
4574 (arm_displaced_step_fixup): Add cast for closure.
4575 * arm-tdep.h: Include infrun.h.
4576 (displaced_step_closure): Rename to ...
4577 (arm_displaced_step_closure): ... this, extend
4578 displaced_step_closure.
4579 <u::svc::copy_svc_os>: Change type of parameter DSC.
4580 <cleanup>: Likewise.
4581 (arm_process_displaced_insn): Likewise.
4582 (arm_displaced_init_closure): Likewise.
4583 (displaced_read_reg): Likewise.
4584 (displaced_write_reg): Likewise.
4585 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4586 Adjust.
4587 * i386-tdep.h: Include infrun.h.
4588 (i386_displaced_step_closure): New typedef.
4589 * i386-tdep.c (i386_displaced_step_copy_insn): Use
4590 i386_displaced_step_closure.
4591 (i386_displaced_step_fixup): Adjust.
4592 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
4593 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
4594 and unique_ptr.
4595 (ppc_displaced_step_fixup): Adjust.
4596 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
4597 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
4598 and unique_ptr.
4599 (s390_displaced_step_fixup): Adjust.
4600
b392b304
SM
46012017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4602
4603 * interps.h (interp_resume, interp_suspend, interp_set_temp):
4604 Remove declarations.
4605
d5833c62
TT
46062017-10-20 Tom Tromey <tom@tromey.com>
4607
4608 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
4609 std::vector.
4610 (gdb_bfd_record_inclusion): Update.
4611 (bfdp): Remove typedef.
4612
06d5bbc8
TT
46132017-10-20 Tom Tromey <tom@tromey.com>
4614
4615 * gdb_bfd.c (gdb_bfd_ref): Use new.
4616 (struct gdb_bfd_data): Add constructor, destructor, and member
4617 initializers.
4618 (gdb_bfd_unref): Use delete.
4619
2712ce2e
TT
46202017-10-20 Tom Tromey <tom@tromey.com>
4621
4622 * exec.c (exec_file_attach): Use new_bfd_ref.
4623 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
4624 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4625 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
4626 new_bfd_ref.
4627 * gdb_bfd.h (new_bfd_ref): New function.
4628
fcc8fb2f
PA
46292017-10-20 Pedro Alves <palves@redhat.com>
4630
4631 * main.c (captured_command_loop): Add attribute noinline.
4632
4c2287b0
SM
46332017-10-19 Simon Marchi <simon.marchi@ericsson.com>
4634
4635 * interps.c (struct interp_factory): Add constructor.
4636 (interp_factory_p): Remove typedef.
4637 (DEF_VEC_P(interp_factory_p)): Remove.
4638 (interpreter_factories): Change type to std::vector.
4639 (interp_factory_register): Adjust.
4640 (interp_lookup): Adjust.
4641 (interpreter_completer): Adjust.
4642
3d415c26
TT
46432017-10-19 Tom Tromey <tom@tromey.com>
4644
4645 * break-catch-syscall.c (catch_syscall_completer): Use
4646 std::string, gdb::unique_xmalloc_ptr.
4647
395423c4
TT
46482017-10-19 Tom Tromey <tom@tromey.com>
4649
4650 * infcall.c (call_function_by_hand_dummy): Use std::string.
4651
54f70bc1
TT
46522017-10-19 Tom Tromey <tom@tromey.com>
4653
4654 * mi/mi-main.c (mi_cmd_execute): Update.
4655 * top.h (prepare_execute_command): Return scoped_value_mark.
4656 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
4657 Add move constructor.
4658 * top.c (prepare_execute_command): Return scoped_value_mark.
4659 (execute_command): Update.
4660
63929e84
PA
46612017-10-19 Pedro Alves <palves@redhat.com>
4662
4663 * xml-support.c (xml_fetch_content_from_file): Check fread's
4664 return.
4665
a75868f5
PA
46662017-10-19 Pedro Alves <palves@redhat.com>
4667
4668 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
4669 async.
4670 (handle_error_fd): New function.
4671 (ser_base_async): Add/delete an event loop file handler for
4672 error_fd.
4673
2edf834e
PA
46742017-10-19 Pedro Alves <palves@redhat.com>
4675
4676 * xml-support.c (xml_fetch_content_from_file): Don't read in
4677 chunks. Instead use fseek to determine the file's size, and read
4678 it in one go.
4679
c8ba13ad
KS
46802017-11-18 Keith Seitz <keiths@redhat.com>
4681
4682 * c-exp.y (oper): Canonicalize conversion operators of user-defined
4683 types.
4684 Add whitespace to front of type name.
4685
37534686
KS
46862017-10-18 Keith Seitz <keiths@redhat.com>
4687
4688 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
4689 DW_AT_accessibility.
4690
28c7c158
YQ
46912017-10-18 Yao Qi <yao.qi@linaro.org>
4692
4693 * features/tic6x-c62x-linux.c: Remove.
4694
30f0b101
TT
46952017-10-17 Tom Tromey <tom@tromey.com>
4696
4697 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
4698 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
4699 (do_mixed_source_and_assembly): Likewise.
4700
57e12da9
TT
47012017-10-17 Tom Tromey <tom@tromey.com>
4702
4703 * regcache.c (regcache::xfer_part): Remove assertion.
4704
7b700999
PA
47052017-10-17 Pedro Alves <palves@redhat.com>
4706
4707 * xml-support.c (xml_fetch_content_from_file): Call
4708 unique_ptr::release() instead unique_ptr::get() when passing
4709 through xrealloc.
4710
d3037ba6
YQ
47112017-10-17 Yao Qi <yao.qi@linaro.org>
4712
4713 * regcache.c (regcache::xfer_part): Remove parameters read and
4714 write, add parameter is_raw. All callers are updated.
4715
83d5a34d
KS
47162017-10-16 Keith Seitz <keiths@redhat.com>
4717
4718 * c-typeprint.c (enum access_specifier): Moved here from
4719 c_type_print_base.
4720 (output_access_specifier): New function.
4721 (c_type_print_base): Consider typedefs when assessing
4722 whether access labels are needed.
4723 Use output_access_specifier as needed.
4724 Output access specifier for typedefs, if needed.
4725 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
4726 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
4727 fields.
4728 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
4729 accessor macros.
4730
87028b87
TT
47312017-10-16 Tom Tromey <tom@tromey.com>
4732
4733 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
4734 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
4735 * target.c (target_fileio_read_stralloc): Update.
4736 * sparc64-tdep.c (adi_is_addr_mapped): Update.
4737 * target.h (target_fileio_read_stralloc): Return
4738 unique_xmalloc_ptr.
4739
b7b030ad
TT
47402017-10-16 Tom Tromey <tom@tromey.com>
4741
4742 * xml-syscall.c (xml_init_syscalls_info): Update.
4743 * xml-support.c (xinclude_start_include): Update.
4744 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
4745 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
4746 (xml_fetch_content_from_file): Likewise.
4747 * osdata.c (get_osdata): Update.
4748 * target.h (target_read_stralloc, target_get_osdata): Return
4749 unique_xmalloc_ptr.
4750 * solib-aix.c (solib_aix_get_library_list): Update.
4751 * solib-target.c (solib_target_current_sos): Update.
4752 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
4753 * xml-tdesc.c (fetch_available_features_from_target): Update.
4754 (target_fetch_description_xml): Update.
4755 (file_read_description_xml): Update.
4756 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
4757 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
4758 (remote_pid_to_exec_file): Update.
4759 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
4760 (target_get_osdata): Likewise.
4761
b80406ac
TT
47622017-10-16 Tom Tromey <tom@tromey.com>
4763
4764 * remote.c (remote_register_number_and_offset): Use std::vector.
4765 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
4766 (putpkt_binary): Use gdb::def_vector.
4767 (compare_sections_command): Use gdb::byte_vector.
4768
a90ecff8
TT
47692017-10-16 Tom Tromey <tom@tromey.com>
4770
4771 * ppc-linux-nat.c (hwdebug_insert_point): Use
4772 gdb::unique_xmalloc_ptr, XDUP.
4773
2dc0e219
TT
47742017-10-16 Tom Tromey <tom@tromey.com>
4775
4776 * probe.c (parse_probes): Use std::string.
4777 (info_probes_for_ops, enable_probes_command)
4778 (disable_probes_command): Remove cleanups.
4779
b05628f0
TT
47802017-10-16 Tom Tromey <tom@tromey.com>
4781
4782 * buildsym.c (block_compar): Remove.
4783 (end_symtab_get_static_block): Use std::vector.
4784
a79b1bc6
SM
47852017-10-16 Simon Marchi <simon.marchi@ericsson.com>
4786
4787 * memrange.h (struct mem_range): Define operator< and operator==.
4788 (mem_range_s): Remove.
4789 (DEF_VEC_O (mem_range_s)): Remove.
4790 (normalize_mem_ranges): Change parameter type to std::vector.
4791 * memrange.c (compare_mem_ranges): Remove.
4792 (normalize_mem_ranges): Change parameter type to std::vector,
4793 adjust to vector change.
4794 * exec.c (section_table_available_memory): Return vector, remove
4795 parameter.
4796 (section_table_read_available_memory): Adjust to std::vector
4797 change.
4798 * remote.c (remote_read_bytes): Adjust to std::vector
4799 change.
4800 * tracepoint.h (traceframe_available_memory): Change parameter
4801 type to std::vector.
4802 * tracepoint.c (traceframe_available_memory): Change parameter
4803 type to std::vector, adjust.
4804 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
4805 std::vector change.
4806 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4807 unittests/memrange-selftests.c.
4808 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
4809 * gdb/unittests/memrange-selftests.c: New file.
4810
63f0e930
PA
48112017-10-16 Pedro Alves <palves@redhat.com>
4812
4813 * elfread.c (probe_key_free): Rename range-for variable.
4814 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
4815 (find_probe_by_pc, collect_probes): Rename range-for variable.
4816
c40c7bfc
YQ
48172017-10-16 Yao Qi <yao.qi@linaro.org>
4818
4819 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
4820 * features/tic6x-c62x.c: Remove.
4821 * features/tic6x-c64x-linux.c: Remove.
4822 * features/tic6x-c64x.c: Remove.
4823 * features/tic6x-c64xp-linux.c: Remove.
4824 * features/tic6x-c64xp.c: Remove.
4825 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
4826 initialize_tdesc_tic6x_*_linux functions.
4827 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
4828 initialize_tdesc_tic6x_* functions.
4829
df27ae6a
YQ
48302017-10-16 Yao Qi <yao.qi@linaro.org>
4831
4832 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
4833 tic6x-c62x.
4834 * regformats/tic6x-c62x.dat: Remove.
4835 * regformats/tic6x-c64x.dat: Remove.
4836 * regformats/tic6x-c64xp.dat: Remove.
4837
86766165
SM
48382017-10-15 Simon Marchi <simon.marchi@ericsson.com>
4839
4840 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
4841 (the !HAVE_LIBEXPAT version).
4842
824dfcc3
SM
48432017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4844
4845 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
4846 const.
4847
2098b393
SM
48482017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4849
4850 * target.h: Include tracepoint.h.
4851 (enum trace_find_type): Move to tracepoint.h.
4852 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
4853 * tracepoint.h: Don't include target.h
4854 (enum trace_find_type): Move from target.h.
4855 (parse_traceframe_info): Return a unique ptr.
4856 * tracepoint.c (current_traceframe_info): Change type to unique
4857 ptr.
4858 (free_traceframe_info): Remove.
4859 (clear_traceframe_info): Don't manually free
4860 current_traceframe_info.
4861 (free_result): Remove.
4862 (parse_traceframe_info): Return a unique ptr.
4863 (get_traceframe_info): Adjust to unique ptr.
4864 * ctf.c (ctf_traceframe_info): Return a unique ptr.
4865 * remote.c (remote_traceframe_info): Return a unique ptr.
4866 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
4867 ptr.
4868 * target-debug.h (target_debug_print_traceframe_info_up): New
4869 macro.
4870 * target-delegates.c: Regenerate.
4871
4cdd21a8
SM
48722017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4873
4874 * memrange.h (struct mem_range): Add constructors.
4875 * tracepoint.h (struct traceframe_info) <memory>: Change type to
4876 std::vector<mem_range>.
4877 * tracepoint.c (free_traceframe_info): Don't manually free
4878 vector.
4879 (traceframe_info_start_memory): Adjust to vector change.
4880 (traceframe_available_memory): Likewise.
4881 * tracefile-tfile.c (build_traceframe_info): Likewise.
4882 * ctf.c (ctf_traceframe_info): Likewise.
4883
d0d292a2
SM
48842017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4885
4886 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
4887 std::vector<int>.
4888 * tracepoint.c (free_traceframe_info): Deallocate with delete.
4889 (traceframe_info_start_tvar): Adjust to vector change.
4890 (parse_traceframe_info): Allocate with new.
4891 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
4892 vector change.
4893 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
4894 change.
4895 tfile_traceframe_info): Allocate with new.
4896 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
4897 change.
4898
8d3c73ef
SM
48992017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4900
4901 * tracepoint.c (traceframe_info): Rename to...
4902 (current_traceframe_info): ...this.
4903 (clear_traceframe_info): Adjust.
4904 (get_traceframe_info): Adjust.
4905
b129dcac
SM
49062017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4907
4908 * nat/linux-osdata.c: Include algorithm.
4909 (compare_processes): Remove.
4910 (struct pid_pgid_entry): New struct.
4911 (linux_xfer_osdata_processgroups): Use std::vector instead of
4912 XNEWVEC.
4913
af5bf4ad
SM
49142017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4915
4916 * objfiles.h: Don't include symfile.h.
4917 (struct partial_symbol): Remove forward-declaration.
4918 (struct objfile) <global_psymbols, static_psymbols>: Change type
4919 to std::vector<partial_symbol *>.
4920 * objfiles.c (objfile::objfile): Don't memset those fields.
4921 (objfile::~objfile): Don't free those fields.
4922 * psympriv.h (struct psymbol_allocation_list): Remove
4923 forward-declaration.
4924 (add_psymbol_to_list): Change psymbol_allocation_list parameter
4925 to std::vector.
4926 (start_psymtab_common): Change parameters to std::vector.
4927 * psymtab.c: Include algorithm.
4928 (require_partial_symbols): Call shrink_to_fit.
4929 (find_pc_sect_psymbol): Adjust to vector change.
4930 (match_partial_symbol): Likewise.
4931 (lookup_partial_symbol): Likewise.
4932 (psym_relocate): Likewise.
4933 (dump_psymtab): Likewise.
4934 (recursively_search_psymtabs): Likewise.
4935 (compare_psymbols): Remove.
4936 (sort_pst_symbols): Adjust to vector change.
4937 (start_psymtab_common): Likewise.
4938 (end_psymtab_common): Likewise.
4939 (psymbol_bcache_full): De-constify return value.
4940 (add_psymbol_to_bcache): Likewise.
4941 (extend_psymbol_list): Remove.
4942 (append_psymbol_to_list): Adjust to vector change.
4943 (add_psymbol_to_list): Likewise.
4944 (init_psymbol_list): Likewise.
4945 (maintenance_info_psymtabs): Likewise.
4946 (maintenance_check_psymtabs): Likewise.
4947 * symfile.h (struct psymbol_allocation_list): Remove.
4948 * symfile.c (reread_symbols): Adjust to vector change.
4949 * dbxread.c (start_psymtab): Change type of parameters.
4950 (dbx_symfile_read): Adjust to vector change.
4951 (read_dbx_symtab): Likewise.
4952 (start_psymtab): Change type of parameters.
4953 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
4954 (create_partial_symtab): Likewise.
4955 (add_partial_symbol): Likewise.
4956 (write_one_signatured_type): Likewise.
4957 (recursively_write_psymbols): Likewise.
4958 * mdebugread.c (parse_partial_symbols): Likewise.
4959 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
4960 (scan_xcoff_symtab): Adjust to vector change.
4961 (xcoff_initial_scan): Likewise.
4962
3ec5942f
SM
49632017-10-13 Simon Marchi <simon.marchi@ericsson.com>
4964
4965 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
4966
2399fe6a
YQ
49672017-10-13 Yao Qi <yao.qi@linaro.org>
4968
4969 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
4970 Remove s390x-*-expedite, add s390x-expedite.
4971
4bf3f4a8
YQ
49722017-10-13 Yao Qi <yao.qi@linaro.org>
4973
4974 * features/s390-gs-linux64.c: Regenerated.
4975 * features/s390x-gs-linux64.c: Regenerated.
4976
9e86da07
TT
49772017-10-13 Tom Tromey <tom@tromey.com>
4978
4979 * compile/compile-object-run.c (do_module_cleanup): Use delete.
4980 * solib.c (update_solib_list, reload_shared_libraries_1): Use
4981 delete.
4982 * symfile.c (symbol_file_add_with_addrs): Use new.
4983 (symbol_file_add_separate): Update comment.
4984 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
4985 * jit.c (jit_object_close_impl): Use new.
4986 (jit_unregister_code): Use delete.
4987 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
4988 (~objfile): Rename from free_objfile.
4989 (free_objfile_separate_debug, do_free_objfile_cleanup)
4990 (free_all_objfiles, objfile_purge_solibs): Use delete.
4991 * objfiles.h (struct objfile): Add constructor and destructor.
4992 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
4993 (allocate_objfile, free_objfile): Don't declare.
4994 (struct objstats): Add initializers.
4995
c2508e90
SM
49962017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4997
4998 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
4999 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
5000 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
5001 * gdbarch.h: Regenerate.
5002 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
5003 Adjust comment.
5004 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
5005 (i386_displaced_step_fixup): Adjust comment.
5006 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
5007
a900ff72
TT
50082017-10-12 Tom Tromey <tom@tromey.com>
5009
5010 * prologue-value.h (pv_area::store_would_trash): Return bool.
5011 (pv_area::find_reg): Likewise.
5012 * prologue-value.c (pv_area::store_would_trash): Return bool.
5013 (pv_area::find_reg): Likewise.
5014
f7b7ed97
TT
50152017-10-12 Tom Tromey <tom@tromey.com>
5016
5017 * s390-linux-tdep.c (s390_store, s390_load)
5018 (s390_check_for_saved, s390_analyze_prologue): Update.
5019 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
5020 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
5021 * prologue-value.h (class pv_area): Move from prologue-value.c.
5022 Change names of members. Add constructor, destructor, member
5023 functions.
5024 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
5025 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
5026 (pv_area_fetch, pv_area_scan): Don't declare.
5027 * prologue-value.c (struct pv_area::area_entry): Now member of
5028 pv_area.
5029 (struct pv_area): Move to prologue-value.h.
5030 (pv_area::pv_area): Rename from make_pv_area.
5031 (pv_area::~pv_area): Rename from free_pv_area.
5032 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
5033 (clear_entries, find_entry, overlaps, store_would_trash, store)
5034 (fetch, find_reg, scan): Now member of pv_area.
5035 Remove "area" argument. Update.
5036 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
5037 Update.
5038 * mn10300-tdep.c (push_reg, check_for_saved)
5039 (mn10300_analyze_prologue): Update.
5040 * mep-tdep.c (is_arg_spill, check_for_saved)
5041 (mep_analyze_prologue): Update.
5042 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
5043 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
5044 (m32c_is_struct_return, m32c_analyze_prologue): Update.
5045 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
5046 Update.
5047 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
5048 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
5049
466eecee
SM
50502017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5051
5052 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
5053 * linux-nat.c (linux_nat_delete_thread): New variable.
5054 (lwp_free): Invoke linux_nat_delete_thread if set.
5055 (linux_nat_set_delete_thread): New function.
5056 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
5057 thread delete callback.
5058 * arm-linux-nat.c (arm_linux_delete_thread): New function.
5059 (_initialize_arm_linux_nat): Assign thread delete callback.
5060 * s390-linux-nat.c (s390_delete_thread): New function.
5061 (_initialize_s390_nat): Assign thread delete callback.
5062 * x86-linux-nat.c (x86_linux_add_target): Likewise.
5063 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
5064 function.
5065 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
5066 declaration.
5067 * nat/x86-linux.c (x86_linux_delete_thread): New function.
5068 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
5069
f71c8822
TT
50702017-10-09 Tom Tromey <tom@tromey.com>
5071
5072 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
5073 std::string.
5074 * tui/tui-layout.c (enum tui_status): Use std::string.
5075
981a3fb3
TT
50762017-10-11 Tom Tromey <tom@tromey.com>
5077
5078 * gdbthread.h (thread_command): Constify.
5079 * inferior.h (detach_command): Constify.
5080 * top.h (set_history, show_history): Constify.
5081 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
5082 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
5083 * bsd-kvm.c (bsd_kvm_cmd): Constify.
5084 * printcmd.c (set_command): Constify.
5085 (non_const_set_command): New function.
5086 * dcache.c (set_dcache_command, show_dcache_command): Constify.
5087 * breakpoint.c (enable_command, disable_command, delete_command)
5088 (catch_command, tcatch_command, set_breakpoint_cmd)
5089 (show_breakpoint_cmd): Constify.
5090 * macrocmd.c (macro_command): Constify.
5091 * infcmd.c (unset_command, kill_command, detach_command)
5092 (info_proc_cmd): Constify.
5093 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
5094 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
5095 (info_auto_load_cmd): Constify.
5096 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
5097 (unset_tdesc_cmd): Constify.
5098 * ada-lang.c (set_ada_command, show_ada_command)
5099 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
5100 * guile/guile.c (set_guile_command, show_guile_command)
5101 (info_guile_command): Constify.
5102 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
5103 Constify.
5104 * skip.c (skip_command): Constify.
5105 * compile/compile.c (_initialize_compile): Constify.
5106 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
5107 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
5108 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
5109 (maint_btrace_pt_show_cmd): Constify.
5110 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
5111 Constify.
5112 * python/python.c (user_show_python, user_set_python): Constify.
5113 * mips-tdep.c (set_mips_command, show_mips_command)
5114 (set_mipsfpu_command): Constify.
5115 * record-btrace.c (cmd_record_btrace_start)
5116 (cmd_set_record_btrace, cmd_show_record_btrace)
5117 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
5118 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
5119 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
5120 Constify.
5121 * symfile.c (overlay_command): Constify.
5122 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
5123 * cli/cli-logging.c (set_logging_command, show_logging_command):
5124 Constify.
5125 * cli/cli-dump.c (dump_command, append_command)
5126 (srec_dump_command, ihex_dump_command, verilog_dump_command)
5127 (tekhex_dump_command, binary_dump_command)
5128 (binary_append_command): Constify.
5129 * cli/cli-decode.c (struct cmd_list_element): Change type of
5130 "fun".
5131 * cli/cli-cmds.c (info_command, show_command, set_debug)
5132 (show_debug): Constify.
5133 (show_command): Add non-const overload.
5134 * top.c (set_history, show_history): Constify.
5135 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
5136 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
5137 * target.c (target_command): Constify.
5138 * sparc64-tdep.c (info_adi_command): Constify.
5139 * record-full.c (cmd_record_full_start): Constify.
5140 (set_record_full_command): Constify. Fix typo.
5141 (show_record_full_command): Constify.
5142 * thread.c (thread_command, thread_apply_command): Constify.
5143 * memattr.c (dummy_cmd): Constify.
5144 * value.c (function_command): Constify.
5145 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
5146 * probe.c (info_probes_command): Constify.
5147 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
5148 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
5149 (show_thread_cmd, set_thread_default_cmd)
5150 (show_thread_default_cmd): Constify.
5151 (check_empty): Constify.
5152 * tracepoint.c (tfind_command): Constify.
5153 * cp-support.c (maint_cplus_command): Constify.
5154 * windows-tdep.c (info_w32_command): Constify.
5155 * record.c (cmd_record_start, set_record_command)
5156 (show_record_command, info_record_command, cmd_record_goto):
5157 Constify.
5158 * ravenscar-thread.c (set_ravenscar_command)
5159 (show_ravenscar_command): Constify.
5160 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
5161 Constify.
5162 (add_internal_problem_command): Remove casts.
5163 * arc-tdep.c (maintenance_print_arc_command): Constify.
5164 * valprint.c (set_print, show_print, set_print_raw)
5165 (show_print_raw): Constify.
5166 * maint.c (maintenance_command, maintenance_info_command)
5167 (maintenance_print_command, maintenance_set_cmd)
5168 (maintenance_show_cmd, set_per_command_cmd)
5169 (show_per_command_cmd, maintenance_check_command): Constify.
5170 * language.c (set_check, show_check): Constify.
5171 * typeprint.c (show_print_type, set_print_type): Constify.
5172 * go32-nat.c (go32_info_dos_command): Constify.
5173
fdf44873
TT
51742017-10-11 Tom Tromey <tom@tromey.com>
5175
5176 * breakpoint.c (prepare_re_set_context): Remove.
5177 (breakpoint_re_set_one): Update. Don't use cleanups.
5178 (breakpoint_re_set): Use scoped_restore, std::string, and
5179 scoped_restore_current_language.
5180
81b1e71c
TT
51812017-10-11 Tom Tromey <tom@tromey.com>
5182
5183 * breakpoint.c (commands_command_1): Use std::string.
5184 (cleanup_executing_breakpoints): Remove.
5185 (bpstat_do_actions_1): Use scoped_restore.
5186 (bpstat_check_watchpoint): Use std::string.
5187 (decode_static_tracepoint_spec): Likewise.
5188 (break_range_command): Likewise.
5189 (watch_command_1): Likewise.
5190 (compare_breakpoints): Change argument types.
5191 (clear_command): Use std::vector.
5192 (cleanup_executing_breakpoints): Remove.
5193 (update_global_location_list): Use unique_xmalloc_ptr.
5194 (strace_command): Remove unused declaration.
5195
4f9d9906
JB
51962017-10-11 John Baldwin <jhb@FreeBSD.org>
5197
5198 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
5199 * NEWS: Mention new FreeBSD/arm native configuration.
5200 * configure.host: Add arm*-*-freebsd*.
5201 * configure.nat: Likewise.
5202 * arm-fbsd-nat.c: New file.
5203
7176dfd2
JB
52042017-10-11 John Baldwin <jhb@FreeBSD.org>
5205
5206 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
5207 (ALLDEPFILES): Add arm-fbsd-tdep.c.
5208 * NEWS: Mention new FreeBSD/arm target.
5209 * configure.tgt: Add arm*-*-freebsd*.
5210 * arm-fbsd-tdep.c: New file.
5211 * arm-fbsd-tdep.h: New file.
5212
fe220226
MR
52132017-10-11 Maciej W. Rozycki <macro@imgtec.com>
5214
5215 * linux-tdep.c (linux_make_corefile_notes): Remove call to
5216 `gdbarch_elfcore_write_linux_prpsinfo'.
5217 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
5218 method.
5219 (elf_internal_linux_prpsinfo): Remove declaration.
5220 * gdbarch.h: Regenerate.
5221 * gdbarch.c: Regenerate.
5222
a2f63b2e
MR
52232017-10-11 Maciej W. Rozycki <macro@imgtec.com>
5224
5225 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
5226 `set_gdbarch_elfcore_write_linux_prpsinfo'.
5227
458ca1d0
PA
52282017-10-11 Pedro Alves <palves@redhat.com>
5229
5230 * breakpoint.c (reattach_breakpoints): Delete.
5231 * breakpoint.h (reattach_breakpoints): Delete.
5232
905014d7
SM
52332017-10-11 Simon Marchi <simon.marchi@ericsson.com>
5234
5235 * symfile.c (registered_sym_fns): Make struct, not typedef.
5236 (DEF_VEC_O (registered_sym_fns)): Remove.
5237 (symtab_fns): Change type to std::vector.
5238 (add_symtab_fns): Adjust.
5239 (find_sym_fns): Adjust.
5240
56d704da
AK
52412017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
5242
5243 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
5244 * arc-tdep.h (arc_arch_is_em): New function.
5245 (arc_arch_is_hs): Likewise.
5246
7fa29be9
EB
52472017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
5248
5249 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
5250 parentheses in the declaration.
5251 (macro_lookup_inclusion): Likewise.
5252 (macro_lookup_definition): Likewise.
5253 * p-lang.h (pascal_builtin_types): Likewise.
5254 * tui/tui-data.c (tui_win_list): Likewise.
5255 * tui/tui-data.h (tui_win_list): Likewise.
5256 * utils.h (make_cleanup_free_section_addr_info): Likewise.
5257
d9b477e3
KB
52582017-10-11 Mark Rages <markrages@gmail.com>
5259
5260 * target-memory.c (block_boundaries): Fix for block address not
5261 aligned on block size.
5262
65630365
PA
52632017-10-10 Pedro Alves <palves@redhat.com>
5264 Tom Tromey <tom@tromey.com>
5265
5266 * breakpoint.c (struct captured_breakpoint_query_args)
5267 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
5268 (print_breakpoint): New.
5269 * breakpoint.h (print_breakpoint): Declare.
5270 * common/common-exceptions.h (enum return_reason): Remove
5271 references to catch_exceptions.
5272 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
5273 Delete.
5274 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
5275 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
5276 * gdb.h: Delete.
5277 * gdbthread.h (thread_select): Declare.
5278 * mi/mi-cmd-break.c: Don't include gdb.h.
5279 (breakpoint_notify): Use print_breakpoint.
5280 * mi/mi-cmd-catch.c: Don't include gdb.h.
5281 * mi/mi-interp.c: Don't include gdb.h.
5282 (mi_print_breakpoint_for_event): New.
5283 (mi_breakpoint_created, mi_breakpoint_modified): Use
5284 mi_print_breakpoint_for_event.
5285 * mi/mi-main.c: Don't include gdb.h.
5286 (mi_cmd_thread_select): Parse the global thread ID here. Use
5287 thread_select instead of gdb_thread_select.
5288 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
5289 of using gdb_list_thread_ids.
5290 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
5291 FILEIO_ENOSYS here.
5292 (remote_fileio_request): Use TRY/CATCH instead of
5293 catch_exceptions.
5294 * symfile-mem.c (struct symbol_file_add_from_memory_args)
5295 (symbol_file_add_from_memory_wrapper): Delete.
5296 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
5297 * thread.c: Don't include gdb.h.
5298 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
5299 (thread_alive): Use thread_select.
5300 (do_captured_thread_select): Delete, parts salvaged as ...
5301 (thread_select): ... this new function.
5302 (gdb_thread_select): Delete.
5303
bf469271
PA
53042017-10-10 Pedro Alves <palves@redhat.com>
5305 Tom Tromey <tom@tromey.com>
5306
5307 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
5308 and reverse logic.
5309 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
5310 No longer macros. Instead ...
5311 (enum wp_check_result): They're now values of this new
5312 enumeration.
5313 (watchpoint_check): Change return type to wp_check_result and
5314 parameter type to bpstat.
5315 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
5316 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
5317 catch_errors. Reverse logic of watchpoint_check call.
5318 (breakpoint_re_set_one): Now returns void and takes a breakpoint
5319 pointer as parameter.
5320 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
5321 * common/common-exceptions.c (throw_exception_sjlj): Update
5322 comments to avoid mentioning catch_errors.
5323 * exceptions.c (catch_errors): Delete.
5324 * exceptions.h: Update comments to avoid mentioning catch_errors.
5325 (catch_errors_ftype, catch_errors): Delete.
5326 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
5327 (hook_stop_stub): Delete.
5328 (restore_selected_frame): Change return type to void, and
5329 parameter type to const frame_id &.
5330 (restore_infcall_control_state): Use TRY/CATCH instead of
5331 catch_errors.
5332 * main.c (captured_command_loop): Return void and remove
5333 parameter. Remove references to catch_errors.
5334 (captured_main): Use TRY/CATCH instead of catch_errors.
5335 * objc-lang.c (objc_submethod_helper_data)
5336 (find_objc_msgcall_submethod_helper): Delete.
5337 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
5338 catch_errors.
5339 * record-full.c (record_full_message): Return void.
5340 (record_full_message_args, record_full_message_wrapper): Delete.
5341 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
5342 instead of catch_errors.
5343 * solib-aix.c (solib_aix_open_symbol_file_object): Change
5344 parameter type to int.
5345 * solib-darwin.c (open_symbol_file_object): Ditto.
5346 * solib-dsbt.c (open_symbol_file_object): Ditto.
5347 * solib-frv.c (open_symbol_file_object): Ditto.
5348 * solib-svr4.c (open_symbol_file_object): Ditto.
5349 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
5350 * solib.c (update_solib_list): Use TRY/CATCH instead of
5351 catch_errors.
5352 * solist.h (struct target_so_ops) <open_symbol_file_object>:
5353 Change type.
5354 * symmisc.c (struct print_symbol_args): Remove.
5355 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
5356 (print_symbol): Change type.
5357 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
5358 and remove parameters.
5359 (catch_errors): New.
5360 (get_windows_debug_event): Adjust.
5361
1a56bfa5
TT
53622017-10-09 Tom Tromey <tom@tromey.com>
5363
5364 * mi/mi-main.c (free_splay_tree): Remove.
5365 (list_available_thread_groups): Use splay_tree_up.
5366 * common/gdb_splay_tree.h: New file.
5367
0c478e2d
TT
53682017-10-09 Tom Tromey <tom@tromey.com>
5369
5370 * mi/mi-main.c (do_nothing): Remove.
5371 (list_available_thread_groups): Update.
5372
cbd2b4e3
PA
53732017-10-09 Pedro Alves <palves@redhat.com>
5374
5375 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
5376 reading registers when switching context.
5377
a181c0bf
JB
53782017-10-09 John Baldwin <jhb@FreeBSD.org>
5379
5380 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
5381 (fbsd_convert_siginfo): Likewise.
5382 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
5383
6e66f753
SM
53842017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
5385
5386 * configure.ac (try_guile_versions): Remove guile-2.2.
5387 * configure: Regenerate.
5388
890e9790
TT
53892017-10-09 Tom Tromey <tom@tromey.com>
5390
5391 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
5392 (COMPILE.pre): Use $(CXX).
5393
109483d9
PA
53942017-10-09 Pedro Alves <palves@redhat.com>
5395
5396 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
5397 Use bool.
5398 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5399 * cp-support.h (cp_remove_params): Now returns a
5400 gdb::unique_xmalloc_ptr.
5401 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
5402 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
5403 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
5404 returning a gdb::unique_xmalloc_ptr.
5405 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5406 * stack.c (find_frame_funname): Adjust to cp_remove_params
5407 returning a gdb::unique_xmalloc_ptr.
5408
791afaa2
TT
54092017-10-08 Tom Tromey <tom@tromey.com>
5410
5411 * dwarf2read.c (dwarf2_get_dwz_file): Use
5412 gdb::unique_xmalloc_ptr.
5413 (find_slot_in_mapped_hash): Likewise.
5414 (dwarf2_physname): Likewise.
5415 (create_dwo_unit_in_dwp_v1): Use std::string.
5416 (create_dwo_unit_in_dwp_v2): Likewise.
5417 (lookup_dwo_cutu): Likewise.
5418 (inherit_abstract_dies): Use std::vector.
5419 (read_array_type): Likewise.
5420 (dwarf_decode_macros): Remove unused declaration.
5421 (unsigned_int_compar): Remove.
5422 (dwarf2_build_psymtabs_hard): Use scoped_restore.
5423 (psymtabs_addrmap_cleanup): Remove.
5424
30a9c02f
TT
54252017-10-08 Tom Tromey <tom@tromey.com>
5426
5427 * frame-unwind.c (frame_unwind_try_unwinder): Update.
5428 * frame.h (frame_cleanup_after_sniffer): Declare.
5429 (frame_prepare_for_sniffer): Return void.
5430 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
5431 type of argument.
5432 (frame_prepare_for_sniffer): Return void.
5433
757325a3
TT
54342017-10-08 Tom Tromey <tom@tromey.com>
5435
5436 * utils.h (make_cleanup_value_free): Remove.
5437 * utils.c (do_value_free, struct cleanup): Remove.
5438 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
5439 Use gdb_value_up.
5440 * value.h (struct value_deleter): New.
5441 (gdb_value_up): New typedef.
5442
b9c04fb2
TT
54432017-10-08 Tom Tromey <tom@tromey.com>
5444
5445 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
5446 (make_cleanup_free_search_symbols): Remove.
5447 (search_symbols): Return std::vector.
5448 (symbol_search::compare_search_syms): Now member of
5449 symbol_search. Change arguments.
5450 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
5451 (symtab_symbol_info, rbreak_command): Update.
5452 * symtab.h (struct symbol_search) <next>: Remove.
5453 Add constructors.
5454 (symbol_search::operator<): New function.
5455 (symbol_search::operator==): New function.
5456 (search_symbols): Remove std::vector.
5457 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
5458 (symbol_search::compare_search_syms): Declare.
5459
0d28b0a5
YQ
54602017-10-06 Yao Qi <yao.qi@linaro.org>
5461
5462 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
5463 arch/aarch64-insn.o.
5464 Remove one rule.
5465 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
5466
71917808
YQ
54672017-10-06 Yao Qi <yao.qi@linaro.org>
5468
5469 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
5470 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
5471 arch/arm-linux.o respectively.
5472 * configure.tgt: Likewise.
5473
2081b2b2
YQ
54742017-10-06 Yao Qi <yao.qi@linaro.org>
5475
5476 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
5477 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
5478
a1b85d28
PA
54792017-10-06 Pedro Alves <palves@redhat.com>
5480
5481 * windows-nat.c: Include <algorithm>.
5482
d97987e2
YQ
54832017-10-06 Yao Qi <yao.qi@linaro.org>
5484
5485 * configure.tgt (i386_tobjs): New variable.
5486 (amd64_tobjs): New variable.
5487 Set $cpu_obs and $os_obs.
5488
f38307f5
YQ
54892017-10-06 Yao Qi <yao.qi@linaro.org>
5490
5491 * Makefile.in (CONFIG_SRC_SUBDIR): New.
5492 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
5493 (clean): Remove object files and dependency files.
5494 (distclean): Remove the directory.
5495 * configure.ac: Invoke AC_CONFIG_COMMANDS.
5496 * configure: Re-generated.
5497 * configure.tgt: Replace amd64.o with arch/amd64.o.
5498
2f924de6
JM
54992017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
5500
5501 PR build/22188
5502 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
5503 and SETEND.
5504
2fd9d7ca
PA
55052017-10-05 Pedro Alves <palves@redhat.com>
5506
5507 * linux-nat.c (linux_child_follow_fork): When following the parent
5508 and detaching the child, consult the parent thread's architecture
5509 instead of the child's.
5510
d13b8493
UW
55112017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5512
5513 * ax.h: Do not include "doublest.h".
5514 (union agent_val): Remove.
5515
3b4b2f16
UW
55162017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5517
5518 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
5519 (decimal_to_string): Return std::string object.
5520 (decimal_from_string): Accept std::string object. Return bool.
5521 (decimal_from_integral, decimal_from_doublest): Remove.
5522 (decimal_from_longest): Add prototype.
5523 (decimal_from_ulongest): Likewise.
5524 (decimal_to_longest): Likewise.
5525 (decimal_from_doublest): Likewise.
5526 * dfp.c: Do not include "gdbtypes.h" or "value.h".
5527 (MAX_DECIMAL_STRING): Move here.
5528 (decimal_to_string): Return std::string object.
5529 (decimal_from_string): Accept std::string object. Return bool.
5530 (decimal_from_integral): Remove, replace by ...
5531 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
5532 (decimal_to_longest): New function.
5533 (decimal_from_floating): Remove, replace by ...
5534 (decimal_from_doublest): ... this new function.
5535 (decimal_to_doublest): Update to new decimal_to_string interface.
5536
5537 * value.c (unpack_long): Use decimal_to_longest.
5538 * valops.c (value_cast): Use decimal_from_doublest instead of
5539 decimal_from_floating. Use decimal_from_[u]longest isntead of
5540 decimal_from_integral.
5541 * valarith.c (value_args_as_decimal): Likewise.
5542 * valprint.c (print_decimal_floating): Update to new
5543 decimal_to_string interface.
5544 * printcmd.c (printf_decfloat): Likewise.
5545 * c-exp.y (parse_number): Update to new decimal_from_string interface.
5546
1841ee5d
UW
55472017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5548
5549 * doublest.h: Do not include "floatformat.h". Remove stale comments.
5550 * gdbtypes.c: Include "floatformat.h".
5551 * value.c: Likewise.
5552 * m68k-tdep.c: Likewise.
5553
5554 * findvar.c: Do not include "floatformat.h".
5555 * amd64-darwin-tdep.c: Likewise.
5556 * arm-linux-tdep.c: Likewise.
5557 * i386-darwin-tdep.c: Likewise.
5558 * i387-tdep.c: Likewise.
5559 * m68k-linux-tdep.c: Likewise.
5560 * mep-tdep.c: Likewise.
5561 * mips-tdep.c: Likewise.
5562 * nios2-tdep.c: Likewise.
5563 * s390-linux-tdep.c: Likewise.
5564 * sparc-obsd-tdep.c: Likewise.
5565 * sparc-tdep.c: Likewise.
5566 * sparc64-tdep.c: Likewise.
5567 * spu-tdep.c: Likewise.
5568 * tic6x-tdep.c: Likewise.
5569 * tilegx-tdep.c: Likewise.
5570 * vax-tdep.c: Likewise.
5571 * xstormy16-tdep.c: Likewise.
5572 * xtensa-tdep.c: Likewise.
5573
5574 * top.c: Do not include "doublest.h".
5575 * aarch64-tdep.c: Likewise.
5576 * alpha-tdep.c: Likewise.
5577 * arm-linux-tdep.c: Likewise.
5578 * m68k-linux-tdep.c: Likewise.
5579 * tilegx-tdep.c: Likewise.
5580 * xstormy16-tdep.c: Likewise.
5581
a80a6471
JB
55822017-10-05 John Baldwin <jhb@FreeBSD.org>
5583
5584 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
5585 (mipsn32_fbsd_sigframe): Define.
5586 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
5587 for FreeBSD/mipsn32.
5588
12c4bd7f
JB
55892017-10-05 John Baldwin <jhb@FreeBSD.org>
5590
5591 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
5592 AT_HWCAP.
5593
c91933e9
TG
55942017-10-05 Tristan Gingold <tgingold@free.fr>
5595
5596 * MAINTAINERS (Misc): Update my email address.
5597
5cd63fda
PA
55982017-10-04 Pedro Alves <palves@redhat.com>
5599
5600 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
5601 it instead of target_gdbarch.
5602 (get_remote_state, get_remote_packet_size): Adjust
5603 get_remote_arch_state calls, passing down target_gdbarch
5604 explicitly.
5605 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
5606 'gdbarch' and use it instead of target_gdbarch.
5607 (get_memory_packet_size): Adjust get_remote_arch_state calls,
5608 passing down target_gdbarch explicitly.
5609 (struct stop_reply) <arch>: New field.
5610 (remote_parse_stop_reply): Use the stopped thread's architecture,
5611 not the current inferior's. Save the architecture in the
5612 stop_reply.
5613 (process_stop_reply): Use the stop reply's architecture.
5614 (process_g_packet, remote_fetch_registers)
5615 (remote_prepare_to_store, store_registers_using_G)
5616 (remote_store_registers): Adjust get_remote_arch_state calls,
5617 using the regcache's architecture.
5618 (remote_get_trace_status): Adjust get_remote_arch_state calls,
5619 passing down target_gdbarch explicitly.
5620 * spu-multiarch.c (spu_thread_architecture): Defer to the target
5621 beneath instead of calling target_gdbarch.
5622 * target.c (default_thread_architecture): Use the specified
5623 inferior's architecture, instead of the current inferior's
5624 architecture (via target_gdbarch).
5625
ed4227b7
PA
56262017-10-04 Pedro Alves <palves@redhat.com>
5627
5628 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
5629 case.
5630 (regcache_print): Handle !target_has_registers here instead.
5631
55b11ddf
PA
56322017-10-04 Pedro Alves <palves@redhat.com>
5633
5634 * frame.c (create_test_frame): Delete.
5635 * frame.h (create_test_frame): Delete.
5636 * gdbarch-selftests.c: Include gdbthread.h and target.h.
5637 (class regcache_test): Delete.
5638 (test_target_has_registers, test_target_has_stack)
5639 (test_target_has_memory, test_target_prepare_to_store)
5640 (test_target_store_registers): New functions.
5641 (test_target_ops): New class.
5642 (register_to_value_test): Error out if there's already a
5643 process_stratum (or higher) target pushed. Create a fuller mock
5644 environment, with mock target_ops, inferior, address space, thread
5645 and inferior_ptid.
5646 * progspace.c (struct address_space): Move to ...
5647 * progspace.h (struct address_space): ... here.
5648 * regcache.h (regcache::~regcache, regcache::raw_write)
5649 [GDB_SELF_TEST]: No longer virtual.
5650
4c71c105
SM
56512017-10-04 Simon Marchi <simon.marchi@ericsson.com>
5652
5653 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
5654
73dcd72d
PA
56552017-10-04 Pedro Alves <palves@redhat.com>
5656
5657 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
5658 out of 'between TRY and CATCH'.
5659
44704526
PA
56602017-10-04 Pedro Alves <palves@redhat.com>
5661
5662 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
5663 * common/common-exceptions.h (TRY): Open an outermost scope.
5664 Expand intro comment.
5665 (CATCH): Reindent.
5666 (END_CATCH): Close the outermost scope.
5667 * completer.c (complete_line_internal): Add missing END_CATCH.
5668
bc3b087d
SDJ
56692017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5670
5671 * NEWS (Changes since GDB 8.0): Add entry about new
5672 'set-cwd-on-gdbserver' feature.
5673 (New remote packets): Add entry for QSetWorkingDir.
5674 * common/common-inferior.h (set_inferior_cwd): New prototype.
5675 * infcmd.c (set_inferior_cwd): Remove "static".
5676 (show_cwd_command): Expand text to include remote debugging.
5677 * remote.c: Add PACKET_QSetWorkingDir.
5678 (remote_protocol_features) <QSetWorkingDir>: New entry for
5679 PACKET_QSetWorkingDir.
5680 (extended_remote_set_inferior_cwd): New function.
5681 (extended_remote_create_inferior): Call
5682 "extended_remote_set_inferior_cwd".
5683 (_initialize_remote): Call "add_packet_config_cmd" for
5684 QSetWorkingDir.
5685
d092c5a2
SDJ
56862017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5687
5688 * NEWS (New commands): Mention "set/show cwd".
5689 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
5690 "cd" command's help text.
5691 * common/common-inferior.h (get_inferior_cwd): New prototype.
5692 * infcmd.c (inferior_cwd_scratch): New global variable.
5693 (set_inferior_cwd): New function.
5694 (get_inferior_cwd): Likewise.
5695 (set_cwd_command): Likewise.
5696 (show_cwd_command): Likewise.
5697 (_initialize_infcmd): Add "set/show cwd" commands.
5698 * inferior.h (class inferior) <cwd>: New field.
5699 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
5700 (fork_inferior): Change inferior's cwd before its execution.
5701 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
5702 to CreateProcess.
5703
7da0a886
SDJ
57042017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5705
5706 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
5707 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
5708 (COMMON_OBS): Add gdb_tilde_expand.o.
5709 * common/gdb_tilde_expand.c: New file.
5710 * common/gdb_tilde_expand.h: Likewise.
5711
db8dd160
MR
57122017-10-03 Maciej W. Rozycki <macro@imgtec.com>
5713
5714 * gdbarch.sh (objfile): Remove duplicate declaration.
5715 * gdbarch.h: Regenerate.
5716
f8bfbf22
TT
57172017-10-03 Tom Tromey <tom@tromey.com>
5718
5719 * utils.c (internal_vproblem): Use string_vprintf.
5720
5178ed48
TT
57212017-10-03 Tom Tromey <tom@tromey.com>
5722
5723 * printcmd.c (info_symbol_command): Use std::string.
5724
8cff8730
TT
57252017-10-03 Tom Tromey <tom@tromey.com>
5726
5727 * top.c (gdb_safe_append_history): Use std::string.
5728
895b8f30
TT
57292017-10-03 Tom Tromey <tom@tromey.com>
5730
5731 * event-top.c (stdin_event_handler): Update.
5732 * main.c (captured_main_1): Update.
5733 * top.h (make_delete_ui_cleanup): Remove.
5734 (struct ui): Add constructor and destructor.
5735 (new_ui, delete_ui): Remove.
5736 * top.c (make_delete_ui_cleanup): Remove.
5737 (new_ui_command): Use std::unique_ptr.
5738 (delete_ui_cleanup): Remove.
5739 (ui::ui): Rename from new_ui. Update.
5740 (free_ui): Remove.
5741 (ui::~ui): Rename from delete_ui. Update.
5742
0efef640
TT
57432017-10-03 Tom Tromey <tom@tromey.com>
5744
5745 * symfile.c (load_progress): Use gdb::byte_vector.
5746
245ad7d3
TT
57472017-10-03 Tom Tromey <tom@tromey.com>
5748
5749 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
5750 declaration.
5751 * printcmd.c (x_command): Remove unused declaration.
5752 * symfile.c (symbol_file_command): Remove unused declaration.
5753
e05550d7
TT
57542017-10-03 Tom Tromey <tom@tromey.com>
5755
5756 * utils.c (internal_vproblem): Use std::string.
5757 (defaulted_query): Likewise.
5758
b95de2b7
TT
57592017-10-03 Tom Tromey <tom@tromey.com>
5760
5761 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
5762 * top.c (execute_command_to_string): Update.
5763 * utils.c (make_cleanup_restore_page_info): Remove.
5764 (do_restore_page_info_cleanup): Remove.
5765 (set_batch_flag_and_restore_page_info):
5766 New.
5767 (make_cleanup_restore_page_info): Remove.
5768 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5769 (~set_batch_flag_and_restore_page_info): New
5770 (make_cleanup_restore_uinteger): Remove.
5771 (make_cleanup_restore_integer): Remove.
5772 (struct restore_integer_closure): Remove.
5773 (restore_integer): Remove.
5774 * utils.h (struct set_batch_flag_and_restore_page_info): New
5775 class.
5776 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5777 (make_cleanup_restore_page_info): Remove.
5778 (make_cleanup_restore_uinteger) Remove.
5779 (make_cleanup_restore_integer) Remove.
5780
07036511
TT
57812017-10-03 Tom Tromey <tom@tromey.com>
5782
5783 * record-full.h (record_full_gdb_operation_disable_set): Return
5784 scoped_restore_tmpl<int>.
5785 * infrun.c (adjust_pc_after_break): Update.
5786 (handle_signal_stop): Update.
5787 * record-full.c (record_full_gdb_operation_disable_set): Return
5788 scoped_restore_tmpl<int>.
5789 (record_full_wait_1, record_full_insert_breakpoint)
5790 (record_full_remove_breakpoint, record_full_save)
5791 (record_full_goto_insn): Update.
5792
45320ffa
TT
57932017-10-02 Tom Tromey <tom@tromey.com>
5794
5795 PR rust/22236:
5796 * rust-lang.c (rust_val_print_str): New function.
5797 (val_print_struct): Call it.
5798 (rust_subscript): Preserve name of slice type.
5799
b3e3859b
TT
58002017-10-02 Tom Tromey <tom@tromey.com>
5801
5802 * rust-lang.c (rust_subscript): Handle slices in
5803 EVAL_AVOID_SIDE_EFFECTS case.
5804
01af5e0d
TT
58052017-10-02 Tom Tromey <tom@tromey.com>
5806
5807 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
5808
888e3ddb
TT
58092017-10-02 Tom Tromey <tom@tromey.com>
5810
5811 * rust-lang.h (rust_slice_type): Add "extern".
5812
cc536b21
PA
58132017-10-02 Tom Tromey <tom@tromey.com>
5814 Pedro Alves <palves@redhat.com>
5815
5816 * ada-lang.h (ada_exc_info::operator<): Make const.
5817 (ada_exc_info::operator==): Make const.
5818 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
5819 Make const.
5820
386c8614
TT
58212017-09-29 Tom Tromey <tom@tromey.com>
5822
5823 * target.c (read_whatever_is_readable): Change type of "result".
5824 Update.
5825 (free_memory_read_result_vector): Remove.
5826 (read_memory_robust): Change return type. Update.
5827 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
5828 bin2hex, std::string.
5829 * target.h (memory_read_result_s): Remove typedef.
5830 (free_memory_read_result_vector): Remove.
5831 (read_memory_robust): Return std::vector.
5832
789c4b5e
TT
58332017-09-29 Tom Tromey <tom@tromey.com>
5834
5835 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
5836
ab816a27
TT
58372017-09-29 Tom Tromey <tom@tromey.com>
5838
5839 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
5840 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
5841 operator< and operator==.
5842 (ada_exceptions_list): Return a std::vector.
5843 * ada-lang.c (ada_exc_info::operator<): Rename from
5844 compare_ada_exception_info.
5845 (ada_exc_info::operator==): New.
5846 (sort_remove_dups_ada_exceptions_list): Change type of
5847 "exceptions".
5848 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
5849 (ada_add_global_exceptions): Likewise.
5850 (ada_exceptions_list_1): Return a std::vector.
5851 (ada_exceptions_list): Likewise.
5852
52f9abe4
TT
58532017-09-29 Tom Tromey <tom@tromey.com>
5854
5855 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
5856 'std::set *'.
5857 (print_one_inferior): Update.
5858 (free_vector_of_ints): Remove.
5859 (list_available_thread_groups): Change "ids" to std::set.
5860 (mi_cmd_list_thread_groups): Update.
5861 (struct collect_cores_data) <core>: Now a std::set.
5862 (collect_cores): Update.
5863 (unique): Remove.
5864 (print_one_inferior): Update.
5865
dcd5ddcc
TT
58662017-09-29 Tom Tromey <tom@tromey.com>
5867
5868 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
5869 (mi_execute_async_cli_command): Likewise.
5870 (mi_cmd_trace_frame_collected): Use field_fmt.
5871
45d288cc
TT
58722017-09-29 Tom Tromey <tom@tromey.com>
5873
5874 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
5875 gdb::byte_vector.
5876
6afe2f4a
TT
58772017-09-29 Tom Tromey <tom@tromey.com>
5878
5879 * mi/mi-parse.c (mi_parse): Remove unused declaration.
5880
9813429a
TT
58812017-09-29 Tom Tromey <tom@tromey.com>
5882
5883 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
5884
2d6960b4
TT
58852017-09-29 Tom Tromey <tom@tromey.com>
5886
5887 * varobj.h (varobj_gen_name): Return std::string.
5888 * varobj.c (varobj_gen_name): Return std::string.
5889 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
5890 (mi_cmd_var_delete): Don't copy "name".
5891
784c453a
TT
58922017-09-29 Tom Tromey <tom@tromey.com>
5893
5894 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
5895 (mi_cmd_break_insert_1): Update.
5896
a9bc57b9
TT
58972017-09-29 Tom Tromey <tom@tromey.com>
5898
5899 * target.h (make_scoped_defer_target_commit_resume): Update.
5900 * target.c (make_scoped_defer_target_commit_resume): Rename from
5901 make_cleanup_defer_target_commit_resume. Return a
5902 scoped_restore.
5903 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
5904
9754d8c4
TT
59052017-09-29 Tom Tromey <tom@tromey.com>
5906
5907 * main.c (captured_main_1): Remove unused declaration.
5908 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
5909
99ef965c
TT
59102017-09-29 Tom Tromey <tom@tromey.com>
5911
5912 * symtab.c (search_symbols): Remove unused outer cleanup.
5913 (make_source_files_completion_list): Remove unused declaration.
5914
42518ba7
TT
59152017-09-29 Tom Tromey <tom@tromey.com>
5916
5917 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
5918
726b2169
TT
59192017-09-29 Tom Tromey <tom@tromey.com>
5920
5921 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
5922 gdb::byte_vector.
5923
55b06432
TT
59242017-09-29 Tom Tromey <tom@tromey.com>
5925
5926 * complaints.c (vcomplaint): Use std::string.
5927
8abcee91
TT
59282017-09-29 Tom Tromey <tom@tromey.com>
5929
5930 * tracepoint.c (trace_variable_command): Use std::string.
5931 (encode_actions_1): Remove unused declarations.
5932 (create_tsv_from_upload): Use std::string.
5933
6ad94bc7
TT
59342017-09-29 Tom Tromey <tom@tromey.com>
5935
5936 * cp-support.c (gdb_demangle): Use std::string.
5937
2003f3d8
TT
59382017-09-29 Tom Tromey <tom@tromey.com>
5939
5940 * stack.c (parse_frame_specification): Use std::string
5941 (info_frame_command): Use gdb::unique_xmalloc_ptr.
5942
8f8accb5
TT
59432017-09-29 Tom Tromey <tom@tromey.com>
5944
5945 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
5946
200aa7b1
TT
59472017-09-29 Tom Tromey <tom@tromey.com>
5948
5949 * utils.c (vfprintf_maybe_filtered): Use std::string.
5950 (vfprintf_unfiltered): Likewise.
5951
606aae8a
TT
59522017-09-29 Tom Tromey <tom@tromey.com>
5953
5954 * event-top.c (top_level_prompt): Return std::string.
5955 (display_gdb_prompt): Update.
5956
bd413795
TT
59572017-09-29 Tom Tromey <tom@tromey.com>
5958
5959 * unittests/common-utils-selftests.c (format): New function.
5960 (string_vprintf_tests): New function.
5961 (_initialize_common_utils_selftests): Register new tests.
5962 * common/common-utils.c (string_vprintf): New function.
5963 * common/common-utils.h (string_vprintf): Declare.
5964
256642e8
PA
59652017-09-29 Pedro Alves <palves@redhat.com>
5966
5967 * common/rsp-low.c (unpack_varlen_hex): Constify.
5968 * common/rsp-low.h (unpack_varlen_hex): Constify.
5969 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5970 Constify.
5971 * remote.c (remote_set_permissions, read_ptid)
5972 (remote_current_thread, remote_get_threads_with_qthreadinfo)
5973 (remote_static_tracepoint_marker_at)
5974 (remote_static_tracepoint_markers_by_strid)
5975 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
5976 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
5977 (parse_tracepoint_definition, parse_tsv_definition)
5978 (parse_static_tracepoint_marker_definition): Constify.
5979 * tracepoint.h (parse_static_tracepoint_marker_definition)
5980 (parse_trace_status, parse_tracepoint_status)
5981 (parse_tracepoint_definition, parse_tsv_definition): Constify.
5982
b6bb3468
PA
59832017-09-29 Pedro Alves <palves@redhat.com>
5984
5985 * remote.c (target_buf, target_buf_size): Delete.
5986 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
5987 Use the connection's packet buffer instead.
5988 All callers adjusted.
5989 (_initialize_remote): Remove references to target_buf and
5990 target_buf_size.
5991
b2f8eb7a
PA
59922017-09-28 Pedro Alves <palves@redhat.com>
5993
5994 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5995 unittests/common-utils-selftests.c.
5996 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
5997 (COMMON_OBS): Remove utils-selftests.o.
5998 * utils-selftests.c: Move to ...
5999 * unittests/common-utils-selftests.c: ... here and rename self
6000 test to "string_printf".
6001
08302ed2
DE
60022017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
6003
6004 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
6005 having NULL cus or tus.
6006
96a5a1d3
UW
60072017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6008
6009 * arm-tdep.c: (convert_from_extended): Remove.
6010 (convert_to_extended): Likewise.
6011 (arm_extract_return_value): Use convert_typed_floating.
6012 (arm_store_return_value): Likewise.
6013
6014 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
6015 * sh-tdep.c: Do not include "floatformat.h".
6016 (sh_littlebyte_bigword_type): New function.
6017 (sh_register_convert_to_virtual): Use convert_typed_floating.
6018 (sh_register_convert_to_raw): Likewise.
6019 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
6020 (sh64_littlebyte_bigword_type): New function.
6021 (sh64_extract_return_value): Use convert_typed_floating.
6022 (sh64_register_convert_to_virtual): Likewise.
6023 (sh64_register_convert_to_raw): Likewise.
6024
0db7851f
UW
60252017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6026
6027 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
6028 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
6029
6030 * gdbtypes.h (union type_specific): Make field floatformat hold
6031 just a single struct floatformat, not an array.
6032 (floatformat_from_type): Move here.
6033 * gdbtypes.c (floatformat_from_type): Move here. Update to
6034 changed TYPE_FLOATFORMAT definition.
6035 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
6036 (recursive_dump_type): Likewise.
6037 (init_float_type): Install correct floatformat for byte order.
6038 (arch_float_type): Likewise.
6039
77b7c781
UW
60402017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6041
6042 * gdbtypes.c (init_type): Change incoming argument from
6043 length-in-bytes to length-in-bits. Assert length is a
6044 multiple of TARGET_CHAR_BITS.
6045 (arch_type, arch_flags_type): Likewise.
6046 (init_integer_type): Update call to init_type.
6047 (init_character_type): Likewise.
6048 (init_boolean_type): Likewise.
6049 (init_float_type): Likewise.
6050 (init_decfloat_type): Likewise.
6051 (init_complex_type): Likewise.
6052 (init_pointer_type): Likewise.
6053 (objfile_type): Likewise.
6054 (arch_integer_type): Update call to arch_type.
6055 (arch_character_type): Likewise.
6056 (arch_boolean_type): Likewise.
6057 (arch_float_type): Likewise.
6058 (arch_decfloat_type): Likewise.
6059 (arch_complex_type): Likewise.
6060 (arch_pointer_type): Likewise.
6061 (gdbtypes_post_init): Likewise.
6062
6063 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
6064 (read_base_type): Likewise.
6065 * mdebugread.c (basic_type): Likewise.
6066 * stabsread.c (dbx_init_float_type): Likewise.
6067 (rs6000_builtin_type): Likewise.
6068 (read_range_type): Likewise. Also, fix call to init_integer_type
6069 with erroneous length argument.
6070
6071 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
6072 * d-lang.c (build_d_types): Likewise.
6073 * f-lang.c (build_fortran_types): Likewise.
6074 * go-lang.c (build_go_types): Likewise.
6075 * opencl-lang.c (build_opencl_types): Likewise.
6076 * jit.c (finalize_symtab): Likewise.
6077 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
6078 (build_std_type_info_type): Likewise.
6079 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
6080 update call to arch_flags_type.
6081
6082 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
6083 arch_type.
6084 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
6085 * windows-tdep.c (windows_get_tlb_type): Likewise.
6086
6087 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
6088 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6089 * m32c-tdep.c (make_types): Likewise.
6090 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
6091 (rl78_psw_type): Update call to arch_flags_type.
6092 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
6093 * rx-tdep.c (rx_psw_type): Likewise.
6094 (rx_fpsw_type): Likewise.
6095 * sparc-tdep.c (sparc_psr_type): Likewise.
6096 (sparc_fsr_type): Likewise.
6097 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
6098 (sparc64_ccr_type): Likewise.
6099 (sparc64_fsr_type): Likewise.
6100 (sparc64_fprs_type): Likewise.
6101
f21b4d5c
TT
61022017-09-27 Tom Tromey <tom@tromey.com>
6103
6104 * findcmd.c (find_command): Constify.
6105
643c2ffa
TT
61062017-09-27 Tom Tromey <tom@tromey.com>
6107
6108 * ada-tasks.c (task_command_1, task_command): Constify.
6109
510e5e56
TT
61102017-09-27 Tom Tromey <tom@tromey.com>
6111
6112 * symtab.c (maintenance_print_symbol_cache)
6113 (maintenance_flush_symbol_cache)
6114 (maintenance_print_symbol_cache_statistics): Constify.
6115
e503b191
TT
61162017-09-27 Tom Tromey <tom@tromey.com>
6117
6118 * inferior.c (detach_inferior_command, kill_inferior_command)
6119 (inferior_command): Constify.
6120
4e001312
TT
61212017-09-27 Tom Tromey <tom@tromey.com>
6122
6123 * regcache.c (regcache_print, maintenance_print_registers)
6124 (maintenance_print_raw_registers)
6125 (maintenance_print_cooked_registers)
6126 (maintenance_print_register_groups)
6127 (maintenance_print_remote_registers): Constify.
6128
77763700
TT
61292017-09-27 Tom Tromey <tom@tromey.com>
6130
6131 * printcmd.c (map_display_numbers, undisplay_command)
6132 (enable_disable_display_command, enable_display_command)
6133 (disable_display_command): Constify.
6134
4495129a
TT
61352017-09-27 Tom Tromey <tom@tromey.com>
6136
6137 * breakpoint.h (delete_command): Don't declare.
6138 * breakpoint.c (delete_command, enable_once_command)
6139 (enable_count_command, enable_delete_command, breakpoint_1)
6140 (maintenance_info_breakpoints, stopin_command, stopat_command)
6141 (delete_command, delete_trace_command, save_breakpoints)
6142 (save_breakpoints_command, save_tracepoints_command): Constify.
6143
3088cf40
TT
61442017-09-27 Tom Tromey <tom@tromey.com>
6145
6146 * macrocmd.c (macro_expand_command, macro_expand_once_command)
6147 (skip_ws, extract_identifier, macro_define_command)
6148 (macro_undef_command, macro_list_command): Constify.
6149
69f476a3
TT
61502017-09-27 Tom Tromey <tom@tromey.com>
6151
6152 * infcmd.c (environment_info, set_environment_command)
6153 (unset_environment_command, path_info, info_proc_cmd_1)
6154 (info_proc_cmd_mappings, info_proc_cmd_stat)
6155 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
6156 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
6157
c4a3e68e
TT
61582017-09-27 Tom Tromey <tom@tromey.com>
6159
6160 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
6161 Constify.
6162
c9d31bd6
TT
61632017-09-27 Tom Tromey <tom@tromey.com>
6164
6165 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
6166
1f3f85eb
TT
61672017-09-27 Tom Tromey <tom@tromey.com>
6168
6169 * demangle.c (demangle_command): Constify.
6170
9c504b5d
TT
61712017-09-27 Tom Tromey <tom@tromey.com>
6172
6173 * progspace.c (maintenance_info_program_spaces_command):
6174 Constify.
6175
6663cf91
TT
61762017-09-27 Tom Tromey <tom@tromey.com>
6177
6178 * compile/compile.c (check_raw_argument, compile_file_command)
6179 (compile_code_command, compile_print_command): Constify.
6180
34e5fa26
TT
61812017-09-27 Tom Tromey <tom@tromey.com>
6182
6183 * reggroups.c (maintenance_print_reggroups): Constify.
6184
8384c356
TT
61852017-09-27 Tom Tromey <tom@tromey.com>
6186
6187 * dwarf2read.c (save_gdb_index_command): Constify.
6188
884beb0c
TT
61892017-09-27 Tom Tromey <tom@tromey.com>
6190
6191 * stap-probe.c (info_probes_stap_command): Constify.
6192
e0b2930c
TT
61932017-09-27 Tom Tromey <tom@tromey.com>
6194
6195 * fork-child.c (unset_exec_wrapper_command): Constify.
6196
f938677d
TT
61972017-09-27 Tom Tromey <tom@tromey.com>
6198
6199 * btrace.c (get_uint, get_context_size, no_chunk)
6200 (maint_btrace_packet_history_cmd)
6201 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
6202 (maint_info_btrace_cmd): Constify.
6203
8949cb87
TT
62042017-09-27 Tom Tromey <tom@tromey.com>
6205
6206 * reverse.c (delete_bookmark_command): Constify.
6207
ac88e2de
TT
62082017-09-27 Tom Tromey <tom@tromey.com>
6209
6210 * remote.c (set_memory_packet_size)
6211 (set_memory_write_packet_size, show_memory_write_packet_size)
6212 (set_memory_read_packet_size, show_memory_read_packet_size)
6213 (compare_sections_command, packet_command, remote_put_command)
6214 (remote_get_command, remote_delete_command): Constify.
6215
bd4c9dfe
TT
62162017-09-27 Tom Tromey <tom@tromey.com>
6217
6218 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
6219 (set_mipsfpu_double_command, set_mipsfpu_none_command)
6220 (set_mipsfpu_auto_command): Constify.
6221
5e93d4c6
TT
62222017-09-27 Tom Tromey <tom@tromey.com>
6223
6224 * cli/cli-cmds.h (cd_command): Constify.
6225 * cli/cli-cmds.c (cd_command): Constify.
6226
fc41a75b
TT
62272017-09-27 Tom Tromey <tom@tromey.com>
6228
6229 * thread.c (thread_name_command, thread_find_command): Constify.
6230
67810076
TT
62312017-09-27 Tom Tromey <tom@tromey.com>
6232
6233 * probe.c (enable_probes_command, disable_probes_command):
6234 Constify.
6235
1d8b34a7
TT
62362017-09-27 Tom Tromey <tom@tromey.com>
6237
6238 * symfile.c (symbol_file_command): Constify.
6239 * gdbcore.h (deprecated_file_changed_hook): Constify.
6240 * exec.c (deprecated_file_changed_hook, exec_file_command)
6241 (file_command): Constify.
6242 * defs.h (symbol_file_command): Constify.
6243
442019e1
TT
62442017-09-27 Tom Tromey <tom@tromey.com>
6245
6246 * remote-fileio.c (set_system_call_allowed)
6247 (show_system_call_allowed): Constify.
6248
2983f7cb
TT
62492017-09-27 Tom Tromey <tom@tromey.com>
6250
6251 * tracepoint.c (delete_trace_variable_command)
6252 (tfind_end_command, tfind_start_command, tfind_pc_command)
6253 (tfind_tracepoint_command, tfind_line_command)
6254 (tfind_range_command, tfind_outside_command): Constify.
6255
4fd41b24
TT
62562017-09-27 Tom Tromey <tom@tromey.com>
6257
6258 * ax-gdb.c (maint_agent_printf_command, agent_command)
6259 (agent_eval_command): Constify.
6260
f2fc3015
TT
62612017-09-27 Tom Tromey <tom@tromey.com>
6262
6263 * tracepoint.c (info_scope_command): Constify.
6264 * python/python.c (gdbpy_decode_line): Constify.
6265 * python/py-breakpoint.c (bppy_init): Constify.
6266 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
6267 * location.h: (new_linespec_location)
6268 (string_to_event_location_basic, string_to_event_location):
6269 Constify.
6270 * location.c (new_linespec_location)
6271 (string_to_event_location_basic, string_to_event_location):
6272 Constify.
6273 * linespec.h (decode_line_with_current_source)
6274 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
6275 * linespec.c (linespec_lex_to_end)
6276 (decode_line_with_current_source)
6277 (decode_line_with_last_displayed): Constify.
6278 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
6279 Constify.
6280 * cli/cli-cmds.c (edit_command, list_command): Constify.
6281 * breakpoint.h (until_break_command, watch_command_wrapper)
6282 (awatch_command_wrapper, rwatch_command_wrapper)
6283 (init_ada_exception_breakpoint): Constify.
6284 * breakpoint.c (break_command_1, dprintf_command)
6285 (break_range_command, watch_command_wrapper)
6286 (rwatch_command_wrapper, awatch_command_wrapper)
6287 (until_break_command, init_ada_exception_breakpoint)
6288 (strace_marker_create_sals_from_location, trace_command)
6289 (ftrace_command, strace_command, struct tracepoint): Constify.
6290 * ax-gdb.c (agent_command_1): Constify.
6291 * ada-lang.c (ada_exception_sal): Constify.
6292
8c2f95f4
TT
62932017-09-27 Tom Tromey <tom@tromey.com>
6294
6295 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
6296 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
6297 (get_context_size, no_chunk, get_insn_history_modifiers)
6298 (cmd_record_insn_history, get_call_history_modifiers)
6299 (cmd_record_call_history): Constify.
6300
a0d65762
TT
63012017-09-27 Tom Tromey <tom@tromey.com>
6302
6303 * source.c (show_substitute_path_command)
6304 (unset_substitute_path_command, set_substitute_path_command):
6305 Constify.
6306
58971144
TT
63072017-09-27 Tom Tromey <tom@tromey.com>
6308
6309 * typeprint.c (maintenance_print_type): Constify.
6310 * maint.c (maintenance_dump_me, maintenance_demangle)
6311 (maintenance_time_display, maintenance_info_sections)
6312 (maintenance_print_statistics, maintenance_deprecate)
6313 (maintenance_undeprecate): Constify.
6314 (maintenance_do_deprecate): Constify. Use std::string.
6315 (maintenance_selftest): Constify.
6316 * gdbtypes.h (maintenance_print_type): Constify.
6317
c482f52c
TT
63182017-09-27 Tom Tromey <tom@tromey.com>
6319
6320 * hppa-tdep.c (unwind_command): Constify.
6321
e100df1a
TT
63222017-09-27 Tom Tromey <tom@tromey.com>
6323
6324 * target-descriptions.c (unset_tdesc_filename_cmd)
6325 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
6326 Constify.
6327
31d56ade
TT
63282017-09-27 Tom Tromey <tom@tromey.com>
6329
6330 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
6331
b961da0b
TT
63322017-09-27 Tom Tromey <tom@tromey.com>
6333
6334 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
6335
e2d8ae16
TT
63362017-09-27 Tom Tromey <tom@tromey.com>
6337
6338 * tui/tui-regs.c (tui_reg_command): Constify.
6339
863779b0
TT
63402017-09-27 Tom Tromey <tom@tromey.com>
6341
6342 * skip.c (skip_file_command, skip_function_command)
6343 (skip_enable_command, skip_disable_command, skip_delete_command):
6344 Constify.
6345
cdb34d4a
TT
63462017-09-27 Tom Tromey <tom@tromey.com>
6347
6348 * record-btrace.c (cmd_record_btrace_bts_start)
6349 (cmd_record_btrace_pt_start): Constify.
6350
e99c83e7
TT
63512017-09-27 Tom Tromey <tom@tromey.com>
6352
6353 * symmisc.c (maintenance_print_symbols)
6354 (maintenance_print_msymbols, maintenance_print_objfiles)
6355 (maintenance_info_symtabs, maintenance_check_symtabs)
6356 (maintenance_expand_symtabs, maintenance_info_line_tables):
6357 Constify.
6358
32faf971
TT
63592017-09-27 Tom Tromey <tom@tromey.com>
6360
6361 * top.c (new_ui_command): Constify.
6362
2cf311eb
TT
63632017-09-27 Tom Tromey <tom@tromey.com>
6364
6365 * symfile.c (add_symbol_file_command)
6366 (remove_symbol_file_command, list_overlays_command)
6367 (map_overlay_command, unmap_overlay_command)
6368 (overlay_auto_command, overlay_manual_command)
6369 (overlay_off_command, overlay_load_command): Constify.
6370
e6738699
TT
63712017-09-27 Tom Tromey <tom@tromey.com>
6372
6373 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
6374 (info_spu_mailbox_command, info_spu_dma_command)
6375 (info_spu_proxydma_command): Constify.
6376
aa360cd5
TT
63772017-09-27 Tom Tromey <tom@tromey.com>
6378
6379 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
6380
898241a5
TT
63812017-09-27 Tom Tromey <tom@tromey.com>
6382
6383 * cli/cli-script.c (user_defined_command): Constify.
6384
2d0ac106
TT
63852017-09-27 Tom Tromey <tom@tromey.com>
6386
6387 * cli/cli-dump.c (dump_memory_command, dump_value_command)
6388 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
6389 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
6390 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
6391 (dump_binary_value, append_binary_memory, append_binary_value):
6392 Constify.
6393 (struct dump_context) <func>: Constify.
6394 (add_dump_command): Update.
6395
dede02ce
TT
63962017-09-27 Tom Tromey <tom@tromey.com>
6397
6398 * cli/cli-cmds.c (show_version, show_configuration)
6399 (source_command, show_user): Constify.
6400
d3cb6b99
TT
64012017-09-27 Tom Tromey <tom@tromey.com>
6402
6403 * target.c (maintenance_print_target_stack): Constify.
6404
1970a12f
TT
64052017-09-27 Tom Tromey <tom@tromey.com>
6406
6407 * interps.c (interpreter_exec_cmd): Constify.
6408
41243651
TT
64092017-09-27 Tom Tromey <tom@tromey.com>
6410
6411 * record-full.c (cmd_record_full_restore): Constify.
6412
4465d9db
TT
64132017-09-27 Tom Tromey <tom@tromey.com>
6414
6415 * memattr.c (enable_mem_command, disable_mem_command)
6416 (delete_mem_command): Constify.
6417
ad25e423
TT
64182017-09-27 Tom Tromey <tom@tromey.com>
6419
6420 * value.c (show_convenience): Constify.
6421
d64097b1
TT
64222017-09-27 Tom Tromey <tom@tromey.com>
6423
6424 * gdbcore.h (core_file_command): Update.
6425 * corefile.c (core_file_command): Constify.
6426
4d4589ef
TT
64272017-09-27 Tom Tromey <tom@tromey.com>
6428
6429 * user-regs.c (maintenance_print_user_registers): Constify.
6430
32a7bf17
TT
64312017-09-27 Tom Tromey <tom@tromey.com>
6432
6433 * cp-namespace.c (maintenance_cplus_namespace): Constify.
6434
4a475551
TT
64352017-09-27 Tom Tromey <tom@tromey.com>
6436
6437 * cp-support.c (first_component_command): Constify.
6438
990b9f9f
TT
64392017-09-27 Tom Tromey <tom@tromey.com>
6440
6441 * psymtab.c (maintenance_print_psymbols)
6442 (maintenance_info_psymtabs, maintenance_check_psymtabs):
6443 Constify.
6444
c281872e
TT
64452017-09-27 Tom Tromey <tom@tromey.com>
6446
6447 * windows-tdep.c (display_tib): Constify.
6448
5b64bf74
TT
64492017-09-27 Tom Tromey <tom@tromey.com>
6450
6451 * linux-fork.c (delete_checkpoint_command)
6452 (detach_checkpoint_command): Constify.
6453
4ada038f
TT
64542017-09-27 Tom Tromey <tom@tromey.com>
6455
6456 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
6457
57f5a81b
TT
64582017-09-27 Tom Tromey <tom@tromey.com>
6459
6460 * arc-tdep.c (dump_arc_instruction_command): Constify.
6461
b0a8e6c4
TT
64622017-09-27 Tom Tromey <tom@tromey.com>
6463
6464 * valprint.c (set_radix, show_radix): Constify.
6465
8d97dc1c
TT
64662017-09-27 Tom Tromey <tom@tromey.com>
6467
6468 * dtrace-probe.c (info_probes_dtrace_command): Constify.
6469
eb7c454d
TT
64702017-09-27 Tom Tromey <tom@tromey.com>
6471
6472 * command.h (not_just_help_class_command): Update.
6473 * cli/cli-decode.h (not_just_help_class_command): Update.
6474 * cli/cli-decode.c (not_just_help_class_command): Constify.
6475
e4e33335
TT
64762017-09-27 Tom Tromey <tom@tromey.com>
6477
6478 * gdb_bfd.c (maintenance_info_bfds): Constify.
6479
0450cc4c
TT
64802017-09-27 Tom Tromey <tom@tromey.com>
6481
6482 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
6483 overloads.
6484 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
6485 (do_const_cfunc): New function.
6486 (cmd_cfunc_eq): New overload.
6487 (cli_user_command_p): Check do_const_cfunc.
6488 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
6489 const_cfunc.
6490 * command.h (add_cmd): Add const overload and no-function
6491 overload.
6492 (set_cmd_cfunc): Add const overload.
6493 (cmd_const_cfunc_ftype): Declare.
6494 (cmd_cfunc_eq): Add const overload.
6495 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
6496 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
6497 overload.
6498
a9bbfbd8
TT
64992017-09-27 Tom Tromey <tom@tromey.com>
6500
6501 * macroexp.c (get_next_token_for_substitution): New function.
6502 (substitute_args): Call it. Check for __VA_OPT__.
6503
5230b05a
WT
65042017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
6505 Pedro Alves <palves@redhat.com>
6506
6507 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
6508 producer_is_icc_lt_14.
6509 (producer_is_icc_lt_14): New function.
6510 (check_producer): Add code for checking version of ICC.
6511 (producer_is_icc): Move to producer.c.
6512 (read_structure_type): Restrict ICC workaround to ICC<14.
6513 * producer.c: Include selftest.h.
6514 (producer_is_icc, producer_parsing_tests, _initialize_producer):
6515 New functions.
6516 * producer.h (producer_is_icc): New declaration.
6517
b32b108a
WT
65182017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
6519
6520 * Makefile.in (SFILES): Add producer.c.
6521 (COMMON_OBS): Add producer.o
6522 * amd64-tdep.c (producer.h): Add new include.
6523 * dwarf2read.c (producer.h): Add new include.
6524 * producer.c: New file.
6525 * producer.h: New file.
6526 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
6527 producer.c.
6528 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
6529 producer.h.
6530
5007d765
MK
65312017-09-26 Matthias Klose <doko@ubuntu.com>
6532
6533 * configure.ac: Search ncursesw before ncurses.
6534 Check ncursesw/ncurses.h before ncurses/ncurses.h.
6535 * gdb_curses.h: Include <ncursesw/ncurses.h>
6536 * config.in, configure: Regenerate.
6537
281c4447
RO
65382017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6539
6540 PR gdb/22185
6541 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
6542 obsolete.
6543 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
6544 Remove i386sol2 support.
6545 * configure.nat <i386sol2>: Remove.
6546 <sol2-64>: Fold into ...
6547 <sol2>: ... this.
6548 Move common settings to default section.
6549 Add sol-thread.o.
6550 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
6551 x86_64-*-solaris2.1[0-9]*>: Rename to ...
6552 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
6553 <i[34567]86-*-solaris*>: Remove.
6554 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
6555
6556 * configure.ac: Remove wctype in libw check.
6557 (_MSE_INT_H): Don't define on Solaris 7-9.
6558 <solaris*>: Remove libthread_db.so.1 check.
6559 * configure: Regenerate.
6560 * config.in: Regenerate.
6561
6562 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
6563 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
6564 (gdb_ps_size_t): Remove.
6565 Use base types in users.
6566 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
6567
6568 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
6569
39b06c20
RO
65702017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6571
6572 PR build/22206
6573 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
6574 (adi_is_addr_mapped): Likewise.
6575 (PSR_ICC): Don't redefine.
6576 (PSR_IMPL): Likewise.
6577
6c3e20f1
TT
65782017-09-25 Tom Tromey <tom@tromey.com>
6579
6580 * regcache.c (regcache::dump): Use string_printf.
6581
b292235f
TT
65822017-09-25 Tom Tromey <tom@tromey.com>
6583
6584 * regcache.c (class regcache_invalidator): New.
6585 (struct register_to_invalidate): Remove.
6586 (make_cleanup_regcache_invalidate): Remove.
6587 (regcache::raw_write): Use regcache_invalidator.
6588
9ac86b52
TT
65892017-09-25 Tom Tromey <tom@tromey.com>
6590
6591 * spu-tdep.c (spu2ppu_sniffer): Update.
6592 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
6593 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
6594 Remove.
6595 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
6596 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
6597 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
6598 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
6599 (frame_pop): Update.
6600
c0e383c6
TT
66012017-09-25 Tom Tromey <tom@tromey.com>
6602
6603 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
6604 * regcache.h (regcache_xfree): Don't declare.
6605 * regcache.c (regcache_xfree): Remove.
6606 (do_regcache_xfree): Use delete.
6607 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
6608 * linux-fork.c (free_fork): Use delete.
6609 (fork_save_infrun_state): Likewise.
6610 * jit.c (jit_dealloc_cache): Use delete.
6611 * infrun.c (discard_infcall_suspend_state): Use delete.
6612
791199cc
TT
66132017-09-25 Tom Tromey <tom@tromey.com>
6614
6615 * regcache.h (regcache_xmalloc): Don't declare.
6616 (regcache_raw_set_cached_value): Update comment.
6617 * regcache.c (regcache_xmalloc): Remove.
6618 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
6619 * jit.c (jit_frame_sniffer): Use new.
6620 * frame.c (frame_save_as_regcache): Use new.
6621
289e23aa
AA
66222017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6623
6624 * NEWS: Advertise support for guarded-storage registers on IBM z.
6625
1b63490c
AA
66262017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6627
6628 * s390-linux-nat.c (have_regset_gs): New static variable.
6629 (s390_linux_fetch_inferior_registers): Handle guarded-storage
6630 control block and guarded-storage broadcast control regsets.
6631 (s390_read_description): Detect whether the target has
6632 guarded-storage support, return appropriate tdesc.
6633 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
6634 (features/s390x-gs-linux64.c): Likewise.
6635 (struct gdbarch_tdep) <have_gs>: New field.
6636 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
6637 (s390_gsbc_regset): New variables.
6638 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
6639 and s390_gsbc_regset, if applicable.
6640 (s390_core_read_description): Check whether core file was from a
6641 target with guarded-storage support; include appropriate regsets.
6642 (s390_gdbarch_init): Add registers for guarded-storage support.
6643 (_initialize_s390_tdep): Initialize new target descriptions that
6644 include registers for guarded-storage support.
6645 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
6646 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
6647 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
6648 (S390_NUM_REGS): Adjust macro definition.
6649 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
6650 (tdesc_s390x_gs_linux64): New declarations.
6651
96235dc1
AA
66522017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6653
6654 * features/s390-gs-linux64.xml: New file.
6655 * features/s390-gs.xml: New file.
6656 * features/s390-gsbc.xml: New file.
6657 * features/s390x-gs-linux64.xml: New file.
6658 * features/Makefile (WHICH): Add s390-gs-linux64 and
6659 s390x-gs-linux64.
6660 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
6661 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
6662 * features/s390-gs-linux64.c: New generated file.
6663 * features/s390x-gs-linux64.c: New file.
6664 * regformats/s390-gs-linux64.dat: New file.
6665 * regformats/s390x-gs-linux64.dat: New file.
6666
b4a7c699
TT
66672017-09-23 Tom Tromey <tom@tromey.com>
6668
6669 * defs.h (make_cleanup_override_quit_handler): Don't declare.
6670
c2f97536
TT
66712017-09-22 Tom Tromey <tom@tromey.com>
6672
6673 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
6674 type to scoped_restore_tmpl.
6675 <scoped_input_handler>: Initialize m_quit_handler directly.
6676
43573013
SDJ
66772017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
6678
6679 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
6680 (cd_command): Likewise. Free "current_directory" before
6681 assigning to it.
6682 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
6683 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
6684 * top.c (gdb_dirbuf): Remove global declaration.
6685 * top.h (gdb_dirbuf): Likewise.
6686
6ec2e0f5
SDJ
66872017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
6688
6689 * gnulib/aclocal.m4: Regenerate.
6690 * gnulib/config.in: Regenerate.
6691 * gnulib/configure: Regenerate.
6692 * gnulib/import/Makefile.am: Regenerate.
6693 * gnulib/import/Makefile.in: Regenerate.
6694 * gnulib/import/assure.h: New file.
6695 * gnulib/import/at-func.c: Likewise
6696 * gnulib/import/chdir-long.c: New file.
6697 * gnulib/import/chdir-long.h: New file.
6698 * gnulib/import/cloexec.c: New file.
6699 * gnulib/import/cloexec.h: New file.
6700 * gnulib/import/close.c: New file.
6701 * gnulib/import/closedir.c: New file.
6702 * gnulib/import/dirent-private.h: New file.
6703 * gnulib/import/dup-safer.c: New file.
6704 * gnulib/import/dup.c: New file.
6705 * gnulib/import/dup2.c: New file.
6706 * gnulib/import/error.c: New file.
6707 * gnulib/import/error.h: New file.
6708 * gnulib/import/exitfail.c: New file.
6709 * gnulib/import/exitfail.h: New file.
6710 * gnulib/import/fchdir.c: New file.
6711 * gnulib/import/fcntl.c: New file.
6712 * gnulib/import/fcntl.in.h: New file.
6713 * gnulib/import/fd-hook.c: New file.
6714 * gnulib/import/fd-hook.h: New file.
6715 * gnulib/import/fd-safer.c: New file.
6716 * gnulib/import/fdopendir.c: New file.
6717 * gnulib/import/filename.h: New file.
6718 * gnulib/import/filenamecat-lgpl.c: New file.
6719 * gnulib/import/filenamecat.h: New file.
6720 * gnulib/import/fstat.c: New file.
6721 * gnulib/import/fstatat.c: New file.
6722 * gnulib/import/getcwd-lgpl.c: New file.
6723 * gnulib/import/getcwd.c: New file.
6724 * gnulib/import/getdtablesize.c: New file.
6725 * gnulib/import/getlogin_r.c: New file.
6726 * gnulib/import/getprogname.c: New file.
6727 * gnulib/import/getprogname.h: New file.
6728 * gnulib/import/gettext.h: New file.
6729 * gnulib/import/glob-libc.h: New file.
6730 * gnulib/import/glob.c: New file.
6731 * gnulib/import/glob.in.h: New file.
6732 * gnulib/import/intprops.h: New file.
6733 * gnulib/import/m4/chdir-long.m4: New file.
6734 * gnulib/import/m4/close.m4: New file.
6735 * gnulib/import/m4/closedir.m4: New file.
6736 * gnulib/import/m4/d-ino.m4: New file.
6737 * gnulib/import/m4/d-type.m4: New file.
6738 * gnulib/import/m4/dup.m4: New file.
6739 * gnulib/import/m4/dup2.m4: New file.
6740 * gnulib/import/m4/error.m4: New file.
6741 * gnulib/import/m4/fchdir.m4: New file.
6742 * gnulib/import/m4/fcntl.m4: New file.
6743 * gnulib/import/m4/fcntl_h.m4: New file.
6744 * gnulib/import/m4/fdopendir.m4: New file.
6745 * gnulib/import/m4/filenamecat.m4: New file.
6746 * gnulib/import/m4/fstat.m4: New file.
6747 * gnulib/import/m4/fstatat.m4: New file.
6748 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
6749 * gnulib/import/m4/getcwd-path-max.m4: New file.
6750 * gnulib/import/m4/getcwd.m4: New file.
6751 * gnulib/import/m4/getdtablesize.m4: New file.
6752 * gnulib/import/m4/getlogin_r.m4: New file.
6753 * gnulib/import/m4/getprogname.m4: New file.
6754 * gnulib/import/m4/glob.m4: New file.
6755 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6756 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6757 * gnulib/import/m4/mempcpy.m4: New file.
6758 * gnulib/import/m4/memrchr.m4: New file.
6759 * gnulib/import/m4/mode_t.m4: New file.
6760 * gnulib/import/m4/msvc-inval.m4: New file.
6761 * gnulib/import/m4/msvc-nothrow.m4: New file.
6762 * gnulib/import/m4/open.m4: New file.
6763 * gnulib/import/m4/openat.m4: New file.
6764 * gnulib/import/m4/opendir.m4: New file.
6765 * gnulib/import/m4/readdir.m4: New file.
6766 * gnulib/import/m4/realloc.m4: New file.
6767 * gnulib/import/m4/rewinddir.m4: New file.
6768 * gnulib/import/m4/save-cwd.m4: New file.
6769 * gnulib/import/m4/strdup.m4: New file.
6770 * gnulib/import/m4/strerror.m4: New file.
6771 * gnulib/import/m4/unistd-safer.m4: New file.
6772 * gnulib/import/mempcpy.c: New file.
6773 * gnulib/import/memrchr.c: New file.
6774 * gnulib/import/msvc-inval.c: New file.
6775 * gnulib/import/msvc-inval.h: New file.
6776 * gnulib/import/msvc-nothrow.c: New file.
6777 * gnulib/import/msvc-nothrow.h: New file.
6778 * gnulib/import/open.c: New file.
6779 * gnulib/import/openat-die.c: New file.
6780 * gnulib/import/openat-priv.h: New file.
6781 * gnulib/import/openat-proc.c: New file.
6782 * gnulib/import/openat.c: New file.
6783 * gnulib/import/openat.h: New file.
6784 * gnulib/import/opendir.c: New file.
6785 * gnulib/import/pipe-safer.c: New file.
6786 * gnulib/import/readdir.c: New file.
6787 * gnulib/import/realloc.c: New file.
6788 * gnulib/import/rewinddir.c: New file.
6789 * gnulib/import/save-cwd.c: New file.
6790 * gnulib/import/save-cwd.h: New file.
6791 * gnulib/import/strdup.c: New file.
6792 * gnulib/import/strerror-override.c: New file.
6793 * gnulib/import/strerror-override.h: New file.
6794 * gnulib/import/strerror.c: New file.
6795 * gnulib/import/unistd--.h: New file.
6796 * gnulib/import/unistd-safer.h: New file.
6797 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
6798 "getcwd" and "glob".
6799 * ser-tcp.c: Undefine "close" before redefining it.
6800
432ae719
SM
68012017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6802
6803 * guile/scm-value.c (gdbscm_value_address): Initialize address,
6804 get rid of res_val.
6805
4fa7574e
RO
68062017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6807
6808 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
6809 <sol2,sparc>: Likewise.
6810 <sol2-64,i386>: Likewise.
6811
6812 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
6813 -Wdeprecated-declarations on *-*-solaris*.
6814 * configure: Regenerate.
6815
6816 * procfs.c: Include "nat/inferior.h".
6817 (procfs_info_proc): Fix typo.
6818
f6327dcb
KB
68192017-09-21 Kevin Buettner <kevinb@redhat.com>
6820
6821 * remote.c (vector): Include.
6822 (struct private_thread_info): Add field, thread_handle.
6823 (free_private_thread_info): Deallocate storage associated with
6824 thread handle.
6825 (get_private_info_thread): Initialize `thread_handle' field.
6826 (struct thread_item): Add field, thread_handle.
6827 (clear_threads_listing_context): Deallocate storage associated
6828 with thread handle.
6829 (start_thread): Add support for "handle" attribute.
6830 (thread_attributes): Add "handle".
6831 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
6832 field.
6833 (remote_update_thread_list): Update thread_handle.
6834 (remote_thread_handle_to_thread_info): New function.
6835 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
6836
fbbe5337
KB
68372017-09-21 Kevin Buettner <kevinb@redhat.com>
6838
6839 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
6840 function.
6841 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
6842 * python/python-internal.h (thread_object_type): Declare.
6843
e04ee09e
KB
68442017-09-21 Kevin Buettner <kevinb@redhat.com>
6845
6846 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
6847 (target_thread_handle_to_thread_info): Declare.
6848 * target.c (target_thread_handle_to_thread_info): New function.
6849 * target-delegates.c: Regenerate.
6850 * gdbthread.h (find_thread_by_handle): Declare.
6851 * thread.c (find_thread_by_handle): New function.
6852 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
6853 function.
6854 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
6855
1e5b66ed
SM
68562017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6857
6858 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
6859
ebe48ba0
SM
68602017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6861
6862 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
6863
0a0bf5dc
YQ
68642017-09-21 Yao Qi <yao.qi@linaro.org>
6865
6866 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
6867 to gdb_target_obs.
6868
d1b0a7bf
TT
68692017-09-20 Tom Tromey <tom@tromey.com>
6870
6871 * breakpoint.c (struct counted_command_line): Remove.
6872 (breakpoint_commands): Update.
6873 (alloc_counted_command_line, incref_counted_command_line)
6874 (decref_counted_command_line, do_cleanup_counted_command_line)
6875 (make_cleanup_decref_counted_command_line): Remove.
6876 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
6877 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
6878 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
6879 (save_breakpoints): Update.
6880 * breakpoint.h (counted_command_line): Now a typedef to
6881 shared_ptr.
6882 (struct breakpoint) <commands>: Now a counted_command_line.
6883 (struct bpstats) <command>: Likewise.
6884
48649e1b
TT
68852017-09-20 Tom Tromey <tom@tromey.com>
6886
6887 * breakpoint.c (struct commands_info, do_map_commands_command):
6888 Remove.
6889 (commands_command_1): Update.
6890 (iterate_over_related_breakpoints): Take a function_view.
6891 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
6892 (delete_command): Update.
6893 (map_breakpoint_numbers): Take a function_view.
6894 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
6895 (disable_command): Update.
6896 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
6897 (enable_command): Update.
6898 (struct disp_data, do_enable_breakpoint_disp)
6899 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
6900 (do_map_enable_delete_breakpoint): Remove.
6901 (enable_once_command, enable_count_command, enable_delete_command)
6902 (delete_trace_variable_command): Update.
6903
04afa70c
TT
69042017-09-20 Tom Tromey <tom@tromey.com>
6905
6906 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
6907 (bpstat_clear): Use delete.
6908 (bpstats): New constructors.
6909 (bpstat_copy, bpstat_stop_status): Use new.
6910 (dprintf_after_condition_true): Update.
6911 * breakpoint.h (bpstats::bpstats): Add constructors.
6912 (bpstats::~bpstats): Add destructor.
6913
c83833f4
PA
69142017-09-20 Pedro Alves <palves@redhat.com>
6915
6916 * eval.c (make_params): Delete, refactored as ...
6917 (class fake_method): ... this new type's ctor.
6918 (fake_method::~fake_method): New.
6919 (evaluate_subexp_standard): Use 'fake_method'.
6920
223ffa71
TT
69212017-09-20 Tom Tromey <tom@tromey.com>
6922
6923 * windows-nat.c (get_windows_debug_event, windows_wait)
6924 (do_initial_windows_stuff, windows_attach): Update.
6925 * utils.c (vwarning, internal_vproblem): Update.
6926 (ui_unregister_input_event_handler_cleanup)
6927 (prepare_to_handle_input): Remove.
6928 (class scoped_input_handler): New.
6929 (defaulted_query, prompt_for_continue): Update.
6930 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
6931 Update.
6932 * top.c (undo_terminal_modifications_before_exit): Update.
6933 * target/target.h (target_terminal_init, target_terminal_inferior)
6934 (target_terminal_ours): Don't declare.
6935 (class target_terminal): New.
6936 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
6937 (target_terminal_ours_for_output)
6938 (make_cleanup_restore_target_terminal): Don't declare.
6939 (target_terminal_info): Remove.
6940 * target.c (enum terminal_state, terminal_state): Remove.
6941 (target_terminal::terminal_state): Define.
6942 (target_terminal::init): Rename from target_terminal_init.
6943 (target_terminal::inferior): Rename from
6944 target_terminal_inferior.
6945 (target_terminal::ours): Rename from target_terminal_ours.
6946 (target_terminal::ours_for_output): Rename from
6947 target_terminal_ours_for_output.
6948 (target_terminal::info): New method.
6949 (cleanup_restore_target_terminal)
6950 (make_cleanup_restore_target_terminal): Remove.
6951 * solib.c (handle_solib_event): Update.
6952 * remote.c (remote_serial_quit_handler): Update.
6953 (remote_terminal_inferior, remote_wait_as): Update.
6954 * record-full.c (record_full_wait_1): Update.
6955 * nto-procfs.c (procfs_create_inferior): Update.
6956 * nat/fork-inferior.c (startup_inferior): Update.
6957 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
6958 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
6959 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
6960 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
6961 (mi_breakpoint_created, mi_breakpoint_deleted)
6962 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
6963 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6964 (mi_user_selected_context_changed, report_initial_inferior):
6965 Update.
6966 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
6967 (linux_nat_terminal_inferior): Update.
6968 * infrun.c (follow_fork_inferior)
6969 (handle_vfork_child_exec_or_exit, do_target_resume)
6970 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
6971 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
6972 Update.
6973 * inflow.c (child_terminal_init, info_terminal_command): Update.
6974 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
6975 (attach_command): Update.
6976 * infcall.c (call_thread_fsm_should_stop): Update.
6977 * gnu-nat.c (gnu_attach): Update.
6978 * extension.c (struct active_ext_lang_state)
6979 (restore_active_ext_lang): Update.
6980 * exceptions.c (print_flush): Update.
6981 * event-top.c (async_enable_stdin, default_quit_handler): Update.
6982 (struct quit_handler_cleanup_data, restore_quit_handler)
6983 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
6984 Remove.
6985 * cp-support.c (gdb_demangle): Update.
6986 * breakpoint.c (update_inserted_breakpoint_locations)
6987 (insert_breakpoint_locations, handle_jit_event)
6988 (disable_breakpoints_in_unloaded_shlib): Update.
6989 * annotate.c (annotate_breakpoints_invalid)
6990 (annotate_frames_invalid): Update.
6991
013af3fc
TT
69922017-09-20 Tom Tromey <tom@tromey.com>
6993
6994 * main.c (catch_command_errors): Rename from
6995 catch_command_errors_const.
6996 (captured_main_1): Update.
6997
06871ae8
PA
69982017-09-20 Pedro Alves <palves@redhat.com>
6999
7000 * cli/cli-cmds.c (list_command): Use print_sal_location.
7001 (print_sal_location): New function.
7002 (ambiguous_line_spec): Use print_sal_location.
7003 * linespec.c (symbol_to_sal): Record the symbol in the sal.
7004 * symtab.c (find_function_start_sal): Likewise.
7005 * symtab.h (symtab_and_line::symbol): New field.
7006
e5f25bc5
PA
70072017-09-20 Pedro Alves <palves@redhat.com>
7008
7009 * linespec.c (minsym_found): Handle non-text minsyms.
7010 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
7011
1b7fa39e
WT
70122017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7013
7014 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
7015 backslash.
7016
37dd0825
WT
70172017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7018
7019 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
7020 vmovups instead vmovaps.
7021 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
7022
4e5a4f58
JB
70232017-09-19 John Baldwin <jhb@FreeBSD.org>
7024
7025 * NEWS (Changes since GDB 8.0): Add starti.
7026 * infcmd.c (enum run_break): New.
7027 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
7028 case.
7029 (run_command): Use enum run_how.
7030 (start_command): Likewise.
7031 (starti_command): New function.
7032 (RUN_ARGS_HELP): New macro.
7033 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
7034 commands. Add starti command.
7035
aa70c9f1
YQ
70362017-09-19 Yao Qi <yao.qi@linaro.org>
7037
7038 * Makefile.in (monitor.o): Remove the rule.
7039
d6541620
YQ
70402017-09-19 Yao Qi <yao.qi@linaro.org>
7041
7042 * annotate.h (struct annotate_arg_emitter): Use
7043 DISABLE_COPY_AND_ASSIGN.
7044 * common/refcounted-object.h (refcounted_object): Likewise.
7045 * completer.h (struct completion_result): Likewise.
7046 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
7047 * filename-seen-cache.h (filename_seen_cache): Likewise.
7048 * gdbcore.h (thread_section_name): Likewise.
7049 * gdb_regex.h (compiled_regex): Likewise.
7050 * gdbthread.h (scoped_restore_current_thread): Likewise.
7051 * inferior.h (scoped_restore_current_inferior): Likewise.
7052 * jit.c (jit_reader): Likewise.
7053 * linespec.h (struct linespec_result): Likewise.
7054 * mi/mi-parse.h (struct mi_parse): Likewise.
7055 * nat/fork-inferior.c (execv_argv): Likewise.
7056 * progspace.h (scoped_restore_current_program_space): Likewise.
7057 * python/python-internal.h (class gdbpy_enter): Likewise.
7058 * regcache.h (regcache): Likewise.
7059 * target-descriptions.c (struct tdesc_reg): Likewise.
7060 (struct tdesc_type): Likewise.
7061 (struct tdesc_feature): Likewise.
7062 * ui-out.h (ui_out_emit_type): Likewise.
7063
0615127c
SM
70642017-09-18 Simon Marchi <simon.marchi@ericsson.com>
7065
7066 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
7067 label abort_expression.
7068
5e187554
SM
70692017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7070
7071 * common/buffer.c (buffer_xml_printf): Adjust.
7072 * common/xml-utils.c (xml_escape_text): Change return type to
7073 std::string, update code accordingly.
7074 * common/xml-utils.h (xml_escape_text): Change return type to
7075 std::string.
7076 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
7077 * windows-tdep.c (windows_xfer_shared_library): Adjust.
7078 * unittests/xml-utils-selftests.c (test_xml_escape_text):
7079 Adjust.
7080
c3d7b541
SM
70812017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7082
7083 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
7084 (SUBDIR_UNITTESTS_OBS): Add new object file.
7085 * unittests/xml-utils-selftests.c: New file.
7086
1526853e
SM
70872017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7088
7089 * common/selftest.h (selftest): New struct/interface.
7090 (register_test): Add name parameter, add new overload.
7091 (run_tests): Add filter parameter.
7092 (for_each_selftest_ftype): New typedef.
7093 (for_each_selftest): New declaration.
7094 * common/selftest.c (tests): Change type to
7095 map<string, unique_ptr<selftest>>.
7096 (simple_selftest): New struct.
7097 (register_test): New function.
7098 (register_test): Add name parameter and use it.
7099 (run_tests): Add filter parameter and use it. Add prints.
7100 Adjust to vector -> map change.
7101 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
7102 registering selftests.
7103 * arm-tdep.c (_initialize_arm_tdep): Likewise.
7104 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
7105 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
7106 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
7107 * findvar.c (_initialize_findvar): Likewise.
7108 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
7109 * maint.c (maintenance_selftest): Update call to run_tests.
7110 (maintenance_info_selftests): New function.
7111 (_initialize_maint_cmds): Register "maintenance info selftests"
7112 command. Update "maintenance selftest" doc.
7113 * regcache.c (_initialize_regcache): Add names when registering
7114 selftests.
7115 * rust-exp.y (_initialize_rust_exp): Likewise.
7116 * selftest-arch.c (gdbarch_selftest): New struct.
7117 (gdbarch_tests): Remove.
7118 (register_test_foreach_arch): Add name parameter. Call
7119 register_test.
7120 (tests_with_arch): Remove, move most content to
7121 gdbarch_selftest::operator().
7122 (_initialize_selftests_foreach_arch): Remove.
7123 * selftest-arch.h (register_test_foreach_arch): Add name
7124 parameter.
7125 (run_tests_with_arch): New declaration.
7126 * utils-selftests.c (_initialize_utils_selftests): Add names
7127 when registering selftests.
7128 * utils.c (_initialize_utils): Likewise.
7129 * unittests/array-view-selftests.c
7130 (_initialize_array_view_selftests): Likewise.
7131 * unittests/environ-selftests.c (_initialize_environ_selftests):
7132 Likewise.
7133 * unittests/function-view-selftests.c
7134 (_initialize_function_view_selftests): Likewise.
7135 * unittests/offset-type-selftests.c
7136 (_initialize_offset_type_selftests): Likewise.
7137 * unittests/optional-selftests.c
7138 (_initialize_optional_selftests): Likewise.
7139 * unittests/scoped_restore-selftests.c
7140 (_initialize_scoped_restore_selftests): Likewise.
7141 * NEWS: Document "maintenance selftest" and "maint info
7142 selftests".
7143
5846367a
SM
71442017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7145
7146 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
7147 scoped_restore.
7148
bd77e8ff
SM
71492017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7150
7151 * mi/mi-main.c (mi_load_progress): Make uiout variable
7152 a unique_ptr.
7153
26a67918
PA
71542017-09-15 Pedro Alves <palves@redhat.com>
7155
7156 * compile/compile-c-types.c (convert_enum, convert_int)
7157 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
7158
3f8a7804
SM
71592017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7160
7161 * dwarf2read.c (copy_string): Remove.
7162 (parse_macro_definition): Replace copy_string with savestring.
7163
8d200706
YQ
71642017-09-15 Yao Qi <yao.qi@linaro.org>
7165
7166 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
7167 gdb_target_obs.
7168 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
7169 Likewise.
7170 (i[34567]86-*-linux*): Likewise.
7171
d185219d
SM
71722017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7173
7174 * dwarf2expr.h (dwarf_stack_value): Add constructor.
7175 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
7176 <stack>: Change type to std::vector.
7177 <stack_len, stack_allocated>: Remove.
7178 <grow_stack>: Remove.
7179 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7180 (dwarf_expr_context::~dwarf_expr_context): Remove.
7181 (dwarf_expr_context::grow_stack): Remove.
7182 (dwarf_expr_context::push): Adjust.
7183 (dwarf_expr_context::pop): Adjust.
7184 (dwarf_expr_context::fetch): Adjust.
7185 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
7186 (dwarf_expr_context::stack_empty_p): Adjust.
7187 (dwarf_expr_context::execute_stack_op): Adjust.
7188
eccd80d6
SM
71892017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7190
7191 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
7192 return type to bool.
7193 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
7194
69009882
SM
71952017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7196
7197 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
7198 Change type to bool.
7199 (dwarf_stack_value) <in_stack_memory>: Likewise.
7200 (dwarf_expr_context) <push_address>: Change parameter type to
7201 bool.
7202 <fetch_in_stack_memory>: Change return type to bool.
7203 <push>: Change parameter type to bool.
7204 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
7205 to bool.
7206 (dwarf_expr_context::push_address): Likewise.
7207 (dwarf_expr_context::fetch_in_stack_memory): Change return type
7208 to bool.
7209 (dwarf_expr_context::execute_stack_op): Adjust.
7210 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
7211
1e467161
SM
72122017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7213
7214 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
7215 (struct dwarf_expr_context) <n_pieces>: Remove.
7216 <pieces>: Change type to std::vector.
7217 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7218 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
7219 pieces.
7220 (dwarf_expr_context::add_piece): Adjust.
7221 * dwarf2loc.c (struct piece_closure): Initialize fields.
7222 <n_pieces>: Remove.
7223 <pieces>: Change type to std::vector.
7224 (allocate_piece_closure): Adjust, change parameter to
7225 std::vector rvalue and std::move it to piece_closure.
7226 (rw_pieced_value): Adjust.
7227 (check_pieced_synthetic_pointer): Adjust.
7228 (indirect_synthetic_pointer): Adjust.
7229 (coerce_pieced_ref): Adjust.
7230 (free_pieced_value_closure): Adjust. Use delete to free
7231 piece_closure.
7232 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
7233 to allocate_piece_closure.
7234 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
7235
0782db84
SM
72362017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7237
7238 * probe.h (probe_ops_cp): Remove typedef.
7239 (DEF_VEC_P (probe_ops_cp)): Remove.
7240 (all_probe_ops): Change type to std::vector.
7241 * probe.c (info_probes_for_ops): Adjust to vector change.
7242 (probe_linespec_to_ops): Likewise.
7243 (all_probe_ops): Change type to std::vector.
7244 (_initialize_probe): Adjust to vector change.
7245 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
7246 * elfread.c (elf_get_probes): Likewise.
7247 * stap-probe.c (_initialize_stap_probe): Likewise.
7248
1eac6bea
SM
72492017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7250
7251 * probe.h (struct bound_probe): Define constructors.
7252 * probe.c (bound_probe_s): Remove typedef.
7253 (DEF_VEC_O (bound_probe_s)): Remove VEC.
7254 (collect_probes): Change return type to std::vector, remove
7255 cleanup.
7256 (compare_probes): Return bool, change parameter type. Change
7257 semantic to "less than".
7258 (gen_ui_out_table_header_info): Change parameter to std::vector
7259 and update.
7260 (exists_probe_with_pops): Likewise.
7261 (info_probes_for_ops): Update to std::vector change.
7262 (enable_probes_command): Likewise.
7263 (disable_probes_command): Likewise.
7264
aaa63a31
SM
72652017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7266
7267 * probe.h (struct probe_ops) <get_probes>: Change parameter from
7268 vec to std::vector.
7269 * probe.c (parse_probes_in_pspace): Update.
7270 (find_probes_in_objfile): Update.
7271 (find_probe_by_pc): Update.
7272 (collect_probes): Update.
7273 (probe_any_get_probes): Update.
7274 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
7275 return type to reference to std::vector.
7276 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
7277 std::vector and update.
7278 (dtrace_process_dof): Likewise.
7279 (dtrace_get_probes): Likewise.
7280 * elfread.c (elf_get_probes): Change return type to std::vector,
7281 store an std::vector in bfd_data.
7282 (probe_key_free): Update to std::vector.
7283 * stap-probe.c (handle_stap_probe): Change parameter to
7284 std::vector and update.
7285 (stap_get_probes): Likewise.
7286 * symfile-debug.c (debug_sym_get_probes): Change return type to
7287 std::vector and update.
7288
cb85b21b
TT
72892017-09-11 Tom Tromey <tom@tromey.com>
7290
7291 * breakpoint.c (program_breakpoint_here_p): Update.
7292 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
7293 from make_show_memory_breakpoints_cleanup. Return a
7294 scoped_restore_tmpl<int>.
7295 (restore_show_memory_breakpoints): Remove.
7296 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
7297 * mem-break.c (memory_validate_breakpoint): Update.
7298 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
7299 (ia64_memory_remove_breakpoint): Update.
7300 (ia64_breakpoint_from_pc): Update.
7301 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
7302 from make_show_memory_breakpoints_cleanup.
7303
8fbc99ef
TT
73042017-09-11 Tom Tromey <tom@tromey.com>
7305
7306 * d-namespace.c (d_lookup_symbol): Use std::string.
7307 (find_symbol_in_baseclass): Likewise.
7308
50feb4bd
TT
73092017-09-11 Tom Tromey <tom@tromey.com>
7310
7311 * ctf.c (ctf_start): Use std::string.
7312
c6dc63a1
TT
73132017-09-11 Tom Tromey <tom@tromey.com>
7314
7315 * ada-lang.c (is_known_support_routine): Update.
7316 (ada_unhandled_exception_name_addr_from_raise): Update.
7317 * guile/scm-frame.c (gdbscm_frame_name): Update.
7318 * python/py-frame.c (frapy_name): Update.
7319 (frapy_function): Update.
7320 * stack.h (find_frame_funname): Update.
7321 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
7322 (print_frame): Update.
7323
d6b9b80f
TT
73242017-09-11 Tom Tromey <tom@tromey.com>
7325
7326 * findcmd.c (put_bits): Take a gdb::byte_vector.
7327 (parse_find_args): Return gdb::byte_vector. "args" now const.
7328 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
7329 cleanups.
7330 (find_command): Update.
7331
a9921622
TT
73322017-09-11 Tom Tromey <tom@tromey.com>
7333
7334 * cli/cli-script.c (class scoped_restore_hook_in): New.
7335 (clear_hook_in_cleanup): Remove.
7336 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
7337 scoped_restore_hook_in.
7338
be0d7abb
TT
73392017-09-11 Tom Tromey <tom@tromey.com>
7340
7341 * cli/cli-script.c (restore_interp): Remove.
7342 (read_command_lines): Use scoped_restore_interp.
7343 * interps.c (scoped_restore_interp::set_temp): Rename from
7344 interp_set_temp.
7345 * interps.h (class scoped_restore_interp): New.
7346 (interp_set_temp): Remove.
7347
00f675ff
TT
73482017-09-11 Tom Tromey <tom@tromey.com>
7349
7350 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7351 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
7352 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
7353 scoped_restore.
7354 (mi_cmd_break_insert_1): Update.
7355 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
7356 scoped_restore.
7357
cb791d59
TT
73582017-09-11 Tom Tromey <tom@tromey.com>
7359
7360 * demangle.c (demangle_command): Update.
7361 * breakpoint.c (disable_command): Update.
7362 (enable_command): Update.
7363 (find_location_by_number): Make "number" const. Use
7364 get_number_trailer.
7365 * cli/cli-utils.c (extract_arg): Return std::string.
7366 * probe.c (parse_probe_linespec): Update. Change types.
7367 (collect_probes): Take string arguments.
7368 (parse_probe_linespec): Likewise.
7369 (info_probes_for_ops): Update.
7370 (enable_probes_command): Update.
7371 (disable_probes_command): Update.
7372 * break-catch-sig.c (catch_signal_split_args): Update.
7373 * mi/mi-parse.c (mi_parse): Update.
7374
2039bd9f
TT
73752017-09-11 Tom Tromey <tom@tromey.com>
7376
7377 * language.h (language_enum): Make argument const.
7378 * language.c (language_enum): Make argument const.
7379
f1735a53
TT
73802017-09-11 Tom Tromey <tom@tromey.com>
7381
7382 * common/common-utils.h (skip_to_space): Remove macro, redeclare
7383 as function.
7384 (skip_to_space): Rename from skip_to_space_const.
7385 * common/common-utils.c (skip_to_space): New function.
7386 (skip_to_space): Rename from skip_to_space_const.
7387 * cli/cli-utils.h (get_number): Rename from get_number_const.
7388 (extract_arg): Rename from extract_arg_const.
7389 * cli/cli-utils.c (get_number): Rename from get_number_const.
7390 (extract_arg): Rename from extract_arg_const.
7391 (number_or_range_parser::get_number): Use ::get_number.
7392 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
7393 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
7394 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
7395 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
7396 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
7397 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
7398 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
7399 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
7400
7d221d74
TT
74012017-09-11 Tom Tromey <tom@tromey.com>
7402
7403 * python/python.c (do_start_initialization): Use
7404 py-event-types.def to initialize types.
7405 Define all object type structures.
7406 * python/python-internal.h: Don't declare event initialization
7407 functions.
7408 * python/py-threadevent.c (thread_event_object_type): Don't
7409 define.
7410 * python/py-stopevent.c (stop_event_object_type): Don't define.
7411 * python/py-signalevent.c (signal_event_object_type): Don't
7412 declare or define.
7413 * python/py-newobjfileevent.c (new_objfile_event_object_type)
7414 (clear_objfiles_event_object_type): Don't declare or define.
7415 * python/py-infevents.c (inferior_call_pre_event_object_type)
7416 (inferior_call_post_event_object_type)
7417 (register_changed_event_object_type)
7418 (memory_changed_event_object_type): Don't declare or define.
7419 * python/py-inferior.c (new_thread_event_object_type)
7420 (new_inferior_event_object_type)
7421 (inferior_deleted_event_object_type): Don't declare or define.
7422 * python/py-exitedevent.c (exited_event_object_type): Don't
7423 declare or define.
7424 * python/py-evts.c (gdbpy_initialize_py_events): Use
7425 py-all-events.def.
7426 * python/py-events.h (thread_event_object_type): Don't declare.
7427 (events_object): Use py-all-events.def.
7428 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
7429 py-event-types.def.
7430 * python/py-event-types.def: New file.
7431 * python/py-continueevent.c (create_continue_event_object): Don't
7432 declare or define.
7433 * python/py-bpevent.c (breakpoint_event_object_type): Don't
7434 declare or define.
7435 * python/py-all-events.def: New file.
7436
35c61a1d
TT
74372017-09-11 Tom Tromey <tom@tromey.com>
7438
7439 * python/py-threadevent.c (create_thread_event_object): Return
7440 gdbpy_ref.
7441 * python/py-stopevent.h (create_stop_event_object)
7442 (create_breakpoint_event_object, create_signal_event_object):
7443 Update.
7444 * python/py-stopevent.c (create_stop_event_object): Return
7445 gdbpy_ref.
7446 (emit_stop_event): Update.
7447 * python/py-signalevent.c (create_signal_event_object): Return
7448 gdbpy_ref.
7449 * python/py-infevents.c (create_inferior_call_event_object):
7450 Update.
7451 * python/py-event.h (create_event_object)
7452 (create_thread_event_object): Update.
7453 * python/py-event.c (create_event_object): Return gdbpy_ref.
7454 * python/py-continueevent.c: Return gdbpy_ref.
7455 * python/py-bpevent.c (create_breakpoint_event_object): Return
7456 gdbpy_ref.
7457
7c96f8c1
TT
74582017-09-11 Tom Tromey <tom@tromey.com>
7459
7460 PR python/15622:
7461 * NEWS: Add entry.
7462 * python/python.c (do_start_initialization): Initialize new event
7463 types.
7464 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
7465 (gdbpy_initialize_inferior_deleted_event)
7466 (gdbpy_initialize_new_thread_event): Declare.
7467 * python/py-threadevent.c (create_thread_event_object): Add option
7468 "thread" parameter.
7469 * python/py-inferior.c (new_thread_event_object_type)
7470 (new_inferior_event_object_type)
7471 (inferior_deleted_event_object_type): Declare.
7472 (python_new_inferior, python_inferior_deleted): New functions.
7473 (add_thread_object): Emit new_thread event.
7474 (gdbpy_initialize_inferior): Attach new functions to corresponding
7475 observers.
7476 (new_thread, new_inferior, inferior_deleted): Define new event
7477 types.
7478 * python/py-evts.c (gdbpy_initialize_py_events): Add new
7479 registries.
7480 * python/py-events.h (events_object) <new_inferior,
7481 inferior_deleted, new_thread>: New fields.
7482 * python/py-event.h (create_thread_event_breakpoint): Add optional
7483 "thread" parameter.
7484
72542b8e
AB
74852017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
7486
7487 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
7488 check current_ui instead.
7489 (internal_vproblem): Likewise.
7490
0d64823e
SM
74912017-09-09 Simon Marchi <simon.marchi@ericsson.com>
7492
7493 * thread.c (print_thread_info_1): Remove unnecessary calls to
7494 uiout->is_mi_like_p.
7495
eb1e02fd
TT
74962017-09-09 Tom Tromey <tom@tromey.com>
7497
7498 * namespace.h (add_using_directive): Update.
7499 * namespace.c (add_using_directive): Change type of excludes to
7500 std::vector.
7501 * dwarf2read.c (read_import_statement): Use std::vector.
7502 (read_namespace): Update.
7503 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
7504
0fc21fd8
TT
75052017-09-09 Tom Tromey <tom@tromey.com>
7506
7507 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
7508
49663d05
TT
75092017-09-09 Tom Tromey <tom@tromey.com>
7510
7511 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
7512
0b868b60
TT
75132017-09-09 Tom Tromey <tom@tromey.com>
7514
7515 * stack.c (func_command): Use gdb::def_vector.
7516
c0470d48
TT
75172017-09-09 Tom Tromey <tom@tromey.com>
7518
7519 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
7520 ui_out_emit_list, ui_out_emit_tuple.
7521 (mi_cmd_var_update): Likewise.
7522
ca5909c7
TT
75232017-09-09 Tom Tromey <tom@tromey.com>
7524
7525 * mi/mi-interp.c (mi_user_selected_context_changed): Use
7526 ui_out_redirect_pop.
7527 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7528 ui_out_redirect_pop.
7529 * utils.c (do_ui_out_redirect_pop)
7530 (make_cleanup_ui_out_redirect_pop): Remove.
7531 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
7532 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
7533 * ui-out.h (ui_out_redirect_pop): New class.
7534
e6a2252a
TT
75352017-09-09 Tom Tromey <tom@tromey.com>
7536
7537 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
7538 (list_available_thread_groups, mi_cmd_list_thread_groups)
7539 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
7540 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
7541 Likewise.
7542
393702cd
TT
75432017-09-09 Tom Tromey <tom@tromey.com>
7544
7545 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
7546 ui_out_emit_tuple.
7547
76f9c9cf
TT
75482017-09-09 Tom Tromey <tom@tromey.com>
7549
7550 * target.c (flash_erase_command): Use ui_out_emit_tuple.
7551 * stack.c (print_frame): Use ui_out_emit_tuple.
7552 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
7553 (info_spu_mailbox_command, info_spu_dma_command)
7554 (info_spu_proxydma_command): Likewise.
7555 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
7556 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
7557 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7558 ui_out_emit_tuple.
7559 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
7560
dc9fe180
TT
75612017-09-09 Tom Tromey <tom@tromey.com>
7562
7563 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
7564 (class ui_out_emit_table): Update comment.
7565 * ui-out.c (do_cleanup_table_end)
7566 (make_cleanup_ui_out_table_begin_end): Remove.
7567 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
7568 (info_spu_dma_cmdlist): Likewise.
7569 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
7570 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
7571 ui_out_emit_table.
7572
f8cc3da6
TT
75732017-09-09 Tom Tromey <tom@tromey.com>
7574
7575 * thread.c (print_thread_info_1): Use ui_out_emit_table,
7576 ui_out_emit_list, gdb::optional.
7577
481695ed
JB
75782017-09-09 John Baldwin <jhb@FreeBSD.org>
7579
7580 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
7581 prototype.
7582 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
7583 prototype.
7584 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
7585 prototype.
7586 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
7587 * ada-exp.y: Remove _initialize_ada_exp prototype.
7588 * ada-lang.c: Remove _initialize_ada_language prototype.
7589 * ada-tasks.c: Remove _initialize_tasks prototype.
7590 * addrmap.c: Remove _initialize_addrmap prototype.
7591 * agent.c: Remove _initialize_agent prototype.
7592 * aix-thread.c: Remove _initialize_aix_thread prototype.
7593 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
7594 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
7595 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
7596 prototype.
7597 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
7598 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
7599 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
7600 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
7601 prototype.
7602 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
7603 prototype.
7604 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
7605 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
7606 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
7607 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
7608 prototype.
7609 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
7610 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
7611 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
7612 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
7613 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7614 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
7615 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
7616 prototype.
7617 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
7618 prototype.
7619 * annotate.c: Remove _initialize_annotate prototype.
7620 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
7621 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
7622 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
7623 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
7624 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
7625 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
7626 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
7627 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
7628 prototype.
7629 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
7630 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
7631 * auto-load.c: Remove _initialize_auto_load prototype.
7632 * auxv.c: Remove _initialize_auxv prototype.
7633 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
7634 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
7635 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
7636 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
7637 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
7638 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
7639 prototype.
7640 * break-catch-throw.c: Remove _initialize_break_catch_throw
7641 prototype.
7642 * breakpoint.c: Remove _initialize_breakpoint prototype.
7643 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
7644 * btrace.c: Remove _initialize_btrace prototype.
7645 * charset.c: Remove _initialize_charset prototype.
7646 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
7647 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
7648 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
7649 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
7650 * cli/cli-script.c: Remove _initialize_cli_script prototype.
7651 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
7652 * coffread.c: Remove _initialize_coffread prototype.
7653 * compile/compile.c: Remove _initialize_compile prototype.
7654 * complaints.c: Remove _initialize_complaints prototype.
7655 * completer.c: Remove _initialize_completer prototype.
7656 * copying.awk: Remove _initialize_copying prototype.
7657 * copying.c: Regenerate.
7658 * core-regset.c: Remove _initialize_core_regset prototype.
7659 * corefile.c: Remove _initialize_core prototype.
7660 * corelow.c: Remove _initialize_corelow prototype.
7661 * cp-abi.c: Remove _initialize_cp_abi prototype.
7662 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
7663 * cp-support.c: Remove _initialize_cp_support prototype.
7664 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
7665 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
7666 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
7667 * ctf.c: Remove _initialize_ctf prototype.
7668 * d-lang.c: Remove _initialize_d_language prototype.
7669 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
7670 prototype.
7671 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
7672 * dbxread.c: Remove _initialize_dbxread prototype.
7673 * dcache.c: Remove _initialize_dcache prototype.
7674 * demangle.c: Remove _initialize_demangler prototype.
7675 * disasm-selftests.c: Remove _initialize_disasm_selftests
7676 prototype.
7677 * disasm.c: Remove _initialize_disasm prototype.
7678 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
7679 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
7680 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
7681 prototype.
7682 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
7683 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
7684 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
7685 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
7686 * elfread.c: Remove _initialize_elfread prototype.
7687 * exec.c: Remove _initialize_exec prototype.
7688 * extension.c: Remove _initialize_extension prototype.
7689 * f-lang.c: Remove _initialize_f_language prototype.
7690 * f-valprint.c: Remove _initialize_f_valprint prototype.
7691 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
7692 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
7693 * filesystem.c: Remove _initialize_filesystem prototype.
7694 * findcmd.c: Remove _initialize_mem_search prototype.
7695 * fork-child.c: Remove _initialize_fork_child prototype.
7696 * frame-base.c: Remove _initialize_frame_base prototype.
7697 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
7698 * frame.c: Remove _initialize_frame prototype.
7699 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
7700 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
7701 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
7702 * gcore.c: Remove _initialize_gcore prototype.
7703 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
7704 * gdbarch.c: Regenerate.
7705 * gdbarch.sh: Remove _initialize_gdbarch prototype.
7706 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
7707 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
7708 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
7709 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
7710 * go-lang.c: Remove _initialize_go_language prototype.
7711 * go32-nat.c: Remove _initialize_go32_nat prototype.
7712 * guile/guile.c: Remove _initialize_guile prototype.
7713 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
7714 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
7715 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
7716 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
7717 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
7718 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
7719 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
7720 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
7721 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
7722 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
7723 prototype.
7724 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
7725 prototype.
7726 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
7727 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
7728 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
7729 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
7730 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
7731 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
7732 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
7733 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
7734 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
7735 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
7736 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
7737 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
7738 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
7739 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7740 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
7741 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
7742 prototype.
7743 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
7744 prototype.
7745 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
7746 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
7747 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
7748 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
7749 * infcall.c: Remove _initialize_infcall prototype.
7750 * infcmd.c: Remove _initialize_infcmd prototype.
7751 * inferior.c: Remove _initialize_inferiors prototype.
7752 * inflow.c: Remove _initialize_inflow prototype.
7753 * infrun.c: Remove _initialize_infrun prototype.
7754 * interps.c: Remove _initialize_interpreter prototype.
7755 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
7756 * jit.c: Remove _initialize_jit prototype.
7757 * language.c: Remove _initialize_language prototype.
7758 * linux-fork.c: Remove _initialize_linux_fork prototype.
7759 * linux-nat.c: Remove _initialize_linux_nat prototype.
7760 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
7761 * linux-thread-db.c: Remove _initialize_thread_db prototype.
7762 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
7763 * m2-lang.c: Remove _initialize_m2_language prototype.
7764 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
7765 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
7766 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
7767 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
7768 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
7769 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7770 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7771 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
7772 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
7773 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
7774 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7775 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7776 * machoread.c: Remove _initialize_machoread prototype.
7777 * macrocmd.c: Remove _initialize_macrocmd prototype.
7778 * macroscope.c: Remove _initialize_macroscope prototype.
7779 * maint.c: Remove _initialize_maint_cmds prototype.
7780 * mdebugread.c: Remove _initialize_mdebugread prototype.
7781 * memattr.c: Remove _initialize_mem prototype.
7782 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
7783 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
7784 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
7785 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
7786 * mi/mi-main.c: Remove _initialize_mi_main prototype.
7787 * microblaze-linux-tdep.c: Remove
7788 _initialize_microblaze_linux_tdep prototype.
7789 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
7790 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
7791 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
7792 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
7793 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
7794 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
7795 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
7796 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
7797 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
7798 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
7799 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
7800 prototype.
7801 * mipsread.c: Remove _initialize_mipsread prototype.
7802 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
7803 prototype.
7804 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
7805 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
7806 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
7807 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
7808 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
7809 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
7810 prototype.
7811 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
7812 * nto-procfs.c: Remove _initialize_procfs prototype.
7813 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
7814 * objc-lang.c: Remove _initialize_objc_language prototype.
7815 * objfiles.c: Remove _initialize_objfiles prototype.
7816 * observer.c: Remove observer_test_first_notification_function,
7817 observer_test_second_notification_function,
7818 observer_test_third_notification_function, and
7819 _initialize_observer prototypes.
7820 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
7821 * osabi.c: Remove _initialize_gdb_osabi prototype.
7822 * osdata.c: Remove _initialize_osdata prototype.
7823 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
7824 * parse.c: Remove _initialize_parse prototype.
7825 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
7826 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
7827 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
7828 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
7829 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
7830 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
7831 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
7832 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
7833 * printcmd.c: Remove _initialize_printcmd prototype.
7834 * probe.c: Remove _initialize_probe prototype.
7835 * proc-api.c: Remove _initialize_proc_api prototype.
7836 * proc-events.c: Remove _initialize_proc_events prototype.
7837 * proc-service.c: Remove _initialize_proc_service prototype.
7838 * procfs.c: Remove _initialize_procfs prototype.
7839 * psymtab.c: Remove _initialize_psymtab prototype.
7840 * python/python.c: Remove _initialize_python prototype.
7841 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
7842 * record-btrace.c: Remove _initialize_record_btrace prototype.
7843 * record-full.c: Remove _initialize_record_full prototype.
7844 * record.c: Remove _initialize_record prototype.
7845 * regcache.c: Remove _initialize_regcache prototype.
7846 * reggroups.c: Remove _initialize_reggroup prototype.
7847 * remote-notif.c: Remove _initialize_notif prototype.
7848 * remote-sim.c: Remove _initialize_remote_sim prototype.
7849 * remote.c: Remove _initialize_remote prototype.
7850 * reverse.c: Remove _initialize_reverse prototype.
7851 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
7852 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
7853 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
7854 prototype.
7855 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
7856 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
7857 * rust-exp.y: Remove _initialize_rust_exp prototype.
7858 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
7859 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
7860 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
7861 * score-tdep.c: Remove _initialize_score_tdep prototype.
7862 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
7863 prototype.
7864 * ser-go32.c: Remove _initialize_ser_dos prototype.
7865 * ser-mingw.c: Remove _initialize_ser_windows prototype.
7866 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
7867 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
7868 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
7869 * serial.c: Remove _initialize_serial prototype.
7870 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
7871 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
7872 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
7873 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
7874 * skip.c: Remove _initialize_step_skip prototype.
7875 * sol-thread.c: Remove _initialize_sol_thread prototype.
7876 * solib-aix.c: Remove _initialize_solib_aix prototype.
7877 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
7878 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
7879 * solib-frv.c: Remove _initialize_frv_solib prototype.
7880 * solib-spu.c: Remove _initialize_spu_solib prototype.
7881 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
7882 * solib-target.c: Remove _initialize_solib_target prototype.
7883 * solib.c: Remove _initialize_solib prototype.
7884 * source.c: Remove _initialize_source prototype.
7885 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
7886 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
7887 prototype.
7888 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
7889 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
7890 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
7891 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
7892 prototype.
7893 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
7894 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
7895 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
7896 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
7897 prototype.
7898 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
7899 prototype.
7900 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
7901 prototype.
7902 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
7903 prototype.
7904 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
7905 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
7906 prototype.
7907 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
7908 prototype.
7909 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
7910 prototype.
7911 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
7912 prototype.
7913 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
7914 prototype.
7915 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
7916 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
7917 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
7918 * stabsread.c: Remove _initialize_stabsread prototype.
7919 * stack.c: Remove _initialize_stack prototype.
7920 * stap-probe.c: Remove _initialize_stap_probe prototype.
7921 * std-regs.c: Remove _initialize_frame_reg prototype.
7922 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
7923 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
7924 * symfile.c: Remove _initialize_symfile prototype.
7925 * symmisc.c: Remove _initialize_symmisc prototype.
7926 * symtab.c: Remove _initialize_symtab prototype.
7927 * target-dcache.c: Remove _initialize_target_dcache prototype.
7928 * target-descriptions.c: Remove _initialize_target_descriptions
7929 prototype.
7930 * thread.c: Remove _initialize_thread prototype.
7931 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
7932 prototype.
7933 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
7934 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
7935 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
7936 prototype.
7937 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
7938 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
7939 * tracefile.c: Remove _initialize_tracefile prototype.
7940 * tracepoint.c: Remove _initialize_tracepoint prototype.
7941 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
7942 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
7943 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
7944 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
7945 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
7946 * tui/tui-win.c: Remove _initialize_tui_win prototype.
7947 * tui/tui.c: Remove _initialize_tui prototype.
7948 * typeprint.c: Remove _initialize_typeprint prototype.
7949 * user-regs.c: Remove _initialize_user_regs prototype.
7950 * utils.c: Remove _initialize_utils prototype.
7951 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
7952 * valarith.c: Remove _initialize_valarith prototype.
7953 * valops.c: Remove _initialize_valops prototype.
7954 * valprint.c: Remove _initialize_valprint prototype.
7955 * value.c: Remove _initialize_values prototype.
7956 * varobj.c: Remove _initialize_varobj prototype.
7957 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
7958 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
7959 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
7960 * windows-nat.c: Remove _initialize_windows_nat,
7961 _initialize_check_for_gdb_ini, and _initialize_loadable
7962 prototypes.
7963 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
7964 * xcoffread.c: Remove _initialize_xcoffread prototype.
7965 * xml-support.c: Remove _initialize_xml_support prototype.
7966 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
7967 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
7968 prototype.
7969 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
7970 prototype.
7971 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
7972
a611b5cb
KS
79732017-09-08 Keith Seitz <keiths@redhat.com>
7974
7975 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
7976 field.
7977
469412dd
CW
79782017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
7979
7980 * f-valprint.c (f_val_print): Remove check for one byte
7981 sized integers. Remove printing of character type.
7982
a5ad232b
FP
79832017-09-08 Frank Penczek <frank.penczek@intel.com>
7984 Christoph Weinmann <christoph.t.weinmann@intel.com>
7985 Bernhard Heckel <bernhard.heckel@intel.com>
7986
7987 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
7988 to maintain proper indentation when printing pointers/refs.
7989
e5014227
JB
79902017-09-07 Joel Brobecker <brobecker@adacore.com>
7991
7992 GDB 8.0.1 released.
7993
63c99141
JB
79942017-09-07 Joel Brobecker <brobecker@adacore.com>
7995
7996 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
7997
69c1e056
TT
79982017-09-05 Tom Tromey <tom@tromey.com>
7999
8000 * parse.c (funcall_chain): Now a std::vector.
8001 (start_arglist, end_arglist): Simplify.
8002 (free_funcalls): Remove.
8003 (parse_exp_in_context_1): Remove cleanup.
8004
fef704bf
TT
80052017-09-05 Tom Tromey <tom@tromey.com>
8006
8007 * go-exp.y (go_parse): Don't create a cleanup.
8008
5613c585
TT
80092017-09-05 Tom Tromey <tom@tromey.com>
8010
8011 * d-exp.y (PrimaryExpression): Use std::string.
8012 (d_parse): Don't create a cleanup.
8013
eae49211
TT
80142017-09-05 Tom Tromey <tom@tromey.com>
8015
8016 * utils.c (do_clear_parser_state): Remove.
8017 (make_cleanup_clear_parser_state): Remove.
8018 * p-exp.y (pascal_parse): Use scoped_restore.
8019 * m2-exp.y (m2_parse): Use scoped_restore.
8020 * f-exp.y (f_parse): Use scoped_restore.
8021 * d-exp.y (d_parse): Use scoped_restore.
8022 * c-exp.y (c_parse): Use scoped_restore.
8023 * ada-exp.y (ada_parse): Use scoped_restore.
8024 * utils.h (make_cleanup_clear_parser_state): Remove.
8025
73b9be8b
KS
80262017-09-06 Keith Seitz <keiths@redhat.com>
8027
8028 * dwarf2read.c (dw2_linkage_name_attr): New function.
8029 (dw2_linkage_name): New function.
8030 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
8031 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
8032 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
8033
a102602b
KR
80342017-09-06 Kamil Rytarowski <n54@gmx.com>
8035
8036 * config/djgpp/djconfig.sh: Correct shell portability issue.
8037
28ad437d
KR
80382017-09-06 Kamil Rytarowski <n54@gmx.com>
8039
8040 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
8041
351787dd
JB
80422017-09-06 John Baldwin <jhb@FreeBSD.org>
8043
8044 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
8045 * NEWS: Mention new FreeBSD/mips native configuration.
8046 * configure.host: Add aarch64*-*-freebsd*.
8047 * configure.nat: Likewise.
8048 * aarch64-fbsd-nat.c: New file.
8049
c0f84956
JB
80502017-09-06 John Baldwin <jhb@FreeBSD.org>
8051
8052 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
8053 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
8054 * NEWS: Mention new FreeBSD/aarch64 target.
8055 * configure.tgt: Add aarch64*-*-freebsd*.
8056 * aarch64-fbsd-tdep.c: New file.
8057 * aarch64-fbsd-tdep.h: New file.
8058
7610297a
KR
80592017-09-06 Kamil Rytarowski <n54@gmx.com>
8060
8061 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
8062
fbd1b771
JK
80632017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8064
8065 * parse.c (find_minsym_type_and_address): Don't relocate addresses
8066 of TLS symbols.
8067
5ca79eae
PW
80682017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8069
8070 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
8071 call.
8072
bf93d7ba
SM
80732017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8074
8075 * infrun.c (follow_exec): Call add_thread after
8076 target_find_description.
8077
1bb7c059
SM
80782017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8079
8080 * infrun.c (handle_inferior_event_1): When exec'ing, read
8081 stop_pc after follow_exec.
8082
fc809827
SM
80832017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8084
8085 * remote.c (process_g_packet): Update error message.
8086
d2fcdd85
YQ
80872017-09-05 Yao Qi <yao.qi@linaro.org>
8088
8089 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
8090 targets.
8091
e69570ee
PA
80922017-09-05 Pedro Alves <palves@redhat.com>
8093
8094 * eval.c (eval_call, evaluate_funcall): New functions, factored
8095 out from ...
8096 (evaluate_subexp_standard): ... this.
8097
22916b07
YQ
80982017-09-05 Yao Qi <yao.qi@linaro.org>
8099
8100 * amd64-tdep.c (amd64_target_description): Create target
8101 descriptions.
8102 (_initialize_amd64_tdep): Don't call functions
8103 initialize_tdesc_amd64_*. Add self tests.
8104 * arch/amd64.c (amd64_create_target_description): Add parameter
8105 is_linux. Call set_tdesc_osabi if is_linux is true.
8106 * arch/amd64.h (amd64_create_target_description): Update the
8107 declaration.
8108 * arch/i386.c (i386_create_target_description): Add parameter
8109 is_linux. Call set_tdesc_osabi if is_linux is true.
8110 * arch/i386.h (i386_create_target_description): Update
8111 declaration.
8112 * configure.tgt: Add i386.o to gdb_target_obs.
8113 * features/Makefile (XMLTOC): Remove i386/*.xml.
8114 * features/i386/amd64-avx-avx512.c: Remove.
8115 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
8116 * features/i386/amd64-avx-mpx.c: Remove.
8117 * features/i386/amd64-avx.c: Remove.
8118 * features/i386/amd64-mpx.c: Remove.
8119 * features/i386/amd64.c: Remove.
8120 * features/i386/i386-avx-avx512.c: Remove.
8121 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
8122 * features/i386/i386-avx-mpx.c: Remove.
8123 * features/i386/i386-avx.c: Remove.
8124 * features/i386/i386-mmx.c: Remove.
8125 * features/i386/i386-mpx.c: Remove.
8126 * features/i386/i386.c: Remove.
8127 * i386-tdep.c: Don't include features/i386/i386*.c., include
8128 target-descriptions.h and arch/i386.h.
8129 (i386_target_description): Create target descriptions.
8130 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
8131 functions. Do self tests.
8132
0854b7b1
YQ
81332017-09-05 Yao Qi <yao.qi@linaro.org>
8134
8135 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
8136 * features/i386/amd64-avx-avx512-linux.c: Removed.
8137 * features/i386/amd64-avx-linux.c: Removed.
8138 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
8139 * features/i386/amd64-avx-mpx-linux.c: Removed.
8140 * features/i386/amd64-linux.c: Removed.
8141 * features/i386/amd64-mpx-linux.c: Removed.
8142 * features/i386/x32-avx-avx512-linux.c: Removed.
8143 * features/i386/x32-avx-linux.c: Removed.
8144 * features/i386/x32-linux.c: Removed.
8145
b4570e4b
YQ
81462017-09-05 Yao Qi <yao.qi@linaro.org>
8147
8148 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
8149 features/i386/*.c.
8150 (amd64_linux_read_description): Call
8151 amd64_create_target_description.
8152 * arch/amd64.c: New file.
8153 * arch/amd64.h: New file.
8154 * configure.tgt (x86_64-*-linux*): Append amd64.o.
8155 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
8156
6c73f67f
YQ
81572017-09-05 Yao Qi <yao.qi@linaro.org>
8158
8159 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
8160 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
8161 (amd64_linux_read_description): Create target descriptions.
8162 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
8163 functions. Add unit tests.
8164 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
8165 x32-core.xml.
8166 * features/i386/64bit-avx.c: Generated.
8167 * features/i386/64bit-avx512.c: Generated.
8168 * features/i386/64bit-core.c: Generated.
8169 * features/i386/64bit-linux.c: Generated.
8170 * features/i386/64bit-mpx.c: Generated.
8171 * features/i386/64bit-pkeys.c: Generated.
8172 * features/i386/64bit-segments.c: Generated.
8173 * features/i386/64bit-sse.c: Generated.
8174 * features/i386/x32-core.c: Generated.
8175 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
8176 c files for amd64-linux and x32-linux.
8177
9d3d478b
YQ
81782017-09-05 Yao Qi <yao.qi@linaro.org>
8179
8180 * amd64-linux-tdep.c (amd64_linux_read_description): New
8181 function.
8182 (amd64_linux_core_read_description): Call
8183 amd64_linux_read_description.
8184 (amd64_linux_init_abi): Likewise.
8185 (amd64_x32_linux_init_abi): Likewise.
8186 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
8187 * x86-linux-nat.c (x86_linux_read_description): Call
8188 amd64_linux_read_description.
8189
b9f1d50f
YQ
81902017-09-05 Yao Qi <yao.qi@linaro.org>
8191
8192 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
8193 comments.
8194
188c9e6d
YQ
81952017-09-05 Yao Qi <yao.qi@linaro.org>
8196
8197 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
8198 * features/i386/i386-avx-avx512-linux.c: Remove.
8199 * features/i386/i386-avx-linux.c: Remove.
8200 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
8201 * features/i386/i386-avx-mpx-linux.c: Remove.
8202 * features/i386/i386-linux.c: Remove.
8203 * features/i386/i386-mmx-linux.c: Remove.
8204 * features/i386/i386-mpx-linux.c: Remove.
8205
5f035c07
YQ
82062017-09-05 Yao Qi <yao.qi@linaro.org>
8207
8208 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
8209 (SFILES): Add arch/i386.c.
8210 (HFILES_NO_SRCDIR): Add arch/i386.h.
8211 * arch/i386.c: New file.
8212 * arch/i386.h: New file.
8213 * arch/tdesc.h (allocate_target_description): Declare.
8214 (set_tdesc_architecture): Declare.
8215 (set_tdesc_osabi): Declare.
8216 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
8217 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
8218 include arch/i386.h.
8219 (i386_linux_read_description): Remove code and call
8220 i386_create_target_description.
8221 (set_tdesc_architecture): New function.
8222 (set_tdesc_osabi): New function.
8223 * target-descriptions.h (allocate_target_description): Remove.
8224
0abe8a89
YQ
82252017-09-05 Yao Qi <yao.qi@linaro.org>
8226
8227 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
8228 * target-descriptions.c (tdesc_create_feature): Likewise, and
8229 adjust code.
8230 * features/i386/32bit-avx.c: Re-generated.
8231 * features/i386/32bit-avx512.c: Re-generated.
8232 * features/i386/32bit-core.c: Re-generated.
8233 * features/i386/32bit-linux.c: Re-generated.
8234 * features/i386/32bit-mpx.c: Re-generated.
8235 * features/i386/32bit-pkeys.c: Re-generated.
8236 * features/i386/32bit-sse.c: Re-generated.
8237
0a188386
YQ
82382017-09-05 Yao Qi <yao.qi@linaro.org>
8239
8240 * regformats/regdef.h (struct reg): Override operator == and !=.
8241
f49ff000
YQ
82422017-09-05 Yao Qi <yao.qi@linaro.org>
8243
8244 * arch/tdesc.h: New file.
8245 * regformats/regdat.sh: Generate code using tdesc_create_reg.
8246 * target-descriptions.c: Update comments.
8247 * target-descriptions.h: Include "arch/tdesc.h". Remove the
8248 declarations.
8249 * features/i386/32bit-avx.c: Re-generated.
8250 * features/i386/32bit-avx512.c: Re-generated.
8251 * features/i386/32bit-core.c: Re-generated.
8252 * features/i386/32bit-linux.c: Re-generated.
8253 * features/i386/32bit-mpx.c: Re-generated.
8254 * features/i386/32bit-pkeys.c: Re-generated.
8255 * features/i386/32bit-sse.c: Re-generated.
8256
f7000548
YQ
82572017-09-05 Yao Qi <yao.qi@linaro.org>
8258
8259 * regformats/regdat.sh: Update generated code.
8260
c9a5e2a5
YQ
82612017-09-05 Yao Qi <yao.qi@linaro.org>
8262
8263 * regformats/regdat.sh: Adjust code order.
8264
d6b687ac
SM
82652017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8266
8267 * expprint.c (dump_subexp_body_standard): Use constant format
8268 string in fprintf_filtered call.
8269
a379bfd0
JB
82702017-09-04 John Baldwin <jhb@FreeBSD.org>
8271
8272 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
8273 NetBSD/i386.
8274 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
8275
f7efc967
JB
82762017-09-04 John Baldwin <jhb@FreeBSD.org>
8277
8278 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
8279
c49fbc6c
JB
82802017-09-04 John Baldwin <jhb@FreeBSD.org>
8281
8282 * bsd-kvm.o: Define _KMEMUSER.
8283 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
8284 * configure: Regenerate.
8285
26562e73
JB
82862017-09-04 John Baldwin <jhb@FreeBSD.org>
8287
8288 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
8289 * i386-fbsd-nat.c: Likewise.
8290
31cf1487
JB
82912017-09-04 John Baldwin <jhb@FreeBSD.org>
8292
8293 * unittests/array-view-selftests.c: Add include of <array>.
8294
5b9f8a7c
JB
82952017-09-04 John Baldwin <jhb@FreeBSD.org>
8296
8297 * spu-tdep.c (flush_ea_cache): Add missing argument to
8298 call_function_by_hand.
8299
d69cf9b2
PA
83002017-09-04 Pedro Alves <palves@redhat.com>
8301
8302 * NEWS (Safer support for debugging with no debug info): New.
8303
3693fdb3
PA
83042017-09-04 Pedro Alves <palves@redhat.com>
8305
8306 * c-exp.y (function_method, function_method_void): Add current
8307 instance flags to TYPE_INSTANCE.
8308 * dwarf2read.c (check_modifier): New.
8309 (compute_delayed_physnames): Assert that only C++ adds delayed
8310 physnames. Mark fn_fields as const/volatile depending on
8311 physname.
8312 * eval.c (make_params): New type_instance_flags parameter. Use
8313 it as the new type's instance flags.
8314 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
8315 flags element and pass it to make_params.
8316 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
8317 instance flags element.
8318 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
8319 * gdbtypes.h: Include "enum-flags.h".
8320 (type_instance_flags): New enum-flags type.
8321 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
8322 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
8323 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
8324 (follow_type_instance_flags): New function.
8325 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
8326 * parser-defs.h (follow_type_instance_flags): Declare.
8327 * valops.c (value_struct_elt_for_reference): const/volatile must
8328 match too.
8329
e68cb8e0
PA
83302017-09-04 Pedro Alves <palves@redhat.com>
8331
8332 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
8333 function/method scopes; lookup the nested name as a function local
8334 static variable.
8335
858be34c
PA
83362017-09-04 Pedro Alves <palves@redhat.com>
8337
8338 (%type <voidval>): Add function_method.
8339 * c-exp.y (exp): New production for calls with no arguments.
8340 (function_method, function_method_void_or_typelist): New
8341 productions.
8342 (exp): New production for "method()::static_var".
8343 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
8344 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8345 Handle OP_FUNC_STATIC_VAR.
8346 * parse.c (operator_length_standard):
8347 Handle OP_FUNC_STATIC_VAR.
8348
dd5901a6
PA
83492017-09-04 Pedro Alves <palves@redhat.com>
8350
8351 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
8352 handling.
8353 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8354 Ditto.
8355 * parse.c (operator_length_standard, operator_check_standard):
8356 Ditto.
8357 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
8358
46a4882b
PA
83592017-09-04 Pedro Alves <palves@redhat.com>
8360
8361 * ax-gdb.c: Include "typeprint.h".
8362 (gen_expr_for_cast): New function.
8363 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
8364 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
8365 type is unknown.
8366 * dwarf2read.c (new_symbol_full): Fallback to int instead of
8367 nodebug_data_symbol.
8368 * eval.c: Include "typeprint.h".
8369 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
8370 Error out if symbol has unknown type.
8371 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
8372 evaluate_subexp_for_cast.
8373 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
8374 OP_VAR_MSYM_VALUE.
8375 (evaluate_subexp_for_cast): New function.
8376 * gdbtypes.c (init_nodebug_var_type): New function.
8377 (objfile_type): Use it to initialize types of variables with no
8378 debug info.
8379 * typeprint.c (error_unknown_type): New.
8380 * typeprint.h (error_unknown_type): New declaration.
8381 * compile/compile-c-types.c (convert_type_basic): Handle
8382 TYPE_CODE_ERROR; warn and fallback to int for variables with
8383 unknown type.
8384
fe13dfec
PA
83852017-09-04 Pedro Alves <palves@redhat.com>
8386
8387 * eval.c (evaluate_var_value): New function, factored out from ...
8388 (evaluate_subexp_standard): ... here.
8389
d008ee21
PA
83902017-09-04 Pedro Alves <palves@redhat.com>
8391
8392 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
8393 Remove useless assignments to 'op'.
8394
827d0c51
PA
83952017-09-04 Pedro Alves <palves@redhat.com>
8396
8397 * eval.c (eval_skip_value): New function.
8398 (evaluate_subexp_standard): Use it.
8399
2c5a2be1
PA
84002017-09-04 Pedro Alves <palves@redhat.com>
8401
8402 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
8403 function name from symbol/minsym and pass it to
8404 error_call_unknown_return_type.
8405
74ea4be4
PA
84062017-09-04 Pedro Alves <palves@redhat.com>
8407
8408 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
8409 * ax-gdb.c (gen_msym_var_ref): New function.
8410 (gen_expr): Handle OP_VAR_MSYM_VALUE.
8411 * eval.c (evaluate_var_msym_value): New function.
8412 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
8413 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
8414 to call_function_by_hand.
8415 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8416 Handle OP_VAR_MSYM_VALUE.
8417 (union exp_element) <msymbol>: New field.
8418 * minsyms.h (struct type): Forward declare.
8419 (find_minsym_type_and_address): Declare.
8420 * parse.c (write_exp_elt_msym): New function.
8421 (write_exp_msymbol): Delete, refactored as ...
8422 (find_minsym_type_and_address): ... this new function.
8423 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
8424 (operator_length_standard, operator_check_standard): Handle
8425 OP_VAR_MSYM_VALUE.
8426 * std-operator.def (OP_VAR_MSYM_VALUE): New.
8427
7022349d
PA
84282017-09-04 Pedro Alves <palves@redhat.com>
8429
8430 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
8431 TYPE_GNU_IFUNC specially here. Throw error if return type is
8432 unknown.
8433 * ada-typeprint.c (print_func_type): Handle functions with unknown
8434 return type.
8435 * c-typeprint.c (c_type_print_base): Handle functions and methods
8436 with unknown return type.
8437 * compile/compile-c-symbols.c (convert_symbol_bmsym)
8438 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
8439 * compile/compile-c-types.c: Include "objfiles.h".
8440 (convert_func): For functions with unknown return type, warn and
8441 default to int.
8442 * compile/compile-object-run.c (compile_object_run): Adjust call
8443 to call_function_by_hand_dummy.
8444 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
8445 call_function_by_hand.
8446 * eval.c (evaluate_subexp_standard): Adjust calls to
8447 call_function_by_hand. Handle functions and methods with unknown
8448 return type. Pass expect_type to call_function_by_hand.
8449 * f-typeprint.c (f_type_print_base): Handle functions with unknown
8450 return type.
8451 * gcore.c (call_target_sbrk): Adjust call to
8452 call_function_by_hand.
8453 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
8454 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
8455 an integer address type instead of nodebug.
8456 * guile/scm-value.c (gdbscm_value_call): Adjust call to
8457 call_function_by_hand.
8458 * infcall.c (error_call_unknown_return_type): New function.
8459 (call_function_by_hand): New "default_return_type" parameter.
8460 Pass it down.
8461 (call_function_by_hand_dummy): New "default_return_type"
8462 parameter. Use it instead of defaulting to int. If there's no
8463 default and the return type is unknown, throw an error. If
8464 there's a default return type, and the called function has no
8465 debug info, then assume the function is prototyped.
8466 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
8467 New "default_return_type" parameter.
8468 (error_call_unknown_return_type): New declaration.
8469 * linux-fork.c (call_lseek): Cast return type of lseek.
8470 (inferior_call_waitpid, checkpoint_command): Adjust calls to
8471 call_function_by_hand.
8472 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
8473 calls to call_function_by_hand.
8474 * m2-typeprint.c (m2_procedure): Handle functions with unknown
8475 return type.
8476 * objc-lang.c (lookup_objc_class, lookup_child_selector)
8477 (value_nsstring, print_object_command): Adjust calls to
8478 call_function_by_hand.
8479 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
8480 functions with unknown return type.
8481 (pascal_type_print_func_varspec_suffix): New function.
8482 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
8483 TYPE_CODE_METHOD>: Use it.
8484 * python/py-value.c (valpy_call): Adjust call to
8485 call_function_by_hand.
8486 * rust-lang.c (rust_evaluate_funcall): Adjust call to
8487 call_function_by_hand.
8488 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
8489 call_function_by_hand.
8490 * valops.c (value_allocate_space_in_inferior): Adjust call to
8491 call_function_by_hand.
8492 * typeprint.c (type_print_unknown_return_type): New function.
8493 * typeprint.h (type_print_unknown_return_type): New declaration.
8494
54990598
PA
84952017-09-04 Pedro Alves <palves@redhat.com>
8496
8497 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
8498 types with more than one parameter as prototyped.
8499
9a24775b
PA
85002017-09-04 Pedro Alves <palves@redhat.com>
8501
8502 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
8503 (disassemble_command): Use gdb_disassembly_flags instead of bare
8504 int.
8505 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
8506 (dump_insns, do_mixed_source_and_assembly_deprecated)
8507 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
8508 Use gdb_disassembly_flags instead of bare int.
8509 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
8510 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
8511 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
8512 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
8513 (enum gdb_disassembly_flag): ... values of this new enumeration.
8514 (gdb_disassembly_flags): Define.
8515 (gdb_disassembly)
8516 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
8517 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
8518 gdb_disassembly_flags instead of bare int.
8519 * record-btrace.c (btrace_insn_history)
8520 (record_btrace_insn_history, record_btrace_insn_history_range)
8521 (record_btrace_insn_history_from): Use gdb_disassembly_flags
8522 instead of bare int.
8523 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
8524 Use gdb_disassembly_flags instead of bare int.
8525 * target-debug.h (target_debug_print_gdb_disassembly_flags):
8526 Define.
8527 * target-delegates.c: Regenerate.
8528 * target.c (target_insn_history, target_insn_history_from)
8529 (target_insn_history_range): Use gdb_disassembly_flags instead of
8530 bare int.
8531 * target.h: Include "disasm.h".
8532 (struct target_ops) <to_insn_history, to_insn_history_from,
8533 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
8534 int.
8535 (target_insn_history, target_insn_history_from)
8536 (target_insn_history_range): Use gdb_disassembly_flags instead of
8537 bare int.
8538
80a65e9b
SM
85392017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8540
8541 * cli/cli-script.c (build_command_line): For if/while commands,
8542 check whether args is empty.
8543
6b66338c
SM
85442017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8545
8546 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
8547 (enum command_control_type): Likewise.
8548 (struct command_line): Likewise.
8549 (free_command_lines): Likewise.
8550 (struct command_lines_deleter): Likewise.
8551 (command_line_up): Likewise.
8552 (read_command_lines): Likewise.
8553 (read_command_lines_1): Likewise.
8554 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
8555 (enum command_control_type): Likewise.
8556 (struct command_line): Likewise.
8557 (free_command_lines): Likewise.
8558 (struct command_lines_deleter): Likewise.
8559 (command_line_up): Likewise.
8560 (read_command_lines): Likewise.
8561 (read_command_lines_1): Likewise.
8562 * breakpoint.h: Include cli/cli-script.h.
8563 * extension-priv.h: Likewise.
8564 * gdbcmd.h: Likewise.
8565
51abb421
PA
85662017-09-04 Pedro Alves <palves@redhat.com>
8567
8568 * ada-lang.c (is_known_support_routine): Move sal declaration to
8569 where it is initialized.
8570 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
8571 (parse_breakpoint_sals, decode_static_tracepoint_spec)
8572 (clear_command, update_static_tracepoint): Remove init_sal
8573 references. Move declarations closer to initializations.
8574 * cli/cli-cmds.c (list_command): Move sal declarations closer to
8575 initializations.
8576 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
8577 references. Move sal declarations closer to initializations.
8578 * frame.c (find_frame_sal): Return a symtab_and_line via function
8579 return instead of output parameter. Remove init_sal references.
8580 * frame.h (find_frame_sal): Return a symtab_and_line via function
8581 return instead of output parameter.
8582 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
8583 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
8584 instead of memset.
8585 (gdbscm_find_pc_line): Remove init_sal reference.
8586 * infcall.c (call_function_by_hand_dummy): Remove init_sal
8587 references. Move declarations closer to initializations.
8588 * infcmd.c (set_step_frame): Update. Move declarations closer to
8589 initializations.
8590 (finish_backward): Remove init_sal references. Move declarations
8591 closer to initializations.
8592 * infrun.c (process_event_stop_test, handle_step_into_function)
8593 (insert_hp_step_resume_breakpoint_at_frame)
8594 (insert_step_resume_breakpoint_at_caller): Likewise.
8595 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
8596 (symbol_to_sal): Likewise.
8597 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
8598 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
8599 to its initialization.
8600 * reverse.c (save_bookmark_command): Use new/delete. Remove
8601 init_sal references. Move declarations closer to initializations.
8602 * source.c (get_current_source_symtab_and_line): Remove brace
8603 initialization.
8604 (set_current_source_symtab_and_line): Now takes the sal by const
8605 reference. Remove brace initialization.
8606 (line_info): Remove init_sal reference.
8607 * source.h (set_current_source_symtab_and_line): Now takes a
8608 symtab_and_line via const reference.
8609 * stack.c (set_current_sal_from_frame): Adjust.
8610 (print_frame_info): Adjust.
8611 (get_last_displayed_sal): Return the sal via function return
8612 instead of via output parameter. Simplify.
8613 (frame_info): Adjust.
8614 * stack.h (get_last_displayed_sal): Return the sal via function
8615 return instead of via output parameter.
8616 * symtab.c (init_sal): Delete.
8617 (find_pc_sect_line): Remove init_sal references. Move
8618 declarations closer to initializations.
8619 (find_function_start_sal): Remove init_sal references. Move
8620 declarations closer to initializations.
8621 * symtab.h (struct symtab_and_line): In-class initialize all
8622 fields.
8623 * tracepoint.c (set_traceframe_context)
8624 (print_one_static_tracepoint_marker): Remove init_sal references.
8625 Move declarations closer to initializations.
8626 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
8627 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
8628 declarations closer to initializations.
8629 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
8630 init_sal references. Adjust.
8631
6c5b2ebe
PA
86322017-09-04 Pedro Alves <palves@redhat.com>
8633
8634 * ax-gdb.c (agent_command_1): Use range-for.
8635 * break-catch-throw.c (re_set_exception_catchpoint): Update.
8636 * breakpoint.c: Include "common/array-view.h".
8637 (init_breakpoint_sal, create_breakpoint_sal): Change sals
8638 parameter from struct symtabs_and_lines to
8639 array_view<symtab_and_line>. Adjust. Use range-for. Update.
8640 (breakpoint_sals_to_pc): Change sals parameter from struct
8641 symtabs_and_lines to std::vector reference.
8642 (check_fast_tracepoint_sals): Change sals parameter from struct
8643 symtabs_and_lines to std::array_view. Use range-for.
8644 (decode_static_tracepoint_spec): Return a std::vector instead of
8645 symtabs_and_lines. Update.
8646 (create_breakpoint): Update.
8647 (break_range_command, until_break_command, clear_command): Update.
8648 (base_breakpoint_decode_location, bkpt_decode_location)
8649 (bkpt_probe_create_sals_from_location)
8650 (bkpt_probe_decode_location, tracepoint_decode_location)
8651 (tracepoint_probe_decode_location)
8652 (strace_marker_create_sals_from_location): Return a std::vector
8653 instead of symtabs_and_lines.
8654 (strace_marker_create_breakpoints_sal): Update.
8655 (strace_marker_decode_location): Return a std::vector instead of
8656 symtabs_and_lines. Update.
8657 (update_breakpoint_locations): Change struct symtabs_and_lines
8658 parameters to gdb::array_view. Adjust.
8659 (location_to_sals): Return a std::vector instead of
8660 symtabs_and_lines. Update.
8661 (breakpoint_re_set_default): Use std::vector instead of struct
8662 symtabs_and_lines.
8663 (decode_location_default): Return a std::vector instead of
8664 symtabs_and_lines. Update.
8665 * breakpoint.h: Include "common/array-view.h".
8666 (struct breakpoint_ops) <decode_location>: Now returns a
8667 std::vector instead of returning a symtabs_and_lines via output
8668 parameter.
8669 (update_breakpoint_locations): Change sals parameters to use
8670 gdb::array_view.
8671 * cli/cli-cmds.c (edit_command, list_command): Update to use
8672 std::vector and gdb::array_view.
8673 (ambiguous_line_spec): Adjust to use gdb::array_view and
8674 range-for.
8675 (compare_symtabs): Rename to ...
8676 (cmp_symtabs): ... this. Change parameters to symtab_and_line
8677 const reference and adjust.
8678 (filter_sals): Rewrite using std::vector and standard algorithms.
8679 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
8680 (jump_command): Update to use std::vector.
8681 * linespec.c (struct linespec_state) <canonical_names>: Update
8682 comment.
8683 (add_sal_to_sals_basic): Delete.
8684 (add_sal_to_sals, filter_results, convert_results_to_lsals)
8685 (decode_line_2, create_sals_line_offset)
8686 (convert_address_location_to_sals, convert_linespec_to_sals)
8687 (convert_explicit_location_to_sals, parse_linespec)
8688 (event_location_to_sals, decode_line_full, decode_line_1)
8689 (decode_line_with_current_source)
8690 (decode_line_with_last_displayed, decode_objc)
8691 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
8692 (linespec_result::~linespec_result): Adjust to use std::vector
8693 instead of symtabs_and_lines.
8694 * linespec.h (linespec_sals::sals): Now a std::vector.
8695 (struct linespec_result): Use std::vector, bool, and in-class
8696 initialization.
8697 (decode_line_1, decode_line_with_current_source)
8698 (decode_line_with_last_displayed): Return std::vector.
8699 * macrocmd.c (info_macros_command): Use std::vector.
8700 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
8701 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
8702 std::vector.
8703 * probe.h (parse_probes): Return a std::vector.
8704 * python/python.c (gdbpy_decode_line): Use std::vector and
8705 gdb::array_view.
8706 * source.c (select_source_symtab, line_info): Use std::vector.
8707 * stack.c (func_command): Use std::vector.
8708 * symtab.h (struct symtabs_and_lines): Delete.
8709 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
8710
7c44b49c
PA
87112017-09-04 Pedro Alves <palves@redhat.com>
8712
8713 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8714 unittests/array-view-selftests.c.
8715 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
8716 * common/array-view.h: New file.
8717 * unittests/array-view-selftests.c: New file.
8718
e439fa14
PA
87192017-09-04 Pedro Alves <palves@redhat.com>
8720
8721 * cli/cli-cmds.c (edit_command): Pass message to
8722 ambiguous_line_spec.
8723 (list_command): Pass message to ambiguous_line_spec. Say
8724 "first"/"last" instead of "start" and "end" to be consistent with
8725 the manual.
8726 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
8727 them to print formatted message.
8728
7525b645
PA
87292017-09-04 Pedro Alves <palves@redhat.com>
8730
8731 * btrace.c (ftrace_add_pt): Pass btrace_insn to
8732 ftrace_update_insns by reference instead of pointer.
8733
badc0020
YQ
87342017-09-04 Yao Qi <yao.qi@linaro.org>
8735
8736 * i386-go32-tdep.c: Include x86-xstate.h.
8737 (i386_go32_init_abi): Call i386_target_description.
8738 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
8739 if xcr0 is X86_XSTATE_X87_MASK.
8740 * i386-tdep.h (tdesc_i386): Remove the declaration.
8741 (tdesc_i386_mmx): Likewise.
8742
d78bdb54
YQ
87432017-09-04 Yao Qi <yao.qi@linaro.org>
8744
8745 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
8746 X86_XSTATE_SSE_MASK instead of 0.
8747
ca1fa5ee
YQ
87482017-09-04 Yao Qi <yao.qi@linaro.org>
8749
8750 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
8751 i386_target_description.
8752 * i386-fbsd-nat.c (i386fbsd_read_description): Call
8753 i386_target_description.
8754 * i386-tdep.c (i386_gdbarch_init): Likewise.
8755
2434b019
YQ
87562017-09-04 Yao Qi <yao.qi@linaro.org>
8757
8758 * amd64-darwin-tdep.c: Include "x86-xstate.h".
8759 (x86_darwin_init_abi_64): Call amd64_target_description.
8760 * amd64-dicos-tdep.c: Likewise.
8761 * amd64-fbsd-nat.c: Likewise.
8762 * amd64-fbsd-tdep.c: Likewise.
8763 * amd64-nbsd-tdep.c: Likewise.
8764 * amd64-obsd-tdep.c: Likewise.
8765 * amd64-sol2-tdep.c: Likewise.
8766 * amd64-windows-tdep.c: Likewise.
8767 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
8768
0860c437
SM
87692017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8770
8771 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
8772 (btrace_function) <insn>: Change type to use std::vector.
8773 * btrace.c (ftrace_debug, ftrace_call_num_insn,
8774 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
8775 ftrace_update_insns, ftrace_compute_global_level_offset,
8776 btrace_stitch_bts, btrace_clear, btrace_insn_get,
8777 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
8778 change to std::vector.
8779 (ftrace_update_insns): Adjust to change to std::vector, change
8780 type of INSN parameter.
8781 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
8782 * record-btrace.c (btrace_call_history_insn_range,
8783 btrace_compute_src_line_range,
8784 record_btrace_frame_prev_register): Adjust to change to
8785 std::vector.
8786 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
8787 to change to std::vector.
8788
0638b7f9
TT
87892017-09-03 Tom Tromey <tom@tromey.com>
8790
8791 * corefile.c (reopen_exec_file): Use std::string.
8792
8f84fb0e
TT
87932017-09-03 Tom Tromey <tom@tromey.com>
8794
8795 * compile/compile.c (compile_register_name_mangled): Return
8796 std::string.
8797 * compile/compile-loc2c.c (pushf_register_address): Update.
8798 (pushf_register): Update.
8799 * compile/compile-c-types.c (convert_array): Update.
8800 * compile/compile-c-symbols.c (generate_vla_size): Update.
8801 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
8802 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
8803 (convert_one_symbol): Update.
8804 (generate_c_for_for_one_variable): Update.
8805 * compile/compile-c-support.c (c_get_range_decl_name): Return a
8806 std::string.
8807 (generate_register_struct): Update.
8808 * compile/compile-internal.h (c_get_range_decl_name): Return a
8809 std::string.
8810 (compile_register_name_mangled): Return std::string.
8811
18e9961f
TT
88122017-09-03 Tom Tromey <tom@tromey.com>
8813
8814 * utils.c (perror_string): Return a std::string.
8815 (throw_perror_with_name, perror_warning_with_name): Update.
8816
45343786
TT
88172017-09-03 Tom Tromey <tom@tromey.com>
8818
8819 * demangle.c (demangle_command): Use std::string,
8820 unique_xmalloc_ptr.
8821
b57af503
TT
88222017-09-03 Tom Tromey <tom@tromey.com>
8823
8824 * cli/cli-setshow.c (do_set_command): Use std::string.
8825
6eecf35f
TT
88262017-09-03 Tom Tromey <tom@tromey.com>
8827
8828 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
8829
56496dd4
TT
88302017-09-03 Tom Tromey <tom@tromey.com>
8831
8832 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
8833
e91a1fa7
TT
88342017-09-03 Tom Tromey <tom@tromey.com>
8835
8836 * mi/mi-cmd-env.c (env_execute_cli_command): Use
8837 gdb::unique_xmalloc_ptr.
8838
7ffd83d7
TT
88392017-09-03 Tom Tromey <tom@tromey.com>
8840
8841 * thread.c (print_thread_info_1): Use string_printf.
8842 (thread_apply_command, thread_apply_all_command): Use
8843 std::string.
8844
1ccbe998
TT
88452017-09-03 Tom Tromey <tom@tromey.com>
8846
8847 * valprint.c (val_print_string): Update.
8848 * gdbcore.h (memory_error_message): Return std::string.
8849 * corefile.c (memory_error_message): Return std::string.
8850 (memory_error): Update.
8851 * breakpoint.c (insert_bp_location): Update.
8852
23fdd69e
SM
88532017-09-03 Simon Marchi <simon.marchi@ericsson.com>
8854
8855 * target/waitstatus.h (target_waitstatus_to_string): Change
8856 return type to std::string.
8857 * target/waitstatus.c (target_waitstatus_to_string): Return
8858 std::string.
8859 * target.h (target_waitstatus_to_string): Remove declaration.
8860 * infrun.c (resume, clear_proceed_status_thread,
8861 print_target_wait_results, do_target_wait, save_waitstatus,
8862 stop_all_threads): Adjust.
8863 * record-btrace.c (record_btrace_wait): Adjust.
8864 * target-debug.h
8865 (target_debug_print_struct_target_waitstatus_p): Adjust.
8866
5c811d30
JK
88672017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8868
8869 PR gdb/22046
8870 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
8871 detection.
8872
0a2dde4a
SDJ
88732017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
8874
8875 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
8876 for setting/unsetting environment variables on the remote target.
8877 (New remote packets): Add entries for QEnvironmentHexEncoded,
8878 QEnvironmentUnset and QEnvironmentReset.
8879 * common/environ.c (gdb_environ::operator=): Extend method to
8880 handle m_user_set_env_list and m_user_unset_env_list.
8881 (gdb_environ::clear): Likewise.
8882 (match_var_in_string): Change type of first parameter from 'char
8883 *' to 'const char *'.
8884 (gdb_environ::set): Extend method to handle
8885 m_user_set_env_list and m_user_unset_env_list.
8886 (gdb_environ::unset): Likewise.
8887 (gdb_environ::clear_user_set_env): New method.
8888 (gdb_environ::user_set_envp): Likewise.
8889 (gdb_environ::user_unset_envp): Likewise.
8890 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
8891 m_user_unset_env_list on move constructor/assignment.
8892 (unset): Add new default parameter 'update_unset_list = true'.
8893 (clear_user_set_env): New method.
8894 (user_set_envp): Likewise.
8895 (user_unset_envp): Likewise.
8896 (m_user_set_env_list): New std::set.
8897 (m_user_unset_env_list): Likewise.
8898 * common/rsp-low.c (hex2str): New function.
8899 (bin2hex): New overload for bin2hex function.
8900 * common/rsp-low.c (hex2str): New prototype.
8901 (str2hex): New overload prototype.
8902 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
8903 QEnvironmentUnset and QEnvironmentReset.
8904 (remote_protocol_features): Add QEnvironmentHexEncoded,
8905 QEnvironmentUnset and QEnvironmentReset packets.
8906 (send_environment_packet): New function.
8907 (extended_remote_environment_support): Likewise.
8908 (extended_remote_create_inferior): Call
8909 extended_remote_environment_support.
8910 (_initialize_remote): Add QEnvironmentHexEncoded,
8911 QEnvironmentUnset and QEnvironmentReset packet configs.
8912 * unittests/environ-selftests.c (gdb_selftest_env_var):
8913 New variable.
8914 (test_vector_initialization): New function.
8915 (test_init_from_host_environ): Likewise.
8916 (test_reinit_from_host_environ): Likewise.
8917 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
8918 Likewise.
8919 (test_unset_set_empty_vector): Likewise.
8920 (test_vector_clear): Likewise.
8921 (test_std_move): Likewise.
8922 (test_move_constructor):
8923 (test_self_move): Likewise.
8924 (test_set_unset_reset): Likewise.
8925 (run_tests): Rewrite in terms of the functions above.
8926
654670a4
WP
89272017-08-31 Weimin Pan <weimin.pan@oracle.com>
8928
8929 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
8930 (adi_available): Use a temp variable of type CORE_ADDR as argument
8931 3 when calling target_auxv_search.
8932 (adi_normalize_address): Use masks and xor operators to calculate
8933 normalized address.
8934 (adi_read_versions, adi_write_versions, adi_print_versions)
8935 (do_examine, do_assign): Use paddress.
8936
7755ddb7
JB
89372017-08-29 John Baldwin <jhb@FreeBSD.org>
8938
8939 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
8940 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
8941 out of loop and add supply of FIR.
8942 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
8943 add collect of FIR.
8944
fd437cbc
SM
89452017-08-28 Simon Marchi <simon.marchi@ericsson.com>
8946
3804a343 8947 PR gdb/21827
fd437cbc
SM
8948 * cli/cli-script.c (define_command): Don't convert command name
8949 to lower case.
8950
988f6b3d
JB
89512017-08-25 Joel Brobecker <brobecker@adacore.com>
8952
8953 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
8954 Update all callers accordingly. Remove all code blocks handling
8955 the case where DISPP is not NULL.
8956
663c44ac
JK
89572017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8958
8959 PR symtab/22003
8960 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
8961 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8962 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
8963
f1902523
JK
89642017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8965
8966 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
8967 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
8968 (read_comp_units_from_section): New parameter abbrev_section, use
8969 read_and_check_comp_unit_head, allocate signatured_type if needed.
8970 (create_all_comp_units): Update read_comp_units_from_section caller.
8971
87215ad1
SDJ
89722017-08-23 Pedro Alves <palves@redhat.com>
8973
8974 PR remote/21852
8975 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
8976 to null_ptid and switch to thread without reading the registers
8977 after adding the inferior.
8978
6e41ddec
JK
89792017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8980
8981 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
8982 compile-gcc.
8983 * compile/compile.c (compile_gcc, show_compile_gcc): New.
8984 (compile_to_object): Implement compile_gcc.
8985 (_initialize_compile): Install "set compile-gcc". Initialize
8986 compile_gcc.
8987
e68c32d5
JK
89882017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8989
8990 * compile/compile.c (compile_to_object): Conditionally call
8991 set_verbose. Conditionally call compile or compile_v0.
8992
58afddc6
WP
89932017-08-07 Weimin Pan <weimin.pan@oracle.com>
8994
8995 * sparc64-tdep.h: (adi_normalize_address): New export.
8996 * sparc-nat.h: (open_adi_tag_fd): New export.
8997 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
8998 * sparc64-linux-tdep.c:
8999 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
9000 (sparc64_linux_handle_segmentation_fault): New function.
9001 (sparc64_linux_init_abi): Register
9002 sparc64_linux_handle_segmentation_fault
9003 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
9004 (sparc64_addr_bits_remove): New function.
9005 (sparc64_init_abi): Register sparc64_addr_bits_remove.
9006 (MAX_PROC_NAME_SIZE): New macro.
9007 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
9008 (sparc64adilist): New variable.
9009 (adi_proc_list): New variable.
9010 (find_adi_info): New function.
9011 (add_adi_info): New function.
9012 (get_adi_info_proc): New function.
9013 (get_adi_info): New function.
9014 (info_adi_command): New function.
9015 (read_maps_entry): New function.
9016 (adi_available): New function.
9017 (adi_normalize_address): New function.
9018 (adi_align_address): New function.
9019 (adi_convert_byte_count): New function.
9020 (adi_tag_fd): New function.
9021 (adi_is_addr_mapped): New function.
9022 (adi_read_versions): New function.
9023 (adi_write_versions): New function.
9024 (adi_print_versions): New function.
9025 (do_examine): New function.
9026 (do_assign): New function.
9027 (adi_examine_command): New function.
9028 (adi_assign_command): New function.
9029 (_initialize_sparc64_adi_tdep): New function.
9030
11db9430
SM
90312017-08-22 Simon Marchi <simon.marchi@ericsson.com>
9032
9033 * breakpoint.c (breakpoints_info): Rename to ...
9034 (info_breakpoints_command): ... this.
9035 (watchpoints_info): Rename to ...
9036 (info_watchpoints_command): ... this.
9037 (tracepoints_info): Rename to ...
9038 (info_tracepoints_command): ... this.
9039 (_initialize_breakpoint): Adjust.
9040 * dcache.c (dcache_info): Rename to ...
9041 (info_display_command): ... this.
9042 (_initialize_dcache): Adjust.
9043 * frame.h (args_info): Rename to ...
9044 (info_args_command): ... this.
9045 (locals_info): Rename to ...
9046 (info_locals_command): ... this.
9047 * infcmd.c (nofp_registers_info): Rename to ...
9048 (info_registers_command): ... this.
9049 (float_info): Rename to ...
9050 (info_float_command): ... this.
9051 (program_info): Rename to ...
9052 (info_program_command): ... this.
9053 (all_registers_info): Rename to ...
9054 (info_all_registers_command): ... this.
9055 (vector_info): Rename to ...
9056 (info_vector_command): ... this.
9057 (float_info): Rename to ...
9058 (info_float_command): ... this.
9059 (_initialize_infcmd): Adjust.
9060 * inferior.h (term_info): Rename to ...
9061 (info_terminal_command): ... this.
9062 * inflow.c (term_info): Rename to ...
9063 (info_terminal_command): ... this.
9064 (_initialize_inflow): Adjust.
9065 * infrun.c (signals_info): Rename to ...
9066 (info_signals_command): ... this.
9067 (_initialize_infrun): Adjust.
9068 * objc-lang.c (classes_info): Rename to ...
9069 (info_classes_command): ... this.
9070 (selectors_info): Rename to ...
9071 (info_selectors_command): ... this.
9072 (_initialize_objc_language): Adjust.
9073 * printcmd.c (sym_info): Rename to ...
9074 (info_symbol_command): ... this.
9075 (address_info): Rename to ...
9076 (info_address_command): ... this.
9077 (display_info): Rename to ...
9078 (info_display_command): ... this.
9079 (_initialize_printcmd): Adjust.
9080 * reverse.c (bookmarks_info): Rename to ...
9081 (info_breakpoints_command): ... this.
9082 (_initialize_reverse): Adjust.
9083 * ser-go32.c (dos_info): Rename to ...
9084 (info_serial_command): ... this.
9085 (_initialize_ser_dos): Adjust.
9086 * skip.c (skip_info): Rename to ...
9087 (info_skip_command): ... this.
9088 (_initialize_step_skip): Adjust.
9089 * source.c (line_info): Rename to ...
9090 (info_line_command): ... this.
9091 (source_info): Rename to ...
9092 (info_source_command)
9093 * stack.c (frame_info): Rename to ...
9094 (info_frame_command): ... this.
9095 (locals_info): Rename to ...
9096 (info_locals_command): ... this.
9097 (args_info): Rename to ...
9098 (info_args_command): ... this.
9099 (_initialize_stack): Adjust.
9100 * symtab.c (sources_info): Rename to ...
9101 (info_sources_command): ... this.
9102 (variables_info): Rename to ...
9103 (info_variables_command): ... this.
9104 (functions_info): Rename to ...
9105 (info_functions_command): ... this.
9106 (types_info): Rename to ...
9107 (info_types_command): ... this.
9108 (_initialize_symtab): Adjust.
9109 * target.c (target_info): Rename to ...
9110 (info_target_command): ... this.
9111 (initialize_targets): Adjust.
9112 * tracepoint.c (tvariables_info): Rename to ...
9113 (info_tvariables_command): ... this.
9114 (scope_info): Rename to ...
9115 (info_scope_command): ... this.
9116 (trace_dump_actions): Adjust.
9117 (_initialize_tracepoint): Adjust.
9118
b270e6f9
TT
91192017-08-22 Tom Tromey <tom@tromey.com>
9120
9121 * breakpoint.h (install_breakpoint): Update.
9122 * breakpoint.c (add_solib_catchpoint): Update.
9123 (install_breakpoint): Change argument to a std::unique_ptr.
9124 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
9125 (create_breakpoint_sal, create_breakpoint): Update.
9126 (watch_command_1, catch_exec_command_1)
9127 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
9128 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
9129 Return the breakpoint.
9130 (set_raw_breakpoint_without_location, set_raw_breakpoint)
9131 (new_single_step_breakpoint): Update.
9132 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
9133 std::unique_ptr.
9134 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9135 std::unique_ptr.
9136 * break-catch-sig.c (create_signal_catchpoint): Use
9137 std::unique_ptr.
9138 * ada-lang.c (create_ada_exception_catchpoint): Use
9139 std::unique_ptr.
9140
36bd8eaa
TT
91412017-08-22 Tom Tromey <tom@tromey.com>
9142
9143 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
9144
56f37645
TT
91452017-08-22 Tom Tromey <tom@tromey.com>
9146
9147 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
9148 (lookup_partial_symbol): Update.
9149
0b581c69
TT
91502017-08-22 Tom Tromey <tom@tromey.com>
9151
9152 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
9153 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
9154 (find_and_open_source, symtab_to_fullname): Update.
9155 * psymtab.c (psymtab_to_fullname): Update.
9156
14278e1f
TT
91572017-08-22 Tom Tromey <tom@tromey.com>
9158
9159 * exec.c (exec_file_attach): Update.
9160 * linux-thread-db.c (try_thread_db_load): Update.
9161 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
9162 * utils.c (gdb_realpath): Change return type.
9163 (gdb_realpath_keepfile): Update.
9164 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
9165 (_initialize_utils): Register the new self test.
9166 * source.c (openp): Update.
9167 (find_and_open_source): Update.
9168 * nto-tdep.c (nto_find_and_open_solib): Update.
9169 * main.c (set_gdb_data_directory): Update.
9170 (captured_main_1): Update.
9171 * dwarf2read.c (dwarf2_get_dwz_file): Update
9172 (dw2_map_symbol_filenames): Update.
9173 * auto-load.c (auto_load_safe_path_vec_update): Update.
9174 (filename_is_in_auto_load_safe_path_vec): Change type of
9175 "filename_realp".
9176 (auto_load_objfile_script): Update.
9177 (file_is_auto_load_safe): Update. Use std::string.
9178 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
9179
4971c9a7
TT
91802017-08-22 Tom Tromey <tom@tromey.com>
9181
9182 * utils.c (gdb_realpath_keepfile): Return a
9183 gdb::unique_xmalloc_ptr.
9184 * exec.c (exec_file_attach): Update.
9185 * utils.h (gdb_realpath_keepfile): Return a
9186 gdb::unique_xmalloc_ptr.
9187
e3e41d58
TT
91882017-08-22 Tom Tromey <tom@tromey.com>
9189
9190 * compile/compile.c (compile_file_command): Use
9191 gdb::unique_xmalloc_ptr, std::string.
9192 * utils.c (gdb_abspath): Change return type.
9193 * source.c (openp): Update.
9194 * objfiles.c (allocate_objfile): Update.
9195 * main.c (set_gdb_data_directory): Update.
9196 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
9197
0d999a6e
ZZ
91982017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
9199
9200 * cli-cmds.c (list_commands): List actual code around more than
9201 one location.
9202
329d5e7e
JB
92032017-08-21 John Baldwin <jhb@FreeBSD.org>
9204
9205 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
9206
bf223d3e
PA
92072017-08-21 Pedro Alves <palves@redhat.com>
9208
9209 PR gdb/19487
9210 * c-exp.y (variable production): Handle function aliases.
9211 * minsyms.c (msymbol_is_text): New function.
9212 * minsyms.h (msymbol_is_text): Declare.
9213 * symtab.c (find_function_alias_target): New function.
9214 * symtab.h (find_function_alias_target): Declare.
9215
c973d0aa
PA
92162017-08-21 Pedro Alves <palves@redhat.com>
9217
9218 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
9219 typedefs.
9220 * typeprint.c (whatis_exp): If handling "whatis", and expression
9221 is OP_TYPE, strip one typedef level. Otherwise don't strip
9222 typedefs here.
9223 * valops.c (value_cast): Save "to" type before resolving
9224 stubs/typedefs. Use that type as resulting value's type.
9225
2989a365
TT
92262017-08-18 Tom Tromey <tom@tromey.com>
9227 Pedro Alves <palves@redhat.com>
9228
9229 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
9230 * sol-thread.c (sol_thread_resume, sol_thread_wait)
9231 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
9232 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
9233 * proc-service.c (ps_xfer_memory): Use scoped_restore.
9234 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
9235 (linux_get_siginfo_data): Add "thread" argument. Use
9236 scoped_restore.
9237 * linux-nat.c (linux_child_follow_fork)
9238 (check_stopped_by_watchpoint): Use scoped_restore.
9239 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
9240 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
9241 (restore_inferior_ptid, save_inferior_ptid): Remove.
9242 * btrace.c (btrace_fetch): Use scoped_restore.
9243 * bsd-uthread.c (bsd_uthread_fetch_registers)
9244 (bsd_uthread_store_registers): Use scoped_restore.
9245 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
9246 scoped_restore.
9247 * aix-thread.c (aix_thread_resume, aix_thread_wait)
9248 (aix_thread_xfer_partial): Use scoped_restore.
9249 * inferior.h (save_inferior_ptid): Remove.
9250
e60eb288
YQ
92512017-08-18 Yao Qi <yao.qi@linaro.org>
9252
9253 PR tdep/21818
9254 * arm-tdep.c (gdb_print_insn_arm): Mark
9255 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
9256
6d580b63
YQ
92572017-08-18 Yao Qi <yao.qi@linaro.org>
9258
9259 * NEWS: Mention GDBserver's new option "--selftest".
9260 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
9261 * selftest.c: Move it to common/selftest.c.
9262 * selftest.h: Move it to common/selftest.h.
9263 * selftest-arch.c (reset): New function.
9264 (tests_with_arch): Call reset.
9265
86dcbf50
YQ
92662017-08-18 Yao Qi <yao.qi@linaro.org>
9267
9268 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
9269 instead of exception_fprintf and printf_filtered.
9270
7649770c
YQ
92712017-08-18 Yao Qi <yao.qi@linaro.org>
9272
9273 * selftest.c (register_self_test): Rename it to
9274 selftests::register_test.
9275 (run_self_tests): selftest::run_tests.
9276 * selftest.h: Update declarations.
9277 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
9278 selftests::register_test_foreach_arch.
9279 * selftest-arch.h: Update declaration.
9280 * aarch64-tdep.c: Update.
9281 * arm-tdep.c: Likewise.
9282 * disasm-selftests.c: Likewise.
9283 * dwarf2loc.c: Likewise.
9284 * dwarf2-frame.c: Likewise.
9285 * findvar.c: Likewise.
9286 * gdbarch-selftests.c: Likewise.
9287 * maint.c (maintenance_selftest): Likewise.
9288 * regcache.c: Likewise.
9289 * rust-exp.y: Likewise.
9290 * selftest-arch.c: Likewise.
9291 * unittests/environ-selftests.c: Likewise.
9292 * unittests/function-view-selftests.c: Likewise.
9293 * unittests/offset-type-selftests.c: Likewise.
9294 * unittests/optional-selftests.c: Likewise.
9295 * unittests/scoped_restore-selftests.c: Likewise.
9296 * utils-selftests.c: Likewise.
9297
b0cba12e
PA
92982017-08-17 Pedro Alves <palves@redhat.com>
9299
9300 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
9301 local.
9302
4c8aa72d
PA
93032017-08-17 Pedro Alves <palves@redhat.com>
9304
9305 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
9306 field.
9307 (reset_die_in_process): Delete, replaced by ...
9308 (process_die_scope): ... this new class. Make it responsible for
9309 freeing cu->line_header too.
9310 (process_die): Use process_die_scope.
9311 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
9312 cu->line_header_die_owner. Don't release the line header if it's
9313 owned by the CU.
9314 (setup_type_unit_groups): Make the CU/DIE own the line header.
9315 Don't release the line header here.
9316
ba713918
AL
93172017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
9318
9319 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
9320
44d0fb3a
RK
93212017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
9322
9323 * NEWS: Mention new shortcuts for nexti and stepi in TUI
9324 Single-Key mode
9325
a5afdb16
RK
93262017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
9327
9328 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
9329 mode command list.
9330
47613aeb
SH
93312017-08-15 Stafford Horne <shorne@gmail.com>
9332
9333 * MAINTAINERS (Write After Approval): Add Stafford Horne.
9334
9c3cc999
SH
93352017-08-15 Stafford Horne <shorne@gmail.com>
9336
9337 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
9338
206726fb
SDJ
93392017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
9340
9341 PR gdb/21954
9342 * infcmd.c (unset_environment_command): Use the 'clear' method on
9343 the environment instead of resetting it.
9344
0335ac6d
JB
93452017-08-15 John Baldwin <jhb@FreeBSD.org>
9346
9347 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
9348 platforms.
9349
d3abe1c8
TT
93502017-08-14 Tom Tromey <tom@tromey.com>
9351
9352 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
9353 (print_binary_chars): Likewise.
9354 (BITS_IN_BYTES): Remove.
9355
d6382fff
TT
93562017-08-14 Tom Tromey <tom@tromey.com>
9357
9358 PR gdb/21675
9359 * valprint.c (LOW_ZERO): Change value to 034.
9360 (print_octal_chars): Add static_asserts for octal constants.
9361 * printcmd.c (print_scalar_formatted): Add 'd' case.
9362
f978cb06
TT
93632017-08-11 Tom Tromey <tom@tromey.com>
9364
9365 * symfile.c (add_symbol_file_command): Use std::vector.
9366
2f5404b3
TT
93672017-08-14 Tom Tromey <tom@tromey.com>
9368
9369 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
9370 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9371 std::move.
9372 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
9373
de7985c3
PA
93742017-08-11 Pedro Alves <palves@redhat.com>
9375
9376 * infrun.c (process_event_stop_test): Adjust
9377 function_name_is_marked_for_skip call.
9378 * skip.c: Include <list>.
9379 (skiplist_entry): Make it a class with private fields, and
9380 getters/setters.
9381 (skiplist_entry_chain): Delete.
9382 (skiplist_entries): New.
9383 (skiplist_entry_count): Delete.
9384 (highest_skiplist_entry_num): New.
9385 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
9386 (add_skiplist_entry): Delete.
9387 (skiplist_entry::skiplist_entry): New.
9388 (skiplist_entry::add_entry): New.
9389 (skip_file_command, skip_function): Adjust.
9390 (compile_skip_regexp): Delete.
9391 (skip_command): Don't compile regexp here. Adjust to use
9392 skiplist_entry::add_entry.
9393 (skip_info): Adjust to use range-for and getters.
9394 (skip_enable_command, skip_disable_command): Adjust to use
9395 range-for and setters.
9396 (skip_delete_command): Adjust to use std::list.
9397 (add_skiplist_entry): Delete.
9398 (skip_file_p): Delete, refactored as ...
9399 (skiplist_entry::do_skip_file_p): ... this new method.
9400 (skip_gfile_p): Delete, refactored as ...
9401 (skiplist_entry::do_gskip_file_p): ... this new method.
9402 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
9403 (skiplist_entry::skip_function_p): ... this new method.
9404 (function_name_is_marked_for_skip): Now returns bool, and takes
9405 the function sal by const reference. Adjust to use range-for and
9406 skiplist_entry methods.
9407 (_initialize_step_skip): Remove references to
9408 skiplist_entry_chain, skiplist_entry_count.
9409 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
9410 takes the function sal by const reference.
9411
be7d3cd5
YQ
94122017-08-11 Yao Qi <yao.qi@linaro.org>
9413
9414 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
9415 (dwarf2_frame_cache): Remove reset_cache_cleanup.
9416 (dwarf2_frame_cache):
9417 * frame-unwind.c (frame_unwind_try_unwinder): Catch
9418 RETURN_MASK_ALL and set *this_case to NULL.
9419 * frame-unwind.h: Update comments.
9420
1c90d9f0
YQ
94212017-08-11 Yao Qi <yao.qi@linaro.org>
9422
9423 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
9424 (dwarf2_frame_state_copy_regs): Remove.
9425 (dwarf2_frame_state_free_regs): Remove.
9426 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
9427 (dwarf2_restore_rule): Call method .alloc_regs instead of
9428 dwarf2_frame_state_alloc_regs.
9429 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
9430 constructor. Call std::move.
9431 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
9432 (dwarf2_frame_cache): Likewise.
9433
9434 [GDB_SELF_TEST]: Include selftest.h and
9435 selftest-arch.h.
9436 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
9437 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
9438 execute_cfa_program_test.
9439
9440 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
9441 copy ctor, assignment operator, move assignment.
9442 <alloc_regs>: New method.
9443 <swap>: New method.
9444 (struct dwarf2_frame_state): Delete dtor.
9445 (dwarf2_frame_state_alloc_regs): Remove declaration.
9446 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
9447 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
9448
afe37d6b
YQ
94492017-08-11 Yao Qi <yao.qi@linaro.org>
9450
9451 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
9452 (dwarf2_frame_state::dwarf2_frame_state): New.
9453 (dwarf2_frame_state::~dwarf2_frame_state): New.
9454 (dwarf2_fetch_cfa_info): Update.
9455 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
9456 rather than a pointer. Update code.
9457 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
9458 dtor.
9459 <data_align, code_align, retaddr_column>: Change them to const.
9460 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
9461 to bool.
9462
b348037f
YQ
94632017-08-11 Yao Qi <yao.qi@linaro.org>
9464
9465 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
9466 <loc.exp>: New field.
9467 * dwarf2-frame.c (execute_cfa_program): Update.
9468 (dwarf2_frame_prev_register): Update.
9469
e7c9de26
PA
94702017-08-10 Pedro Alves <palves@redhat.com>
9471
9472 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
9473
e8c6b620
JB
94742017-08-09 John Baldwin <jhb@FreeBSD.org>
9475
9476 * fbsd-nat.c (struct fbsd_fork_info): Remove.
9477 (fbsd_pending_children): Use std::list.
9478 (fbsd_remember_child): Likewise.
9479 (fbsd_is_child_pending): Likewise.
9480 (fbsd_pending_vfork_done): Use std::forward_list.
9481 (fbsd_add_vfork_done): Likewise.
9482 (fbsd_is_vfork_done_pending): Likewise.
9483 (fbsd_next_vfork_done): Likewise.
9484
e4a26669
JB
94852017-08-09 John Baldwin <jhb@FreeBSD.org>
9486
9487 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
9488 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
9489 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
9490 for `mapfilename'.
9491 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 9492 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 9493
142311d3
JB
94942017-08-09 John Baldwin <jhb@FreeBSD.org>
9495
9496 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
9497 "filestuff.h".
9498 (fbsd_find_memory_regions): Fix `mapfile' initialization.
9499
42fa2e0e
TT
95002017-08-09 Tom Tromey <tom@tromey.com>
9501
9502 * skip.c (skiplist_entry): New constructor.
9503 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
9504 (skiplist_entry::file_is_glob): Now bool.
9505 (skiplist_entry::file, skiplist_entry::function): Now
9506 std::string.
9507 (make_skip_entry): Return a unique_ptr. Use new.
9508 (free_skiplist_entry, free_skiplist_entry_cleanup)
9509 (make_free_skiplist_entry_cleanup): Remove.
9510 (skip_command, skip_disable_command, add_skiplist_entry)
9511 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
9512 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
9513 (function_name_is_marked_for_skip): Update.
9514 (skip_delete_command): Update. Use delete.
9515
cd3af38d
JW
95162017-08-09 Jiong Wang <jiong.wang@arm.com>
9517
9518 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
9519 (aarch64_linux_core_read_description): New function.
9520 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
9521
29592bde
PA
95222017-08-09 Pedro Alves <palves@redhat.com>
9523
9524 * cp-name-parser.y (cp_comp_to_string): Return a
9525 gdb::unique_xmalloc_ptr<char>.
9526 * cp-support.c (replace_typedefs_qualified_name)
9527 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
9528 (cp_canonicalize_string_full): Use op= instead of explicit
9529 convertion.
9530 (cp_class_name_from_physname, method_name_from_physname)
9531 (cp_func_name, cp_remove_params): Adjust to use
9532 gdb::unique_xmalloc_ptr<char>.
9533 * cp-support.h (cp_comp_to_string): Return a
9534 gdb::unique_xmalloc_ptr<char>.
9535 * python/py-type.c (typy_lookup_type): Adjust to use
9536 gdb::unique_xmalloc_ptr<char>.
9537
b3340438
L
95382017-08-09 H.J. Lu <hongjiu.lu@intel.com>
9539
9540 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
9541
e88e8651
YQ
95422017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
9543 Yao Qi <yao.qi@linaro.org>
9544
9545 * cp-support.c (cp_canonicalize_string_full): Use
9546 gdb::unique_xmalloc_ptr<char>.
9547 (cp_canonicalize_string): Likewise.
9548
f5a29eb0
YQ
95492017-08-09 Yao Qi <yao.qi@linaro.org>
9550
9551 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
9552 * regformats/i386/amd64-avx-avx512.dat: Remove.
9553 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
9554 * regformats/i386/amd64-avx-mpx.dat:Remove.
9555 * regformats/i386/amd64-avx.dat: Remove.
9556 * regformats/i386/amd64-mpx.dat: Remove.
9557 * regformats/i386/i386-avx-avx512.dat: Remove.
9558 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
9559 * regformats/i386/i386-avx-mpx.dat: Remove.
9560 * regformats/i386/i386-mmx.dat: Remove.
9561 * regformats/i386/i386-mpx.dat: Remove.
9562
57757c2f
YQ
95632017-08-09 Yao Qi <yao.qi@linaro.org>
9564
9565 * amd64-tdep.h (tdesc_x32): Remove the declaration.
9566 * amd64-tdep.c: Don't include features/i386/x32*.c.
9567 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
9568 functions.
9569 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
9570 and i386/x32-avx-avx512.
9571 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
9572 and i386/x32.xml.
9573 * features/i386/x32-avx-avx512.c: Removed.
9574 * features/i386/x32-avx-avx512.xml: Removed.
9575 * features/i386/x32-avx.c: Removed.
9576 * features/i386/x32-avx.xml: Removed.
9577 * features/i386/x32.c: Removed.
9578 * features/i386/x32.xml: Removed.
9579 * regformats/i386/x32-avx-avx512.dat: Removed.
9580 * regformats/i386/x32-avx.dat: Removed.
9581 * regformats/i386/x32.dat: Removed.
9582
ba7b109b
MR
95832017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9584
9585 PR breakpoints/21886
9586 * mem-break.c (default_memory_insert_breakpoint): Use
9587 `->placed_address' rather than `->reqstd_address' for the
9588 breakpoint location.
9589
e347efc3
MR
95902017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9591
9592 * arch-utils.c (default_print_insn): Remove arch/mach/endian
9593 assertions.
9594
0dba2a6c
MR
95952017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9596
9597 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
9598 a union of `tdep_info', `tdesc_data' and `id'.
9599 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
9600 rather than `info.tdep_info'.
9601 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
9602 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9603 * i386-tdep.c (i386_gdbarch_init): Likewise.
9604 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
9605 * mips-tdep.c (mips_gdbarch_init): Likewise.
9606 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9607 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9608 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
9609 `info.tdep_info'.
9610 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
9611 `info.tdep_info'.
9612 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9613 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
9614 `info.tdep_info'.
9615 * spu-tdep.c (spu_gdbarch_init): Likewise.
9616 * gdbarch.h: Regenerate.
9617
16eb6b2d
LS
96182017-08-07 Leszek Swirski <leszeks@google.com>
9619
7b005726 9620 PR symtab/20899
16eb6b2d
LS
9621 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
9622
74cbb09e
SM
96232017-08-07 Simon Marchi <simon.marchi@ericsson.com>
9624
9625 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
9626 (gdbsim_open): Rename gdb_argv args object to argv.
9627
ee0c3293
TT
96282017-08-05 Tom Tromey <tom@tromey.com>
9629
9630 * compile/compile-object-load.c (compile_object_load): Use
9631 gdb::unique_xmalloc_ptr.
9632 * cli/cli-dump.c (scan_filename): Rename from
9633 scan_filename_with_cleanup. Change return type.
9634 (scan_expression): Rename from scan_expression_with_cleanup.
9635 Change return type.
9636 (dump_memory_to_file, dump_value_to_file, restore_command):
9637 Use gdb::unique_xmalloc_ptr. Update.
9638 * cli/cli-cmds.c (find_and_open_script): Use
9639 gdb::unique_xmalloc_ptr.
9640 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
9641 * symmisc.c (maintenance_print_symbols)
9642 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
9643 * symfile.c (symfile_bfd_open, generic_load)
9644 (add_symbol_file_command, remove_symbol_file_command): Use
9645 gdb::unique_xmalloc_ptr.
9646 * source.c (openp): Use gdb::unique_xmalloc_ptr.
9647 * psymtab.c (maintenance_print_psymbols): Use
9648 gdb::unique_xmalloc_ptr.
9649 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
9650 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
9651 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
9652 (reload_shared_libraries_1): Likewise.
9653
3232fabd
TT
96542017-08-05 Tom Tromey <tom@tromey.com>
9655
9656 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
9657 (rust_op_vector, rust_set_vector): New typedefs.
9658 (current_parser): New global.
9659 (work_obstack): Change to pointer type. Update all users.
9660 (rust_ast, pstate): Remove globals.
9661 (struct rust_parser): New.
9662 (%union) <params, field_inits>: Change type.
9663 (start, tuple_expr, unit_expr, struct_expr_list, literal)
9664 (field_expr, expr_list, maybe_expr_list, type_list): Update.
9665 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
9666 (convert_params_to_types, convert_params_to_expression): Change
9667 type of "params".
9668 (ast_string): Change type of "fields".
9669 (rust_parse): Make a rust_parser. Remove cleanups.
9670 (rust_lex_tests): Make and install an auto_obstack.
9671
f02fd774
YQ
96722017-08-04 Yao Qi <yao.qi@linaro.org>
9673
9674 * configure.srv (ipa_x32_linux_regobj): New.
9675 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
9676 instead of X86_TDESC_AVX512.
9677 (initialize_low_tracepoint): Call
9678 init_registers_x32_avx_avx512_linux.
9679
91975afd
YQ
96802017-08-04 Yao Qi <yao.qi@linaro.org>
9681
9682 * utils.h (gdb_argv): Add namespace std for nullptr_t.
9683
2331fa3a
RK
96842017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
9685
9686 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
9687
744e4fe1
TT
96882017-08-03 Tom Tromey <tom@tromey.com>
9689
9690 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
9691 Remove.
9692 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
9693
1c034b67
TT
96942017-08-03 Tom Tromey <tom@tromey.com>
9695
9696 * python/py-param.c (compute_enum_values): Use gdb_argv.
9697
773a1edc
TT
96982017-08-03 Tom Tromey <tom@tromey.com>
9699
9700 * utils.h (struct gdb_argv_deleter): New.
9701 (gdb_argv): New class.
9702 * utils.c (gdb_argv::reset): New method.
9703 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
9704 * tracefile.c (tsave_command): Use gdb_argv.
9705 * top.c (new_ui_command): Use gdb_argv.
9706 * symmisc.c (maintenance_print_symbols)
9707 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
9708 * symfile.c (symbol_file_command, generic_load)
9709 (remove_symbol_file_command): Use gdb_argv.
9710 * stack.c (backtrace_command): Use gdb_argv.
9711 * source.c (add_path, show_substitute_path_command)
9712 (unset_substitute_path_command, set_substitute_path_command):
9713 Use gdb_argv.
9714 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
9715 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
9716 * remote.c (extended_remote_run, remote_put_command)
9717 (remote_get_command, remote_delete_command): Use gdb_argv.
9718 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
9719 (gdbsim_open): Use gdb_argv.
9720 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
9721 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
9722 * procfs.c (procfs_info_proc): Use gdb_argv.
9723 * interps.c (interpreter_exec_cmd): Use gdb_argv.
9724 * infrun.c (handle_command): Use gdb_argv.
9725 * inferior.c (add_inferior_command, clone_inferior_command):
9726 Use gdb_argv.
9727 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
9728 * exec.c (exec_file_command): Use gdb_argv.
9729 * cli/cli-cmds.c (alias_command): Use gdb_argv.
9730 * compile/compile.c (build_argc_argv): Use gdb_argv.
9731
0d50bde3
TT
97322017-08-03 Tom Tromey <tom@tromey.com>
9733
9734 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
9735
7f968c89
TT
97362017-08-03 Tom Tromey <tom@tromey.com>
9737
9738 * python/python.c (compute_python_string): Return std::string.
9739 (gdbpy_eval_from_control_command): Update.
9740 (do_start_initialization): Use std::string.
9741 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
9742 xstrprintf.
9743 * python/py-breakpoint.c (local_setattro): Use string_printf, not
9744 xstrprintf.
9745
3c9ebddd
TT
97462017-08-03 Tom Tromey <tom@tromey.com>
9747
9748 * top.h (do_restore_instream_cleanup): Remove.
9749 * top.c (do_restore_instream_cleanup): Remove.
9750 (read_command_file): Use scoped_restore.
9751 * cli/cli-script.c (execute_user_command): Use scoped_restore.
9752
b51b225e
TT
97532017-08-03 Tom Tromey <tom@tromey.com>
9754
9755 * cli/cli-script.c (execute_user_command)
9756 (execute_control_command): Use scoped_restore.
9757
ac991630
TT
97582017-08-03 Tom Tromey <tom@tromey.com>
9759
9760 * cli/cli-script.c (do_restore_user_call_depth): Remove.
9761 (execute_user_command): Remove user_call_depth; use
9762 user_args_stack's size instead.
9763
898e0c8e
TT
97642017-08-03 Tom Tromey <tom@tromey.com>
9765
9766 * top.h (in_user_command): Remove.
9767 * top.c (in_user_command): Remove.
9768 * cli/cli-script.c (do_restore_user_call_depth)
9769 (execute_user_command): Update.
9770
26fcd5d7
TT
97712017-08-03 Tom Tromey <tom@tromey.com>
9772
9773 * valops.c (search_struct_method): Use gdb::byte_vector.
9774 * valarith.c (value_concat): Use std::vector.
9775 * target.c (memory_xfer_partial): Use gdb::byte_vector.
9776 (simple_search_memory): Likewise.
9777 * printcmd.c (find_string_backward): Use gdb::byte_vector.
9778 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
9779 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
9780 * elfread.c (elf_rel_plt_read): Use std::string.
9781 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
9782 * cli/cli-dump.c (restore_section_callback): Use
9783 gdb::byte_vector.
9784
7c218e6c
TT
97852017-08-03 Tom Tromey <tom@tromey.com>
9786
9787 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
9788
31b68d4a
TT
97892017-08-03 Tom Tromey <tom@tromey.com>
9790
9791 * tui/tui-regs.c (tui_restore_gdbout): Remove.
9792 (tui_register_format): Use scoped_restore.
9793
2ec845e7
TT
97942017-08-03 Tom Tromey <tom@tromey.com>
9795
9796 * reverse.c (exec_direction_default): Remove.
9797 (exec_reverse_once): Use scoped_restore.
9798 * remote.c (restore_remote_timeout): Remove.
9799 (remote_flash_erase, remote_flash_write, remote_flash_done)
9800 (readchar, remote_serial_write): Use scoped_restore.
9801 * cli/cli-script.c (struct source_cleanup_lines_args)
9802 (source_cleanup_lines): Remove.
9803 (script_from_file): Use scoped_restore.
9804 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
9805 (source_command): Use scoped_restore.
9806
b3bc8453
TT
98072017-08-03 Tom Tromey <tom@tromey.com>
9808
9809 * utils.h (make_cleanup_free_so): Remove.
9810 * utils.c (do_free_so, make_cleanup_free_so): Remove.
9811 * solist.h (struct so_deleter): New.
9812 (so_list_up): New typedef.
9813 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
9814
e3ad2841
TT
98152017-08-03 Tom Tromey <tom@tromey.com>
9816
9817 * utils.h (make_cleanup_restore_current_language): Remove.
9818 * utils.c (do_restore_current_language)
9819 (make_cleanup_restore_current_language): Remove.
9820 * parse.c (parse_exp_in_context_1)
9821 (parse_expression_with_language): Use
9822 scoped_restore_current_language.
9823 * mi/mi-main.c (mi_cmd_execute): Use
9824 scoped_restore_current_language.
9825 * language.h (scoped_restore_current_language): New class.
9826
b80cf838
TT
98272017-08-03 Tom Tromey <tom@tromey.com>
9828
9829 * compile/compile.c (cleanup_unlink_file): Remove.
9830 (compile_to_object): Use gdb::unlinker.
9831 (eval_compile_command): Likewise.
9832
fad0444a
TT
98332017-08-03 Tom Tromey <tom@tromey.com>
9834
9835 * utils.h (make_cleanup_fclose): Remove.
9836 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
9837
6e7bc05c
TT
98382017-08-03 Tom Tromey <tom@tromey.com>
9839
9840 * top.c (open_terminal_stream): Return gdb_file_up.
9841 (new_ui_command): Update.
9842
4a45905b
TT
98432017-08-03 Tom Tromey <tom@tromey.com>
9844
9845 * source.c (print_source_lines_base, forward_search_command)
9846 (reverse_search_command): Use gdb_file_up.
9847
7cd06d6e
TT
98482017-08-03 Tom Tromey <tom@tromey.com>
9849
9850 * fbsd-nat.c (fbsd_find_memory_regions): Update.
9851
ed166945
TT
98522017-08-03 Tom Tromey <tom@tromey.com>
9853
9854 * cli/cli-cmds.c (find_and_open_script): Change return type.
9855 Remove "streamp" and "full_path" parameters.
9856 (source_script_with_search): Update.
9857 * auto-load.c (source_script_file): Update.
9858 * cli/cli-cmds.h (find_and_open_script): Change type.
9859 (open_script): New struct.
9860
d419f42d
TT
98612017-08-03 Tom Tromey <tom@tromey.com>
9862
9863 * xml-support.c (xml_fetch_content_from_file): Update.
9864 * ui-file.c (stdio_file::open): Update.
9865 * tracefile-tfile.c (tfile_start): Update.
9866 * remote.c (remote_file_put, remote_file_get): Update.
9867 * nat/linux-procfs.c (linux_proc_get_int)
9868 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
9869 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
9870 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
9871 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
9872 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
9873 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
9874 * linux-nat.c (linux_proc_pending_signals): Update.
9875 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
9876 (file_closer): Remove.
9877 * compile/compile.c (compile_to_object): Update.
9878 * common/filestuff.h (struct gdb_file_deleter): New.
9879 (gdb_file_up): New typedef.
9880 (gdb_fopen_cloexec): Change return type.
9881 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
9882 * cli/cli-dump.c (fopen_with_cleanup): Remove.
9883 (dump_binary_file, restore_binary_file): Update.
9884 * auto-load.c (auto_load_objfile_script_1): Update.
9885
4a2b031d
TT
98862017-08-03 Tom Tromey <tom@tromey.com>
9887
9888 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
9889 (info_static_tracepoint_markers_command): Likewise.
9890 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
9891 * skip.c (skip_info): Use ui_out_emit_table.
9892 * progspace.c (print_program_space): Use ui_out_emit_table.
9893 * osdata.c (info_osdata): Use ui_out_emit_table.
9894 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
9895 ui_out_emit_table.
9896 * linux-thread-db.c (info_auto_load_libthread_db): Use
9897 ui_out_emit_table.
9898 * inferior.c (print_inferior): Use ui_out_emit_table.
9899 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
9900 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
9901 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
9902 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
9903 * ui-out.h (class ui_out_emit_table): New.
9904
a4f320fd
MR
99052017-08-02 Maciej W. Rozycki <macro@imgtec.com>
9906
9907 * mips-tdep.c (mips_fpu_type_str): New function.
9908 (mips_dump_tdep): Call it.
9909
a2f1f308
MR
99102017-08-01 Maciej W. Rozycki <macro@imgtec.com>
9911
9912 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
9913 `->mips_fpu_type'.
9914
7e5ed83b
XR
99152017-07-31 Xavier Roirand <roirand@adacore.com>
9916
9917 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
9918
4c9dc811
XR
99192017-07-27 Xavier Roirand <roirand@adacore.com>
9920
9921 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
9922
27d41eac
YQ
99232017-07-26 Yao Qi <yao.qi@linaro.org>
9924
9925 * cli/cli-cmds.c (maintenancechecklist): New variable.
9926 * gdbcmd.h (maintenancechecklist): Declare it.
9927 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
9928 Call i386_linux_read_description with different masks.
9929 * maint.c (maintenance_check_command): New function.
9930 (_initialize_maint_cmds): Call add_prefix_cmd.
9931 * target-descriptions.c (tdesc_reg): override operator != and ==.
9932 (tdesc_type): Likewise.
9933 (tdesc_feature): Likewise.
9934 (target_desc): Likewise.
9935 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
9936 (maintenance_check_xml_descriptions): New function.
9937 (_initialize_target_descriptions) Add command "xml-descriptions".
9938 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
9939
ea03d0d3
YQ
99402017-07-26 Yao Qi <yao.qi@linaro.org>
9941
9942 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
9943 Include features/i386/32bit-*.c.
9944 (i386_linux_read_description): Generate target description if it
9945 doesn't exist.
9946 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
9947 functions.
9948 * features/i386/32bit-linux.c: Re-generated.
9949 * features/i386/32bit-sse.c: Likewise.
9950 * target-descriptions.c (print_c_feature::visit): Print code to
9951 set register number if needed.
9952 (print_c_feature) <m_next_regnum>: New field.
9953
25aa13e5
YQ
99542017-07-26 Yao Qi <yao.qi@linaro.org>
9955
9956 * features/Makefile (CFILES): Rename with TDESC_CFILES.
9957 (FEATURE_XMLFILES): New.
9958 (FEATURE_CFILES): New.
9959 New rules.
9960 (clean-cfiles): Remove generated c files.
9961 * features/i386/32bit-avx.c: Generated.
9962 * features/i386/32bit-avx512.c: Generated.
9963 * features/i386/32bit-core.c: Generated.
9964 * features/i386/32bit-linux.c: Generated.
9965 * features/i386/32bit-mpx.c: Generated.
9966 * features/i386/32bit-pkeys.c: Generated.
9967 * features/i386/32bit-sse.c: Generated.
9968 * target-descriptions.c: Include algorithm.
9969 (tdesc_element_visitor): Add method visit_end.
9970 (print_c_tdesc): Implement visit_end.
9971 (print_c_tdesc:: m_filename_after_features): Move it to
9972 protected.
9973 (print_c_feature): New class.
9974 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
9975 name starts with "i386/32bit-".
9976
6eb1e6a8
YQ
99772017-07-26 Yao Qi <yao.qi@linaro.org>
9978
9979 * target-descriptions.c (tdesc_element_visitor): New class.
9980 (tdesc_element): New class.
9981 (tdesc_reg): Inherit from tdesc_element.
9982 (tdesc_reg::accept): New function.
9983 (tdesc_type): Inherit from tdesc_element.
9984 (tdesc_type::accept): New function.
9985 (tdesc_feature): Inherit from tdesc_element.
9986 (tdesc_feature::accept): New function.
9987 (target_desc): Inherit from tdesc_element.
9988 (target_desc::target_desc): New.
9989 (target_desc::~target_desc): New.
9990 (target_desc::accept): New.
9991 (allocate_target_description): Use new.
9992 (free_target_description): Use delete.
9993 (print_c_tdesc): New class.
9994 (maint_print_c_tdesc_cmd): Adjust.
9995
9996 * features/aarch64.c: Re-generated.
9997 * features/arc-arcompact.c: Re-generated.
9998 * features/arc-v2.c: Re-generated.
9999 * features/arm/arm-with-iwmmxt.c: Re-generated.
10000 * features/arm/arm-with-m.c: Re-generated.
10001 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
10002 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
10003 * features/arm/arm-with-neon.c: Re-generated.
10004 * features/arm/arm-with-vfpv2.c: Re-generated.
10005 * features/arm/arm-with-vfpv3.c: Re-generated.
10006 * features/i386/amd64-avx-avx512.c: Re-generated.
10007 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10008 * features/i386/amd64-avx.c: Re-generated.
10009 * features/i386/amd64-avx-linux.c: Re-generated.
10010 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
10011 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10012 * features/i386/amd64-avx-mpx.c: Re-generated.
10013 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
10014 * features/i386/amd64.c: Re-generated.
10015 * features/i386/amd64-linux.c: Re-generated.
10016 * features/i386/amd64-mpx.c: Re-generated.
10017 * features/i386/amd64-mpx-linux.c: Re-generated.
10018 * features/i386/i386-avx-avx512.c: Re-generated.
10019 * features/i386/i386-avx-avx512-linux.c: Re-generated.
10020 * features/i386/i386-avx.c: Re-generated.
10021 * features/i386/i386-avx-linux.c: Re-generated.
10022 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
10023 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
10024 * features/i386/i386-avx-mpx.c: Re-generated.
10025 * features/i386/i386-avx-mpx-linux.c: Re-generated.
10026 * features/i386/i386.c: Re-generated.
10027 * features/i386/i386-linux.c: Re-generated.
10028 * features/i386/i386-mmx.c: Re-generated.
10029 * features/i386/i386-mmx-linux.c: Re-generated.
10030 * features/i386/i386-mpx.c: Re-generated.
10031 * features/i386/i386-mpx-linux.c: Re-generated.
10032 * features/i386/x32-avx-avx512.c: Re-generated.
10033 * features/i386/x32-avx-avx512-linux.c: Re-generated.
10034 * features/i386/x32-avx.c: Re-generated.
10035 * features/i386/x32-avx-linux.c: Re-generated.
10036 * features/i386/x32.c: Re-generated.
10037 * features/i386/x32-linux.c: Re-generated.
10038 * features/microblaze.c: Re-generated.
10039 * features/microblaze-with-stack-protect.c: Re-generated.
10040 * features/mips64-dsp-linux.c: Re-generated.
10041 * features/mips64-linux.c: Re-generated.
10042 * features/mips-dsp-linux.c: Re-generated.
10043 * features/mips-linux.c: Re-generated.
10044 * features/nds32.c: Re-generated.
10045 * features/nios2.c: Re-generated.
10046 * features/nios2-linux.c: Re-generated.
10047 * features/rs6000/powerpc-32.c: Re-generated.
10048 * features/rs6000/powerpc-32l.c: Re-generated.
10049 * features/rs6000/powerpc-403.c: Re-generated.
10050 * features/rs6000/powerpc-403gc.c : Re-generated.
10051 * features/rs6000/powerpc-405.c: Re-generated.
10052 * features/rs6000/powerpc-505.c: Re-generated.
10053 * features/rs6000/powerpc-601.c: Re-generated.
10054 * features/rs6000/powerpc-602.c: Re-generated.
10055 * features/rs6000/powerpc-603.c: Re-generated.
10056 * features/rs6000/powerpc-604.c: Re-generated.
10057 * features/rs6000/powerpc-64.c: Re-generated.
10058 * features/rs6000/powerpc-64l.c: Re-generated.
10059 * features/rs6000/powerpc-7400.c: Re-generated.
10060 * features/rs6000/powerpc-750.c: Re-generated.
10061 * features/rs6000/powerpc-860.c: Re-generated.
10062 * features/rs6000/powerpc-altivec32.c: Re-generated.
10063 * features/rs6000/powerpc-altivec32l.c: Re-generated.
10064 * features/rs6000/powerpc-altivec64.c: Re-generated.
10065 * features/rs6000/powerpc-altivec64l.c: Re-generated.
10066 * features/rs6000/powerpc-cell32l.c: Re-generated.
10067 * features/rs6000/powerpc-cell64l.c: Re-generated.
10068 * features/rs6000/powerpc-e500.c: Re-generated.
10069 * features/rs6000/powerpc-e500l.c: Re-generated.
10070 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
10071 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
10072 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
10073 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
10074 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
10075 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
10076 * features/rs6000/powerpc-vsx32.c: Re-generated.
10077 * features/rs6000/powerpc-vsx32l.c: Re-generated.
10078 * features/rs6000/powerpc-vsx64.c: Re-generated.
10079 * features/rs6000/powerpc-vsx64l.c: Re-generated.
10080 * features/rs6000/rs6000.c: Re-generated.
10081 * features/s390-linux32.c: Re-generated.
10082 * features/s390-linux32v1.c: Re-generated.
10083 * features/s390-linux32v2.c: Re-generated.
10084 * features/s390-linux64.c: Re-generated.
10085 * features/s390-linux64v1.c: Re-generated.
10086 * features/s390-linux64v2.c: Re-generated.
10087 * features/s390-te-linux64.c: Re-generated.
10088 * features/s390-tevx-linux64.c: Re-generated.
10089 * features/s390-vx-linux64.c: Re-generated.
10090 * features/s390x-linux64.c: Re-generated.
10091 * features/s390x-linux64v1.c: Re-generated.
10092 * features/s390x-linux64v2.c: Re-generated.
10093 * features/s390x-te-linux64.c: Re-generated.
10094 * features/s390x-tevx-linux64.c: Re-generated.
10095 * features/s390x-vx-linux64.c: Re-generated.
10096 * features/sparc/sparc32-solaris.c: Re-generated.
10097 * features/sparc/sparc64-solaris.c: Re-generated.
10098 * features/tic6x-c62x.c: Re-generated.
10099 * features/tic6x-c62x-linux.c: Re-generated.
10100 * features/tic6x-c64x.c: Re-generated.
10101 * features/tic6x-c64x-linux.c: Re-generated.
10102 * features/tic6x-c64xp.c: Re-generated.
10103 * features/tic6x-c64xp-linux.c: Re-generated.
10104
35b4818d
YQ
101052017-07-26 Yao Qi <yao.qi@linaro.org>
10106
10107 * i386-linux-tdep.c (i386_linux_read_description): New function.
10108 (i386_linux_core_read_description): Call
10109 i386_linux_read_description.
10110 * i386-linux-tdep.h (i386_linux_read_description): Declare.
10111 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
10112 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
10113 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
10114 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
10115 * x86-linux-nat.c (x86_linux_read_description): Call
10116 i386_linux_read_description.
10117
8e2141c6
YQ
101182017-07-26 Yao Qi <yao.qi@linaro.org>
10119
10120 * NEWS: Mention it.
10121 * features/Makefile (%.c: %.xml): Pass the xml file name to
10122 command "maint print c-tdesc".
10123 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
10124 name from 'arg'.
10125
b468ff4c
YQ
101262017-07-26 Yao Qi <yao.qi@linaro.org>
10127
10128 * target-descriptions.c (target_desc): Add ctor and dtor. Do
10129 in-class initialization.
10130 (tdesc_create_feature): Call new instead of XCNEW.
10131 (free_target_description): Ue delete.
10132
b9c0e1b4
JB
101332017-07-25 John Baldwin <jhb@FreeBSD.org>
10134
10135 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
10136
a04b5337
YQ
101372017-07-25 Yao Qi <yao.qi@linaro.org>
10138
10139 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
10140 constant.
10141 (amd64_x32_init_abi): Likewise.
10142 * amd64-tdep.h (amd64_init_abi): Update declaration.
10143 (amd64_x32_init_abi): Likewise.
10144
02ad7fc2
YQ
101452017-07-25 Yao Qi <yao.qi@linaro.org>
10146
10147 PR tdep/21717
10148 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
10149 condition for FPSCR.
10150 (arm_linux_store_inferior_registers): Likewise.
10151
b6f48cb0
TT
101522017-07-22 Tom Tromey <tom@tromey.com>
10153
10154 * break-catch-syscall.c (struct catch_syscall_inferior_data)
10155 <syscalls_counts>: Now a std::vector.
10156 (get_catch_syscall_inferior_data): Use "new".
10157 (catch_syscall_inferior_data_cleanup): Use "delete".
10158 (insert_catch_syscall, remove_catch_syscall)
10159 (clear_syscall_counts): Update.
10160
e12c9b7a
TT
101612017-07-22 Tom Tromey <tom@tromey.com>
10162
10163 * break-catch-syscall.c (syscall_catchpoint)
10164 <syscalls_to_be_caught>: Now a std::vector<int>
10165 (~syscall_catchpoint): Remove.
10166 (insert_catch_syscall, remove_catch_syscall)
10167 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
10168 (print_mention_catch_syscall, print_recreate_catch_syscall):
10169 Update.
10170 (create_syscall_event_catchpoint): Change type of "filter"
10171 parameter.
10172 (catch_syscall_split_args): Return a std::vector.
10173 (catch_syscall_command_1, catching_syscall_number_1): Update.
10174
4fa8aeac
TT
101752017-07-22 Tom Tromey <tom@tromey.com>
10176
10177 * break-catch-throw.c (struct exception_catchpoint)
10178 <exception_rx>: Now a std::string.
10179 (~exception_catchpoint): Remove.
10180 (print_one_detail_exception_catchpoint): Update.
10181 (handle_gnu_v3_exceptions): Change type of except_rx.
10182 (extract_exception_regexp): Return a std::string.
10183 (catch_exception_command_1): Update.
10184
f746a154
TT
101852017-07-22 Tom Tromey <tom@tromey.com>
10186
10187 * break-catch-sig.c (gdb_signal_type): Remove typedef.
10188 (struct signal_catchpoint) <signals_to_be_caught>: Now a
10189 std::vector.
10190 <catch_all>: Now a bool.
10191 (~signal_catchpoint): Remove.
10192 (signal_catchpoint_insert_location)
10193 (signal_catchpoint_remove_location)
10194 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
10195 (signal_catchpoint_print_mention)
10196 (signal_catchpoint_print_recreate)
10197 (signal_catchpoint_explains_signal): Update.
10198 (create_signal_catchpoint): Change type of "filter" and
10199 "catch_all".
10200 (catch_signal_split_args): Return a std::vector. Change type of
10201 "catch_all".
10202 (catch_signal_command): Update.
10203
47e77640
PA
102042017-07-20 Pedro Alves <palves@redhat.com>
10205
10206 * ada-lang.c (ada_language_defn): Make extern.
10207 (_initialize_ada_language): Remove add_language call.
10208 * c-lang.c (c_language_defn, cplus_language_defn)
10209 (asm_language_defn, minimal_language_defn): Make extern.
10210 (_initialize_c_language): Delete.
10211 * completer.c (compare_cstrings): Delete, moved to utils.h.
10212 * d-lang.c (d_language_defn): Make extern.
10213 (_initialize_d_language): Remove add_language calls.
10214 * defs.h (enum language): Add comment.
10215 * f-lang.c (f_language_defn): Make extern.
10216 (_initialize_f_language): Remove add_language call.
10217 * go-lang.c (go_language_defn): Make extern.
10218 (_initialize_go_language): Remove add_language call.
10219 * language.c: Include <algorithm>.
10220 (languages): Redefine as const array.
10221 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
10222 (set_language_command): Handle "local". Use for-range loop.
10223 (set_language): Remove loop.
10224 (language_enum): Rewrite.
10225 (language_def, language_str): Remove loops.
10226 (add_language): Delete.
10227 (add_set_language_command): New, based on add_languages.
10228 (skip_language_trampoline): Adjust.
10229 (local_language_defn): Delete.
10230 (language_gdbarch_post_init): Adjust.
10231 (_initialize_language): Remove add_language calls. Call
10232 add_set_language_command.
10233 * language.h (add_language): Delete.
10234 (auto_language_defn)
10235 (unknown_language_defn, minimal_language_defn, ada_language_defn)
10236 (asm_language_defn, c_language_defn, cplus_language_defn)
10237 (d_language_defn, f_language_defn, go_language_defn)
10238 (m2_language_defn, objc_language_defn, opencl_language_defn)
10239 (pascal_language_defn, rust_language_defn): Declare.
10240 * m2-lang.c (m2_language_defn): Make extern.
10241 (_initialize_m2_language): Remove add_language call.
10242 * objc-lang.c (objc_language_defn): Make extern.
10243 (_initialize_objc_language): Remove add_language call.
10244 * opencl-lang.c (opencl_language_defn): Make extern.
10245 (_initialize_opencl_language): Remove add_language call.
10246 * p-lang.c (pascal_language_defn): Make extern.
10247 (_initialize_pascal_language): Delete.
10248 * rust-lang.c (rust_language_defn): Make extern.
10249 (_initialize_rust_language): Delete.
10250 * utils.h (compare_cstrings): New static inline function.
10251
edb0c9cb
PA
102522017-07-20 Pedro Alves <palves@redhat.com>
10253
10254 * ada-lang.c (ada_to_fixed_type_1): Adjust.
10255 (get_var_value): Constify parameters.
10256 (get_int_var_value): Change prototype.
10257 (to_fixed_range_type): Adjust.
10258 * ada-lang.h (get_int_var_value): Change prototype.
10259
a778f165
PA
102602017-07-20 Pedro Alves <palves@redhat.com>
10261
10262 * dwarf2read.c (dw2_lookup_symbol): Use
10263 SYMBOL_MATCHES_SEARCH_NAME.
10264 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
10265
42edd901
PA
102662017-07-20 Pedro Alves <palves@redhat.com>
10267
10268 * block.c (block_iter_name_step, block_iter_name_first)
10269 (block_iter_name_next): Delete.
10270 (block_lookup_symbol_primary): Adjust to use
10271 dict_iter_match_first/dict_iter_match_next.
10272 * block.h (block_iter_name_first, block_iter_name_next): Delete
10273 declarations.
10274 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
10275 dict_iter_match_first/dict_iter_match_next.
10276
cf325299
PA
102772017-07-20 Pedro Alves <palves@redhat.com>
10278
10279 * cp-support.c (cp_find_first_component_aux): Add missing case for
10280 end of string.
10281
c5ed0576
DB
102822017-07-18 David Blaikie <dblaikie@gmail.com>
10283
10284 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
10285 of dwo_cu's dwo_file.
10286
27841e76
YQ
102872017-07-18 Yao Qi <yao.qi@linaro.org>
10288
10289 * remote.c (store_registers_using_G): Remove one line comment.
10290
cfb7e58b
YQ
102912017-07-18 Yao Qi <yao.qi@linaro.org>
10292
10293 * regcache.c (regcache_cpy): Simplify it.
10294 (regcache::cpy_no_passthrough): Remove it.
10295 * regcache.h (cpy_no_passthrough): Remove it.
10296 (regcache_dup, regcache_cpy): Update comments.
10297
386535dd
PA
102982017-07-18 Pedro Alves <palves@redhat.com>
10299
10300 * remote-sim.c (sim_command_completer): Adjust to work with a
10301 completion_tracker instead of a VEC.
10302
c45ec17c
PA
103032017-07-17 Pedro Alves <palves@redhat.com>
10304
10305 * completer.c (complete_source_filenames): New function.
10306 (complete_address_and_linespec_locations): New function.
10307 (location_completer): Use complete_address_and_linespec_locations.
10308 (completion_tracker::build_completion_result): Honor the tracker's
10309 request to suppress append.
10310 * completer.h (completion_tracker::suppress_append_ws)
10311 (completion_tracker::set_suppress_append_ws): New methods.
10312 (completion_tracker::m_suppress_append_ws): New field.
10313 (complete_source_filenames): New declaration.
10314 * linespec.c (linespec_complete_what): New.
10315 (struct ls_parser) <complete_what, completion_word,
10316 completion_quote_char, completion_quote_end, completion_tracker>:
10317 New fields.
10318 (string_find_incomplete_keyword_at_end): New.
10319 (linespec_lexer_lex_string): Record quote char. If in completion
10320 mode, don't throw.
10321 (linespec_lexer_consume_token): Advance the completion word point.
10322 (linespec_lexer_peek_token): Save/restore completion info.
10323 (save_stream_and_consume_token): New.
10324 (set_completion_after_number): New.
10325 (linespec_parse_basic): Set what to complete next depending on
10326 token. Handle function and label completions specially.
10327 (parse_linespec): Disable objc shortcut in completion mode. Set
10328 what to complete next depending on token type. Skip keyword if in
10329 completion mode.
10330 (complete_linespec_component, linespec_complete): New.
10331 * linespec.h (linespec_complete): Declare.
10332
be966d42
PA
103332017-07-17 Pedro Alves <palves@redhat.com>
10334
10335 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
10336 Handle 'operator<' / 'operator<<'.
10337
a2459270
PA
103382017-07-17 Pedro Alves <palves@redhat.com>
10339
10340 * completer.c (collect_explicit_location_matches): Handle
10341 MATCH_LABEL.
10342 (convert_explicit_location_to_linespec): New, factored out from
10343 ...
10344 (convert_explicit_location_to_sals): ... this.
10345 (complete_label): New.
10346 (linespec_complete_label, find_label_symbols_in_block): New.
10347 (find_label_symbols): Add completion_mode parameter and adjust to
10348 call find_label_symbols_in_block.
10349 * linespec.h (linespec_complete_label): Declare.
10350
c6756f62
PA
103512017-07-17 Pedro Alves <palves@redhat.com>
10352
10353 * ada-lang.c (ada_collect_symbol_completion_matches): Add
10354 complete_symbol_mode parameter.
10355 * cli/cli-cmds.c (complete_command): Get the completion result out
10356 of the handle_brkchars tracker if used a custom word point.
10357 * completer.c: Include "linespec.h".
10358 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
10359 (advance_to_expression_complete_word_point): New.
10360 (completion_tracker::completes_to_completion_word): New.
10361 (complete_files_symbols): Pass down
10362 complete_symbol_mode::EXPRESSION.
10363 (explicit_options, probe_options): New.
10364 (collect_explicit_location_matches): Complete on the
10365 explictit_loc->foo instead of word. Use
10366 linespec_complete_function. Handle MATCH_LINE. Handle offering
10367 keyword and options completions.
10368 (backup_text_ptr): Delete.
10369 (skip_keyword): New.
10370 (complete_explicit_location): Remove 'word' parameter. Add
10371 language, quoted_arg_start and quoted_arg_end parameters.
10372 Rewrite, parsing left to right.
10373 (location_completer): Rewrite.
10374 (location_completer_handle_brkchars): New function.
10375 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
10376 (enum complete_line_internal_reason): Adjust comments.
10377 (completion_tracker::discard_completions): New.
10378 (completer_handle_brkchars_func_for_completer): Handle
10379 location_completer.
10380 (gdb_custom_word_point_brkchars)
10381 (gdb_org_rl_basic_quote_characters): New.
10382 (gdb_completion_word_break_characters_throw)
10383 (completion_find_completion_word): Handle trackers that use a
10384 custom word point.
10385 (completion_tracker::advance_custom_word_point_by): New.
10386 (completion_tracker::build_completion_result): Don't rely on
10387 readline appending the quote char.
10388 (gdb_rl_attempted_completion_function_throw): Handle trackers that
10389 use a custom word point.
10390 (gdb_rl_attempted_completion_function): Restore
10391 rl_basic_quote_characters.
10392 * completer.h (class completion_tracker): Extend intro comment.
10393 (completion_tracker::set_quote_char)
10394 (completion_tracker::quote_char)
10395 (completion_tracker::set_use_custom_word_point)
10396 (completion_tracker::use_custom_word_point)
10397 (completion_tracker::custom_word_point)
10398 (completion_tracker::set_custom_word_point)
10399 (completion_tracker::advance_custom_word_point_by)
10400 (completion_tracker::completes_to_completion_word)
10401 (completion_tracker::discard_completions): New methods.
10402 (completion_tracker::m_quote_char)
10403 (completion_tracker::m_use_custom_word_point)
10404 (completion_tracker::m_custom_word_point): New fields.
10405 (advance_to_expression_complete_word_point): Declare.
10406 * f-lang.c (f_collect_symbol_completion_matches): Add
10407 complete_symbol_mode parameter.
10408 * language.h (struct language_defn)
10409 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
10410 parameter.
10411 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
10412 (linespec_complete_function): New function.
10413 (linespec_lexer_lex_keyword): Adjust.
10414 * linespec.h (linespec_keywords, linespec_complete_function): New
10415 declarations.
10416 * location.c (find_end_quote): New function.
10417 (explicit_location_lex_one): Add explicit_completion_info
10418 parameter. Save quoting info. Don't throw if being called for
10419 completion. Don't handle Ada operators here.
10420 (is_cp_operator, skip_op_false_positives, first_of)
10421 (explicit_location_lex_one_function): New function.
10422 (string_to_explicit_location): Replace 'dont_throw' parameter with
10423 an explicit_completion_info pointer parameter. Handle it. Don't
10424 use explicit_location_lex_one to lex function names. Use
10425 explicit_location_lex_one_function instead.
10426 * location.h (struct explicit_completion_info): New.
10427 (string_to_explicit_location): Replace 'dont_throw' parameter with
10428 an explicit_completion_info pointer parameter.
10429 * symtab.c (default_collect_symbol_completion_matches_break_on):
10430 Add complete_symbol_mode parameter. Handle LINESPEC mode.
10431 (default_collect_symbol_completion_matches)
10432 (collect_symbol_completion_matches): Add complete_symbol_mode
10433 parameter.
10434 (collect_symbol_completion_matches_type): Pass down
10435 complete_symbol_mode::EXPRESSION.
10436 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10437 parameter. Handle LINESPEC mode.
10438 * symtab.h (complete_symbol_mode): New.
10439 (default_collect_symbol_completion_matches_break_on)
10440 (default_collect_symbol_completion_matches)
10441 (collect_symbol_completion_matches)
10442 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10443 parameter.
10444
1d550c82
PA
104452017-07-17 Pedro Alves <palves@redhat.com>
10446
10447 * utils.c (enum class strncmp_iw_mode): New.
10448 (strcmp_iw): Rename to ...
10449 (strncmp_iw_with_mode): ... this. Add string2_len and mode
10450 parameters. Handle them.
10451 (strncmp_iw): New.
10452 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
10453 * utils.h (strncmp_iw): Declare.
10454 (strcmp_iw): Move describing comments here.
10455
8090b426
PA
104562017-07-17 Pedro Alves <palves@redhat.com>
10457
10458 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
10459 CP_OPERATOR_STR.
10460 * c-typeprint.c (is_type_conversion_operator): Use
10461 CP_OPERATOR_STR.
10462 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
10463 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
10464 CP_OPERATOR_LEN.
10465 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
10466 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
10467 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
10468 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
10469 CP_OPERATOR_STR.
10470 * location.c: Include "cp-support.h".
10471 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
10472 CP_OPERATOR_STR.
10473 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
10474 CP_OPERATOR_LEN.
10475
6a2c1b87
PA
104762017-07-17 Pedro Alves <palves@redhat.com>
10477
10478 * cli/cli-cmds.c (complete_command): Use a completion tracker
10479 along with completion_find_completion_word for handle_brkchars
10480 phase.
10481 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
10482 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
10483 (struct gdb_rl_completion_word_info): New.
10484 (gdb_rl_find_completion_word): New.
10485 (completion_find_completion_word): New.
10486 * completer.h (completion_find_completion_word): Declare.
10487
eb3ff9a5
PA
104882017-07-17 Pedro Alves <palves@redhat.com>
10489
10490 * ada-lang.c (symbol_completion_match): Adjust comments.
10491 (symbol_completion_add): Replace vector parameter with
10492 completion_tracker parameter. Use it.
10493 (ada_make_symbol_completion_list): Rename to...
10494 (ada_collect_symbol_completion_matches): ... this. Add
10495 completion_tracker parameter and use it.
10496 (ada_language_defn): Adjust.
10497 * break-catch-syscall.c (catch_syscall_completer): Adjust
10498 prototype and work with completion_tracker instead of VEC.
10499 * breakpoint.c (condition_completer): Adjust prototype and work
10500 with completion_tracker instead of VEC.
10501 * c-lang.c (c_language_defn, cplus_language_defn)
10502 (asm_language_defn, minimal_language_defn): Adjust to renames.
10503 * cli/cli-cmds.c (complete_command): Rework using
10504 completion_tracker. Catch exceptions when completing.
10505 * cli/cli-decode.c (integer_unlimited_completer)
10506 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
10507 with completion_tracker instead of VEC.
10508 * command.h (struct completion_tracker): Forward declare.
10509 (completer_ftype, completer_handle_brkchars_ftype): Change
10510 types.
10511 (complete_on_cmdlist, complete_on_enum): Adjust.
10512 * completer.c: Include <algorithm>.
10513 (struct gdb_completer_state): New.
10514 (current_completion): New global.
10515 (readline_line_completion_function): Delete.
10516 (noop_completer, filename_completer)
10517 (filename_completer_handle_brkchars, complete_files_symbols)
10518 (linespec_location_completer): Adjust to work with a
10519 completion_tracker instead of a VEC.
10520 (string_or_empty): New.
10521 (collect_explicit_location_matches): Adjust to work with a
10522 completion_tracker instead of a VEC.
10523 (explicit_location_completer): Rename to ...
10524 (complete_explicit_location): ... this and adjust to work with a
10525 completion_tracker instead of a VEC.
10526 (location_completer): Adjust to work with a completion_tracker
10527 instead of a VEC.
10528 (add_struct_fields): Adjust to work with a completion_list instead
10529 of VEC.
10530 (expression_completer): Rename to ...
10531 (complete_expression): ... this and adjust to work with a
10532 completion_tracker instead of a VEC. Use complete_files_symbols.
10533 (expression_completer): Reimplement on top of complete_expression.
10534 (symbol_completer): Adjust to work with a completion_tracker
10535 instead of a VEC.
10536 (enum complete_line_internal_reason): Add describing comments.
10537 (complete_line_internal_normal_command): Adjust to work with a
10538 completion_tracker instead of a VEC.
10539 (complete_line_internal): Rename to ...
10540 (complete_line_internal_1): ... this and adjust to work with a
10541 completion_tracker instead of a VEC. Assert TEXT is NULL in the
10542 handle_brkchars phase.
10543 (new_completion_tracker): Delete.
10544 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
10545 complete_line_internal_1.
10546 (free_completion_tracker): Delete.
10547 (INITIAL_COMPLETION_HTAB_SIZE): New.
10548 (completion_tracker::completion_tracker)
10549 (completion_tracker::~completion_tracker): New.
10550 (maybe_add_completion): Delete.
10551 (completion_tracker::maybe_add_completion)
10552 (completion_tracker::add_completion)
10553 (completion_tracker::add_completions): New.
10554 (throw_max_completions_reached_error): Delete.
10555 (complete_line): Adjust to work with a completion_tracker instead
10556 of a VEC. Don't create a completion_tracker_t or check for max
10557 completions here.
10558 (command_completer, command_completer_handle_brkchars)
10559 (signal_completer, reg_or_group_completer_1)
10560 (reg_or_group_completer, default_completer_handle_brkchars):
10561 Adjust to work with a completion_tracker.
10562 (gdb_completion_word_break_characters_throw): New.
10563 (gdb_completion_word_break_characters): Reimplement.
10564 (line_completion_function): Delete.
10565 (completion_tracker::recompute_lowest_common_denominator)
10566 (expand_preserving_ws)
10567 (completion_tracker::build_completion_result)
10568 (completion_result::completion_result)
10569 (completion_result::completion_result)
10570 (completion_result::~completion_result)
10571 (completion_result::completion_result)
10572 (completion_result::release_match_list, compare_cstrings)
10573 (completion_result::sort_match_list)
10574 (completion_result::reset_match_list)
10575 (gdb_rl_attempted_completion_function_throw)
10576 (gdb_rl_attempted_completion_function): New.
10577 * completer.h (completion_list, struct completion_result)
10578 (class completion_tracker): New.
10579 (complete_line): Add completion_tracker parameter.
10580 (readline_line_completion_function): Delete.
10581 (gdb_rl_attempted_completion_function): New.
10582 (noop_completer, filename_completer, expression_completer)
10583 (location_completer, symbol_completer, command_completer)
10584 (signal_completer, reg_or_group_completer): Update prototypes.
10585 (completion_tracker_t, new_completion_tracker)
10586 (make_cleanup_free_completion_tracker): Delete.
10587 (enum maybe_add_completion_enum): Delete.
10588 (maybe_add_completion): Delete.
10589 (throw_max_completions_reached_error): Delete.
10590 * corefile.c (complete_set_gnutarget): Adjust to work with a
10591 completion_tracker instead of a VEC.
10592 * cp-abi.c (cp_abi_completer): Adjust to work with a
10593 completion_tracker instead of a VEC.
10594 * d-lang.c (d_language_defn): Adjust.
10595 * disasm.c (disassembler_options_completer): Adjust to work with a
10596 completion_tracker instead of a VEC.
10597 * f-lang.c (f_make_symbol_completion_list): Rename to ...
10598 (f_collect_symbol_completion_matches): ... this. Adjust to work
10599 with a completion_tracker instead of a VEC.
10600 (f_language_defn): Adjust.
10601 * go-lang.c (go_language_defn): Adjust.
10602 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
10603 Adjust to work with a completion_tracker instead of a VEC.
10604 * infrun.c (handle_completer): Likewise.
10605 * interps.c (interpreter_completer): Likewise.
10606 * interps.h (interpreter_completer): Likewise.
10607 * language.c (unknown_language_defn, auto_language_defn)
10608 (local_language_defn): Adjust.
10609 * language.h (language_defn::la_make_symbol_completion_list):
10610 Rename to ...
10611 (language_defn::la_collect_symbol_completion_matches): ... this
10612 and adjust to work with a completion_tracker instead of a VEC.
10613 * m2-lang.c (m2_language_defn): Adjust.
10614 * objc-lang.c (objc_language_defn): Adjust.
10615 * opencl-lang.c (opencl_language_defn): Adjust.
10616 * p-lang.c (pascal_language_defn): Adjust.
10617 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
10618 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
10619 with a completion_tracker.
10620 * rust-lang.c (rust_language_defn): Adjust.
10621 * symtab.c (free_completion_list, do_free_completion_list)
10622 (return_val, completion_tracker): Delete.
10623 (completion_list_add_name, completion_list_add_symbol)
10624 (completion_list_add_msymbol, completion_list_objc_symbol)
10625 (completion_list_add_fields, add_symtab_completions): Add
10626 completion_tracker parameter and use it.
10627 (default_make_symbol_completion_list_break_on_1): Rename to...
10628 (default_collect_symbol_completion_matches_break_on): ... this.
10629 Add completion_tracker parameter and use it instead of allocating
10630 a completion tracker here.
10631 (default_make_symbol_completion_list_break_on): Delete old
10632 implementation.
10633 (default_make_symbol_completion_list): Delete.
10634 (default_collect_symbol_completion_matches): New.
10635 (make_symbol_completion_list): Delete.
10636 (collect_symbol_completion_matches): New.
10637 (make_symbol_completion_type): Rename to ...
10638 (collect_symbol_completion_matches_type): ... this. Add
10639 completion_tracker parameter and use it instead of VEC.
10640 (make_file_symbol_completion_list_1): Rename to...
10641 (collect_file_symbol_completion_matches): ... this. Add
10642 completion_tracker parameter and use it instead of VEC.
10643 (make_file_symbol_completion_list): Delete.
10644 (add_filename_to_list): Use completion_list instead of a VEC.
10645 (add_partial_filename_data::list): Now a completion_list.
10646 (make_source_files_completion_list): Work with a completion_list
10647 instead of a VEC.
10648 * symtab.h: Include "completer.h".
10649 (default_make_symbol_completion_list_break_on)
10650 (default_make_symbol_completion_list, make_symbol_completion_list)
10651 (make_symbol_completion_type, make_file_symbol_completion_list)
10652 (make_source_files_completion_list): Delete.
10653 (default_collect_symbol_completion_matches_break_on)
10654 (default_collect_symbol_completion_matches)
10655 (collect_symbol_completion_matches)
10656 (collect_symbol_completion_matches_type)
10657 (collect_file_symbol_completion_matches)
10658 (make_source_files_completion_list): New.
10659 * top.c (init_main): Don't install a rl_completion_entry_function
10660 hook. Install a rl_attempted_completion_function hook instead.
10661 * tui/tui-layout.c (layout_completer): Adjust to work with a
10662 completion_tracker.
10663 * tui/tui-regs.c (tui_reggroup_completer):
10664 * tui/tui-win.c (window_name_completer, focus_completer)
10665 (winheight_completer): Adjust to work with a completion_tracker.
10666 * value.c: Include "completer.h".
10667 (complete_internalvar): Adjust to work with a completion_tracker.
10668 * value.h (complete_internalvar): Likewise.
10669
6e1dbf8c
PA
106702017-07-17 Pedro Alves <palves@redhat.com>
10671
10672 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
10673 renames.
10674 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
10675 comments to completer_ftype's declaration.
10676 <completer_handle_brkchars>: Change type to
10677 completer_handle_brkchars_ftype.
10678 * command.h (completer_ftype): Add describing comment and give
10679 names to parameters.
10680 (completer_ftype_void): Rename to ...
10681 (completer_handle_brkchars_ftype) ... this. Add describing comment.
10682 (set_cmd_completer_handle_brkchars): Adjust.
10683 * completer.c (filename_completer_handle_brkchars): New function.
10684 (complete_line_internal_normal_command): New function, factored
10685 out from ...
10686 (complete_line_internal): ... here.
10687 (command_completer_handle_brkchars)
10688 (default_completer_handle_brkchars)
10689 (completer_handle_brkchars_func_for_completer): New functions.
10690 * completer.h (set_gdb_completion_word_break_characters): Delete
10691 declaration.
10692 (completer_handle_brkchars_func_for_completer): New declaration.
10693 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
10694 completer_handle_brkchars_func_for_completer.
10695
78b13106
PA
106962017-07-17 Pedro Alves <palves@redhat.com>
10697
10698 * completer.c (symbol_completer): New function, based on
10699 make_symbol_completion_list_fn.
10700 * completer.h (symbol_completer): New declaration.
10701 * guile/scm-cmd.c (cmdscm_completers): Adjust.
10702 * python/py-cmd.c (completers): Adjust.
10703 * symtab.c (make_symbol_completion_list_fn): Delete.
10704 * symtab.h (make_symbol_completion_list_fn): Delete.
10705 * cli/cli-decode.c (add_cmd): Adjust.
10706
bbf2f4df
PA
107072017-07-17 Pedro Alves <palves@redhat.com>
10708
10709 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
10710 * dwarf2read.c: Include "filename-seen-cache.h".
10711 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
10712 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
10713 * filename-seen-cache.c: New file.
10714 * filename-seen-cache.h: New file.
10715 * symtab.c: Include "filename-seen-cache.h".
10716 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
10717 (create_filename_seen_cache, clear_filename_seen_cache)
10718 (delete_filename_seen_cache, filename_seen): Delete, parts moved
10719 to filename-seen-cache.h/filename-seen-cache.c.
10720 (output_source_filename, sources_info)
10721 (maybe_add_partial_symtab_filename)
10722 (make_source_files_completion_list): Adjust to use
10723 filename_seen_cache.
10724
330cdd98
PA
107252017-07-17 Pedro Alves <palves@redhat.com>
10726
10727 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
10728 fields.
10729 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
10730 dwarf2_debug_sections*)): New.
10731 (dwarf2_per_objfile::dwarf2_per_objfile(const
10732 dwarf2_per_objfile&)): Declare as deleted.
10733 (dwarf2_per_objfile::operator=): Declare as deleted.
10734 (dwarf2_per_objfile::dwarf2_per_objfile)
10735 (dwarf2_per_objfile::~dwarf2_per_objfile)
10736 (dwarf2_per_objfile::free_cached_comp_units): New.
10737 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
10738 ctor. Call dwarf2_per_objfile's ctor manually.
10739 (dwarf2_locate_sections): Deleted/refactored as ...
10740 (dwarf2_per_objfile::locate_sections): ... this new method.
10741 (free_cached_comp_units): Defer to
10742 dwarf2_per_objfile::free_cached_comp_units.
10743 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
10744
8880f2a9
TT
107452017-07-14 Tom Tromey <tom@tromey.com>
10746
10747 PR rust/21764:
10748 * rust-exp.y (convert_ast_to_expression): Add "want_type"
10749 parameter.
10750 <UNOP_SIZEOF>: Split into separate case.
10751 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
10752
65547233
TT
107532017-07-14 Tom Tromey <tom@tromey.com>
10754
10755 PR rust/21763:
10756 * symtab.c (symbol_matches_domain): Add language_rust to special
10757 case.
10758 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
10759 treat LOC_TYPEDEF symbols as variables.
10760
8f14146e
PA
107612017-07-14 Pedro Alves <palves@redhat.com>
10762
10763 * symtab.c (make_file_symbol_completion_list_1): Iterate over
10764 symtabs matching all symtabs with SRCFILE as file name instead of
10765 only considering the first hit, with lookup_symtab.
10766
2347965c
SM
107672017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10768
10769 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
10770 operator_name parameters.
10771 (gen_expr): Update function call.
10772
40f4af28
SM
107732017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10774
10775 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
10776 parameter.
10777 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
10778 Likewise.
10779 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
10780 parameter, use agent_expr::gdbarch instead, update function
10781 calls.
10782 (locexpr_tracepoint_var_ref): Likewise.
10783 (loclist_tracepoint_var_ref): Likewise.
10784 * ax-gdb.c (gen_trace_static_fields): Likewise.
10785 (gen_traced_pop): Likewise.
10786 (gen_frame_args_address): Likewise.
10787 (gen_frame_locals_address): Likewise.
10788 (gen_var_ref): Likewise.
10789 (gen_struct_ref_recursive): Likewise.
10790 (gen_static_field): Likewise.
10791 (gen_maybe_namespace_elt): Likewise.
10792 (gen_expr): Likewise.
10793 (gen_trace_for_var): Likewise.
10794 (gen_trace_for_expr): Likewise.
10795 (gen_trace_for_return_address): Likewise.
10796
053f8057
SM
107972017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10798
10799 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
10800 parameter.
10801 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
10802
6661ad48
SM
108032017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10804
10805 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
10806 from ax, update calls.
10807 (gen_usual_arithmetic): Likewise.
10808 (gen_integral_promotions): Likewise.
10809 (gen_bitfield_ref): Likewise.
10810 (gen_primitive_field): Likewise.
10811 (gen_struct_ref_recursive): Likewise.
10812 (gen_struct_ref): Likewise.
10813 (gen_maybe_namespace_elt): Likewise.
10814 (gen_struct_elt_for_reference): Likewise.
10815 (gen_namespace_elt): Likewise.
10816 (gen_aggregate_elt_ref): Likewise.
10817 (gen_expr): Get gdbarch from ax, update calls.
10818 (gen_expr_binop_rest): Likewise.
10819
c55a47e7
PA
108202017-07-13 Pedro Alves <palves@redhat.com>
10821
10822 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
10823 as default tdesc.
10824 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
10825 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
10826 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
10827 tdesc_amd64_linux as default tdesc. Get final tdesc from the
10828 tdep.
10829 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
10830 Get final tdesc from the tdep.
10831 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
10832 default tdesc.
10833 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
10834 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
10835 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
10836 Use it as default tdesc.
10837 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
10838 down to amd_init_abi. No longer handle fallback tdesc here.
10839 * amd64-tdep.h (tdesc_x32): Declare.
10840 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
10841 parameter.
10842 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
10843 as default tdesc.
10844
55efceab
AA
108452017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10846
10847 * s390-linux-tdep.c (s390_process_record): Add support for
10848 instructions new in arch12.
10849
0aa37b65
JB
108502017-07-11 John Baldwin <jhb@FreeBSD.org>
10851
10852 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
10853 PT_GETFSBASE and PT_GETGSBASE.
10854 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
10855 PT_SETGSBASE.
10856
48aeef91
JB
108572017-07-11 John Baldwin <jhb@FreeBSD.org>
10858
10859 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
10860 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
10861 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
10862 those rules.
10863 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
10864 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
10865 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
10866 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
10867 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
10868 * features/i386/amd64.xml: Add 64bit-segments.xml.
10869 * features/i386/amd64-avx-avx512.c: Regenerated.
10870 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
10871 * features/i386/amd64-avx-mpx.c: Regenerated.
10872 * features/i386/amd64-avx.c: Regenerated.
10873 * features/i386/amd64-mpx.c: Regenerated.
10874 * features/i386/amd64.c: Regenerated.
10875 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
10876 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10877 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
10878 * regformats/i386/amd64-avx.dat: Regenerated.
10879 * regformats/i386/amd64-mpx.dat: Regenerated.
10880 * regformats/i386/amd64.dat: Regenerated.
10881
77c501bc
YQ
108822017-07-10 Yao Qi <yao.qi@linaro.org>
10883
10884 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10885 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10886
6dc8d757
AK
108872017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
10888
10889 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
10890 unsetenv.
10891 * gnulib/aclocal.m4: Regenerate.
10892 * gnulib/config.in: Regenerate.
10893 * gnulib/configure: Regenerate.
10894 * gnulib/import/Makefile.am: Regenerate.
10895 * gnulib/import/Makefile.in: Regenerate.
10896 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
10897 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
10898 * gnulib/import/m4/environ.m4: New file.
10899 * gnulib/import/m4/setenv.m4: New file.
10900 * gnulib/import/setenv.c: New file.
10901 * gnulib/import/unsetenv.c: New file.
10902
266934d1
SM
109032017-07-09 Simon Marchi <simon.marchi@ericsson.com>
10904
10905 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
10906 address when op is DW_OP_addr.
10907
03278692
TT
109082017-07-09 Tom Tromey <tom@tromey.com>
10909
10910 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
10911 check and apply to outer type.
10912
4b654465
JB
109132017-07-07 John Baldwin <jhb@FreeBSD.org>
10914
10915 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
10916 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
10917 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
10918 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
10919
2af9fc44
JB
109202017-07-07 John Baldwin <jhb@FreeBSD.org>
10921
10922 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
10923
382b69bb
JB
109242017-07-07 John Baldwin <jhb@FreeBSD.org>
10925
10926 * corelow.c (get_core_siginfo): Remove.
10927 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
10928 instead of get_core_siginfo.
10929 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
10930 * gdbarch.h: Re-generate.
10931 * gdbarch.c: Re-generate.
10932 * linux-tdep.c (linux_core_xfer_siginfo): New.
10933 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
10934
6e5eab33
JB
109352017-07-07 John Baldwin <jhb@FreeBSD.org>
10936
10937 * corelow.c (thread_section_name): Move to ...
10938 * gdbcore.h (thread_section_name): ... here.
10939
929edea9
JB
109402017-07-07 John Baldwin <jhb@FreeBSD.org>
10941
10942 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
10943 (struct siginfo32): New.
10944 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
10945 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
10946 via ptrace(PT_LWPINFO).
10947
762c974a
JB
109482017-07-07 John Baldwin <jhb@FreeBSD.org>
10949
10950 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
10951 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
10952 (fbsd_get_siginfo_type): New.
10953 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
10954 (_initialize_fbsd_tdep): New.
10955
33c5cd75
DB
109562017-07-06 David Blaikie <dblaikie@gmail.com>
10957
10958 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
10959 a singular dwo_unit*) to support multiple CUs in the same way that
10960 multiple TUs are supported.
10961 (create_cus_hash_table): Replace create_dwo_cu with a function for
10962 parsing multiple CUs from a DWO file.
10963 (open_and_init_dwo_file): Use create_cus_hash_table rather than
10964 create_dwo_cu.
10965 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
10966 htab_find, rather than comparing the signature to a singleton CU in
10967 the dwo_file.
10968
8455d262
PA
109692017-07-06 Pedro Alves <palves@redhat.com>
10970
10971 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
10972
4da3eb35
PA
109732017-07-04 Pedro Alves <palves@redhat.com>
10974
10975 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
10976 * gdbtypes.h (TYPE_STATIC): Delete.
10977 (struct fn_field) <is_public, is_abstract, is_static, is_final,
10978 is_synchronized, is_native>: Delete.
10979 <dummy>: Bump.
10980 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
10981 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
10982 (TYPE_FN_FIELD_ABSTRACT): Delete.
10983
5bfd255c
SM
109842017-07-03 Simon Marchi <simon.marchi@ericsson.com>
10985
10986 * buffer.h (buffer_finish): Fix spelling mistakes.
10987
25c54127
EZ
109882017-07-01 Eli Zaretskii <eliz@gnu.org>
10989
10990 * .dir-locals.el: Automatically switch to C-style comments in
10991 versions of Emacs that support the feature.
10992
dc4bde35
SDJ
109932017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10994 Pedro Alves <palves@redhat.com>
10995
10996 PR cli/21688
10997 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
10998 (process_next_line): New variable 'inline_cmd'.
10999 Adjust 'if' clauses for "python", "compile" and "guile" to use
11000 'command_name_equals' and check for '!inline_cmd'.
11001
51ed89aa
SDJ
110022017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
11003
11004 PR cli/21688
11005 * cli/cli-script.c (command_name_equals_not_inline): New function.
11006 (process_next_line): Adjust 'if' clauses for "python", "compile"
11007 and "guile" to use command_name_equals_not_inline.
11008
eb17d413
PA
110092017-06-29 Pedro Alves <palves@redhat.com>
11010
11011 * completer.c (expression_completer): Call
11012 linespec_location_completer instead of location_completer.
11013
195bcdd5
PA
110142017-06-29 Pedro Alves <palves@redhat.com>
11015
11016 * completer.c (expression_completer): Remove code that recomputes
11017 'text' from 'word'.
11018
adc764e7
YQ
110192017-06-29 Yao Qi <yao.qi@linaro.org>
11020
11021 * regformats/regdat.sh: Generate code with
11022 "ifndef IN_PROCESS_AGENT".
11023
6e75794e
PA
110242017-06-28 Pedro Alves <palves@redhat.com>
11025
11026 * command.h: Include "common/scoped_restore.h".
11027
bc491f2e
YQ
110282017-06-28 Yao Qi <yao.qi@linaro.org>
11029
11030 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
11031 instead of obstack_grow.
11032
41664b45
DG
110332017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
11034
11035 PR gdb/21337
11036 * symfile.c (reread_symbols): Call objfiles_changed just before
11037 read_symbols.
11038
6da67eb1
PA
110392017-06-27 Pedro Alves <palves@redhat.com>
11040
11041 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
11042 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
11043 (completion_list_add_symbol, completion_list_add_msymbol):
11044 ... these new functions.
11045 (add_symtab_completions)
11046 (default_make_symbol_completion_list_break_on_1): Adjust.
11047
23732b1e
PA
110482017-06-27 Pedro Alves <palves@redhat.com>
11049
11050 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
11051 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
11052 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
11053 dtor.
11054 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
11055 'storage_obstack' field an auto_obstack. In-class initialize all
11056 non-bitfield fields. Make minsyms_read bool.
11057 * symfile.c (read_symbols): Adjust.
11058
a4d1e79a
AH
110592017-06-27 Alan Hayward <alan.hayward@arm.com>
11060
11061 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
11062 (gdbsim_store_register): Likewise.
11063
8268c778
PA
110642017-06-27 Pedro Alves <palves@redhat.com>
11065
11066 * c-exp.y (name_obstack): Now an auto_obstack.
11067 (yylex): Use auto_obstack::clear.
11068 (c_parse): Use auto_obstack::clear instead of reinitializing and
11069 freeing the obstack.
11070 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
11071 * d-exp.y (name_obstack): Now an auto_obstack.
11072 (yylex): Use auto_obstack::clear.
11073 (d_parse): Use auto_obstack::clear instead of reinitializing and
11074 freeing the obstack.
11075 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
11076 auto_obstack.
11077 * dwarf2read.c (create_addrmap_from_index)
11078 (dwarf2_build_psymtabs_hard)
11079 (update_enumeration_type_from_children): Likewise.
11080 * gdb_obstack.h (auto_obstack): New type.
11081 * go-exp.y (name_obstack): Now an auto_obstack.
11082 (build_packaged_name): Use auto_obstack::clear.
11083 (go_parse): Use auto_obstack::clear instead of reinitializing and
11084 freeing the obstack.
11085 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
11086 auto_obstack.
11087 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
11088 * rust-exp.y (work_obstack): Now an auto_obstack.
11089 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
11090 reinitializing and freeing the obstack.
11091 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
11092 (host_char_to_target): Use auto_obstack.
11093 * utils.h (make_cleanup_obstack_free): Delete declaration.
11094 * valprint.c (generic_emit_char, generic_printstr): Use
11095 auto_obstack.
11096
db665f42
SM
110972017-06-27 Simon Marchi <simon.marchi@ericsson.com>
11098
11099 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
11100 thread.
11101 (darwin_init_thread_list): Don't update dummy thread.
11102 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
11103
873c0814
SM
111042017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11105
11106 * record-full.c (netorder16): Remove.
11107
8b5a7a6e
SM
111082017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11109
11110 * common/diagnostics.h: Define macros for GCC.
11111 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
11112 * common/vec.h: Include diagnostics.h.
11113 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
11114 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
11115 warning.
11116
d1435379
SM
111172017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11118
11119 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
11120 New macro.
11121 * ada-lex.l: Ignore deprecated register warnings.
11122
cc75e0fd
SM
111232017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11124
11125 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
11126 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
11127
07809eaf
SM
111282017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11129
11130 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
11131 its own line.
11132
f076f034
SM
111332017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11134
11135 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
11136
0dd5cbc5
AH
111372017-06-23 Alan Hayward <alan.hayward@arm.com>
11138
11139 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
11140 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
11141 (xtensa_register_read_masked): Likewise.
11142
d4c6ce5b
SDJ
111432017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
11144
11145 * common/environ.c (gdb_environ::unset): Update comment.
11146
16892a03
AH
111472017-06-22 Alan Hayward <alan.hayward@arm.com>
11148
11149 * python/py-unwind.c (pyuw_sniffer): Allocate space for
11150 registers.
11151
d7dcbefc
AH
111522017-06-22 Alan Hayward <alan.hayward@arm.com>
11153
11154 * record-full.c (record_full_exec_insn): Use byte_vector.
11155
b30ff123
YQ
111562017-06-22 Yao Qi <yao.qi@linaro.org>
11157
11158 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
11159 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
11160
4fa847d7
AH
111612017-06-22 Alan Hayward <alan.hayward@arm.com>
11162
11163 * remote.c (cached_reg): Move from here...
11164 * regcache.h (cached_reg): ...to here.
11165 * python/py-unwind.c (struct reg_info): Remove.
11166 (cached_frame_info): Use cached_reg_t.
11167 (pyuw_prev_register): Likewise.
11168 (pyuw_sniffer): Use cached_reg_t and allocate registers.
11169 (pyuw_dealloc_cache): Free all registers.
11170
f4906a9a
PA
111712017-06-22 Pedro Alves <palves@redhat.com>
11172 Simon Marchi <simon.marchi@ericsson.com>
11173
11174 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
11175 warning.
11176 * common/diagnostics.h: New file.
11177
b45a1208
PA
111782017-06-22 Pedro Alves <palves@redhat.com>
11179
11180 * common/agent.h: Add include guards.
11181
e4da2c61
SM
111822017-06-21 Simon Marchi <simon.marchi@ericsson.com>
11183
11184 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
11185 talk about addressable units instead of bytes.
11186
96160d60
SDJ
111872017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
11188
11189 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
11190 of '::const_iterator'.
11191
9a6c7d9c
SDJ
111922017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
11193
11194 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11195 'unittests/environ-selftests.c'.
11196 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
11197 * charset.c (find_charset_names): Declare object 'iconv_env'.
11198 Update code to use 'iconv_env' object. Remove call to
11199 'free_environ'.
11200 * common/environ.c: Include <utility>.
11201 (make_environ): Delete function.
11202 (free_environ): Delete function.
11203 (gdb_environ::clear): New function.
11204 (gdb_environ::operator=): New function.
11205 (gdb_environ::get): Likewise.
11206 (environ_vector): Delete function.
11207 (set_in_environ): Delete function.
11208 (gdb_environ::set): New function.
11209 (unset_in_environ): Delete function.
11210 (gdb_environ::unset): New function.
11211 (gdb_environ::envp): Likewise.
11212 * common/environ.h: Include <vector>.
11213 (struct gdb_environ): Delete; transform into...
11214 (class gdb_environ): ... this class.
11215 (free_environ): Delete prototype.
11216 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
11217 environ_vector): Likewise.
11218 * infcmd.c (run_command_1): Update code to call
11219 'envp' from 'gdb_environ' class.
11220 (environment_info): Update code to call methods from 'gdb_environ'
11221 class.
11222 (unset_environment_command): Likewise.
11223 (path_info): Likewise.
11224 (path_command): Likewise.
11225 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
11226 (inferior::inferior): Initialize 'environment' using the host's
11227 information.
11228 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
11229 Include "environ.h".
11230 (class inferior) <environment>: Change type from 'struct
11231 gdb_environ' to 'gdb_environ'.
11232 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
11233 methods from 'gdb_environ' class.
11234 * solib.c (solib_find_1): Likewise
11235 * unittests/environ-selftests.c: New file.
11236
75c554cf
YQ
112372017-06-20 Yao Qi <yao.qi@linaro.org>
11238
11239 * features/i386/i386-linux.xml: Exchange the order of including
11240 32bit-linux.xml and 32bit-sse.xml.
11241 * features/i386/i386-linux.c: Regenerated.
11242
72ddacb7
YQ
112432017-06-20 Yao Qi <yao.qi@linaro.org>
11244
11245 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
11246 Delete copy ctor and assignment operator.
11247 (tdesc_type): Likewise.
11248 (tdesc_feature): Likewise.
11249 (tdesc_free_reg): Remove.
11250 (tdesc_create_reg): Use new.
11251 (tdesc_free_type): Remove.
11252 (tdesc_create_vector): Use new.
11253 (tdesc_create_union): Likewise.
11254 (tdesc_create_flags): Likewise.
11255 (tdesc_create_enum): Likewise.
11256 (tdesc_free_feature): Delete.
11257 (free_target_description): Use delete.
11258
325c9fd4
JB
112592017-06-19 John Baldwin <jhb@FreeBSD.org>
11260
11261 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
11262 registers.
11263
16b7a719
PA
112642017-06-19 Pedro Alves <palves@redhat.com>
11265
11266 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
11267 after gdb::unlinker.
11268
1c8e01c9
SDJ
112692017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
11270
11271 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
11272 gdb_environ to access an environment variable.
11273
ffce45d2
TP
112742017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
11275
11276 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
11277 gdb_byte*.
11278
1d4fbac9
SM
112792017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11280
11281 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
11282
8465943a
SM
112832017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11284
11285 * configure: Re-generate.
11286 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
11287
3e019bdc
SM
112882017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11289
11290 * configure: Re-generate.
11291 * warning.m4: Pass -Werror to compiler when checking for
11292 supported warning flags.
11293
cf0dd6f0
SM
112942017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11295
11296 * Makefile.in (COMPILE.pre): Add "-x c++".
11297
6f98355c
YQ
112982017-06-16 Alan Hayward <alan.hayward@arm.com>
11299 Pedro Alves <palves@redhat.com>
11300 Yao Qi <yao.qi@linaro.org>
11301
11302 * defs.h (RequireLongest): New.
11303 (extract_integer): Declare function template.
11304 (extract_signed_integer): Remove the declaration, but define it
11305 static inline.
11306 (extract_unsigned_integer): Likewise.
11307 (store_integer): Declare function template.
11308 (store_signed_integer): Remove the declaration, but define it
11309 static inline.
11310 (store_unsigned_integer): Likewise.
11311 * findvar.c (extract_integer): New function template.
11312 (extract_signed_integer): Remove.
11313 (extract_unsigned_integer): Remove.
11314 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
11315 instantiations.
11316 (store_integer): New function template.
11317 (store_signed_integer): Remove.
11318 (store_unsigned_integer): Remove.
11319 (store_integer): Explicit instantiations.
11320 * regcache.c (regcache_raw_read_signed): Update.
11321 (regcache::raw_read): New function.
11322 (regcache::raw_read_signed): Remove.
11323 (regcache::raw_read_unsigned): Remove.
11324 (regcache_raw_read_unsigned): Update.
11325 (regcache_raw_write_unsigned): Update.
11326 (regcache::raw_write_signed): Remove.
11327 (regcache::raw_write): New function.
11328 (regcache_cooked_read_signed): Update.
11329 (regcache::raw_write_unsigned): Remove.
11330 (regcache::cooked_read_signed): Remove.
11331 (regcache_cooked_read_unsigned): Update.
11332 (regcache::cooked_read_unsigned): Remove.
11333 (regcache_cooked_write_signed): Update.
11334 (regcache_cooked_write_unsigned): Update.
11335 * regcache.h (regcache) <raw_read_signed>: Remove.
11336 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
11337 <raw_read, raw_write>: New.
11338 <cooked_read_signed, cooked_write_signed>: Remove.
11339 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
11340 <cooked_read, cooked_write>: New.
11341 * sh64-tdep.c (sh64_pseudo_register_read): Update.
11342 (sh64_pseudo_register_write): Update.
11343
a87dc45a
AK
113442017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
11345
11346 * arc-tdep.c (arc_disassembler_options): New variable.
11347 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
11348 of default_print_insn.
11349 (arc_delayed_print_insn): Set info->section when needed,
11350 use default_print_insn to retrieve a disassembler.
11351
45159d6a
SDJ
113522017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
11353
11354 PR gdb/21574
11355 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
11356 to mention $SHELL and startup-with-shell.
11357
b46c4cf0
MF
113582017-06-14 Max Filippov <jcmvbkbc@gmail.com>
11359
11360 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
11361
6394c606
YQ
113622017-06-14 Yao Qi <yao.qi@linaro.org>
11363
11364 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
11365 default_print_insn instead of print_insn_aarch64.
11366 * arm-tdep.c (gdb_print_insn_arm): Call
11367 default_print_insn instead of print_insn_big_arm
11368 and print_insn_little_arm.
11369 * i386-tdep.c (i386_print_insn): Call default_print_insn
11370 instead of print_insn_i386.
11371 * ia64-tdep.c (ia64_print_insn): Call
11372 default_print_insn instead of print_insn_ia64.
11373 * mips-tdep.c (gdb_print_insn_mips): Call
11374 default_print_insn instead of print_insn_big_mips
11375 and print_insn_little_mips.
11376 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
11377 instead of print_insn_spu.
11378
d5722aa2
PA
113792017-06-14 Pedro Alves <palves@redhat.com>
11380
11381 * ada-lang.c: Include "common/byte-vector.h".
11382 (ada_value_primitive_packed_val): Use gdb::byte_vector.
11383 * charset.c (wchar_iterator::iterate): Resize the vector instead
11384 of reserving it.
11385 * common/byte-vector.h: Include "common/def-vector.h".
11386 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
11387 * cli/cli-dump.c: Include "common/byte-vector.h".
11388 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
11389 * common/byte-vector.h: New file.
11390 * common/def-vector.h: New file.
11391 * common/default-init-alloc.h: New file.
11392 * dwarf2loc.c: Include "common/byte-vector.h".
11393 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
11394 instead of reserving it.
11395 * dwarf2read.c: Include "common/byte-vector.h".
11396 (data_buf::m_vec): Now a gdb::byte_vector.
11397 * gdb_regex.c: Include "common/def-vector.h".
11398 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
11399 * mi/mi-main.c: Include "common/byte-vector.h".
11400 (mi_cmd_data_read_memory): Use gdb::byte_vector.
11401 * printcmd.c: Include "common/byte-vector.h".
11402 (print_scalar_formatted): Use gdb::byte_vector.
11403 * valprint.c: Include "common/byte-vector.h".
11404 (maybe_negate_by_bytes, print_decimal_chars): Use
11405 gdb::byte_vector.
11406
01ec7a27
SM
114072017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11408
11409 * darwin-nat.c: Include "nat/fork-inferior.h".
11410
848d9074
SM
114112017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11412
11413 * configure.nat: Factor out Darwin bits that are not
11414 architecture-specific. Add fork-inferior.o.
11415
3b912944
SM
114162017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11417
11418 * configure.nat: Factor out AIX bits that are not
11419 architecture-specific. Add fork-inferior.o.
11420
55acdf22
AA
114212017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11422
11423 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
11424 (read_pieced_value, write_pieced_value): ...here. Reduce to
11425 wrappers that just call rw_pieced_value.
11426
f65e2044
AA
114272017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11428
11429 * dwarf2loc.c (write_pieced_value): When writing the data for a
11430 memory piece, use write_memory_with_notification instead of
11431 write_memory.
11432
23f945bf
AA
114332017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11434
11435 * valops.c (read_value_memory): Change embedded_offset to
11436 represent a bit offset instead of a byte offset.
11437 * value.h (read_value_memory): Adjust comment.
11438
f236533e
AA
114392017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11440
11441 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
11442 dest_offset_bits and source_offset_bits.
11443 (write_pieced_value): Likewise.
11444
65d84b76
AA
114452017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11446
11447 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
11448 given by DW_OP_bit_piece.
11449 (write_pieced_value): Likewise.
11450
242d31ab
AA
114512017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11452
11453 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
11454 some other preparations to the places where sufficient information
11455 is available.
11456 (write_pieced_value): Likewise.
11457
03c8af18
AA
114582017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11459
11460 * dwarf2loc.c (bits_to_bytes): New function.
11461 (read_pieced_value): Fix offset calculations for register pieces
11462 on big-endian targets.
11463 (write_pieced_value): Likewise.
11464
840989c1
AA
114652017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11466
11467 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
11468 (write_pieced_value): Likewise.
11469
359b19bb
AA
114702017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11471
11472 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
11473 transfer the source value's least significant bits, instead of its
11474 lowest-addressed ones. Rename type_len to max_offset.
11475 (read_pieced_value): Mirror above changes to write_pieced_value as
11476 applicable.
11477
07c9ca3b
AA
114782017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11479
11480 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
11481 truncate full bytes from dest_offset_bits before using it as an
11482 offset into the buffer.
11483
f1cc9874
AA
114842017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11485
11486 * dwarf2loc.c (write_pieced_value): Include transfer size in
11487 byte-wise check.
11488
cdaac320
AA
114892017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11490
11491 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
11492 calculation of this_size.
11493
af547a96
AA
114942017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11495
11496 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
11497 when targeting a bit-field.
11498 (write_pieced_value): Likewise.
11499
ddd7882a
AA
115002017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11501
11502 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
11503 (allocate_piece_closure): Drop addr_size parameter.
11504 (dwarf2_evaluate_loc_desc_full): Adjust call to
11505 allocate_piece_closure.
11506
e9352324
AA
115072017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11508
11509 PR gdb/21226
11510 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
11511 the LSB end, independent of endianness.
11512
d5d1163e
AA
115132017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11514
11515 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
11516 size capping.
11517
032bb6ea
YQ
115182017-06-13 Yao Qi <yao.qi@linaro.org>
11519
11520 * mips-linux-nat.c: Move include features/mips*-linux.c to
11521 mips-linux-tdep.c.
11522 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
11523 to mips-linux-tdep.c.
11524 * mips-linux-tdep.c: Include features/mips*-linux.c
11525 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
11526 functions.
11527 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
11528 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
11529 (tdesc_mips64_dsp_linux): Declare.
11530
f12f6bad
TT
115312017-06-12 Tom Tromey <tom@tromey.com>
11532
11533 * valprint.h (val_print_type_code_int): Remove.
11534 * valprint.c (generic_val_print_int): Always call
11535 val_print_scalar_formatted.
11536 (val_print_type_code_int): Remove.
11537 * printcmd.c (print_scalar_formatted): Handle options->format==0.
11538 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
11539 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
11540 * ada-valprint.c (ada_val_print_num): Use
11541 val_print_scalar_formatted.
11542
d9109c80
TT
115432017-06-12 Tom Tromey <tom@tromey.com>
11544
11545 * printcmd.c (print_scalar_formatted): Unify the two switches.
11546 Don't convert scalars to LONGEST.
11547
4ac0cb1c
TT
115482017-06-12 Tom Tromey <tom@tromey.com>
11549
11550 PR exp/16225:
11551 * valprint.h (print_decimal_chars): Update.
11552 * valprint.c (maybe_negate_by_bytes): New function.
11553 (print_decimal_chars): Add "is_signed" argument.
11554 * printcmd.c (print_scalar_formatted): Update.
11555
30a25466
TT
115562017-06-12 Tom Tromey <tom@tromey.com>
11557
11558 PR exp/16225:
11559 * valprint.h (print_binary_chars, print_hex_chars): Update.
11560 * valprint.c (val_print_type_code_int): Update.
11561 (print_binary_chars): Add "zero_pad" argument.
11562 (emit_octal_digit): New function.
11563 (print_octal_chars): Don't zero-pad.
11564 (print_decimal_chars): Likewise.
11565 (print_hex_chars): Add "zero_pad" argument.
11566 * sh64-tdep.c (sh64_do_fp_register): Update.
11567 * regcache.c (regcache::dump): Update.
11568 * printcmd.c (print_scalar_formatted): Update.
11569 * infcmd.c (default_print_one_register_info): Update.
11570
b3464d03
PA
115712017-06-12 Pedro Alves <palves@redhat.com>
11572 Alan Hayward <alan.hayward@arm.com>
11573
11574 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
11575 (mips_eabi_push_dummy_call): Rename local 'regsize' to
11576 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
11577 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
11578 Assert that abi_regsize bytes fit in 'ref_valbuf'.
11579
4b76cda9
PA
115802017-06-12 Pedro Alves <palves@redhat.com>
11581
11582 * dwarf2read.c (mapped_symtab::data): Now a vector of
11583 symtab_index_entry instead of vector of
11584 std::unique_ptr<symtab_index_entry>. All users adjusted to check
11585 whether an element's name is NULL instead of checking whether the
11586 element itself is NULL.
11587 (find_slot): Change return type. Adjust.
11588 (hash_expand, , add_index_entry, uniquify_cu_indices)
11589 (write_hash_table): Adjust.
11590
e8f8bcb3
PA
115912017-06-12 Pedro Alves <palves@redhat.com>
11592
11593 * dwarf2read.c (recursively_count_psymbols): New function.
11594 (write_psymtabs_to_index): Call it to compute number of psyms and
11595 pass estimate size of psyms_seen to unordered_set's ctor.
11596
70a1152b
PA
115972017-06-12 Pedro Alves <palves@redhat.com>
11598
11599 * dwarf2read.c (write_hash_table): Check if key already exists
11600 before emplacing.
11601
c2f134ac
PA
116022017-06-12 Pedro Alves <palves@redhat.com>
11603
11604 * dwarf2read.c (data_buf::append_space): Rename to...
11605 (data_buf::grow): ... this, and make private. Adjust all callers.
11606 (data_buf::append_uint): New method.
11607 (add_address_entry, write_one_signatured_type)
11608 (write_psymtabs_to_index): Use it.
11609
a81e6d4d
PA
116102017-06-12 Pedro Alves <palves@redhat.com>
11611
11612 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
11613 (file_write (FILE *, const std::vector<Elem>&)): Delete.
11614 (data_buf::file_write): Call ::fwrite directly.
11615
6fd931f2
PA
116162017-06-12 Pedro Alves <palves@redhat.com>
11617
11618 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
11619 std::vector::erase.
11620
bc8f2430
JK
116212017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
11622
11623 Code cleanup: C++ify .gdb_index producer.
11624 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
11625 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
11626 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
11627 (create_strtab, add_string): Remove.
11628 (file_write, data_buf): New.
11629 (struct symtab_index_entry): Use std::vector for cu_indices.
11630 (struct mapped_symtab): Use std::vector for data.
11631 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
11632 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
11633 Remove.
11634 (find_slot): Change return type. Update it to the new data structures.
11635 (hash_expand, add_index_entry): Update it to the new data structures.
11636 (offset_type_compare): Remove.
11637 (uniquify_cu_indices): Update it to the new data structures.
11638 (c_str_view, c_str_view_hasher, vector_hasher): New.
11639 (add_indices_to_cpool): Remove.
11640 (write_hash_table): Update it to the new data structures.
11641 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
11642 (eq_psymtab_cu_index): Remove.
11643 (psym_index_map): New typedef.
11644 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
11645 reference and std::unordered_map for cu_index_htab.
11646 (add_address_entry, add_address_entry_worker, write_address_map)
11647 (write_psymbols): Update it to the new data structures.
11648 (write_obstack): Remove.
11649 (struct signatured_type_index_data): Change types_list to a data_buf
11650 reference and psyms_seen to a std::unordered_set reference.
11651 (write_one_signatured_type, recursively_write_psymbols)
11652 (write_psymtabs_to_index): Update it to the new data structures.
11653
c4dcb155
SM
116542017-06-11 Simon Marchi <simon.marchi@ericsson.com>
11655
11656 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
11657 separate-debug-file commands.
11658 * symfile.h (separate_debug_file_debug): New global.
11659 * symfile.c (separate_debug_file_debug): New global.
11660 (separate_debug_file_exists, find_separate_debug_file): Add
11661 debug output.
11662 (_initialize_symfile): Add "set debug separate-debug-file"
11663 command.
11664 * build-id.c (build_id_to_debug_bfd,
11665 find_separate_debug_file_by_buildid): Add debug output.
11666
6d45d4b4
SM
116672017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
11668
11669 * gdbarch.sh (displaced_step_free_closure): Remove.
11670 * gdbarch.h, gdbarch.c: Re-generate.
11671 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
11672 displaced_step_free_closure.
11673 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
11674 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
11675 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
11676 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11677 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
11678 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11679 * arch-utils.h (simple_displaced_step_free_closure): Remove.
11680 * arch-utils.c (simple_displaced_step_free_closure): Remove.
11681 * infrun.c (displaced_step_clear): Call xfree instead of
11682 gdbarch_displaced_step_free_closure.
11683
2f91880f
SDJ
116842017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
11685
11686 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
11687 NULL".
11688
b8b6e72f
AH
116892017-06-08 Alan Hayward <alan.hayward@arm.com>
11690
11691 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
11692 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
11693 (mn10300_push_dummy_call): Likewise.
11694
5369082e
AH
116952017-06-08 Alan Hayward <alan.hayward@arm.com>
11696
11697 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
11698
ff4ca5ac
AH
116992017-06-08 Alan Hayward <alan.hayward@arm.com>
11700
11701 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
11702
aefd8b33
SDJ
117032017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11704
11705 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
11706 able to start inferiors using a shell.
11707 (New remote packets): Announce new packet "QStartupWithShell".
11708 * remote.c: Add PACKET_QStartupWithShell.
11709 (extended_remote_create_inferior): Handle new
11710 PACKET_QStartupWithShell.
11711 (remote_protocol_features) <QStartupWithShell>: New entry for
11712 PACKET_QStartupWithShell.
11713 (_initialize_remote): Call "add_packet_config_cmd" for
11714 QStartupShell.
11715
2090129c
SDJ
117162017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11717 Pedro Alves <palves@redhat.com>
11718
11719 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
11720 and "nat/fork-inferior.h".
11721 * common/common-inferior.h: New file, with contents from
11722 "gdb/inferior.h".
11723 * commom/common-utils.c: Include "common-utils.h".
11724 (stringify_argv): New function.
11725 * common/common-utils.h (stringify_argv): New prototype.
11726 * configure.nat: Add "fork-inferior.o" as a dependency for
11727 "*linux*", "fbsd*" and "nbsd*" hosts.
11728 * corefile.c (get_exec_file): Update comment.
11729 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
11730 instead of "startup_inferior".
11731 (darwin_create_inferior): Call "add_thread_silent" after
11732 "fork_inferior".
11733 * fork-child.c: Cleanup unnecessary includes.
11734 (SHELL_FILE): Move to "common/common-fork-child.c".
11735 (environ): Likewise.
11736 (exec_wrapper): Initialize.
11737 (get_exec_wrapper): New function.
11738 (breakup_args): Move to "common/common-fork-child.c"; rename to
11739 "breakup_args_for_exec".
11740 (escape_bang_in_quoted_argument): Move to
11741 "common/common-fork-child.c".
11742 (saved_ui): New variable.
11743 (prefork_hook): New function.
11744 (postfork_hook): Likewise.
11745 (postfork_child_hook): Likewise.
11746 (gdb_startup_inferior): Likewise.
11747 (fork_inferior): Move to "common/common-fork-child.c". Update
11748 function to support gdbserver.
11749 (startup_inferior): Likewise.
11750 * gdbcore.h (get_exec_file): Remove declaration.
11751 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
11752 instead of "startup_inferior". Call "add_thread_silent" after
11753 "fork_inferior".
11754 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
11755 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
11756 instead of "startup_inferior". Call "add_thread_silent" after
11757 "fork_inferior".
11758 * inferior.h: Include "common-inferior.h".
11759 (trace_start_error): Move to "common/common-utils.h".
11760 (trace_start_error_with_name): Likewise.
11761 (fork_inferior): Move prototype to "nat/fork-inferior.h".
11762 (startup_inferior): Likewise.
11763 (gdb_startup_inferior): New prototype.
11764 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
11765 * nat/fork-inferior.h: New file.
11766 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
11767 instead of "startup_inferior". Call "add_thread_silent" after
11768 "fork_inferior".
11769 * target.h (target_terminal_init): Move prototype to
11770 "target/target.h".
11771 (target_terminal_inferior): Likewise.
11772 (target_terminal_ours): Likewise.
11773 * target/target.h (target_terminal_init): New prototype, moved
11774 from "target.h".
11775 (target_terminal_inferior): Likewise.
11776 (target_terminal_ours): Likewise.
11777 * utils.c (gdb_flush_out_err): New function.
11778
043a4934
SDJ
117792017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11780
11781 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
11782 * common/common-gdbthread.h: New file, with parts from
11783 "gdb/gdbthread.h".
11784 * gdbthread.h: Include "common-gdbthread.h".
11785 (switch_to_thread): Moved to "common/common-gdbthread.h".
11786
15652511
SDJ
117872017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11788
11789 * Makefile.in (SFILES): Add "common/job-control.c".
11790 (HFILES_NO_SRCDIR): Add "common/job-control.h".
11791 (COMMON_OBS): Add "job-control.o".
11792 * common/job-control.c: New file, with contents from
11793 "gdb/inflow.c".
11794 * common/job-control.h: New file, with contents from "terminal.h".
11795 * fork-child.c: Include "job-control.h".
11796 * inflow.c: Include "job-control.h".
11797 (gdb_setpgid): Move to "common/common-inflow.c".
11798 (_initialize_inflow): Move setting of "job_control" to
11799 "handle_job_control".
11800 * terminal.h (job_control): Moved to "common/common-terminal.h".
11801 (gdb_setpgid): Likewise.
11802 * top.c: Include "job_control.h".
11803 * utils.c: Likewise.
11804 (job_control): Moved to "job-control.c".
11805
2d7cc5c7
PA
118062017-06-07 Pedro Alves <palves@redhat.com>
11807
11808 * Makefile.in (SFILES): Add gdb_regex.c.
11809 (COMMON_OBS): Add gdb_regex.o.
11810 * ada-lang.c (ada_add_standard_exceptions)
11811 (ada_add_exceptions_from_frame, name_matches_regex)
11812 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
11813 parameter type to compiled_regex. Adjust.
11814 (ada_exceptions_list): Use compiled_regex.
11815 * break-catch-throw.c (exception_catchpoint::pattern): Now a
11816 std::unique_ptr<compiled_regex>.
11817 (exception_catchpoint::~exception_catchpoint): Remove regfree
11818 call.
11819 (check_status_exception_catchpoint): Adjust to use compiled_regex.
11820 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
11821 * breakpoint.c (solib_catchpoint::compiled): Now a
11822 std::unique_ptr<compiled_regex>.
11823 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
11824 (check_status_catch_solib): Adjust to use compiled_regex.
11825 (add_solib_catchpoint): Adjust to use compiled_regex.
11826 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
11827 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
11828 compiled_regex reference. Adjust to use it.
11829 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
11830 declaration. Include "gdb_regex.h".
11831 (apropos_cmd): Change regex parameter to compiled_regex reference.
11832 * gdb_regex.c: New file.
11833 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
11834 declarations.
11835 (class compiled_regex): New.
11836 * linux-tdep.c: Include "common/gdb_optional.h".
11837 (struct mapping_regexes): New, factored out from
11838 mapping_is_anonymous_p, and adjusted to use compiled_regex.
11839 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
11840 gdb::optional and remove cleanups. Adjust to compiled_regex.
11841 * probe.c: Include "common/gdb_optional.h".
11842 (collect_probes): Use compiled_regex and gdb::optional and remove
11843 cleanups.
11844 * skip.c: Include "common/gdb_optional.h".
11845 (skiplist_entry::compiled_function_regexp): Now a
11846 gdb::optional<compiled_regex>.
11847 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
11848 (free_skiplist_entry): Remove regfree call.
11849 (compile_skip_regexp, skip_rfunction_p): Adjust to use
11850 compiled_regex and gdb::optional.
11851 * symtab.c: Include "common/gdb_optional.h".
11852 (search_symbols): Use compiled_regex and gdb::optional.
11853 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
11854 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
11855 to gdb_regex.c.
11856
50d6adef
AH
118572017-06-07 Alan Hayward <alan.hayward@arm.com>
11858
11859 * regcache.c (regcache::save): Avoid buffer use.
11860 (regcache::dump): Likewise.
11861
4a8a33c8
AH
118622017-06-07 Alan Hayward <alan.hayward@arm.com>
11863
11864 * sh-tdep.c (sh_pseudo_register_read): Remove
11865 MAX_REGISTER_SIZE.
11866 (sh_pseudo_register_write): Likewise.
11867 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
11868 (sh64_pseudo_register_write): Likewise
11869
d1be909e
AH
118702017-06-07 Alan Hayward <alan.hayward@arm.com>
11871
11872 * aarch64-tdep.c (aarch64_store_return_value): Use
11873 V_REGISTER_SIZE.
11874 (aarch64_pseudo_read_value): Likewise.
11875 (aarch64_pseudo_write): Likewise.
11876
f4a65042
YQ
118772017-06-06 Yao Qi <yao.qi@linaro.org>
11878
11879 * regformats/regdef.h (set_register_cache): Remove the
11880 declaration.
11881
9f7fb0aa
AH
118822017-06-06 Alan Hayward <alan.hayward@arm.com>
11883
11884 * frame.c (frame_unwind_register_signed): Use
11885 frame_unwind_register_value.
11886
e1e01040
PA
118872017-06-06 Pedro Alves <palves@redhat.com>
11888
11889 PR breakpoints/21553
11890 * breakpoint.c (create_breakpoints_sal_default)
11891 (init_breakpoint_sal, create_breakpoint_sal): Use
11892 gdb::unique_xmalloc_ptr for string parameters.
11893 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11894 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
11895 (base_breakpoint_create_breakpoints_sal)
11896 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
11897 (strace_marker_create_breakpoints_sal)
11898 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
11899 string parameters.
11900 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
11901 gdb::unique_xmalloc_ptr for string parameters.
11902 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11903 parameters.
11904
fbe654c8
AH
119052017-06-06 Alan Hayward <alan.hayward@arm.com>
11906
11907 * alpha-tdep.c (alpha_register_to_value): Use
11908 get_frame_register_value.
11909 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
11910
ae0d01d6
AH
119112017-06-06 Alan Hayward <alan.hayward@arm.com>
11912
11913 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
11914 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
11915 (ia64_value_to_register): Likewise.
11916 (ia64_extract_return_value): Likewise.
11917 (ia64_store_return_value): Likewise.
11918 (ia64_push_dummy_call): Likewise.
11919
49cf576c
JB
119202017-06-04 Joel Brobecker <brobecker@adacore.com>
11921
11922 GDB 8.0 released.
11923
26b6a6ab
SM
119242017-06-03 Simon Marchi <simon.marchi@ericsson.com>
11925
11926 * x86-linux-nat.c (struct arch_lwp_info): Remove.
11927
22827c51
SM
119282017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
11929
11930 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
11931 parameter.
11932 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
11933
0e05cf3a
SM
119342017-06-02 Simon Marchi <simon.marchi@ericsson.com>
11935
11936 * event-loop.c (poll_timers): Unallocate timer using delete
11937 instead of xfree.
11938
c1fc2657
SM
119392017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11940
11941 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
11942 (struct breakpoint) <~breakpoint>: New.
11943 (struct watchpoint): Inherit from breakpoint.
11944 <~watchpoint>: New.
11945 <base>: Remove.
11946 (struct tracepoint): Inherit from breakpoint.
11947 <base>: Remove.
11948 * breakpoint.c (longjmp_breakpoint_ops): Remove.
11949 (struct longjmp_breakpoint): Inherit from breakpoint.
11950 <~longjmp_breakpoint>: New.
11951 <base>: Remove.
11952 (new_breakpoint_from_type): Remove casts.
11953 (watchpoint_in_thread_scope): Remove reference to base field.
11954 (watchpoint_del_at_next_stop): Likewise.
11955 (update_watchpoint): Likewise.
11956 (watchpoint_check): Likewise.
11957 (bpstat_check_watchpoint): Likewise.
11958 (set_longjmp_breakpoint): Likewise.
11959 (struct fork_catchpoint): Inherit from breakpoint.
11960 <base>: Remove.
11961 (struct solib_catchpoint): Inherit from breakpoint.
11962 <~solib_catchpoint>: New.
11963 <base>: Remove.
11964 (dtor_catch_solib): Change to ...
11965 (solib_catchpoint::~solib_catchpoint): ... this.
11966 (breakpoint_hit_catch_solib): Remove reference to base field.
11967 (add_solib_catchpoint): Likewise.
11968 (create_fork_vfork_event_catchpoint): Likewise.
11969 (struct exec_catchpoint): Inherit from breakpoint.
11970 <~exec_catchpoint>: New.
11971 <base>: Remove.
11972 (dtor_catch_exec): Change to ...
11973 (exec_catchpoint::~exec_catchpoint): ... this.
11974 (dtor_watchpoint): Change to ...
11975 (watchpoint::~watchpoint): ... this.
11976 (watch_command_1): Remove reference to base field.
11977 (catch_exec_command_1): Likewise.
11978 (base_breakpoint_dtor): Change to ...
11979 (breakpoint::~breakpoint): ... this.
11980 (base_breakpoint_ops): Remove dtor field value.
11981 (longjmp_bkpt_dtor): Change to ...
11982 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
11983 (strace_marker_create_breakpoints_sal): Remove reference to base
11984 field.
11985 (delete_breakpoint): Don't manually call breakpoint destructor.
11986 (create_tracepoint_from_upload): Remove reference to base field.
11987 (trace_pass_set_count): Likewise.
11988 (initialize_breakpoint_ops): Don't initialize
11989 momentary_breakpoint_ops, don't set dtors.
11990 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
11991 <~ada_catchpoint>: New.
11992 <base>: Remove.
11993 (create_excep_cond_exprs): Remove reference to base field.
11994 (dtor_exception): Change to ...
11995 (ada_catchpoint::~ada_catchpoint): ... this.
11996 (dtor_catch_exception): Remove.
11997 (dtor_catch_exception_unhandled): Remove.
11998 (dtor_catch_assert): Remove.
11999 (create_ada_exception_catchpoint): Remove reference to base
12000 field.
12001 (initialize_ada_catchpoint_ops): Don't set dtors.
12002 * break-catch-sig.c (struct signal_catchpoint): Inherit from
12003 breakpoint.
12004 <~signal_catchpoint>: New.
12005 <base>: Remove.
12006 (signal_catchpoint_dtor): Change to ...
12007 (signal_catchpoint::~signal_catchpoint): ... this.
12008 (create_signal_catchpoint): Remove reference to base field.
12009 (initialize_signal_catchpoint_ops): Don't set dtor.
12010 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
12011 from breakpoint.
12012 <~syscall_catchpoint>: New.
12013 <base>: Remove.
12014 (dtor_catch_syscall): Change to ...
12015 (syscall_catchpoint::~syscall_catchpoint): ... this.
12016 (create_syscall_event_catchpoint): Remove reference to base
12017 field.
12018 (initialize_syscall_catchpoint_ops): Don't set dtor.
12019 * break-catch-throw.c (struct exception_catchpoint): Inherit
12020 from breakpoint.
12021 <~exception_catchpoint>: New.
12022 <base>: Remove.
12023 (dtor_exception_catchpoint): Change to ...
12024 (exception_catchpoint::~exception_catchpoint): ... this.
12025 (handle_gnu_v3_exceptions): Remove reference to base field.
12026 (initialize_throw_catchpoint_ops): Don't set dtor.
12027 * ctf.c (ctf_get_traceframe_address): Remove reference to base
12028 field.
12029 * remote.c (remote_get_tracepoint_status): Likewise.
12030 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
12031 * tracefile.c (tracefile_fetch_registers): Likewise.
12032 * tracepoint.c (actions_command): Likewise.
12033 (validate_actionline): Likewise.
12034 (tfind_1): Likewise.
12035 (get_traceframe_location): Likewise.
12036 (find_matching_tracepoint_location): Likewise.
12037 (parse_tracepoint_status): Likewise.
12038 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
12039
3b0871f4
SM
120402017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
12041
12042 * breakpoint.c (struct longjmp_breakpoint): New struct.
12043 (is_tracepoint_type): Change return type to bool.
12044 (is_longjmp_type): New function.
12045 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
12046 (set_raw_breakpoint_without_location): Use
12047 new_breakpoint_from_type.
12048 (set_raw_breakpoint): Likewise.
12049
a5e364af
SM
120502017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
12051
12052 * breakpoint.c (new_breakpoint_from_type): New function.
12053 (create_breakpoint_sal): Use new_breakpoint_from_type and
12054 unique_ptr.
12055 (create_breakpoint): Likewise.
12056
ae3b3f34
SM
120572017-05-31 Simon Marchi <simon.marchi@ericsson.com>
12058
12059 * memattr.c (mem_info_command): Rename to ...
12060 (info_mem_command): ... this.
12061 (mem_enable_command): Rename to ...
12062 (enable_mem_command): ... this.
12063 (mem_disable_command): Rename to ...
12064 (disable_mem_command): ... this.
12065 (mem_delete_command): Rename to ...
12066 (delete_mem_command): ... this.
12067 (_initialize_mem): Adjust function names.
12068
13ace077
MM
120692017-05-31 Markus Metzger <markus.t.metzger@intel.com>
12070
12071 * btrace.c (handle_pt_insn_events): New.
12072 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
12073 STATUS. Split into this and ...
12074 (handle_pt_insn_event_flags): ... this.
12075
c56ccc05
MM
120762017-05-31 Markus Metzger <markus.t.metzger@intel.com>
12077
12078 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
12079 and struct pt_insn.resynced.
12080 * configure: Regenerated.
12081 * config.in: Regenerated.
12082
08c3f6d2
TW
120832017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12084
12085 * btrace.c (ftrace_find_call_by_number): New function.
12086 (ftrace_new_function): Store objects, not pointers.
12087 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
12088 ftrace_new_gap, ftrace_update_function,
12089 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
12090 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
12091 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
12092 btrace_ends_with_single_insn, btrace_call_get): Account for
12093 btrace_thread_info::functions now storing objects.
12094 * btrace.h (struct btrace_thread_info): Add constructor.
12095 (struct btrace_thread_info) <functions>: Make std::vector.
12096 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
12097 Initialize with default values.
12098 * record-btrace.c (record_btrace_frame_sniffer): Account for
12099 btrace_thread_info::functions now storing objects.
12100
8ffd39f2
TW
121012017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12102
12103 * btrace.c: Remove typedef bfun_s.
12104 (ftrace_new_gap): Directly add gaps to the list of gaps.
12105 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
12106 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
12107 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
12108 instead of gdb VEC.
12109
4aeb0dfc
TW
121102017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12111
12112 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
12113 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
12114 with btrace_thread_info::next_segment and
12115 btrace_thread_info::prev_segment.
12116 * btrace.h: Remove struct btrace_func_link.
12117 (struct btrace_function): Replace pair of function segment pointers
12118 with pair of indices.
12119 * python/py-record-btrace.c (btpy_call_prev_sibling,
12120 btpy_call_next_sibling): Replace references to
12121 btrace_thread_info::segment with btrace_thread_info::next_segment and
12122 btrace_thread_info::prev_segment.
12123 * record-btrace.c (record_btrace_frame_this_id): Use
12124 btrace_find_call_by_number.
12125
eb8f2b9c
TW
121262017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12127
12128 * btrace.c (ftrace_new_function, ftrace_fixup_level,
12129 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
12130 btrace_insn_next, btrace_insn_prev): Remove references to
12131 btrace_thread_info::flow.
12132 * btrace.h (struct btrace_function): Remove FLOW.
12133
42bfe59e
TW
121342017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12135
12136 * btrace.c (ftrace_find_call_by_number): New function.
12137 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
12138 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
12139 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
12140 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
12141 index.
12142 * btrace.h (struct btrace_function): Turn UP into an index.
12143 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
12144 as an index.
12145 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
12146 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
12147 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
12148
b54b03bd
TW
121492017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12150
12151 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12152 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12153 ftrace_update_function, ftrace_compute_global_level_offset,
12154 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
12155 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
12156 btrace_insn_end, btrace_is_empty): Remove references to
12157 btrace_thread_info::begin and btrace_thread_info::end.
12158 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
12159 (struct btrace_thread_info) <functions>: Adjust comment.
12160 * record-btrace.c (record_btrace_start_replaying): Remove reference to
12161 btrace_thread_info::begin.
12162
8286623c
TW
121632017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12164
12165 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12166 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12167 ftrace_update_function): Remove arguments that implicitly were always
12168 BTINFO->END.
12169 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
12170 Don't pass BTINFO->END.
12171
a0f1b963
TW
121722017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12173
12174 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
12175 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
12176 btrace_find_insn_by_number): Replace function segment pointer with
12177 index.
12178 (btrace_insn_cmp): Simplify.
12179 * btrace.h: (struct btrace_insn_iterator) Rename index to
12180 insn_index. Replace function segment pointer with index into function
12181 segment vector.
12182 * record-btrace.c (record_btrace_call_history): Replace function
12183 segment pointer use with index.
12184 (record_btrace_frame_sniffer): Retrieve function call segment through
12185 vector.
12186 (record_btrace_set_replay): Remove defunc't safety check.
12187
f158f208
TW
121882017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12189
12190 * btrace.c (btrace_ends_with_single_insn): New function.
12191 (btrace_call_get, btrace_call_number, btrace_call_begin,
12192 btrace_call_end, btrace_call_next, btrace_call_prev,
12193 btrace_find_call_by_number): Use index into call segment vector
12194 instead of pointer.
12195 (btrace_call_cmp): Simplify.
12196 * btrace.h (struct btrace_call_iterator): Replace function call segment
12197 pointer with index into vector.
12198 * record-btrace.c (record_btrace_call_history): Use index instead of
12199 pointer.
12200
521103fd
TW
122012017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12202
12203 * btrace.c (btrace_insn_begin, btrace_insn_end,
12204 btrace_find_insn_by_number): Add btinfo to iterator.
12205 * btrace.h (struct btrace_insn_iterator): Add btinfo.
12206
17b89b34
TW
122072017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12208
12209 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
12210 and save pointers directly.
12211 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
12212 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
12213 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
12214 changed signature of functions.
12215 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
12216 (btrace_fetch): Remove code that adds btrace_function pointers to
12217 vector of btrace_functions.
12218 (btrace_clear): Simplify freeing vector of btrace_functions.
12219
2b51eddc
TW
122202017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12221
12222 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
12223 Replace VEC_* with std::vector functions.
12224 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
12225 (struct btrace_thread_info)<functions>: Change type to std::vector.
12226
db6be0d5
SM
122272017-05-30 Simon Marchi <simon.marchi@ericsson.com>
12228
12229 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
12230 "Removed targets and native configurations" up. Merge duplicate
12231 "New commands" sub-sections. Add "New options" sub-sections.
12232
b057297a
AH
122332017-05-26 Alan Hayward <alan.hayward@arm.com>
12234
12235 * defs.h (copy_integer_to_size): New declaration.
12236 * findvar.c (copy_integer_to_size): New function.
12237 (do_cint_test): New selftest function.
12238 (copy_integer_to_size_test): Likewise.
12239 (_initialize_findvar): Likewise.
12240 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
12241 (mips_fbsd_collect_reg): Use raw_collect_integer.
12242 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
12243 (mips64_fill_gregset): Use raw_collect_integer
12244 (mips64_fill_fpregset): Use raw_supply_integer.
12245 * regcache.c (regcache::raw_supply_integer): New function.
12246 (regcache::raw_collect_integer): Likewise.
12247 * regcache.h: (regcache::raw_supply_integer): New declaration.
12248 (regcache::raw_collect_integer): Likewise.
12249
b77b02a5
YQ
122502017-05-24 Yao Qi <yao.qi@linaro.org>
12251
12252 * Makefile.in (SFILES): Add gdbarch-selftests.c.
12253 (COMMON_OBS): Add gdbarch-selftests.o.
12254 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
12255 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
12256 * gdbarch-selftests.c: New file.
12257 * regcache.h (regcache) <~regcache>: Mark it virtual if
12258 GDB_SELF_TEST.
12259 <raw_write>: Likewise.
12260
e521e87e
YQ
122612017-05-24 Yao Qi <yao.qi@linaro.org>
12262
12263 * regcache.c (current_regcache): Change it to
12264 regcache::current_regcache.
12265 (regcache_observer_target_changed): Update.
12266 (regcache_thread_ptid_changed): Make it a regcache static
12267 method.
12268 (regcache_thread_ptid_changed): Update.
12269 (class regcache_access): New.
12270 (current_regcache_test): Update.
12271 (_initialize_regcache): Update.
12272 * regcache.h: Include forward_list.
12273 (regcache): Declare regcache_thread_ptid_changed and declare
12274 registers_changed_ptid as friend.
12275
d8e07dda
YQ
122762017-05-24 Yao Qi <yao.qi@linaro.org>
12277
12278 * i387-tdep.c (i387_register_to_value): Use register_size
12279 instead of TYPE_LENGTH.
12280 * m68k-tdep.c (m68k_register_to_value): Likewise.
12281
8c8f9122
YQ
122822017-05-24 Yao Qi <yao.qi@linaro.org>
12283
12284 * i387-tdep.c (i387_convert_register_p): Return false if type
12285 code isn't TYPE_CODE_FLT.
12286
68fce50f
YQ
122872017-05-24 Yao Qi <yao.qi@linaro.org>
12288
12289 * alpha-tdep.c (alpha_convert_register_p): Return true if type
12290 length is 4.
12291 (alpha_register_to_value): Remove type length check.
12292 (alpha_value_to_register): Likewise.
12293
88954b49
YQ
122942017-05-24 Yao Qi <yao.qi@linaro.org>
12295
12296 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
12297 TYPE_CODE_FLT.
12298
e3ec9b69
YQ
122992017-05-24 Yao Qi <yao.qi@linaro.org>
12300
12301 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
12302 TYPE_CODE_FLT or not.
12303
cdd238da
YQ
123042017-05-24 Yao Qi <yao.qi@linaro.org>
12305
12306 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
12307 * avr-tdep.c (avr_gdbarch_init): Likewise.
12308 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12309 * cris-tdep.c (cris_gdbarch_init): Likewise.
12310 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12311 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12312 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12313 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
12314 * mep-tdep.c (mep_gdbarch_init): Likewise.
12315 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12316 * mips-tdep.c (mips_gdbarch_init): Likewise.
12317 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12318 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12319 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12320 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12321 * v850-tdep.c (v850_gdbarch_init): Likewise.
12322
7a3929c4
YQ
123232017-05-24 Yao Qi <yao.qi@linaro.org>
12324
12325 * selftest-arch.c (tests_with_arch): Call registers_changed
12326 and reinit_frame_cache.
12327 * selftest.c (run_self_tests): Likewise.
12328
f4985dba
YQ
123292017-05-24 Yao Qi <yao.qi@linaro.org>
12330
12331 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
12332 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
12333
ab20fa4a
YQ
123342017-05-24 Yao Qi <yao.qi@linaro.org>
12335
12336 * rl78-tdep.c (rl78_gdbarch_init): Don't call
12337 set_gdbarch_print_insn.
12338
f532ab94
YQ
123392017-05-24 Yao Qi <yao.qi@linaro.org>
12340
12341 * h8300-tdep.c (h8300_gdbarch_init): Don't call
12342 set_gdbarch_print_insn.
12343
39503f82
YQ
123442017-05-24 Yao Qi <yao.qi@linaro.org>
12345
12346 * alpha-tdep.c (alpha_gdbarch_init): Don't call
12347 set_gdbarch_print_insn.
12348 * arc-tdep.c (arc_gdbarch_init): Likewise.
12349 * arch-utils.c: include dis-asm.h.
12350 (default_print_insn): New function.
12351 * arch-utils.h (default_print_insn): Declare.
12352 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
12353 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12354 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
12355 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
12356 * frv-tdep.c (frv_gdbarch_init): Likewise.
12357 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12358 * gdbarch.sh (print_insn): Use default_print_insn.
12359 * gdbarch.c: Regenerated.
12360 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
12361 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
12362 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12363 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
12364 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12365 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
12366 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
12367 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
12368 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
12369 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12370 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12371 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12372 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12373 * mt-tdep.c (mt_gdbarch_init): Likewise.
12374 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12375 * nios2-tdep.c (nios2_print_insn): Remove.
12376 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
12377 * rx-tdep.c (rx_gdbarch_init): Likewise.
12378 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
12379 * score-tdep.c (score_print_insn): Remove.
12380 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
12381 * sh-tdep.c (sh_gdbarch_init): Likewise.
12382 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12383 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12384 * tic6x-tdep.c (tic6x_print_insn): Remove.
12385 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
12386 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
12387 * v850-tdep.c (v850_gdbarch_init): Likewise.
12388 * vax-tdep.c (vax_gdbarch_init): Likewise.
12389 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12390 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
12391
f7241d4f
JB
123922017-05-23 John Baldwin <jhb@FreeBSD.org>
12393
12394 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
12395 (MIPS_FP0_REGNUM): Remove.
12396 (MIPS_FSR_REGNUM): Remove.
12397 (mips_fbsd_supply_fpregs): Use mips_regnum.
12398 (mips_fbsd_supply_gregs): Likewise.
12399 (mips_fbsd_collect_fpregs): Likewise.
12400 (mips_fbsd_collect_gregs): Likewise.
12401
d489d81d
JB
124022017-05-23 John Baldwin <jhb@FreeBSD.org>
12403
12404 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
12405 (getpfpregs_supplies): New function.
12406 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
12407 getfpregs_supplies.
12408 (mips_fbsd_store_inferior_registers): Likewise.
12409
e11b3cdc
PA
124102017-05-22 Pedro Alves <palves@redhat.com>
12411
12412 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
12413 maintainer.
12414
0f068fb5
AH
124152017-05-22 Alan Hayward <alan.hayward@arm.com>
12416
12417 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
12418 (store_register): Likewise.
12419 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
12420 (get_decimal_float_return_value): Likewise.
12421 (do_ppc_sysv_return_value): Likewise.
12422 (ppc64_sysv_abi_push_integer): Likewise.
12423 (ppc64_sysv_abi_push_freg): Likewise.
12424 (ppc64_sysv_abi_return_value_base): Likewise.
12425 (ppc64_sysv_abi_return_value): Likewise.
12426 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
12427 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
12428 * rs6000-nat.c: Likewise.
12429 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
12430 (rs6000_value_to_register): Likewise.
12431 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
12432
e6cf65f2
TT
124332017-05-21 Tom Tromey <tom@tromey.com>
12434
12435 PR rust/21466:
12436 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
12437 arrays as "[T]", not "[T; ]".
12438
43cc5389
TT
124392017-05-19 Tom Tromey <tom@tromey.com>
12440
12441 PR rust/21484:
12442 * rust-lang.c (exp_descriptor_rust): New function.
12443 (rust_language_defn): Use it.
12444 * p-lang.c (pascal_language_defn): Update.
12445 * opencl-lang.c (opencl_language_defn): Update.
12446 * objc-lang.c (objc_language_defn): Update.
12447 * m2-lang.c (m2_language_defn): Update.
12448 * language.h (struct language_defn)
12449 <la_watch_location_expression>: New member.
12450 * language.c (unknown_language_defn, auto_language_defn)
12451 (local_language_defn): Update.
12452 * go-lang.c (go_language_defn): Update.
12453 * f-lang.c (f_language_defn): Update.
12454 * d-lang.c (d_language_defn): Update.
12455 * c-lang.h (c_watch_location_expression): Declare.
12456 * c-lang.c (c_watch_location_expression): New function.
12457 (c_language_defn, cplus_language_defn, asm_language_defn)
12458 (minimal_language_defn): Use it.
12459 * breakpoint.c (watch_command_1): Call
12460 la_watch_location_expression.
12461 * ada-lang.c (ada_language_defn): Update.
12462
7a6e7fcc
RO
124632017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12464
6e7e1744
RO
12465 PR tui/21482
12466 * gdb_curses.h (NOMACROS): Define.
12467 (NCURSES_NOMACROS): Define.
12468
124692017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12470
12471 PR tui/21482
7a6e7fcc
RO
12472 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
12473 arg to char *.
12474 * tui/tui-wingeneral.c (box_win): Likewise.
12475 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
12476 (tui_show_source_line): Likewise.
12477 (tui_show_exec_info_content): Likewise.
12478
1933fd8e
VM
124792017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12480
12481 * sparc-tdep.c (sparc_structure_return_p)
12482 (sparc_arg_on_registers_p): New functions.
12483 (sparc32_store_arguments): Use them.
12484 * sparc64-tdep.c (sparc64_16_byte_align_p)
12485 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
12486 Handle TYPE_CODE_ARRAY.
12487
21873064
YQ
124882017-05-17 Yao Qi <yao.qi@linaro.org>
12489
12490 * cli/cli-decode.c (add_alias_cmd): New function.
12491 * command.h (add_alias_cmd): Declare.
12492 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
12493 instead call add_alias_cmd.
12494
2b351b19
PA
124952017-05-17 Pedro Alves <palves@redhat.com>
12496
12497 * Makefile.in (nat_extra_makefile_frag): Rename to ...
12498 (nat_makefile_frag): ... this. All references updated.
12499 * configure.ac: Likewise.
12500 * configure.nat: Likewise. Enhance comments.
12501 * configure: Regenerate.
12502
5f2ad7a3
RO
125032017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12504
12505 * procfs.c (procfs_create_inferior): Change prototype to match
12506 definition.
12507
adf3dde5
EZ
125082017-05-13 Eli Zaretskii <eliz@gnu.org>
12509
12510 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
12511 C++ compiler warning.
12512
6830f270
TT
125132017-05-12 Tom Tromey <tom@tromey.com>
12514
12515 PR rust/21483:
12516 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
12517 recurse, just call value_struct_elt directly.
12518
68f2f2e3
TT
125192017-05-12 Tom Tromey <tom@tromey.com>
12520
12521 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
12522 OP_RUST_ARRAY>: Fix.
12523
256afbc2
TT
125242017-05-12 Tom Tromey <tom@tromey.com>
12525
12526 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
12527
94bb8dfe
YQ
125282017-05-09 Yao Qi <yao.qi@linaro.org>
12529
12530 * regcache.c: Include <forward_list>.
12531 (struct regcache_list): Remove.
12532 (current_regcache): Update.
12533 (get_thread_arch_aspace_regcache): Update for std::forward_list.
12534 (regcache_thread_ptid_changed): Likewise.
12535 (registers_changed_ptid): Likewise.
12536 (current_regcache_size): Likewise.
12537
8248946c
YQ
125382017-05-09 Yao Qi <yao.qi@linaro.org>
12539
12540 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
12541 (current_regcache_size): New function.
12542 (current_regcache_test): New function.
12543 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
12544
313c5961
AH
125452017-05-08 Alan Hayward <alan.hayward@arm.com>
12546
12547 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
12548 (print_gp_register_row): Use get_frame_register_value.
12549
27bfc1d1
AH
125502017-05-08 Alan Hayward <alan.hayward@arm.com>
12551
12552 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
12553 (mips_supply_fpregset): Likewise.
12554 (mips64_supply_gregset): Likewise.
12555
146e6c5c
AH
125562017-05-08 Alan Hayward <alan.hayward@arm.com>
12557
12558 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
12559 regcache->raw_supply_zeroed.
12560
e50f25ec
SDJ
125612017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12562
12563 * configure.nat: Rearrange 'case' statements to match
12564 host before cpu.
12565
21ea5acd
SDJ
125662017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12567
12568 * Makefile.in: Remove "@host_makefile_frag@". Add variables
12569 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
12570 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
12571 "@nat_extra_makefile_frag@".
12572 (Makefile): Remove dependency on "@frags@".
12573 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
12574 (data-directory/Makefile): Likewise.
12575 * config/aarch64/linux.mh: Deleted; moved contents to
12576 "gdb/configure.nat".
12577 * config/alpha/alpha-linux.mh: Likewise.
12578 * config/alpha/nbsd.mh: Likewise.
12579 * config/arm/linux.mh: Likewise.
12580 * config/arm/nbsdelf.mh: Likewise.
12581 * config/i386/cygwin.mh: Likewise.
12582 * config/i386/cygwin64.mh: Likewise.
12583 * config/i386/darwin.mh: Likewise.
12584 * config/i386/fbsd.mh: Likewise.
12585 * config/i386/fbsd64.mh: Likewise.
12586 * config/i386/go32.mh: Likewise.
12587 * config/i386/i386gnu.mh: Likewise.
12588 * config/i386/i386sol2.mh: Likewise.
12589 * config/i386/linux.mh: Likewise.
12590 * config/i386/linux64.mh: Likewise.
12591 * config/i386/mingw.mh: Likewise.
12592 * config/i386/mingw64.mh: Likewise.
12593 * config/i386/nbsd64.mh: Likewise.
12594 * config/i386/nbsdelf.mh: Likewise.
12595 * config/i386/nto.mh: Likewise.
12596 * config/i386/obsd.mh: Likewise.
12597 * config/i386/obsd64.mh: Likewise.
12598 * config/i386/sol2-64.mh: Likewise.
12599 * config/ia64/linux.mh: Likewise.
12600 * config/m32r/linux.mh: Likewise.
12601 * config/m68k/linux.mh: Likewise.
12602 * config/m68k/nbsdelf.mh: Likewise.
12603 * config/m68k/obsd.mh: Likewise.
12604 * config/m88k/obsd.mh: Likewise.
12605 * config/mips/fbsd.mh: Likewise.
12606 * config/mips/linux.mh: Likewise.
12607 * config/mips/nbsd.mh: Likewise.
12608 * config/mips/obsd64.mh: Likewise.
12609 * config/pa/linux.mh: Likewise.
12610 * config/pa/nbsd.mh: Likewise.
12611 * config/pa/obsd.mh: Likewise.
12612 * config/powerpc/aix.mh: Likewise.
12613 * config/powerpc/fbsd.mh: Likewise.
12614 * config/powerpc/linux.mh: Likewise.
12615 * config/powerpc/nbsd.mh: Likewise.
12616 * config/powerpc/obsd.mh: Likewise.
12617 * config/powerpc/ppc64-linux.mh: Likewise.
12618 * config/powerpc/spu-linux.mh: Likewise.
12619 * config/s390/linux.mh: Likewise.
12620 * config/sh/nbsd.mh: Likewise.
12621 * config/sparc/fbsd.mh: Likewise.
12622 * config/sparc/linux.mh: Likewise.
12623 * config/sparc/linux64.mh: Likewise.
12624 * config/sparc/nbsd64.mh: Likewise.
12625 * config/sparc/nbsdelf.mh: Likewise.
12626 * config/sparc/obsd64.mh: Likewise.
12627 * config/sparc/sol2.mh: Likewise.
12628 * config/tilegx/linux.mh: Likewise.
12629 * config/vax/nbsdelf.mh: Likewise.
12630 * config/vax/obsd.mh: Likewise.
12631 * config/xtensa/linux.mh: Likewise.
12632 * config/i386/i386gnu.mn: New file, with excerpts from
12633 "config/i386/i386gnu.mh".
12634 * configure: Regenerate.
12635 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
12636 *.mh files under "gdb/config".
12637 * configure.nat: New file, with contents from the
12638 "gdb/config/*/*.mh" files.
12639
7ed1acaf
TW
126402017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
12641
12642 * btrace.c (btrace_clear): Free insn vector.
12643
e13cb306
PA
126442017-05-05 Pedro Alves <palves@redhat.com>
12645
12646 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
12647 * configure: Regenerate.
12648
5ed8105e
PA
126492017-05-04 Pedro Alves <palves@redhat.com>
12650
12651 * Makefile.in (SFILES): Add progspace-and-thread.c.
12652 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
12653 (COMMON_OBS): Add progspace-and-thread.o.
12654 * breakpoint.c: Include "progspace-and-thread.h".
12655 (update_inserted_breakpoint_locations)
12656 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
12657 Use scoped_restore_current_pspace_and_thread.
12658 (create_std_terminate_master_breakpoint): Use
12659 scoped_restore_current_program_space.
12660 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
12661 (print_breakpoint_location): Use
12662 scoped_restore_current_program_space.
12663 (bp_loc_is_permanent): Use
12664 scoped_restore_current_pspace_and_thread.
12665 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
12666 (download_tracepoint_locations): Use
12667 scoped_restore_current_pspace_and_thread.
12668 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
12669 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
12670 (enum step_over_calls_kind): Moved from inferior.h.
12671 (class scoped_restore_current_thread): New class.
12672 * gdbthread.h (make_cleanup_restore_current_thread): Delete
12673 declaration.
12674 (scoped_restore_current_thread): New class.
12675 * infcmd.c: Include "common/gdb_optional.h".
12676 (continue_1, proceed_after_attach): Use
12677 scoped_restore_current_thread.
12678 (notice_new_inferior): Use scoped_restore_current_thread.
12679 * inferior.c: Include "progspace-and-thread.h".
12680 (restore_inferior, save_current_inferior): Delete.
12681 (add_inferior_command, clone_inferior_command): Use
12682 scoped_restore_current_pspace_and_thread.
12683 * inferior.h (scoped_restore_current_inferior): New class.
12684 * infrun.c: Include "progspace-and-thread.h" and
12685 "common/gdb_optional.h".
12686 (follow_fork_inferior): Use
12687 scoped_restore_current_pspace_and_thread.
12688 (scoped_restore_exited_inferior): New class.
12689 (handle_vfork_child_exec_or_exit): Use
12690 scoped_restore_exited_inferior,
12691 scoped_restore_current_pspace_and_thread,
12692 scoped_restore_current_thread and scoped_restore.
12693 (fetch_inferior_event): Use scoped_restore_current_thread.
12694 * linespec.c (decode_line_full, decode_line_1): Use
12695 scoped_restore_current_program_space.
12696 * mi/mi-main.c: Include "progspace-and-thread.h".
12697 (exec_continue): Use scoped_restore_current_thread.
12698 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
12699 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
12700 * proc-service.c (ps_pglobal_lookup): Use
12701 scoped_restore_current_program_space.
12702 * progspace-and-thread.c: New file.
12703 * progspace-and-thread.h: New file.
12704 * progspace.c (release_program_space, clone_program_space): Use
12705 scoped_restore_current_program_space.
12706 (restore_program_space, save_current_program_space)
12707 (save_current_space_and_thread): Delete.
12708 (switch_to_program_space_and_thread): Moved to
12709 progspace-and-thread.c.
12710 * progspace.h (save_current_program_space)
12711 (save_current_space_and_thread): Delete declarations.
12712 (scoped_restore_current_program_space): New class.
12713 * remote.c (remote_btrace_maybe_reopen): Use
12714 scoped_restore_current_thread.
12715 * symtab.c: Include "progspace-and-thread.h".
12716 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
12717 * thread.c (print_thread_info_1): Use
12718 scoped_restore_current_thread.
12719 (struct current_thread_cleanup): Delete.
12720 (do_restore_current_thread_cleanup)
12721 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
12722 (scoped_restore_current_thread::~scoped_restore_current_thread):
12723 ... this new dtor.
12724 (make_cleanup_restore_current_thread): Rename/convert to ...
12725 (scoped_restore_current_thread::scoped_restore_current_thread):
12726 ... this new ctor.
12727 (thread_apply_all_command): Use scoped_restore_current_thread.
12728 (thread_apply_command): Use scoped_restore_current_thread.
12729 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
12730 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
12731
f6223dbb
PA
127322017-05-04 Pedro Alves <palves@redhat.com>
12733
12734 * thread.c (make_cleanup_restore_current_thread): Move
12735 find_thread_ptid call before the is_stopped call. Assert that the
12736 thread is found. Replace is_stopped call by checking the thread's
12737 state directly. Remove unnecessary NULL-thread check.
12738
3c3ae77e
PA
127392017-05-04 Pedro Alves <palves@redhat.com>
12740
12741 * corelow.c (thread_section_name): New class.
12742 (get_core_register_section, get_core_siginfo): Use it.
12743
45eba0ab
AA
127442017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
12745
12746 * corelow.c (sniff_core_bfd): Remove extra semicolon.
12747 (get_core_register_section): Remove xfree of NULL pointer.
12748
f81fdd35
AH
127492017-05-03 Alan Hayward <alan.hayward@arm.com>
12750
12751 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
12752 * regcache.c (regcache::raw_supply_zeroed): New function.
12753 * regcache.h (regcache::raw_supply_zeroed): New declaration.
12754
35837774
SM
127552017-05-03 Simon Marchi <simon.marchi@ericsson.com>
12756
12757 * gdbarch.sh: Remove commented out definition of
12758 TARGET_CHAR_BIT.
12759 * gdbarch.h: Re-generate.
12760
c94fee56
SDJ
127612017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
12762
12763 * configure: Regenerate.
12764
d17f7b36
SM
127652017-05-02 Simon Marchi <simon.marchi@ericsson.com>
12766
12767 * solib-target.c (solib_target_relocate_section_addresses):
12768 Remove num_section_bases, num_bases, segment_bases variables.
12769
b560ebd6
SM
127702017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12771
12772 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
12773
f2f46dfc
SM
127742017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12775
12776 * solib-target.c: Include <vector>
12777 (struct lm_info_target) <~lm_info_target>: Remove.
12778 <segment_bases, section_bases>: Change type to
12779 std::vector<CORE_ADDR>.
12780 (library_list_start_segment, library_list_start_section,
12781 library_list_end_library,
12782 solib_target_relocate_section_addresses): Adjust.
12783
a0ff9e1a
SM
127842017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12785
12786 * gdbarch.sh (software_single_step): Change return type to
12787 std::vector<CORE_ADDR>.
12788 * gdbarch.c, gdbarch.h: Re-generate.
12789 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
12790 Adjust.
12791 (arm_deal_with_atomic_sequence_raw): Adjust.
12792 (thumb_get_next_pcs_raw): Adjust.
12793 (arm_get_next_pcs_raw): Adjust.
12794 (arm_get_next_pcs): Adjust.
12795 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
12796 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
12797 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
12798 (alpha_software_single_step): Adjust.
12799 * alpha-tdep.h (alpha_software_single_step): Adjust.
12800 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
12801 * arm-tdep.c (arm_software_single_step): Adjust.
12802 (arm_breakpoint_kind_from_current_state): Adjust.
12803 * arm-tdep.h (arm_software_single_step): Adjust.
12804 * breakpoint.c (insert_single_step_breakpoint): Adjust.
12805 * cris-tdep.c (cris_software_single_step): Adjust.
12806 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
12807 (micromips_deal_with_atomic_sequence): Adjust.
12808 (deal_with_atomic_sequence): Adjust.
12809 (mips_software_single_step): Adjust.
12810 * mips-tdep.h (mips_software_single_step): Adjust.
12811 * moxie-tdep.c (moxie_software_single_step): Adjust.
12812 * nios2-tdep.c (nios2_software_single_step): Adjust.
12813 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
12814 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
12815 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
12816 * s390-linux-tdep.c (s390_software_single_step): Adjust.
12817 * sparc-tdep.c (sparc_software_single_step): Adjust.
12818 * spu-tdep.c (spu_software_single_step): Adjust.
12819 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
12820
ea480a30
SM
128212017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12822
12823 * gdbarch.sh: Use semi-colon as field separator instead of colon.
12824 * gdbarch.h: Re-generate.
12825
d050f7d7
TW
128262017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12827
12828 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
12829 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
12830 * python/py-instruction.c, python/py-instruction.h: New file.
12831 * python/py-record.c: Add py-instruction.h include.
12832 (gdbpy_initialize_record): Make gdb.Instruction a super class of
12833 gdb.RecordInstruction.
12834 * python/python-internal.h: Add gdbpy_initialize_instruction
12835 declaration.
12836 * python/python.c (do_start_initialization): Add
12837 gdbpy_initialize_instruction.
12838
14f819c8
TW
128392017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12840
12841 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
12842 Remove.
12843 (btrace_func_from_recpy_func): New function.
12844 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
12845 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
12846 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
12847 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
12848 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
12849 Also, use new helper functions.
12850 (btpy_list_item): Use new helper functions.
12851 (recpy_bt_function_call_history): Use new type name.
12852 (btpy_call_getset): Remove.
12853 (gdbpy_initialize_btrace): Remove code to initialize
12854 gdb.BtraceFunctionCall.
12855 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
12856 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
12857 recpy_bt_func_prev, recpy_bt_func_next): New export.
12858 * python/py-record.c (recpy_func_type): New static object.
12859 (recpy_func_new, recpy_func_level, recpy_func_symbol,
12860 recpy_func_instructions, recpy_func_up, recpy_func_prev,
12861 recpy_func_next): New function.
12862 (recpy_element_hash, recpy_element_richcompare): Updated comment.
12863 (recpy_func_getset): New static object.
12864 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
12865 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
12866
0ed5da75
TW
128672017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12868
12869 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
12870 (btpy_object, btpy_insn_type, btpy_new): Remove.
12871 (btpy_list_object): Use gdb.RecordInstruction type instead of
12872 gdb.BtraceInstruction type.
12873 (btrace_insn_from_recpy_insn): New function.
12874 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
12875 btpy_new.
12876 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
12877 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
12878 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
12879 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
12880 instead of btpy_object.
12881 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12882 btpy_insn_data, btpy_insn_decode): Rename to ...
12883 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
12884 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
12885 recpy_bt_insn_decode): This. Also, use new helper functions.
12886 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
12887 recpy_insn_type.
12888 (btpy_insn_getset): Remove.
12889 (gdbpy_initialize_btrace): Remove code to initialize
12890 gdb.BtraceInstruction. Use recpy_element_object.
12891 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
12892 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
12893 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
12894 * python/py-record.c (recpy_insn_type): New static object.
12895 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
12896 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
12897 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
12898 New function.
12899 (recpy_insn_getset): New static object.
12900 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
12901 * python/py-record.h (recpy_element_object): New typedef.
12902 (recpy_insn_type, recpy_insn_new): New export.
12903
913aeadd
TW
129042017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12905
12906 * py-record-btrace.c (btpy_insn_new): Removed.
12907 (btpy_insn_or_gap_new): New function.
12908 (btpy_insn_error): Removed.
12909 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12910 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
12911 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
12912 btpy_insn_or_gap_new instead of btpy_insn_new.
12913 (btpy_insn_getset): Remove btpy_insn_error.
12914 * py-record.c (recpy_gap_type): New static object.
12915 (recpy_gap_object): New typedef.
12916 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
12917 recpy_gap_reason_string): New function.
12918 (recpy_gap_getset): New static object.
12919 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
12920 * py-record.h (recpy_gap_new): New export.
12921
a3be24ad
TW
129222017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12923
12924 * python/py-record.c (recpy_ptid): Remove.
12925 (recpy_record_getset): Remove recpy_ptid.
12926
ae20e79a
TW
129272017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12928
12929 * btrace.c (btrace_fetch): Set inferior_ptid.
12930 * python/py-record-btrace.c: Add "py-record.h" include.
12931 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
12932 recpy_bt_end, recpy_bt_instruction_history,
12933 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
12934 in gdb.Record object instead of current ptid.
12935 * python/py-record.c: Include new "py-record.h" file.
12936 (recpy_record_object): Moved to py-record.h.
12937 * python/py-record.h: New file.
12938
8d0050ea
TW
129392017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12940
12941 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
12942 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
12943 indentation.
12944
3f380b50
JB
129452017-05-01 Joel Brobecker <brobecker@adacore.com>
12946
12947 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
12948 the past maintainers section.
12949
07495424
YQ
129502017-04-28 Yao Qi <yao.qi@linaro.org>
12951
12952 * infcmd.c (get_return_value): Use regcache ctor, and remove
12953 cleanup.
12954
deb1fa3e
YQ
129552017-04-28 Yao Qi <yao.qi@linaro.org>
12956 Pedro Alves <palves@redhat.com>
12957
12958 * regcache.c (regcache::regcache): New tag dispatch ctor.
12959 (do_cooked_read): Moved above.
12960 (regcache_dup): Use the tag dispatch ctor..
12961 * regcache.h (regcache): Declare ctor, delete copy ctor and
12962 assignment operator, remove friend regcache_dup.
12963
b421c83c
YQ
129642017-04-28 Yao Qi <yao.qi@linaro.org>
12965
12966 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
12967 call method save instead of regcache_cpy.
12968 * regcache.h (struct regcache): Make regcache_dup a friend.
12969
ef79d9a3
YQ
129702017-04-28 Yao Qi <yao.qi@linaro.org>
12971
12972 * regcache.c (struct regcache): Move to regcache.h
12973 (regcache::arch): New method.
12974 (regcache_get_ptid): Update.
12975 (get_regcache_arch): Call arch method.
12976 (get_regcache_aspace): Call method aspace.
12977 (register_buffer): Change it to method.
12978 (regcache_save): Change it to regcache::save.
12979 (regcache_restore): Likewise.
12980 (regcache_cpy_no_passthrough): Remove the declaration.
12981 (regcache_cpy): Call methods restore and cpy_no_passthrough.
12982 (regcache_cpy_no_passthrough): Change it to method
12983 cpy_no_passthrough.
12984 (regcache_register_status): Change it to method
12985 get_register_status.
12986 (regcache_invalidate): Change it to method invalidate.
12987 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
12988 (regcache_raw_update): Change it to method raw_update.
12989 (regcache_raw_read): Likewise.
12990 (regcache_raw_read_signed): Likewise.
12991 (regcache_raw_read_unsigned): Likewise.
12992 (regcache_raw_write_signed): Likewise.
12993 (regcache_raw_write_unsigned): Likewise.
12994 (regcache_cooked_read): Likewise.
12995 (regcache_cooked_read_value): Likewise.
12996 (regcache_cooked_read_signed): Likewise.
12997 (regcache_cooked_read_unsigned): Likewise.
12998 (regcache_cooked_write_signed): Likewise.
12999 (regcache_cooked_write_unsigned): Likewise.
13000 (regcache_raw_set_cached_value): Likewise.
13001 (regcache_raw_write): Likewise.
13002 (regcache_cooked_write): Likewise.
13003 (regcache_xfer_part): Likewise.
13004 (regcache_raw_read_part): Likewise.
13005 (regcache_raw_write_part): Likewise.
13006 (regcache_cooked_read_part): Likewise.
13007 (regcache_cooked_write_part): Likewise.
13008 (regcache_raw_supply): Likewise.
13009 (regcache_raw_collect): Likewise.
13010 (regcache_transfer_regset): Likewise.
13011 (regcache_supply_regset): Likewise.
13012 (regcache_collect_regset): Likewise.
13013 (regcache_debug_print_register): Likewise.
13014 (enum regcache_dump_what): Move it to regcache.h.
13015 (regcache_dump): Change it to method dump.
13016 * regcache.h (enum regcache_dump_what): New.
13017 (class regcache): New.
13018 * target.c (target_fetch_registers): Call method
13019 debug_print_register.
13020 (target_store_registers): Likewise.
13021
f8fdb78e
SM
130222017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13023
13024 * windows-nat.c (struct lm_info_windows): Initialize field.
13025 (windows_make_so): Allocate lm_info_windows with new.
13026 (windows_free_so): Free lm_info_windows with delete.
13027
9ccbfd7b
SM
130282017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13029
13030 * solib-darwin.c (struct lm_info_darwin): Initialize field.
13031 (darwin_current_sos): Allocate lm_info_darwin with new, remove
13032 cleanup.
13033 (darwin_free_so): Free lm_info_darwin with delete.
13034
76e75227
SM
130352017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13036
13037 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
13038 <l_addr_p>: Change type to bool.
13039 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
13040 (svr4_free_so): Free lm_info_svr4 with delete.
13041 (svr4_copy_library_list): Replace memcpy with call to copy
13042 constructor.
13043 (library_list_start_library, svr4_default_sos): Allocate
13044 lm_info_svr4 with new.
13045
51046d9e
SM
130462017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13047
13048 * solib-target.c (struct lm_info_target): Add destructor,
13049 initialize fields.
13050 <name>: Change type to std::string.
13051 (library_list_start_library): Allocate lm_info_target with new.
13052 (solib_target_free_library_list): Free lm_info_target with
13053 delete.
13054 (solib_target_current_sos): Adapt to std::string.
13055 (solib_target_free_so): Free lm_info_target with delete.
13056
4023ae76
SM
130572017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13058
13059 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
13060 fields.
13061 (frv_current_sos): Allocate lm_info_frv with new.
13062 (frv_relocate_main_executable): Free lm_info_frv with delete,
13063 allocate with new.
13064 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
13065
af43057b
SM
130662017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13067
13068 * solib-frv.c (struct lm_info_frv): Fix indentation.
13069
b0911207
SM
130702017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13071
13072 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
13073 map field.
13074 (dsbt_current_sos): Allocate lm_info_dsbt with new.
13075 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
13076 and allocate with new.
13077 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
13078
6c401f72
SM
130792017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13080
13081 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
13082 <filename, member_name>: Change type to std::string.
13083 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
13084 (library_list_start_library): Allocate lm_info_aix with new.
13085 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
13086 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
13087 with copy constructor.
13088
d0e449a1
SM
130892017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13090
13091 * solist.h (struct lm_info): Remove.
13092 (struct lm_info_base): New class.
13093 (struct so_list) <lm_info>: Change type to lm_info_base *.
13094 * nto-tdep.c (struct lm_info): Remove.
13095 (lm_addr): Adjust.
13096 * solib-aix.c (struct lm_info): Rename to ...
13097 (struct lm_info_aix): ... this. Extend lm_info_base.
13098 (lm_info_p): Rename to ...
13099 (lm_info_aix_p): ... this, and adjust.
13100 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
13101 solib_aix_parse_libraries, library_list_start_library,
13102 solib_aix_free_library_list, solib_aix_parse_libraries,
13103 solib_aix_get_library_list,
13104 solib_aix_relocate_section_addresses, solib_aix_free_so,
13105 solib_aix_get_section_offsets,
13106 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
13107 Adjust.
13108 (struct solib_aix_inferior_data) <library_list>: Adjust.
13109 * solib-darwin.c (struct lm_info): Rename to ...
13110 (struct lm_info_darwin): ... this. Extend lm_info_base.
13111 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
13112 * solib-dsbt.c (struct lm_info): Rename to ...
13113 (struct lm_info_dsbt): ... this. Extend lm_info_base.
13114 (struct dsbt_info) <main_executable_lm_info): Adjust.
13115 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
13116 dsbt_relocate_section_addresses): Adjust.
13117 * solib-frv.c (struct lm_info): Rename to ...
13118 (struct lm_info_frv): ... this. Extend lm_info_base.
13119 (main_executable_lm_info): Adjust.
13120 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
13121 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
13122 find_canonical_descriptor_in_load_object,
13123 frv_fdpic_find_canonical_descriptor): Adjust.
13124 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
13125 to lm_info_svr4.
13126 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
13127 svr4_clear_so, svr4_copy_library_list,
13128 library_list_start_library, svr4_default_sos, svr4_read_so_list,
13129 svr4_current_sos, svr4_fetch_objfile_link_map,
13130 solist_update_incremental): Adjust.
13131 * solib-svr4.h (struct lm_info_svr4): Move here from
13132 solib-svr4.c.
13133 * solib-target.c (struct lm_info): Rename to ...
13134 (struct lm_info_target): ... this. Extend lm_info_base.
13135 (lm_info_p): Rename to ...
13136 (lm_info_target_p): ... this.
13137 (solib_target_parse_libraries, library_list_start_segment,
13138 library_list_start_section, library_list_start_library,
13139 library_list_end_library, solib_target_free_library_list,
13140 solib_target_current_sos, solib_target_free_so,
13141 solib_target_relocate_section_addresses): Adjust.
13142 * windows-nat.c (struct lm_info): Rename to ...
13143 (struct lm_info_windows): ... this. Extend lm_info_base.
13144 (windows_make_so, handle_load_dll, handle_unload_dll,
13145 windows_xfer_shared_libraries): Adjust.
13146
434a4023
SM
131472017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13148
13149 * solib-darwin.c (struct darwin_so_list): Remove.
13150 (darwin_current_sos): Allocate an so_list object instead of a
13151 darwin_so_list, separately allocate an lm_info object.
13152 (darwin_free_so): Free lm_info.
13153
428544e8
JB
131542017-04-28 John Baldwin <jhb@FreeBSD.org>
13155
13156 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
13157 with fprintf_filtered.
13158
4621115f
YQ
131592017-04-28 Yao Qi <yao.qi@linaro.org>
13160
13161 * regcache.c (regcache::regcache): New function.
13162 (regcache::~regcache): New function.
13163 (regcache_xmalloc_1): Remove.
13164 (regcache_xmalloc): Call new regcache.
13165 (regcache_xfree): Call delete regcache.
13166 (get_thread_arch_aspace_regcache): Call new regcache.
13167
339053c2
YQ
131682017-04-28 Yao Qi <yao.qi@linaro.org>
13169
13170 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
13171 lwp instead of ptid_get_lwp.
13172
7974a605
YQ
131732017-04-28 Yao Qi <yao.qi@linaro.org>
13174
13175 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
13176 lwp_info instead of getting from inferior_ptid.
13177
e15c3eb4
KS
131782017-04-27 Keith Seitz <keiths@redhat.com>
13179
13180 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
13181 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
13182 (CV_CONVERSION_BADNESS): Define.
13183 (rank_one_type): Remove overly restrictive rvalue reference
13184 rank checks.
13185 Add cv-qualifier checks and subranks for type equality.
13186 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
13187 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
13188 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
13189
72bc1d24
SM
131902017-04-27 Simon Marchi <simon.marchi@ericsson.com>
13191
13192 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
13193 count when creating the object.
13194
55bcecda
UW
131952017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
13196 Ulrich Weigand <uweigand@de.ibm.com>
13197
13198 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
13199 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
13200 is used in AIX.
13201 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
13202 (process_xcoff_symbol): Likewise.
13203 (scan_xcoff_symtab): Likewise.
13204
5c99fcf8
AH
132052017-04-26 Alan Hayward <alan.hayward@arm.com>
13206
13207 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
13208 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
13209 (ia64_access_reg): Use get_frame_register_unsigned.
13210 (ia64_access_rse_reg): Likewise.
13211 (ia64_libunwind_frame_prev_register): Likewise.
13212
b41c5a85
JW
132132017-04-26 Jiong Wang <jiong.wang@arm.com>
13214
13215 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
13216 * gdbarch.c: Regenerated.
13217 * gdbarch.h: Regenerated.
13218 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
13219 visibility external.
13220 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
13221 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
13222 (enum cfa_how_kind): Move to ...
13223 (struct dwarf2_frame_state_reg_info): Likewise.
13224 (struct dwarf2_frame_state): Likewise.
13225 * dwarf2-frame.h: ... here.
13226 (dwarf2_frame_state_alloc_regs): New declaration.
13227 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
13228 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
13229
c185f580
AH
132302017-04-26 Alan Hayward <alan.hayward@arm.com>
13231
13232 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
13233 regcache_raw_read_unsigned.
13234 (xtensa_pseudo_register_write): Likewise.
13235
19c45594
AH
132362017-04-26 Alan Hayward <alan.hayward@arm.com>
13237
13238 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
13239 (nds32_pseudo_register_write): Likewise.
13240
4658f12e
YQ
132412017-04-25 Yao Qi <yao.qi@linaro.org>
13242
13243 * regcache.c (struct regcache) <readonly_p>: Change its type
13244 to bool.
13245 (regcache_xmalloc_1): Update parameter type and callers update.
13246
d581dda8
YQ
132472017-04-25 Yao Qi <yao.qi@linaro.org>
13248
13249 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
13250 set_gdbarch_wchar_bit.
13251 * arm-tdep.c (arm_gdbarch_init): Likewise.
13252
debed3db
PA
132532017-04-25 Pedro Alves <palves@redhat.com>
13254
13255 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
13256 (BothAreRelocatable, memcopy, memmove): Don't define.
13257 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
13258 macros.
13259
b0b92aeb
PA
132602017-04-25 Pedro Alves <palves@redhat.com>
13261
13262 * common/common-defs.h: Include "common/poison.h".
13263 * common/function-view.h: (Not, Or, Requires): Move to traits.h
13264 and adjust.
13265 * common/poison.h: New file.
13266 * common/traits.h: Include <type_traits>.
13267 (Not, Or, Requires): New, moved from common/function-view.h.
13268
16c4d54a
PA
132692017-04-25 Pedro Alves <palves@redhat.com>
13270
13271 * breakpoint.h (struct breakpoint): In-class initialize all
13272 fields. Make boolean fields "bool".
13273 * breakpoint.c (init_raw_breakpoint_without_location): Remove
13274 memset call and initializations no longer necessary.
13275
b5c36682
PA
132762017-04-25 Pedro Alves <palves@redhat.com>
13277
13278 * btrace.c (pt_btrace_insn_flags): Change parameter type to
13279 reference.
13280 (pt_btrace_insn): New function.
13281 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
13282
5625a286
PA
132832017-04-25 Pedro Alves <palves@redhat.com>
13284
13285 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
13286 "base" field and inherit from "bp_location" instead. Add
13287 non-default ctor.
13288 (allocate_location_exception): Use new non-default ctor.
13289 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
13290 (init_bp_location): Convert to ...
13291 (bp_location::bp_location): ... this new ctor, and remove memset
13292 call.
13293 (base_breakpoint_allocate_location): Use the new non-default ctor.
13294 * breakpoint.h (bp_location): Now a class. Declare default and
13295 non-default ctors. In-class initialize all members.
13296 (init_bp_location): Remove declaration.
13297
23bcc18f
PA
132982017-04-25 Pedro Alves <palves@redhat.com>
13299
13300 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
13301 assignment operator.
13302
e1ba3053
YQ
133032017-04-24 Yao Qi <yao.qi@linaro.org>
13304
13305 * doublest.c (convert_doublest_to_floatformat): Call
13306 floatformat_totalsize_bytes.
13307
10f489e5
TT
133082017-04-22 Tom Tromey <tom@tromey.com>
13309
13310 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
13311 ui_out_emit_list.
13312 * stack.c (print_frame): Use ui_out_emit_list.
13313 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13314 ui_out_emit_list.
13315 * mi/mi-main.c (print_one_inferior)
13316 (mi_cmd_data_list_register_names)
13317 (mi_cmd_data_list_register_values, mi_cmd_list_features)
13318 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
13319 ui_out_emit_list.
13320 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
13321 (mi_output_solib_attribs): Use ui_out_emit_list,
13322 ui_out_emit_tuple.
13323 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
13324 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
13325 (mi_cmd_stack_list_args, list_args_or_locals): Use
13326 ui_out_emit_list.
13327 * disasm.c (do_assembly_only): Use ui_out_emit_list.
13328 * breakpoint.c (print_solib_event, output_thread_groups): Use
13329 ui_out_emit_list.
13330
0092b74d
TT
133312017-04-22 Tom Tromey <tom@tromey.com>
13332
13333 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
13334 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
13335 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
13336
a14a62dd
TT
133372017-04-22 Tom Tromey <tom@tromey.com>
13338
13339 * tracepoint.c (tvariables_info_1)
13340 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
13341
46b9c129
TT
133422017-04-22 Tom Tromey <tom@tromey.com>
13343
13344 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
13345 annotate_arg_emitter.
13346 * breakpoint.c (print_mention_watchpoint)
13347 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
13348 * annotate.h (struct annotate_arg_emitter): New.
13349
2e783024
TT
133502017-04-22 Tom Tromey <tom@tromey.com>
13351
13352 * record-btrace.c (record_btrace_insn_history)
13353 (record_btrace_insn_history_range, record_btrace_call_history)
13354 (record_btrace_call_history_range): Use ui_out_emit_tuple.
13355 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
13356 ui_out_emit_tuple.
13357 * stack.c (print_frame_info): Use ui_out_emit_tuple.
13358 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
13359 * skip.c (skip_info): Use ui_out_emit_tuple.
13360 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
13361 * progspace.c (print_program_space): Use ui_out_emit_tuple.
13362 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
13363 * osdata.c (info_osdata): Use ui_out_emit_tuple.
13364 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13365 ui_out_emit_tuple.
13366 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
13367 (output_register, mi_cmd_data_read_memory)
13368 (mi_cmd_data_read_memory_bytes, mi_load_progress)
13369 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
13370 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
13371 Use ui_out_emit_tuple.
13372 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
13373 ui_out_emit_tuple.
13374 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13375 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
13376 * linux-thread-db.c (info_auto_load_libthread_db): Use
13377 ui_out_emit_tuple.
13378 * inferior.c (print_inferior): Use ui_out_emit_tuple.
13379 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
13380 * disasm.c (do_mixed_source_and_assembly_deprecated)
13381 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
13382 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
13383 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
13384 * breakpoint.c (print_one_breakpoint_location)
13385 (print_one_breakpoint): Use ui_out_emit_tuple.
13386 * auto-load.c (print_script, info_auto_load_cmd): Use
13387 ui_out_emit_tuple.
13388 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
13389
9be21bb4
SM
133902017-04-21 Simon Marchi <simon.marchi@ericsson.com>
13391
13392 * thread.c (print_thread_info_1): Remove dead code.
13393
0d4c07af
JK
133942017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13395
13396 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
13397 GDB_SELF_TEST.
13398 * arm-tdep.c (selftests::arm_record_test): Likewise.
13399
4daf993d
YQ
134002017-04-21 Yao Qi <yao.qi@linaro.org>
13401
13402 * regcache.c (regcache_restore): Remove argument 2. Replace
13403 argument 3 with regcache. Get register status from
13404 src->register_status and get register contents from
13405 register_buffer (src, regnum).
13406 (regcache_cpy): Update.
13407
a6c21d4a
PA
134082017-04-19 Pedro Alves <palves@redhat.com>
13409
13410 * gdbthread.h (thread): Add missing closing parenthesis in
13411 comment.
13412
3a3fd0fd
PA
134132017-04-19 Pedro Alves <palves@redhat.com>
13414
13415 * common/refcounted-object.h: New file.
13416 * gdbthread.h: Include "common/refcounted-object.h".
13417 (thread_info): Inherit from refcounted_object and add comments.
13418 (thread_info::incref, thread_info::decref)
13419 (thread_info::m_refcount): Delete.
13420 (thread_info::deletable): Use the refcounted_object::refcount()
13421 method.
13422 * inferior.c (current_inferior_): Add comment.
13423 (set_current_inferior): Increment/decrement refcounts.
13424 (prune_inferiors, remove_inferior_command): Skip inferiors marked
13425 not-deletable instead of comparing with the current inferior.
13426 (initialize_inferiors): Increment the initial inferior's refcount.
13427 * inferior.h (struct inferior): Forward declare.
13428 Include "common/refcounted-object.h".
13429 (current_inferior, set_current_inferior): Move declaration to
13430 before struct inferior's definition, and fix comment.
13431 (inferior): Inherit from refcounted_object. Add comments.
13432 * thread.c (switch_to_thread_no_regs): Reference the thread's
13433 inferior pointer directly instead of doing a ptid lookup.
13434 (switch_to_no_thread): New function.
13435 (switch_to_thread(thread_info *)): New function, factored out
13436 from ...
13437 (switch_to_thread(ptid_t)): ... this.
13438 (restore_current_thread): Delete.
13439 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
13440 fields, and add 'inf' field.
13441 (do_restore_current_thread_cleanup): Check whether old->inf is
13442 alive instead of looking up an inferior by ptid. Use
13443 switch_to_thread and switch_to_no_thread.
13444 (restore_current_thread_cleanup_dtor): Use old->inf directly
13445 instead of lookup up an inferior by id. Decref the inferior.
13446 Don't restore 'removable'.
13447 (make_cleanup_restore_current_thread): Same the inferior pointer
13448 in old, instead of the inferior number. Incref the inferior.
13449 Don't save/clear 'removable'.
13450
9bcb1f16
PA
134512017-04-19 Pedro Alves <palves@redhat.com>
13452
13453 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13454 unittests/scoped_restore-selftests.c.
13455 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
13456 * common/scoped_restore.h (scoped_restore_base): Make "class".
13457 (scoped_restore_base::release): New public method.
13458 (scoped_restore_base::scoped_restore_base): New protected ctor.
13459 (scoped_restore_base::m_saved_var): New protected field.
13460 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
13461 scoped_restore_base base class instead of m_saved_var directly.
13462 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
13463 (scoped_restore_tmpl::scoped_restore_tmpl(const
13464 scoped_restore_tmpl<T>&)): Likewise.
13465 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
13466 method.
13467 (scoped_restore_tmpl::saved_var): New method.
13468 (scoped_restore_tmpl::m_saved_var): Delete.
13469 * inferior.h (inferior::detaching): Now a bool.
13470 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
13471 cleanup.
13472 * unittests/scoped_restore-selftests.c: New file.
13473
26fcd539
PA
134742017-04-19 Pedro Alves <palves@redhat.com>
13475
13476 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
13477 Re-sort in alphabetic order.
13478
fdd243b0
PA
134792017-04-18 Pedro Alves <palves@redhat.com>
13480
13481 * xml-support.c (obstack_xml_printf): Delete.
13482 * xml-support.h (obstack_xml_printf): Delete.
13483
4895cde2
PA
134842017-04-18 Pedro Alves <palves@redhat.com>
13485
13486 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
13487 vdebug, verror, body_text, start_element, end_element, name,
13488 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
13489 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
13490 is_xinclude>: Make private and add m_ prefix.
13491 (gdb_xml_parser::body_text): New method, based on ...
13492 (gdb_xml_body_text): ... this. Adjust.
13493 (gdb_xml_parser::vdebug): New method, based on ...
13494 (gdb_xml_debug): ... this. Adjust.
13495 (gdb_xml_parser::verror): New method, based on ...
13496 (gdb_xml_error): ... this. Adjust.
13497 (gdb_xml_parser::start_element): New method, based on ...
13498 (gdb_xml_start_element): ... this. Adjust.
13499 (gdb_xml_start_element_wrapper): Defer to
13500 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
13501 (gdb_xml_parser::end_element): New method, based on ...
13502 (gdb_xml_end_element_wrapper): ... this. Adjust.
13503 (gdb_xml_parser::~gdb_xml_parser): Adjust.
13504 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
13505 (gdb_xml_parser::use_dtd): New method, based on ...
13506 (gdb_xml_use_dtd): ... this. Adjust.
13507 (gdb_xml_parser::parse): New method, based on ...
13508 (gdb_xml_parse): ... this. Adjust.
13509 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
13510 (xinclude_start_include): Adjust to call the parser's name method.
13511 (xml_xinclude_default, xml_xinclude_start_doctype)
13512 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
13513 method.
13514 (xml_process_xincludes): Adjust to call parser methods.
13515 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
13516 declarations.
13517
bd8a901f
PA
135182017-04-18 Pedro Alves <palves@redhat.com>
13519
13520 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
13521 gdb::optional<std::string>.
13522 * xml-support.c: Include <string>.
13523 (scope_level::scope_level(scope_level &&))
13524 (scope_level::~scope_level): Delete.
13525 (scope_level::body): Now a std::string.
13526 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
13527 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
13528 parameter.
13529 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
13530 (xinclude_parsing_data::output): Now a std::string reference.
13531 (xinclude_start_include): Adjust.
13532 (xml_xinclude_default): Adjust.
13533 (xml_process_xincludes): Add 'output' parameter, and return bool.
13534 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
13535 and return bool.
13536 * xml-tdesc.c: Include <unordered_map> and <string>.
13537 (tdesc_xml_cache): Delete.
13538 (tdesc_xml_cache_s): Delete.
13539 (xml_cache): Now an std::unordered_map.
13540 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
13541 (target_fetch_description_xml): Change return type to
13542 gdb::optional<std::string>, and adjust.
13543 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
13544 (target_fetch_description_xml): Change return type to
13545 gdb::optional<std::string>.
13546
d35d1958
PA
135472017-04-18 Pedro Alves <palves@redhat.com>
13548
13549 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13550 unittests/optional-selftests.c.
13551 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
13552 * unittests/optional-selftests.c: New file.
13553 * unittests/optional/assignment/1.cc: New file.
13554 * unittests/optional/assignment/2.cc: New file.
13555 * unittests/optional/assignment/3.cc: New file.
13556 * unittests/optional/assignment/4.cc: New file.
13557 * unittests/optional/assignment/5.cc: New file.
13558 * unittests/optional/assignment/6.cc: New file.
13559 * unittests/optional/assignment/7.cc: New file.
13560 * unittests/optional/cons/copy.cc: New file.
13561 * unittests/optional/cons/default.cc: New file.
13562 * unittests/optional/cons/move.cc: New file.
13563 * unittests/optional/cons/value.cc: New file.
13564 * unittests/optional/in_place.cc: New file.
13565 * unittests/optional/observers/1.cc: New file.
13566 * unittests/optional/observers/2.cc: New file.
13567
22796e97
PA
135682017-04-18 Pedro Alves <palves@redhat.com>
13569
13570 * common/gdb_optional.h: Include common/traits.h.
13571 (in_place_t): New type.
13572 (in_place): New constexpr variable.
13573 (optional::optional): Remove member initialization of
13574 m_instantiated.
13575 (optional::optional(in_place_t...)): New constructor.
13576 (optional::~optional): Use reset.
13577 (optional::optional(const optional&)): New.
13578 (optional::optional(const optional&&)): New.
13579 (optional::optional(T &)): New.
13580 (optional::optional(T &&)): New.
13581 (operator::operator=(const optional &)): New.
13582 (operator::operator=(optional &&)): New.
13583 (operator::operator= (const T &))
13584 (operator::operator= (T &&))
13585 (operator::emplace (Args &&... args)): Return a T&. Use reset.
13586 (operator::reset): New.
13587 (operator::m_instantiated):: Add in-class initializer.
13588 * common/traits.h: Include <type_traits>.
13589 (struct And): New types.
13590
a7fc9b61
PA
135912017-04-18 Pedro Alves <palves@redhat.com>
13592
13593 * xml-support.c: Include <vector>.
13594 (scope_level::scope_level(const gdb_xml_element *))
13595 (scope_level::scope_level(scope_level&&)): New.
13596 (scope_level::~scope_level): New.
13597 (scope_level_s): Delete.
13598 (gdb_xml_parser::scopes): Now a std::vector.
13599 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
13600 Use std::vector.
13601 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
13602 scope cleanup code.
13603 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
13604 of the scopes member. Use std::vector::emplace_back.
13605
010151c9
PA
136062017-04-18 Pedro Alves <palves@redhat.com>
13607
13608 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
13609 a bool.
13610 (gdb_xml_end_element): Change type of first parameter.
13611 (gdb_xml_cleanup): Rename to ...
13612 (gdb_xml_parser::~gdb_xml_parser): ... this.
13613 (gdb_xml_create_parser_and_cleanup): Delete with ...
13614 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
13615 to this new ctor.
13616 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
13617 using gdb_xml_create_parser_and_cleanup.
13618 (xinclude_parsing_data): Add ctor/dtor.
13619 (xml_xinclude_cleanup): Delete.
13620 (xml_process_xincludes): Create a local xinclude_parsing_data
13621 instead of heap-allocating one. Create a local gdb_xml_parser
13622 instead of heap-allocating one with
13623 gdb_xml_create_parser_and_cleanup.
13624
d56060f0
JB
136252017-04-18 John Baldwin <jhb@FreeBSD.org>
13626
13627 PR threads/20743
13628 * fbsd-nat.c (resume_one_thread_cb): Remove.
13629 (resume_all_threads_cb): Remove.
13630 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
13631 iterate_over_threads.
13632
305d16a9
JB
136332017-04-17 Joel Brobecker <brobecker@adacore.com>
13634
13635 * NEWS: Create a new section for the next release branch.
13636 Rename the section of the current branch, now that it has
13637 been cut.
13638
8bb57231
JB
136392017-04-17 Joel Brobecker <brobecker@adacore.com>
13640
13641 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
13642 * version.in: Bump version to 8.0.50.DATE-git.
13643
096c92dd
SDJ
136442017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
13645
13646 PR gdb/21385
13647 * windows-nat.c (windows_create_inferior): Declare 'allargs'
13648 independently of the host, and fix build breakage on Cygwin.
13649
0550c955
PA
136502017-04-13 Pedro Alves <palves@redhat.com>
13651
13652 * inferior.c (free_inferior): Convert to ...
13653 (inferior::~inferior): ... this dtor.
13654 (inferior::inferior): New ctor, factored out from ...
13655 (add_inferior_silent): ... here. Allocate the inferior with a new
13656 expression.
13657 (delete_inferior): Call delete instead of free_inferior.
13658 * inferior.h (gdb_environ, continuation): Forward declare.
13659 (inferior): Now a class. Add in-class initialization to all
13660 members. Make boolean fields bool, except 'detaching'.
13661 (inferior::inferior): New explicit ctor.
13662 (inferior::~inferior): New.
13663
e3d60dfc
PA
136642017-04-13 Pedro Alves <palves@redhat.com>
13665
13666 * inferior.c (init_inferior_list): Delete.
13667 * inferior.h (init_inferior_list): Delete.
13668
5fd69d0a
PA
136692017-04-13 Pedro Alves <palves@redhat.com>
13670
13671 PR threads/13217
13672 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
13673 (top level): Call it twice, with different thread sets.
13674
c6609450
PA
136752017-04-13 Pedro Alves <palves@redhat.com>
13676
13677 * thread.c: Include <algorithm>.
13678 (thread_array_cleanup): Delete.
13679 (scoped_inc_dec_ref): New class.
13680 (live_threads_count): New function.
13681 (set_thread_refcount): Delete.
13682 (tp_array_compar_ascending): Now a bool.
13683 (tp_array_compar): Convert to a std::sort comparison function.
13684 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
13685 and live_threads_count.
13686
2a00d7ce
PA
136872017-04-13 Pedro Alves <palves@redhat.com>
13688
13689 * infrun.c (follow_fork_inferior): Also switch the current
13690 inferior.
13691
441d7c93
PA
136922017-04-13 Pedro Alves <palves@redhat.com>
13693
13694 * breakpoint.c (watch_command_1): Save watchpoint-frame info
13695 before calling create_internal_breakpoint.
13696
808480f6
PA
136972017-04-13 Pedro Alves <palves@redhat.com>
13698
13699 * fork-child.c (execv_argv): New class.
13700 (breakup_args): Refactored as ...
13701 (execv_argv::init_for_no_shell): .. this method of execv_argv.
13702 Copy arguments to storage and replace separators with NULL
13703 terminators in place.
13704 (escape_bang_in_quoted_argument): Adjust to return bool.
13705 (execv_argv::execv_argv): New ctor.
13706 (execv_argv::init_for_shell): New method, factored out from
13707 fork_inferior. Don't strdup strings into the vector.
13708 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
13709 Remove free_vector_argv call.
13710
ad3d022a
YQ
137112017-04-13 Yao Qi <yao.qi@linaro.org>
13712
13713 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
13714 tdep->rx_psw_type.
13715
e6ddc3bf
YQ
137162017-04-13 Yao Qi <yao.qi@linaro.org>
13717
13718 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
13719 * rx-tdep.c (rx_gdbarch_init): Likewise.
13720
bfb8cf90
PA
137212017-04-13 Pedro Alves <palves@redhat.com>
13722
13723 * breakpoint.h (struct breakpoint): Reindent.
13724
f5336ca5
PA
137252017-04-13 Pedro Alves <palves@redhat.com>
13726
13727 * breakpoint.c (bp_location): Rename to ...
13728 (bp_locations): ... this. All references updated.
13729 (bp_location_count): Rename to ...
13730 (bp_locations_count): ... this. All references updated.
13731 (bp_location_placed_address_before_address_max): Rename to ...
13732 (bp_locations_placed_address_before_address_max): ... this. All
13733 references updated.
13734 (bp_location_shadow_len_after_address_max): Rename to ...
13735 (bp_locations_shadow_len_after_address_max): ... this. All
13736 references updated.
13737 (bp_location_compare_addrs): Rename to ...
13738 (bp_locations_compare_addrs): ... this. All references updated.
13739 (bp_location_compare):Rename to ...
13740 (bp_locations_compare): ... this. All references updated.
13741 (bp_location_target_extensions_update): Rename to ...
13742 (bp_locations_target_extensions_update): ... this. All references
13743 updated.
13744
be628ab8
SDJ
137452017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13746
13747 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
13748 * common/common.m4: Check headers 'termios.h', 'termio.h' and
13749 'sgtty.h'.
13750 * common/gdb_termios.h: New file, with parts of "terminal.h".
13751 * inflow.c: Include "gdb_termios.h".
13752 * ser-unix.c: Include "gdb_termios.h".
13753 * terminal.h: Move terminal-related defines to
13754 "common/gdb_termios.h".
13755
8e9e35b1
TT
137562017-04-12 Tom Tromey <tom@tromey.com>
13757
13758 * probe.c (parse_probes): Update.
13759 * location.h (delete_event_location): Don't declare.
13760 (event_location_deleter::operator()): Update.
13761 * location.c (event_location_deleter::operator()): Rename from
13762 delete_event_location.
13763 * linespec.h (linespec_result) <location>: Change type to
13764 event_location_up.
13765 * linespec.c (canonicalize_linespec, event_location_to_sals)
13766 (decode_objc): Update.
13767 (linespec_result): Don't call delete_event_location.
13768 * breakpoint.c (create_breakpoints_sal)
13769 (bkpt_probe_create_sals_from_location)
13770 (strace_marker_create_sals_from_location): Update.
13771
16e802b9
TT
137722017-04-12 Tom Tromey <tom@tromey.com>
13773
13774 * linespec.h (struct linespec_result): Add constructor and
13775 destructor.
13776 (init_linespec_result, destroy_linespec_result)
13777 (make_cleanup_destroy_linespec_result): Don't declare.
13778 * linespec.c (init_linespec_result): Remove.
13779 (linespec_result::~linespec_result): Rename from
13780 destroy_linespec_result. Update.
13781 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
13782 Remove.
13783 * breakpoint.c (create_breakpoint, break_range_command)
13784 (decode_location_default): Update.
13785 * ax-gdb.c (agent_command_1): Update.
13786
d28cd78a
TT
137872017-04-12 Tom Tromey <tom@tromey.com>
13788
13789 * remote.c (remote_download_tracepoint): Update.
13790 * python/py-breakpoint.c (bppy_get_location): Update.
13791 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
13792 (gdbscm_breakpoint_location): Update.
13793 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
13794 * breakpoint.h (struct breakpoint) <location, location_range_end>:
13795 Change type to event_location_up.
13796 * breakpoint.c (create_overlay_event_breakpoint)
13797 (create_longjmp_master_breakpoint)
13798 (create_std_terminate_master_breakpoint)
13799 (create_exception_master_breakpoint)
13800 (breakpoint_event_location_empty_p, print_breakpoint_location)
13801 (print_one_breakpoint_location, create_thread_event_breakpoint)
13802 (init_breakpoint_sal, create_breakpoint)
13803 (print_recreate_ranged_breakpoint, break_range_command)
13804 (init_ada_exception_breakpoint, say_where): Update.
13805 (base_breakpoint_dtor): Don't call delete_event_location.
13806 (bkpt_print_recreate, tracepoint_print_recreate)
13807 (dprintf_print_recreate, update_static_tracepoint)
13808 (breakpoint_re_set_default): Update.
13809
711799d5
TT
138102017-04-12 Tom Tromey <tom@tromey.com>
13811
13812 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
13813 type of "to_do". Update.
13814 (compute_stack_depth): Use std::vector.
13815
52d214d3
TT
138162017-04-12 Tom Tromey <tom@tromey.com>
13817
13818 * printcmd.c (find_instruction_backward): Use std::vector.
13819
4c404b8b
TT
138202017-04-12 Tom Tromey <tom@tromey.com>
13821
13822 * symfile.c (objfilep): Remove typedef.
13823 (reread_symbols): Use a std::vector.
13824
156d9eab
TT
138252017-04-12 Tom Tromey <tom@tromey.com>
13826
13827 * mi/mi-main.c (exec_direction_forward): Remove.
13828 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
13829 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
13830 scoped_restore.
13831 * guile/guile.c (guile_repl_command, guile_command)
13832 (gdbscm_execute_gdb_command): Use scoped_restore.
13833 * go-exp.y (go_parse): Use scoped_restore.
13834 * d-exp.y (d_parse): Use scoped_restore.
13835 * cli/cli-decode.c (cmd_func): Use scoped_restore.
13836 * c-exp.y (c_parse): Use scoped_restore.
13837
4d89769a
TT
138382017-04-12 Tom Tromey <tom@tromey.com>
13839
13840 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
13841 (mi_parse): Update return type.
13842 (mi_parse_free): Remove.
13843 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
13844 (mi_parse::~mi_parse): Rename from mi_parse_free.
13845 (mi_parse_cleanup): Remove.
13846 (mi_parse): Return a unique_ptr. Use new.
13847 * mi/mi-main.c (mi_execute_command): Update.
13848
4b217cc7
TT
138492017-04-12 Tom Tromey <tom@tromey.com>
13850
13851 * location.c (explicit_location_lex_one): Return a
13852 unique_xmalloc_ptr.
13853 (string_to_explicit_location): Update. Remove cleanups.
13854
59d3651b
TT
138552017-04-12 Tom Tromey <tom@tromey.com>
13856
13857 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
13858 (compare_value_and_voffset): Change type. Update.
13859 (compute_vtable_size): Change type of "offset_vec".
13860 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
13861 (gnuv3_get_typeid): Remove extraneous declaration.
13862
b24b0d6c
TT
138632017-04-12 Tom Tromey <tom@tromey.com>
13864
13865 * charset.h (wchar_iterator): Fix comment.
13866
80a3b8c5
TT
138672017-04-12 Tom Tromey <tom@tromey.com>
13868
13869 * charset.c (iconv_wrapper): New class.
13870 (cleanup_iconv): Remove.
13871 (convert_between_encodings): Use it.
13872
c83dd867
TT
138732017-04-12 Tom Tromey <tom@tromey.com>
13874
13875 * symfile.h (increment_reading_symtab): Update type.
13876 * symfile.c (decrement_reading_symtab): Remove.
13877 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
13878 * psymtab.c (psymtab_to_symtab): Update.
13879 * dwarf2read.c (dw2_instantiate_symtab): Update.
13880
0e8621a0
TT
138812017-04-12 Tom Tromey <tom@tromey.com>
13882
13883 * jit.c (struct jit_reader): Declare separately. Add constructor
13884 and destructor. Change type of "handle".
13885 (loaded_jit_reader): Define separately.
13886 (jit_reader_load): Update. New "new".
13887 (jit_reader_unload_command): Use "delete".
13888 * gdb-dlfcn.h (struct dlclose_deleter): New.
13889 (gdb_dlhandle_up): New typedef.
13890 (gdb_dlopen, gdb_dlsym): Update types.
13891 (gdb_dlclose): Remove.
13892 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
13893 (gdb_dlsym): Change type of "handle".
13894 (make_cleanup_dlclose): Remove.
13895 (dlclose_deleter::operator()): Rename from gdb_dlclose.
13896 * compile/compile-c-support.c (load_libcc): Update.
13897
67d89901
TT
138982017-04-12 Tom Tromey <tom@tromey.com>
13899
13900 * symtab.h (find_pcs_for_symtab_line): Change return type.
13901 * symtab.c (find_pcs_for_symtab_line): Change return type.
13902 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
13903 type of "vec". Update.
13904 (ltpy_get_pcs_for_line): Update.
13905 * linespec.c (decode_digits_ordinary): Update.
13906
93921405
TT
139072017-04-12 Tom Tromey <tom@tromey.com>
13908
13909 * tracepoint.c (actions_command): Update.
13910 * python/python.c (python_command, python_interactive_command):
13911 Update.
13912 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
13913 * guile/guile.c (guile_command): Update.
13914 * defs.h (read_command_lines, read_command_lines_1): Return
13915 command_line_up.
13916 (command_lines_deleter): New struct.
13917 (command_line_up): New typedef.
13918 * compile/compile.c (compile_code_command)
13919 (compile_print_command): Update.
13920 * cli/cli-script.h (get_command_line, copy_command_lines): Return
13921 command_line_up.
13922 (make_cleanup_free_command_lines): Remove.
13923 * cli/cli-script.c (get_command_line, read_command_lines_1)
13924 (copy_command_lines): Return command_line_up.
13925 (while_command, if_command, read_command_lines, define_command)
13926 (document_command): Update.
13927 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
13928 Remove.
13929 * breakpoint.h (breakpoint_set_commands): Change type of
13930 "commands".
13931 * breakpoint.c (breakpoint_set_commands): Change type of
13932 "commands". Update.
13933 (do_map_commands_command, update_dprintf_command_list)
13934 (create_tracepoint_from_upload): Update.
13935
ffc2605c
TT
139362017-04-12 Tom Tromey <tom@tromey.com>
13937
13938 * tracepoint.c (scope_info): Update.
13939 * spu-tdep.c (spu_catch_start): Update.
13940 * python/python.c (gdbpy_decode_line): Update.
13941 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
13942 * python/py-breakpoint.c (bppy_init): Update.
13943 * probe.c (parse_probes): Update.
13944 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
13945 * location.h (event_location_deleter): New struct.
13946 (event_location_up): New typedef.
13947 (new_linespec_location, new_address_location, new_probe_location)
13948 (new_explicit_location, copy_event_location)
13949 (string_to_event_location, string_to_event_location_basic)
13950 (string_to_explicit_location): Update return type.
13951 (make_cleanup_delete_event_location): Remove.
13952 * location.c (new_linespec_location, new_address_location)
13953 (new_probe_location, new_explicit_location, copy_event_location):
13954 Return event_location_up.
13955 (delete_event_location_cleanup)
13956 (make_cleanup_delete_event_location): Remove.
13957 (string_to_explicit_location, string_to_event_location_basic)
13958 (string_to_event_location): Return event_location_up.
13959 * linespec.c (canonicalize_linespec, event_location_to_sals)
13960 (decode_line_with_current_source)
13961 (decode_line_with_last_displayed, decode_objc): Update.
13962 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
13963 * completer.c (location_completer): Update.
13964 * cli/cli-cmds.c (edit_command, list_command): Update.
13965 * breakpoint.c (create_overlay_event_breakpoint)
13966 (create_longjmp_master_breakpoint)
13967 (create_std_terminate_master_breakpoint)
13968 (create_exception_master_breakpoint)
13969 (create_thread_event_breakpoint): Update.
13970 (init_breakpoint_sal): Update. Remove some dead code.
13971 (create_breakpoint_sal): Change type of "location". Update.
13972 (create_breakpoints_sal, create_breakpoint, break_command_1)
13973 (dprintf_command, break_range_command, until_break_command)
13974 (init_ada_exception_breakpoint)
13975 (strace_marker_create_sals_from_location)
13976 (update_static_tracepoint, trace_command, ftrace_command)
13977 (strace_command, create_tracepoint_from_upload): Update.
13978 * break-catch-throw.c (re_set_exception_catchpoint): Update.
13979 * ax-gdb.c (agent_command_1): Update.
13980
8f10c932
PA
139812017-04-12 Pedro Alves <palves@redhat.com>
13982
13983 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
13984 * configure.tgt: Handle i[34567]86-*-go32* and
13985 i[34567]86-*-msdosdjgpp*.
13986 * i386-tdep.c (i386_svr4_reg_to_regnum):
13987 Make extern.
13988 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
13989 i386-go32-tdep.c.
13990 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
13991 * i386-go32-tdep.c: New file.
13992 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
13993 declarations.
13994
0a31ccfb
SM
139952017-04-12 Simon Marchi <simon.marchi@ericsson.com>
13996
13997 * aix-thread.c (pd_status2str): Change return type to const char *.
13998
e9bb3fbb
PA
139992017-04-12 Pedro Alves <palves@redhat.com>
14000
14001 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
14002 calls to set_gdbarch_gnu_triplet_regexp.
14003
53375380
PA
140042017-04-12 Pedro Alves <palves@redhat.com>
14005
14006 PR gdb/21323
14007 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
14008 New enum value.
14009 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
14010 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
14011 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
14012 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
14013 * gdbarch.h, gdbarch.c: Regenerate.
14014 * aarch64-tdep.c (aarch64_gdbarch_init): Override
14015 gdbarch_wchar_bit and gdbarch_wchar_signed.
14016 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
14017 * arm-tdep.c (arm_gdbarch_init): Likewise.
14018 * avr-tdep.c (avr_gdbarch_init): Likewise.
14019 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
14020 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
14021 * i386-tdep.c (i386_go32_init_abi): Likewise.
14022 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
14023 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
14024 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
14025 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
14026 * sh-tdep.c (sh_gdbarch_init): Likewise.
14027 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
14028 * sparc64-tdep.c (sparc64_init_abi): Likewise.
14029 * windows-tdep.c (windows_init_abi): Likewise.
14030 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
14031
53e710ac
PA
140322017-04-12 Pedro Alves <palves@redhat.com>
14033
14034 PR c++/21323
14035 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
14036 cplus_primitive_type_char32_t>: New enum values.
14037 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
14038 and cplus_primitive_type_char32_t.
14039 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
14040 32, use the archtecture's built-in type for char16_t and char32_t,
14041 respectively. Otherwise, fallback to init_integer_type as before,
14042 but make the type unsigned, and issue a complaint.
14043 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
14044
ab0538b8
AH
140452017-04-12 Alan Hayward <alan.hayward@arm.com>
14046
5e0e0422 14047 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
14048 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
14049
5430098f
SDJ
140502017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
14051
14052 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
14053 'const char *'.
14054
7c5ded6a
SDJ
140552017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
14056
14057 * common/common-utils.c (free_vector_argv): New function.
14058 * common/common-utils.h: Include <vector>.
14059 (free_vector_argv): New prototype.
14060 * darwin-nat.c (darwin_create_inferior): Rewrite function
14061 prototype in order to constify "exec_file" and accept a
14062 "std::string" for "allargs".
14063 * fork-child.c: Include <vector>.
14064 (breakup_args): Rewrite function, using C++.
14065 (fork_inferior): Rewrite function header, constify "exec_file_arg"
14066 and accept "std::string" for "allargs". Update the code to
14067 calculate "argv" based on "allargs". Update calls to "exec_fun"
14068 and "execvp".
14069 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
14070 order to constify "exec_file" and accept a "std::string" for
14071 "allargs".
14072 * go32-nat.c (go32_create_inferior): Likewise.
14073 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
14074 * infcmd.c (run_command_1): Constify "exec_file". Use
14075 "std::string" for inferior arguments.
14076 * inferior.h (fork_inferior): Update prototype.
14077 * linux-nat.c (linux_nat_create_inferior): Rewrite function
14078 prototype in order to constify "exec_file" and accept a
14079 "std::string" for "allargs".
14080 * nto-procfs.c (procfs_create_inferior): Likewise.
14081 * procfs.c (procfs_create_inferior): Likewise.
14082 * remote-sim.c (gdbsim_create_inferior): Likewise.
14083 * remote.c (extended_remote_run): Update code to accept
14084 "std::string" as argument.
14085 (extended_remote_create_inferior): Rewrite function prototype in
14086 order to constify "exec_file" and accept a "std::string" for
14087 "allargs".
14088 * rs6000-nat.c (super_create_inferior): Likewise.
14089 (rs6000_create_inferior): Likewise.
14090 * target.h (struct target_ops) <to_create_inferior>: Likewise.
14091 * windows-nat.c (windows_create_inferior): Likewise.
14092
ae0eee42
PA
140932017-04-11 Pedro Alves <palves@redhat.com>
14094
14095 * thread.c: Fix whitespace throughout.
14096
a6acac06
PR
140972017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
14098
14099 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
14100
64403bd1
AH
141012017-04-11 Alan Hayward <alan.hayward@arm.com>
14102
14103 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
14104
a5bef50f
SDJ
141052017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
14106
14107 PR gdb/21364
14108 * osdata.c (info_osdata): Check if 'type' is an empty string
14109 instead of NULL.
14110
9295a5a9
PA
141112017-04-10 Pedro Alves <palves@redhat.com>
14112
14113 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
14114 (ptid_to_global_thread_id, in_thread_list)
14115 (do_captured_list_thread_ids, set_resumed, set_running)
14116 (set_executing, set_stop_requested, finish_thread_state)
14117 (validate_registers_access, can_access_registers_ptid)
14118 (print_thread_info_1, switch_to_thread)
14119 (do_restore_current_thread_cleanup)
14120 (make_cleanup_restore_current_thread, thread_command)
14121 (thread_name_command): Use operator== instead of ptid_equal.
14122
996812e3
PA
141232017-04-10 Pedro Alves <palves@redhat.com>
14124
14125 * thread.c (struct current_thread_cleanup) <next>: Delete field.
14126 (current_thread_cleanup_chain): Delete.
14127 (restore_current_thread_cleanup_dtor)
14128 (make_cleanup_restore_current_thread): Remove references to
14129 current_thread_cleanup_chain.
14130
845b344f
AH
141312017-04-10 Alan Hayward <alan.hayward@arm.com>
14132
14133 * msp430-tdep.c (msp430_pseudo_register_read): Never return
14134 REG_UNKNOWN.
14135
803bdfe4
YQ
141362017-04-10 Yao Qi <yao.qi@linaro.org>
14137
14138 PR gdb/19942
14139 * gdbthread.h (thread_info::deletable): New method.
14140 (thread_info::incref): New method.
14141 (thread_info::decref): New method.
14142 (thread_info::refcount): Move it to private.
14143 * infrun.c (save_stop_context): Call inc_refcount.
14144 (release_stop_context_cleanup): Likewise.
14145 * thread.c (set_thread_exited): New function.
14146 (init_thread_list): Delete "tp" only it is deletable, otherwise
14147 call set_thread_exited.
14148 (delete_thread_1): Call set_thread_exited.
14149 (current_thread_cleanup) <inferior_pid>: Remove.
14150 <thread>: New field.
14151 (restore_current_thread_ptid_changed): Removed.
14152 (do_restore_current_thread_cleanup): Adjust.
14153 (restore_current_thread_cleanup_dtor): Don't call
14154 find_thread_ptid.
14155 (set_thread_refcount): Use dec_refcount.
14156 (make_cleanup_restore_current_thread): Adjust.
14157 (thread_apply_all_command): Call inc_refcount.
14158 (_initialize_thread): Don't call
14159 observer_attach_thread_ptid_changed.
14160
8c25b497
YQ
141612017-04-10 Yao Qi <yao.qi@linaro.org>
14162
14163 * thread.c (delete_thread_1): Hoist code on marking thread as
14164 exited.
14165
8473b447
SM
141662017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
14167
14168 * windows-nat.c (windows_detach): Initialize ptid with
14169 minus_one_ptid.
14170
6670ec13
SM
141712017-04-07 Simon Marchi <simon.marchi@ericsson.com>
14172
14173 * unittests/ptid-selftests.c: Fix erroneous assert messages.
14174
ba2f91bb
AH
141752017-04-07 Alan Hayward <alan.hayward@arm.com>
14176
14177 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
14178 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
14179 (bfin_pseudo_register_write): Likewise
14180
436252de
SM
141812017-04-06 Simon Marchi <simon.marchi@ericsson.com>
14182
14183 * common/ptid.h (struct ptid): Change to...
14184 (class ptid_t): ... this.
14185 <ptid_t>: New constructors.
14186 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
14187 matches>: New methods.
14188 <make_null, make_minus_one>: New static methods.
14189 <pid>: Rename to...
14190 <m_pid>: ...this.
14191 <lwp>: Rename to...
14192 <m_lwp>: ...this.
14193 <tid>: Rename to...
14194 <m_tid>: ...this.
14195 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
14196 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
14197 as references, move comment to class ptid_t.
14198 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
14199 ptid_t static methods.
14200 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
14201 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
14202 Take ptid arguments as references, implement using ptid_t methods.
14203 * unittests/ptid-selftests.c: New file.
14204 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14205 unittests/ptid-selftests.c.
14206 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
14207
0dedf377
TP
142082017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
14209
14210 * python/python.c (python_run_simple_file): Cast mode literal to
14211 non-const char pointer as expected by PyFile_FromString.
14212
4e9868d4
SM
142132017-04-05 Simon Marchi <simon.marchi@ericsson.com>
14214
14215 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
14216 minus_one_ptid and null_ptid.
14217
9bf2a700
PA
142182017-04-05 Pedro Alves <palves@redhat.com>
14219
14220 * warning.m4 (build_warnings): Remove -Wno-write-strings.
14221 * configure: Regenerate.
14222
a121b7c1
PA
142232017-04-05 Pedro Alves <palves@redhat.com>
14224
14225 * ada-exp.y (yyerror): Constify.
14226 * ada-lang.c (bound_name, get_selections)
14227 (ada_variant_discrim_type)
14228 (ada_variant_discrim_name, ada_value_struct_elt)
14229 (ada_lookup_struct_elt_type, is_unchecked_variant)
14230 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
14231 (catch_ada_exception_command_split)
14232 (catch_ada_assert_command_split, catch_assert_command)
14233 (ada_op_name): Constify.
14234 * ada-lang.h (ada_yyerror, get_selections)
14235 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
14236 * arc-tdep.c (arc_print_frame_cache): Constify.
14237 * arm-tdep.c (arm_skip_stub): Constify.
14238 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
14239 (gen_aggregate_elt_ref): Constify.
14240 * bcache.c (print_bcache_statistics): Constify.
14241 * bcache.h (print_bcache_statistics): Constify.
14242 * break-catch-throw.c (catch_exception_command_1):
14243 * breakpoint.c (struct ep_type_description::description):
14244 Constify.
14245 (add_solib_catchpoint): Constify.
14246 (catch_fork_command_1): Add cast.
14247 (add_catch_command): Constify.
14248 * breakpoint.h (add_catch_command, add_solib_catchpoint):
14249 Constify.
14250 * bsd-uthread.c (bsd_uthread_state): Constify.
14251 * buildsym.c (patch_subfile_names): Constify.
14252 * buildsym.h (next_symbol_text_func, patch_subfile_names):
14253 Constify.
14254 * c-exp.y (yyerror): Constify.
14255 (token::oper): Constify.
14256 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
14257 * c-varobj.c (cplus_describe_child): Constify.
14258 * charset.c (find_charset_names): Add cast.
14259 (find_charset_names): Constify array and add const_cast.
14260 * cli/cli-cmds.c (complete_command, cd_command): Constify.
14261 (edit_command): Constify.
14262 * cli/cli-decode.c (lookup_cmd): Constify.
14263 * cli/cli-dump.c (dump_memory_command, dump_value_command):
14264 Constify.
14265 (struct dump_context): Constify.
14266 (add_dump_command, restore_command): Constify.
14267 * cli/cli-script.c (get_command_line): Constify.
14268 * cli/cli-script.h (get_command_line): Constify.
14269 * cli/cli-utils.c (check_for_argument): Constify.
14270 * cli/cli-utils.h (check_for_argument): Constify.
14271 * coff-pe-read.c (struct read_pe_section_data): Constify.
14272 * command.h (lookup_cmd): Constify.
14273 * common/print-utils.c (decimal2str): Constify.
14274 * completer.c (gdb_print_filename): Constify.
14275 * corefile.c (set_gnutarget): Constify.
14276 * cp-name-parser.y (yyerror): Constify.
14277 * cp-valprint.c (cp_print_class_member): Constify.
14278 * cris-tdep.c (cris_register_name, crisv32_register_name):
14279 Constify.
14280 * d-exp.y (yyerror): Constify.
14281 (struct token::oper): Constify.
14282 * d-lang.h (d_yyerror): Constify.
14283 * dbxread.c (struct header_file_location::name): Constify.
14284 (add_old_header_file, add_new_header_file, last_function_name)
14285 (dbx_next_symbol_text, add_bincl_to_list)
14286 (find_corresponding_bincl_psymtab, set_namestring)
14287 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
14288 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
14289 * defs.h (command_line_input, print_address_symbolic)
14290 (deprecated_readline_begin_hook): Constify.
14291 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
14292 Constify.
14293 * event-top.c (handle_line_of_input): Constify and add cast.
14294 * exceptions.c (catch_errors): Constify.
14295 * exceptions.h (catch_errors): Constify.
14296 * expprint.c (print_subexp_standard, op_string, op_name)
14297 (op_name_standard, dump_raw_expression, dump_raw_expression):
14298 * expression.h (op_name, op_string, dump_raw_expression):
14299 Constify.
14300 * f-exp.y (yyerror): Constify.
14301 (struct token::oper): Constify.
14302 (struct f77_boolean_val::name): Constify.
14303 * f-lang.c (f_word_break_characters): Constify.
14304 * f-lang.h (f_yyerror): Constify.
14305 * fork-child.c (fork_inferior): Add cast.
14306 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
14307 (new_variant): Constify.
14308 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
14309 * gdbarch.c: Regenerate.
14310 * gdbcore.h (set_gnutarget): Constify.
14311 * go-exp.y (yyerror): Constify.
14312 (token::oper): Constify.
14313 * go-lang.h (go_yyerror): Constify.
14314 * go32-nat.c (go32_sysinfo): Constify.
14315 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
14316 * guile/scm-cmd.c (cmdscm_function): Constify.
14317 * guile/scm-param.c (pascm_param_value): Constify.
14318 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
14319 (h8300sx_register_name): Constify.
14320 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
14321 Constify.
14322 * ia64-tdep.c (ia64_register_names): Constify.
14323 * infcmd.c (construct_inferior_arguments): Constify.
14324 (path_command, attach_post_wait): Constify.
14325 * language.c (show_range_command, show_case_command)
14326 (unk_lang_error): Constify.
14327 * language.h (language_defn::la_error)
14328 (language_defn::la_name_of_this): Constify.
14329 * linespec.c (decode_line_2): Constify.
14330 * linux-thread-db.c (thread_db_err_str): Constify.
14331 * lm32-tdep.c (lm32_register_name): Constify.
14332 * m2-exp.y (yyerror): Constify.
14333 * m2-lang.h (m2_yyerror): Constify.
14334 * m32r-tdep.c (m32r_register_names): Constify and make static.
14335 * m68hc11-tdep.c (m68hc11_register_names): Constify.
14336 * m88k-tdep.c (m88k_register_name): Constify.
14337 * macroexp.c (appendmem): Constify.
14338 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
14339 (upgrade_type, parse_external, parse_partial_symbols)
14340 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
14341 (new_symbol): Constify.
14342 * memattr.c (mem_info_command): Constify.
14343 * mep-tdep.c (register_name_from_keyword): Constify.
14344 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
14345 Constify.
14346 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
14347 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
14348 * mi/mi-main.c (captured_mi_execute_command): Constify and add
14349 cast.
14350 (mi_execute_async_cli_command): Constify.
14351 * mips-tdep.c (mips_register_name): Constify.
14352 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
14353 (am33_register_name, am33_2_register_name)
14354 * moxie-tdep.c (moxie_register_names): Constify.
14355 * nat/linux-osdata.c (osdata_type): Constify fields.
14356 * nto-tdep.c (nto_parse_redirection): Constify.
14357 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
14358 (lookup_child_selector): Constify.
14359 (objc_methcall::name): Constify.
14360 * objc-lang.h (lookup_objc_class, lookup_child_selector)
14361 (lookup_struct_typedef): Constify.
14362 * objfiles.c (pc_in_section): Constify.
14363 * objfiles.h (pc_in_section): Constify.
14364 * p-exp.y (struct token::oper): Constify.
14365 (yyerror): Constify.
14366 * p-lang.h (pascal_yyerror): Constify.
14367 * parser-defs.h (op_name_standard): Constify.
14368 (op_print::string): Constify.
14369 (exp_descriptor::op_name): Constify.
14370 * printcmd.c (print_address_symbolic): Constify.
14371 * psymtab.c (print_partial_symbols): Constify.
14372 * python/py-breakpoint.c (stop_func): Constify.
14373 (bppy_get_expression): Constify.
14374 * python/py-cmd.c (cmdpy_completer::name): Constify.
14375 (cmdpy_function): Constify.
14376 * python/py-event.c (evpy_add_attribute)
14377 (gdbpy_initialize_event_generic): Constify.
14378 * python/py-event.h (evpy_add_attribute)
14379 (gdbpy_initialize_event_generic): Constify.
14380 * python/py-evts.c (add_new_registry): Constify.
14381 * python/py-finishbreakpoint.c (outofscope_func): Constify.
14382 * python/py-framefilter.c (get_py_iter_from_func): Constify.
14383 * python/py-inferior.c (get_buffer): Add cast.
14384 * python/py-param.c (parm_constant::name): Constify.
14385 * python/py-unwind.c (fprint_frame_id): Constify.
14386 * python/python.c (gdbpy_parameter_value): Constify.
14387 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
14388 * remote.c (memory_packet_config::name): Constify.
14389 (show_packet_config_cmd, remote_write_bytes)
14390 (remote_buffer_add_string):
14391 * reverse.c (exec_reverse_once): Constify.
14392 * rs6000-tdep.c (variant::name, variant::description): Constify.
14393 * rust-exp.y (rustyyerror): Constify.
14394 * rust-lang.c (rust_op_name): Constify.
14395 * rust-lang.h (rustyyerror): Constify.
14396 * serial.h (serial_ops::name): Constify.
14397 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
14398 (sh_sh3e_register_name, sh_sh2e_register_name)
14399 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
14400 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
14401 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
14402 (sh_sh4al_dsp_register_name): Constify.
14403 * sh64-tdep.c (sh64_register_name): Constify.
14404 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
14405 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
14406 * stabsread.c (patch_block_stabs, read_type_number)
14407 (ref_map::stabs, ref_add, process_reference)
14408 (symbol_reference_defined, define_symbol, define_symbol)
14409 (error_type, read_type, read_member_functions, read_cpp_abbrev)
14410 (read_one_struct_field, read_struct_fields, read_baseclasses)
14411 (read_tilde_fields, read_struct_type, read_array_type)
14412 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
14413 (read_huge_number, read_range_type, read_args, common_block_start)
14414 (find_name_end): Constify.
14415 * stabsread.h (common_block_start, define_symbol)
14416 (process_one_symbol, symbol_reference_defined, ref_add):
14417 * symfile.c (get_section_index, add_symbol_file_command):
14418 * symfile.h (get_section_index): Constify.
14419 * target-descriptions.c (tdesc_type::name): Constify.
14420 (tdesc_free_type): Add cast.
14421 * target.c (find_default_run_target):
14422 (add_deprecated_target_alias, find_default_run_target)
14423 (target_announce_detach): Constify.
14424 (do_option): Constify.
14425 * target.h (add_deprecated_target_alias): Constify.
14426 * thread.c (print_thread_info_1): Constify.
14427 * top.c (deprecated_readline_begin_hook, command_line_input):
14428 Constify.
14429 (init_main): Add casts.
14430 * top.h (handle_line_of_input): Constify.
14431 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
14432 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
14433 (tfind_command): Rename to ...
14434 (tfind_command_1): ... this and constify.
14435 (tfind_command): New function.
14436 (tfind_end_command, tfind_start_command): Adjust.
14437 (encode_source_string): Constify.
14438 * tracepoint.h (encode_source_string): Constify.
14439 * tui/tui-data.c (tui_partial_win_by_name): Constify.
14440 * tui/tui-data.h (tui_partial_win_by_name): Constify.
14441 * tui/tui-source.c (tui_set_source_content_nil): Constify.
14442 * tui/tui-source.h (tui_set_source_content_nil): Constify.
14443 * tui/tui-win.c (parse_scrolling_args): Constify.
14444 * tui/tui-windata.c (tui_erase_data_content): Constify.
14445 * tui/tui-windata.h (tui_erase_data_content): Constify.
14446 * tui/tui-winsource.c (tui_erase_source_content): Constify.
14447 * tui/tui.c (tui_enable): Add cast.
14448 * utils.c (defaulted_query): Constify.
14449 (init_page_info): Add cast.
14450 (puts_debug, subset_compare): Constify.
14451 * utils.h (subset_compare): Constify.
14452 * varobj.c (varobj_format_string): Constify.
14453 * varobj.h (varobj_format_string): Constify.
14454 * vax-tdep.c (vax_register_name): Constify.
14455 * windows-nat.c (windows_detach): Constify.
14456 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
14457 * xml-support.c (gdb_xml_end_element): Constify.
14458 * xml-tdesc.c (tdesc_start_reg): Constify.
14459 * xstormy16-tdep.c (xstormy16_register_name): Constify.
14460 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
14461 * xtensa-tdep.h (xtensa_register_t::name): Constify.
14462
995816ba
PA
144632017-04-05 Pedro Alves <palves@redhat.com>
14464
14465 * proc-api.c (struct trans): Constify.
14466 (procfs_note): Constify.
14467 * proc-events.c (struct trans, syscall_table):
14468 * proc-flags.c (struct trans): Constify.
14469 * proc-utils.h (procfs_note): Constify.
14470 * proc-why.c (struct trans): Constify.
14471 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
14472 (procfs_detach): Constify.
14473 * sol-thread.c (struct string_map): Constify.
14474 (td_err_string, td_state_string): Constify.
14475
3e83a920
PA
144762017-04-05 Pedro Alves <palves@redhat.com>
14477
14478 * proc-api.c (procfs_filename): Don't initialize
14479 procfs_filename.
14480 (prepare_to_trace): Assume procfs_filename is non-NULL.
14481 (_initialize_proc_api): Give procfs_filename a default value here.
14482
63160a43
PA
144832017-04-05 Pedro Alves <palves@redhat.com>
14484
14485 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
14486 'cond_string' parameter.
14487 (extract_exception_regexp): Constify 'string' parameter.
14488 (catch_exception_command_1): Constify.
14489 * breakpoint.c (init_catchpoint)
14490 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
14491 parameter.
14492 (ep_parse_optional_if_clause, catch_fork_command_1)
14493 (catch_exec_command_1): Constify.
14494 * breakpoint.h (init_catchpoint): Constify 'cond_string'
14495 parameter.
14496 (ep_parse_optional_if_clause): Constify.
14497 * cli/cli-utils.c (remove_trailing_whitespace)
14498 (check_for_argument): Constify.
14499 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
14500 non-const overload.
14501 (check_for_argument): Likewise.
14502
9b2eba3d
PA
145032017-04-05 Pedro Alves <palves@redhat.com>
14504
14505 * event-top.c (command_line_handler): Add cast to execute_command
14506 call.
14507 * record-btrace.c (cmd_record_btrace_bts_start)
14508 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
14509 (cmd_record_btrace_start): Add cast to execute_command call.
14510 * record-full.c (record_full_goto_insn):
14511 * record.c (record_start, record_stop): Add cast to
14512 execute_command_to_string calls.
14513 (cmd_record_start): Add cast to execute_command calls.
14514
2adadf51
PA
145152017-04-05 Pedro Alves <palves@redhat.com>
14516
14517 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
14518 static inline function.
14519 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
14520 array and use gdb_PyArg_ParseTupleAndKeywords.
14521 * python/py-cmd.c (cmdpy_init): Likewise.
14522 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
14523 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
14524 (infpy_search_memory): Likewise.
14525 * python/py-objfile.c (objfpy_add_separate_debug_file)
14526 (gdbpy_lookup_objfile): Likewise.
14527 * python/py-symbol.c (gdbpy_lookup_symbol)
14528 (gdbpy_lookup_global_symbol): Likewise.
14529 * python/py-type.c (gdbpy_lookup_type): Likewise.
14530 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
14531 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
14532 Likewise.
14533
0d1f4ceb
PA
145342017-04-05 Pedro Alves <palves@redhat.com>
14535
14536 * python/python-internal.h (gdb_PyGetSetDef): New type.
14537 * python/py-block.c (block_object_getset)
14538 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
14539 * python/py-event.c (event_object_getset)
14540 (finish_breakpoint_object_getset): Likewise.
14541 * python/py-inferior.c (inferior_object_getset): Likewise.
14542 * python/py-infthread.c (thread_object_getset): Likewise.
14543 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
14544 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
14545 * python/py-objfile.c (objfile_getset): Likewise.
14546 * python/py-progspace.c (pspace_getset): Likewise.
14547 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
14548 Likewise.
14549 * python/py-record.c (recpy_record_getset): Likewise.
14550 * python/py-symbol.c (symbol_object_getset): Likewise.
14551 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
14552 Likewise.
14553 * python/py-type.c (type_object_getset, field_object_getset):
14554 Likewise.
14555 * python/py-value.c (value_object_getset): Likewise.
14556
4d759979
PA
145572017-04-05 Pedro Alves <palves@redhat.com>
14558
14559 * python/python-internal.h (gdb_PyObject_CallMethod)
14560 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
14561 New functions.
14562 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
14563 (PySys_GetObject, PySys_SetPath): New macros.
14564
fdf9e36f
PA
145652017-04-05 Pedro Alves <palves@redhat.com>
14566
14567 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
14568 info_osdata_command.
14569 * osdata.c (info_osdata_command): Rename to ...
14570 (info_osdata): ... this. Constify 'type' parameter, and remove
14571 the 'from_tty' parameter. Accept NULL TYPE.
14572 (info_osdata_command): New function.
14573 * osdata.h (info_osdata_command): Remove declaration.
14574 (info_osdata): New declaration.
14575
9f33b8b7
PA
145762017-04-05 Pedro Alves <palves@redhat.com>
14577
14578 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
14579 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
14580 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
14581 parameter.
14582 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
14583 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
14584 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
14585 parameter.
14586 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
14587 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
14588 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
14589 (mi_cmd_file_list_exec_source_files)
14590 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
14591 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
14592 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
14593 parameter.
14594 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
14595 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
14596 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
14597 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
14598 (mi_cmd_stack_info_frame): Constify 'command' parameter.
14599 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
14600 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
14601 'command' parameter.
14602 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
14603 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
14604 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
14605 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
14606 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
14607 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
14608 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
14609 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
14610 (mi_cmd_var_set_update_range): Constify 'command' parameter.
14611 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
14612 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
14613 parameter.
14614 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
14615 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
14616 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
14617 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
14618 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
14619 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
14620 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
14621 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
14622 (mi_cmd_data_list_changed_registers)
14623 (mi_cmd_data_write_register_values)
14624 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
14625 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
14626 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
14627 (mi_cmd_list_features, mi_cmd_list_target_features)
14628 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
14629 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
14630 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
14631 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
14632 (mi_cmd_trace_frame_collected): Constify 'command'
14633 parameter.
14634 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
14635 'command' parameter.
14636
67cb5b2d
PA
146372017-04-05 Pedro Alves <palves@redhat.com>
14638
14639 * ada-lang.c (ada_completer_word_break_characters): Now a const
14640 array.
14641 (ada_get_gdb_completer_word_break_characters): Constify.
14642 * completer.c (gdb_completer_command_word_break_characters)
14643 (gdb_completer_file_name_break_characters)
14644 (gdb_completer_quote_characters): Now const arrays.
14645 (get_gdb_completer_quote_characters): Constify.
14646 (set_rl_completer_word_break_characters): New function.
14647 (set_gdb_completion_word_break_characters)
14648 (complete_line_internal): Use it.
14649 * completer.h (get_gdb_completer_quote_characters): Constify.
14650 (set_rl_completer_word_break_characters): Declare.
14651 * f-lang.c (f_word_break_characters): Constify.
14652 * language.c (default_word_break_characters): Constify.
14653 * language.h (language_defn::la_word_break_characters): Constify.
14654 (default_word_break_characters): Constify.
14655 * top.c (init_main): Use set_rl_completer_word_break_characters.
14656
7a114964
PA
146572017-04-05 Pedro Alves <palves@redhat.com>
14658
14659 * aix-thread.c (aix_thread_pid_to_str)
14660 (aix_thread_extra_thread_info): Constify.
14661 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
14662 * bsd-uthread.c (bsd_uthread_extra_thread_info)
14663 (bsd_uthread_pid_to_str): Constify.
14664 * corelow.c (core_pid_to_str): Constify.
14665 * darwin-nat.c (darwin_pid_to_str): Constify.
14666 * fbsd-nat.c (fbsd_pid_to_str): Constify.
14667 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
14668 Constify.
14669 * gnu-nat.c (gnu_pid_to_str): Constify.
14670 * go32-nat.c (go32_pid_to_str): Constify.
14671 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
14672 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
14673 * inferior.c (inferior_pid_to_str): Constify.
14674 * linux-nat.c (linux_nat_pid_to_str): Constify.
14675 * linux-tdep.c (linux_core_pid_to_str): Constify.
14676 * linux-thread-db.c (thread_db_pid_to_str)
14677 (thread_db_extra_thread_info): Constify.
14678 * nto-tdep.c (nto_extra_thread_info): Constify.
14679 * nto-tdep.h (nto_extra_thread_info): Constify.
14680 * obsd-nat.c (obsd_pid_to_str): Constify.
14681 * procfs.c (procfs_pid_to_str): Constify.
14682 * ravenscar-thread.c (ravenscar_extra_thread_info)
14683 (ravenscar_pid_to_str): Constify.
14684 * remote-sim.c (gdbsim_pid_to_str): Constify.
14685 * remote.c (remote_threads_extra_info, remote_pid_to_str):
14686 Constify.
14687 * sol-thread.c (solaris_pid_to_str): Constify.
14688 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
14689 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
14690 * target.c (default_pid_to_str, target_pid_to_str)
14691 (normal_pid_to_str, default_pid_to_str): Constify.
14692 * target.h (target_ops::to_pid_to_str)
14693 (target_ops::to_extra_thread_info): Constify.
14694 (target_pid_to_str, normal_pid_to_str): Constify.
14695 * windows-nat.c (windows_pid_to_str): Constify.
14696 * gdbarch.sh (core_pid_to_str): Constify.
14697 * target-delegates.c: Regenerate.
14698 * gdbarch.h, gdbarch.c: Regenerate.
14699
69bbf465
PA
147002017-04-05 Pedro Alves <palves@redhat.com>
14701
14702 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
14703 the memory of the temporary warning_pre_print override.
14704 * utils.c (warning_pre_print): Constify.
14705 * utils.h (warning_pre_print): Constify.
14706
be47f9e8
PA
147072017-04-05 Pedro Alves <palves@redhat.com>
14708
14709 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
14710 (shell_command): New function.
14711 (make_command): Use std::string.
14712 (init_cli_cmds): Register shell_command instead of shell_escape.
14713
bde6261a
PA
147142017-04-05 Pedro Alves <palves@redhat.com>
14715
14716 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
14717 * tracepoint.c (default_collect): Don't initialize.
14718
b38ef47f
PA
147192017-04-05 Pedro Alves <palves@redhat.com>
14720
14721 * macroexp.c (macro_buffer::shared): Now a bool.
14722 (init_buffer): Update.
14723 (init_shared_buffer): Constify 'addr' parameter.
14724 (substitute_args, expand, macro_expand, macro_expand_next): Remove
14725 casts.
14726
f995bbe8
PA
147272017-04-05 Pedro Alves <palves@redhat.com>
14728
14729 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
14730 * disasm.c (set_disassembler_options): Constify local.
14731 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
14732
4a596fe2
SDJ
147332017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
14734
14735 PR gdb/21352
14736 * tracefile.c (tsave_command): Fix argument parsing for '-r'
14737 option.
14738
2cad08ea
YQ
147392017-04-05 Yao Qi <yao.qi@linaro.org>
14740
14741 * frame.c (frame_unwind_register_unsigned): Call
14742 frame_unwind_register_value.
14743
55a98976
YQ
147442017-04-05 Yao Qi <yao.qi@linaro.org>
14745
14746 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
14747 Use gdb_test_multiple, and don't match anchor.
14748
4ac40124
PA
147492017-04-05 Pedro Alves <palves@redhat.com>
14750
14751 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
14752 (Write After Approval): Remove Simon Marchi.
14753
c053b654
PA
147542017-04-05 Pedro Alves <palves@redhat.com>
14755
14756 * common/gdb_optional.h (optional::optional): Make constexpr and
14757 initialize m_dummy.
14758
4c7bf4f9
JB
147592017-04-04 John Baldwin <jhb@FreeBSD.org>
14760
14761 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14762 (amd64fbsd_jmp_buf_reg_offset): Remove.
14763 (amd64fbsd_supply_uthread): Remove function.
14764 (amd64fbsd_collect_uthread): Remove function.
14765 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
14766 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
14767 (x86_64-*-freebsd*): Remove bsd-uthread.o.
14768 (fbsd-nat.c): Update comment.
14769 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14770 (i386fbsd_jmp_buf_reg_offset): Remove.
14771 (i386fbsd_supply_uthread): Remove function.
14772 (i386fbsd_collect_uthread): Remove function.
14773 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
14774
1e1a8bef
JB
147752017-04-04 John Baldwin <jhb@FreeBSD.org>
14776
14777 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
14778 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
14779 * NEWS: Mention that support for FreeBSD/alpha was removed.
14780 * alpha-fbsd-tdep.c: Delete file.
14781 * config/alpha/fbsd.mh: Delete file.
14782 * configure.host: Delete alpha*-*-freebsd* and
14783 alpha*-*-kfreebsd*-gnu.
14784 * configure.tgt: Delete alpha*-*-freebsd* and
14785 alpha*-*-kfreebsd*-gnu.
14786
49907934
JB
147872017-04-04 John Baldwin <jhb@FreeBSD.org>
14788
14789 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
14790 amd64bsd_store_inferior_registers): Use ptid from regcache.
14791
6f77053d
PA
147922017-04-04 Pedro Alves <palves@redhat.com>
14793
14794 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
14795 data fields, make them private and add "m_" prefixes.
14796 (lnp_state_machine::lnp_state_machine): New ctor.
14797 (record_line, check_line_address, handle_set_discriminator)
14798 (handle_set_address, handle_advance_pc, handle_special_opcode)
14799 (handle_advance_line, handle_set_file, handle_negate_stmt)
14800 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
14801 (end_sequence, advance_line): New methods.
14802 (m_gdbarch, m_record_lines_p): New fields.
14803 (lnp_reader_state): Delete.
14804 (dwarf_record_line): Rename to ...
14805 (lnp_state_machine::record_line): ... adjust.
14806 (init_lnp_state_machine): Delete.
14807 (lnp_state_machine::lnp_state_machine): New.
14808 (check_line_address): Rename to ...
14809 (lnp_state_machine::check_line_address): This.
14810 (dwarf_decode_lines_1): Remove reference to "reader_state".
14811 Adjust lnp_state_machine having a non-default ctor. Use bool.
14812 State machine internal state manipulation moved to
14813 lnp_state_machine methods.
14814
9c541725
PA
148152017-04-04 Pedro Alves <palves@redhat.com>
14816
14817 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14818 unittests/offset-type-selftests.c.
14819 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
14820 * common/offset-type.h: New file.
14821 * common/preprocessor.h: New file.
14822 * common/traits.h: New file.
14823 * common/valid-expr.h: New file.
14824 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
14825 sect_offset and cu_offset strong typedefs throughout.
14826 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
14827 typedefs throughout.
14828 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
14829 sect_offset and cu_offset strong typedefs throughout.
14830 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
14831 typedefs throughout.
14832 * gdbtypes.h: Include "common/offset-type.h".
14833 (cu_offset): Now an offset type (strong typedef) instead of a
14834 struct.
14835 (sect_offset): Likewise.
14836 (union call_site_parameter_u): Rename "param_offset" field to
14837 "param_cu_off".
14838 * unittests/offset-type-selftests.c: New file.
14839
ecfb656c
PA
148402017-04-04 Pedro Alves <palves@redhat.com>
14841
14842 * common/underlying.h: New file.
14843 * dwarf2read.c: Include "common/gdb_optional.h" and
14844 "common/underlying.h".
14845 (dir_index, file_name_index): New types.
14846 (file_entry): Use them.
14847 (file_entry::include): Use to_underlying.
14848 (line_header::add_file_name): Use dir_index.
14849 (read_formatted_entries): Use gdb::optional. Read form before
14850 writting to file_entry.
14851 (dwarf_decode_line_header): Use dir_index.
14852 (lnp_state_machine::current_file): Use to_underlying.
14853 (lnp_state_machine::file): Change type to file_name_index.
14854 (dwarf_record_line): Use to_underlying.
14855 (init_lnp_state_machine): Use file_name_index.
14856 (dwarf_decode_lines_1): Use dir_index and file_name_index.
14857
d194f1fe
PA
148582017-04-04 Pedro Alves <palves@redhat.com>
14859
14860 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
14861 operator bool, has_value and get methods.
14862
fff8551c
PA
148632017-04-04 Pedro Alves <palves@redhat.com>
14864
14865 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
14866 fields.
14867 (line_header): Initialize all data fields. Change type of
14868 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
14869 Change type of include_dirs to std::vector<const char *>. Remove
14870 num_include_dirs, include_dirs_size. Change type of file_names to
14871 std::vector<file_entry>. Remove num_file_names, file_names_size.
14872 (line_header::line_header): New.
14873 (line_header::add_include_dir, line_header::add_file_name): New
14874 methods.
14875 (line_header::include_dir_at): Remove NULL check.
14876 (line_header::file_name_at): Add const overload.
14877 (line_header_up): New unique_ptr typedef.
14878 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
14879 std::vector. Remove free_line_header call.
14880 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
14881 free_line_header call.
14882 (free_cu_line_header): Delete.
14883 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
14884 (setup_type_unit_groups): Use line_header_up instead of cleanups.
14885 Adjust to use std::vector.
14886 (free_line_header): Delete.
14887 (free_line_header_voidp): Use delete.
14888 (add_include_dir): Replace with ...
14889 (line_header::add_include_dir): ... this method. Use std::vector.
14890 (add_file_name): Replace with ...
14891 (line_header::add_file_name): ... this method. Use std::vector.
14892 (add_include_dir_stub): Delete.
14893 (read_formatted_entries): Remove memset.
14894 (dwarf_decode_line_header): Return a line_header_up instead of a
14895 raw pointer. Remove cleanup handling. Pass lambdas to
14896 read_formatted_entries. Adjust to use line_header methods.
14897 (dwarf_decode_lines_1): Adjust to use line_header methods.
14898 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
14899 use std::vector.
14900
d62a8ae2
SM
149012017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
14902
14903 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
14904 instead of struct ptid.
14905
db3a1dc7
AH
149062017-05-04 Alan Hayward <alan.hayward@arm.com>
14907
14908 * frame.c (get_frame_register_bytes): Unwind using value.
14909 (put_frame_register_bytes): Likewise.
14910
b1b45502
IB
149112017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
14912
14913 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
14914 aggregate-like.
14915
ec13808e
JK
149162017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
14917
14918 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
14919
12316564
YQ
149202017-03-29 Yao Qi <yao.qi@linaro.org>
14921
14922 * gdbthread.h (struct thread_info): Declare constructor and
14923 destructor. Add some in-class member initializers.
14924 * thread.c (free_thread): Remove.
14925 (init_thread_list): Call delete instead of free_thread.
14926 (new_thread): Call thread_info constructor.
14927 (thread_info::thread_info): New function.
14928 (thread_info::~thread_info): New function.
14929 (delete_thread_1): Call delete instead of free_thread.
14930 (make_cleanup_restore_current_thread): Move tp and frame to
14931 inner block.
14932
fe5f7374
AK
149332017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14934
14935 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
14936 (arc_skip_prologue): Likewise.
14937 (arc_make_frame_cache): Likewise.
14938 (arc_pv_get_operand): New function.
14939 (arc_is_in_prologue): Likewise.
14940 (arc_analyze_prologue): Likewise.
14941 (arc_print_frame_cache): Likewise.
14942 (MAX_PROLOGUE_LENGTH): New constant.
14943
eea78757
AK
149442017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14945
14946 * configure.tgt: Add arc-insn.o.
14947 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
14948 (dump_arc_instruction_command): New function.
14949 (arc_fprintf_disasm): Likewise.
14950 (arc_disassemble_info): Likewise.
14951 (arc_insn_get_operand_value): Likewise.
14952 (arc_insn_get_operand_value_signed): Likewise.
14953 (arc_insn_get_memory_base_reg): Likewise.
14954 (arc_insn_get_memory_offset): Likewise.
14955 (arc_insn_get_branch_target): Likewise.
14956 (arc_insn_dump): Likewise.
14957 (arc_insn_get_linear_next_pc): Likewise.
14958 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
14959 (arc_disassemble_info): Likewise.
14960 (arc_insn_get_branch_target): Likewise.
14961 (arc_insn_get_linear_next_pc): Likewise.
14962 * NEWS: Mention new "maint print arc arc-instruction".
14963
3be78afd
AK
149642017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14965
14966 * arc-tdep (maintenance_print_arc_list): New variable.
14967 (maintenance_print_arc_command): New function.
14968
296ec4fa
AK
149692017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14970
14971 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
14972 Add "limm" and "reserved".
14973 (arc_cannot_fetch_register, arc_cannot_store_register): Add
14974 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
14975 * arc-tdep.h (arc_regnum): Likewise.
14976
f74f865e
MF
149772017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14978
14979 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14980 for THREADPTR register.
14981 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
14982 register.
14983 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
14984 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
14985 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
14986
0d0bf81a
MF
149872017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14988
14989 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
14990 registers above gdbarch_num_regs (gdbarch) as privileged in
14991 call0 ABI.
14992
0ce4291e
MF
149932017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14994
14995 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14996 for a single specified register or for all registers in
14997 a0_base..a0_base + C0_NREGS range.
14998 (supply_gregset_reg): Call regcache_raw_supply for a single
14999 specified register or for all registers in a0_base..a0_base +
15000 C0_NREGS range.
15001
c56054f9
MF
150022017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15003
15004 * arch/xtensa.h (C0_NREGS): Add definition.
15005 * xtensa-tdep.c (C0_NREGS): Remove definition.
15006
a4398628
MF
150072017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15008
15009 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
15010 Drop xtensa_default_isa initialization.
15011 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
15012
8c43009f
PA
150132017-03-27 Pedro Alves <palves@redhat.com>
15014
15015 * dwarf2read.c (file_entry) <dir_index>: Add comment.
15016 (file_entry::include_dir): New method.
15017 (line_header::include_dir_at, line_header::file_name_at): New
15018 methods.
15019 (setup_type_unit_groups, setup_type_unit_groups)
15020 (psymtab_include_file_name): Simplify using the new methods.
15021 (lnp_state_machine) <the_line_header>: New field.
15022 <file>: Add comment.
15023 (lnp_state_machine::current_file): New method.
15024 (dwarf_record_line): Simplify using the new methods.
15025 (init_lnp_state_machine): Initialize the "the_line_header" field.
15026 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
15027 Simplify using the new methods.
15028
a7e80b9e
PA
150292017-03-27 Pedro Alves <palves@redhat.com>
15030
15031 * cp-name-parser.y (make_empty): Delete.
15032 (demangler_special, nested_name, ptr_operator, array_indicator)
15033 (direct_declarator, declarator_1): Use fill_comp instead of
15034 make_empty.
15035
21047726
PA
150362017-03-27 Pedro Alves <palves@redhat.com>
15037
15038 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
15039 to ATTRIBUTE_PRINTF.
15040 * solib-target.c (library_list_start_list): Print "string" not
15041 "version".
15042 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
15043 gdb_xml_error call.
15044
d721ba37
PA
150452017-03-27 Pedro Alves <palves@redhat.com>
15046
15047 * dwarf2read.c (struct file_and_directory): New.
15048 (dwarf2_get_dwz_file): Adjust to use std::string.
15049 (dw2_get_file_names_reader): Adjust to use file_and_directory.
15050 (find_file_and_directory): Adjust to return a file_and_directory
15051 object.
15052 (read_file_scope): Adjust to use file_and_directory. Remove
15053 make_cleanup/do_cleanups calls.
15054 (open_and_init_dwp_file): Adjust to use std::string. Remove
15055 make_cleanup/do_cleanups calls.
15056 * python/python.c (do_start_initialization): Adjust to ldirname
15057 returning a std::string.
15058 * utils.c (ldirname): Now returns a std::string.
15059 * utils.h (ldirname): Change return type to std::string.
15060 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
15061 returning a std::string.
15062 * xml-tdesc.c (file_read_description_xml): Likewise.
15063
ed771251
AH
150642017-03-24 Alan Hayward <alan.hayward@arm.com>
15065
15066 * regcache.c (regcache_debug_print_register): New function.
15067 * regcache.h (regcache_debug_print_register): New declaration.
15068 * target.c (debug_print_register): Remove.
15069 (target_fetch_registers): Call regcache_debug_print_register.
15070 (target_store_registers): Likewise.
15071
568c1b9f
PB
150722017-03-24 Pádraig Brady <pbrady@fb.com>
15073
15074 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
15075 reference beyond the 'lh->include_dirs' array before accessing to
15076 it.
15077 (psymtab_include_file_name): Likewise.
15078 (dwarf_decode_lines_1): Likewise.
15079 (dwarf_decode_lines): Likewise.
15080 (file_file_name): Likewise.
15081
3e00d44f
SM
150822017-03-23 Simon Marchi <simon.marchi@ericsson.com>
15083
15084 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
15085 inferior_ptid.
15086 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
15087 ps_lsetfpregs): Likewise.
15088 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
15089 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
15090 ps_lsetfpregs): Likewise.
15091 * target.c (target_fetch_registers, target_store_registers):
15092 Remove asserts.
15093
077ae656
AH
150942017-03-23 Alan Hayward <alan.hayward@arm.com>
15095
15096 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
15097
1e2b521d
YQ
150982017-03-23 Yao Qi <yao.qi@linaro.org>
15099
15100 * aarch64-tdep.c (aarch64_process_record_test): Declare.
15101 (_initialize_aarch64_tdep): Register it.
15102 (aarch64_record_load_store): Handle PRFM instruction.
15103 (aarch64_process_record_test): New function.
15104
33877125
YQ
151052017-03-23 Yao Qi <yao.qi@linaro.org>
15106
15107 * aarch64-tdep.c (aarch64_record_load_store): Fix code
15108 indentation.
15109
a0eef940
YQ
151102017-03-23 Yao Qi <yao.qi@linaro.org>
15111
15112 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
15113
3f2a3564
PR
151142017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15115
15116 python/python.c (do_start_initialization): Fix memory leak.
15117
b67aeab0
SM
151182017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
15119
15120 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
15121 using get_ptrace_pid.
15122 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
15123 inferior_ptid.
15124 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
15125 inferior_ptid instead of pid.
15126
ffdbe864
YQ
151272017-03-22 Yao Qi <yao.qi@linaro.org>
15128
15129 * aarch64-tdep.c: Wrap locally used classes in anonymous
15130 namespace.
15131 * arm-tdep.c: Likewise.
15132 * linespec.c: Likewise.
15133 * ui-out.c: Likewise.
15134
9d736fbf
JG
151352017-03-22 Jonah Graham <jonah@kichwacoders.com>
15136
15137 PR gdb/19637
15138 * python/lib/gdb/printer/bound_registers.py: Import sys.
15139
3de88e9a
SM
151402017-03-21 Simon Marchi <simon.marchi@ericsson.com>
15141
15142 * windows-nat.c (do_windows_fetch_inferior_registers): Add
15143 windows_thread_info parameter and use it instead of
15144 current_thread.
15145 (windows_fetch_inferior_registers): Don't set current_thread,
15146 pass the thread to do_windows_fetch_inferior_registers. Use
15147 ptid from regcache instead of inferior_ptid.
15148 (do_windows_store_inferior_registers): Add windows_thread_info
15149 parameter and use it instead of current_thread.
15150 (windows_store_inferior_registers): Don't set current_thread,
15151 pass the thread to do_windows_store_inferior_registers. Use
15152 ptid from regcache instead of inferior_ptid.
15153
0e7b8f61
SM
151542017-03-21 Simon Marchi <simon.marchi@ericsson.com>
15155
15156 * ser-mingw.c (ser_windows_raw): Remove reference to
15157 struct serial::current_timeout.
15158
5badf10a
IR
151592017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
15160
15161 PR tdep/20928
15162 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
15163 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
15164 (sparc64_fsr_type): Fix %fsr decoding.
15165
cee59b3f
TW
151662017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
15167
15168 * python/py-record-btrace.c (btpy_insn_data): Change return type
15169 for Python 2.
15170
639a9038
SM
151712017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
15172
15173 * spu-linux-nat.c (spu_fetch_inferior_registers,
15174 spu_store_inferior_registers): Use ptid from regcache, set and
15175 restore inferior_ptid.
15176 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
15177 Likewise.
15178
bcc0c096
SM
151792017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
15180
15181 * i386-linux-nat.c (fetch_register, store_register,
15182 i386_linux_fetch_inferior_registers,
15183 i386_linux_store_inferior_registers): Use ptid from regcache.
15184 * ia64-linux-nat.c (ia64_linux_fetch_register,
15185 ia64_linux_store_register): Likewise.
15186 * inf-ptrace.c (inf_ptrace_fetch_register,
15187 inf_ptrace_store_register): Likewise.
15188 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
15189 m32r_linux_store_inferior_registers): Likewise.
15190 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
15191 m68kbsd_store_inferior_registers): Likewise.
15192 * m68k-linux-nat.c (fetch_register, store_register,
15193 m68k_linux_fetch_inferior_registers,
15194 m68k_linux_store_inferior_registers): Likewise.
15195 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
15196 m88kbsd_store_inferior_registers): Likewise.
15197 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
15198 mips_fbsd_store_inferior_registers): Likewise.
15199 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
15200 mips64_linux_regsets_store_registers): Likewise.
15201 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
15202 mipsnbsd_store_inferior_registers): Likewise.
15203 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
15204 mips64obsd_store_inferior_registers): Likewise.
15205 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
15206 Likewise.
15207 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
15208 ppcfbsd_store_inferior_registers): Likewise.
15209 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
15210 ppc_linux_store_inferior_registers): Likewise.
15211 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
15212 ppcnbsd_store_inferior_registers): Likewise.
15213 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
15214 ppcobsd_store_registers): Likewise.
15215 * procfs.c (procfs_fetch_registers, procfs_store_registers):
15216 Likewise.
15217 * ravenscar-thread.c (ravenscar_fetch_registers,
15218 ravenscar_store_registers, ravenscar_prepare_to_store):
15219 Likewise.
15220 * record-btrace.c (record_btrace_fetch_registers,
15221 record_btrace_store_registers, record_btrace_prepare_to_store):
15222 Likewise.
15223 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
15224 Lookup inferior using ptid from regcache, instead of
15225 current_inferior.
15226 * remote.c (remote_fetch_registers, remote_store_registers): Use
15227 ptid from regcache.
15228 * rs6000-nat.c (fetch_register, store_register): Likewise.
15229 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
15230 s390_linux_store_inferior_registers): Likewise.
15231 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
15232 shnbsd_store_inferior_registers): Likewise.
15233 * sol-thread.c (sol_thread_fetch_registers,
15234 sol_thread_store_registers): Likewise.
15235 * sparc-nat.c (sparc_fetch_inferior_registers,
15236 sparc_store_inferior_registers): Likewise.
15237 * tilegx-linux-nat.c (fetch_inferior_registers,
15238 store_inferior_registers): Likewise.
15239 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
15240 vaxbsd_store_inferior_registers): Likewise.
15241 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
15242 store_xtregs): Likewise.
15243
c0f55cc6
AV
152442017-03-20 Artemiy Volkov <artemiyv@acm.org>
15245
15246 PR gdb/14441
15247 * NEWS: Mention support for rvalue references in GDB and python.
15248 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
15249 supports both lvalue and rvalue references.
15250
15c0a2a9
AV
152512017-03-20 Artemiy Volkov <artemiyv@acm.org>
15252
15253 PR gdb/14441
15254 * gdbtypes.c (rank_one_type): Implement overloading
15255 resolution rules regarding rvalue references.
15256
aa006118
AV
152572017-03-20 Artemiy Volkov <artemiyv@acm.org>
15258
15259 PR gdb/14441
15260 * aarch64-tdep.c (aarch64_type_align)
15261 (aarch64_extract_return_value, aarch64_store_return_value): Change
15262 lvalue reference type checks to general reference type checks.
15263 * amd64-tdep.c (amd64_classify): Likewise.
15264 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
15265 Likewise.
15266 * arm-tdep.c (arm_type_align, arm_extract_return_value)
15267 (arm_store_return_value): Likewise.
15268 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
15269 * c-typeprint.c (c_print_type): Likewise.
15270 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
15271 (cplus_number_of_children, cplus_describe_child): Likewise.
15272 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
15273 * completer.c (expression_completer): Likewise.
15274 * cp-support.c (make_symbol_overload_list_adl_namespace):
15275 Likewise.
15276 * darwin-nat-info.c (info_mach_region_command): Likewise.
15277 * dwarf2loc.c (entry_data_value_coerce_ref)
15278 (value_of_dwarf_reg_entry): Likewise.
15279 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
15280 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
15281 Likewise.
15282 * findvar.c (extract_typed_address, store_typed_address):
15283 Likewise.
15284 * gdbtypes.c (rank_one_type): Likewise.
15285 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
15286 * infcall.c (value_arg_coerce): Likewise.
15287 * language.c (pointer_type): Likewise.
15288 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
15289 Likewise.
15290 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
15291 * mn10300-tdep.c (mn10300_type_align): Likewise.
15292 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
15293 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
15294 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
15295 Likewise.
15296 * printcmd.c (print_formatted, x_command): Likewise.
15297 * python/py-type.c (typy_get_composite, typy_template_argument):
15298 Likewise.
15299 * python/py-value.c (valpy_referenced_value)
15300 (valpy_get_dynamic_type, value_has_field): Likewise.
15301 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
15302 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
15303 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
15304 * spu-tdep.c (spu_scalar_value_p): Likewise.
15305 * symtab.c (lookup_symbol_aux): Likewise.
15306 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
15307 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
15308 Likewise.
15309 * valops.c (value_cast_pointers, value_cast)
15310 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
15311 (value_struct_elt, value_struct_elt_bitpos)
15312 (value_find_oload_method_list, find_overload_match)
15313 (value_rtti_indirect_type): Likewise.
15314 * valprint.c (val_print_scalar_type_p, generic_val_print):
15315 Likewise.
15316 * value.c (value_actual_type, value_as_address, unpack_long)
15317 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
15318 (coerce_ref): Likewise.
15319 * varobj.c (varobj_get_value_type): Likewise.
15320
3fcf899d
AV
153212017-03-20 Artemiy Volkov <artemiyv@acm.org>
15322
15323 PR gdb/14441
15324 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
15325 table of constants.
15326 * python/lib/gdb/command/explore.py: Support exploring values
15327 of rvalue reference types.
15328 * python/lib/gdb/types.py: Implement get_basic_type() for
15329 rvalue reference types.
15330 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
15331 constant.
15332 * python/py-value.c (valpy_getitem): Add an rvalue reference
15333 check.
15334 (valpy_reference_value): Add new parameter "refcode".
15335 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
15336 New wrappers for valpy_reference_value().
15337 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15338 (gdbpy_invoke_xmethod): Likewise.
15339
4297a3f0
AV
153402017-03-20 Artemiy Volkov <artemiyv@acm.org>
15341
15342 PR gdb/14441
15343 * dwarf2read.c (process_die, read_type_die_1): Handle the
15344 DW_TAG_rvalue_reference_type DIE.
15345 (read_tag_reference_type): Add new parameter "refcode".
15346
e1cb3213
AV
153472017-03-20 Artemiy Volkov <artemiyv@acm.org>
15348
15349 PR gdb/14441
15350 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
15351 (c_type_print_modifier, c_type_print_varspec_suffix)
15352 (c_type_print_base): Support printing rvalue reference types.
15353 * c-valprint.c (c_val_print, c_value_print): Support printing
15354 rvalue reference values.
15355
e4347c89
AV
153562017-03-20 Artemiy Volkov <artemiyv@acm.org>
15357
15358 PR gdb/14441
15359 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
15360 typename.
15361 * cp-support.c (replace_typedefs): Handle
15362 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
15363 * python/py-type.c (typy_lookup_type): Likewise.
15364
53cc15f5
AV
153652017-03-20 Artemiy Volkov <artemiyv@acm.org>
15366
15367 PR gdb/14441
15368 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
15369 * parse.c (insert_type): Change assert statement.
15370 (follow_types): Handle rvalue reference types.
15371 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
15372 constant.
15373
a65cfae5
AV
153742017-03-20 Artemiy Volkov <artemiyv@acm.org>
15375
15376 PR gdb/14441
15377 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
15378 value_ref() interface.
15379 * c-valprint.c (c_value_print): Likewise.
15380 * infcall.c (value_arg_coerce): Likewise.
15381 * python/py-value.c (valpy_reference_value): Likewise.
15382 * valops.c (value_cast, value_reinterpret_cast)
15383 (value_dynamic_cast, typecmp): Likewise.
15384 (value_ref): Parameterize by kind of return value reference type.
15385 * value.h (value_ref): Add new parameter "refcode".
15386
3b224330
AV
153872017-03-20 Artemiy Volkov <artemiyv@acm.org>
15388
15389 PR gdb/14441
15390 * dwarf2read.c (read_tag_reference_type): Use
15391 lookup_lvalue_reference_type() instead of lookup_reference_type().
15392 * eval.c (evaluate_subexp_standard): Likewise.
15393 * f-exp.y: Likewise.
15394 * gdbtypes.c (make_reference_type, lookup_reference_type):
15395 Generalize with rvalue reference types.
15396 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
15397 convenience wrappers for lookup_reference_type().
15398 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
15399 reference kind parameter.
15400 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
15401 wrappers for lookup_reference_type().
15402 * guile/scm-type.c (gdbscm_type_reference): Use
15403 lookup_lvalue_reference_type() instead of lookup_reference_type().
15404 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
15405 * parse.c (follow_types): Likewise.
15406 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
15407 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
15408 Likewise.
15409 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15410 (gdbpy_invoke_xmethod): Likewise.
15411 * stabsread.c: Provide extra argument to make_reference_type()
15412 call.
15413 * valops.c (value_ref, value_rtti_indirect_type): Use
15414 lookup_lvalue_reference_type() instead of lookup_reference_type().
15415
f9aeb8d4
AV
154162017-03-20 Artemiy Volkov <artemiyv@acm.org>
15417
15418 PR gdb/14441
15419 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
15420 (TYPE_IS_REFERENCE): New macro.
15421 (struct type): Add rvalue_reference_type field.
15422 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
15423
51457a05
MAL
154242017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15425
15426 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
15427 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
15428 New function definition.
15429 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
15430 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
15431 New function declaration.
15432 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
15433 * mi/mi-interp.h: New file.
15434 * solib.c (info_sharedlibrary_command): Replace for loop with
15435 ALL_SO_LIBS macro
15436 * solib.h (update_solib_list): New function declaration.
15437 (so_list_head): Move macro.
15438 * solist.h (ALL_SO_LIBS): New macro.
15439
e696b3ad
MAL
154402017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15441
15442 * infcmd.c (post_create_inferior): Remove unused argument in
15443 call to solib_add.
15444 * remote.c (remote_start_remote): Likewise.
15445 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
15446 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
15447 (enable_break): Likewise.
15448 * solib.c (update_solib_list): Remove unused target argument
15449 and its documentation.
15450 (solib_add): Remove unused target argument. Remove unused
15451 argument in call to update_solib_list.
15452 (info_sharedlibrary_command): Remove unused argument in call
15453 to update_solib_list.
15454 (sharedlibrary_command): Remove unused argument in call to
15455 solib_add.
15456 (handle_solib_event): Likewise.
15457 (reload_shared_libraries): Likewise.
15458 * solib.h (solib_add): Remove unused target argument.
15459
dcb84eda
AA
154602017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
15461
15462 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
15463 (s390_displaced_step_fixup): Cover relative branches with the
15464 default fixup handling. This fixes lack of support for some
15465 relative branch instructions.
15466
d9cb6cdc
SM
154672017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15468
15469 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
15470 ptid from regcache.
15471
1afaf9f4
SM
154722017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15473
15474 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
15475 i386_darwin_store_inferior_registers): Use ptid from regcache.
15476
aac12e24
SM
154772017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15478
15479 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
15480 i386bsd_store_inferior_registers): Use ptid from regcache.
15481
bbe1eef1
SM
154822017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15483
15484 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
15485 hppaobsd_store_registers): Use ptid from regcache.
15486
10799020
SM
154872017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15488
15489 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
15490 hppanbsd_store_registers): Use ptid from regcache.
15491
00204cf7
SM
154922017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15493
15494 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
15495 from regcache. Use get_ptrace_pid.
15496
11a33714
SM
154972017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15498
15499 * corelow.c (get_core_register_section): Use ptid from regcache,
15500 update doc.
15501
317cd492
SM
155022017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15503
15504 * bsd-uthread.c (bsd_uthread_fetch_registers,
15505 bsd_uthread_store_registers): Use ptid from regcache, set and
15506 restore inferior_ptid.
15507
9ac8a7c2
SM
155082017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15509
15510 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
15511 fetch_fp_regs, store_register, store_regs, store_fp_register,
15512 store_fp_regs): Use ptid from regcache.
15513
4ac4bb6a
SM
155142017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15515
15516 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
15517 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
15518 store_vfp_regs): Use ptid from regcache.
15519
9bcbdca8
PA
155202017-03-17 Pedro Alves <palves@redhat.com>
15521
15522 PR remote/21188
15523 * ser-base.c (ser_base_wait_for): Add comment.
15524 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
15525 version.
15526 * ser-unix.c (hardwire_raw): Remove reference to
15527 scb->current_timeout.
15528 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
15529 (hardwire_ops): Install ser_base_readchar instead of
15530 hardwire_readchar.
15531 * serial.h (struct serial) <current_timeout, timeout_remaining>:
15532 Remove fields.
15533
7503099f
JG
155342017-03-17 Jonah Graham <jonah@kichwacoders.com>
15535
15536 PR gdb/19637
15537 * python/lib/gdb/printer/bound_registers.py: Add support for
15538 Python 3.
15539
7942e96e
AA
155402017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
15541
15542 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
15543 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
15544 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
15545 byte_offset to subobj_byte_offset. Fix the handling of
15546 DWARF_VALUE_STACK on big-endian targets when coming via an
15547 implicit pointer.
15548 (dwarf2_evaluate_loc_desc): Adjust call to
15549 dwarf2_evaluate_loc_desc_full.
15550 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
15551 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
15552
ba14f379
YQ
155532017-03-16 Yao Qi <yao.qi@linaro.org>
15554
15555 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
15556 and REVSH instructions.
15557
b121eeb9
YQ
155582017-03-16 Yao Qi <yao.qi@linaro.org>
15559
15560 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
15561 (arm_record_test): Declare.
15562 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
15563 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
15564 align with the manual.
15565 (thumb_record_misc): Adjust the code order to align with the
15566 manual.
15567 (thumb2_record_decode_insn_handler): Fix instruction matching.
15568 (instruction_reader_thumb): New class.
15569 (arm_record_test): New function.
15570
728a7913
YQ
155712017-03-16 Yao Qi <yao.qi@linaro.org>
15572
15573 * arm-tdep.c (abstract_memory_reader): New class.
15574 (instruction_reader): New class.
15575 (extract_arm_insn): Add argument 'reader'. Callers updated.
15576 (decode_insn): Likewise.
15577
34b43320
DE
155782017-03-16 Doug Evans <dje@google.com>
15579
a7c0469f
DE
15580 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
15581 member. Change type of TYPE member to SCM. All uses updated.
15582 (lsscm_make_lazy_string_smob): Add assert.
15583 (lsscm_make_lazy_string): Flag bad length values.
15584 (lsscm_elt_type): New function.
15585 (gdbscm_lazy_string_to_value): Rewrite to use
15586 lsscm_safe_lazy_string_to_value.
15587 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
15588 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
15589 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
15590 in incoming type.
15591 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15592 * guile/scm-type.c (tyscm_scm_to_type): New function.
15593
155942017-03-15 Doug Evans <dje@google.com>
15595
34b43320
DE
15596 PR python/17728, python/18439, python/18779
15597 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
15598 member. Change type of TYPE member to PyObject *. All uses updated.
15599 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
15600 (gdbpy_create_lazy_string_object): Flag bad length values.
15601 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
15602 Handle typedefs in incoming type.
15603 (stpy_lazy_string_elt_type): New function.
15604 (gdbpy_extract_lazy_string): Call it.
15605 * python/py-value.c (valpy_lazy_string): Flag bad length values.
15606 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
15607 typedefs in incoming type.
15608
a3a5fecc
DE
156092017-03-16 Doug Evans <dje@google.com>
15610
15611 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15612 * guile/scm-type.c (tyscm_scm_to_type): New function.
15613
28f1c605
JW
156142017-03-16 Jiong Wang <jiong.wang@arm.com>
15615
15616 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
15617 "ULONGEST" for "skip".
15618
87c336f6
AA
156192017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
15620
15621 PR gdb/21220
15622 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
15623 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
15624 (inf_ptrace_peek_poke): ...here. New function. Now also loop
15625 over ptrace peek/poke until end of buffer or error.
15626
cf81cf60
SM
156272017-03-14 Simon Marchi <simon.marchi@ericsson.com>
15628
15629 * parse.c (length_of_subexp): Make static.
15630 * parser-defs.h (length_of_subexp): Remove.
15631
a379284a
AA
156322017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
15633
15634 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
15635 as well.
15636
8a6200ba
PA
156372017-03-14 Pedro Alves <palves@redhat.com>
15638
15639 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
15640 (main): Use std::unique_ptr. Remove calls to
15641 cp_demangled_name_parse_free.
15642
f79ec206
SM
156432017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15644
15645 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
15646 alphabsd_store_inferior_registers): Use regcache->ptid instead
15647 of inferior_ptid.
15648
edb5fb00
SM
156492017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15650
15651 * aix-thread.c (aix_thread_fetch_registers,
15652 aix_thread_store_registers): Use regcache->ptid instead of
15653 inferior_ptid.
15654
55119686
SM
156552017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15656
15657 * aarch64-linux-nat.c (fetch_gregs_from_thread,
15658 store_gregs_to_thread, fetch_fpregs_from_thread,
15659 store_fpregs_to_thread): Use regcache->ptid instead of
15660 inferior_ptid.
15661
6a06fbb7
SM
156622017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15663
15664 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
15665 amd64_linux_fetch_inferior_registers): Use regcache->ptid
15666 instead of inferior_ptid.
15667
c6386875
SM
156682017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15669
15670 * target.c (target_fetch_registers, target_store_registers): Add
15671 assert.
15672
ddaaf0fb
SM
156732017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15674
15675 * regcache.h (regcache_get_ptid): New function.
15676 * regcache.c (regcache_get_ptid): New function.
15677
b9da89d1 156782017-03-13 Mark Wielaard <mark@klomp.org>
15679
15680 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
15681
5f4d1085
KS
156822017-03-10 Keith Seitz <keiths@redhat.com>
15683
15684 PR c++/8218
15685 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
15686
c65d6b55
PA
156872017-03-08 Pedro Alves <palves@redhat.com>
15688
15689 PR gdb/18360
15690 * infrun.c (start_step_over, do_target_resume, resume)
15691 (restart_threads): Assert we're not resuming a thread that is
15692 meant to be stopped.
15693 (infrun_thread_stop_requested_callback): Delete.
15694 (infrun_thread_stop_requested): If the thread is internally
15695 stopped, queue a pending stop event and clear the thread's
15696 inline-frame state.
15697 (handle_stop_requested): New function.
15698 (handle_syscall_event, handle_inferior_event_1): Use
15699 handle_stop_requested.
15700 (handle_stop_requested): New function.
15701 (handle_signal_stop): Set the thread's stop_signal here instead of
15702 at caller.
15703 (finish_step_over): Clear step over info unconditionally.
15704 (handle_signal_stop): If the user had interrupted the event
15705 thread, consider the stop a random signal.
15706 (handle_signal_stop) <signal arrived while stepping over
15707 breakpoint>: Don't restart threads here.
15708 (stop_waiting): Don't clear step-over info here.
15709
15c22686
PA
157102017-03-08 Pedro Alves <palves@redhat.com>
15711
15712 PR 21206
15713 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
15714 goes to argument 2, not 1.
15715
6e5d74e7
PA
157162017-03-08 Pedro Alves <palves@redhat.com>
15717
15718 PR cli/21218
15719 * top.c (gdb_readline_wrapper): Avoid passing NULL to
15720 display_gdb_prompt.
15721 (command_line_input): Add comment.
15722
9753a2f6
PA
157232017-03-08 Pedro Alves <palves@redhat.com>
15724
15725 PR tui/21216
15726 * tui/tui-file.c (tui_file::write): New.
15727 * tui/tui-file.h (tui_file): Override "write".
15728 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
15729 factored out from ...
15730 (tui_puts): ... here.
15731 (tui_putc): Use them.
15732 (tui_write): New function.
15733 * tui/tui-io.h (tui_write): Declare.
15734
1672e0d9
SDJ
157352017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
15736
15737 * Makefile.in (SFILES): Replace "environ.c" with
15738 "common/environ.c".
15739 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
15740 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
15741 to...
15742 * common/environ.c: ... here.
15743 * environ.h: Moved to...
15744 * common/environ.h: ... here.
15745
f7bb4e3a
PB
157462017-03-07 Peter Bergner <bergner@vnet.ibm.com>
15747
15748 * gdbarch.sh (pstring_ptr): New static function.
15749 (gdbarch_disassembler_options): Use it.
15750 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
15751 not valid_disassembler_option->name.
15752 * gdbarch.c: Regenerate.
15753
e45ced6c
PB
157542017-03-07 Peter Bergner <bergner@vnet.ibm.com>
15755
15756 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
15757
5f6fd321
PA
157582017-03-07 Pedro Alves <palves@redhat.com>
15759
15760 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
15761
6dbb839a 157622017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
15763
15764 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
15765 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
15766 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 15767 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 15768
d274ecf4
SM
157692017-03-06 Simon Marchi <simon.marchi@ericsson.com>
15770
15771 * xtensa-linux-nat.c (fetch_gregs): Remove const.
15772
df97be55
SM
157732017-03-03 Simon Marchi <simon.marchi@ericsson.com>
15774
15775 * remote.c (remote_add_target_side_commands): Use range-based
15776 for loop.
15777
7d45f3df
YQ
157782017-03-03 Yao Qi <yao.qi@linaro.org>
15779
15780 PR gdb/21165
15781 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
15782 value is lazy.
15783 * valprint.c (common_val_print): Likewise.
15784
65b48a81
PB
157852017-02-28 Peter Bergner <bergner@vnet.ibm.com>
15786
15787 * NEWS: Mention new set/show disassembler-options commands.
15788 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
15789 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
15790 (prospective_options): New static variable.
15791 (gdb_disassembler::gdb_disassembler): Initialize
15792 m_di.disassembler_options.
15793 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
15794 (get_disassembler_options): New function.
15795 (set_disassembler_options): Likewise.
15796 (set_disassembler_options_sfunc): Likewise.
15797 (show_disassembler_options_sfunc): Likewise.
15798 (disassembler_options_completer): Likewise.
15799 (_initialize_disasm): Likewise.
15800 * disasm.h (get_disassembler_options): New prototype.
15801 (set_disassembler_options): Likewise.
15802 * gdbarch.sh (gdbarch_disassembler_options): New variable.
15803 (gdbarch_verify_disassembler_options): Likewise.
15804 * gdbarch.c: Regenerate.
15805 * gdbarch.h: Likewise.
15806 * arm-tdep.c (num_disassembly_options): Delete.
15807 (set_disassembly_style): Likewise.
15808 (arm_disassembler_options): New static variable.
15809 (set_disassembly_style_sfunc): Convert short style name into long
15810 option name. Call set_disassembler_options.
15811 (show_disassembly_style_sfunc): New function.
15812 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
15813 set_gdbarch_verify_disassembler_options.
15814 (_initialize_arm_tdep): Delete regnames variable and update callers.
15815 (arm_disassembler_options): Initialize.
15816 (disasm_options): New variable.
15817 (num_disassembly_options): Rename from this...
15818 (num_disassembly_styles): ...to this. Compute by scanning through
15819 disasm_options.
15820 (valid_disassembly_styles): Initialize using disasm_options.
15821 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
15822 set_arm_regname_option.
15823 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
15824 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
15825 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
15826 set_gdbarch_verify_disassembler_options.
15827 * s390-tdep.c (s390_disassembler_options): New static variable.
15828 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
15829 set_gdbarch_verify_disassembler_options.
15830
d538e36d
SM
158312017-02-27 Simon Marchi <simon.marchi@ericsson.com>
15832
15833 * remote.c (remote_add_target_side_condition): Remove "struct"
15834 keyword from range-based for loop.
15835
83621223
SM
158362017-02-27 Simon Marchi <simon.marchi@ericsson.com>
15837
15838 * remote.c (remote_add_target_side_condition): Use range-based
15839 for loop. Update comment.
15840
2123df0e
YQ
158412017-02-27 Yao Qi <yao.qi@linaro.org>
15842
15843 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
15844
8e368124
AH
158452017-02-26 Alan Hayward <alan.hayward@arm.com>
15846
15847 * regcache.c (regcache_raw_update): New function.
15848 (regcache_raw_read): Move code to regcache_raw_update.
15849 * regcache.h (regcache_raw_update): New declaration.
15850 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
15851
a49dd8dd
JK
158522017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
15853
15854 * dwarf2read.c (create_debug_type_hash_table): Initialize
15855 header.signature and header.type_offset_in_tu.
15856
34e4bae9
PA
158572017-02-24 Pedro Alves <palves@redhat.com>
15858
15859 * symtab.c (make_file_symbol_completion_list_1): Use
15860 add_symtab_completions.
15861
b0e4b369
AH
158622017-02-24 Alan Hayward <alan.hayward@arm.com>
15863
15864 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
15865
975c21ab
AH
158662017-02-24 Alan Hayward <alan.hayward@arm.com>
15867
15868 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
15869 I386_MAX_REGISTER_SIZE.
15870 (i386_pseudo_register_write): Likewise.
15871 (i386_process_record): Likewise.
15872 * i387-tdep.c (i387_supply_xsave): Likewise.
15873 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
15874 (store_register): Likewise.
15875
14bc53a8
PA
158762017-02-23 Pedro Alves <palves@redhat.com>
15877
15878 * ada-lang.c: Include "common/function-view.h".
15879 (ada_iterate_over_symbols): Adjust to use function_view as
15880 callback type.
15881 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
15882 (ada_make_symbol_completion_list): Use a lambda.
15883 (ada_exc_search_name_matches): Delete.
15884 (name_matches_regex): New.
15885 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
15886 * compile/compile-c-support.c: Include "common/function-view.h".
15887 (print_one_macro): Change prototype to accept a ui_file pointer.
15888 (write_macro_definitions): Use a lambda.
15889 * dwarf2read.c: Include "common/function-view.h".
15890 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
15891 (dw2_expand_symtabs_matching): Adjust to use function_view as
15892 callback type.
15893 * language.h: Include "common/function-view.h".
15894 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
15895 function_view as callback type.
15896 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
15897 * linespec.c: Include "common/function-view.h".
15898 (collect_info::add_symbol): New method.
15899 (struct symbol_and_data_callback, iterate_inline_only, struct
15900 symbol_matcher_data, iterate_name_matcher): Delete.
15901 (iterate_over_all_matching_symtabs): Adjust to use function_view
15902 as callback type and lambdas.
15903 (iterate_over_file_blocks): Adjust to use function_view as
15904 callback type.
15905 (decode_compound_collector): Now a class with private fields.
15906 (decode_compound_collector::release_symbols): New method.
15907 (collect_one_symbol): Rename to...
15908 (decode_compound_collector::operator()): ... this and adjust.
15909 (lookup_prefix_sym): decode_compound_collector construction bits
15910 move to decode_compound_collector ctor. Pass the
15911 decode_compound_collector object directly as callback. Remove
15912 cleanups and use decode_compound_collector::release_symbols
15913 instead.
15914 (symtab_collector): Now a class with private fields.
15915 (symtab_collector::release_symtabs): New method.
15916 (add_symtabs_to_list): Rename to...
15917 (symtab_collector::operator()): ... this and adjust.
15918 (collect_symtabs_from_filename): symtab_collector construction
15919 bits move to symtab_collector ctor. Pass the symtab_collector
15920 object directly as callback. Remove cleanups and use
15921 symtab_collector::release_symtabs instead.
15922 (collect_symbols): Delete.
15923 (add_matching_symbols_to_info): Use lambdas.
15924 * macrocmd.c (print_macro_callback): Delete.
15925 (info_macro_command): Use a lambda.
15926 (info_macros_command): Pass print_macro_definition as callable
15927 directly.
15928 (print_one_macro): Remove 'ignore' parameter.
15929 (macro_list_command): Adjust.
15930 * macrotab.c (macro_for_each_data::fn): Now a function_view.
15931 (macro_for_each_data::user_data): Delete field.
15932 (foreach_macro): Adjust to call the function_view.
15933 (macro_for_each): Adjust to use function_view as callback type.
15934 (foreach_macro_in_scope): Adjust to call the function_view.
15935 (macro_for_each_in_scope): Adjust to use function_view as callback
15936 type.
15937 * macrotab.h: Include "common/function-view.h".
15938 (macro_callback_fn): Declare a prototype instead of a pointer.
15939 Remove "user_data" parameter.
15940 (macro_for_each, macro_for_each_in_scope): Adjust to use
15941 function_view as callback type.
15942 * psymtab.c (partial_map_expand_apply)
15943 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
15944 Adjust to use function_view as callback type and to return bool.
15945 (psym_expand_symtabs_matching): Adjust to use function_view as
15946 callback types.
15947 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
15948 to use function_view as callback type and to return bool.
15949 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
15950 callback types.
15951 * symfile.c (expand_symtabs_matching): Adjust to use function_view
15952 as callback types.
15953 * symfile.h: Include "common/function-view.h".
15954 (expand_symtabs_file_matcher_ftype)
15955 (expand_symtabs_symbol_matcher_ftype)
15956 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
15957 return bool.
15958 (quick_symbol_functions::map_symtabs_matching_filename)
15959 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
15960 function_view as callback type and return bool.
15961 (expand_symtabs_matching): Adjust to use function_view as callback
15962 type.
15963 (maintenance_expand_name_matcher)
15964 (maintenance_expand_file_matcher): Delete.
15965 (maintenance_expand_symtabs): Use lambdas.
15966 * symtab.c (iterate_over_some_symtabs): Adjust to use
15967 function_view as callback types and return bool.
15968 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
15969 of a cleanup.
15970 (lookup_symtab_callback): Delete.
15971 (lookup_symtab): Use a lambda.
15972 (iterate_over_symbols): Adjust to use function_view as callback
15973 type.
15974 (struct search_symbols_data, search_symbols_file_matches)
15975 (search_symbols_name_matches): Delete.
15976 (search_symbols): Use a pair of lambdas.
15977 (struct add_name_data, add_macro_name, symbol_completion_matcher)
15978 (symtab_expansion_callback): Delete.
15979 (default_make_symbol_completion_list_break_on_1): Use lambdas.
15980 * symtab.h: Include "common/function-view.h".
15981 (iterate_over_some_symtabs): Adjust to use function_view as
15982 callback type and return bool.
15983 (iterate_over_symtabs): Adjust to use function_view as callback
15984 type.
15985 (symbol_found_callback_ftype): Remove 'data' parameter and return
15986 bool.
15987 (iterate_over_symbols): Adjust to use function_view as callback
15988 type.
15989
07e253aa
PA
159902017-02-23 Pedro Alves <palves@redhat.com>
15991
15992 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
15993 (%.o) <unittests/%.c>: New pattern.
15994 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
15995 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
15996 * common/function-view.h: New file.
15997 * unittests/function-view-selftests.c: New file.
15998 * configure: Regenerate.
15999
8eaf5320
SM
160002017-02-23 Simon Marchi <simon.marchi@ericsson.com>
16001
16002 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
16003 inferior_ptid.
16004 * go32-nat.c (go32_thread_alive): Likewise.
16005
38768751
YQ
160062017-02-23 Yao Qi <yao.qi@linaro.org>
16007
16008 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
16009 delete.
16010
0a8beaba
YQ
160112017-02-23 Yao Qi <yao.qi@linaro.org>
16012
16013 * varobj.c (varobj_clear_saved_item): Use delete instead of
16014 xfree.
16015 (update_dynamic_varobj_children): Likewise.
16016
58fdfd2c
JK
160172017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
16018
16019 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
16020
1b90b139
SM
160212017-02-21 Simon Marchi <simon.marchi@ericsson.com>
16022
16023 * common/enum-flags.h (enum_flags::enum_flags): Initialize
16024 m_enum_value to 0 in default constructor.
16025
2039d74e
EBM
160262017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
16027
16028 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
16029 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
16030 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
16031 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
16032 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
16033 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
16034 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
16035 IS_STORE_CONDITIONAL_INSN.
16036
7814882a
JK
160372017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
16038
16039 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
16040
0ae60b63
JK
160412017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16042
16043 * NEWS (Changes since GDB 7.12): Add DWARF-5.
16044
0224619f
JK
160452017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16046
16047 * dwarf2read.c (skip_one_die, read_attribute_value)
16048 (dwarf2_const_value_attr, dump_die_shallow)
16049 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
16050 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
16051
0af92d60
JK
160522017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16053
16054 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
16055 (dwarf_parse_macro_header): Accept DWARF version 5.
16056 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
16057
216f72a1
JK
160582017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16059
16060 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
16061 DW_AT_GNU_*.
16062 * common/common-exceptions.h (enum errors): Likewise.
16063 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
16064 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
16065 (dwarf_expr_context::execute_stack_op): Likewise.
16066 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
16067 Likewise.
16068 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
16069 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
16070 (show_entry_values_debug, call_site_to_target_addr)
16071 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
16072 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
16073 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
16074 (value_of_dwarf_block_entry, indirect_pieced_value)
16075 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
16076 (disassemble_dwarf_expression): Likewise.
16077 * dwarf2read.c (process_die, inherit_abstract_dies)
16078 (read_call_site_scope): Likewise.
16079 * gdbtypes.h (struct func_type, struct call_site_parameter)
16080 (struct call_site): Likewise.
16081 * stack.c (read_frame_arg): Likewise.
16082 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
16083
43988095
JK
160842017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16085
16086 * defs.h (read_unsigned_leb128): New declaration.
16087 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
16088 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
16089 (dwarf2_find_location_expression): Call also
16090 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
16091 * dwarf2loc.h (dwarf2_version): New declaration.
16092 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
16093 rnglists.
16094 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
16095 .debug_rnglists.
16096 (struct dwop_section_names): Add loclists_dwo.
16097 (dwop_section_names): Add .debug_loclists.dwo.
16098 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
16099 (struct dwarf2_per_cu_data): Add dwarf_version.
16100 (struct dwo_sections): Add loclists.
16101 (struct attr_abbrev): Add implicit_const.
16102 (read_indirect_line_string): New declaration.
16103 (read_unsigned_leb128): Delete declaration.
16104 (rcuh_kind): New definition.
16105 (read_and_check_comp_unit_head): Change parameter
16106 is_debug_types_section to section_kind.
16107 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
16108 (read_comp_unit_head): Change parameter abfd to section, add parameter
16109 section_kind. Handle DWARF-5.
16110 (error_check_comp_unit_head): Accept also DWARF version 5.
16111 (read_and_check_comp_unit_head): Change parameter
16112 is_debug_types_section to section_kind.
16113 (read_and_check_type_unit_head): Delete function.
16114 (read_abbrev_offset): Handle DWARF-5.
16115 (create_debug_type_hash_table): Add parameter section_kind. Process
16116 only DW_UT_type. Use signature and type_offset_in_tu from struct
16117 comp_unit_head.
16118 (create_debug_types_hash_table): Update create_debug_type_hash_table
16119 caller.
16120 (create_all_type_units): Call create_debug_type_hash_table.
16121 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
16122 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
16123 caller.
16124 (skip_one_die): Handle DW_FORM_implicit_const.
16125 (dwarf2_rnglists_process): New function.
16126 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
16127 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
16128 (read_attribute_value): Handle DW_FORM_implicit_const,
16129 DW_FORM_line_strp.
16130 (read_attribute): Handle DW_FORM_implicit_const.
16131 (read_indirect_string_at_offset_from): New function from
16132 read_indirect_string_at_offset.
16133 (read_indirect_string_at_offset): Call
16134 read_indirect_string_at_offset_from.
16135 (read_indirect_line_string_at_offset): New function.
16136 (read_indirect_string): New function comment.
16137 (read_indirect_line_string): New function.
16138 (read_unsigned_leb128): Make it global.
16139 (dwarf2_string_attr): Handle DWARF-5.
16140 (add_include_dir_stub, read_formatted_entries): New functions.
16141 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
16142 Handle DWARF-5.
16143 (per_cu_header_read_in): Update read_comp_unit_head caller.
16144 (dwarf2_version): New function.
16145 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
16146 rnglists.
16147 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
16148 fields.
16149
22d2f3ab
JK
161502017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16151
16152 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
16153
5f46c5a5
JK
161542017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16155
16156 * dwarf2read.c (dwarf2_ranges_process): New function from
16157 dwarf2_ranges_read.
16158 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
16159 dwarf2_ranges_process.
16160
78d4d2c5
JK
161612017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16162
16163 * dwarf2read.c (create_debug_type_hash_table): New function from
16164 create_debug_types_hash_table.
16165 (create_debug_types_hash_table): Call create_debug_type_hash_table.
16166 (create_all_type_units, open_and_init_dwo_file): Update
16167 create_debug_types_hash_table callers.
16168
1b076f25
SDJ
161692017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
16170
16171 PR gdb/16188
16172 * fork-child.c (trace_start_error): Fix thinko. va_end should
16173 refer to 'ap', not 'args'.
16174
0db8980c
SDJ
161752017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
16176 Pedro Alves <palves@redhat.com>
16177
16178 PR gdb/16188
16179 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
16180 calls succeeded.
16181 * fork-child.c (trace_start_error): New function.
16182 (trace_start_error_with_name): Likewise.
16183 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
16184 * inf-ptrace.c (inf_ptrace_me): Likewise.
16185 * inferior.h (trace_start_error): New prototype.
16186 (trace_start_error_with_name): Likewise.
16187
99e8a4f9
SDJ
161882017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
16189
16190 PR gdb/21164
16191 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
16192 NULL before using it.
16193 * symmisc.c (maintenance_print_symbols): Likewise.
16194 (maintenance_print_msymbols): Likewise.
16195
4e746bb6
TW
161962017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16197
16198 * NEWS: Add record Python bindings entry.
16199
162002017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16201
16202 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
16203 py-record-full.o.
16204 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
16205 * python/py-record-btrace.c, python/py-record-btrace.h,
16206 python/py-record-full.c, python/py-record-full.h: New file.
16207 * python/py-record.c: Add include for py-record-btrace.h and
16208 py-record-full.h.
16209 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
16210 recpy_instruction_history, recpy_function_call_history, recpy_begin,
16211 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
16212 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
16213 New definition.
16214 (gdbpy_initialize_btrace): New export.
16215 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
16216
162172017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16218
16219 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
16220 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
16221 * python/py-record.c: New file.
16222 * python/python-internal.h (gdbpy_start_recording,
16223 gdbpy_current_recording, gdpy_stop_recording,
16224 gdbpy_initialize_record): New export.
16225 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
16226 (python_GdbMethods): Add gdbpy_start_recording,
16227 gdbpy_current_recording and gdbpy_stop_recording.
16228
162292017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16230
16231 * record-btrace.c (record_btrace_record_method): New function.
16232 (init_record_btrace_ops): Initialize to_record_method.
16233 * record-full.c (record_full_record_method): New function.
16234 (init_record_full_ops, init_record_full_core_ops): Add
16235 record_full_record_method.
16236 * record.h (enum record_method): New enum.
16237 * target-debug.h (target_debug_print_enum_record_method: New define.
16238 * target-delegates.c: Regenerate.
16239 * target.c (target_record_method): New function.
16240 * target.h: Include record.h.
16241 (struct target_ops) <to_record_method>: New field.
16242 (target_record_method): New export.
16243
162442017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16245
16246 * record.h (record_start, record_stop): New export.
16247 * record.c (record_start, record_stop): New function.
16248
162492017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16250
16251 * btrace.c (btrace_fetch): Copy function call segments pointer
16252 into a vector.
16253 (btrace_clear): Clear the vector.
16254 (btrace_find_insn_by_number): Use binary search to find the correct
16255 function call segment.
16256 * btrace.h (brace_fun_p): New typedef.
16257 (struct btrace_thread_info) <functions>: New field.
16258
162592017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16260
16261 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
16262 * btrace.c (btrace_decode_error): ... here. New function.
16263 * btrace.h (btrace_decode_error): New export.
16264
162652017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16266
16267 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
16268 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
16269 btrace_find_insn_by_number): Remove special case for gaps.
16270 * btrace.h (btrace_insn_get_error): New export.
16271 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
16272 * record-btrace.c (btrace_insn_history): Print number for gaps.
16273 (record_btrace_info, record_btrace_goto): Handle gaps.
16274
3f77c769
TT
162752017-02-14 Tom Tromey <tom@tromey.com>
16276
16277 PR python/13598:
16278 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
16279 event.
16280 * python/py-evts.c (gdbpy_initialize_py_events): Add
16281 before_prompt registry.
16282 * python/py-events.h (events_object) <before_prompt>: New field.
16283
4c2c7ac6
MM
162842017-02-14 Markus Metzger <markus.t.metzger@intel.com>
16285
16286 * btrace.c (ftrace_new_switch): Preserve up link and flags.
16287
5cf30ebf
LM
162882017-02-13 Luis Machado <lgustavo@codesourcery.com>
16289
16290 * symfile (_initialize_symfile): Add usage text to the load command's
16291 help text.
16292
26a06916
SM
162932017-02-10 Simon Marchi <simon.marchi@ericsson.com>
16294
16295 * utils.c (defaulted_query): Don't query on secondary UIs.
16296
0b145e37
TT
162972017-02-10 Tom Tromey <tom@tromey.com>
16298
16299 * rust-lang.c (rust_get_disr_info): Remove unused variable.
16300
2d8365c4
TT
163012017-02-10 Tom Tromey <tom@tromey.com>
16302
16303 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
16304 "cleanup" local.
16305 * python/py-type.c (typy_legacy_template_argument): Remove
16306 unnecessary "cleanup" local.
16307
2bb8f231
TT
163082017-02-10 Tom Tromey <tom@tromey.com>
16309
16310 * python/python.c (do_start_initialization): New function, from
16311 _initialize_python.
16312 (_initialize_python): Call do_start_initialization.
16313 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
16314 goto.
16315
1bdfaf42
TT
163162017-02-10 Tom Tromey <tom@tromey.com>
16317
16318 * python/py-prettyprint.c (pretty_print_one_value): Use
16319 gdbpy_ref.
16320
88b6faea
TT
163212017-02-10 Tom Tromey <tom@tromey.com>
16322
16323 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
16324 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
16325 gdbpy_ref.
16326 * python/py-type.c (field_new): Use gdbpy_ref.
16327 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
16328 gdbpy_ref.
16329 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
16330 (py_free_pspace): Likewise.
16331 (pspace_to_pspace_object): Likewise.
16332 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
16333 (py_free_objfile): Likewise.
16334 (objfile_to_objfile_object): Likewise.
16335 * python/py-inferior.c (delete_thread_object): Use
16336 gdbpy_ref.
16337 (infpy_read_memory): Likewise.
16338 (py_free_inferior): Likewise.
16339 * python/py-evtregistry.c (create_eventregistry_object): Use
16340 gdbpy_ref.
16341 * python/py-event.c (create_event_object): Use gdbpy_ref.
16342
7780f186
TT
163432017-02-10 Tom Tromey <tom@tromey.com>
16344
16345 * python/py-ref.h (gdbpy_ref_policy): Now a template.
16346 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
16347 used.
16348 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
16349 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
16350 python/py-exitedevent.c, python/py-finishbreakpoint.c,
16351 python/py-framefilter.c, python/py-function.c,
16352 python/py-inferior.c, python/py-infevents.c,
16353 python/py-linetable.c, python/py-newobjfileevent.c,
16354 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
16355 python/py-signalevent.c, python/py-stopevent.c,
16356 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
16357 python/py-unwind.c, python/py-utils.c, python/py-value.c,
16358 python/py-varobj.c, python/py-xmethods.c, python/python.c,
16359 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
16360
d4b0bb18
TT
163612017-02-10 Tom Tromey <tom@tromey.com>
16362
16363 * ui-out.h (ui_out_emit_type): New class.
16364 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
16365 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
16366 and ui_out_emit_tuple.
16367 (enumerate_locals): Likewise.
16368 (py_mi_print_variables, py_print_locals, py_print_args): Use
16369 ui_out_emit_list.
16370 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
16371 ui_out_emit_list.
16372 * common/gdb_optional.h: New file.
16373
f67f945c
MG
163742017-02-10 Martin Galvan <martingalvan@sourceware.org>
16375
16376 * MAINTAINERS (Write After Approval): Update my e-mail address.
16377
18da0c51
MG
163782017-02-10 Martin Galvan <martingalvan@sourceware.org>
16379
16380 PR gdb/21122
16381 * breakpoint.c (_initialize_breakpoint): Update the help description
16382 of the 'commands' command to indicate that it takes a list argument.
16383
62c14536
SM
163842017-02-09 Simon Marchi <simon.marchi@ericsson.com>
16385
16386 * interps.c (current_interp_set_logging): Remove "return".
16387
ff6fa247
GB
163882017-02-09 Gary Benson <gbenson@redhat.com>
16389
16390 * symtab.c (add_symtab_completions): Prevent NULL pointer
16391 dereference.
16392
a474bd8e
PA
163932017-02-08 Pedro Alves <palves@redhat.com>
16394
16395 * interps.c (interp::interp): Remove reference to quiet_p.
16396 (interp_set): Make static. Remove dead "Switching to" output
16397 code.
16398 (interp_quiet_p, interp_set_quiet): Delete.
16399 (interpreter_exec_cmd): Don't set the interpreter quiet.
16400 * interps.h (interp_quiet_p): Make static.
16401 (class interp) <quiet_p>: Remove field
16402
3d7b173c
JG
164032017-02-08 Jerome Guitton <guitton@adacore.com>
16404
604c4576
JG
16405 * cli/cli-decode.c (find_command_name_length): Make it extern.
16406 * cli/cli-decode.h (find_command_name_length): Declare.
16407 * cli/cli-script.c (command_name_equals, line_first_arg):
16408 New functions.
16409 (process_next_line): Use cli-decode to parse command names.
16410 (build_command_line): Make args a constant pointer.
16411
164122017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 16413
3d7b173c
JG
16414 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
16415 Remove case-insensitive search.
16416
1291063d
JM
164172017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
16418
16419 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
16420 at the end of the line. Avoids an ARI warning.
16421
20b477a7
LM
164222017-02-06 Luis Machado <lgustavo@codesourcery.com>
16423
16424 * NEWS: Mention support for record/replay of Intel 64 rdrand and
16425 rdseed instructions.
16426 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
16427
3f7b46f2
IR
164282017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
16429
16430 PR tdep/20936
16431 Provide and use sparc32 and sparc64 target description XML files.
16432 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
16433 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
16434 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
16435 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
16436 * features/sparc/sparc32-solaris.xml: New file.
16437 * features/sparc/sparc64-solaris.xml: New file.
16438 * features/sparc/sparc32-solaris.c: Generated.
16439 * features/sparc/sparc64-solaris.c: Generated.
16440 * sparc-tdep.h: Account for differences in target descriptions.
16441 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
16442 (sparc32_register_type): Use target provided registers.
16443 (validate_tdesc_registers): New function.
16444 (sparc32_gdbarch_init): Use tdesc_has_registers.
16445 Set pseudoregister functions.
16446 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
16447 (sparc64_register_type): Use target provided registers.
16448 (sparc64_init_abi): Set pseudoregister functions.
16449
f0fd41c1
TT
164502017-02-03 Tom Tromey <tom@tromey.com>
16451
16452 PR rust/21097:
16453 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
16454 with a single member.
16455
d6f9b0fb
PA
164562017-02-03 Pedro Alves <palves@redhat.com>
16457
16458 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
16459 (cli_interp_base::~cli_interp_base): New.
16460 (cli_interp): New struct.
16461 (as_cli_interp): Cast the interp itself to cli_interp.
16462 (cli_interpreter_pre_command_loop): Rename to ...
16463 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
16464 parameter.
16465 (cli_interpreter_init): Rename to ...
16466 (cli_interp::init): ... this. Remove 'self' parameter. Use
16467 boolean. Make extern.
16468 (cli_interpreter_resume): Rename to ...
16469 (cli_interp::resume): ... this. Remove 'data' parameter. Make
16470 extern.
16471 (cli_interpreter_suspend): Rename to ...
16472 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
16473 extern.
16474 (cli_interpreter_exec): Rename to ...
16475 (cli_interp::exec): ... this. Remove 'data' parameter. Make
16476 extern.
16477 (cli_interpreter_supports_command_editing): Rename to ...
16478 (cli_interp_base::supports_command_editing): ... this. Remove
16479 'interp' parameter. Make extern.
16480 (cli_ui_out): Rename to ...
16481 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
16482 Make extern.
16483 (cli_set_logging): Rename to ...
16484 (cli_interp_base::set_logging): ... this. Remove 'interp'
16485 parameter. Make extern.
16486 (cli_interp_procs): Delete.
16487 (cli_interp_factory): Adjust to use "new".
16488 * cli/cli-interp.h: Include "interps.h".
16489 (struct cli_interp_base): New struct.
16490 * interps.c (struct interp): Delete. Fields moved to interps.h.
16491 (interp_new): Delete.
16492 (interp::interp, interp::~interp): New.
16493 (interp_set): Use bool, and return void. Assume the interpreter
16494 has suspend, init and resume methods, and that the all return
16495 void.
16496 (set_top_level_interpreter): interp_set returns void.
16497 (interp_ui_out): Adapt.
16498 (current_interp_set_logging): Adapt.
16499 (interp_data): Delete.
16500 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
16501 (interp_exec): Adapt.
16502 (top_level_interpreter_data): Delete.
16503 * interps.h (interp_init_ftype, interp_resume_ftype)
16504 (interp_suspend_ftype, interp_exec_ftype)
16505 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
16506 (class interp): New.
16507 (interp_new): Delete.
16508 (interp_set): Now returns void. Use bool.
16509 (interp_data, top_level_interpreter_data): Delete.
16510 * mi/mi-common.h: Include interps.h.
16511 (class mi_interp): Inherit from interp. Define a ctor. Declare
16512 init, resume, suspect, exec, interp_ui_out, set_logging and
16513 pre_command_loop methods.
16514 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
16515 (mi_interpreter_init): Rename to ...
16516 (mi_interp::init): ... this. Remove the 'interp' parameter, use
16517 bool, return void and make extern. Adjust.
16518 (mi_interpreter_resume): ... Rename to ...
16519 (mi_interp::resume): ... this. Remove the 'data' parameter,
16520 return void and make extern. Adjust.
16521 (mi_interpreter_suspend): ... Rename to ...
16522 (mi_interp::suspend): ... this. Remove the 'data' parameter,
16523 return void and make extern. Adjust.
16524 (mi_interpreter_exec): ... Rename to ...
16525 (mi_interp::exec): ... this. Remove the 'data' parameter and make
16526 extern. Adjust.
16527 (mi_interpreter_pre_command_loop): ... Rename to ...
16528 (mi_interp::pre_command_loop): ... this. Remove the 'self'
16529 parameter and make extern.
16530 (mi_on_normal_stop_1): Adjust.
16531 (mi_ui_out): Rename to ...
16532 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
16533 parameter and make extern. Adjust.
16534 (mi_set_logging): Rename to ...
16535 (mi_interp::set_logging): ... this. Remove the 'interp'
16536 parameter and make extern. Adjust.
16537 (mi_interp_procs): Delete.
16538 (mi_interp_factory): Adjust to use 'new'.
16539 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
16540 (mi_print_exception, mi_execute_command, mi_load_progress):
16541 Adjust.
16542 * tui/tui-interp.c (tui_interp): New class.
16543 (as_tui_interp): Return a tui_interp pointer.
16544 (tui_on_normal_stop, tui_on_signal_received)
16545 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
16546 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
16547 to use interp::interp_ui_out.
16548 (tui_init): Rename to ...
16549 (tui_interp::init): ... this. Remove the 'self' parameter, use
16550 bool, return void and make extern. Adjust.
16551 (tui_resume): Rename to ...
16552 (tui_interp::resume): ... this. Remove the 'data' parameter,
16553 return void and make extern. Adjust.
16554 (tui_suspend): Rename to ...
16555 (tui_interp::suspend): ... this. Remove the 'data' parameter,
16556 return void and make extern. Adjust.
16557 (tui_ui_out): Rename to ...
16558 (tui_interp::interp_ui_out): ... this. Remove the 'self'
16559 parameter, and make extern. Adjust.
16560 (tui_exec): Rename to ...
16561 (tui_interp::exec): ... this. Remove the 'data' parameter and
16562 make extern.
16563 (tui_interp_procs): Delete.
16564 (tui_interp_factory): Use "new".
16565
65c40c95
TT
165662017-02-02 Tom Tromey <tom@tromey.com>
16567
16568 * rust-exp.y (ends_raw_string, space_then_number)
16569 (rust_identifier_start_p): Return bool.
16570 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
16571 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
16572 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
16573 (rust_chartype_p): Return bool.
16574 (val_print_struct, rust_print_struct_def, rust_print_type):
16575 Update.
16576 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
16577 Return bool.
16578
b50f188d
TT
165792017-02-02 Tom Tromey <tom@tromey.com>
16580
16581 * rust-lang.c: Reindent.
16582
03c85b11
TT
165832017-02-02 Tom Tromey <tom@tromey.com>
16584
16585 * rust-lang.h (rust_crate_for_block): Update.
16586 * rust-lang.c (rust_crate_for_block): Return std::string.
16587 (rust_get_disr_info): Use std:;string, not
16588 gdb::unique_xmalloc_ptr.
16589 * rust-exp.y (crate_name): Update.
16590
9b6da501
PA
165912017-02-02 Pedro Alves <palves@redhat.com>
16592
16593 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
16594 field out of gdb_disassembler_test and make it static.
16595
ec4cb20b
PA
165962017-02-02 Pedro Alves <palves@redhat.com>
16597
16598 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
16599 mi1_interp and mi_interp fields.
16600
5be5dbf0
PA
166012017-02-02 Pedro Alves <palves@redhat.com>
16602
616268b6
PA
16603 * cli/cli-interp.c (struct saved_output_files, saved_output):
16604 Moved from cli/cli-logging.c.
16605 (cli_set_logging): New function.
16606 (cli_interp_procs): Install cli_set_logging.
16607 * cli/cli-interp.h (make_logging_output, cli_set_logging):
16608 Declare.
16609 * cli/cli-logging.c (struct saved_output_files, saved_output):
16610 Moved to cli/cli-interp.c.
16611 (pop_output_files): Don't save outputs here.
16612 (make_logging_output): New function.
16613 (handle_redirections): Don't build tee nor save previous outputs
16614 here.
16615 * interps.c (current_interp_set_logging): Change prototype.
16616 Assume there's always a set_logging_proc method installed.
16617 * interps.h (interp_set_logging_ftype): Change prototype.
16618 (current_interp_set_logging): Change prototype and adjust comment.
16619 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
16620 use make_logging_output.
16621 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
166222017-02-02 Pedro Alves <palves@redhat.com>
16623
5be5dbf0
PA
16624 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
16625 from ...
16626 (set_logging_overwrite): ... here.
16627 (logging_no_redirect_file): Delete.
16628 (set_logging_redirect): Don't handle redirection on the fly.
16629 Instead warn that "logging off" / "logging on" is necessary.
16630 (pop_output_files): Delete references to logging_no_redirect_file.
16631 (show_logging_command): Always speak in terms of what will happen
16632 once logging is reenabled.
16633
c99cc448
PA
166342017-02-02 Pedro Alves <palves@redhat.com>
16635
16636 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
16637
8b172ce7
PA
166382017-02-02 Pedro Alves <palves@redhat.com>
16639
16640 * disasm.c (gdb_pretty_print_insn): Rename to ...
16641 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
16642 Remove gdbarch parameter. Adapt to clear the object's buffers
16643 instead of allocating new buffers, and to print using the object's
16644 gdb_disassembler instead of calling gdb_print_insn.
16645 (dump_insns): Use gdb_pretty_print_disassembler.
16646 * disasm.h (gdb_pretty_print_insn): Delete declaration.
16647 (gdb_pretty_print_disassembler): New class.
16648 * record-btrace.c (btrace_insn_history): Use
16649 gdb_pretty_print_disassembler.
16650
d7e74731
PA
166512017-02-02 Pedro Alves <palves@redhat.com>
16652
16653 * ada-lang.c (type_as_string): Use string_file.
16654 * ada-valprint.c (ada_print_floating): Use string_file.
16655 * ada-varobj.c (ada_varobj_scalar_image)
16656 (ada_varobj_get_value_image): Use string_file.
16657 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
16658 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
16659 * breakpoint.c (update_inserted_breakpoint_locations)
16660 (insert_breakpoint_locations, reattach_breakpoints)
16661 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
16662 (print_it_watchpoint): Use string_file.
16663 (save_breakpoints): Use stdio_file.
16664 * c-exp.y (oper): Use string_file.
16665 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
16666 tee_file.
16667 (pop_output_files): Use delete.
16668 (handle_redirections): Use stdio_file and tee_file.
16669 * cli/cli-setshow.c (do_show_command): Use string_file.
16670 * compile/compile-c-support.c (c_compute_program): Use
16671 string_file.
16672 * compile/compile-c-symbols.c (generate_vla_size): Take a
16673 'string_file &' instead of a 'ui_file *'.
16674 (generate_c_for_for_one_variable): Take a 'string_file &' instead
16675 of a 'ui_file *'. Use string_file.
16676 (generate_c_for_variable_locations): Take a 'string_file &'
16677 instead of a 'ui_file *'.
16678 * compile/compile-internal.h (generate_c_for_for_one_variable):
16679 Take a 'string_file &' instead of a 'ui_file *'.
16680 * compile/compile-loc2c.c (push, pushf, unary, binary)
16681 (print_label, pushf_register_address, pushf_register)
16682 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
16683 'ui_file *'. Adjust.
16684 * compile/compile.c (compile_to_object): Use string_file.
16685 * compile/compile.h (compile_dwarf_expr_to_c)
16686 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
16687 'ui_file *'.
16688 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
16689 (replace_typedefs_qualified_name): Use string_file and
16690 obstack_copy0.
16691 * disasm.c (gdb_pretty_print_insn): Use string_file.
16692 (gdb_disassembly): Adjust reference the null_stream global.
16693 (do_ui_file_delete): Delete.
16694 (gdb_insn_length): Use null_stream.
16695 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
16696 * dwarf2loc.c (dwarf2_compile_property_to_c)
16697 (locexpr_generate_c_location, loclist_generate_c_location): Take a
16698 'string_file &' instead of a 'ui_file *'.
16699 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
16700 * dwarf2read.c (do_ui_file_peek_last): Delete.
16701 (dwarf2_compute_name): Use string_file.
16702 * event-top.c (gdb_setup_readline): Use stdio_file.
16703 * gdbarch.sh (verify_gdbarch): Use string_file.
16704 * gdbtypes.c (safe_parse_type): Use null_stream.
16705 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
16706 string_file.
16707 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
16708 'string_file *' instead of a 'ui_file *'.
16709 (gdbscm_arch_disassemble): Use string_file.
16710 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
16711 * guile/scm-ports.c (class ioscm_file_port): Now a class that
16712 inherits from ui_file.
16713 (ioscm_file_port_delete, ioscm_file_port_rewind)
16714 (ioscm_file_port_put): Delete.
16715 (ioscm_file_port_write): Rename to ...
16716 (ioscm_file_port::write): ... this. Remove file_port_magic
16717 checks.
16718 (ioscm_file_port_new): Delete.
16719 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
16720 ui_file_up.
16721 * guile/scm-type.c (tyscm_type_name): Use string_file.
16722 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
16723 Use string_file.
16724 * infcmd.c (print_return_value_1): Use string_file.
16725 * infrun.c (print_target_wait_results): Use string_file.
16726 * language.c (add_language): Use string_file.
16727 * location.c (explicit_to_string_internal): Use string_file.
16728 * main.c (captured_main_1): Use null_file.
16729 * maint.c (maintenance_print_architecture): Use stdio_file.
16730 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
16731 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
16732 event_channel>: Change type to mi_console_file pointer.
16733 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
16734 (mi_console_file_delete): Delete.
16735 (struct mi_console_file): Delete.
16736 (mi_console_file_magic): Delete.
16737 (mi_console_file_new): Delete.
16738 (mi_console_file::mi_console_file): New.
16739 (mi_console_file_delete): Delete.
16740 (mi_console_file_fputs): Delete.
16741 (mi_console_file::write): New.
16742 (mi_console_raw_packet): Delete.
16743 (mi_console_file::flush): New.
16744 (mi_console_file_flush): Delete.
16745 (mi_console_set_raw): Rename to ...
16746 (mi_console_file::set_raw): ... this.
16747 * mi/mi-console.h (class mi_console_file): New class.
16748 (mi_console_file_new, mi_console_set_raw): Delete.
16749 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
16750 (mi_set_logging): Use delete and tee_file. Adjust.
16751 * mi/mi-main.c (output_register): Use string_file.
16752 (mi_cmd_data_evaluate_expression): Use string_file.
16753 (mi_cmd_data_read_memory): Use string_file.
16754 (mi_cmd_execute, print_variable_or_computed): Use string_file.
16755 * mi/mi-out.c (mi_ui_out::main_stream): New.
16756 (mi_ui_out::rewind): Use main_stream and
16757 string_file.
16758 (mi_ui_out::put): Use main_stream and string_file.
16759 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16760 Allocate a 'string_file' instead.
16761 (mi_out_new): Don't allocate a mem_fileopen stream here.
16762 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16763 (mi_ui_out::main_stream): Declare method.
16764 * printcmd.c (eval_command): Use string_file.
16765 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
16766 * python/py-arch.c (archpy_disassemble): Use string_file.
16767 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
16768 * python/py-frame.c (frapy_str): Use string_file.
16769 * python/py-framefilter.c (py_print_type, py_print_single_arg):
16770 Use string_file.
16771 * python/py-type.c (typy_str): Use string_file.
16772 * python/py-unwind.c (unwind_infopy_str): Use string_file.
16773 * python/py-value.c (valpy_str): Use string_file.
16774 * record-btrace.c (btrace_insn_history): Use string_file.
16775 * regcache.c (regcache_print): Use stdio_file.
16776 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
16777 * remote.c (escape_buffer): Use string_file.
16778 * rust-lang.c (rust_get_disr_info): Use string_file.
16779 * serial.c (serial_open_ops_1): Use stdio_file.
16780 (do_serial_close): Use delete.
16781 * stack.c (print_frame_arg): Use string_file.
16782 (print_frame_args): Remove local mem_fileopen stream, not used.
16783 (print_frame): Use string_file.
16784 * symmisc.c (maintenance_print_symbols): Use stdio_file.
16785 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
16786 Take a 'string_file *' instead of a 'ui_file *'.
16787 * top.c (new_ui): Use stdio_file and stderr_file.
16788 (free_ui): Use delete.
16789 (execute_command_to_string): Use string_file.
16790 (quit_confirm): Use string_file.
16791 * tracepoint.c (collection_list::append_exp): Use string_file.
16792 * tui/tui-disasm.c (tui_disassemble): Use string_file.
16793 * tui/tui-file.c: Don't include "ui-file.h".
16794 (enum streamtype, struct tui_stream): Delete.
16795 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
16796 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
16797 (tui_file::tui_file): New method.
16798 (tui_file_fputs): Delete.
16799 (tui_file_get_strbuf): Delete.
16800 (tui_file::puts): New method.
16801 (tui_file_adjust_strbuf): Delete.
16802 (tui_file_flush): Delete.
16803 (tui_file::flush): New method.
16804 * tui/tui-file.h: Tweak intro comment.
16805 Include ui-file.h.
16806 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
16807 (tui_file_adjust_strbuf): Delete declarations.
16808 (class tui_file): New class.
16809 * tui/tui-io.c (tui_initialize_io): Use tui_file.
16810 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
16811 (tui_register_format): Use string_stream.
16812 * tui/tui-stack.c (tui_make_status_line): Use string_file.
16813 (tui_get_function_from_frame): Use string_file.
16814 * typeprint.c (type_to_string): Use string_file.
16815 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
16816 (null_stream): New global.
16817 (ui_file_delete): Delete.
16818 (ui_file::ui_file): New.
16819 (null_file_isatty): Delete.
16820 (ui_file::~ui_file): New.
16821 (null_file_rewind): Delete.
16822 (ui_file::printf): New.
16823 (null_file_put): Delete.
16824 (null_file_flush): Delete.
16825 (ui_file::putstr): New.
16826 (null_file_write): Delete.
16827 (ui_file::putstrn): New.
16828 (null_file_read): Delete.
16829 (ui_file::putc): New.
16830 (null_file_fputs): Delete.
16831 (null_file_write_async_safe): Delete.
16832 (ui_file::vprintf): New.
16833 (null_file_delete): Delete.
16834 (null_file::write): New.
16835 (null_file_fseek): Delete.
16836 (null_file::puts): New.
16837 (ui_file_data): Delete.
16838 (null_file::write_async_safe): New.
16839 (gdb_flush, ui_file_isatty): Adjust.
16840 (ui_file_put, ui_file_rewind): Delete.
16841 (ui_file_write): Adjust.
16842 (ui_file_write_for_put): Delete.
16843 (ui_file_write_async_safe, ui_file_read): Adjust.
16844 (ui_file_fseek): Delete.
16845 (fputs_unfiltered): Adjust.
16846 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
16847 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
16848 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
16849 (set_ui_file_data): Delete.
16850 (string_file::~string_file, string_file::write)
16851 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
16852 (do_ui_file_as_string, ui_file_as_string): Delete.
16853 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
16854 (struct mem_file): Delete.
16855 (mem_file_new): Delete.
16856 (stdio_file::stdio_file): New.
16857 (mem_file_delete): Delete.
16858 (stdio_file::stdio_file): New.
16859 (mem_fileopen): Delete.
16860 (stdio_file::~stdio_file): New.
16861 (mem_file_rewind): Delete.
16862 (stdio_file::set_stream): New.
16863 (mem_file_put): Delete.
16864 (stdio_file::open): New.
16865 (mem_file_write): Delete.
16866 (stdio_file_magic, struct stdio_file): Delete.
16867 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
16868 (stdio_file::flush): New.
16869 (stdio_file_read): Rename to ...
16870 (stdio_file::read): ... this. Adjust.
16871 (stdio_file_write): Rename to ...
16872 (stdio_file::write): ... this. Adjust.
16873 (stdio_file_write_async_safe): Rename to ...
16874 (stdio_file::write_async_safe) ... this. Adjust.
16875 (stdio_file_fputs): Rename to ...
16876 (stdio_file::puts) ... this. Adjust.
16877 (stdio_file_isatty): Delete.
16878 (stdio_file_fseek): Delete.
16879 (stdio_file::isatty): New.
16880 (stderr_file_write): Rename to ...
16881 (stderr_file::write) ... this. Adjust.
16882 (stderr_file_fputs): Rename to ...
16883 (stderr_file::puts) ... this. Adjust.
16884 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
16885 (stderr_file::stderr_file): New.
16886 (tee_file_magic): Delete.
16887 (struct tee_file): Delete.
16888 (tee_file::tee_file): New.
16889 (tee_file_new): Delete.
16890 (tee_file::~tee_file): New.
16891 (tee_file_delete): Delete.
16892 (tee_file_flush): Rename to ...
16893 (tee_file::flush): ... this. Adjust.
16894 (tee_file_write): Rename to ...
16895 (tee_file::write): ... this. Adjust.
16896 (tee_file::write_async_safe): New.
16897 (tee_file_fputs): Rename to ...
16898 (tee_file::puts): ... this. Adjust.
16899 (tee_file_isatty): Rename to ...
16900 (tee_file::isatty): ... this. Adjust.
16901 * ui-file.h (struct obstack, struct ui_file): Don't
16902 forward-declare.
16903 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
16904 (ui_file_write_ftype)
16905 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
16906 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
16907 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
16908 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
16909 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
16910 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
16911 (set_ui_file_fseek): Delete.
16912 (ui_file_data, ui_file_delete, ui_file_rewind)
16913 (struct ui_file): New.
16914 (ui_file_up): New.
16915 (class null_file): New.
16916 (null_stream): Declare.
16917 (ui_file_write_for_put, ui_file_put): Delete.
16918 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
16919 Delete.
16920 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
16921 (gdb_fopen, tee_file_new): Delete.
16922 (struct string_file): New.
16923 (struct stdio_file): New.
16924 (stdio_file_up): New.
16925 (struct stderr_file): New.
16926 (class tee_file): New.
16927 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
16928 of a 'ui_file *'. Adjust.
16929 * ui-out.h (class ui_out) <field_stream>: Likewise.
16930 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
16931 (null_stream): Delete.
16932 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
16933 Adjust.
16934 * utils.h (struct ui_file): Delete forward declaration..
16935 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
16936 (error_stream): Take a 'string_file &' instead of a
16937 'ui_file *'.
16938 * varobj.c (varobj_value_get_print_value): Use string_file.
16939 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
16940 * gdbarch.c: Regenerate.
16941
187808b0
PA
169422017-02-02 Pedro Alves <palves@redhat.com>
16943
16944 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
16945 (gdb_pretty_print_insn): ... this. Now a free function. Add back
16946 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
16947 Adjust to call gdb_print_insn instead of
16948 gdb_disassembler::print_insn.
16949 (dump_insns, do_mixed_source_and_assembly_deprecated)
16950 (do_mixed_source_and_assembly, do_assembly_only): Add back a
16951 'gdbarch' parameter. Remove gdb_disassembler parameter.
16952 (gdb_disassembly): Don't allocate a gdb_disassembler here.
16953 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
16954 declaration.
16955 (gdb_pretty_print_insn): Re-add declaration.
16956 * record-btrace.c (btrace_insn_history): Don't allocate a
16957 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
16958
7a8eb317
SM
169592017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
16960
16961 * disasm.h (gdb_disassembly): Remove file_string parameter.
16962 * disasm.c (gdb_disassembly): Likewise.
16963 * cli/cli-cmds.c (print_disassembly): Adapt.
16964 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
16965 * stack.c (do_gdb_disassembly): Likewise.
16966
7346ef59
AA
169672017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
16968
16969 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
16970 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
16971 targets. And if the implicit value is longer than needed, extract
16972 the first bytes instead of the "least significant" ones.
16973
cd4007e4
MM
169742017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16975
16976 * btrace.c (btrace_enable): Do not call btrace_add_pc for
16977 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
16978 (btrace_fetch): Assert can_access_registers_ptid.
16979 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
16980 validate_registers_access.
16981
cf77c34e
MM
169822017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16983
16984 * gdbthread.h (can_access_registers_ptid): New.
16985 * thread.c (can_access_registers_ptid): New.
16986
be85ce7d
PA
169872017-02-01 Pedro Alves <palves@redhat.com>
16988
16989 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
16990
29b0b251
PA
169912017-01-31 Pedro Alves <palves@redhat.com>
16992
16993 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
16994 Fix typos.
16995
289b5b24
PA
169962017-01-31 Pedro Alves <palves@redhat.com>
16997
16998 * stack.c (print_frame_args): Remove local mem_fileopen stream,
16999 not used.
17000
b47413b4
PA
170012017-01-31 Pedro Alves <palves@redhat.com>
17002
17003 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
17004
60adb36c
PA
170052017-01-31 Pedro Alves <palves@redhat.com>
17006
17007 * common/scoped_restore.h
17008 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
17009 change the value's parameter type to T2.
17010 (make_scoped_restore): Likewise.
17011
2735833d
WT
170122017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
17013 Richard Henderson <rth@redhat.com>
17014
17015 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
17016 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
17017 GS_BASE for older kernels.
17018 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
17019 GS_BASE for older kernels.
17020 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
17021 and GS_BASE to the offset table.
17022 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
17023 system register group.
17024 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
17025 for older kernels.
17026 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
17027 amd64 ABI.
17028 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
17029 AMD64_GSBASE_REGNUM.
17030 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
17031 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
17032 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
17033 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
17034 i386/64bit-segments.xml in those rules.
17035 * features/i386/64bit-segments.xml: New file.
17036 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
17037 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
17038 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
17039 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
17040 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
17041 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
17042 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
17043 * features/i386/amd64-avx-linux.c: Regenerated.
17044 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
17045 * features/i386/amd64-avx-mpx.c: Regenerated.
17046 * features/i386/amd64-avx512-linux.c: Regenerated.
17047 * features/i386/amd64-linux.c: Regenerated.
17048 * features/i386/amd64-mpx-linux.c: Regenerated.
17049 * features/i386/i386-avx-mpx-linux.c: Regenerated.
17050 * features/i386/i386-avx-mpx.c: Regenerated.
17051 * features/i386/x32-avx-linux.c: Regenerated.
17052 * features/i386/x32-avx512-linux.c: Regenerated.
17053 * regformats/i386/amd64-avx-linux.dat: Regenerated.
17054 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
17055 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
17056 * regformats/i386/amd64-linux.dat: Regenerated.
17057 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
17058 * regformats/i386/x32-avx-linux.dat: Regenerated.
17059 * regformats/i386/x32-avx512-linux.dat: Regenerated.
17060 * regformats/i386/x32-linux.dat: Regenerated.
17061
8884e97e
WT
170622017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
17063
17064 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
17065 Set to AMD64_NUM_REGS.
17066
7005d26a
WT
170672017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
17068
17069 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
17070 that checks validity of a register number.
17071
4bd2e1b2
KC
170722017-01-27 Kees Cook <keescook@google.com>
17073
17074 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
17075 fetch_fpregs if target has fpa registers.
17076 (arm_linux_store_inferior_registers): Call store_fpregs if target
17077 has fpa registers.
17078
7cf1de6c
AA
170792017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
17080
17081 * cris-tdep.c (cris_gdbarch_init): Remove check for
17082 info.byte_order and force it to BFD_ENDIAN_LITTLE.
17083
874a1c8c
AT
170842017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
17085
17086 * corelow.c (get_core_register_section): Check for regset
17087 existence before checking for REGSET_VARIABLE_SIZE.
17088
d8b49cf0
YQ
170892017-01-26 Yao Qi <yao.qi@linaro.org>
17090 Pedro Alves <palves@redhat.com>
17091
17092 PR gdb/20939
17093 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
17094 call memory_error, save memaddr instead.
17095 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
17096 negative, cal memory_error.
17097 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
17098
658ca58c
YQ
170992017-01-26 Yao Qi <yao.qi@linaro.org>
17100
17101 * disasm-selftests.c (memory_error_test): New function.
17102 (_initialize_disasm_selftests): Register memory_error_test.
17103
79843d45
YQ
171042017-01-26 Yao Qi <yao.qi@linaro.org>
17105
17106 * Makefile.in (SFILES): Add disasm-selftests.c and
17107 selftest-arch.c.
17108 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
17109 * disasm-selftests.c: New file.
17110 * selftest-arch.c: New file.
17111 * selftest-arch.h: New file.
17112
8cafda32
YQ
171132017-01-26 Yao Qi <yao.qi@linaro.org>
17114
17115 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
17116 to bfd_arch_mep. Don't return 0 if section is not
17117 found. Call print_insn_mep.
17118
e47ad6c0
YQ
171192017-01-26 Pedro Alves <palves@redhat.com>
17120 Yao Qi <yao.qi@linaro.org>
17121
17122 * arm-tdep.c: Include "disasm.h".
17123 (gdb_print_insn_arm): Update code to get gdbarch.
17124 * disasm.c (dis_asm_read_memory): Change it to
17125 gdb_disassembler::dis_asm_read_memory.
17126 (dis_asm_memory_error): Likewise.
17127 (dis_asm_print_address): Likewise.
17128 (gdb_pretty_print_insn): Change it to
17129 gdb_disassembler::pretty_print_insn.
17130 (dump_insns): Add one argument gdb_disassemlber. All
17131 callers updated.
17132 (do_mixed_source_and_assembly_deprecated): Likewise.
17133 (do_mixed_source_and_assembly): Likewise.
17134 (do_assembly_only): Likewise.
17135 (gdb_disassembler::gdb_disassembler): New.
17136 (gdb_disassembler::print_insn): New.
17137 * disasm.h (class gdb_disassembler): New.
17138 (gdb_pretty_print_insn): Remove declaration.
17139 (gdb_disassemble_info): Likewise.
17140 * guile/scm-disasm.c (class gdbscm_disassembler): New.
17141 (gdbscm_disasm_read_memory_worker): Update.
17142 (gdbscm_disasm_read_memory): Update.
17143 (gdbscm_disasm_memory_error): Remove.
17144 (gdbscm_disasm_print_address): Remove.
17145 (gdbscm_disassembler::gdbscm_disassembler): New.
17146 (gdbscm_print_insn_from_port): Update.
17147 * mips-tdep.c: Include disasm.h.
17148 (gdb_print_insn_mips): Update code to get gdbarch.
17149 * record-btrace.c (btrace_insn_history): Update.
17150 * spu-tdep.c: Include disasm.h.
17151 (struct spu_dis_asm_data): Remove.
17152 (struct spu_dis_asm_info): New.
17153 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
17154 SPU id.
17155 (gdb_print_insn_spu): Cast disassemble_info to
17156 spu_dis_asm_info.
17157
80d75874
YQ
171582017-01-26 Yao Qi <yao.qi@linaro.org>
17159
17160 * disasm.c (do_ui_file_delete): Delete.
17161 (gdb_insn_length): Move code creating stream to ...
17162 * utils.c (null_stream): ... here. New function.
17163 * utils.h (null_stream): Declare.
17164
60685cd0
SM
171652017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
17166
17167 * python/py-inferior.c (find_thread_object): Return directly
17168 from the loop. Remove "found" variable.
17169
eb1cdb62
JB
171702017-01-21 Joel Brobecker <brobecker@adacore.com>
17171
17172 GDB 7.12.1 released.
17173
b1ce6568
SM
171742017-01-20 Simon Marchi <simon.marchi@ericsson.com>
17175
17176 * python/py-function.c (fnpy_call): Reorder declarations to have
17177 the gdbpy_enter object declared first.
17178 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
17179
6f8b0407
SM
171802017-01-20 Simon Marchi <simon.marchi@ericsson.com>
17181
fec93fb1 17182 PR python/21068
6f8b0407
SM
17183 * python/python-internal.h (PyMem_RawMalloc): Define for
17184 Python < 3.4.
17185 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
17186 PyMem_RawMalloc instead of PyMem_Malloc.
17187
78cbbba8
LM
171882017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
17189 Luis Machado <lgustavo@codesourcery.com>
17190
17191 * NEWS (New commands): Mention flash-erase.
17192 (New MI commands): Mention target-flash-erase.
17193 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
17194 command.
17195 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
17196 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
17197 * target.c (flash_erase_command): New function.
17198 (initialize_targets): Add new flash-erase command.
17199 * target.h (flash_erase_command): New declaration.
17200
2132fe85
JB
172012017-01-20 Joel Brobecker <brobecker@adacore.com>
17202
17203 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
17204 HAVE_SYS_PROCFS_H is defined.
17205
d1dff226
AH
172062017-01-18 Alan Hayward <alan.hayward@arm.com>
17207
17208 * remote.c (struct cached_reg): Change data into a pointer.
17209 * (stop_reply_dtr): Free data pointers before deleting vector.
17210 (process_stop_reply): Likewise.
17211 (remote_parse_stop_reply): Allocate space for data
17212
9890e433
AH
172132017-01-18 Alan Hayward <alan.hayward@arm.com>
17214
17215 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
17216 MAX_REGISTER_SIZE.
17217 (amd64_pseudo_register_read_value): Likewise.
17218 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
17219 (store_register_using_P): Likewise.
17220 * regcache.c (regcache_xfer_part): Likewise.
17221
7a36499a
IR
172222017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
17223
17224 Split real and pseudo registers.
17225 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
17226 (sparc32_pseudo_regnum): New enum.
17227 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
17228 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
17229 (SPARC32_CP0_REGISTERS): New macro.
17230 (sparc32_pseudo_register_name): New function.
17231 (sparc32_register_name): Use sparc32_pseudo_register_name.
17232 (sparc32_pseudo_register_type): New function.
17233 (sparc32_register_type): Use sparc32_pseudo_register_type.
17234 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
17235 pseudo register numbers.
17236 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
17237 (SPARC64_CP0_REGISTERS): New macro.
17238 (sparc64_pseudo_register_name): New function.
17239 (sparc64_register_name): Use sparc64_pseudo_register_name.
17240 (sparc64_pseudo_register_type): New function.
17241 (sparc64_register_type): Use sparc64_pseudo_register_type.
17242 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
17243 pseudo register numbers.
17244 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
17245 sparc64_store_arguments): Handle pseudo register numbers.
17246
6f8976bf
YQ
172472017-01-13 Yao Qi <yao.qi@linaro.org>
17248
17249 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
17250 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
17251 output.
17252 (getpkt_or_notif_sane_1): Likewise.
17253
e4241ace
YQ
172542017-01-13 Yao Qi <yao.qi@linaro.org>
17255
17256 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
17257 of CC. Pass "-x c++-header" instead of "-x c".
17258
3015c064
SM
172592017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17260
17261 * remote.c (remote_can_async_p): Update comment.
17262
fde1b17d
SM
172632017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17264
17265 * linux-nat.c (linux_nat_can_async_p): Update comment.
17266
ca1ca08b
SM
172672017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17268
17269 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
17270
4ad2da73
SM
172712017-01-11 Simon Marchi <simon.marchi@ericsson.com>
17272
17273 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
17274
c8b23b3f
TT
172752017-01-10 Tom Tromey <tom@tromey.com>
17276
17277 * python/py-type.c (typy_legacy_template_argument): Update.
17278 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
17279 ~demangle_parse_info): Declare new members.
17280 (cp_demangled_name_to_comp): Return unique_ptr.
17281 (cp_demangled_name_parse_free)
17282 (make_cleanup_cp_demangled_name_parse_free)
17283 (cp_new_demangle_parse_info): Remove.
17284 * cp-support.c (do_demangled_name_parse_free_cleanup)
17285 (make_cleanup_cp_demangled_name_parse_free): Remove.
17286 (inspect_type, cp_canonicalize_string_full)
17287 (cp_canonicalize_string): Update.
17288 (mangled_name_to_comp): Change return type.
17289 (cp_class_name_from_physname, method_name_from_physname)
17290 (cp_func_name, cp_remove_params): Update.
17291 * cp-name-parser.y (demangle_parse_info): New constructor, from
17292 cp_new_demangle_parse_info.
17293 (~demangle_parse_info): New destructor, from
17294 cp_demangled_name_parse_free.
17295 (cp_merge_demangle_parse_infos): Update.
17296 (cp_demangled_name_to_comp): Change return type.
17297
1ac32117
TT
172982017-01-10 Tom Tromey <tom@tromey.com>
17299
17300 * top.c (prevent_dont_repeat): Change return type.
17301 * python/python.c (execute_gdb_command): Use std::string.
17302 Update.
17303 * guile/guile.c (gdbscm_execute_gdb_command): Update.
17304 * command.h (prevent_dont_repeat): Change return type.
17305 * breakpoint.c (bpstat_do_actions_1): Update.
17306
0cf08227
TT
173072017-01-10 Tom Tromey <tom@tromey.com>
17308
17309 * value.h (scoped_value_mark::~scoped_value_mark): Call
17310 free_to_mark.
17311 (scoped_value_mark::free_to_mark): New method.
17312 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
17313 scoped_value_mark.
17314
eb115069
TT
173152017-01-10 Tom Tromey <tom@tromey.com>
17316
17317 * python/py-value.c (valpy_dereference, valpy_referenced_value)
17318 (valpy_reference_value, valpy_const_value, valpy_get_address)
17319 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
17320 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
17321 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
17322 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
17323 scoped_value_mark.
17324 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
17325 * value.h (scoped_value_mark): New class.
17326
906768f9
TT
173272017-01-10 Tom Tromey <tom@tromey.com>
17328
17329 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
17330 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
17331 * psymtab.c (discard_psymtabs_upto): Remove.
17332 (make_cleanup_discard_psymtabs): Remove.
17333 (struct psymtab_state): Remove.
17334
bef155c3
TT
173352017-01-10 Tom Tromey <tom@tromey.com>
17336
17337 * record-full.c (record_full_save_cleanups): Remove.
17338 (record_full_save): Use gdb::unlinker.
17339 * gcore.c (do_bfd_delete_cleanup): Remove.
17340 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
17341 cleanups.
17342 * dwarf2read.c (unlink_if_set): Remove.
17343 (write_psymtabs_to_index): Use gdb::unlinker.
17344 * common/gdb_unlinker.h: New file.
17345
192b62ce
TT
173462017-01-10 Tom Tromey <tom@tromey.com>
17347
17348 * windows-tdep.c (windows_xfer_shared_library): Update.
17349 * windows-nat.c (windows_make_so): Update.
17350 * utils.h (make_cleanup_bfd_unref): Remove.
17351 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
17352 * symfile.h (symfile_bfd_open)
17353 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
17354 * symfile.c (read_symbols, symbol_file_add)
17355 (separate_debug_file_exists): Update.
17356 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
17357 (generic_load, reread_symbols): Update.
17358 * symfile-mem.c (symbol_file_add_from_memory): Update.
17359 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
17360 (spu_symbol_file_add_from_memory): Update.
17361 * solist.h (struct target_so_ops) <bfd_open>: Return
17362 gdb_bfd_ref_ptr.
17363 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
17364 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
17365 gdb_bfd_ref_ptr.
17366 (solib_map_sections, reload_shared_libraries_1): Update.
17367 * solib-svr4.c (enable_break): Update.
17368 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
17369 * solib-frv.c (enable_break2): Update.
17370 * solib-dsbt.c (enable_break): Update.
17371 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
17372 gdb_bfd_ref_ptr.
17373 (darwin_solib_get_all_image_info_addr_at_init): Update.
17374 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
17375 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
17376 * record-full.c (record_full_save): Update.
17377 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
17378 * procfs.c (insert_dbx_link_bpt_in_file): Update.
17379 * minidebug.c (find_separate_debug_file_in_section): Return
17380 gdb_bfd_ref_ptr.
17381 * machoread.c (macho_add_oso_symfile): Change abfd to
17382 gdb_bfd_ref_ptr.
17383 (macho_symfile_read_all_oso): Update.
17384 (macho_check_dsym): Return gdb_bfd_ref_ptr.
17385 (macho_symfile_read): Update.
17386 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
17387 (jit_bfd_try_read_symtab): Update.
17388 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17389 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17390 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17391 gdb_bfd_ref_ptr.
17392 (gdb_bfd_ref_policy): New struct.
17393 (gdb_bfd_ref_ptr): New typedef.
17394 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17395 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17396 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17397 gdb_bfd_ref_ptr.
17398 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17399 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17400 (gcore_command): Update.
17401 * exec.c (exec_file_attach): Update.
17402 * elfread.c (elf_symfile_read): Update.
17403 * dwarf2read.c (dwarf2_get_dwz_file): Update.
17404 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
17405 (open_and_init_dwo_file): Update.
17406 (open_dwp_file): Return gdb_bfd_ref_ptr.
17407 (open_and_init_dwp_file): Update.
17408 * corelow.c (core_open): Update.
17409 * compile/compile-object-load.c (compile_object_load): Update.
17410 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
17411 * coffread.c (coff_symfile_read): Update.
17412 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
17413 gdb_bfd_ref_ptr. Rename.
17414 (dump_bfd_file, restore_command): Update.
17415 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17416 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17417 (find_separate_debug_file_by_buildid): Update.
17418
50315b21
TT
174192017-01-10 Tom Tromey <tom@tromey.com>
17420
17421 * common/gdb_ref_ptr.h: New file.
17422 * python/py-ref.h (struct gdbpy_ref_policy): New.
17423 (gdbpy_ref): Now a typedef.
17424
fc4007c9
TT
174252017-01-10 Tom Tromey <tom@tromey.com>
17426
17427 * utils.h (make_cleanup_htab_delete): Don't declare.
17428 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
17429 Remove.
17430 * linespec.c (decode_compound_collector): Add constructor,
17431 destructor.
17432 (lookup_prefix_sym): Remove cleanup.
17433 (symtab_collector): Add constructor, destructor.
17434 (collect_symtabs_from_filename): Remove cleanup.
17435 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
17436 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
17437 Use htab_up.
17438 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
17439 * dwarf2read.c (dw2_expand_symtabs_matching)
17440 (dw2_map_symbol_filenames, dwarf_decode_macros)
17441 (write_psymtabs_to_index): Use htab_up.
17442 * dwarf2loc.c (func_verify_no_selftailcall)
17443 (call_site_find_chain_1, func_verify_no_selftailcall)
17444 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
17445 std::vector, gdb::unique_xmalloc_ptr.
17446 (call_sitep): Remove typedef.
17447 (dwarf2_locexpr_baton_eval): Remove unused variable.
17448
8dbcee67
TT
174492017-01-10 Tom Tromey <tom@tromey.com>
17450
17451 * python/python-internal.h (make_cleanup_py_decref)
17452 (make_cleanup_py_xdecref): Don't declare.
17453 * python/py-utils.c (py_decref, make_cleanup_py_decref)
17454 (py_xdecref, make_cleanup_py_xdecref): Remove.
17455
13df46cc
TT
174562017-01-10 Tom Tromey <tom@tromey.com>
17457
17458 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
17459 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
17460
06fc9bf7
TT
174612017-01-10 Tom Tromey <tom@tromey.com>
17462
17463 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
17464
830a4934
TT
174652017-01-10 Tom Tromey <tom@tromey.com>
17466
17467 * python/py-utils.c (unicode_to_encoded_string)
17468 (python_string_to_target_string)
17469 (python_string_to_target_python_string)
17470 (python_string_to_host_string, gdbpy_obj_to_string)
17471 (get_addr_from_python): Use gdbpy_ref.
17472
4586d543
TT
174732017-01-10 Tom Tromey <tom@tromey.com>
17474
17475 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
17476 gdbpy_ref.
17477
59876f8f
TT
174782017-01-10 Tom Tromey <tom@tromey.com>
17479
17480 * python/python.c (eval_python_command, gdbpy_decode_line)
17481 (gdbpy_run_events, gdbpy_start_type_printers)
17482 (gdbpy_apply_type_printers): Use gdbpy_ref.
17483
97d83487
TT
174842017-01-10 Tom Tromey <tom@tromey.com>
17485
17486 * python/py-param.c (get_doc_string, compute_enum_values): Use
17487 gdbpy_ref.
17488
9205649a
TT
174892017-01-10 Tom Tromey <tom@tromey.com>
17490
17491 * python/py-inferior.c (find_thread_object, build_inferior_list):
17492 Use gdbpy_ref.
17493
74c49d45
TT
174942017-01-10 Tom Tromey <tom@tromey.com>
17495
17496 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17497
16361ffb
TT
174982017-01-10 Tom Tromey <tom@tromey.com>
17499
17500 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
17501 gdbpy_ref.
17502
905f2cca
TT
175032017-01-10 Tom Tromey <tom@tromey.com>
17504
17505 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
17506 extra incref.
17507 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
17508 Use gdbpy_ref.
17509
64081434
TT
175102017-01-10 Tom Tromey <tom@tromey.com>
17511
17512 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17513 gdbpy_ref.
17514
59e9e831
TT
175152017-01-10 Tom Tromey <tom@tromey.com>
17516
17517 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
17518 decref results of PyArg_ParseTupleAndKeywords.
17519
9de10f6d
TT
175202017-01-10 Tom Tromey <tom@tromey.com>
17521
17522 * python/python.c (python_run_simple_file): Use
17523 unique_xmalloc_ptr, gdbpy_ref.
17524
2bd5759d
TT
175252017-01-10 Tom Tromey <tom@tromey.com>
17526
17527 * python/py-prettyprint.c (print_stack_unless_memory_error)
17528 (print_string_repr, print_children): Use gdbpy_ref.
17529 (dummy_python_frame): New class.
17530 (dummy_python_frame::dummy_python_frame): Rename from
17531 push_dummy_python_frame.
17532 (py_restore_tstate): Remove.
17533
3b4e0e01
TT
175342017-01-10 Tom Tromey <tom@tromey.com>
17535
17536 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17537
17a22718
TT
175382017-01-10 Tom Tromey <tom@tromey.com>
17539
17540 * python/python.c (ensure_python_env, restore_python_env):
17541 Remove.
17542 * python/python-internal.h (ensure_python_env): Don't declare.
17543 * varobj.h (varobj_ensure_python_env): Don't declare.
17544 * varobj.c (varobj_ensure_python_env): Remove.
17545
68cdc557
TT
175462017-01-10 Tom Tromey <tom@tromey.com>
17547
17548 * varobj.c (varobj_value_get_print_value): Use
17549 gdbpy_enter_varobj.
17550
1eba6383
TT
175512017-01-10 Tom Tromey <tom@tromey.com>
17552
17553 * python/py-prettyprint.c (print_string_repr, print_children):
17554 Update.
17555 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
17556 of "encoding".
17557 * varobj.c (varobj_value_get_print_value): Update.
17558 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
17559
bde7b3e3
TT
175602017-01-10 Tom Tromey <tom@tromey.com>
17561
17562 * varobj.c (varobj_get_display_hint)
17563 (dynamic_varobj_has_child_method, install_new_value_visualizer)
17564 (varobj_set_visualizer, free_variable): Use
17565 gdbpy_enter_varobj.
17566
a7785f8c
TT
175672017-01-10 Tom Tromey <tom@tromey.com>
17568
17569 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
17570 (do_finish_initialization): New function. Use gdbpy_ref.
17571 (gdbpy_finish_initialization): Use gdbpy_enter. Call
17572 do_finish_initialization.
17573
2865bfce
TT
175742017-01-10 Tom Tromey <tom@tromey.com>
17575
17576 * python/py-param.c (get_set_value, get_show_value): Use
17577 gdbpy_enter, gdbpy_ref.
17578
0e9dcc75
TT
175792017-01-10 Tom Tromey <tom@tromey.com>
17580
17581 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
17582
12a5cedd
TT
175832017-01-10 Tom Tromey <tom@tromey.com>
17584
17585 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
17586
788f2586
TT
175872017-01-10 Tom Tromey <tom@tromey.com>
17588
17589 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
17590 Use gdbpy_enter_varobj.
17591
6cd67bea
TT
175922017-01-10 Tom Tromey <tom@tromey.com>
17593
17594 * varobj.c (gdbpy_enter_varobj): New constructor.
17595 * python/python-internal.h (gdbpy_enter_varobj): New class.
17596 * python/py-varobj.c (py_varobj_get_iterator): Use
17597 gdbpy_enter_varobj.
17598
14b122bf
TT
175992017-01-10 Tom Tromey <tom@tromey.com>
17600
17601 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
17602 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17603 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
17604 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
17605 unique_xmalloc_ptr.
17606 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
17607
bf1ca3b9
TT
176082017-01-10 Tom Tromey <tom@tromey.com>
17609
17610 * python/py-xmethods.c (invoke_match_method): Use
17611 gdbpy_ref.
17612
572a5524
TT
176132017-01-10 Tom Tromey <tom@tromey.com>
17614
17615 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
17616 gdbpy_enter, gdbpy_ref.
17617
396a78b6
TT
176182017-01-10 Tom Tromey <tom@tromey.com>
17619
17620 * python/python.c (python_interactive_command): Use gdbpy_enter.
17621
a88b13c7
TT
176222017-01-10 Tom Tromey <tom@tromey.com>
17623
17624 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
17625 gdbpy_ref.
17626
e9f0c363
TT
176272017-01-10 Tom Tromey <tom@tromey.com>
17628
17629 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
17630 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17631
6349f452
TT
176322017-01-10 Tom Tromey <tom@tromey.com>
17633
17634 * utils.h (htab_deleter): New struct.
17635 (htab_up): New typedef.
17636 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
17637 gdbpy_enter, gdbpy_ref, htab_up.
17638
c0171de6
TT
176392017-01-10 Tom Tromey <tom@tromey.com>
17640
17641 * python/py-unwind.c (pending_frame_invalidate): Remove.
17642 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
17643
f18e226f
TT
176442017-01-10 Tom Tromey <tom@tromey.com>
17645
17646 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
17647 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
17648
c57af3f1
TT
176492017-01-10 Tom Tromey <tom@tromey.com>
17650
17651 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
17652
60e600ec
TT
176532017-01-10 Tom Tromey <tom@tromey.com>
17654
17655 * python/python.c (gdbpy_eval_from_control_command)
17656 (gdbpy_source_script, gdbpy_run_events)
17657 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
17658 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
17659 gdbpy_enter.
17660
bf7da5b0
TT
176612017-01-10 Tom Tromey <tom@tromey.com>
17662
17663 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
17664
2d38bced
TT
176652017-01-10 Tom Tromey <tom@tromey.com>
17666
17667 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
17668
07bc7329
TT
176692017-01-10 Tom Tromey <tom@tromey.com>
17670
17671 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
17672 (python_on_inferior_call_pre, python_on_inferior_call_post)
17673 (python_on_memory_change, python_on_register_change)
17674 (python_inferior_exit, python_new_objfile, add_thread_object)
17675 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
17676
6e7c365e
TT
176772017-01-10 Tom Tromey <tom@tromey.com>
17678
17679 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
17680 (bpfinishpy_handle_exit): Use gdbpy_enter.
17681
6ba0cd40
TT
176822017-01-10 Tom Tromey <tom@tromey.com>
17683
17684 * python/py-cmd.c (cmdpy_destroyer)
17685 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
17686 gdbpy_enter.
17687
de2dc875
TT
176882017-01-10 Tom Tromey <tom@tromey.com>
17689
17690 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17691 gdbpy_enter.
17692 (gdbpy_breakpoint_has_cond): Likewise.
17693
4ecee2c4
TT
176942017-01-10 Tom Tromey <tom@tromey.com>
17695
17696 * python/python.c (gdbpy_enter): New constructor.
17697 (~gdbpy_enter): New destructor.
17698 (restore_python_env, ensure_python_env): Rewrite.
17699 * python/python-internal.h (gdbpy_enter): New class.
17700
37fce74f
TT
177012017-01-10 Tom Tromey <tom@tromey.com>
17702
17703 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
17704
53a0cca3
TT
177052017-01-10 Tom Tromey <tom@tromey.com>
17706
17707 * python/py-value.c (value_has_field, get_field_flag)
17708 (get_field_type, valpy_getitem, convert_value_from_python): Use
17709 gdbpy_ref.
17710
ff3724f5
TT
177112017-01-10 Tom Tromey <tom@tromey.com>
17712
17713 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
17714 gdbpy_ref.
17715
0700aea5
TT
177162017-01-10 Tom Tromey <tom@tromey.com>
17717
17718 * python/py-prettyprint.c (search_pp_list)
17719 (find_pretty_printer_from_objfiles)
17720 (find_pretty_printer_from_progspace)
17721 (find_pretty_printer_from_gdb, find_pretty_printer)
17722 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
17723 gdbpy_ref.
17724
1bb44c9f
TT
177252017-01-10 Tom Tromey <tom@tromey.com>
17726
17727 * python/py-param.c (call_doc_function): Use gdbpy_ref.
17728
87ce03fd
TT
177292017-01-10 Tom Tromey <tom@tromey.com>
17730
17731 * python/py-linetable.c (build_line_table_tuple_from_pcs)
17732 (ltpy_get_all_source_lines): Use gdbpy_ref.
17733
ee0a3fb8
TT
177342017-01-10 Tom Tromey <tom@tromey.com>
17735
17736 * python/py-framefilter.c (extract_sym, extract_value)
17737 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
17738 gdbpy_ref.
17739
bf2a52fa
TT
177402017-01-10 Tom Tromey <tom@tromey.com>
17741
17742 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
17743
f59fe7f8
TT
177442017-01-10 Tom Tromey <tom@tromey.com>
17745
17746 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
17747
80bd970a
TT
177482017-01-10 Tom Tromey <tom@tromey.com>
17749
17750 * python/py-function.c (convert_values_to_python, fnpy_init): Use
17751 gdbpy_ref.
17752
d1b3de2e
TT
177532017-01-10 Tom Tromey <tom@tromey.com>
17754
17755 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
17756
3bb43384
TT
177572017-01-10 Tom Tromey <tom@tromey.com>
17758
17759 * python/py-type.c (convert_field, make_fielditem, typy_fields)
17760 (typy_range): Use gdbpy_ref.
17761
abf5651e
TT
177622017-01-10 Tom Tromey <tom@tromey.com>
17763
17764 * python/py-threadevent.c (create_thread_event_object): Use
17765 gdbpy_ref.
17766 * python/py-stopevent.c (create_stop_event_object): Simplify.
17767 (emit_stop_event): Use gdbpy_ref.
17768 * python/py-signalevent.c (create_signal_event_object): Use
17769 gdbpy_ref.
17770 * python/py-newobjfileevent.c (create_new_objfile_event_object)
17771 (emit_new_objfile_event, create_clear_objfiles_event_object)
17772 (emit_clear_objfiles_event): Use gdbpy_ref.
17773 * python/py-infevents.c (create_inferior_call_event_object)
17774 (create_register_changed_event_object)
17775 (create_memory_changed_event_object, emit_inferior_call_event)
17776 (emit_memory_changed_event, emit_register_changed_event): Use
17777 gdbpy_ref.
17778 * python/py-exitedevent.c (create_exited_event_object)
17779 (emit_exited_event): Use gdbpy_ref.
17780 * python/py-event.h (evpy_emit_event): Remove
17781 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
17782 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
17783 * python/py-continueevent.c (emit_continue_event): Use
17784 gdbpy_ref.
17785 * python/py-breakpoint.c (gdbpy_breakpoint_created)
17786 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
17787 gdbpy_ref.
17788 * python/py-bpevent.c (create_breakpoint_event_object): Use
17789 gdbpy_ref.
17790
a68ff33e
TT
177912017-01-10 Tom Tromey <tom@tromey.com>
17792
17793 * python/py-ref.h: New file.
17794
7becfd03
SM
177952017-01-10 Simon Marchi <simon.marchi@ericsson.com>
17796
17797 * cli-out.c (cli_ui_out::do_redirect): Change return type to
17798 void.
17799 * cli-out.h (cli_ui_out::do_redirect): Likewise.
17800 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
17801 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
17802 * ui-out.c (ui_out::redirect): Likewise.
17803 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
17804 * cli/cli-logging.c (set_logging_redirect): Update call site of
17805 ui_out::redirect.
17806 (handle_redirections): Likewise.
17807 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
17808 * top.c (execute_command_to_string): Likewise.
17809 * utils.c (do_ui_out_redirect_pop): Likewise.
17810
df294654
SM
178112017-01-10 Simon Marchi <simon.marchi@ericsson.com>
17812
17813 * stack.c (_initialize_stack): Update "frame" command help message.
17814
f5e6296e
IB
178152017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
17816
17817 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
17818
0e2d6fa6
YQ
178192017-01-06 Yao Qi <yao.qi@linaro.org>
17820
17821 * x86-linux-nat.h: Include gdb_proc_service.h.
17822
44d6d3f9
YQ
178232017-01-06 Yao Qi <yao.qi@linaro.org>
17824
17825 * ser-base.h: Include serial.h.
17826
656731fe
YQ
178272017-01-06 Yao Qi <yao.qi@linaro.org>
17828
17829 * ppc-linux-tdep.h: Include ppc-tdep.h.
17830
1ca8f924
YQ
178312017-01-06 Yao Qi <yao.qi@linaro.org>
17832
17833 * nat/amd64-linux-siginfo.h: Include signal.h.
17834
bc3008c4
YQ
178352017-01-06 Yao Qi <yao.qi@linaro.org>
17836
17837 * nat/aarch64-linux-hw-point.h: Include break-common.h.
17838
66c80d03
YQ
178392017-01-06 Yao Qi <yao.qi@linaro.org>
17840
17841 * mi/mi-parse.h: Include mi-cmds.h.
17842
051d2dda
YQ
178432017-01-06 Yao Qi <yao.qi@linaro.org>
17844
17845 * inf-loop.c: Don't include "target.h".
17846 * inf-loop.h: Include it here.
17847
8018d34f
YQ
178482017-01-06 Yao Qi <yao.qi@linaro.org>
17849
17850 * dfp.h: Include "dboulest.h" and "expression.h".
17851
c0b8369c
YQ
178522017-01-06 Yao Qi <yao.qi@linaro.org>
17853
17854 * ax-gdb.h: Include "ax.h".
17855
ad5cba2a
YQ
178562017-01-06 Yao Qi <yao.qi@linaro.org>
17857
17858 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
17859 with nat/gdb_ptrace.h.
17860
1c33cd7f
YQ
178612017-01-05 Yao Qi <yao.qi@linaro.org>
17862
17863 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
17864 new line.
17865 (mips64_fbsd_sigframe_init): Likewise.
17866
c988ac1d
JB
178672017-01-04 John Baldwin <jhb@FreeBSD.org>
17868
17869 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
17870 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
17871
b268007c
JB
178722017-01-04 John Baldwin <jhb@FreeBSD.org>
17873
17874 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
17875 * NEWS: Mention new FreeBSD/mips native configuration.
17876 * config/mips/fbsd.mh: New file.
17877 * configure.host: Add mips*-*-freebsd*.
17878 * mips-fbsd-nat.c: New file.
17879
387360da
JB
178802017-01-04 John Baldwin <jhb@FreeBSD.org>
17881
17882 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
17883 (ALLDEPFILES): Add mips-fbsd-tdep.c.
17884 * NEWS: Mention new FreeBSD/mips target.
17885 * configure.tgt: Add mips*-*-freebsd*.
17886 * mips-fbsd-tdep.c: New file.
17887 * mips-fbsd-tdep.h: New file.
17888
2aaaf250
YQ
178892017-01-04 Yao Qi <yao.qi@linaro.org>
17890
17891 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
17892 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
17893
61baf725
JB
178942017-01-01 Joel Brobecker <brobecker@adacore.com>
17895
6dbb839a 17896 Update copyright year range in all GDB files.
61baf725 17897
c113e7ff 178982017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 17899
c113e7ff 17900 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 17901
c113e7ff 17902For older changes see ChangeLog-2016.
c906108c
SS
17903\f
17904Local Variables:
17905mode: change-log
17906left-margin: 8
17907fill-column: 74
17908version-control: never
57da7796 17909coding: utf-8
c906108c 17910End: