Change dwarf2_initialize_objfile's return value
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
2
3 * defs.h (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index): Move here
4 declarations from elfread.c.
5 (dwarf2_initialize_objfile): Change return value.
6 * elfread.c (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index): Move these
7 declarations to defs.h.
8 (elf_symfile_read): Adjust dwarf2_initialize_objfile caller.
9 * symfile.h (dwarf2_initialize_objfile): Change return type.
10
11 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12 Pedro Alves <palves@redhat.com>
13
14 * contrib/gdb-add-index.sh (index): Rename to ...
15 (index4): ... here.
16 (index5, debugstr, debugstrmerge, debugstrerr): New variables.
17 Support also .debug_names and .debug_str.
18 * dwarf2read.c: Include cmath, set, list.
19 (INDEX_SUFFIX): Rename to ...
20 (INDEX4_SUFFIX): ... here.
21 (INDEX5_SUFFIX, DEBUG_STR_SUFFIX): New.
22 (file_write(FILE *, const void *, size_t)): New.
23 (file_write(FILE *, const std::vector<Elem, Alloc> &)): New.
24 (data_buf::append_unsigned_leb128, data_buf::empty): New.
25 (data_buf::file_write): Use ::file_write.
26 (data_buf::c_str, dwarf5_djb_hash, debug_names)
27 (check_dwarf64_offsets): New.
28 (psyms_seen_size, write_gdbindex): New from
29 write_psymtabs_to_index code.
30 (dwarf5_gdb_augmentation, write_debug_names, assert_file_size)
31 (enum dw_index_kind): New.
32 (write_psymtabs_to_index): New parameter index_kind. Support
33 filename_str and out_file_str. Move code to write_gdbindex,
34 possibly call write_debug_names.
35 (save_gdb_index_command): New parameter -dwarf-5.
36 (_initialize_dwarf2_read): Document the new parameter -dwarf-5.
37
38 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
39 Pedro Alves <palves@redhat.com>
40
41 * contrib/cc-with-tweaks.sh: Change interpreter to bash, incl. initial
42 comment.
43 (GDB_ADD_INDEX): New variable.
44 <$want_index>: Call $GDB_ADD_INDEX.
45
46 2017-12-08 Sergio Durigan Junior <sergiodj@redhat.com>
47
48 * dtrace-probe.c (dtrace_process_dof_probe): Do not declare a new
49 "expression_up" inside the TRY block.
50
51 2017-12-08 Yao Qi <yao.qi@linaro.org>
52
53 * breakpoint.c (update_watchpoint): Call
54 address_significant.
55
56 2017-12-08 Yao Qi <yao.qi@linaro.org>
57
58 * breakpoint.c (adjust_breakpoint_address): Call
59 address_significant.
60
61 2017-12-08 Yao Qi <yao.qi@linaro.org>
62
63 * aarch64-tdep.c (aarch64_gdbarch_init): Install gdbarch
64 significant_addr_bit.
65 * gdbarch.sh (significant_addr_bit): New.
66 * gdbarch.c, gdbarch.h: Re-generated.
67 * target.c (memory_xfer_partial): Call address_significant.
68 * utils.c (address_significant): New function.
69 * utils.h (address_significant): Declare.
70
71 2017-12-08 Tom Tromey <tom@tromey.com>
72
73 * printcmd.c (ui_printf): Update. Use std::vector.
74 * common/format.h (struct format_piece): Add constructor.
75 <string>: Now const.
76 (class format_pieces): New class.
77 (parse_format_string, free_format_pieces)
78 (free_format_pieces_cleanup): Remove.
79 * common/format.c (format_pieces::format_pieces): Rename from
80 parse_format_string. Update.
81 (free_format_pieces, free_format_pieces_cleanup): Remove.
82 * breakpoint.c (parse_cmd_to_aexpr): Update. Use std::vector.
83 * ax-gdb.h (gen_printf): Remove argument.
84 * ax-gdb.c (gen_printf): Remove "frags" argument.
85 (maint_agent_printf_command): Update. Use std::vector.
86
87 2017-12-08 Yao Qi <yao.qi@linaro.org>
88
89 PR breakpionts/22567
90 * linespec.c (minsym_found): Set sal.section.
91
92 2017-12-08 Andreas Arnez <arnez@linux.vnet.ibm.com>
93
94 * configure.tgt (s390*-*-linux*): Add symfile-mem.o.
95
96 2017-12-07 Keith Seitz <keiths@redhat.com>
97
98 PR breakpoints/22569
99 * location.c (string_to_explicit_location): When terminating
100 parsing early, break out of enclosing loop instead of returning.
101
102 2017-12-07 Keith Seitz <keiths@redhat.com>
103
104 * NEWS (New commands): Mention set/show print type nested-type-limit.
105 * c-typeprint.c (c_type_print_base): Print out nested types.
106 * dwarf2read.c (struct typedef_field_list): Rename to ...
107 (struct decl_field_list): ... this. Change all uses.
108 (struct field_info) <nested_types_list, nested_types_list_count>:
109 New fields.
110 (add_partial_symbol): Look for nested type definitions in C++, too.
111 (dwarf2_add_typedef): Rename to ...
112 (dwarf2_add_type_defn): ... this.
113 (type_can_define_types): New function.
114 Update assertion to use type_can_define_types.
115 Permit NULL for a field's name.
116 (process_structure_scope): Handle child DIEs of types that can
117 define types.
118 Copy the list of nested types into the type struct.
119 * gdbtypes.h (struct typedef_field): Rename to ...
120 (struct decl_field): ... this. Change all uses.
121 [is_protected, is_private]: New fields.
122 (struct cplus_struct_type) <nested_types, nested_types_count>: New
123 fields.
124 (TYPE_NESTED_TYPES_ARRAY, TYPE_NESTED_TYPES_FIELD)
125 (TYPE_NESTED_TYPES_FIELD_NAME, TYPE_NESTED_TYPES_FIELD_TYPE)
126 (TYPE_NESTED_TYPES_COUNT, TYPE_NESTED_TYPES_FIELD_PROTECTED)
127 (TYPE_NESTED_TYPES_FIELD_PRIVATE): New macros.
128 * typeprint.c (type_print_raw_options, default_ptype_flags): Add
129 default value for print_nested_type_limit.
130 (print_nested_type_limit): New static variable.
131 (set_print_type_nested_types, show_print_type_nested_types): New
132 functions.
133 (_initialize_typeprint): Register new commands for set/show
134 `print-nested-type-limit'.
135 * typeprint.h (struct type_print_options) [print_nested_type_limit]:
136 New field.
137
138 2017-12-07 Tom Tromey <tom@tromey.com>
139
140 PR breakpoints/22511:
141 * breakpoint.c (commands_command_1): Don't throw an exception when
142 no commands have been read.
143
144 2017-12-07 Adam Stylinski <adam.stylinski@etegent.com>
145
146 PR c++/21222
147 * target-descriptions.c (print_c_tdesc::visit_pre): Change type of
148 range-for variable.
149
150 2017-12-07 Simon Marchi <simon.marchi@ericsson.com>
151
152 * common/selftest.h (struct selftest): Add virtual destructor.
153
154 2017-12-07 Phil Muldoon <pmuldoon@redhat.com>
155
156 * python/py-breakpoint.c (bppy_init): Use string_to_event_location
157 over basic location code. Implement explicit location keywords.
158 (bppy_init_validate_args): New function.
159 * NEWS: Document Python explicit breakpoint locations.
160
161 2017-12-07 Joel Brobecker <brobecker@adacore.com>
162
163 * MAINTAINERS: Restore target entries for m68hc11-elf,
164 score-elf and xstormy16-elf, incorrectly removed in a previous
165 patch meant to only update the list of active maintainers.
166
167 2017-12-06 Pedro Alves <palves@redhat.com>
168
169 * break-catch-syscall.c (insert_catch_syscall)
170 (remove_catch_syscall): Adjust to pass reference to
171 inf_data->syscalls_counts directly via gdb::array_view.
172 * fbsd-nat.c (fbsd_set_syscall_catchpoint): Adjust to use bool
173 and gdb::array_view.
174 * linux-nat.c (linux_child_set_syscall_catchpoint): Likewise.
175 * remote.c (remote_set_syscall_catchpoint): Likewise.
176 * target-debug.h (target_debug_print_bool): New.
177 (define target_debug_print_gdb_array_view_const_int): New.
178 * target-delegates.c: Regenerate.
179 * target.h (target_ops) <to_set_syscall_catchpoint>: Use
180 gdb::array_view and bool.
181 (target_set_syscall_catchpoint): Likewise.
182
183 2017-12-06 Simon Marchi <simon.marchi@ericsson.com>
184
185 * break-catch-syscall.c (catch_syscall_completer): Get pointers
186 to syscall group strings after building the string vector.
187
188 2017-12-06 Pedro Alves <palves@redhat.com>
189
190 * remote.c (remote_query_supported): Don't send "xmlRegisters=" if
191 "qXfer:features:read"" is disabled.
192 (remote_write_qxfer, remote_read_qxfer, remote_search_memory):
193 Check packet_config_support instead of packet->support directly.
194
195 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
196
197 * target-descriptions.c (struct tdesc_feature) <registers>: Use
198 tdesc_reg_up typedef.
199 (struct target_desc) <features>: Use tdesc_feature_up typedef.
200
201 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
202
203 * target-descriptions.c (struct tdesc_type): Use default
204 destructor.
205 <u>: Remove.
206 <accept>: Remove.
207 (struct tdesc_type_builtin): New.
208 (struct tdesc_type_vector): New.
209 (struct tdesc_type_with_fields): New.
210 (tdesc_predefined_types): Change type to tdesc_type_builtin[].
211 (tdesc_gdb_type): Remove.
212 (tdesc_register_type): Adjust.
213 (tdesc_create_vector): Create tdesc_type_vector.
214 (tdesc_create_struct): Create tdesc_type_with_fields.
215 (tdesc_set_struct_size): Change parameter type.
216 (tdesc_create_union): Create tdesc_type_with_fields.
217 (tdesc_create_flags): Likewise.
218 (tdesc_create_enum): Likewise.
219 (tdesc_add_field): Change parameter type.
220 (tdesc_add_typed_bitfield): Likewise.
221 (tdesc_add_bitfield): Likewise.
222 (tdesc_add_flag): Likewise.
223 (tdesc_add_enum_value): Likewise.
224 (print_c_tdesc) <visit>: Remove overload with tdesc_type
225 parameter, add overloads for tdesc_type_builtin,
226 tdesc_type_with_fields and tdesc_type_vector.
227 <m_printed_type>: Remove.
228 <m_printed_element_type, m_printed_type_with_fields>: Add.
229 * target-descriptions.h (tdesc_create_enum): Change return type.
230 (tdesc_add_typed_bitfield): Change parameter type.
231 (tdesc_add_enum_value): Change parameter type.
232 * xml-tdesc.c (struct tdesc_parsing_data) <current_type>: Change
233 type to tdesc_type_with_fields.
234 (tdesc_start_struct): Adjust.
235 (tdesc_start_flags): Adjust.
236 (tdesc_start_enum): Adjust.
237 (tdesc_start_field): Adjust.
238 * arch/tdesc.h (struct tdesc_type_builtin): Forward-declare.
239 (struct tdesc_type_vector): Forward-declare.
240 (struct tdesc_type_with_fields): Forward-declare.
241 (tdesc_create_struct): Change return type.
242 (tdesc_create_union): Likewise.
243 (tdesc_create_flags): Likewise.
244 (tdesc_add_field): Change parameter type.
245 (tdesc_set_struct_size): Likewise.
246 (tdesc_add_bitfield): Likewise.
247 (tdesc_add_flag): Likewise.
248 * features: Re-generate C files.
249
250 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
251
252 * target-descriptions.c (tdesc_arch_reg): Remove typedef.
253 (struct tdesc_arch_reg): Add constructor.
254 (DEF_VEC_O (tdesc_arch_reg)): Remove.
255 (struct tdesc_arch_data): Initialize fields.
256 <arch_regs>: Change type to std::vector.
257 (target_find_description): Adjust.
258 (tdesc_find_type): Adjust.
259 (tdesc_data_init): Call tdesc_arch_data constructor.
260 (tdesc_data_alloc): Allocate tdesc_arch_data with new.
261 (tdesc_data_cleanup): Free data with delete.
262 (tdesc_numbered_register): Adjust.
263 (tdesc_find_arch_register): Adjust.
264 (tdesc_use_registers): Adjust.
265
266 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
267
268 * target-descriptions.c (tdesc_type_field): Remove typedef.
269 (DEF_VEC_O (tdesc_type_field)): Remove.
270 (struct tdesc_type_field): Add constructor.
271 <name>: Change type to std::string.
272 (struct tdesc_type) <tdesc_type>: Instantiate vector if the type
273 kind uses it.
274 <~tdesc_type>: Destroy vector if the type kind uses it.
275 <u::u::fields>: Change type to std::vector.
276 (tdesc_gdb_type): Adjust.
277 (tdesc_add_field): Adjust.
278 (tdesc_add_typed_bitfield): Adjust.
279 (tdesc_add_field): Adjust.
280 (tdesc_add_enum_value): Adjust.
281 (class print_c_tdesc) <visit>: Adjust.
282
283 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
284
285 * target-descriptions.c (struct tdesc_type) <name>: Change type
286 to std::string.
287 <~tdesc_type>: Don't manually free name.
288 <operator==>: Adjust.
289 (tdesc_named_type): Adjust.
290 (tdesc_find_type): Adjust.
291 (tdesc_gdb_type): Adjust.
292 (class print_c_tdesc) <visit>: Adjust.
293
294 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
295
296 * target-descriptions.c (tdesc_type_p): Remove typedef.
297 (DEF_VEC_P (tdesc_type_p)): Remove.
298 (struct tdesc_feature) <types>: Change type to std::vector.
299 <~tdesc_feature>: Replace with default implementation.
300 <accept>: Adjust.
301 (tdesc_named_type): Adjust.
302 (tdesc_create_vector): Adjust.
303 (tdesc_create_struct): Adjust.
304 (tdesc_create_union): Adjust.
305 (tdesc_create_flags): Adjust.
306 (tdesc_create_enum): Adjust.
307
308 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
309
310 * target-descriptions.c (struct tdesc_reg) <tdesc_reg>: Change
311 type of name_ parameter, adjust to std::string change.
312 <name, group, type>: Change type to std::string.
313 <~tdesc_reg>: Replace with default implementation.
314 <operator==>: Adjust.
315 (tdesc_find_register_early): Adjust.
316 (tdesc_register_name): Adjust.
317 (tdesc_register_type): Adjust.
318 (tdesc_register_in_reggroup_p): Adjust.
319 (class print_c_tdesc) <visit>: Adjust.
320 (class print_c_feature) <visit>: Adjust.
321 * features/arc-arcompact.c: Re-generate.
322 * features/arc-v2.c: Re-generate.
323
324 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
325
326 * target-descriptions.c (tdesc_reg_p): Remove typedef.
327 (DEF_VEC_P (tdesc_reg_p)): Remove.
328 (struct tdesc_feature) <registers>: Change type to std::vector.
329 <~tdesc_feature>: Don't manually free registers.
330 <accept>: Adjust.
331 <operator==>: Adjust.
332 (tdesc_has_registers): Adjust.
333 (tdesc_find_register_early): Adjust.
334 (tdesc_use_registers): Adjust.
335 (tdesc_create_reg): Adjust.
336
337 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
338
339 * target-descriptions.c (tdesc_feature) <name>: Change type to
340 std::string.
341 <~tdesc_feature>: Don't manually free name.
342 <operator==>: Adjust.
343 (tdesc_find_feature): Adjust.
344 (tdesc_feature_name): Adjust.
345 (class print_c_tdesc) <visit_pre>: Adjust.
346 (class print_c_feature) <visit_pre>: Adjust.
347
348 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
349
350 * target-descriptions.c (tdesc_feature_p): Remove typedef.
351 (DEF_VEC_P (tdesc_feature_p)): Remove.
352 (struct target_desc) <features>: Change type to std::vector.
353 <~target_desc>: Replace with default implementation.
354 <accept>: Adjust.
355 <operator==>: Adjust.
356 (tdesc_has_registers): Adjust.
357 (tdesc_find_feature): Adjust.
358 (tdesc_use_registers): Adjust.
359 (tdesc_create_feature): Adjust.
360
361 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
362
363 * target-descriptions.c (arch_p): Remove typedef.
364 (DEF_VEC_P (arch_p)): Remove.
365 (struct target_desc) <compatible>: Change type to std::vector.
366 <~target_desc>: Don't manually free compatible.
367 (tdesc_compatible_p): Adjust.
368 (tdesc_add_compatible): Adjust.
369 (class print_c_tdesc) <visit_pre>: Adjust.
370
371 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
372
373 * target-descriptions.c (property_s): Remove typedef.
374 (DEF_VEC_O (property_s)): Remove.
375 (struct target_desc) <properties>: Make an std::vector.
376 <~target_desc>: Don't manually free properties.
377 (tdesc_property): Adjust.
378 (set_tdesc_property): Adjust.
379 (class print_c_tdesc) <visit_pre>: Adjust.
380
381 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
382
383 * common/gdb_assert.h (gdb_static_assert): Redefine using
384 static_assert.
385
386 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
387
388 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
389 unused variables.
390 (ada_is_redundant_range_encoding): Likewise.
391 * ada-varobj.c (ada_varobj_get_value_of_array_variable):
392 Likewise.
393 * alpha-tdep.c (alpha_software_single_step): Likewise.
394 * arm-tdep.c (_initialize_arm_tdep): Likewise.
395 * auto-load.c (info_auto_load_cmd): Likewise.
396 * break-catch-syscall.c (insert_catch_syscall): Likewise.
397 (remove_catch_syscall): Likewise.
398 * breakpoint.c (condition_completer): Likewise.
399 (clear_command): Likewise.
400 (update_breakpoint_locations): Likewise.
401 * btrace.c (btrace_disable): Likewise.
402 (btrace_teardown): Likewise.
403 (btrace_maint_update_pt_packets): Likewise.
404 (maint_btrace_clear_cmd): Likewise.
405 * cli/cli-decode.c (lookup_cmd_1): Likewise.
406 (lookup_cmd_composition): Likewise.
407 * cli/cli-dump.c (scan_filename): Likewise.
408 (restore_command): Likewise.
409 * compile/compile-loc2c.c (compute_stack_depth): Likewise.
410 * compile/compile-object-load.c (compile_object_load): Likewise.
411 * compile/compile-object-run.c (compile_object_run): Likewise.
412 * compile/compile.c (compile_to_object): Likewise.
413 * completer.c (filename_completer): Likewise.
414 (complete_files_symbols): Likewise.
415 (complete_expression): Likewise.
416 * corelow.c (core_open): Likewise.
417 * ctf.c (ctf_start): Likewise.
418 (ctf_write_status): Likewise.
419 (ctf_write_uploaded_tsv): Likewise.
420 (ctf_write_definition_end): Likewise.
421 (ctf_open_dir): Likewise.
422 (ctf_xfer_partial): Likewise.
423 (ctf_trace_find): Likewise.
424 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
425 Likewise.
426 * dwarf2loc.c (allocate_piece_closure): Likewise.
427 (indirect_pieced_value): Likewise.
428 (dwarf2_evaluate_loc_desc_full): Likewise.
429 * dwarf2read.c (dw2_expand_marked_cus): Likewise.
430 (dw2_expand_symtabs_matching): Likewise.
431 (dw2_map_symbol_filenames): Likewise.
432 (read_and_check_comp_unit_head): Likewise.
433 (read_cutu_die_from_dwo): Likewise.
434 (lookup_dwo_unit): Likewise.
435 (read_comp_units_from_section): Likewise.
436 (dwarf2_compute_name): Likewise.
437 (handle_DW_AT_stmt_list): Likewise.
438 (create_cus_hash_table): Likewise.
439 (create_dwp_v2_section): Likewise.
440 (dwarf2_rnglists_process): Likewise.
441 (dwarf2_ranges_process): Likewise.
442 (dwarf2_record_block_ranges): Likewise.
443 (is_vtable_name): Likewise.
444 (read_formatted_entries): Likewise.
445 (skip_form_bytes): Likewise.
446 * elfread.c (elf_symtab_read): Likewise.
447 * exec.c (exec_file_command): Likewise.
448 * f-valprint.c (f_val_print): Likewise.
449 (info_common_command_for_block): Likewise.
450 * guile/guile.c (initialize_scheme_side): Likewise.
451 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Likewise.
452 * guile/scm-cmd.c (cmdscm_completer): Likewise.
453 (gdbscm_register_command_x): Likewise.
454 * guile/scm-frame.c (gdbscm_frame_read_var): Likewise.
455 * guile/scm-param.c (gdbscm_parameter_value): Likewise.
456 * guile/scm-ports.c (file_port_magic): Likewise.
457 * guile/scm-pretty-print.c (ppscm_search_pp_list): Likewise.
458 (ppscm_pretty_print_one_value): Likewise.
459 (ppscm_print_children): Likewise.
460 * guile/scm-string.c (gdbscm_string_to_argv): Likewise.
461 * guile/scm-symtab.c (gdbscm_sal_symtab): Likewise.
462 * guile/scm-type.c (gdbscm_type_next_field_x): Likewise.
463 * guile/scm-utils.c (gdbscm_parse_function_args): Likewise.
464 * i386-tdep.c (i386_register_reggroup_p): Likewise.
465 * infcmd.c (run_command_1): Likewise.
466 (until_next_fsm_clean_up): Likewise.
467 * linespec.c (linespec_complete): Likewise.
468 (find_label_symbols): Likewise.
469 * m2-valprint.c (m2_val_print): Likewise.
470 * memattr.c (require_user_regions): Likewise.
471 (lookup_mem_region): Likewise.
472 (disable_mem_command): Likewise.
473 (mem_delete): Likewise.
474 * mep-tdep.c (mep_register_name): Likewise.
475 (mep_analyze_prologue): Likewise.
476 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Likewise.
477 * mi/mi-interp.c (mi_on_sync_execution_done): Likewise.
478 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
479 * microblaze-linux-tdep.c (microblaze_linux_init_abi): Likewise.
480 * minidebug.c (lzma_open): Likewise.
481 * minsyms.c (lookup_minimal_symbol): Likewise.
482 * mips-linux-tdep.c (mips64_fill_fpregset): Likewise.
483 * mips-tdep.c (mips_stub_frame_sniffer): Likewise.
484 (mips_o64_return_value): Likewise.
485 (mips_single_step_through_delay): Likewise.
486 (_initialize_mips_tdep): Likewise.
487 * nios2-tdep.c (nios2_push_dummy_call): Likewise.
488 (nios2_software_single_step): Likewise.
489 * parse.c (find_minsym_type_and_address): Likewise.
490 * psymtab.c (psym_relocate): Likewise.
491 * python/py-breakpoint.c (bppy_get_commands): Likewise.
492 (gdbpy_breakpoint_modified): Likewise.
493 * python/py-infevents.c (create_inferior_call_event_object):
494 Likewise.
495 * python/py-record-btrace.c (btpy_list_item): Likewise.
496 * python/py-type.c (typy_str): Likewise.
497 * python/py-value.c (valpy_call): Likewise.
498 * python/python.c (do_start_initialization): Likewise.
499 * record-btrace.c (record_btrace_insn_history_range): Likewise.
500 (record_btrace_call_history_range): Likewise.
501 (record_btrace_record_method): Likewise.
502 (record_btrace_xfer_partial): Likewise.
503 (btrace_get_frame_function): Likewise.
504 * record-full.c (record_full_open): Likewise.
505 * record.c (get_context_size): Likewise.
506 * registry.h (DEFINE_REGISTRY): Likewise.
507 * remote-fileio.c (remote_fileio_request): Likewise.
508 * remote.c (remote_update_thread_list): Likewise.
509 (remote_check_symbols): Likewise.
510 (remote_commit_resume): Likewise.
511 (remote_interrupt): Likewise.
512 (remote_insert_breakpoint): Likewise.
513 (compare_sections_command): Likewise.
514 * rust-exp.y (super_name): Likewise.
515 (lex_string): Likewise.
516 (convert_ast_to_type): Likewise.
517 (convert_ast_to_expression): Likewise.
518 * rust-lang.c (rust_print_struct_def): Likewise.
519 (rust_print_type): Likewise.
520 (rust_evaluate_subexp): Likewise.
521 * rx-tdep.c (rx_register_type): Likewise.
522 * ser-event.c (serial_event_clear): Likewise.
523 * serial.c (serial_open): Likewise.
524 * spu-tdep.c (spu_overlay_new_objfile): Likewise.
525 * symfile.c (section_is_overlay): Likewise.
526 (overlay_unmapped_address): Likewise.
527 (overlay_mapped_address): Likewise.
528 (simple_overlay_update_1): Likewise.
529 (simple_overlay_update): Likewise.
530 * symtab.c (symbol_find_demangled_name): Likewise.
531 (search_symbols): Likewise.
532 * target-descriptions.c (tdesc_predefined_type): Likewise.
533 * target.c (target_commit_resume): Likewise.
534 * thread.c (print_selected_thread_frame): Likewise.
535 * top.c (new_ui_command): Likewise.
536 (gdb_readline_no_editing): Likewise.
537 * tracefile-tfile.c (tfile_open): Likewise.
538 * tracepoint.c (create_tsv_from_upload): Likewise.
539 * utils.c (quit): Likewise.
540 (defaulted_query): Likewise.
541 * valarith.c (value_concat): Likewise.
542 * xml-syscall.c (xml_list_syscalls_by_group): Likewise.
543 * xml-tdesc.c (target_fetch_description_xml): Likewise.
544 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
545 (xtensa_pseudo_register_write): Likewise.
546
547 2017-12-04 Tom Tromey <tom@tromey.com>
548
549 * NEWS: Mention Rust trait object inspection.
550
551 2017-12-04 Pedro Alves <palves@redhat.com>
552
553 PR gdb/22499
554 * amd64-tdep.c (amd64_insn::rex_offset): Rename to...
555 (amd64_insn::enc_prefix_offset): ... this, and tweak comment.
556 (vex2_prefix_p, vex3_prefix_p): New functions.
557 (amd64_get_insn_details): Adjust to rename. Also skip VEX2 and
558 VEX3 prefixes.
559 (fixup_riprel): Set VEX3.!B.
560
561 2017-12-03 Simon Marchi <simon.marchi@ericsson.com>
562
563 * target.h (mem_region_vector): Remove.
564 (struct target_ops) <to_memory_map>: Change return type to
565 std::vector<mem_region>.
566 * target-debug.h (target_debug_print_mem_region_vector): Rename
567 to ...
568 (target_debug_print_std_vector_mem_region): ... this.
569 * target-delegates.c: Re-generate.
570
571 2017-12-03 Pedro Alves <palves@redhat.com>
572
573 * make-target-delegates (munge_type): Also munge '<', '>', and
574 ':'. Avoid double underscores in identifiers, and trailing
575 underscores.
576 * target-debug.h
577 (target_debug_print_VEC_static_tracepoint_marker_p__p): Rename to
578 ...
579 (target_debug_print_VEC_static_tracepoint_marker_p_p): ... this.
580 * target-delegates.c: Regenerate.
581
582 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
583
584 * common/poison.h (XDELETE): Fix typo.
585
586 2017-12-01 Andrew Cagney <cagney@redhat.com>
587 Joel Brobecker <brobecker@adacore.com>
588 Sergio Durigan Junior <sergiodj@redhat.com>
589
590 * NEWS (Changes since GDB 8.0: Mention new '--readnever'
591 feature.
592 * coffread.c (coff_symfile_read): Do not map over sections with
593 'coff_locate_sections' if readnever is on.
594 * dwarf2read.c (dwarf2_has_info): Return 0 if
595 readnever is on.
596 * elfread.c (elf_symfile_read): Do not map over sections with
597 'elf_locate_sections' if readnever is on.
598 * main.c (validate_readnow_readnever): New function.
599 (captured_main_1): Add support for --readnever.
600 (print_gdb_help): Document --readnever.
601 * objfile-flags.h (enum objfile_flag) <OBJF_READNEVER>: New
602 flag.
603 * symfile.c (readnever_symbol_files): New global.
604 (symbol_file_add_with_addrs): Set 'OBJF_READNEVER' when
605 'READNEVER_SYMBOL_FILES' is set.
606 (validate_readnow_readnever): New function.
607 (symbol_file_command): Handle '-readnever' option.
608 Call 'validate_readnow_readnever'.
609 (add_symbol_file_command): Handle '-readnever' option.
610 Call 'validate_readnow_readnever'.
611 (_initialize_symfile): Document new '-readnever' option for
612 both 'symbol-file' and 'add-symbol-file' commands.
613 * top.h (readnever_symbol_files): New extern global.
614 * xcoffread.c (xcoff_initial_scan): Do not read debug
615 information if readnever is on.
616
617 2017-12-01 Sergio Durigan Junior <sergiodj@redhat.com>
618
619 * symfile.c (symbol_file_command): Call
620 'symbol_file_add_main_1' only after processing all command
621 line options.
622 (add_symbol_file_command): Modify logic to make arguments
623 position-independent.
624
625 2017-12-01 Joel Brobecker <brobecker@adacore.com>
626
627 * ada-lang.c (symbol_list_obstack): Delete.
628 (resolve_subexp): Make sure "candidates" gets xfree'ed.
629 (ada_lookup_symbol_list_worker): Remove the limitation that
630 the result is only good until the next call, now making it
631 the responsibility of the caller to free the result when no
632 longer needed. Adjust the function's intro comment accordingly.
633 (ada_lookup_symbol_list): Adjust the function's intro comment.
634 (ada_iterate_over_symbols): Make sure "results" gets xfree'ed.
635 (ada_lookup_encoded_symbol, get_var_value): Likewise.
636 (_initialize_ada_language): Remove symbol_list_obstack
637 initialization.
638 * ada-exp.y (block_lookup): Make sure "syms" gets xfree'ed.
639 (write_var_or_type, write_name_assoc): Likewise.
640
641 2017-12-01 Tom Tromey <tom@tromey.com>
642
643 * Makefile.in (all_deps_files): New variable.
644 Include .Po files using all_deps_files.
645
646 2017-12-01 Joel Brobecker <brobecker@adacore.com>
647
648 * MAINTAINERS: Update list of maintainers, moving those who
649 stepped down or became inactive to the "Past Maintainers"
650 section.
651
652 2017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
653
654 * configure.ac Don't check for sys/fault.h, sys/syscall.h,
655 sys/proc.h.
656 (NEW_PROC_API): Remove.
657 (prsysent_t, pr_sigset_t, pr_sigaction64_t, pr_siginfo64_t):
658 Likewise.
659 * common/common.m4 (GDB_AC_COMMON): Don't check for sys/syscall.h.
660 * configure: Regenerate.
661 * config.in: Regenerate.
662 * gdbserver/configure: Regenerate.
663 * gdbserver/config.in: Regenerate.
664
665 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Remove
666 NEW_PROC_API test.
667 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Likewise.
668
669 * linux-btrace.c: Remove HAVE_SYS_SYSCALL_H test.
670
671 * proc-api.c: Remove !NEW_PROC_API support.
672 Remove HAVE_SYS_PROC_H and HAVE_SYS_USER_H tests.
673 Remove tests for macros always defined on Solaris.
674 * proc-events.c: Remove !NEW_PROC_API support.
675 Remove Remove HAVE_SYS_SYSCALL_H, HAVE_SYS_PROC_H and
676 HAVE_SYS_USER_H tests.
677 (init_syscall_table): Remove non-Solaris syscalls.
678 Remove tests for syscalls present on all Solaris versions.
679 Add missing Solaris 10+ syscalls.
680 (signal_table): Remove non-Solaris signals.
681 Remove tests for signals present on all Solaris versions.
682 (fault_table): Remove non-Solaris faults.
683 Remove tests for faults present on all Solaris versions.
684 * proc-flags.c: Remove !NEW_PROC_API support.
685 (pr_flag_table): Remove non-Solaris and pre-Solaris 7 comments.
686 Remove non-Solaris flags.
687 * proc-why.c: Remove !NEW_PROC_API support.
688 (pr_why_table): Remove meaningless comments.
689 Remove tests for reasons present on all Solaris versions.
690 Remove OSF/1 cases.
691 (proc_prettyfprint_why): Likewise.
692
693 * procfs.c: Remove !NEW_PROC_API and DYNAMIC_SYSCALLS support.
694 Remove HAVE_SYS_FAULT_H and HAVE_SYS_SYSCALL_H tests.
695 Remove WA_READ test, IRIX watchpoint support.
696 (gdb_sigset_t, gdb_sigaction_t, gdb_siginfo_t): Replace by base
697 types. Change users.
698 (gdb_praddset, gdb_prdelset, gdb_premptysysset, gdb_praddsysset)
699 (gdb_prdelset, gdb_pr_issyssetmember): Replace by base macros.
700 Change callers.
701 Remove CTL_PROC_NAME_FMT tests.
702 (gdb_prstatus_t, gdb_lwpstatus_t): Replace by base types. Change
703 users.
704 (sysset_t_size): Remove. Use sizeof (sysset_t) in callers.
705 Remove PROCFS_DONT_PIOCSSIG_CURSIG support.
706 (proc_modify_flag): Replace GDBRESET by PCUNSET.
707 Remove PR_ASYNC, PR_KLC tests.
708 (proc_unset_inherit_on_fork): Remove PR_ASYNC test.
709 (proc_parent_pid): Remove PCWATCH etc. tests.
710 (proc_set_watchpoint): Remove !PCWATCH && !PIOCSWATCH support.
711 Remove PCAGENT test.
712 (proc_get_nthreads) [PIOCNTHR && PIOCTLIST]: Remove.
713 Remove SYS_lwpcreate || SYS_lwp_create test.
714 (proc_get_current_thread): Likewise.
715 [PIOCNTHR && PIOCTLIST]: Remove.
716 [PIOCLSTATUS]: Remove.
717 (procfs_debug_inferior): Remove non-Solaris cases, conditionals.
718 [PRFS_STOPEXEC]: Remove.
719 (syscall_is_lwp_exit): Remove non-Solaris cases, conditionals.
720 (syscall_is_exit): Likewise.
721 (syscall_is_exec): Likewise.
722 (syscall_is_lwp_create): Likewise.
723 Remove SYS_syssgi support.
724 (procfs_wait): Remove PR_ASYNC, !PIOCSSPCACT tests.
725 [SYS_syssgi]: Remove.
726 Remove non-Solaris cases, conditionals.
727 (unconditionally_kill_inferior) [PROCFS_NEED_PIOCSSIG_FOR_KILL]:
728 Remove.
729 (procfs_init_inferior) [SYS_syssgi]: Remove.
730 (procfs_set_exec_trap) [PRFS_STOPEXEC]: Remove.
731 (procfs_inferior_created) [SYS_syssgi]: Remove.
732 (procfs_set_watchpoint): Remove !AIX5 test.
733 (procfs_stopped_by_watchpoint): Remove FLTWATCH test, FLTKWATCH
734 case.
735 (mappingflags) [MA_PHYS]: Remove.
736 (info_mappings_callback): Remove PCAGENT test.
737 Remove PIOCOPENLWP || PCAGENT test.
738
739 2017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
740
741 * sol-thread.c (info_solthreads): Constify args.
742 Cast args to void *.
743
744 2017-11-29 John Baldwin <jhb@FreeBSD.org>
745
746 * target-float.c [HAVE_LIBMPFR]: Define MPFR_USE_INTMAX_T.
747
748 2017-11-29 Joel Brobecker <brobecker@adacore.com>
749
750 * ada-lang.c (to_fixed_range_type): Make sure that the size
751 of the range type being returned is the same as the size
752 of the range type being fixed.
753
754 2017-11-29 Pedro Alves <palves@redhat.com>
755
756 PR c++/19436
757 * NEWS: Mention setting breakpoints on functions with C++ ABI
758 tags.
759 * completer.h (completion_match_for_lcd) <match,
760 mark_ignored_range>: New methods.
761 <finish>: Consider ignored ranges.
762 <clear>: Clear ignored ranges.
763 <m_ignored_ranges, m_finished_storage>: New fields.
764 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
765 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
766 completion_match_for_lcd pointer to strncmp_iw_with_mode.
767 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
768 * language.c (default_symbol_name_matcher): Pass the
769 completion_match_for_lcd pointer to strncmp_iw_with_mode.
770 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
771 * utils.c (skip_abi_tag): New function.
772 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
773 Handle ABI tags.
774 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
775 parameter.
776
777 2017-11-29 Pedro Alves <palves@redhat.com>
778
779 PR c++/19436
780 * NEWS: Mention setting breakpoints on functions with C++ ABI
781 tags.
782 * completer.h (completion_match_for_lcd) <match,
783 mark_ignored_range>: New methods.
784 <finish>: Consider ignored ranges.
785 <clear>: Clear ignored ranges.
786 <m_ignored_ranges, m_finished_storage>: New fields.
787 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
788 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
789 completion_match_for_lcd pointer to strncmp_iw_with_mode.
790 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
791 * language.c (default_symbol_name_matcher): Pass the
792 completion_match_for_lcd pointer to strncmp_iw_with_mode.
793 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
794 * utils.c (skip_abi_tag): New function.
795 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
796 Handle ABI tags.
797 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
798 parameter.
799
800 2017-11-29 Pedro Alves <palves@redhat.com>
801
802 * NEWS: Mention that breakpoints on C++ functions are now set on
803 on all namespaces/classes by default, and mention "break
804 -qualified".
805 * ax-gdb.c (agent_command_1): Adjust to pass a
806 symbol_name_match_type to new_linespec_location.
807 * breakpoint.c (parse_breakpoint_sals): Adjust to
808 get_linespec_location's return type change.
809 (strace_marker_create_sals_from_location): Adjust to pass a
810 symbol_name_match_type to new_linespec_location.
811 (strace_marker_decode_location): Adjust to get_linespec_location's
812 return type change.
813 (strace_command): Adjust to pass a symbol_name_match_type to
814 new_linespec_location.
815 (LOCATION_HELP_STRING): Add paragraph about wildmatching, and
816 mention "-qualified".
817 * c-lang.c (cplus_language_defn): Install cp_search_name_hash.
818 * completer.c (explicit_location_match_type::MATCH_QUALIFIED): New
819 enumerator.
820 (complete_address_and_linespec_locations): New parameter
821 'match_type'. Pass it down.
822 (explicit_options): Add "-qualified".
823 (collect_explicit_location_matches): Pass the requested match type
824 to the linespec completers. Handle MATCH_QUALIFIED.
825 (location_completer): Handle "-qualified" combined with linespecs.
826 * cp-support.c (cp_search_name_hash): New.
827 (cp_symbol_name_matches_1): Implement wild matching for C++.
828 (cp_fq_symbol_name_matches): Reimplement.
829 (cp_get_symbol_name_matcher): Return different matchers depending
830 on the lookup name's match type.
831 (selftests::test_cp_symbol_name_matches): Add wild matching tests.
832 * cp-support.h (cp_search_name_hash): New declaration.
833 * dwarf2read.c
834 (selftests::dw2_expand_symtabs_matching::test_symbols): Add
835 symbols.
836 (test_dw2_expand_symtabs_matching_symbol): Add wild matching
837 tests.
838 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Adjust to
839 pass a symbol_name_match_type to new_linespec_location.
840 * linespec.c (linespec_parse_basic): Lookup function symbols using
841 the parser's symbol name match type.
842 (convert_explicit_location_to_linespec): New
843 symbol_name_match_type parameter. Pass it down to
844 find_linespec_symbols.
845 (convert_explicit_location_to_sals): Pass the location's name
846 match type to convert_explicit_location_to_linespec.
847 (parse_linespec): New match_type parameter. Save it in the
848 parser.
849 (linespec_parser_new): Default to symbol_name_match_type::WILD.
850 (linespec_complete_function): New symbol_name_match_type
851 parameter. Use it.
852 (complete_linespec_component): Pass down the parser's recorded
853 name match type.
854 (linespec_complete_label): New symbol_name_match_type parameter.
855 Use it.
856 (linespec_complete): New symbol_name_match_type parameter. Save
857 it in the parser and pass it down. Adjust to
858 get_linespec_location's prototype change.
859 (find_function_symbols, find_linespec_symbols): New
860 symbol_name_match_type parameter. Pass it down instead of
861 assuming symbol_name_match_type::WILD.
862 * linespec.h (linespec_complete, linespec_complete_function)
863 (linespec_complete_label): New symbol_name_match_type parameter.
864 * location.c (event_location::linespec_location): Now a struct
865 linespec_location.
866 (EL_LINESPEC): Adjust.
867 (initialize_explicit_location): Default to
868 symbol_name_match_type::WILD.
869 (new_linespec_location): New symbol_name_match_type parameter.
870 Record it in the location.
871 (get_linespec_location): Now returns a struct linespec_location.
872 (new_explicit_location): Also copy func_name_match_type.
873 (explicit_to_string_internal)
874 (string_to_explicit_location): Handle "-qualified".
875 (copy_event_location): Adjust to LINESPEC_LOCATION type change.
876 Copy symbol_name_match_type fields.
877 (event_location_deleter::operator()): Adjust to LINESPEC_LOCATION
878 type change.
879 (event_location_to_string): Adjust to LINESPEC_LOCATION type
880 change. Handle "-qualfied".
881 (string_to_explicit_location): Handle "-qualified".
882 (string_to_event_location_basic): New symbol_name_match_type
883 parameter. Pass it down.
884 (string_to_event_location): Handle "-qualified".
885 * location.h (struct linespec_location): New.
886 (explicit_location::func_name_match_type): New field.
887 (new_linespec_location): Now returns a const linespec_location *.
888 (string_to_event_location_basic): New symbol_name_match_type
889 parameter.
890 (explicit_completion_info::saw_explicit_location_option): New
891 field.
892 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Adjust to pass a
893 symbol_name_match_type to new_linespec_location.
894 * python/py-breakpoint.c (bppy_init): Likewise.
895 * python/python.c (gdbpy_decode_line): Likewise.
896
897 2017-11-29 Pedro Alves <palves@redhat.com>
898
899 * ada-lang.c (ada_lookup_name_info::matches): Change type of
900 parameter from completion_match to completion_match_result.
901 Adjust.
902 (do_wild_match, do_full_match, ada_symbol_name_matches): Likewise.
903 * completer.c (completion_tracker::maybe_add_completion): Add
904 match_for_lcd parameter and use it.
905 (completion_tracker::add_completion): Likewise.
906 * completer.h (class completion_match_for_lcd): New class.
907 (completion_match_result::match_for_lcd): New field.
908 (completion_match_result::set_match): New method.
909 (completion_tracker): Add comments.
910 (completion_tracker::add_completion): Add match_for_lcd parameter.
911 (completion_tracker::reset_completion_match_result): Reset
912 match_for_lcd too.
913 (completion_tracker::maybe_add_completion): Add match_for_lcd
914 parameter.
915 (completion_tracker::m_lowest_common_denominator_unique): Extend
916 comments.
917 * cp-support.c (cp_symbol_name_matches_1)
918 (cp_fq_symbol_name_matches): Change type of parameter from
919 completion_match to completion_match_result. Adjust.
920 * language.c (default_symbol_name_matcher): Change type of
921 parameter from completion_match to completion_match_result.
922 Adjust.
923 * language.h (completion_match_for_lcd): Forward declare.
924 (default_symbol_name_matcher): Change type of parameter from
925 completion_match to completion_match_result.
926 * symtab.c (compare_symbol_name): Adjust.
927 (completion_list_add_name): Pass the match_for_lcd to the tracker.
928 * symtab.h (ada_lookup_name_info::matches): Change type of
929 parameter from completion_match to completion_match_result.
930 (symbol_name_matcher_ftype): Likewise, and update comments.
931
932 2017-11-29 Pedro Alves <palves@redhat.com>
933
934 * linespec.c (minsym_found, add_minsym): Use msymbol_is_function.
935 * minsyms.c (msymbol_is_text): Delete.
936 (msymbol_is_function): New function.
937 * minsyms.h (msymbol_is_text): Delete.
938 (msymbol_is_function): New declaration.
939 * symtab.c (find_function_alias_target): Use msymbol_is_function.
940
941 2017-11-29 Tom Tromey <tom@tromey.com>
942
943 * Makefile.in (distclean): Handle the case where rmdir fails.
944
945 2017-11-29 Tom Tromey <tom@tromey.com>
946
947 * symfile.c (_initialize_symfile): Update usage text for
948 add-symbol-file, symbol-file, load.
949
950 2017-11-29 Tom Tromey <tom@tromey.com>
951
952 * symfile.c (add_symbol_file_command): Error if some arguments to
953 -s are missing. Change unrecognized-argument error message.
954 (_initialize_symfile): Fix usage text for add-symbol-file.
955
956 2017-11-27 Tom Tromey <tom@tromey.com>
957
958 * Makefile.in (REMOTE_OBS): Remove.
959 (SFILES): Remove remote sources.
960 (COMMON_SFILES): Add remote sources.
961 (ALLDEPFILES): Remove dcache.c.
962
963 2017-11-27 Tom Tromey <tom@tromey.com>
964
965 * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
966 variables.
967 (SFILES): Use SUBDIR_TARGET_SRCS.
968 (COMMON_OBS): Use SUBDIR_TARGET_OBS. Remove waitstatus.o.
969 (CONFIG_SRC_SUBDIR): Add target.
970 (%.o): Remove target rule.
971
972 2017-11-27 Tom Tromey <tom@tromey.com>
973
974 * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
975 registry.o, thread-fsm.o, debug.o.
976 (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
977 thread-fsm.c, debug.c.
978
979 2017-11-27 Tom Tromey <tom@tromey.com>
980
981 * Makefile.in (COMMON_SFILES): New.
982 (SFILES): Move some entries to COMMON_SFILES.
983 (COMMON_OBS): Use COMMON_SFILES.
984
985 2017-11-27 Tom Tromey <tom@tromey.com>
986
987 * Makefile.in (YYFILES): Update comment.
988 (YYOBJ): Redefine.
989
990 2017-11-27 Tom Tromey <tom@tromey.com>
991
992 * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
993 (CONFIG_SRC_SUBDIR): Add python.
994 (%.o): Remove python rule.
995 (python/%.o): New rule.
996 * configure: Rebuild.
997 * configure.ac (CONFIG_OBS): Refer to python/python.o
998
999 2017-11-27 Tom Tromey <tom@tromey.com>
1000
1001 * configure: Rebuild.
1002 * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
1003 * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
1004 (CONFIG_SRC_SUBDIR): Add guile.
1005 (%.o): Remove guile rule.
1006
1007 2017-11-27 Tom Tromey <tom@tromey.com>
1008
1009 * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
1010 (%.o): Remove unittests rule.
1011 (CONFIG_SRC_SUBDIR): Add unittests.
1012
1013 2017-11-27 Tom Tromey <tom@tromey.com>
1014
1015 * Makefile.in (SUBDIR_TUI_OBS): Redefine.
1016 (CONFIG_SRC_SUBDIR): Add tui.
1017 (%.o): Remove tui rule.
1018
1019 2017-11-27 Tom Tromey <tom@tromey.com>
1020
1021 * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
1022 (%.o): Remove compile rule.
1023 (CONFIG_SRC_SUBDIR): Add compile.
1024
1025 2017-11-27 Tom Tromey <tom@tromey.com>
1026
1027 * Makefile.in (SUBDIR_MI_OBS): Redefine.
1028 (%.o): Remove mi rule.
1029 (CONFIG_SRC_SUBDIR): Add mi.
1030 (COMMON_OBS): Use mi/mi-common.o
1031
1032 2017-11-27 Tom Tromey <tom@tromey.com>
1033
1034 * Makefile.in (SUBDIR_CLI_OBS): Redefine.
1035 (%.o): Remove cli rule.
1036 (CONFIG_SRC_SUBDIR): Add cli.
1037
1038 2017-11-27 Tom Tromey <tom@tromey.com>
1039
1040 * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
1041 * configure: Rebuild.
1042 * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
1043 (CONFIG_DEP_SUBDIR): New variable.
1044 (%.o): Add order-only dependency.
1045 ($(CONFIG_DEP_SUBDIR)): New target.
1046
1047 2017-11-26 Dominik Czarnota <dominik.b.czarnota@gmail.com>
1048
1049 PR gdb/21945
1050 * findcmd.c (_initialize_mem_search): Update find command help
1051 text.
1052
1053 2017-11-26 Simon Marchi <simon.marchi@polymtl.ca>
1054
1055 * python/python.c (do_start_initialization): Change progname
1056 type to gdb::unique_xmalloc_ptr. Release the pointer when using
1057 Python 2.
1058
1059 2017-11-26 Tom Tromey <tom@tromey.com>
1060
1061 * common/format.h: Add include guards.
1062
1063 2017-11-26 Tom Tromey <tom@tromey.com>
1064
1065 * nat/linux-personality.h (class
1066 maybe_disable_address_space_randomization): New class.
1067 (maybe_disable_address_space_randomization): Don't declare
1068 function.
1069 * nat/linux-personality.c (restore_personality)
1070 (make_disable_asr_cleanup): Remove.
1071 (maybe_disable_address_space_randomization): Now a constructor.
1072 (~maybe_disable_address_space_randomization): New destructor.
1073 * linux-nat.c (linux_nat_create_inferior): Update.
1074
1075 2017-11-26 Tom Tromey <tom@tromey.com>
1076
1077 * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
1078
1079 2017-11-26 Ulrich Weigand <uweigand@de.ibm.com>
1080
1081 * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
1082 "cooked" register. Access only first four bytes of branch target
1083 registers.
1084
1085 2017-11-25 Sergio Durigan Junior <sergiodj@redhat.com>
1086
1087 PR gdb/22491
1088 * stap-probe.c (relocate_address): New function.
1089 (stap_probe::get_relocated_address): Use 'relocate_address'.
1090 (stap_probe::set_semaphore): Use 'relocate_address' and pass
1091 'm_sem_addr'.
1092 (stap_probe::clear_semaphore): Likewise.
1093
1094 2017-11-25 Pedro Alves <palves@redhat.com>
1095
1096 * dictionary.c: Include "safe-ctype.h".
1097 * minsyms.c: Include "safe-ctype.h".
1098 * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
1099
1100 2017-11-25 Pedro Alves <palves@redhat.com>
1101
1102 * completer.c (complete_line_internal_1): Skip spaces until the
1103 start of the command.
1104
1105 2017-11-24 Pedro Alves <palves@redhat.com>
1106
1107 * cp-support.c (cp_symbol_name_matches_1): New, factored out from
1108 cp_fq_symbol_name_matches. Pass language_cplus to
1109 strncmp_with_mode.
1110 (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
1111 (selftests::test_cp_symbol_name_cmp): New.
1112 (_initialize_cp_support): Register "cp_symbol_name_matches"
1113 selftests.
1114 * language.c (default_symbol_name_matcher): Pass language_minimal
1115 to strncmp_iw_with_mode.
1116 * utils.c: Include "cp-support.h" and <algorithm>.
1117 (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
1118 (cp_is_operator): New functions.
1119 (strncmp_iw_with_mode): Use them. Add language parameter. Don't
1120 skip whitespace in the symbol name when the lookup name doesn't
1121 have spaces, and vice versa.
1122 (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
1123 * utils.h (strncmp_iw_with_mode): Add language parameter.
1124
1125 2017-11-24 Joel Brobecker <brobecker@adacore.com>
1126
1127 * ada-lang.c (ada_exception_message_1, ada_exception_message):
1128 New functions.
1129 (print_it_exception): If available, display the exception
1130 message as well.
1131 * NEWS: Document new feature.
1132
1133 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1134
1135 * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
1136
1137 2017-11-24 Philipp Rudo <prudo@linux.vnet.ibm.com>
1138
1139 * dtrace-probe.c (dtrace_probe::build_arg_exprs)
1140 (dtrace_probe::is_enabled, dtrace_probe::enable)
1141 (dtrace_probe::disable): Remove keyword 'struct' at for-range
1142 variable
1143 * probe.c (gen_ui_out_table_header_info)
1144 (print_ui_out_not_applicables): Remove keyword 'struct' at
1145 for-range variable
1146
1147 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1148
1149 * configure.tgt: Add arch/aarch64.o
1150
1151 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1152
1153 * common/common-utils.h: Include poison.h.
1154 (xfree): Remove declaration, add definition with static_assert.
1155 * common/common-utils.c (xfree): Remove.
1156 * common/poison.h (IsMallocatable): Define.
1157 (IsFreeable): Define.
1158 (free): Delete for non-freeable types.
1159 (xnew): New.
1160 (XNEW): Undef and redefine.
1161 (xcnew): New.
1162 (XCNEW): Undef and redefine.
1163 (xdelete): New.
1164 (XDELETE): Undef and redefine.
1165 (xnewvec): New.
1166 (XNEWVEC): Undef and redefine.
1167 (xcnewvec): New.
1168 (XCNEWVEC): Undef and redefine.
1169 (xresizevec): New.
1170 (XRESIZEVEC): Undef and redefine.
1171 (xdeletevec): New.
1172 (XDELETEVEC): Undef and redefine.
1173 (xnewvar): New.
1174 (XNEWVAR): Undef and redefine.
1175 (xcnewvar): New.
1176 (XCNEWVAR): Undef and redefine.
1177 (xresizevar): New.
1178 (XRESIZEVAR): Undef and redefine.
1179
1180 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1181
1182 * gdbthread.h (private_thread_info): Define structure type, add
1183 virtual pure destructor.
1184 (thread_info) <priv>: Change type to unique_ptr.
1185 <private_dtor>: Remove.
1186 * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
1187 (private_thread_info::~private_thread_info): Provide default
1188 implementation.
1189 (thread_info::~thread_info): Don't call private_dtor nor
1190 manually free priv.
1191 * aix-thread.c (private_thread_info): Rename to ...
1192 (aix_thread_info): ... this.
1193 (get_aix_thread_info): New.
1194 (sync_threadlists): Adjust.
1195 (iter_tid): Adjust.
1196 (aix_thread_resume): Adjust.
1197 (aix_thread_fetch_registers): Adjust.
1198 (aix_thread_store_registers): Adjust.
1199 (aix_thread_extra_thread_info): Adjust.
1200 * darwin-nat.h (private_thread_info): Rename to ...
1201 (darwin_thread_info): ... this.
1202 (get_darwin_thread_info): New.
1203 * darwin-nat.c (darwin_init_thread_list): Adjust.
1204 (darwin_check_new_threads): Adjust.
1205 (thread_info_from_private_thread_info): Adjust.
1206 * linux-thread-db.c (private_thread_info): Rename to ...
1207 (thread_db_thread_info): ... this, initialize fields.
1208 (get_thread_db_thread_info): New.
1209 <dying>: Change type to bool.
1210 (update_thread_state): Adjust to type rename.
1211 (record_thread): Adjust to type rename an use of unique_ptr.
1212 (thread_db_pid_to_str): Likewise.
1213 (thread_db_extra_thread_info): Likewise.
1214 (thread_db_thread_handle_to_thread_info): Likewise.
1215 (thread_db_get_thread_local_address): Likewise.
1216 * nto-tdep.h (private_thread_info): Rename to ...
1217 (nto_thread_info): ... this, initialize fields.
1218 (get_nto_thread_info): New.
1219 <name>: Change type to std::string.
1220 * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
1221 use of unique_ptr.
1222 * nto-procfs.c (update_thread_private_data_name): Adjust to
1223 std::string change, allocate nto_private_thread_info with new.
1224 (update_thread_private_data): Adjust to unique_ptr.
1225 * remote.c (private_thread_info): Rename to ...
1226 (remote_thread_info): ... this, initialize data members with
1227 default values.
1228 <extra, name>: Change type to std::string.
1229 <thread_handle>: Change type to non-pointer.
1230 (free_private_thread_info): Remove.
1231 (get_private_info_thread): Rename to...
1232 (get_remote_thread_info): ... this, change return type, adjust to
1233 use of unique_ptr, use remote_thread_info constructor.
1234 (remote_add_thread): Adjust.
1235 (get_private_info_ptid): Rename to...
1236 (get_remote_thread_info): ...this, change return type.
1237 (remote_thread_name): Use get_remote_thread_info, adjust to
1238 change to std::string.
1239 (struct thread_item) <~thread_item>: Remove.
1240 <thread_handle>: Make non pointer.
1241 (start_thread): Adjust to thread_item::thread_handle type
1242 change.
1243 (remote_update_thread_list): Adjust to type name change, move
1244 strings from temporary to long-lived object instead of
1245 duplicating.
1246 (remote_threads_extra_info): Use get_remote_thread_info.
1247 (process_initial_stop_replies): Likewise.
1248 (resume_clear_thread_private_info): Likewise.
1249 (remote_resume): Adjust to type name change.
1250 (remote_commit_resume): Use get_remote_thread_info.
1251 (process_stop_reply): Adjust to type name change.
1252 (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
1253 (remote_stopped_by_hw_breakpoint): Likewise.
1254 (remote_stopped_by_watchpoint): Likewise.
1255 (remote_stopped_data_address): Likewise.
1256 (remote_core_of_thread): Likewise.
1257 (remote_thread_handle_to_thread_info): Use
1258 get_private_info_thread, adjust to thread_handle field type
1259 change.
1260
1261 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1262
1263 * remote.c (struct thread_item): Add constructor, disable copy
1264 construction and copy assignment, define default move
1265 construction and move assignment.
1266 <extra, name>: Change type to std::string.
1267 <core>: Initialize.
1268 <thread_handle>: Make non-pointer.
1269 (thread_item_t): Remove typedef.
1270 (DEF_VEC_O(thread_item_t)): Remove.
1271 (threads_listing_context) <contains_thread>: New method.
1272 <remove_thread>: New method.
1273 <items>: Change type to std::vector.
1274 (clear_threads_listing_context): Remove.
1275 (threads_listing_context_remove): Remove.
1276 (remote_newthread_step): Use thread_item constructor, adjust to
1277 change to std::vector.
1278 (start_thread): Use thread_item constructor, adjust to change to
1279 std::vector.
1280 (end_thread): Adjust to change to std::vector and std::string.
1281 (remote_get_threads_with_qthreadinfo): Use thread_item
1282 constructor, adjust to std::vector.
1283 (remote_update_thread_list): Adjust to change to std::vector and
1284 std::string, use threads_listing_context methods.
1285 (remove_child_of_pending_fork): Adjust.
1286 (remove_new_fork_children): Adjust.
1287 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
1288 (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
1289 * unittests/rsp-low-selftests.c: New file.
1290 * common/rsp-low.h: Include common/byte-vector.h.
1291 (hex2bin): New overload.
1292 * common/rsp-low.c (hex2bin): New overload.
1293
1294 2017-11-24 Simon Marchi <simon.marchi@ericsson.com>
1295
1296 * inferior.h (private_inferior): Define structure type, add
1297 virtual pure destructor.
1298 (inferior) <priv>: Change type to unique_ptr.
1299 * inferior.c (private_inferior::~private_inferior): Provide
1300 default implementation.
1301 (inferior::~inferior): Don't free priv field.
1302 (exit_inferior_1): Likewise.
1303 * darwin-nat.h (struct darwin_exception_info): Initialize fields.
1304 (darwin_exception_info): Remove typedef.
1305 (DEF_VEC_O (darwin_thread_t)); Remove.
1306 (private_inferior): Rename to ...
1307 (darwin_private_inferior): ... this, extend private_inferior.
1308 (get_darwin_inferior): New.
1309 <threads>: Change type to std::vector of darwin_thread_t pointers.
1310 * darwin-nat.c (darwin_check_new_threads): Adjust.
1311 (find_inferior_task_it): Adjust.
1312 (darwin_find_thread); Adjust.
1313 (darwin_suspend_inferior): Adjust.
1314 (darwin_resume_inferior): Adjust.
1315 (darwin_find_new_inferior): Adjust.
1316 (darwin_decode_notify_message): Adjust.
1317 (darwin_send_reply): Adjust.
1318 (darwin_resume_inferior_threads): Adjust.
1319 (darwin_suspend_inferior_threads): Adjust.
1320 (darwin_decode_message): Adjust.
1321 (darwin_wait): Adjust.
1322 (darwin_interrupt): Adjust.
1323 (darwin_deallocate_threads): Adjust.
1324 (darwin_mourn_inferior): Adjust, don't free private data.
1325 (darwin_reply_to_all_pending_messages): Adjust.
1326 (darwin_stop_inferior): Adjust.
1327 (darwin_setup_exceptions): Adjust.
1328 (darwin_kill_inferior): Adjust.
1329 (darwin_setup_request_notification): Adjust.
1330 (darwin_attach_pid): Adjust.
1331 (darwin_init_thread_list): Adjust.
1332 (darwin_setup_fake_stop_event): Adjust.
1333 (darwin_attach): Adjust.
1334 (darwin_detach): Adjust.
1335 (darwin_xfer_partial): Adjust.
1336 (set_enable_mach_exceptions): Adjust.
1337 (darwin_pid_to_exec_file): Adjust.
1338 (darwin_get_ada_task_ptid): Adjust.
1339 * darwin-nat-info.c (get_task_from_args): Adjust.
1340 (info_mach_ports_command): Adjust.
1341 (info_mach_region_command): Adjust.
1342 (info_mach_exceptions_command): Adjust.
1343 * remote.c (private_inferior): Rename to ...
1344 (remote_private_inferior): ... this, initialize fields.
1345 (get_remote_inferior); New.
1346 (remote_commit_resume): Use get_remote_inferior.
1347 (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
1348
1349 2017-11-24 Pedro Alves <palves@redhat.com>
1350
1351 * NEWS: Mention linespecs and explicit locations, and completion
1352 improvements.
1353
1354 2017-11-24 Yao Qi <yao.qi@linaro.org>
1355
1356 * regcache.c (regcache::dump): Remove footnote_register_size.
1357
1358 2017-11-24 Yao Qi <yao.qi@linaro.org>
1359
1360 * regcache.c (cooked_read_test): Add more test for readonly
1361 regcache.
1362
1363 2017-11-24 Yao Qi <yao.qi@linaro.org>
1364
1365 * gdbarch-selftests.c (test_target_has_registers): Move it to
1366 target.c.
1367 (test_target_has_stack): Likewise.
1368 (test_target_has_memory): Likewise.
1369 (test_target_prepare_to_store): Likewise.
1370 (test_target_store_registers): Likewise.
1371 (test_target_ops): Likewise.
1372 * regcache.c: Include selftest-arch.h and gdbthread.h.
1373 (target_ops_no_register): New class.
1374 (test_target_fetch_registers): New.
1375 (test_target_store_registers): New.
1376 (test_target_xfer_partial): New.
1377 (readwrite_regcache): New.
1378 (cooked_read_test): New.
1379 (_initialize_regcache): Register the test.
1380 * target.c: (test_target_has_registers): Moved from
1381 gdbarch-selftests.c.
1382 (test_target_has_stack): Likewise.
1383 (test_target_has_memory): Likewise.
1384 (test_target_prepare_to_store): Likewise.
1385 (test_target_store_registers): Likewise.
1386 * target.h (test_target_ops): New class.
1387
1388 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1389
1390 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
1391 selftest.
1392
1393 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1394
1395 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
1396 * arch/aarch64.c (aarch64_create_target_description): Create
1397 new target description.
1398 * features/Makefile: Add new files.
1399 * features/aarch64.c: Remove file.
1400 * features/aarch64-core.c: New autogenerated file.
1401 * features/aarch64-fpu.c: New autogenerated file.
1402 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
1403
1404 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1405
1406 * Makefile.in: Add new files.
1407 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
1408 aarch64_read_description.
1409 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1410 Call aarch64_read_description.
1411 * aarch64-tdep.c (aarch64_read_description): New function.
1412 (aarch64_gdbarch_init): Call aarch64_read_description.
1413 * aarch64-tdep.h (aarch64_read_description): New function.
1414 * arch/aarch64.c: New file.
1415 * configure.tgt: Add new files.
1416
1417 2017-11-24 Yao Qi <yao.qi@linaro.org>
1418
1419 * mi/mi-main.c (register_changed_p): Update.
1420 * value.c (value_contents_bits_eq): Change return type.
1421 (value_contents_eq): Likewise.
1422 * value.h: Update comments.
1423
1424 2017-11-24 Yao Qi <yao.qi@linaro.org>
1425
1426 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
1427 local 'changed'. Remove error.
1428 (register_changed_p): Change return type to bool.
1429
1430 2017-11-24 Yao Qi <yao.qi@linaro.org>
1431
1432 * arch/tic6x.c: New file.
1433 * arch/tic6x.h: New file.
1434 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
1435 tic6x-core.xml and tic6x-gp.xml.
1436 * features/tic6x-c6xp.c: Generated.
1437 * features/tic6x-core.c: Generated.
1438 * features/tic6x-gp.c: Generated.
1439 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
1440 "tic6x-".
1441
1442 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1443
1444 * mi/mi-main.c (list_available_thread_groups): Change map value
1445 type to std::vector.
1446
1447 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1448
1449 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
1450
1451 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1452
1453 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
1454 back to...
1455 <children_requested>: ... this.
1456 (varobj_get_num_children, varobj_update): Adjust.
1457
1458 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1459
1460 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
1461 (ada_value_has_mutated): Likewise.
1462 * c-varobj.c (varobj_is_anonymous_child): Likewise.
1463 (c_is_path_expr_parent): Likewise.
1464 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
1465 (mi_cmd_var_set_frozen): Likewise.
1466 (mi_cmd_var_update_iter): Likewise.
1467 (mi_cmd_var_update): Likewise.
1468 * varobj.c (pretty_printing): Likewise.
1469 (varobj_enable_pretty_printing): Likewise.
1470 (struct varobj_root) <floating, is_valid>: Likewise.
1471 (struct varobj_dynamic) <children_requested>: Likewise.
1472 (delete_variable): Likewise.
1473 (delete_variable_1): Likewise.
1474 (install_variable): Likewise.
1475 (update_type_if_necessary): Likewise.
1476 (install_new_value): Likewise.
1477 (value_of_root): Likewise.
1478 (is_root_p): Likewise.
1479 (varobj_create): Likewise.
1480 (varobj_delete): Likewise.
1481 (varobj_has_more): Likewise.
1482 (varobj_set_frozen): Likewise.
1483 (varobj_get_frozen): Likewise.
1484 (install_dynamic_child): Likewise.
1485 (dynamic_varobj_has_child_method): Likewise.
1486 (update_dynamic_varobj_children): Likewise.
1487 (varobj_get_num_children): Likewise.
1488 (varobj_list_children): Likewise.
1489 (is_path_expr_parent): Likewise.
1490 (varobj_default_is_path_expr_parent): Likewise.
1491 (varobj_is_dynamic_p): Likewise.
1492 (varobj_set_value): Likewise.
1493 (varobj_value_has_mutated): Likewise.
1494 (varobj_update): Likewise.
1495 (check_scope): Likewise.
1496 (value_of_root_1): Likewise.
1497 (varobj_value_get_print_value): Likewise.
1498 (varobj_editable_p): Likewise.
1499 (varobj_value_is_changeable_p): Likewise.
1500 (varobj_floating_p): Likewise.
1501 (varobj_default_value_is_changeable_p): Likewise.
1502 (varobj_invalidate_iter): Likewise.
1503 * varobj.h (struct varobj_update_result) <type_changed,
1504 children_changed, changed, value_installed>: Likewise.
1505 (struct varobj) <updated, frozen, not_fetched>: Likewise.
1506 (struct lang_varobj_ops) <value_is_changeable_p,
1507 value_has_mutated, is_path_expr_parent>: Likewise.
1508 (varobj_delete): Likewise.
1509 (varobj_set_frozen): Likewise.
1510 (varobj_get_frozen): Likewise.
1511 (varobj_set_value): Likewise.
1512 (varobj_update): Likewise.
1513 (varobj_editable_p): Likewise.
1514 (varobj_floating_p): Likewise.
1515 (varobj_has_more): Likewise.
1516 (varobj_is_dynamic_p): Likewise.
1517 (varobj_default_value_is_changeable_p): Likewise.
1518 (varobj_value_is_changeable_p): Likewise.
1519 (varobj_is_anonymous_child): Likewise.
1520 (varobj_default_is_path_expr_parent): Likewise.
1521
1522 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1523
1524 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
1525 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
1526 <type_str>: Convert to 'std::string'.
1527 <expr>: Convert to 'expression_up'.
1528 (dtrace_probe_arg_s): Delete type and VEC.
1529 (dtrace_probe_enabler_s): Likewise.
1530 (struct dtrace_probe): Replace by...
1531 (class dtrace_static_probe_ops): ...this and...
1532 (class dtrace_probe): ...this.
1533 (dtrace_probe_is_linespec): Rename to...
1534 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
1535 to reflect change.
1536 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
1537 Adjust code. Create new instance of 'dtrace_probe'.
1538 (dtrace_build_arg_exprs): Rename to...
1539 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
1540 reflect change.
1541 (dtrace_get_probes): Rename to...
1542 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
1543 to reflect change.
1544 (dtrace_get_arg): Rename to...
1545 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
1546 reflect change.
1547 (dtrace_probe_is_enabled): Rename to...
1548 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
1549 change.
1550 (dtrace_get_probe_address): Rename to...
1551 (dtrace_probe::get_relocated_address): ...this. Adjust code
1552 to reflect change.
1553 (dtrace_get_probe_argument_count): Rename to...
1554 (dtrace_probe::get_argument_count): ...this. Adjust code to
1555 reflect change.
1556 (dtrace_can_evaluate_probe_arguments): Rename to...
1557 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
1558 to reflect change.
1559 (dtrace_evaluate_probe_argument): Rename to...
1560 (dtrace_probe::evaluate_argument): ...this. Adjust code to
1561 reflect change.
1562 (dtrace_compile_to_ax): Rename to...
1563 (dtrace_probe::compile_to_ax): ...this. Adjust code to
1564 reflect change.
1565 (dtrace_probe_destroy): Delete.
1566 (dtrace_type_name): Rename to...
1567 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
1568 reflect change.
1569 (dtrace_probe::get_static_ops): New method.
1570 (dtrace_gen_info_probes_table_header): Rename to...
1571 (dtrace_static_probe_ops::gen_info_probes_table_header):
1572 ...this. Adjust code to reflect change.
1573 (dtrace_gen_info_probes_table_values): Rename to...
1574 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
1575 code to reflect change.
1576 (dtrace_enable_probe): Rename to...
1577 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
1578 change.
1579 (dtrace_disable_probe): Rename to...
1580 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
1581 change.
1582 (struct probe_ops dtrace_probe_ops): Delete.
1583 (info_probes_dtrace_command): Call 'info_probes_for_spops'
1584 instead of 'info_probes_for_ops'.
1585 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
1586 of 'all_probe_ops'.
1587
1588 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1589 Simon Marchi <simark@simark.ca>
1590
1591 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
1592 variable.
1593 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
1594 <aexpr>: Change type to 'expression_up'.
1595 (stap_probe_arg_s): Delete type and VEC.
1596 (struct stap_probe): Delete. Replace by...
1597 (class stap_static_probe_ops): ...this and...
1598 (class stap_probe): ...this. Rename variables to add 'm_'
1599 prefix. Do not use 'union' for arguments anymore.
1600 (stap_get_expected_argument_type): Receive probe name instead
1601 of 'struct stap_probe'. Adjust code.
1602 (stap_parse_probe_arguments): Rename to...
1603 (stap_probe::parse_arguments): ...this. Adjust code to
1604 reflect change.
1605 (stap_get_probe_address): Rename to...
1606 (stap_probe::get_relocated_address): ...this. Adjust code
1607 to reflect change.
1608 (stap_get_probe_argument_count): Rename to...
1609 (stap_probe::get_argument_count): ...this. Adjust code
1610 to reflect change.
1611 (stap_get_arg): Rename to...
1612 (stap_probe::get_arg_by_number'): ...this. Adjust code to
1613 reflect change.
1614 (can_evaluate_probe_arguments): Rename to...
1615 (stap_probe::can_evaluate_arguments): ...this. Adjust code
1616 to reflect change.
1617 (stap_evaluate_probe_argument): Rename to...
1618 (stap_probe::evaluate_argument): ...this. Adjust code
1619 to reflect change.
1620 (stap_compile_to_ax): Rename to...
1621 (stap_probe::compile_to_ax): ...this. Adjust code to
1622 reflect change.
1623 (stap_probe_destroy): Delete.
1624 (stap_modify_semaphore): Adjust comment.
1625 (stap_set_semaphore): Rename to...
1626 (stap_probe::set_semaphore): ...this. Adjust code to reflect
1627 change.
1628 (stap_clear_semaphore): Rename to...
1629 (stap_probe::clear_semaphore): ...this. Adjust code to
1630 reflect change.
1631 (stap_probe::get_static_ops): New method.
1632 (handle_stap_probe): Adjust code to create instance of
1633 'stap_probe'.
1634 (stap_get_probes): Rename to...
1635 (stap_static_probe_ops::get_probes): ...this. Adjust code to
1636 reflect change.
1637 (stap_probe_is_linespec): Rename to...
1638 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
1639 reflect change.
1640 (stap_type_name): Rename to...
1641 (stap_static_probe_ops::type_name): ...this. Adjust code to
1642 reflect change.
1643 (stap_gen_info_probes_table_header): Rename to...
1644 (stap_static_probe_ops::gen_info_probes_table_header):
1645 ...this. Adjust code to reflect change.
1646 (stap_gen_info_probes_table_values): Rename to...
1647 (stap_probe::gen_info_probes_table_values): ...this. Adjust
1648 code to reflect change.
1649 (struct probe_ops stap_probe_ops): Delete.
1650 (info_probes_stap_command): Use 'info_probes_for_spops'
1651 instead of 'info_probes_for_ops'.
1652 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
1653 of 'all_probe_ops'.
1654
1655 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1656
1657 * break-catch-throw.c (fetch_probe_arguments): Use
1658 'probe.prob' instead of 'probe.probe'.
1659 * breakpoint.c (create_longjmp_master_breakpoint): Call
1660 'can_evaluate_arguments' and 'get_relocated_address' methods
1661 from probe.
1662 (create_exception_master_breakpoint): Likewise.
1663 (add_location_to_breakpoint): Use 'sal->prob' instead of
1664 'sal->probe'.
1665 (bkpt_probe_insert_location): Call 'set_semaphore' method from
1666 probe.
1667 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
1668 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
1669 of 'probe_ops'.
1670 (probe_key_free): Call 'delete' on probe.
1671 (check_exception_resume): Use 'probe.prob' instead of
1672 'probe.probe'.
1673 * location.c (string_to_event_location_basic): Call
1674 'probe_linespec_to_static_ops'.
1675 * probe.c (class any_static_probe_ops): New class.
1676 (any_static_probe_ops any_static_probe_ops): New variable.
1677 (parse_probes_in_pspace): Receive 'static_probe_ops' as
1678 argument. Adjust code to reflect change.
1679 (parse_probes): Use 'static_probe_ops' instead of
1680 'probe_ops'. Adjust code to reflect change.
1681 (find_probes_in_objfile): Call methods to get name and
1682 provider from probe.
1683 (find_probe_by_pc): Use 'result.prob' instead of
1684 'result.probe'. Call 'get_relocated_address' method from
1685 probe.
1686 (collect_probes): Adjust comment and argument list to receive
1687 'static_probe_ops' instead of 'probe_ops'. Adjust code to
1688 reflect change. Call necessary methods from probe.
1689 (compare_probes): Call methods to get name and provider from
1690 probes.
1691 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
1692 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
1693 adjust code accordingly.
1694 (print_ui_out_not_applicables): Likewise.
1695 (info_probes_for_ops): Rename to...
1696 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
1697 as argument instead of 'probe_ops'. Adjust code. Call
1698 necessary methods from probe.
1699 (info_probes_command): Use 'info_probes_for_spops'.
1700 (enable_probes_command): Pass correct argument to
1701 'collect_probes'. Call methods from probe.
1702 (disable_probes_command): Likewise.
1703 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
1704 (get_probe_argument_count): Move to
1705 'any_static_probe_ops::get_argument_count'.
1706 (can_evaluate_probe_arguments): Move to
1707 'any_static_probe_ops::can_evaluate_arguments'.
1708 (evaluate_probe_argument): Move to
1709 'any_static_probe_ops::evaluate_argument'.
1710 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
1711 'probe.probe'.
1712 (probe_linespec_to_ops): Rename to...
1713 (probe_linespec_to_static_ops): ...this. Adjust code.
1714 (probe_any_is_linespec): Rename to...
1715 (any_static_probe_ops::is_linespec): ...this.
1716 (probe_any_get_probes): Rename to...
1717 (any_static_probe_ops::get_probes): ...this.
1718 (any_static_probe_ops::type_name): New method.
1719 (any_static_probe_ops::gen_info_probes_table_header): New
1720 method.
1721 (compute_probe_arg): Use 'pc_probe.prob' instead of
1722 'pc_probe.probe'. Call methods from probe.
1723 (compile_probe_arg): Likewise.
1724 (std::vector<const probe_ops *> all_probe_ops): Delete.
1725 (std::vector<const static_probe_ops *> all_static_probe_ops):
1726 New variable.
1727 (_initialize_probe): Use 'all_static_probe_ops' instead of
1728 'all_probe_ops'.
1729 * probe.h (struct info_probe_column) <field_name>: Delete
1730 extraneous newline
1731 (info_probe_column_s): Delete type and VEC.
1732 (struct probe_ops): Delete. Replace with...
1733 (class static_probe_ops): ...this and...
1734 (clas probe): ...this.
1735 (struct bound_probe) <bound_probe>: Delete extraneous
1736 newline. Adjust constructor to receive 'probe' instead of
1737 'struct probe'.
1738 <probe>: Rename to...
1739 <prob>: ...this. Delete extraneous newline.
1740 <objfile>: Delete extraneous newline.
1741 (register_probe_ops): Delete unused prototype.
1742 (info_probes_for_ops): Rename to...
1743 (info_probes_for_spops): ...this. Adjust comment.
1744 (get_probe_address): Move to 'probe::get_address'.
1745 (get_probe_argument_count): Move to
1746 'probe::get_argument_count'.
1747 (can_evaluate_probe_arguments): Move to
1748 'probe::can_evaluate_arguments'.
1749 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
1750 * solib-svr4.c (struct svr4_info): Adjust comment.
1751 (struct probe_and_action) <probe>: Rename to...
1752 <prob>: ...this.
1753 (register_solib_event_probe): Receive 'probe' instead of
1754 'struct probe' as argument. Use 'prob' instead of 'probe'
1755 when applicable.
1756 (solib_event_probe_action): Call 'get_argument_count' method
1757 from probe. Adjust comment.
1758 (svr4_handle_solib_event): Adjust comment. Call
1759 'evaluate_argument' method from probe.
1760 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
1761 from probe.
1762 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
1763 'struct probe'. Call 'can_evaluate_arguments' from probe.
1764 * symfile.h: Forward declare 'class probe' instead of 'struct
1765 probe'.
1766 * symtab.h: Likewise.
1767 (struct symtab_and_line) <probe>: Rename to...
1768 <prob>: ...this.
1769 * tracepoint.c (start_tracing): Use 'prob' when applicable.
1770 Call probe methods.
1771 (stop_tracing): Likewise.
1772
1773 2017-11-22 Joel Brobecker <brobecker@adacore.com>
1774
1775 * ravenscar-thread.c (ravenscar_inferior_created): Remove
1776 trailing newline at end of string in call to warning.
1777
1778 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1779
1780 * osdata.h: Include vector isntead of vec.h.
1781 (osdata_column_s): Remove typedef.
1782 (struct osdata_column): Add constructor.
1783 <name, value>: Change type to std::string.
1784 (DEF_VEC_O (osdata_column_s)): Remove.
1785 (osdata_item_s): Remove typedef.
1786 (struct osdata_item) <columns>: Change type to std::vector.
1787 (DEF_VEC_O (osdata_item_s)): Remove.
1788 (struct osdata): Add constructor.
1789 <type>: Change type to std::string.
1790 <items>: Change type to std::vector.
1791 (osdata_p): Remove typedef.
1792 (DEF_VEC_P (osdata_p)): Remove.
1793 (osdata_parse): Return a unique_ptr.
1794 (osdata_free): Remove.
1795 (make_cleanup_osdata_free): Remove.
1796 (get_osdata): Return a unique_ptr.
1797 (get_osdata_column): Return pointer to std::string, take a
1798 reference to osdata_item as parameter.
1799 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
1800 unique_ptr.
1801 <property_name>: Change type to std::string.
1802 (osdata_start_osdata): Allocate osdata with new and adjust.
1803 (osdata_start_item): Adjust.
1804 (osdata_start_column): Adjust.
1805 (osdata_end_column): Adjust.
1806 (clear_parsing_data): Remove.
1807 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
1808 (osdata_item_clear): Remove.
1809 (get_osdata): return a unique_ptr and adjust.
1810 (get_osdata_column): Return a pointer to std::string and adjust.
1811 (info_osdata): Adjust.
1812 * mi/mi-main.c: Include <map>.
1813 (free_vector_of_osdata_items): Remove.
1814 (list_available_thread_groups): Adjust, use std::map instead of
1815 splay tree.
1816
1817 2017-11-22 Simon Marchi <simon.marchi@ericsson.com>
1818
1819 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
1820 case in switch.
1821
1822 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1823
1824 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
1825
1826 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1827
1828 * varobj.h (struct varobj_update_result): Add constructor, add
1829 move constructor, disable copy and assign, initialize fields.
1830 <newobj>: Change type to std::vector.
1831 (varobj_update): Return std::vector.
1832 * varobj.c (install_dynamic_child): Change VEC parameters to
1833 std::vector and adjust.
1834 (update_dynamic_varobj_children): Likewise.
1835 (varobj_update): Return std::vector and adjust.
1836 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
1837
1838 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1839
1840 * varobj.h (struct varobj) <parent>: Remove const.
1841 <children>: Change type to std::vector.
1842 (varobj_list_children): Return std::vector const reference.
1843 (varobj_restrict_range): Change parameter type to std::vector
1844 const reference.
1845 * varobj.c (varobj_has_more): Adjust.
1846 (varobj_restrict_range): Change parameter type to std::vector
1847 const reference and adjust.
1848 (install_dynamic_child): Adjust.
1849 (update_dynamic_varobj_children): Adjust.
1850 (varobj_list_children): Return std::vector const reference and
1851 adjust.
1852 (varobj_add_child): Adjust.
1853 (update_type_if_necessary): Adjust.
1854 (varobj_update): Adjust.
1855 (delete_variable_1): Adjust.
1856 * ada-varobj.c (ada_value_has_mutated): Adjust.
1857 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
1858
1859 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1860
1861 * varobj.h (struct varobj): Add constructor and destructor,
1862 initialize fields.
1863 * varobj.c (struct varobj_root): Initialize fields.
1864 (struct varobj_dynamic): Initialize fields.
1865 (varobj_create): Use unique_ptr instead of cleanup. Create
1866 varobj with new instead of new_root_variable.
1867 (delete_variable_1): Free variable with delete instead of
1868 free_variable.
1869 (create_child_with_value): Create variable with new instead of
1870 new_variable.
1871 (varobj::varobj): New.
1872 (varobj::~varobj): New (body mostly coming from free_variable).
1873 (new_variable): Remove.
1874 (free_variable): Remove.
1875 (do_free_variable_cleanup): Remove.
1876 (make_cleanup_free_variable): Remove.
1877
1878 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1879
1880 * core-regset.c: Remove file.
1881 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
1882
1883 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1884
1885 * NEWS: Document use of GNU MPFR.
1886 * README: Likewise.
1887
1888 * Makefile.in (LIBMPFR): Add define.
1889 (CLIBS): Add $(LIBMPFR).
1890 * configure.ac: Add --with-mpfr configure option.
1891 * configure: Regenerate.
1892 * config.in: Regenerate.
1893
1894 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
1895 (class mpfr_float_ops): New type.
1896 (mpfr_float_ops::from_target): Two new overloaded functions.
1897 (mpfr_float_ops::to_target): Likewise.
1898 (mpfr_float_ops::to_string): New function.
1899 (mpfr_float_ops::from_string): Likewise.
1900 (mpfr_float_ops::to_longest): Likewise.
1901 (mpfr_float_ops::from_longest): Likewise.
1902 (mpfr_float_ops::from_ulongest): Likewise.
1903 (mpfr_float_ops::to_host_double): Likewise.
1904 (mpfr_float_ops::from_host_double): Likewise.
1905 (mpfr_float_ops::convert): Likewise.
1906 (mpfr_float_ops::binop): Likewise.
1907 (mpfr_float_ops::compare): Likewise.
1908 (get_target_float_ops): Use mpfr_float_ops if available.
1909
1910 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1911
1912 * target-float.c: Do not include <math.h>.
1913 Include <cmath> and <limits>.
1914 (DOUBLEST): Do not define.
1915 (class target_float_ops): New type.
1916 (class host_float_ops): New templated type.
1917 (class decimal_float_ops): New type.
1918
1919 (floatformat_to_doublest): Rename to ...
1920 (host_float_ops<T>::from_target): ... this. Use template type T
1921 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1922 (host_float_ops<T>::from_target): New overload using a type argument.
1923 (floatformat_from_doublest): Rename to ...
1924 (host_float_ops<T>::to_target): ... this. Use template type T
1925 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1926 (host_float_ops<T>::to_target): New overload using a type argument.
1927 (floatformat_printf_format): New function.
1928 (struct printf_length_modifier): New templated type.
1929 (floatformat_to_string): Rename to ...
1930 (host_float_ops<T>::to_string): ... this. Use type instead of
1931 floatformat argument. Use floatformat_printf_format and
1932 printf_length_modifier. Remove special handling of invalid numbers,
1933 infinities and NaN (moved to target_float_to_string).
1934 (struct scanf_length_modifier): New templated type.
1935 (floatformat_from_string): Rename to ...
1936 (host_float_ops<T>::from_string): ... this. Use type instead of
1937 floatformat argument. Use scanf_length_modifier.
1938 (floatformat_to_longest): Rename to ...
1939 (host_float_ops<T>::to_longest): ... this. Use type instead of
1940 floatformat argument. Handle out-of-range values deterministically.
1941 (floatformat_from_longest): Rename to ...
1942 (host_float_ops<T>::from_longest): ... this. Use type instead of
1943 floatformat argument.
1944 (floatformat_from_ulongest): Rename to ...
1945 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
1946 floatformat argument.
1947 (floatformat_to_host_double): Rename to ...
1948 (host_float_ops<T>::to_host_double): ... this. Use type instead of
1949 floatformat argument.
1950 (floatformat_from_host_double): Rename to ...
1951 (host_float_ops<T>::from_host_double): ... this. Use type instead of
1952 floatformat argument.
1953 (floatformat_convert): Rename to ...
1954 (host_float_ops<T>::convert): ... this. Use type instead of
1955 floatformat arguments. Remove handling of no-op conversions.
1956 (floatformat_binop): Rename to ...
1957 (host_float_ops<T>::binop): ... this. Use type instead of
1958 floatformat arguments.
1959 (floatformat_compare): Rename to ...
1960 (host_float_ops<T>::compare): ... this. Use type instead of
1961 floatformat arguments.
1962
1963 (match_endianness): Use type instead of length/byte_order arguments.
1964 (set_decnumber_context): Likewise.
1965 (decimal_from_number): Likewise. Update calls.
1966 (decimal_to_number): Likewise.
1967 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
1968 (decimal_float_ops::to_host_double): New dummy function.
1969 (decimal_float_ops::from_host_double): Likewise.
1970 (decimal_to_string): Rename to ...
1971 (decimal_float_ops::to_string): ... this. Use type instead of
1972 length/byte_order arguments. Update calls.
1973 (decimal_from_string): Rename to ...
1974 (decimal_float_ops::from_string): ... this. Use type instead of
1975 length/byte_order arguments. Update calls.
1976 (decimal_from_longest): Rename to ...
1977 (decimal_float_ops::from_longest): ... this. Use type instead of
1978 length/byte_order arguments. Update calls.
1979 (decimal_from_ulongest): Rename to ...
1980 (decimal_float_ops::from_ulongest): ... this. Use type instead of
1981 length/byte_order arguments. Update calls.
1982 (decimal_to_longest): Rename to ...
1983 (decimal_float_ops::to_longest): ... this. Use type instead of
1984 length/byte_order arguments. Update calls.
1985 (decimal_binop): Rename to ...
1986 (decimal_float_ops::binop): ... this. Use type instead of
1987 length/byte_order arguments. Update calls.
1988 (decimal_compare): Rename to ...
1989 (decimal_float_ops::compare): ... this. Use type instead of
1990 length/byte_order arguments. Update calls.
1991 (decimal_convert): Rename to ...
1992 (decimal_float_ops::convert): ... this. Use type instead of
1993 length/byte_order arguments. Update calls.
1994
1995 (target_float_same_category_p): New function.
1996 (target_float_same_format_p): Likewise.
1997 (target_float_format_length): Likewise.
1998 (enum target_float_ops_kind): New type.
1999 (get_target_float_ops_kind): New function.
2000 (get_target_float_ops): Three new overloaded functions.
2001
2002 (target_float_is_zero): Update call.
2003 (target_float_to_string): Add special handling of invalid numbers,
2004 infinities and NaN (moved from floatformat_to_string). Use
2005 target_float_ops callback.
2006 (target_float_from_string): Use target_float_ops callback.
2007 (target_float_to_longest): Likewise.
2008 (target_float_from_longest): Likewise.
2009 (target_float_from_ulongest): Likewise.
2010 (target_float_to_host_double): Likewise.
2011 (target_float_from_host_double): Likewise.
2012 (target_float_convert): Add special case for no-op conversions.
2013 Use target_float_ops callback.
2014 (target_float_binop): Use target_float_ops callback.
2015 (target_float_compare): Likewise.
2016
2017 2017-11-22 Yao Qi <yao.qi@linaro.org>
2018
2019 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
2020
2021 2017-11-22 Yao Qi <yao.qi@linaro.org>
2022
2023 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
2024 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
2025
2026 2017-11-21 Jerome Guitton <guitton@adacore.com>
2027
2028 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
2029 with event ptid from the lower layer before doing the
2030 ravenscar-specific update.
2031
2032 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2033
2034 * ravenscar-thread.c (is_ravenscar_task): Also verify that
2035 the ptid's TID is nonzero.
2036
2037 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2038
2039 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
2040 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
2041 Make non-static. Change return type to char *. Adjust code
2042 accordingly. Rewrite the function's documentation.
2043 (read_atcb): Adjust call to get_tcb_types_info accordingly.
2044 * ravenscar-thread.c (ravenscar_inferior_created): Check that
2045 we have enough debugging information in the runtime to support
2046 Ada task debugging before we enable the ravenscar-thread layer.
2047
2048 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2049
2050 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
2051 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
2052 * ravenscar-thread.c: Add into comment.
2053 (base_magic_null_ptid): Delete.
2054 (base_ptid): Change documentation.
2055 (ravenscar_active_task): Renames ravenscar_running_thread.
2056 All callers updated throughout.
2057 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
2058 (ravenscar_task_is_currently_active): Likewise.
2059 (get_base_thread_from_ravenscar_task): Ditto.
2060 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
2061 (ravenscar_runtime_initialized): Likewise.
2062 (get_running_thread_id): Add new parameter "cpu". Adjust
2063 implementation to handle this new parameter.
2064 (ravenscar_fetch_registers): Small adjustment to use
2065 is_ravenscar_task and ravenscar_task_is_currently_active in
2066 order to decide whether to use the target beneath or this
2067 module's arch_ops.
2068 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
2069 (ravenscar_stopped_by_sw_breakpoint): Use
2070 get_base_thread_from_ravenscar_task to get the underlying
2071 thread, rather than using base_ptid.
2072 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
2073 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
2074 Likewise.
2075 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
2076
2077 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2078
2079 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
2080 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
2081 (get_tcb_types_info): Set fieldnos.base_cpu.
2082 (read_atcb): Set task_info->base_cpu.
2083 (info_task): Print "Base CPU" info if set by runtime.
2084
2085 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2086
2087 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
2088 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
2089 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
2090 New functions.
2091 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
2092 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
2093 to_stopped_data_address and to_core_of_thread fields of
2094 ravenscar_ops.
2095
2096 2017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
2097
2098 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
2099 (struct gdbarch_tdep): New member long_double_abi.
2100 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
2101 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
2102 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
2103 format depending on long_double_abi tdep member.
2104 (ppc_floatformat_for_type): Handle __ibm128 type.
2105
2106 2017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
2107
2108 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
2109
2110 2017-11-21 Pedro Alves <palves@redhat.com>
2111
2112 * dwarf2read.c (mapped_index::find_name_components_bounds)
2113 <completion mode, upper bound>: Use std::lower_bound instead of
2114 std::upper_bound.
2115 (test_mapped_index_find_name_component_bounds): Remove incorrect
2116 "t1_fund" from expected symbols.
2117
2118 2017-11-21 Pedro Alves <palves@redhat.com>
2119
2120 * dwarf2read.c (mapped_index::name_components_casing): New field.
2121 (mapped_index) <build_name_components,
2122 find_name_components_bounds): Declare new methods.
2123 (mapped_index::find_name_components_bounds)
2124 (mapped_index::build_name_components): New methods, factored out
2125 from dw2_expand_symtabs_matching_symbol.
2126 (check_find_bounds_finds)
2127 (test_mapped_index_find_name_component_bounds): New.
2128 (run_test): Rename to ...
2129 (test_dw2_expand_symtabs_matching_symbol): ... this.
2130 (run_test): Reimplement.
2131
2132 2017-11-21 Pedro Alves <palves@redhat.com>
2133
2134 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
2135 (symbol_end): Use cp_ident_is_alnum.
2136 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
2137 * dwarf2read.c (make_sort_after_prefix_name): New function.
2138 (dw2_expand_symtabs_matching_symbol): Use it.
2139 (test_symbols): Add more symbols.
2140 (run_test): Add tests.
2141
2142 2017-11-17 Tom Tromey <tom@tromey.com>
2143
2144 * symtab.h (enum symbol_subclass_kind): New.
2145 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
2146 Remove.
2147 <subclass>: New member.
2148 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
2149 * rust-lang.c (rust_get_trait_object_pointer): Update.
2150 * dwarf2read.c (read_func_scope): Update.
2151 (read_variable): Update.
2152
2153 2017-11-17 Tom Tromey <tom@tromey.com>
2154
2155 * dwarf2read.c (read_func_scope): Update.
2156 * symtab.h (struct template_symbol): Derive from symbol.
2157 <base>: Remove.
2158
2159 2017-11-17 Tom Tromey <tom@tromey.com>
2160
2161 * symtab.h (struct symbol) <is_rust_vtable>: New member.
2162 (struct rust_vtable_symbol): New.
2163 (find_symbol_at_address): Declare.
2164 * symtab.c (find_symbol_at_address): New function.
2165 * symfile.h (struct quick_symbol_functions)
2166 <find_compunit_symtab_by_address>: New member.
2167 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
2168 function.
2169 (debug_sym_quick_functions): Link to
2170 debug_qf_find_compunit_symtab_by_address.
2171 * rust-lang.c (rust_get_trait_object_pointer): New function.
2172 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
2173 rust_get_trait_object_pointer.
2174 * psymtab.c (psym_relocate): Clear psymbol_map.
2175 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
2176 functions.
2177 (psym_functions): Link to psym_find_compunit_symtab_by_address.
2178 * objfiles.h (struct objfile) <psymbol_map>: New member.
2179 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
2180 (process_die) <DW_TAG_variable>: New case. Call read_variable.
2181 (rust_containing_type, read_variable): New functions.
2182
2183 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2184
2185 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
2186
2187 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2188
2189 * common/filestuff.c: Include <algorithm>.
2190 (open_fds): Change type to std::vector<int>.
2191 (do_mark_open_fd): Adjust.
2192 (unmark_fd_no_cloexec): Adjust.
2193 (do_close): Adjust.
2194
2195 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2196
2197 * breakpoint.c (output_thread_groups): Take an std::vector.
2198 (print_one_breakpoint_location): Adjust.
2199
2200 2017-11-17 Joel Brobecker <brobecker@adacore.com>
2201
2202 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
2203 (ada_evaluate_subexp_for_cast): New function.
2204 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
2205 ada_evaluate_subexp_for_cast.
2206 (ada_evaluate_subexp) <nosideret>: Replace code by call to
2207 eval_skip_value.
2208 * eval.c (evaluate_var_value): Make non-static.
2209 (evaluate_var_msym_value, eval_skip_value): Likewise.
2210 * value.h (evaluate_var_value, evaluate_var_msym_value)
2211 (eval_skip_value): Declare.
2212
2213 2017-11-16 Joel Brobecker <brobecker@adacore.com>
2214
2215 * ada-lang.c (ada_value_cast): Remove parameter "noside".
2216 Update all callers.
2217
2218 2017-11-16 Pedro Alves <palves@redhat.com>
2219
2220 * python/py-unwind.c (pyuw_sniffer): Translate
2221 PyExc_KeyboardInterrupt to a GDB Quit exception.
2222
2223 2017-11-16 Pedro Alves <palves@redhat.com>
2224
2225 * infrun.c (resume_cleanups): Delete.
2226 (resume): No longer install a resume_cleanups cleanup nor call
2227 QUIT.
2228 (proceed): Pass the terminal to the inferior.
2229 (keep_going_pass_signal): No longer install a resume_cleanups
2230 cleanup.
2231
2232 2017-11-16 Pedro Alves <palves@redhat.com>
2233
2234 * inf-loop.c (inferior_event_handler): Don't swallow the exception
2235 if the prompt is blocked.
2236
2237 2017-11-16 Pedro Alves <palves@redhat.com>
2238
2239 * breakpoint.c (insert_bp_location): Replace bp_err and
2240 bp_err_message locals by a gdb_exception local.
2241
2242 2017-11-16 Pedro Alves <palves@redhat.com>
2243
2244 * inflow.c (scoped_ignore_sigttou): New class.
2245 (child_terminal_ours_1, new_tty): Use it.
2246
2247 2017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
2248
2249 * target-float.c (decimal_from_number): Add byte_order argument and
2250 call match_endianness. Error if unknown floating-point type.
2251 (decimal_to_number): Add byte_order argument and call match_endianness.
2252 (decimal_from_longest): Update call. Do not call match_endianness.
2253 (decimal_from_ulongest): Likewise.
2254 (decimal_binop): Likewise.
2255 (decimal_is_zero): Likewise.
2256 (decimal_compare): Likewise.
2257 (decimal_convert): Likewise.
2258
2259 2017-11-16 Phil Muldoon <pmuldoon@redhat.com>
2260
2261 * python/python.c (gdbpy_rbreak): New function.
2262 * NEWS: Document Python rbreak feature.
2263
2264 2017-11-16 Yao Qi <yao.qi@linaro.org>
2265
2266 * features/tic6x-c62x.xml: Remove.
2267 * features/tic6x-c64x.xml: Remove.
2268 * features/tic6x-c64xp.xml: Remove.
2269
2270 2017-11-15 John Baldwin <jhb@FreeBSD.org>
2271
2272 * symtab.h: Include <array>.
2273
2274 2017-11-15 John Baldwin <jhb@FreeBSD.org>
2275
2276 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
2277 (bsd_kvm_proc_cmd): Likewise.
2278
2279 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
2280
2281 * tui/tui-win.c (window_name_completer): Replace VEC with
2282 std::vector.
2283
2284 2017-11-15 Andrew Cagney <cagney@gnu.org>
2285
2286 * MAINTAINERS: Remove no-longer applicable entries.
2287
2288 2017-11-15 Andrew Cagney <cagney@gnu.org>
2289
2290 * MAINTAINERS: Move self to Past Maintainers.
2291
2292 2017-11-15 Yao Qi <yao.qi@linaro.org>
2293
2294 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
2295 * features/nios2-linux.c: Remove.
2296 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
2297 initialize_tdesc_nios2_linux.
2298
2299 2017-11-15 Yao Qi <yao.qi@linaro.org>
2300
2301 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
2302 M68HC11_LAST_HARD_REG + 1.
2303
2304 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
2305
2306 PR gdb/22388
2307 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
2308 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
2309 Return TARGET_XFER_EOF if size of returned data is 0.
2310
2311 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
2312
2313 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2314 memory-map-selftests.c.
2315 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
2316 * memory-map.c (memory_map_start_memory): Fix computation of hi
2317 address.
2318 * unittests/memory-map-selftests.c: New file.
2319
2320 2017-11-09 Joel Brobecker <brobecker@adacore.com>
2321
2322 * ada-lang.c: Fix some typos in the general command documenting
2323 how Ada expressions are being evaluated and how their result
2324 is printed.
2325
2326 2017-11-09 Tom Tromey <tom@tromey.com>
2327
2328 * psymtab.c (psymbol_hash): Do not hash string contents.
2329 (psymbol_compare): Add comment.
2330
2331 2017-11-09 Tom Tromey <tom@tromey.com>
2332
2333 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
2334
2335 2017-11-08 Joel Brobecker <brobecker@adacore.com>
2336
2337 * ada-exp.y (write_var_from_sym): Remove parameter
2338 "orig_left_context". Update all callers.
2339
2340 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
2341
2342 * tracepoint.h (class collection_list) <stringify>: Return
2343 std::vector<std::string>.
2344 (encode_actions_rsp): Change parameters to
2345 std::vector<std::string> *.
2346 * tracepoint.c (collection_list::stringify): Return
2347 std::vector<std::string> and adjust accordingly.
2348 (encode_actions_rsp): Changee parameters to
2349 std::vector<std::string> and adjust accordingly.
2350 * remote.c (free_actions_list),
2351 free_actions_list_cleanup_wrapper): Remove.
2352 (remote_download_tracepoint): Adjust to std::vector.
2353
2354 2017-11-08 Tom Tromey <tom@tromey.com>
2355
2356 * dwarf2read.c (symbolp): Remove typedef.
2357 (read_func_scope): Use std::vector.
2358 (process_structure_scope): Use std::vector.
2359
2360 2017-11-08 Pedro Alves <palves@redhat.com>
2361
2362 * ada-lang.c (ada_make_symbol_completion_list): Use
2363 completion_skip_symbol.
2364 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
2365 (symbol_is_function_or_method(symbol*)): New.
2366 (add_symtab_completions): Add complete_symbol_mode parameter. Use
2367 completion_skip_symbol.
2368 (default_collect_symbol_completion_matches_break_on): Use
2369 completion_skip_symbol. Pass down mode.
2370 (collect_file_symbol_completion_matches): Pass down mode.
2371 * symtab.h (symbol_is_function_or_method): New declarations.
2372 (completion_skip_symbol): New template function.
2373
2374 2017-11-08 Pedro Alves <palves@redhat.com>
2375
2376 * linespec.c (iterate_over_all_matching_symtabs): Add
2377 search_domain parameter. Pass it down to expand_symtabs_matching.
2378 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
2379 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
2380 search_domain.
2381 (add_all_symbol_names_from_pspace): Add search_domain parameter.
2382 Pass it down.
2383 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
2384 symbols.
2385 (add_matching_symbols_to_info): Add search_domain parameter. Pass
2386 it down.
2387
2388 2017-11-08 Pedro Alves <palves@redhat.com>
2389
2390 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
2391 text_len locals and don't pass them down.
2392 * symtab.c (completion_list_add_name): Remove
2393 sym_text/sym_text_len parameters and adjust.
2394 (completion_list_add_symbol, completion_list_add_msymbol)
2395 (completion_list_objc_symbol, completion_list_add_fields)
2396 (add_symtab_completions): Likewise.
2397 (default_collect_symbol_completion_matches_break_on)
2398 (collect_file_symbol_completion_matches): Remove sym_text_len
2399 local and don't pass it down.
2400 * symtab.h (completion_list_add_name): Remove
2401 sym_text/sym_text_len parameters.
2402
2403 2017-11-08 Pedro Alves <palves@redhat.com>
2404
2405 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2406 unittests/lookup_name_info-selftests.c.
2407 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
2408 * cp-support.c: Include "selftest.h".
2409 (cp_remove_params_1): Rename from cp_remove_params. Add
2410 'require_param' parameter, and handle it.
2411 (cp_remove_params): Reimplement.
2412 (cp_remove_params_if_any): New.
2413 (selftests::quote): New.
2414 (selftests::check_remove_params): New.
2415 (selftests::test_cp_remove_params): New.
2416 (_initialize_cp_support): Install
2417 selftests::test_cp_remove_params.
2418 * cp-support.h (cp_remove_params_if_any): Declare.
2419 * dwarf2read.c :Include "selftest.h".
2420 (dw2_expand_symtabs_matching_symbol): Use
2421 lookup_name_info::make_ignore_params.
2422 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
2423 (selftests::dw2_expand_symtabs_matching::string_or_null)
2424 (selftests::dw2_expand_symtabs_matching::check_match)
2425 (selftests::dw2_expand_symtabs_matching::test_symbols)
2426 (selftests::dw2_expand_symtabs_matching::run_test): New.
2427 (_initialize_dwarf2_read): Register
2428 selftests::dw2_expand_symtabs_matching::run_test.
2429 * psymtab.c (psym_expand_symtabs_matching): Use
2430 lookup_name_info::make_ignore_params.
2431 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
2432 If the lookup name wants to ignore parameters, strip them.
2433 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
2434 code handling '('.
2435 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
2436 (default_collect_symbol_completion_matches_break_on): Don't try to
2437 strip parameters.
2438 * symtab.h (lookup_name_info::lookup_name_info): Add
2439 'ignore_parameters' parameter.
2440 (lookup_name_info::ignore_parameters)
2441 (lookup_name_info::make_ignore_params): New methods.
2442 (lookup_name_info::m_ignore_parameters): New field.
2443 * unittests/lookup_name_info-selftests.c: New file.
2444
2445 2017-11-08 Pedro Alves <palves@redhat.com>
2446
2447 * dwarf2read.c (dw2_expand_marked_cus)
2448 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
2449 (dw2_expand_symtabs_matching): Move further below.
2450 (dw2_expand_marked_cus): Reindent.
2451
2452 2017-11-08 Pedro Alves <palves@redhat.com>
2453
2454 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
2455 (struct name_component): New.
2456 (mapped_index::name_components): New field.
2457 (mapped_index::symbol_name_at): New method.
2458 (dwarf2_read_index): Call mapped_index ctor.
2459 (dw2_map_matching_symbols): Add comment about name_components
2460 table.
2461 (dw2_expand_symtabs_matching): Factor part to...
2462 (dw2_expand_symtabs_matching_symbol): ... this new function.
2463 Build name components table, and lookup symbols in it before
2464 calling the name matcher.
2465 (dw2_expand_marked_cus): New, factored out from
2466 dw2_expand_symtabs_matching.
2467 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
2468
2469 2017-11-08 Pedro Alves <palves@redhat.com>
2470
2471 * ada-lang.c (ada_encode): Rename to ..
2472 (ada_encode_1): ... this. Add throw_errors parameter and handle
2473 it.
2474 (ada_encode): Reimplement.
2475 (match_name): Delete, folded into full_name.
2476 (resolve_subexp): No longer pass the encoded name to
2477 ada_lookup_symbol_list.
2478 (should_use_wild_match): Delete.
2479 (name_match_type_from_name): New.
2480 (ada_lookup_simple_minsym): Use lookup_name_info and the
2481 language's symbol_name_matcher_ftype.
2482 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
2483 (ada_add_block_renamings): Adjust to use lookup_name_info.
2484 (ada_lookup_name): New.
2485 (add_nonlocal_symbols, ada_add_all_symbols)
2486 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
2487 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
2488 (ada_name_for_lookup): Delete.
2489 (ada_lookup_encoded_symbol): Construct a verbatim name.
2490 (wild_match): Reverse sense of return type. Use bool.
2491 (full_match): Reverse sense of return type. Inline bits of old
2492 match_name here.
2493 (ada_add_block_symbols): Adjust to use lookup_name_info.
2494 (symbol_completion_match): Delete, folded into...
2495 (ada_lookup_name_info::matches): ... .this new method.
2496 (symbol_completion_add): Delete.
2497 (ada_collect_symbol_completion_matches): Add name_match_type
2498 parameter. Adjust to use lookup_name_info and
2499 completion_list_add_name.
2500 (get_var_value, ada_add_global_exceptions): Adjust to use
2501 lookup_name_info.
2502 (ada_get_symbol_name_cmp): Delete.
2503 (do_wild_match, do_full_match): New functions.
2504 (ada_lookup_name_info::ada_lookup_name_info): New method.
2505 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
2506 functions.
2507 (ada_language_defn): Install ada_get_symbol_name_matcher.
2508 * ada-lex.l (processId): If name starts with '<', copy it
2509 verbatim.
2510 * block.c (block_iter_match_step, block_iter_match_first)
2511 (block_iter_match_next, block_lookup_symbol)
2512 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
2513 lookup_name_info.
2514 * block.h (block_iter_match_first, block_iter_match_next)
2515 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
2516 * c-lang.c (c_language_defn, cplus_language_defn)
2517 (asm_language_defn, minimal_language_defn): Adjust comments to
2518 refer to la_get_symbol_name_matcher.
2519 * completer.c (complete_files_symbols)
2520 (collect_explicit_location_matches, symbol_completer): Pass a
2521 symbol_name_match_type down.
2522 * completer.h (class completion_match, completion_match_result):
2523 New classes.
2524 (completion_tracker::reset_completion_match_result): New method.
2525 (completion_tracker::m_completion_match_result): New field.
2526 * cp-support.c (make_symbol_overload_list_block): Adjust to use
2527 lookup_name_info.
2528 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
2529 functions.
2530 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
2531 * d-lang.c: Adjust comments to refer to
2532 la_get_symbol_name_matcher.
2533 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
2534 Adjust to use lookup_name_info.
2535 (dict_iter_match_first, dict_iter_match_next)
2536 (iter_match_first_hashed, iter_match_next_hashed)
2537 (iter_match_first_linear, iter_match_next_linear): Adjust to work
2538 with a lookup_name_info.
2539 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
2540 Likewise.
2541 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
2542 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
2543 (gdb_index_symbol_name_matcher): New class.
2544 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
2545 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
2546 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
2547 with a symbol_name_match_type.
2548 (f_language_defn): Adjust comments to refer to
2549 la_get_symbol_name_matcher.
2550 * go-lang.c (go_language_defn): Adjust comments to refer to
2551 la_get_symbol_name_matcher.
2552 * language.c (default_symbol_name_matcher)
2553 (language_get_symbol_name_matcher): New functions.
2554 (unknown_language_defn, auto_language_defn): Adjust comments to
2555 refer to la_get_symbol_name_matcher.
2556 * language.h (symbol_name_cmp_ftype): Delete.
2557 (language_defn) <la_collect_symbol_completion_matches>: Add match
2558 type parameter.
2559 <la_get_symbol_name_cmp>: Delete field.
2560 <la_get_symbol_name_matcher>: New field.
2561 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
2562 (default_symbol_name_matcher, language_get_symbol_name_matcher):
2563 Declare.
2564 * linespec.c (iterate_over_all_matching_symtabs)
2565 (iterate_over_file_blocks): Adjust to use lookup_name_info.
2566 (find_methods): Add language parameter, and use lookup_name_info
2567 and the language's symbol_name_matcher_ftype.
2568 (linespec_complete_function): Adjust.
2569 (lookup_prefix_sym): Use lookup_name_info.
2570 (add_all_symbol_names_from_pspace): Adjust.
2571 (find_superclass_methods): Add language parameter and pass it
2572 down.
2573 (find_method): Pass symbol language down.
2574 (find_linespec_symbols): Don't demangle or Ada encode here.
2575 (search_minsyms_for_name): Add lookup_name_info parameter.
2576 (add_matching_symbols_to_info): Add name_match_type parameter.
2577 Use lookup_name_info.
2578 * m2-lang.c (m2_language_defn): Adjust comments to refer to
2579 la_get_symbol_name_matcher.
2580 * minsyms.c: Include <algorithm>.
2581 (add_minsym_to_demangled_hash_table): Remove table parameter and
2582 add objfile parameter. Use search_name_hash, and add language to
2583 demangled languages vector.
2584 (struct found_minimal_symbols): New struct.
2585 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
2586 New functions.
2587 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
2588 input names here. Use lookup_name_info instead. Lookup up
2589 demangled names once for each language in the demangled names
2590 vector.
2591 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
2592 demangled names once for each language in the demangled names
2593 vector.
2594 (build_minimal_symbol_hash_tables): Adjust.
2595 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
2596 lookup_name_info.
2597 * objc-lang.c (objc_language_defn): Adjust comment to refer to
2598 la_get_symbol_name_matcher.
2599 * objfiles.h: Include <vector>.
2600 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
2601 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
2602 la_get_symbol_name_matcher.
2603 * p-lang.c (pascal_language_defn): Adjust comment to refer to
2604 la_get_symbol_name_matcher.
2605 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
2606 (match_partial_symbol): Use symbol_name_match_type,
2607 lookup_name_info and psymbol_name_matches.
2608 (lookup_partial_symbol): Use lookup_name_info.
2609 (map_block): Use symbol_name_match_type and lookup_name_info.
2610 (psym_map_matching_symbols): Use symbol_name_match_type.
2611 (psymbol_name_matches): New.
2612 (recursively_search_psymtabs): Use lookup_name_info and
2613 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
2614 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
2615 'kind' parameter to 'domain'.
2616 * rust-lang.c (rust_language_defn): Adjust comment to refer to
2617 la_get_symbol_name_matcher.
2618 * symfile-debug.c (debug_qf_map_matching_symbols)
2619 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
2620 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
2621 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
2622 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
2623 Adjust to use symbol_name_match_type.
2624 <expand_symtabs_matching>: Adjust to use lookup_name_info.
2625 (expand_symtabs_matching): Adjust to use lookup_name_info.
2626 * symmisc.c (maintenance_expand_symtabs): Use
2627 lookup_name_info::match_any ().
2628 * symtab.c (symbol_matches_search_name): New.
2629 (eq_symbol_entry): Adjust to use lookup_name_info and the
2630 language's matcher.
2631 (demangle_for_lookup_info::demangle_for_lookup_info): New.
2632 (lookup_name_info::match_any): New.
2633 (iterate_over_symbols, search_symbols): Use lookup_name_info.
2634 (compare_symbol_name): Add language, lookup_name_info and
2635 completion_match_result parameters, and use them.
2636 (completion_list_add_name): Make extern. Add language and
2637 lookup_name_info parameters. Use them.
2638 (completion_list_add_symbol, completion_list_add_msymbol)
2639 (completion_list_objc_symbol): Add lookup_name_info parameters and
2640 adjust. Pass down language.
2641 (completion_list_add_fields): Add lookup_name_info parameters and
2642 adjust. Pass down language.
2643 (add_symtab_completions): Add lookup_name_info parameters and
2644 adjust.
2645 (default_collect_symbol_completion_matches_break_on): Add
2646 name_match_type parameter, and use it. Use lookup_name_info.
2647 (default_collect_symbol_completion_matches)
2648 (collect_symbol_completion_matches): Add name_match_type
2649 parameter, and pass it down.
2650 (collect_symbol_completion_matches_type): Adjust.
2651 (collect_file_symbol_completion_matches): Add name_match_type
2652 parameter, and use lookup_name_info.
2653 * symtab.h: Include <string> and "common/gdb_optional.h".
2654 (enum class symbol_name_match_type): New.
2655 (class ada_lookup_name_info): New.
2656 (struct demangle_for_lookup_info): New.
2657 (class lookup_name_info): New.
2658 (symbol_name_matcher_ftype): New.
2659 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
2660 (symbol_matches_search_name): Declare.
2661 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
2662 (default_collect_symbol_completion_matches)
2663 (collect_symbol_completion_matches)
2664 (collect_file_symbol_completion_matches): Add name_match_type
2665 parameter.
2666 (iterate_over_symbols): Use lookup_name_info.
2667 (completion_list_add_name): Declare.
2668 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
2669 (strncmp_iw_with_mode): Now extern.
2670 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
2671 (strncmp_iw_with_mode): Declare.
2672
2673 2017-11-08 Keith Seitz <keiths@redhat.com>
2674 Pedro Alves <palves@redhat.com>
2675
2676 * ada-lang.c (ada_language_defn): Install
2677 default_search_name_hash.
2678 * buildsym.c (struct buildsym_compunit): <language>: New field.
2679 (finish_block_internal): Pass language when creating dictionaries.
2680 (start_buildsym_compunit, start_symtab): New language parameters.
2681 Use them.
2682 (restart_symtab): Pass down compilation unit's language.
2683 * buildsym.h (enum language): Forward declare.
2684 (start_symtab): New 'language' parameter.
2685 * c-lang.c (c_language_defn, cplus_language_defn)
2686 (asm_language_defn, minimal_language_defn): Install
2687 default_search_name_hash.
2688 * coffread.c (coff_start_symtab): Adjust.
2689 * d-lang.c (d_language_defn): Install default_search_name_hash.
2690 * dbxread.c (struct symloc): Add 'pst_language' field.
2691 (PST_LANGUAGE): Define.
2692 (start_psymtab, read_ofile_symtab): Use it.
2693 (process_one_symbol): New 'language' parameter. Pass it down.
2694 * dictionary.c (struct dictionary) <language>: New field.
2695 (DICT_LANGUAGE): Define.
2696 (dict_create_hashed, dict_create_hashed_expandable)
2697 (dict_create_linear, dict_create_linear_expandable): New parameter
2698 'language'. Set the dictionary's language.
2699 (iter_match_first_hashed): Adjust to rename.
2700 (insert_symbol_hashed): Assert we don't see mismatching
2701 languages. Adjust to rename.
2702 (dict_hash): Rename to ...
2703 (default_search_name_hash): ... this and make extern.
2704 * dictionary.h (struct language_defn): Forward declare.
2705 (dict_create_hashed): New parameter 'language'.
2706 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
2707 * f-lang.c (f_language_defn): Install default_search_name_hash.
2708 * go-lang.c (go_language_defn): Install default_search_name_hash.
2709 * jit.c (finalize_symtab): Pass compunit's language to dictionary
2710 creation.
2711 * language.c (unknown_language_defn, auto_language_defn):
2712 * language.h (language_defn::la_search_name_hash): New field.
2713 (default_search_name_hash): Declare.
2714 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
2715 * mdebugread.c (new_block): New parameter 'language'.
2716 * mdebugread.c (parse_symbol): Pass symbol language to block
2717 allocation.
2718 (psymtab_to_symtab_1): Pass down language.
2719 (new_symtab): Pass compunit's language to block allocation.
2720 * objc-lang.c (objc_language_defn): Install
2721 default_search_name_hash.
2722 * opencl-lang.c (opencl_language_defn):
2723 * p-lang.c (pascal_language_defn): Install
2724 default_search_name_hash.
2725 * rust-lang.c (rust_language_defn): Install
2726 default_search_name_hash.
2727 * stabsread.h (enum language): Forward declare.
2728 (process_one_symbol): Add 'language' parameter.
2729 * symtab.c (search_name_hash): New function.
2730 * symtab.h (search_name_hash): Declare.
2731 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
2732
2733 2017-11-08 Pedro Alves <palves@redhat.com>
2734
2735 * cp-name-parser.y (main): Don't initialize extra_chars.
2736
2737 2017-11-07 Tom Tromey <tom@tromey.com>
2738
2739 * event-top.h (command_handler): Constify.
2740 * record-full.c (cmd_record_full_start): Update.
2741 * thread.c (thread_apply_all_command): Update.
2742 * printcmd.c (eval_command): Update.
2743 * mi/mi-main.c (mi_execute_cli_command): Update.
2744 (mi_execute_async_cli_command): Update.
2745 * tui/tui-stack.c (tui_update_command): Update.
2746 * cli/cli-interp.c (safe_execute_command): Constify.
2747 * record.c (record_start): Update.
2748 (record_start, record_stop, cmd_record_start): Update.
2749 * record-btrace.c (cmd_record_btrace_bts_start): Update.
2750 (cmd_record_btrace_pt_start): Update.
2751 (cmd_record_btrace_start): Update.
2752 (cmd_record_btrace_start): Update.
2753 * reverse.c (exec_reverse_once): Update.
2754 * python/python.c (execute_gdb_command): Don't copy the command.
2755 * event-top.c (command_line_handler): Update.
2756 (command_handler): Constify.
2757 * defs.h (deprecated_call_command_hook): Constify.
2758 * cli/cli-script.h (execute_user_command): Constify.
2759 * cli/cli-script.c (execute_user_command): Constify.
2760 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
2761 (enum command_control_type): Update.
2762 * main.c (catch_command_errors): Remove non-const overload.
2763 (catch_command_errors_ftype): Remove.
2764 * python/py-cmd.c (cmdpy_function): Constify.
2765 * guile/scm-cmd.c (cmdscm_function): Constify.
2766 * cli/cli-dump.c (call_dump_func): Constify.
2767 * cli/cli-decode.c (do_const_cfunc): Constify.
2768 (do_sfunc): Constify.
2769 (cmd_func): Constify.
2770 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
2771 * top.h (execute_command): Constify.
2772 * top.c (execute_command): Constify.
2773 (execute_command_to_string): Constify.
2774 (deprecated_call_command_hook): Constify.
2775 * command.h (cmd_func): Constify.
2776 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
2777
2778 2017-11-07 Tom Tromey <tom@tromey.com>
2779
2780 * ada-lang.c (catch_ada_exception_command): Constify.
2781 (catch_assert_command): Constify.
2782 * break-catch-throw.c (catch_catch_command, catch_throw_command)
2783 (catch_rethrow_command): Constify.
2784 (catch_exception_command_1): Constify.
2785 * breakpoint.h (add_catch_command): Constify.
2786 * break-catch-syscall.c (catch_syscall_command_1): Constify.
2787 (catch_syscall_split_args): Constify.
2788 * break-catch-sig.c (catch_signal_command): Constify.
2789 (catch_signal_split_args): Constify.
2790 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
2791 cmd_const_sfunc_ftype.
2792 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
2793 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2794 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2795 (add_setshow_string_cmd, struct cmd_list_element)
2796 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2797 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2798 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
2799 Constify.
2800 (set_cmd_sfunc): Constify.
2801 (empty_sfunc): Constify.
2802 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2803 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2804 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
2805 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2806 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2807 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
2808 Constify.
2809 (set_cmd_sfunc): Constify.
2810 (cmd_sfunc_ftype): Remove.
2811 * compile/compile.c (set_compile_args): Constify.
2812 * infrun.c (set_disable_randomization): Constify.
2813 * infcmd.c (set_args_command, set_cwd_command): Constify.
2814 * breakpoint.c (set_condition_evaluation_mode): Constify.
2815 (add_catch_command): Constify.
2816 (catch_fork_command_1, catch_exec_command_1)
2817 (catch_load_command_1, catch_unload_command_1): Constify.
2818 (catch_load_or_unload): Constify.
2819 * guile/scm-param.c (pascm_set_func): Constify.
2820 (add_setshow_generic): Constify.
2821 * python/py-param.c (get_set_value): Constify.
2822 * top.h (set_verbose): Constify.
2823 * tui/tui-win.c (tui_set_var_cmd): Constify.
2824 * mi/mi-main.c (set_mi_async_command): Constify.
2825 * cli/cli-logging.c (set_logging_overwrite)
2826 (set_logging_redirect): Constify.
2827 * value.c (set_max_value_size): Constify.
2828 * valprint.c (set_input_radix, set_output_radix): Constify.
2829 * utils.c (set_width_command, set_height_command): Constify.
2830 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
2831 * tracepoint.c (set_disconnected_tracing)
2832 (set_circular_trace_buffer, set_trace_buffer_size)
2833 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
2834 * top.c (set_history_size_command, set_verbose, set_editing)
2835 (set_gdb_datadir, set_history_filename): Constify.
2836 * target.c (set_targetdebug, maint_set_target_async_command)
2837 (maint_set_target_non_stop_command, set_target_permissions)
2838 (set_write_memory_permission): Constify.
2839 (open_target): Constify.
2840 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
2841 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
2842 * symtab.c (set_symbol_cache_size_handler): Constify.
2843 * symfile.c (set_ext_lang_command): Constify.
2844 * symfile-debug.c (set_debug_symfile): Constify.
2845 * source.c (set_directories_command): Constify.
2846 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
2847 * serial.c (set_parity): Constify.
2848 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
2849 * remote.c (set_remote_exec_file, set_remotebreak)
2850 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
2851 * record.c (set_record_insn_history_size)
2852 (set_record_call_history_size): Constify.
2853 * record-full.c (set_record_full_insn_max_num): Constify.
2854 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
2855 * osabi.c (set_osabi): Constify.
2856 * mips-tdep.c (set_mips64_transfers_32bit_regs)
2857 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
2858 * maint.c (maintenance_set_profile_cmd): Constify.
2859 * linux-thread-db.c (set_libthread_db_search_path): Constify.
2860 * language.c (set_language_command, set_range_command)
2861 (set_case_command): Constify.
2862 * infrun.c (set_non_stop, set_observer_mode)
2863 (set_stop_on_solib_events, set_schedlock_func)
2864 (set_exec_direction_func): Constify.
2865 * infcmd.c (set_inferior_tty_command): Constify.
2866 * disasm.c (set_disassembler_options_sfunc): Constify.
2867 * demangle.c (set_demangling_command): Constify.
2868 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
2869 * cris-tdep.c (set_cris_version, set_cris_mode)
2870 (set_cris_dwarf2_cfi): Constify.
2871 * corefile.c (set_gnutarget_command): Constify.
2872 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
2873 (set_target_wide_charset_sfunc): Constify.
2874 * breakpoint.c (update_dprintf_commands): Constify.
2875 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
2876 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
2877 (set_disassembly_style_sfunc): Constify.
2878 * arch-utils.c (set_endian, set_architecture): Constify.
2879 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
2880 * agent.c (set_can_use_agent): Constify.
2881
2882 2017-11-07 Tom Tromey <tom@tromey.com>
2883
2884 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
2885 (go32_pde, go32_pte, go32_pte_for_address): Constify.
2886 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
2887 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
2888 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
2889 (parse_int_arg, show_thread_default_detach_sc_cmd)
2890 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
2891 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
2892 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
2893 (show_task_pause_cmd, set_task_detach_sc_cmd)
2894 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
2895 (set_noninvasive_cmd, set_thread_pause_cmd)
2896 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
2897 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
2898 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
2899 * windows-nat.c (display_selectors): Constify.
2900 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
2901 non-const "cfunc".
2902 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
2903 (cmd_cfunc_eq): Likewise.
2904 (struct cmd_list_element): Likewise.
2905 (do_cfunc): Remove.
2906 (cli_user_command_p): Update.
2907 * command.h (add_cmd): Remove non-const overload.
2908 (cmd_cfunc_ftype): Remove typedef.
2909 (cmd_cfunc_eq): Remove non-const overload.
2910 * value.c (show_values): Constify.
2911 * thread.c (thread_apply_all_command): Constify.
2912 * symfile.c (load_command): Constify.
2913 * source.c (directory_command): Constify.
2914 * maint.c (maintenance_internal_error)
2915 (maintenance_demangler_warning, maintenance_space_display)
2916 (maintenance_print_architecture, maintenance_translate_address)
2917 (maintenance_info_selftests, maintenance_internal_warning):
2918 Constify.
2919 * breakpoint.c (disable_trace_command, enable_trace_command):
2920 Constify.
2921 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
2922 Constify.
2923 (add_auto_load_safe_path): Constify.
2924 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
2925 * top.h (show_commands): Constify.
2926 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
2927 * sparc64-tdep.c (adi_examine_command): Constify.
2928 (adi_assign_command): Constify.
2929
2930 2017-11-07 Tom Tromey <tom@tromey.com>
2931
2932 * frame.h (info_locals_command, info_args_command): Constify.
2933 * auto-load.h (auto_load_info_scripts): Constify.
2934 * inferior.h (registers_info): Constify.
2935 * copying.c: Rebuild.
2936 * copying.awk: Constify generated commands.
2937 * auto-load.c (auto_load_info_scripts)
2938 (info_auto_load_gdb_scripts): Constify.
2939 * cli/cli-decode.c (struct cmd_list_element): Take a
2940 cmd_const_cfunc_ftype.
2941 * command.h (add_info): Take a cmd_const_cfunc_ftype.
2942 * tui/tui-win.c (tui_all_windows_info): Constify.
2943 * python/py-auto-load.c (info_auto_load_python_scripts):
2944 Constify.
2945 * cli/cli-cmds.c (show_command): Remove non-const overload.
2946 * tracepoint.c (info_tvariables_command, info_scope_command):
2947 Constify.
2948 (info_static_tracepoint_markers_command): Constify.
2949 * thread.c (info_threads_command): Constify.
2950 (print_thread_info_1): Constify.
2951 * target.c (info_target_command): Constify.
2952 * symtab.c (info_sources_command, info_functions_command)
2953 (info_types_command): Constify.
2954 (info_variables_command): Remove non-const overload.
2955 * symfile.c (info_ext_lang_command): Constify.
2956 * stack.c (info_frame_command, info_locals_command)
2957 (info_args_command): Constify.
2958 (backtrace_command): Remove non-const overload.
2959 * source.c (info_source_command, info_line_command): Constify.
2960 * solib.c (info_sharedlibrary_command): Constify.
2961 * skip.c (info_skip_command): Constify.
2962 * ser-go32.c (info_serial_command): Constify.
2963 * reverse.c (info_bookmarks_command): Constify.
2964 * printcmd.c (info_symbol_command, info_address_command)
2965 (info_display_command): Constify.
2966 * osdata.c (info_osdata_command): Constify.
2967 * objc-lang.c (info_selectors_command, info_classes_command):
2968 Constify.
2969 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
2970 * memattr.c (info_mem_command): Constify.
2971 * macrocmd.c (info_macro_command, info_macros_command): Constify.
2972 * linux-fork.c (info_checkpoints_command): Constify.
2973 * infrun.c (info_signals_command): Constify.
2974 * inflow.c (info_terminal_command): Constify.
2975 * inferior.c (info_inferiors_command): Constify.
2976 (print_inferior): Constify.
2977 * infcmd.c (info_program_command, info_all_registers_command)
2978 (info_registers_command, info_vector_command)
2979 (info_float_command): Constify.
2980 (registers_info): Constify.
2981 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
2982 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
2983 Constify.
2984 * f-valprint.c (info_common_command): Constify.
2985 * dcache.c (info_dcache_command): Constify.
2986 (dcache_info_1): Constify.
2987 * darwin-nat-info.c (info_mach_tasks_command)
2988 (info_mach_task_command, info_mach_ports_command)
2989 (info_mach_port_command, info_mach_threads_command)
2990 (info_mach_thread_command, info_mach_regions_command)
2991 (info_mach_regions_recurse_command, info_mach_region_command)
2992 (info_mach_exceptions_command): Constify.
2993 (get_task_from_args): Constify.
2994 * cp-support.c (info_vtbl_command): Constify.
2995 * breakpoint.c (info_watchpoints_command)
2996 (info_tracepoints_command): Constify.
2997 (info_breakpoints_command): Remove non-const overload.
2998 * avr-tdep.c (avr_io_reg_read_command): Constify.
2999 * auxv.c (info_auxv_command): Constify.
3000 * ada-tasks.c (info_tasks_command): Constify.
3001 (info_task): Constify.
3002 * ada-lang.c (info_exceptions_command): Constify.
3003
3004 2017-11-07 Tom Tromey <tom@tromey.com>
3005
3006 * solib.h (no_shared_libraries): Constify.
3007 * frame.h (return_command): Constify.
3008 * cli/cli-cmds.h (quit_command): Constify.
3009 * top.h (quit_command, execute_command): Constify.
3010 * target.h (flash_erase_command): Constify.
3011 * inferior.h (set_inferior_args, attach_command): Constify.
3012 * tracepoint.h (start_tracing, stop_tracing): Constify.
3013 * breakpoint.h (break_command, tbreak_command)
3014 (hbreak_command_wrapper, thbreak_command_wrapper)
3015 (rbreak_command_wrapper, watch_command_wrapper)
3016 (awatch_command_wrapper, rwatch_command_wrapper)
3017 (get_tracepoint_by_number): Constify.
3018 * symtab.c (info_variables_command, rbreak_command)
3019 (symtab_symbol_info): Constify.
3020 (info_variables_command): Add non-const overload.
3021 * top.c (dont_repeat_command): Constify.
3022 * breakpoint.c (ignore_command, commands_command)
3023 (condition_command, tbreak_command, hbreak_command)
3024 (thbreak_command, clear_command, break_command)
3025 (info_breakpoints_command, watch_command, rwatch_command)
3026 (awatch_command, trace_command, ftrace_command, strace_command)
3027 (trace_pass_command, break_range_command, dprintf_command)
3028 (agent_printf_command, get_tracepoint_by_number)
3029 (watch_maybe_just_location, trace_pass_command): Constify.
3030 (info_breakpoints_command): Add non-const overload.
3031 * tracefile.c (tsave_command): Constify.
3032 * infcmd.c (attach_command, disconnect_command, signal_command)
3033 (queue_signal_command, stepi_command, nexti_command)
3034 (finish_command, next_command, step_command, until_command)
3035 (advance_command, jump_command, continue_command, run_command)
3036 (start_command, starti_command, interrupt_command)
3037 (run_command_1, set_inferior_args, step_1): Constify.
3038 * inferior.c (add_inferior_command, remove_inferior_command)
3039 (clone_inferior_command): Constify.
3040 * linux-fork.c (checkpoint_command, restart_command): Constify.
3041 * windows-nat.c (signal_event_command): Constify.
3042 * guile/guile.c (guile_repl_command, guile_command): Constify.
3043 * printcmd.c (x_command, display_command, printf_command)
3044 (output_command, set_command, call_command, print_command)
3045 (eval_command): Constify.
3046 (non_const_set_command): Remove.
3047 (_initialize_printcmd): Update.
3048 * source.c (forward_search_command, reverse_search_command):
3049 Constify.
3050 * jit.c (jit_reader_load_command, jit_reader_unload_command):
3051 Constify.
3052 * infrun.c (handle_command): Constify.
3053 * memattr.c (mem_command): Constify.
3054 * stack.c (return_command, up_command, up_silently_command)
3055 (down_command, down_silently_command, frame_command)
3056 (backtrace_command, func_command, backtrace_command_1): Constify.
3057 (backtrace_command): Add non-const overload.
3058 * remote-sim.c (simulator_command): Constify.
3059 * exec.c (set_section_command): Constify.
3060 * tracepoint.c (tdump_command, trace_variable_command)
3061 (tstatus_command, tstop_command, tstart_command)
3062 (end_actions_pseudocommand, while_stepping_pseudocommand)
3063 (collect_pseudocommand, teval_pseudocommand, actions_command)
3064 (start_tracing, stop_tracing): Constify.
3065 * value.c (init_if_undefined_command): Constify.
3066 * tui/tui-stack.c (tui_update_command): Constify.
3067 * tui/tui-win.c (tui_refresh_all_command)
3068 (tui_set_tab_width_command, tui_set_win_height_command)
3069 (tui_set_focus_command, tui_scroll_forward_command)
3070 (tui_scroll_backward_command, tui_scroll_left_command)
3071 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
3072 (tui_set_win_height): Constify.
3073 * tui/tui-layout.c (tui_layout_command): Constify.
3074 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
3075 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
3076 (proc_untrace_sysexit_cmd): Constify.
3077 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
3078 (threadset_test_cmd, threadlist_update_test_cmd)
3079 (threadalive_test): Constify.
3080 * objc-lang.c (print_object_command): Constify.
3081 * command.h (add_com): Constify.
3082 * cli/cli-dump.c (restore_command): Constify.
3083 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
3084 (help_command, complete_command, shell_command, edit_command)
3085 (list_command, disassemble_command, make_command)
3086 (apropos_command, alias_command): Constify.
3087 * cli/cli-script.c (document_command, define_command)
3088 (while_command, if_command, validate_comname): Constify.
3089 * cli/cli-decode.c (struct cmd_list_element): Change type of
3090 "fun".
3091 * target.c (do_monitor_command, flash_erase_command): Constify.
3092 * regcache.c (reg_flush_command): Constify.
3093 * reverse.c (reverse_step, reverse_next, reverse_stepi)
3094 (reverse_nexti, reverse_continue, reverse_finish)
3095 (save_bookmark_command, goto_bookmark_command)
3096 (exec_reverse_once): Constify.
3097 * python/python.c (python_interactive_command, python_command):
3098 Constify.
3099 * typeprint.c (ptype_command, whatis_command, whatis_exp):
3100 Constify.
3101 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
3102 * gcore.c (gcore_command): Constify.
3103
3104 2017-11-07 Tom Tromey <tom@tromey.com>
3105
3106 * printcmd.c (x_command): Call set_repeat_arguments.
3107 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
3108 * top.c (repeat_arguments): New global.
3109 (set_repeat_arguments): New function.
3110 (execute_command): Handle repeat_arguments.
3111 (show_commands): Calls set_repeat_arguments.
3112 * command.h (set_repeat_arguments): Declare.
3113
3114 2017-11-07 Tom Tromey <tom@tromey.com>
3115
3116 * stack.c (backtrace_command): Use std::string.
3117 (backtrace_command_1): Make "count_exp" const.
3118
3119 2017-11-07 Tom Tromey <tom@tromey.com>
3120
3121 * source.c (directory_switch, mod_path, add_path): Constify.
3122 * defs.h (add_path, mod_path, directory_switch): Constify.
3123 * mi/mi-cmd-env.c (env_mod_path): Constify.
3124
3125 2017-11-07 Tom Tromey <tom@tromey.com>
3126
3127 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
3128 (run_command_1, continue_command, step_1, jump_command)
3129 (signal_command, until_command, advance_command, finish_command)
3130 (attach_command): Update.
3131
3132 2017-11-07 Tom Tromey <tom@tromey.com>
3133
3134 * command.h (set_cmd_cfunc): Don't declare.
3135 * cli/cli-decode.c (set_cmd_cfunc): Now static.
3136
3137 2017-11-07 Tom Tromey <tom@tromey.com>
3138
3139 * stack.c (select_frame_command): Constify.
3140 * cli/cli-decode.c (add_com_suppress_notification): Constify.
3141 * command.h (add_com_suppress_notification): Constify.
3142
3143 2017-11-07 Tom Tromey <tom@tromey.com>
3144
3145 * breakpoint.c (stop_command): Constify.
3146 * cli/cli-decode.c (struct cmd_list_element): Constify.
3147 * command.h (add_abbrev_prefix_cmd): Constify.
3148
3149 2017-11-07 Pedro Alves <palves@redhat.com>
3150
3151 * breakpoint.c (extract_bp_kind): New enum.
3152 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
3153 factored out from ...
3154 (extract_bp_number_and_location): ... here.
3155 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
3156
3157 2017-11-07 Pedro Alves <palves@redhat.com>
3158
3159 * breakpoint.c (extract_bp_number_and_location): Change return
3160 type to void. Throw error instead of warning.
3161 (enable_disable_command): Adjust.
3162
3163 2017-11-07 Xavier Roirand <roirand@adacore.com>
3164 Pedro Alves <palves@redhat.com>
3165
3166 * breakpoint.c (map_breakpoint_number_range): New, factored out
3167 from ...
3168 (map_breakpoint_numbers): ... here.
3169 (find_location_by_number): Change parameters from string to
3170 breakpoint number and location.
3171 (extract_bp_number_and_location): New function.
3172 (enable_disable_bp_num_loc)
3173 (enable_disable_breakpoint_location_range)
3174 (enable_disable_command): New functions, factored out ...
3175 (enable_command, disable_command): ... these functions, and
3176 adjusted to support ranges.
3177 * NEWS: Document enable/disable breakpoint location range feature.
3178
3179 2017-11-06 Luis Machado <luis.machado@linaro.org>
3180
3181 * MAINTAINERS (Write After Approval): Update my e-mail address.
3182
3183 2017-11-06 Pedro Alves <palves@redhat.com>
3184
3185 * gnu-nat.c (gnu_terminal_init): Delete.
3186 (gnu_target): Don't install gnu_terminal_init.
3187 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
3188 (child_terminal_init): ... this function.
3189
3190 2017-11-06 Pedro Alves <palves@redhat.com>
3191
3192 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
3193 sgtty.h.
3194 * config.in, configure: Regenerate.
3195
3196 2017-11-06 Pedro Alves <palves@redhat.com>
3197
3198 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
3199 (async_init_signals): Adjust.
3200 (handle_stop_sig): Rename to ...
3201 (handle_sigtstp): ... this.
3202 (async_stop_sig): Rename to ...
3203 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
3204 SIGTSTP path.
3205 * event-top.h: Move signal.h include to the top. Check SIGTSTP
3206 instead of STOP_SIGNAL thoughout.
3207 (handle_stop_sig): Rename to ...
3208 (handle_sigtstp): ... this.
3209 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
3210
3211 2017-11-06 Pedro Alves <palves@redhat.com>
3212
3213 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
3214 longer set flags twice in row.
3215
3216 2017-11-06 Pedro Alves <palves@redhat.com>
3217
3218 * Makefile.in (SER_HARDWIRE): Update comment.
3219 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
3220 * common/gdb_termios.h: Delete file.
3221 * common/job-control.c: Include termios.h and unistd.h instead of
3222 gdb_termios.h.
3223 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
3224 check.
3225 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
3226 Remove sgtty code.
3227 * configure.ac: No longer check for termio.h and sgtty.h.
3228 * configure: Regenerate.
3229 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
3230 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
3231 Replace PROCESS_GROUP_TYPE references with pid_t references
3232 throughout.
3233 (gdb_getpgrp): Delete.
3234 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
3235 (child_terminal_inferior): Remove comment. Remove sgtty code.
3236 (child_terminal_ours_1): Use tcgetpgrp directly instead of
3237 gdb_getpgrp. Use serial_set_tty_state instead aof
3238 serial_noflush_set_tty_state. Remove sgtty code.
3239 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
3240 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
3241 (inferior_process_group): Now returns pid_t.
3242 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
3243 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
3244 * ser-event.c (serial_event_ops): Update.
3245 * ser-go32.c (dos_noflush_set_tty_state): Delete.
3246 (dos_ops): Update.
3247 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
3248 * ser-pipe.c (pipe_ops): Update.
3249 * ser-tcp.c (tcp_ops): Update.
3250 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
3251 HAVE_TERMIOS checks.
3252 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
3253 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
3254 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
3255 assume termios.
3256 (hardwire_noflush_set_tty_state): Delete.
3257 (hardwire_print_tty_state, hardwire_drain_output)
3258 (hardwire_flush_output, hardwire_flush_input)
3259 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
3260 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
3261 code, and assume termios.
3262 (hardwire_ops): Update.
3263 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
3264 * serial.c (serial_noflush_set_tty_state): Delete.
3265 * serial.h (serial_noflush_set_tty_state): Delete.
3266 (serial_ops::noflush_set_tty_state): Delete.
3267
3268 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3269
3270 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
3271 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
3272 (COMMON_OBS): Remove doublest.o and dfp.o.
3273 Do not build target-float.c (instead of doublest.c)
3274 with -Wformat-nonliteral.
3275
3276 * doublest.c: Remove file.
3277 * doublest.h: Remove file.
3278 * dfp.c: Remove file.
3279 * dfp.h: Remove file.
3280
3281 * target-float.c: Do not include "doublest.h" and "dfp.h".
3282 (DOUBLEST): Move here from doublest.h.
3283 (enum float_kind): Likewise.
3284 (FLOATFORMAT_CHAR_BIT): Likewise.
3285 (FLOATFORMAT_LARGEST_BYTES): Likewise.
3286 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
3287 (floatformat_precision): Likewise.
3288 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
3289 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
3290 Likewise.
3291 (host_float_format, host_double_format, host_long_double_format):
3292 Likewise.
3293 (floatformat_to_string, floatformat_from_string): Likewise.
3294 (floatformat_to_doublest): Likewise. Also, inline the original
3295 convert_floatformat_to_doublest.
3296 (floatformat_from_doublest): Likewise. Also, inline the original
3297 convert_floatformat_from_doublest.
3298
3299 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
3300 (MAX_DECIMAL_STRING): Move here from dfp.c.
3301 (match_endianness): Likewise.
3302 (set_decnumber_context, decimal_check_errors): Likewise.
3303 (decimal_from_number, decimal_to_number): Likewise.
3304 (decimal_to_string, decimal_from_string): Likewise. Make static.
3305 (decimal_from_longest, decimal_from_ulongest): Likewise.
3306 (decimal_to_longest): Likewise.
3307 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
3308 (decimal_convert): Likewise.
3309
3310 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3311
3312 * doublest.c: Do not include "gdbtypes.h".
3313 (extract_typed_floating): Remove.
3314 (store_typed_floating): Remove.
3315 (convert_typed_floating): Remove.
3316 * doublest.h (struct type): Remove.
3317 (DOUBLEST_PRINT_FORMAT): Remove.
3318 (DOUBLEST_SCAN_FORMAT): Remove.
3319 (extract_typed_floating): Remove.
3320 (store_typed_floating): Remove.
3321 (convert_typed_floating): Remove.
3322
3323 * dfp.c (decimal_from_doublest): Remove.
3324 (decimal_to_doublest): Remove.
3325 * dfp.h: Do not include "doublest.h".
3326 (decimal_from_doublest): Remove.
3327 (decimal_to_doublest): Remove.
3328
3329 * value.c: Do not include "doublest.h" and "dfp.h".
3330 (value_as_double): Remove.
3331 (unpack_double): Remove.
3332 (value_from_double): Remove.
3333 (value_from_decfloat): Remove.
3334 * value.h: Do not include "doublest.h".
3335 (value_as_double): Remove.
3336 (unpack_double): Remove.
3337 (value_from_double): Remove.
3338 (value_from_decfloat): Remove.
3339
3340 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3341
3342 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
3343 (i386_extract_return_value): Use target_float_convert.
3344 (i386_store_return_value): Likewise.
3345 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
3346 (i387_value_to_register): Likewise.
3347 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
3348 (ia64_register_to_value): Use target_float_convert.
3349 (ia64_value_to_register): Likewise.
3350 (ia64_extract_return_value): Likewise.
3351 (ia64_store_return_value): Likewise.
3352 (ia64_push_dummy_call): Likewise.
3353 * m68k-tdep.c: Include "target-float.h".
3354 (m68k_register_to_value): Use target_float_convert.
3355 (m68k_value_to_register): Likewise.
3356 (m68k_svr4_extract_return_value): Likewise.
3357 (m68k_svr4_store_return_value): Likewise.
3358 * ppc-sysv-tdep.c: Include "target-float.h".
3359 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
3360 (do_ppc_sysv_return_value): Likewise.
3361 (ppc64_sysv_abi_push_freg): Likewise.
3362 (ppc64_sysv_abi_return_value_base): Likewise.
3363 * rs6000-aix-tdep.c: Include "target-float.h".
3364 (rs6000_push_dummy_call): Use target_float_convert.
3365 (rs6000_return_value): Likewise.
3366 * rs6000-lynx178-tdep.c: Include "target-float.h".
3367 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
3368 (rs6000_lynx178_return_value): Likewise.
3369 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
3370 (rs6000_register_to_value): Use target_float_convert.
3371 (rs6000_value_to_register): Likewise.
3372 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
3373 (arm_extract_return_value): Use target_float_convert.
3374 (arm_store_return_value): Likewise.
3375 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
3376 (sh_register_convert_to_virtual): Use target_float_convert.
3377 (sh_register_convert_to_raw): Likewise.
3378 * sh64-tdep.c: Include "target-float.h".
3379 (sh64_extract_return_value): Use target_float_convert.
3380 (sh64_register_convert_to_virtual): Likewise.
3381 (sh64_register_convert_to_raw): Likewise. Fix argument types.
3382
3383 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3384
3385 * target-float.c (floatformat_to_host_double): New function.
3386 (floatformat_from_host_double): Likewise.
3387 (target_float_to_host_double): Likewise.
3388 (target_float_from_host_double): Likewise.
3389 * target-float.h (target_float_to_host_double): Add prototype.
3390 (target_float_from_host_double): Likewise.
3391
3392 * guile/scm-value.c: Include "target-float.h".
3393 (gdbscm_value_to_real): Use target_float_to_host_double.
3394 Handle integer source values via value_as_long.
3395 * guile/scm-math.c: Include "target-float.h". Do not include
3396 "doublest.h", "dfp.h", and "expression.h".
3397 (vlscm_convert_typed_number): Use target_float_from_host_double.
3398 (vlscm_convert_number): Likewise.
3399
3400 * python/py-value.c (valpy_float): Use target_float_to_host_double.
3401 (convert_value_from_python): Use target_float_from_host_double.
3402
3403 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3404
3405 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
3406 (cast_from_fixed): Likewise.
3407 (ada_scaling_type): New function.
3408 (ada_delta): Return value instead of DOUBLEST. Perform target
3409 arithmetic instead of host arithmetic.
3410 (scaling_factor): Rename to ...
3411 (ada_scaling_factor) ... this. Make non-static. Return value instead
3412 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
3413 (ada_fixed_to_float): Remove.
3414 (ada_float_to_fixed): Remove.
3415 * ada-lang.h (ada_fixed_to_float): Remove.
3416 (ada_float_to_fixed): Remove.
3417 (ada_delta): Return value instead of DOUBLEST.
3418 (ada_scaling_factor): Add prototype.
3419
3420 * ada-typeprint.c: Include "target-float.h".
3421 (print_fixed_point_type): Perform target arithmetic instead of
3422 host arithmetic.
3423 * ada-valprint.c: Include "target-float.h".
3424 (ada_val_print_num): Perform target arithmetic instead of
3425 host arithmetic for fixed-point types.
3426
3427 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3428
3429 * target-float.c: Include <math.h>.
3430 (floatformat_binop): New function.
3431 (floatformat_compare): Likewise.
3432 (target_float_binop): Likewise.
3433 (target_float_compare): Likewise.
3434 * target-float.h: Include "expression.h".
3435 (target_float_binop): Add prototype.
3436 (target_float_compare): Likewise.
3437
3438 * valarith.c: Do not include "doublest.h" and "dfp.h".
3439 Include "common/byte-vector.h".
3440 (value_args_as_decimal): Remove, replace by ...
3441 (value_args_as_target_float): ... this function. Handle both
3442 binary and decimal target floating-point formats.
3443 (scalar_binop): Handle both binary and decimal FP using
3444 value_args_as_target_float and target_float_binop.
3445 (value_equal): Handle both binary and decimal FP using
3446 value_args_as_target_float and target_float_compare.
3447 (value_less): Likewise.
3448 (value_pos): Handle all scalar types as simple copy.
3449 (value_neg): Handle all scalar types via BINOP_SUB from 0.
3450 * dfp.c (decimal_binop): Throw error instead of internal_error
3451 when called with an unsupported operation code.
3452
3453 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3454
3455 * target-float.c (target_float_to_string): New function.
3456 (target_float_from_string): New function.
3457 * target-float.h (target_float_to_string): Add prototype.
3458 (target_float_from_string): Add prototype.
3459
3460 * valprint.c: Include "target-float.h". Do not include
3461 "doublest.h" and "dfp.h".
3462 (print_floating): Use target_float_to_string.
3463 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
3464 (printf_floating): Use target_float_to_string.
3465 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
3466 (print_i387_value): Use target_float_to_string.
3467 * mips-tdep.c: Include "target-float.h".
3468 (mips_print_fp_register): Use target_float_to_string.
3469 * sh64-tdep.c: Include "target-float.h".
3470 (sh64_do_fp_register): Use target_float_to_string.
3471
3472 * parse.c: Include "target-float.h". Do not include
3473 "doublest.h" and "dfp.h".
3474 (parse_float): Use target_float_from_string.
3475 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
3476 (define_symbol): Use target_float_from_string.
3477 * gdbarch-selftests.c: Include "target-float.h".
3478 (register_to_value_test): Use target_float_from_string.
3479
3480 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3481
3482 * Makefile.c (SFILES): Add target-float.c.
3483 (HFILES_NO_SRCDIR): Add target-float.h.
3484 (COMMON_OBS): Add target-float.o.
3485 * target-float.h: New file.
3486 * target-float.c: New file.
3487
3488 * doublest.c (floatformat_classify): Fix detection of float_zero.
3489
3490 * gdbtypes.c (is_floating_type): New function.
3491 * gdbtypes.h (is_floating_type): Add prototype.
3492
3493 * value.c: Do not include "floatformat.h".
3494 (unpack_double): Use target_float_is_valid.
3495 (is_floating_value): New function.
3496 * value.h (is_floating_value): Add prototype-
3497
3498 * valarith.c: Include "target-float.h".
3499 (value_logical_not): Use target_float_is_zero.
3500
3501 * python/py-value.c: Include "target-float.h".
3502 (valpy_nonzero): Use target_float_is_zero.
3503
3504 2017-11-04 Tom Tromey <tom@tromey.com>
3505
3506 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
3507
3508 2017-11-04 Tom Tromey <tom@tromey.com>
3509
3510 * breakpoint.c (set_momentary_breakpoint): Return
3511 breakpoint_up.
3512 (until_break_command): Update.
3513 (new_until_break_fsm): Change argument types to
3514 breakpoint_up.
3515 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3516 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
3517 Remove.
3518 * infcmd.c (finish_forward): Update.
3519 * breakpoint.h (set_momentary_breakpoint)
3520 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3521 (make_cleanup_delete_breakpoint): Remove.
3522 (struct breakpoint_deleter): New.
3523 (breakpoint_up): New typedef.
3524 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
3525 (insert_exception_resume_breakpoint): Update.
3526 (insert_exception_resume_from_probe): Update.
3527 (insert_longjmp_resume_breakpoint): Update.
3528 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
3529 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
3530 * infcall.c (call_function_by_hand_dummy): Update
3531
3532 2017-11-04 Tom Tromey <tom@tromey.com>
3533
3534 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
3535
3536 2017-11-04 Tom Tromey <tom@tromey.com>
3537
3538 * linux-tdep.c (linux_core_info_proc_mappings): Use
3539 gdb::def_vector.
3540 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
3541 "size" argument.
3542 (linux_corefile_thread): Update.
3543 (linux_make_corefile_notes): Remove unused variable.
3544
3545 2017-11-04 Tom Tromey <tom@tromey.com>
3546
3547 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
3548 gdb::byte_vector.
3549
3550 2017-11-04 Tom Tromey <tom@tromey.com>
3551
3552 * objfiles.c (do_free_objfile_cleanup): Remove.
3553 * compile/compile-object-load.c (compile_object_load): Update.
3554 * objfiles.h (make_cleanup_free_objfile): Remove.
3555
3556 2017-11-04 Tom Tromey <tom@tromey.com>
3557
3558 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
3559 (adi_read_versions): Change "tags" to "gdb_byte *".
3560 (adi_print_versions): Likewise.
3561
3562 2017-11-04 Tom Tromey <tom@tromey.com>
3563
3564 * breakpoint.c
3565 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
3566 from start_rbreak_breakpoints.
3567 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
3568 * breakpoint.h (class scoped_rbreak_breakpoints): New.
3569 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
3570 * symtab.c (do_end_rbreak_breakpoints): Remove.
3571 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
3572
3573 2017-11-04 Tom Tromey <tom@tromey.com>
3574
3575 * cp-namespace.c (reset_directive_searched): Remove.
3576 (cp_lookup_symbol_via_imports): Use scoped_restore.
3577 * cp-support.c (reset_directive_searched): Remove.
3578 (make_symbol_overload_list_using): Use scoped_restore.
3579 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
3580 (reset_directive_searched): Remove.
3581
3582 2017-11-04 Tom Tromey <tom@tromey.com>
3583
3584 * symfile.c (find_separate_debug_file_by_debuglink): Use
3585 unique_xmalloc_ptr.
3586
3587 2017-11-04 Tom Tromey <tom@tromey.com>
3588
3589 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
3590 type of "info".
3591 (compute_stack_depth): Likewise.
3592 (do_compile_dwarf_expr_to_c): Use std::vector.
3593
3594 2017-11-04 Tom Tromey <tom@tromey.com>
3595
3596 * compile/compile-object-load.c (link_callbacks_einfo): Use
3597 std::string.
3598
3599 2017-11-04 Tom Tromey <tom@tromey.com>
3600
3601 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3602 Use scoped_free_pendings.
3603 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
3604 scoped_free_pendings.
3605 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
3606 (xcoff_initial_scan): Likewise.
3607 * buildsym.c (reset_symtab_globals): Update comment.
3608 (scoped_free_pendings): Rename from really_free_pendings.
3609 (prepare_for_building): Update comment.
3610 (buildsym_init): Likewise.
3611 * buildsym.h (class scoped_free_pendings): New class.
3612 (really_free_pendings): Don't declare.
3613
3614 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
3615
3616 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
3617 output when converting a zero value to a special byteorder format.
3618
3619 2017-11-02 Yao Qi <yao.qi@linaro.org>
3620
3621 * frame.c (do_frame_register_read): Remove aspace.
3622 * jit.c (jit_frame_sniffer): Likwise.
3623 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3624 * regcache.c (regcache::regcache): Pass nullptr.
3625 (regcache_print): Caller updated.
3626 * regcache.h (regcache::regcache): Remove one constructor
3627 parameter aspace.
3628
3629 2017-11-02 Yao Qi <yao.qi@linaro.org>
3630
3631 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
3632
3633 2017-11-02 Yao Qi <yao.qi@linaro.org>
3634
3635 * breakpoint.c (insert_single_step_breakpoints): Update.
3636 * frame.c (struct frame_info) <aspace>: Add const.
3637 (frame_save_as_regcache): Add const.
3638 (get_frame_address_space): Return const address_space *.
3639 * frame.h (get_frame_address_space): Update declaration.
3640 * infrun.c (struct step_over_info) <aspace>: Add const.
3641 (set_step_over_info): Make aspace const.
3642 (displaced_step_prepare_throw): Change variable const.
3643 (resume): Likewise.
3644 (proceed): Likewise.
3645 (adjust_pc_after_break): Likewise.
3646 (save_waitstatus): Likewise.
3647 (handle_signal_stop): Likewise.
3648 (keep_going_pass_signal): Likewise.
3649 * jit.c (jit_frame_sniffer): Add const.
3650 * mips-tdep.c (mips_single_step_through_delay): Likewise.
3651 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3652 * record-full.c (record_full_wait_1): Likewise.
3653 * regcache.c (regcache::regcache): Change parameter to const.
3654 * regcache.h (regcache::regcache): Likewise.
3655 (regcache::aspace): Return const address_space *.
3656 (regcache) <m_aspace>: Add const.
3657
3658 2017-11-02 Yao Qi <yao.qi@linaro.org>
3659
3660 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
3661 * frame.c (create_sentinel_frame): Likewise.
3662 * infrun.c (displaced_step_prepare_throw): Likewise.
3663 (resume): Likewise.
3664 (thread_still_needs_step_over_bp): Likewise.
3665 (proceed): Likewise.
3666 (do_target_wait): Likewise.
3667 (adjust_pc_after_break): Likewise.
3668 (handle_syscall_event): Likewise.
3669 (save_waitstatus): Likewise.
3670 (handle_inferior_event_1): Likewise.
3671 (handle_signal_stop): Likewise.
3672 (keep_going_pass_signal): Likewise.
3673 * linux-nat.c (status_callback): Likewise.
3674 (save_stop_reason): Likewise.
3675 (resume_stopped_resumed_lwps): Likewise.
3676 * record-full.c (record_full_exec_insn): Likewise.
3677 (record_full_wait_1): Likewise.
3678 * regcache.c (get_regcache_aspace): Remove.
3679 * regcache.h (get_regcache_aspace): Remove.
3680
3681 2017-11-02 Yao Qi <yao.qi@linaro.org>
3682
3683 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
3684 (init_regcache_descr): Use gdbarch_num_regs.
3685 (regcache::regcache): Likewise.
3686 (regcache::get_register_status): Likewise.
3687 (regcache::assert_raw_regnum): Likewise.
3688 (regcache::cooked_read): Likewise.
3689 (regcache::cooked_read_value): Likewise.
3690 (regcache::cooked_write): Likewise.
3691 (regcache::dump): Likewise.
3692 (regcache::num_raw_registers): New method.
3693 * regcache.h (class regcache) <num_raw_registers>: New.
3694
3695 2017-11-02 Yao Qi <yao.qi@linaro.org>
3696
3697 * regcache.c (regcache::assert_regnum): New method.
3698 (regcache::invalidate): Call assert_regnum.
3699 (regcache::raw_update): Likewise.
3700 (regcache::raw_write): Likewise.
3701 (regcache::raw_read_part): Likewise.
3702 (regcache::raw_write_part): Likewise.
3703 (regcache::raw_supply): Likewise.
3704 (regcache::raw_supply_integer): Likewise.
3705 (regcache::raw_supply_zeroed): Likewise.
3706 (regcache::raw_collect): Likewise.
3707 (regcache::raw_collect_integer): Likewise.
3708 * regcache.h (regcache::assert_regnum): Declare.
3709
3710 2017-11-02 Yao Qi <yao.qi@linaro.org>
3711
3712 * regcache.c (regcache::dump): Remove code.
3713
3714 2017-11-02 Yao Qi <yao.qi@linaro.org>
3715
3716 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
3717 Remove.
3718 <sizeof_cooked_register_status>: Remove.
3719 (init_regcache_descr): Update.
3720 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
3721 (regcache::save): Likewise.
3722 (regcache::dump): Likewise.
3723
3724 2017-11-01 James Bowman <james.bowman@ftdichip.com>
3725
3726 * ft32-tdep.c (ft32_fetch_instruction): New function.
3727 (ft32_analyze_prologue): Use ft32_fetch_instruction().
3728
3729 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
3730
3731 * cli/cli-script.c (execute_control_command): Rename to ...
3732 (execute_control_command_1): ... this.
3733 (execute_control_command): New function.
3734
3735 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
3736
3737 * tracepoint.c (tfind_command): Remove const_cast.
3738
3739 2017-10-30 Mike Gulick <mgulick@mathworks.com>
3740
3741 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
3742
3743 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
3744
3745 * common/common-utils.h (in_inclusive_range): New function.
3746 * arm-tdep.c (arm_record_extension_space): Use
3747 in_inclusive_range.
3748 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
3749 * cris-tdep.c (cris_spec_reg_applicable): Use
3750 in_inclusive_range.
3751
3752 2017-10-30 Pedro Alves <palves@redhat.com>
3753 Simon Marchi <simon.marchi@ericsson.com>
3754
3755 * remote.c (remote_set_syscall_catchpoint): Build a std::string
3756 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
3757
3758 2017-10-30 Pedro Alves <palves@redhat.com>
3759
3760 * common/common-utils.c (string_appendf, string_vappendf): New
3761 functions.
3762 * common/common-utils.h (string_appendf, string_vappendf): New
3763 declarations.
3764 * unittests/common-utils-selftests.c (string_appendf_func)
3765 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
3766 (string_vappendf_tests): New functions.
3767 (_initialize_common_utils_selftests): Register "string_appendf" and
3768 "string_vappendf tests".
3769
3770 2017-10-30 Pedro Alves <palves@redhat.com>
3771
3772 * unittests/common-utils-selftests.c (format_func): New typedef.
3773 (string_printf_tests, string_vprintf_tests): Tests factored out
3774 and merged to ...
3775 (test_format_func): ... this new function.
3776 (string_printf_tests, string_vprintf_tests): Reimplement on top of
3777 test_format_func.
3778
3779 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3780
3781 * darwin-nat.c: Remove include of gdb.h.
3782
3783 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3784
3785 * xtensa-xtregs.c: Fix formatting issues.
3786
3787 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3788
3789 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
3790
3791 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
3792
3793 PR python/21213
3794 * python/py-infthread.c (thpy_get_inferior): Increment reference
3795 of inferior before returning it.
3796
3797 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3798
3799 * unittests/common-utils-selftests.c (format): Add
3800 ATTRIBUTE_PRINTF.
3801
3802 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
3803
3804 * xml-syscall.c (struct syscall_desc): Add constructor.
3805 <name>: Change type to std::string.
3806 (syscall_desc_up): New typedef.
3807 (syscall_desc_p): Remove typeder.
3808 (DEF_VEC_P(syscall_desc_p)): Remove.
3809 (struct syscall_group_desc): Add constructor.
3810 <name>: Change type to std::string.
3811 <syscalls>: Change type to std::vector.
3812 (syscall_group_desc_up): New typedef.
3813 (syscall_group_desc_p): Remove typedef.
3814 (DEF_VEC_P(syscall_group_desc_p)): Remove.
3815 (struct syscalls_info) <syscalls>: Change type to std::vector of
3816 unique_ptr.
3817 <groups>: Likewise.
3818 <my_gdb_datadir>: Change type to std::string.
3819 (syscalls_info_up): New typedef.
3820 (allocate_syscalls_info): Remove.
3821 (syscalls_info_free_syscalls_desc): Remove.
3822 (syscalls_info_free_syscall_group_desc): Remove.
3823 (free_syscalls_info): Remove.
3824 (make_cleanup_free_syscalls_info): Remove.
3825 (syscall_group_create_syscall_group_desc): Adjust.
3826 (syscall_group_add_syscall): Adjust.
3827 (syscall_create_syscall_desc): Adjust.
3828 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
3829 (init_syscalls_info): Adjust.
3830 (syscall_group_get_group_by_name): Adjust.
3831 (xml_get_syscall_number): Adjust.
3832 (xml_get_syscall_name): Adjust.
3833 (xml_list_of_syscalls): Adjust.
3834 (xml_list_syscalls_by_group): Adjust.
3835 (xml_list_of_groups): Adjust.
3836
3837 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3838
3839 * probe.h: Don't include gdb_vecs.h.
3840 (DEF_VEC_P (probe_p)): Remove.
3841 (find_probes_in_objfile): Return an std::vector.
3842 * probe.c (find_probes_in_objfile): Likewise.
3843 * breakpoint.c (breakpoint_objfile_data)
3844 <longjmp_probes>: Change type to std::vector.
3845 <exception_probes>: Likewise.
3846 (free_breakpoint_probes): Don't manually free vectors.
3847 (create_longjmp_master_breakpoint): Adjust.
3848 (create_exception_master_breakpoint): Adjust.
3849 * solib-svr4.c (svr4_create_probe_breakpoints): Change
3850 parameter type, adjust.
3851 (svr4_create_solib_event_breakpoints): Adjust.
3852
3853 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3854
3855 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
3856 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
3857 with new.
3858 (free_breakpoint_probes): Rename to ...
3859 (free_breakpoint_objfile_data): ... this, and call delete on
3860 bp_objfile_data..
3861
3862 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
3863
3864 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
3865 (loaded_script_ptr): Remove typedef.
3866 (DEF_VEC_P (loaded_script_ptr)): Remove.
3867 (struct collect_matching_scripts_data): Add constructor.
3868 <scripts_p>: Change type to (pointer to) std::vector.
3869 (collect_matching_scripts_data): Adjust.
3870 (sort_scripts_by_name): Make suitable for std::sort.
3871 (print_scripts): Don't sort vector, adjust to std::vector.
3872 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
3873
3874 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3875
3876 * symfile.c (filename_language): Make struct, not typedef. Add
3877 constructor.
3878 <ext>: Change type to std::string.
3879 (DEF_VEC_O (filename_language)): Remove.
3880 (filename_language_table): Change type to std::vector.
3881 (add_filename_language): Adjust.
3882 (set_ext_lang_command): Adjust.
3883 (info_ext_lang_command): Adjust.
3884 (deduce_language_from_filename): Adjust.
3885 (class scoped_restore_filename_language_table): Remove.
3886 (test_filename_language): Use scoped_restore.
3887 (test_set_ext_lang_command): Use scoped_restore, adjust to
3888 std::vector change.
3889
3890 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3891
3892 * symfile.c: Include selftest.h.
3893 (class scoped_restore_filename_language_table): New.
3894 (test_filename_language): New test.
3895 (test_set_ext_lang_command): New test.
3896 (_initialize_symfile): Register tests.
3897
3898 2017-10-27 Keith Seitz <keiths@redhat.com>
3899
3900 * breakpoint.c (print_breakpoint_location): Use the symbol saved
3901 in the bp_location, falling back to find_pc_sect_function when
3902 needed.
3903 (add_location_to_breakpoint): Save sal->symbol.
3904 * breakpoint.h (struct bp_location) <symbol>: New field.
3905 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
3906 * symtab.h (struct symtab_and_line) <symbol>: New field.
3907
3908 2017-10-26 Patrick Frants <osscontribute@gmail.com>
3909
3910 PR gdb/13669
3911 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
3912 to rewind obstack.
3913
3914 2017-10-26 Pedro Alves <palves@redhat.com>
3915
3916 * remote.c (remote_async_terminal_ours_p): Delete.
3917 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
3918 Remove references to 'remote_async_terminal_ours_p'.
3919
3920 2017-10-26 Yao Qi <yao.qi@linaro.org>
3921
3922 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
3923
3924 2017-10-26 Yao Qi <yao.qi@linaro.org>
3925
3926 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
3927 aspace const.
3928 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
3929 Likewise.
3930 * breakpoint.c (bpstat_check_location): Remove cast.
3931 (breakpoint_hit_catch_fork): Make aspce const.
3932 (breakpoint_hit_catch_solib): Likewise.
3933 (breakpoint_hit_catch_exec): Likewise.
3934 (breakpoint_hit_ranged_breakpoint): Likewise.
3935 (breakpoint_hit_watchpoint): Likewise.
3936 (base_breakpoint_breakpoint_hit): Likewise.
3937 (bkpt_breakpoint_hit): Likewise.
3938 (dprintf_breakpoint_hit): Likewise.
3939 (tracepoint_breakpoint_hit): Likewise.
3940 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
3941
3942 2017-10-26 Yao Qi <yao.qi@linaro.org>
3943
3944 * breakpoint.c (breakpoint_location_address_match): Change
3945 "struct address_space *" to "const address_space".
3946 (breakpoint_location_address_range_overlap): Likewise.
3947 (breakpoint_here_p): Likewise.
3948 (breakpoint_in_range_p): Likewise.
3949 (moribund_breakpoint_here_p): Likewise.
3950 (bp_location_inserted_here_p): Likewise.
3951 (software_breakpoint_inserted_here_p): Likewise.
3952 (hardware_breakpoint_inserted_here_p): Likewise.
3953 (hardware_watchpoint_inserted_in_range): Likewise.
3954 (bpstat_check_location): Likewise.
3955 (bpstat_stop_status): Likewise.
3956 (breakpoint_address_match): Likewise.
3957 (breakpoint_address_match_range): Likewise.
3958 (breakpoint_location_address_match): Likewise.
3959 (breakpoint_location_address_range_overlap): Likewise.
3960 (insert_single_step_breakpoint): Likewise.
3961 (breakpoint_has_location_inserted_here): Likewise.
3962 (single_step_breakpoint_inserted_here_p): Likewise.
3963 (pc_at_non_inline_function): Likewise.
3964 * breakpoint.h (bpstat_stop_status): Update declaration.
3965 (breakpoint_here_p): Likewise.
3966 (breakpoint_in_range_p): Likewise.
3967 (moribund_breakpoint_here_p): Likewise.
3968 (breakpoint_inserted_here_p): Likewise.
3969 (software_breakpoint_inserted_here_p): Likewise.
3970 (hardware_breakpoint_inserted_here_p): Likewise.
3971 (breakpoint_has_location_inserted_here): Likewise.
3972 (single_step_breakpoint_inserted_here_p): Likewise.
3973 (hardware_watchpoint_inserted_in_range): Likewise.
3974 (breakpoint_address_match): Likewise.
3975 (insert_single_step_breakpoint): Likewise.
3976 (pc_at_non_inline_function): Likewise.
3977 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
3978 * record.c (record_check_stopped_by_breakpoint): Likewise.
3979 * record.h (record_check_stopped_by_breakpoint): Likewise.
3980 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
3981
3982 2017-10-25 Yao Qi <yao.qi@linaro.org>
3983
3984 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
3985 regcache->arch () instead get_regcache_arch.
3986 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
3987 Likewise.
3988 (aarch64_fbsd_store_inferior_registers): Likewise.
3989 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
3990 (store_gregs_to_thread): Likewise.
3991 (fetch_fpregs_from_thread): Likewise.
3992 (store_fpregs_to_thread): Likewise.
3993 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
3994 (aarch64_store_return_value): Likewise.
3995 (aarch64_software_single_step): Likewise.
3996 * aix-thread.c (aix_thread_wait): Likewise.
3997 (supply_reg32): Likewise.
3998 (supply_sprs64): Likewise.
3999 (supply_sprs32): Likewise.
4000 (fill_gprs64): Likewise.
4001 (fill_gprs32): Likewise.
4002 (fill_sprs64): Likewise.
4003 (fill_sprs32): Likewise.
4004 (store_regs_user_thread): Likewise.
4005 (store_regs_kernel_thread): Likewise.
4006 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
4007 (alphabsd_store_inferior_registers): Likewise.
4008 * alpha-tdep.c (alpha_extract_return_value): Likewise.
4009 (alpha_store_return_value): Likewise.
4010 (alpha_deal_with_atomic_sequence): Likewise.
4011 (alpha_next_pc): Likewise.
4012 (alpha_software_single_step): Likewise.
4013 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
4014 (amd64bsd_store_inferior_registers): Likewise.
4015 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
4016 Likewise.
4017 (amd64_linux_store_inferior_registers): Likewise.
4018 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
4019 (amd64_collect_native_gregset): Likewise.
4020 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
4021 (amd64obsd_collect_uthread): Likewise.
4022 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
4023 (amd64_collect_fpregset): Likewise.
4024 (amd64_supply_fxsave): Likewise.
4025 (amd64_supply_xsave): Likewise.
4026 (amd64_collect_fxsave): Likewise.
4027 (amd64_collect_xsave): Likewise.
4028 * arc-tdep.c (arc_write_pc): Likewise.
4029 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
4030 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
4031 (arm_fbsd_store_inferior_registers): Likewise.
4032 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
4033 (store_vfp_regs): Likewise.
4034 (arm_linux_fetch_inferior_registers): Likewise.
4035 (arm_linux_store_inferior_registers): Likewise.
4036 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
4037 (arm_linux_sigreturn_next_pc): Likewise.
4038 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
4039 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
4040 (fetch_register): Likewise.
4041 (store_register): Likewise.
4042 * arm-tdep.c (arm_is_thumb): Likewise.
4043 (displaced_in_arm_mode): Likewise.
4044 (bx_write_pc): Likewise.
4045 (arm_get_next_pcs_addr_bits_remove): Likewise.
4046 (arm_software_single_step): Likewise.
4047 (arm_extract_return_value): Likewise.
4048 (arm_store_return_value): Likewise.
4049 (arm_write_pc): Likewise.
4050 * bfin-tdep.c (bfin_extract_return_value): Likewise.
4051 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
4052 (bsd_uthread_store_registers): Likewise.
4053 * core-regset.c (fetch_core_registers): Likewise.
4054 * corelow.c (get_core_registers): Likewise.
4055 * cris-tdep.c (cris_store_return_value): Likewise.
4056 (cris_extract_return_value): Likewise.
4057 (find_step_target): Likewise.
4058 (find_step_target): Likewise.
4059 (cris_software_single_step): Likewise.
4060 * ctf.c (ctf_fetch_registers): Likewise.
4061 * darwin-nat.c (cancel_breakpoint): Likewise.
4062 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
4063 * frv-tdep.c (frv_extract_return_value): Likewise.
4064 * ft32-tdep.c (ft32_store_return_value): Likewise.
4065 (ft32_extract_return_value): Likewise.
4066 * go32-nat.c (fetch_register): Likewise.
4067 (go32_fetch_registers): Likewise.
4068 (go32_store_registers): Likewise.
4069 (store_register): Likewise.
4070 * h8300-tdep.c (h8300_extract_return_value): Likewise.
4071 (h8300_store_return_value): Likewise.
4072 * hppa-linux-nat.c (fetch_register): Likewise.
4073 (store_register): Likewise.
4074 (hppa_linux_fetch_inferior_registers): Likewise.
4075 (hppa_linux_store_inferior_registers): Likewise.
4076 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
4077 (i386_darwin_store_inferior_registers): Likewise.
4078 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
4079 (gnu_store_registers): Likewise.
4080 * i386-linux-nat.c (fetch_register): Likewise.
4081 (store_register): Likewise.
4082 (supply_gregset): Likewise.
4083 (fill_gregset): Likewise.
4084 (i386_linux_fetch_inferior_registers): Likewise.
4085 (i386_linux_store_inferior_registers): Likewise.
4086 (i386_linux_resume): Likewise.
4087 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
4088 Likewise.
4089 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
4090 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
4091 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
4092 (i386obsd_collect_uthread): Likewise.
4093 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
4094 (i386_supply_gregset): Likewise.
4095 (i386_collect_gregset): Likewise.
4096 (i386_supply_fpregset): Likewise.
4097 (i386_collect_fpregset): Likewise.
4098 (i386_mpx_bd_base): Likewise.
4099 * i386-v4-nat.c (supply_fpregset): Likewise.
4100 (fill_fpregset): Likewise.
4101 * i387-tdep.c (i387_supply_fsave): Likewise.
4102 (i387_collect_fsave): Likewise.
4103 (i387_supply_fxsave): Likewise.
4104 (i387_collect_fxsave): Likewise.
4105 (i387_supply_xsave): Likewise.
4106 (i387_collect_xsave): Likewise.
4107 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
4108 (ia64_linux_store_registers): Likewise.
4109 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
4110 (ia64_extract_return_value): Likewise.
4111 (ia64_store_return_value): Likewise.
4112 (find_func_descr): Likewise.
4113 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
4114 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
4115 (inf_ptrace_store_registers): Likewise.
4116 * infrun.c (use_displaced_stepping): Likewise.
4117 (displaced_step_prepare_throw): Likewise.
4118 (resume): Likewise.
4119 (proceed): Likewise.
4120 (do_target_wait): Likewise.
4121 (adjust_pc_after_break): Likewise.
4122 (handle_inferior_event_1): Likewise.
4123 (handle_signal_stop): Likewise.
4124 (save_infcall_suspend_state): Likewise.
4125 (restore_infcall_suspend_state): Likewise.
4126 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
4127 * jit.c (jit_frame_prev_register): Likewise.
4128 * linux-nat.c (save_stop_reason): Likewise.
4129 (linux_nat_wait_1): Likewise.
4130 (resume_stopped_resumed_lwps): Likewise.
4131 * linux-record.c (record_linux_sockaddr): Likewise.
4132 (record_linux_msghdr): Likewise.
4133 (record_linux_system_call): Likewise.
4134 * linux-tdep.c (linux_collect_thread_registers): Likewise.
4135 * lm32-tdep.c (lm32_extract_return_value): Likewise.
4136 (lm32_store_return_value): Likewise.
4137 * m32c-tdep.c (m32c_read_flg): Likewise.
4138 (m32c_pseudo_register_read): Likewise.
4139 (m32c_pseudo_register_write): Likewise.
4140 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
4141 (m32r_linux_collect_gregset): Likewise.
4142 * m32r-tdep.c (m32r_store_return_value): Likewise.
4143 (m32r_extract_return_value): Likewise.
4144 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
4145 (m68kbsd_collect_fpregset): Likewise.
4146 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
4147 * m68k-linux-nat.c (fetch_register): Likewise.
4148 (old_fetch_inferior_registers): Likewise.
4149 (old_store_inferior_registers): Likewise.
4150 (store_regs): Likewise.
4151 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
4152 (m68k_svr4_store_return_value): Likewise.
4153 * m88k-tdep.c (m88k_store_arguments): Likewise.
4154 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
4155 (mi_cmd_data_write_register_values): Likewise.
4156 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
4157 (mips_fbsd_store_inferior_registers): Likewise.
4158 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
4159 (mips_fbsd_supply_gregs): Likewise.
4160 (mips_fbsd_collect_fpregs): Likewise.
4161 (mips_fbsd_collect_gregs): Likewise.
4162 (mips_fbsd_supply_fpregset): Likewise.
4163 (mips_fbsd_collect_fpregset): Likewise.
4164 (mips_fbsd_supply_gregset): Likewise.
4165 (mips_fbsd_collect_gregset): Likewise.
4166 * mips-linux-nat.c (supply_gregset): Likewise.
4167 (fill_gregset): Likewise.
4168 (supply_fpregset): Likewise.
4169 (fill_fpregset): Likewise.
4170 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
4171 (mips_fill_gregset): Likewise.
4172 (mips_supply_fpregset): Likewise.
4173 (mips_fill_fpregset): Likewise.
4174 (mips64_supply_gregset): Likewise.
4175 (micromips_linux_sigframe_validate): Likewise.
4176 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
4177 (mipsnbsd_fetch_inferior_registers): Likewise.
4178 (mipsnbsd_store_inferior_registers): Likewise.
4179 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
4180 (mipsnbsd_supply_gregset): Likewise.
4181 (mipsnbsd_iterate_over_regset_sections): Likewise.
4182 (mipsnbsd_supply_reg): Likewise.
4183 (mipsnbsd_supply_fpreg): Likewise.
4184 * mips-tdep.c (mips_in_frame_stub): Likewise.
4185 (mips_dummy_id): Likewise.
4186 (is_octeon_bbit_op): Likewise.
4187 (micromips_bc1_pc): Likewise.
4188 (extended_mips16_next_pc): Likewise.
4189 (mips16_next_pc): Likewise.
4190 (deal_with_atomic_sequence): Likewise.
4191 * moxie-tdep.c (moxie_process_readu): Likewise.
4192 * nios2-tdep.c (nios2_get_next_pc): Likewise.
4193 * nto-procfs.c (procfs_store_registers): Likewise.
4194 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
4195 (ppcfbsd_store_inferior_registers): Likewise.
4196 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
4197 (fetch_altivec_register): Likewise.
4198 (get_spe_registers): Likewise.
4199 (fetch_spe_register): Likewise.
4200 (fetch_altivec_registers): Likewise.
4201 (fetch_all_gp_regs): Likewise.
4202 (fetch_all_fp_regs): Likewise.
4203 (store_vsx_register): Likewise.
4204 (store_altivec_register): Likewise.
4205 (set_spe_registers): Likewise.
4206 (store_spe_register): Likewise.
4207 (store_altivec_registers): Likewise.
4208 (store_all_gp_regs): Likewise.
4209 (store_all_fp_regs): Likewise.
4210 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
4211 (ppc_linux_collect_gregset): Likewise.
4212 (ppc_canonicalize_syscall): Likewise.
4213 (ppc_linux_record_signal): Likewise.
4214 (ppu2spu_prev_register): Likewise.
4215 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
4216 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
4217 (ppcobsd_store_registers): Likewise.
4218 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
4219 Likewise.
4220 (ppc_ravenscar_generic_store_registers): Likewise.
4221 * procfs.c (procfs_fetch_registers): Likewise.
4222 (procfs_store_registers): Likewise.
4223 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
4224 (ravenscar_store_registers): Likewise.
4225 (ravenscar_prepare_to_store): Likewise.
4226 * record-btrace.c (record_btrace_fetch_registers): Likewise.
4227 * record-full.c (record_full_wait_1): Likewise.
4228 (record_full_registers_change): Likewise.
4229 (record_full_store_registers): Likewise.
4230 (record_full_core_fetch_registers): Likewise.
4231 (record_full_save): Likewise.
4232 (record_full_goto_insn): Likewise.
4233 * regcache.c (regcache_register_size): Likewise.
4234 (get_regcache_arch): Remove.
4235 (regcache_read_pc): Likewise.
4236 * regcache.h (get_regcache_arch): Remove.
4237 * remote-sim.c (gdbsim_fetch_register): Likewise.
4238 (gdbsim_store_register): Likewise.
4239 * remote.c (fetch_register_using_p): Likewise.
4240 (send_g_packet): Likewise.
4241 (remote_prepare_to_store): Likewise.
4242 (store_registers_using_G): Likewise.
4243 * reverse.c (save_bookmark_command): Likewise.
4244 (goto_bookmark_command): Likewise.
4245 * rs6000-aix-tdep.c (branch_dest): Likewise.
4246 * rs6000-nat.c (rs6000_ptrace64): Likewise.
4247 (fetch_register): Likewise.
4248 * rs6000-tdep.c (ppc_supply_reg): Likewise.
4249 (ppc_collect_reg): Likewise.
4250 (ppc_collect_gregset): Likewise.
4251 (ppc_collect_fpregset): Likewise.
4252 (ppc_collect_vsxregset): Likewise.
4253 (ppc_collect_vrregset): Likewise.
4254 (ppc_displaced_step_hw_singlestep): Likewise.
4255 (rs6000_pseudo_register_read): Likewise.
4256 (rs6000_pseudo_register_write): Likewise.
4257 * s390-linux-nat.c (supply_gregset): Likewise.
4258 (fill_gregset): Likewise.
4259 (s390_linux_fetch_inferior_registers): Likewise.
4260 * s390-linux-tdep.c (s390_write_pc): Likewise.
4261 (s390_software_single_step): Likewise.
4262 (s390_all_but_pc_registers_record): Likewise.
4263 (s390_linux_syscall_record): Likewise.
4264 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
4265 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
4266 (shnbsd_store_inferior_registers): Likewise.
4267 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
4268 (sh_extract_return_value_fpu): Likewise.
4269 (sh_store_return_value_nofpu): Likewise.
4270 (sh_corefile_supply_regset): Likewise.
4271 (sh_corefile_collect_regset): Likewise.
4272 * sh64-tdep.c (sh64_extract_return_value): Likewise.
4273 (sh64_store_return_value): Likewise.
4274 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
4275 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
4276 (sparc_store_inferior_registers): Likewise.
4277 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
4278 (sparc_ravenscar_prepare_to_store): Likewise.
4279 * sparc-tdep.c (sparc32_store_arguments): Likewise.
4280 (sparc_analyze_control_transfer): Likewise.
4281 (sparc_step_trap): Likewise.
4282 (sparc_software_single_step): Likewise.
4283 (sparc32_gdbarch_init): Likewise.
4284 (sparc_supply_rwindow): Likewise.
4285 (sparc_collect_rwindow): Likewise.
4286 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
4287 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
4288 (sparc64nbsd_collect_gregset): Likewise.
4289 (sparc64nbsd_supply_fpregset): Likewise.
4290 (sparc64nbsd_collect_fpregset): Likewise.
4291 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
4292 (sparc64_supply_gregset): Likewise.
4293 (sparc64_collect_gregset): Likewise.
4294 (sparc64_supply_fpregset): Likewise.
4295 (sparc64_collect_fpregset): Likewise.
4296 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
4297 * spu-tdep.c (spu_unwind_sp): Likewise.
4298 (spu2ppu_prev_register): Likewise.
4299 (spu_memory_remove_breakpoint): Likewise.
4300 * stack.c (return_command): Likewise.
4301 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
4302 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
4303 * tracefile.c (trace_save_ctf): Likewise.
4304 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
4305 (do_windows_store_inferior_registers): Likewise.
4306 (windows_resume): Likewise.
4307 * xtensa-linux-nat.c (fill_gregset): Likewise.
4308 (supply_gregset_reg): Likewise.
4309 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
4310 (xtensa_register_read_masked): Likewise.
4311 (xtensa_supply_gregset): Likewise.
4312 (xtensa_extract_return_value): Likewise.
4313 (xtensa_store_return_value): Likewise.
4314
4315 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
4316
4317 * doublest.c (floatformat_from_string): New function.
4318 * doublest.h (floatformat_from_string): Add prototype.
4319
4320 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
4321 (OP_FLOAT): ... this.
4322 * expression.h: Do not include "doublest.h".
4323 (union exp_element): Replace doubleconst and decfloatconst by
4324 new element floatconst.
4325 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
4326 (ada_evaluate_subexp): Likewise.
4327 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
4328 OP_DOUBLE and OP_DECFLOAT.
4329 * expprint.c (print_subexp_standard): Likewise.
4330 (dump_subexp_body_standard): Likewise.
4331 * breakpoint.c (watchpoint_exp_is_const): Likewise.
4332
4333 * parse.c: Include "dfp.h".
4334 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4335 (write_exp_elt_floatcst): New function.
4336 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
4337 and OP_DECFLOAT.
4338 (operator_check_standard): Likewise.
4339 (parse_float): Do not accept suffix. Take type as input. Return bool.
4340 Return target format buffer instead of host DOUBLEST.
4341 Use floatformat_from_string and decimal_from_string to parse
4342 either binary or decimal floating-point types.
4343 (parse_c_float): Remove.
4344 * parser-defs.h: Do not include "doublest.h".
4345 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4346 (write_exp_elt_floatcst): Add prototype.
4347 (parse_float): Update prototype.
4348 (parse_c_float): Remove.
4349
4350 * c-exp.y: Do not include "dfp.h".
4351 (typed_val_float): Use byte buffer instead of DOUBLEST.
4352 (typed_val_decfloat): Remove.
4353 (DECFLOAT): Remove.
4354 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4355 (parse_number): Update to new parse_float interface.
4356 Parse suffixes and determine type before calling parse_float.
4357 Handle decimal and binary FP types the same way.
4358
4359 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4360 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
4361 (parse_number): Update to new parse_float interface.
4362 Parse suffixes and determine type before calling parse_float.
4363
4364 * f-exp.y: Replace dval by typed_val_float.
4365 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4366 (parse_number): Use parse_float instead of atof.
4367
4368 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4369 (parse_go_float): Remove.
4370 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4371 (parse_number): Call parse_float instead of parse_go_float.
4372 Parse suffixes and determine type before calling parse_float.
4373
4374 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4375 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4376 (parse_number): Update to new parse_float interface.
4377 Parse suffixes and determine type before calling parse_float.
4378
4379 * m2-exp.y: Replace dval by byte buffer val.
4380 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4381 (parse_number): Call parse_float instead of atof.
4382
4383 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4384 (lex_number): Call parse_float instead of strtod.
4385 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
4386 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
4387 Use write_exp_elt_floatcst.
4388 (unit_testing): Remove static variable.
4389 (rust_type): Do not check unit_testing.
4390 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
4391
4392 * ada-exp.y (type_float, type_double): Remove.
4393 (typed_val_float): Use byte buffer instead of DOUBLEST.
4394 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4395 * ada-lex.l (processReal): Use parse_float instead of sscanf.
4396
4397 2017-10-25 Alan Hayward <alan.hayward@arm.com>
4398
4399 * aarch64-tdep.h (enum aarch64_regnum): Remove.
4400 * arch/aarch64.h: New file.
4401
4402 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4403
4404 * dfp.h (decimal_from_string): Use const reference for argument.
4405 * dfp.c (decimal_from_string): Likewise.
4406
4407 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4408
4409 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
4410 * sh64-tdep.c (sh64_do_fp_register): Likewise.
4411 * mips-tdep.c (mips_print_fp_register): Likewise.
4412
4413 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4414
4415 * common/format.h (enum argclass): Replace decfloat_arg by
4416 dec32float_arg, dec64float_arg, and dec128float_arg.
4417 * common/format.c (parse_format_string): Update to return
4418 new decimal float argument classes.
4419
4420 * printcmd.c (printf_decfloat): Rename to ...
4421 (printf_floating): ... this. Add argclass argument, and use it
4422 instead of parsing the format string again. Add support for
4423 binary floating-point values, using floatformat_to_string.
4424 Convert value to the target format if it doesn't already match.
4425 (ui_printf): Call printf_floating instead of printf_decfloat,
4426 also for double_arg / long_double_arg. Pass argclass.
4427
4428 * dfp.c (decimal_to_string): Add format string argument.
4429 * dfp.h (decimal_to_string): Likewise.
4430
4431 * doublest.c (floatformat_to_string): Add format string argument.
4432 * doublest.h (floatformat_to_string): Likewise.
4433
4434 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4435
4436 * doublest.c (floatformat_precision): New routine.
4437 (floatformat_to_string): Likewise.
4438 * doublest.c (floatformat_to_string): Add prototype.
4439
4440 * printcmd.c (print_scalar_formatted): Only call print_floating
4441 on floating-point types.
4442 * valprint.c: Do not include "floatformat.h".
4443 (generic_val_print_decfloat): Remove.
4444 (generic_val_print): Call generic_val_print_float for both
4445 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
4446 (print_floating): Use floatformat_to_string. Handle decimal float.
4447 (print_decimal_floating): Remove, merge into floatformat_to_string.
4448 * value.h (print_decimal_floating): Remove.
4449
4450 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
4451
4452 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4453
4454 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
4455
4456 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4457
4458 * memattr.h: Don't include vec.h.
4459 (struct mem_attrib): Initialize fields.
4460 <unknown>: New static method.
4461 (struct mem_region): Add constructors, operator<, initialize
4462 fields.
4463 * memattr.c: Include algorithm.
4464 (default_mem_attrib, unknown_mem_attrib): Remove.
4465 (user_mem_region_list): New global.
4466 (target_mem_region_list, mem_region_list): Change type to
4467 std::vector<mem_region>.
4468 (mem_use_target): Now a function.
4469 (target_mem_regions_valid): Change type to bool.
4470 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
4471 (require_user_regions): Adjust.
4472 (require_target_regions): Adjust.
4473 (create_mem_region): Adjust.
4474 (lookup_mem_region): Adjust.
4475 (invalidate_target_mem_regions): Adjust.
4476 (mem_clear): Rename to...
4477 (user_mem_clear): ... this, and adjust.
4478 (mem_command): Adjust.
4479 (info_mem_command): Adjust.
4480 (mem_enable, enable_mem_command, mem_disable,
4481 disable_mem_command): Adjust.
4482 (mem_delete): Adjust.
4483 (delete_mem_command): Adjust.
4484 * memory-map.h (parse_memory_map): Return an std::vector.
4485 * memory-map.c (parse_memory_map): Likewise.
4486 (struct memory_map_parsing_data): Add constructor.
4487 <memory_map>: Point to std::vector.
4488 (memory_map_start_memory): Adjust.
4489 (memory_map_end_memory): Adjust.
4490 (memory_map_end_property): Adjust.
4491 (clear_result): Remove.
4492 * remote.c (remote_memory_map): Return an std::vector.
4493 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
4494 Remove.
4495 (target_debug_print_mem_region_vector): New.
4496 * target-delegates.c: Regenerate.
4497 * target.h (mem_region_vector): New typedef.
4498 (to_memory_map): Return mem_region_vector.
4499 (target_memory_map): Return an std::vector.
4500 * target.c (target_memory_map): Return an std::vector.
4501 (flash_erase_command): Adjust.
4502
4503 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4504
4505 * memory-map.c (struct memory_map_parsing_data) <property_name>:
4506 Change type to std::string.
4507 (memory_map_start_property): Adjust.
4508 (memory_map_end_property): Adjust.
4509
4510 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4511
4512 * infrun.h: Include common/byte-vector.h.
4513 (struct displaced_step_closure): New struct.
4514 (struct buf_displaced_step_closure): New struct.
4515 * infrun.c (displaced_step_closure::~displaced_step_closure):
4516 Provide default implementation.
4517 (displaced_step_clear): Deallocate step closure with delete.
4518 * aarch64-tdep.c (displaced_step_closure): Rename to ...
4519 (aarch64_displaced_step_closure): ... this, extend
4520 displaced_step_closure.
4521 (aarch64_displaced_step_data) <dsc>: Change type to
4522 aarch64_displaced_step_closure.
4523 (aarch64_displaced_step_copy_insn): Adjust to type change, use
4524 unique_ptr.
4525 (aarch64_displaced_step_fixup): Add cast for displaced step
4526 closure.
4527 * amd64-tdep.c (displaced_step_closure): Rename to ...
4528 (amd64_displaced_step_closure): ... this, extend
4529 displaced_step_closure.
4530 <insn_buf>: Change type to std::vector<gdb_byte>.
4531 <max_len>: Remove.
4532 (fixup_riprel): Change type of DSC parameter, adjust to type
4533 change of insn_buf.
4534 (fixup_displaced_copy): Change type of DSC parameter.
4535 (amd64_displaced_step_copy_insn): Instantiate
4536 amd64_displaced_step_closure.
4537 (amd64_displaced_step_fixup): Add cast for closure type, adjust
4538 to type change of insn_buf.
4539 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
4540 parameter DSC.
4541 (arm_linux_copy_svc): Likewise.
4542 (cleanup_kernel_helper_return): Likewise.
4543 (arm_catch_kernel_helper_return): Likewise.
4544 (arm_linux_displaced_step_copy_insn): Instantiate
4545 arm_displaced_step_closure.
4546 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
4547 (displaced_read_reg): Change type of parameter DSC.
4548 (branch_write_pc): Likewise.
4549 (load_write_pc): Likewise.
4550 (alu_write_pc): Likewise.
4551 (displaced_write_reg): Likewise.
4552 (arm_copy_unmodified): Likewise.
4553 (thumb_copy_unmodified_32bit): Likewise.
4554 (thumb_copy_unmodified_16bit): Likewise.
4555 (cleanup_preload): Likewise.
4556 (install_preload): Likewise.
4557 (arm_copy_preload): Likewise.
4558 (thumb2_copy_preload): Likewise.
4559 (install_preload_reg): Likewise.
4560 (arm_copy_preload_reg): Likewise.
4561 (cleanup_copro_load_store): Likewise.
4562 (install_copro_load_store): Likewise.
4563 (arm_copy_copro_load_store) Likewise.
4564 (thumb2_copy_copro_load_store): Likewise.
4565 (cleanup_branch): Likewise.
4566 (install_b_bl_blx): Likewise.
4567 (arm_copy_b_bl_blx): Likewise.
4568 (thumb2_copy_b_bl_blx): Likewise.
4569 (thumb_copy_b): Likewise.
4570 (install_bx_blx_reg): Likewise.
4571 (arm_copy_bx_blx_reg): Likewise.
4572 (thumb_copy_bx_blx_reg): Likewise.
4573 (cleanup_alu_imm): Likewise.
4574 (arm_copy_alu_imm): Likewise.
4575 (thumb2_copy_alu_imm): Likewise.
4576 (cleanup_alu_reg): Likewise.
4577 (install_alu_reg): Likewise.
4578 (arm_copy_alu_reg): Likewise.
4579 (thumb_copy_alu_reg): Likewise.
4580 (cleanup_alu_shifted_reg): Likewise.
4581 (install_alu_shifted_reg): Likewise.
4582 (arm_copy_alu_shifted_reg): Likewise.
4583 (cleanup_load): Likewise.
4584 (cleanup_store): Likewise.
4585 (arm_copy_extra_ld_st): Likewise.
4586 (install_load_store): Likewise.
4587 (thumb2_copy_load_literal): Likewise.
4588 (thumb2_copy_load_reg_imm): Likewise.
4589 (arm_copy_ldr_str_ldrb_strb): Likewise.
4590 (cleanup_block_load_all): Likewise.
4591 (cleanup_block_store_pc): Likewise.
4592 (cleanup_block_load_pc): Likewise.
4593 (arm_copy_block_xfer): Likewise.
4594 (thumb2_copy_block_xfer): Likewise.
4595 (cleanup_svc): Likewise.
4596 (install_svc): Likewise.
4597 (arm_copy_svc): Likewise.
4598 (thumb_copy_svc): Likewise.
4599 (arm_copy_undef): Likewise.
4600 (thumb_32bit_copy_undef): Likewise.
4601 (arm_copy_unpred): Likewise.
4602 (arm_decode_misc_memhint_neon): Likewise.
4603 (arm_decode_unconditional): Likewise.
4604 (arm_decode_miscellaneous): Likewise.
4605 (arm_decode_dp_misc): Likewise.
4606 (arm_decode_ld_st_word_ubyte): Likewise.
4607 (arm_decode_media): Likewise.
4608 (arm_decode_b_bl_ldmstm): Likewise.
4609 (arm_decode_ext_reg_ld_st): Likewise.
4610 (thumb2_decode_dp_shift_reg): Likewise.
4611 (thumb2_decode_ext_reg_ld_st): Likewise.
4612 (arm_decode_svc_copro): Likewise.
4613 (thumb2_decode_svc_copro): Likewise.
4614 (install_pc_relative): Likewise.
4615 (thumb_copy_pc_relative_16bit): Likewise.
4616 (thumb_decode_pc_relative_16bit): Likewise.
4617 (thumb_copy_pc_relative_32bit): Likewise.
4618 (thumb_copy_16bit_ldr_literal): Likewise.
4619 (thumb_copy_cbnz_cbz): Likewise.
4620 (thumb2_copy_table_branch): Likewise.
4621 (cleanup_pop_pc_16bit_all): Likewise.
4622 (thumb_copy_pop_pc_16bit): Likewise.
4623 (thumb_process_displaced_16bit_insn): Likewise.
4624 (decode_thumb_32bit_ld_mem_hints): Likewise.
4625 (thumb_process_displaced_32bit_insn): Likewise.
4626 (thumb_process_displaced_insn): Likewise.
4627 (arm_process_displaced_insn): Likewise.
4628 (arm_displaced_init_closure): Likewise.
4629 (arm_displaced_step_fixup): Add cast for closure.
4630 * arm-tdep.h: Include infrun.h.
4631 (displaced_step_closure): Rename to ...
4632 (arm_displaced_step_closure): ... this, extend
4633 displaced_step_closure.
4634 <u::svc::copy_svc_os>: Change type of parameter DSC.
4635 <cleanup>: Likewise.
4636 (arm_process_displaced_insn): Likewise.
4637 (arm_displaced_init_closure): Likewise.
4638 (displaced_read_reg): Likewise.
4639 (displaced_write_reg): Likewise.
4640 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4641 Adjust.
4642 * i386-tdep.h: Include infrun.h.
4643 (i386_displaced_step_closure): New typedef.
4644 * i386-tdep.c (i386_displaced_step_copy_insn): Use
4645 i386_displaced_step_closure.
4646 (i386_displaced_step_fixup): Adjust.
4647 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
4648 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
4649 and unique_ptr.
4650 (ppc_displaced_step_fixup): Adjust.
4651 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
4652 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
4653 and unique_ptr.
4654 (s390_displaced_step_fixup): Adjust.
4655
4656 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4657
4658 * interps.h (interp_resume, interp_suspend, interp_set_temp):
4659 Remove declarations.
4660
4661 2017-10-20 Tom Tromey <tom@tromey.com>
4662
4663 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
4664 std::vector.
4665 (gdb_bfd_record_inclusion): Update.
4666 (bfdp): Remove typedef.
4667
4668 2017-10-20 Tom Tromey <tom@tromey.com>
4669
4670 * gdb_bfd.c (gdb_bfd_ref): Use new.
4671 (struct gdb_bfd_data): Add constructor, destructor, and member
4672 initializers.
4673 (gdb_bfd_unref): Use delete.
4674
4675 2017-10-20 Tom Tromey <tom@tromey.com>
4676
4677 * exec.c (exec_file_attach): Use new_bfd_ref.
4678 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
4679 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4680 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
4681 new_bfd_ref.
4682 * gdb_bfd.h (new_bfd_ref): New function.
4683
4684 2017-10-20 Pedro Alves <palves@redhat.com>
4685
4686 * main.c (captured_command_loop): Add attribute noinline.
4687
4688 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
4689
4690 * interps.c (struct interp_factory): Add constructor.
4691 (interp_factory_p): Remove typedef.
4692 (DEF_VEC_P(interp_factory_p)): Remove.
4693 (interpreter_factories): Change type to std::vector.
4694 (interp_factory_register): Adjust.
4695 (interp_lookup): Adjust.
4696 (interpreter_completer): Adjust.
4697
4698 2017-10-19 Tom Tromey <tom@tromey.com>
4699
4700 * break-catch-syscall.c (catch_syscall_completer): Use
4701 std::string, gdb::unique_xmalloc_ptr.
4702
4703 2017-10-19 Tom Tromey <tom@tromey.com>
4704
4705 * infcall.c (call_function_by_hand_dummy): Use std::string.
4706
4707 2017-10-19 Tom Tromey <tom@tromey.com>
4708
4709 * mi/mi-main.c (mi_cmd_execute): Update.
4710 * top.h (prepare_execute_command): Return scoped_value_mark.
4711 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
4712 Add move constructor.
4713 * top.c (prepare_execute_command): Return scoped_value_mark.
4714 (execute_command): Update.
4715
4716 2017-10-19 Pedro Alves <palves@redhat.com>
4717
4718 * xml-support.c (xml_fetch_content_from_file): Check fread's
4719 return.
4720
4721 2017-10-19 Pedro Alves <palves@redhat.com>
4722
4723 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
4724 async.
4725 (handle_error_fd): New function.
4726 (ser_base_async): Add/delete an event loop file handler for
4727 error_fd.
4728
4729 2017-10-19 Pedro Alves <palves@redhat.com>
4730
4731 * xml-support.c (xml_fetch_content_from_file): Don't read in
4732 chunks. Instead use fseek to determine the file's size, and read
4733 it in one go.
4734
4735 2017-11-18 Keith Seitz <keiths@redhat.com>
4736
4737 * c-exp.y (oper): Canonicalize conversion operators of user-defined
4738 types.
4739 Add whitespace to front of type name.
4740
4741 2017-10-18 Keith Seitz <keiths@redhat.com>
4742
4743 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
4744 DW_AT_accessibility.
4745
4746 2017-10-18 Yao Qi <yao.qi@linaro.org>
4747
4748 * features/tic6x-c62x-linux.c: Remove.
4749
4750 2017-10-17 Tom Tromey <tom@tromey.com>
4751
4752 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
4753 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
4754 (do_mixed_source_and_assembly): Likewise.
4755
4756 2017-10-17 Tom Tromey <tom@tromey.com>
4757
4758 * regcache.c (regcache::xfer_part): Remove assertion.
4759
4760 2017-10-17 Pedro Alves <palves@redhat.com>
4761
4762 * xml-support.c (xml_fetch_content_from_file): Call
4763 unique_ptr::release() instead unique_ptr::get() when passing
4764 through xrealloc.
4765
4766 2017-10-17 Yao Qi <yao.qi@linaro.org>
4767
4768 * regcache.c (regcache::xfer_part): Remove parameters read and
4769 write, add parameter is_raw. All callers are updated.
4770
4771 2017-10-16 Keith Seitz <keiths@redhat.com>
4772
4773 * c-typeprint.c (enum access_specifier): Moved here from
4774 c_type_print_base.
4775 (output_access_specifier): New function.
4776 (c_type_print_base): Consider typedefs when assessing
4777 whether access labels are needed.
4778 Use output_access_specifier as needed.
4779 Output access specifier for typedefs, if needed.
4780 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
4781 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
4782 fields.
4783 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
4784 accessor macros.
4785
4786 2017-10-16 Tom Tromey <tom@tromey.com>
4787
4788 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
4789 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
4790 * target.c (target_fileio_read_stralloc): Update.
4791 * sparc64-tdep.c (adi_is_addr_mapped): Update.
4792 * target.h (target_fileio_read_stralloc): Return
4793 unique_xmalloc_ptr.
4794
4795 2017-10-16 Tom Tromey <tom@tromey.com>
4796
4797 * xml-syscall.c (xml_init_syscalls_info): Update.
4798 * xml-support.c (xinclude_start_include): Update.
4799 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
4800 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
4801 (xml_fetch_content_from_file): Likewise.
4802 * osdata.c (get_osdata): Update.
4803 * target.h (target_read_stralloc, target_get_osdata): Return
4804 unique_xmalloc_ptr.
4805 * solib-aix.c (solib_aix_get_library_list): Update.
4806 * solib-target.c (solib_target_current_sos): Update.
4807 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
4808 * xml-tdesc.c (fetch_available_features_from_target): Update.
4809 (target_fetch_description_xml): Update.
4810 (file_read_description_xml): Update.
4811 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
4812 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
4813 (remote_pid_to_exec_file): Update.
4814 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
4815 (target_get_osdata): Likewise.
4816
4817 2017-10-16 Tom Tromey <tom@tromey.com>
4818
4819 * remote.c (remote_register_number_and_offset): Use std::vector.
4820 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
4821 (putpkt_binary): Use gdb::def_vector.
4822 (compare_sections_command): Use gdb::byte_vector.
4823
4824 2017-10-16 Tom Tromey <tom@tromey.com>
4825
4826 * ppc-linux-nat.c (hwdebug_insert_point): Use
4827 gdb::unique_xmalloc_ptr, XDUP.
4828
4829 2017-10-16 Tom Tromey <tom@tromey.com>
4830
4831 * probe.c (parse_probes): Use std::string.
4832 (info_probes_for_ops, enable_probes_command)
4833 (disable_probes_command): Remove cleanups.
4834
4835 2017-10-16 Tom Tromey <tom@tromey.com>
4836
4837 * buildsym.c (block_compar): Remove.
4838 (end_symtab_get_static_block): Use std::vector.
4839
4840 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
4841
4842 * memrange.h (struct mem_range): Define operator< and operator==.
4843 (mem_range_s): Remove.
4844 (DEF_VEC_O (mem_range_s)): Remove.
4845 (normalize_mem_ranges): Change parameter type to std::vector.
4846 * memrange.c (compare_mem_ranges): Remove.
4847 (normalize_mem_ranges): Change parameter type to std::vector,
4848 adjust to vector change.
4849 * exec.c (section_table_available_memory): Return vector, remove
4850 parameter.
4851 (section_table_read_available_memory): Adjust to std::vector
4852 change.
4853 * remote.c (remote_read_bytes): Adjust to std::vector
4854 change.
4855 * tracepoint.h (traceframe_available_memory): Change parameter
4856 type to std::vector.
4857 * tracepoint.c (traceframe_available_memory): Change parameter
4858 type to std::vector, adjust.
4859 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
4860 std::vector change.
4861 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4862 unittests/memrange-selftests.c.
4863 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
4864 * gdb/unittests/memrange-selftests.c: New file.
4865
4866 2017-10-16 Pedro Alves <palves@redhat.com>
4867
4868 * elfread.c (probe_key_free): Rename range-for variable.
4869 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
4870 (find_probe_by_pc, collect_probes): Rename range-for variable.
4871
4872 2017-10-16 Yao Qi <yao.qi@linaro.org>
4873
4874 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
4875 * features/tic6x-c62x.c: Remove.
4876 * features/tic6x-c64x-linux.c: Remove.
4877 * features/tic6x-c64x.c: Remove.
4878 * features/tic6x-c64xp-linux.c: Remove.
4879 * features/tic6x-c64xp.c: Remove.
4880 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
4881 initialize_tdesc_tic6x_*_linux functions.
4882 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
4883 initialize_tdesc_tic6x_* functions.
4884
4885 2017-10-16 Yao Qi <yao.qi@linaro.org>
4886
4887 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
4888 tic6x-c62x.
4889 * regformats/tic6x-c62x.dat: Remove.
4890 * regformats/tic6x-c64x.dat: Remove.
4891 * regformats/tic6x-c64xp.dat: Remove.
4892
4893 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
4894
4895 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
4896 (the !HAVE_LIBEXPAT version).
4897
4898 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4899
4900 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
4901 const.
4902
4903 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4904
4905 * target.h: Include tracepoint.h.
4906 (enum trace_find_type): Move to tracepoint.h.
4907 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
4908 * tracepoint.h: Don't include target.h
4909 (enum trace_find_type): Move from target.h.
4910 (parse_traceframe_info): Return a unique ptr.
4911 * tracepoint.c (current_traceframe_info): Change type to unique
4912 ptr.
4913 (free_traceframe_info): Remove.
4914 (clear_traceframe_info): Don't manually free
4915 current_traceframe_info.
4916 (free_result): Remove.
4917 (parse_traceframe_info): Return a unique ptr.
4918 (get_traceframe_info): Adjust to unique ptr.
4919 * ctf.c (ctf_traceframe_info): Return a unique ptr.
4920 * remote.c (remote_traceframe_info): Return a unique ptr.
4921 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
4922 ptr.
4923 * target-debug.h (target_debug_print_traceframe_info_up): New
4924 macro.
4925 * target-delegates.c: Regenerate.
4926
4927 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4928
4929 * memrange.h (struct mem_range): Add constructors.
4930 * tracepoint.h (struct traceframe_info) <memory>: Change type to
4931 std::vector<mem_range>.
4932 * tracepoint.c (free_traceframe_info): Don't manually free
4933 vector.
4934 (traceframe_info_start_memory): Adjust to vector change.
4935 (traceframe_available_memory): Likewise.
4936 * tracefile-tfile.c (build_traceframe_info): Likewise.
4937 * ctf.c (ctf_traceframe_info): Likewise.
4938
4939 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4940
4941 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
4942 std::vector<int>.
4943 * tracepoint.c (free_traceframe_info): Deallocate with delete.
4944 (traceframe_info_start_tvar): Adjust to vector change.
4945 (parse_traceframe_info): Allocate with new.
4946 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
4947 vector change.
4948 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
4949 change.
4950 tfile_traceframe_info): Allocate with new.
4951 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
4952 change.
4953
4954 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4955
4956 * tracepoint.c (traceframe_info): Rename to...
4957 (current_traceframe_info): ...this.
4958 (clear_traceframe_info): Adjust.
4959 (get_traceframe_info): Adjust.
4960
4961 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4962
4963 * nat/linux-osdata.c: Include algorithm.
4964 (compare_processes): Remove.
4965 (struct pid_pgid_entry): New struct.
4966 (linux_xfer_osdata_processgroups): Use std::vector instead of
4967 XNEWVEC.
4968
4969 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4970
4971 * objfiles.h: Don't include symfile.h.
4972 (struct partial_symbol): Remove forward-declaration.
4973 (struct objfile) <global_psymbols, static_psymbols>: Change type
4974 to std::vector<partial_symbol *>.
4975 * objfiles.c (objfile::objfile): Don't memset those fields.
4976 (objfile::~objfile): Don't free those fields.
4977 * psympriv.h (struct psymbol_allocation_list): Remove
4978 forward-declaration.
4979 (add_psymbol_to_list): Change psymbol_allocation_list parameter
4980 to std::vector.
4981 (start_psymtab_common): Change parameters to std::vector.
4982 * psymtab.c: Include algorithm.
4983 (require_partial_symbols): Call shrink_to_fit.
4984 (find_pc_sect_psymbol): Adjust to vector change.
4985 (match_partial_symbol): Likewise.
4986 (lookup_partial_symbol): Likewise.
4987 (psym_relocate): Likewise.
4988 (dump_psymtab): Likewise.
4989 (recursively_search_psymtabs): Likewise.
4990 (compare_psymbols): Remove.
4991 (sort_pst_symbols): Adjust to vector change.
4992 (start_psymtab_common): Likewise.
4993 (end_psymtab_common): Likewise.
4994 (psymbol_bcache_full): De-constify return value.
4995 (add_psymbol_to_bcache): Likewise.
4996 (extend_psymbol_list): Remove.
4997 (append_psymbol_to_list): Adjust to vector change.
4998 (add_psymbol_to_list): Likewise.
4999 (init_psymbol_list): Likewise.
5000 (maintenance_info_psymtabs): Likewise.
5001 (maintenance_check_psymtabs): Likewise.
5002 * symfile.h (struct psymbol_allocation_list): Remove.
5003 * symfile.c (reread_symbols): Adjust to vector change.
5004 * dbxread.c (start_psymtab): Change type of parameters.
5005 (dbx_symfile_read): Adjust to vector change.
5006 (read_dbx_symtab): Likewise.
5007 (start_psymtab): Change type of parameters.
5008 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
5009 (create_partial_symtab): Likewise.
5010 (add_partial_symbol): Likewise.
5011 (write_one_signatured_type): Likewise.
5012 (recursively_write_psymbols): Likewise.
5013 * mdebugread.c (parse_partial_symbols): Likewise.
5014 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
5015 (scan_xcoff_symtab): Adjust to vector change.
5016 (xcoff_initial_scan): Likewise.
5017
5018 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
5019
5020 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
5021
5022 2017-10-13 Yao Qi <yao.qi@linaro.org>
5023
5024 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
5025 Remove s390x-*-expedite, add s390x-expedite.
5026
5027 2017-10-13 Yao Qi <yao.qi@linaro.org>
5028
5029 * features/s390-gs-linux64.c: Regenerated.
5030 * features/s390x-gs-linux64.c: Regenerated.
5031
5032 2017-10-13 Tom Tromey <tom@tromey.com>
5033
5034 * compile/compile-object-run.c (do_module_cleanup): Use delete.
5035 * solib.c (update_solib_list, reload_shared_libraries_1): Use
5036 delete.
5037 * symfile.c (symbol_file_add_with_addrs): Use new.
5038 (symbol_file_add_separate): Update comment.
5039 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
5040 * jit.c (jit_object_close_impl): Use new.
5041 (jit_unregister_code): Use delete.
5042 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
5043 (~objfile): Rename from free_objfile.
5044 (free_objfile_separate_debug, do_free_objfile_cleanup)
5045 (free_all_objfiles, objfile_purge_solibs): Use delete.
5046 * objfiles.h (struct objfile): Add constructor and destructor.
5047 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
5048 (allocate_objfile, free_objfile): Don't declare.
5049 (struct objstats): Add initializers.
5050
5051 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5052
5053 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
5054 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
5055 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
5056 * gdbarch.h: Regenerate.
5057 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
5058 Adjust comment.
5059 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
5060 (i386_displaced_step_fixup): Adjust comment.
5061 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
5062
5063 2017-10-12 Tom Tromey <tom@tromey.com>
5064
5065 * prologue-value.h (pv_area::store_would_trash): Return bool.
5066 (pv_area::find_reg): Likewise.
5067 * prologue-value.c (pv_area::store_would_trash): Return bool.
5068 (pv_area::find_reg): Likewise.
5069
5070 2017-10-12 Tom Tromey <tom@tromey.com>
5071
5072 * s390-linux-tdep.c (s390_store, s390_load)
5073 (s390_check_for_saved, s390_analyze_prologue): Update.
5074 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
5075 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
5076 * prologue-value.h (class pv_area): Move from prologue-value.c.
5077 Change names of members. Add constructor, destructor, member
5078 functions.
5079 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
5080 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
5081 (pv_area_fetch, pv_area_scan): Don't declare.
5082 * prologue-value.c (struct pv_area::area_entry): Now member of
5083 pv_area.
5084 (struct pv_area): Move to prologue-value.h.
5085 (pv_area::pv_area): Rename from make_pv_area.
5086 (pv_area::~pv_area): Rename from free_pv_area.
5087 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
5088 (clear_entries, find_entry, overlaps, store_would_trash, store)
5089 (fetch, find_reg, scan): Now member of pv_area.
5090 Remove "area" argument. Update.
5091 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
5092 Update.
5093 * mn10300-tdep.c (push_reg, check_for_saved)
5094 (mn10300_analyze_prologue): Update.
5095 * mep-tdep.c (is_arg_spill, check_for_saved)
5096 (mep_analyze_prologue): Update.
5097 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
5098 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
5099 (m32c_is_struct_return, m32c_analyze_prologue): Update.
5100 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
5101 Update.
5102 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
5103 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
5104
5105 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5106
5107 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
5108 * linux-nat.c (linux_nat_delete_thread): New variable.
5109 (lwp_free): Invoke linux_nat_delete_thread if set.
5110 (linux_nat_set_delete_thread): New function.
5111 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
5112 thread delete callback.
5113 * arm-linux-nat.c (arm_linux_delete_thread): New function.
5114 (_initialize_arm_linux_nat): Assign thread delete callback.
5115 * s390-linux-nat.c (s390_delete_thread): New function.
5116 (_initialize_s390_nat): Assign thread delete callback.
5117 * x86-linux-nat.c (x86_linux_add_target): Likewise.
5118 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
5119 function.
5120 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
5121 declaration.
5122 * nat/x86-linux.c (x86_linux_delete_thread): New function.
5123 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
5124
5125 2017-10-09 Tom Tromey <tom@tromey.com>
5126
5127 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
5128 std::string.
5129 * tui/tui-layout.c (enum tui_status): Use std::string.
5130
5131 2017-10-11 Tom Tromey <tom@tromey.com>
5132
5133 * gdbthread.h (thread_command): Constify.
5134 * inferior.h (detach_command): Constify.
5135 * top.h (set_history, show_history): Constify.
5136 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
5137 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
5138 * bsd-kvm.c (bsd_kvm_cmd): Constify.
5139 * printcmd.c (set_command): Constify.
5140 (non_const_set_command): New function.
5141 * dcache.c (set_dcache_command, show_dcache_command): Constify.
5142 * breakpoint.c (enable_command, disable_command, delete_command)
5143 (catch_command, tcatch_command, set_breakpoint_cmd)
5144 (show_breakpoint_cmd): Constify.
5145 * macrocmd.c (macro_command): Constify.
5146 * infcmd.c (unset_command, kill_command, detach_command)
5147 (info_proc_cmd): Constify.
5148 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
5149 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
5150 (info_auto_load_cmd): Constify.
5151 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
5152 (unset_tdesc_cmd): Constify.
5153 * ada-lang.c (set_ada_command, show_ada_command)
5154 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
5155 * guile/guile.c (set_guile_command, show_guile_command)
5156 (info_guile_command): Constify.
5157 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
5158 Constify.
5159 * skip.c (skip_command): Constify.
5160 * compile/compile.c (_initialize_compile): Constify.
5161 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
5162 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
5163 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
5164 (maint_btrace_pt_show_cmd): Constify.
5165 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
5166 Constify.
5167 * python/python.c (user_show_python, user_set_python): Constify.
5168 * mips-tdep.c (set_mips_command, show_mips_command)
5169 (set_mipsfpu_command): Constify.
5170 * record-btrace.c (cmd_record_btrace_start)
5171 (cmd_set_record_btrace, cmd_show_record_btrace)
5172 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
5173 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
5174 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
5175 Constify.
5176 * symfile.c (overlay_command): Constify.
5177 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
5178 * cli/cli-logging.c (set_logging_command, show_logging_command):
5179 Constify.
5180 * cli/cli-dump.c (dump_command, append_command)
5181 (srec_dump_command, ihex_dump_command, verilog_dump_command)
5182 (tekhex_dump_command, binary_dump_command)
5183 (binary_append_command): Constify.
5184 * cli/cli-decode.c (struct cmd_list_element): Change type of
5185 "fun".
5186 * cli/cli-cmds.c (info_command, show_command, set_debug)
5187 (show_debug): Constify.
5188 (show_command): Add non-const overload.
5189 * top.c (set_history, show_history): Constify.
5190 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
5191 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
5192 * target.c (target_command): Constify.
5193 * sparc64-tdep.c (info_adi_command): Constify.
5194 * record-full.c (cmd_record_full_start): Constify.
5195 (set_record_full_command): Constify. Fix typo.
5196 (show_record_full_command): Constify.
5197 * thread.c (thread_command, thread_apply_command): Constify.
5198 * memattr.c (dummy_cmd): Constify.
5199 * value.c (function_command): Constify.
5200 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
5201 * probe.c (info_probes_command): Constify.
5202 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
5203 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
5204 (show_thread_cmd, set_thread_default_cmd)
5205 (show_thread_default_cmd): Constify.
5206 (check_empty): Constify.
5207 * tracepoint.c (tfind_command): Constify.
5208 * cp-support.c (maint_cplus_command): Constify.
5209 * windows-tdep.c (info_w32_command): Constify.
5210 * record.c (cmd_record_start, set_record_command)
5211 (show_record_command, info_record_command, cmd_record_goto):
5212 Constify.
5213 * ravenscar-thread.c (set_ravenscar_command)
5214 (show_ravenscar_command): Constify.
5215 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
5216 Constify.
5217 (add_internal_problem_command): Remove casts.
5218 * arc-tdep.c (maintenance_print_arc_command): Constify.
5219 * valprint.c (set_print, show_print, set_print_raw)
5220 (show_print_raw): Constify.
5221 * maint.c (maintenance_command, maintenance_info_command)
5222 (maintenance_print_command, maintenance_set_cmd)
5223 (maintenance_show_cmd, set_per_command_cmd)
5224 (show_per_command_cmd, maintenance_check_command): Constify.
5225 * language.c (set_check, show_check): Constify.
5226 * typeprint.c (show_print_type, set_print_type): Constify.
5227 * go32-nat.c (go32_info_dos_command): Constify.
5228
5229 2017-10-11 Tom Tromey <tom@tromey.com>
5230
5231 * breakpoint.c (prepare_re_set_context): Remove.
5232 (breakpoint_re_set_one): Update. Don't use cleanups.
5233 (breakpoint_re_set): Use scoped_restore, std::string, and
5234 scoped_restore_current_language.
5235
5236 2017-10-11 Tom Tromey <tom@tromey.com>
5237
5238 * breakpoint.c (commands_command_1): Use std::string.
5239 (cleanup_executing_breakpoints): Remove.
5240 (bpstat_do_actions_1): Use scoped_restore.
5241 (bpstat_check_watchpoint): Use std::string.
5242 (decode_static_tracepoint_spec): Likewise.
5243 (break_range_command): Likewise.
5244 (watch_command_1): Likewise.
5245 (compare_breakpoints): Change argument types.
5246 (clear_command): Use std::vector.
5247 (cleanup_executing_breakpoints): Remove.
5248 (update_global_location_list): Use unique_xmalloc_ptr.
5249 (strace_command): Remove unused declaration.
5250
5251 2017-10-11 John Baldwin <jhb@FreeBSD.org>
5252
5253 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
5254 * NEWS: Mention new FreeBSD/arm native configuration.
5255 * configure.host: Add arm*-*-freebsd*.
5256 * configure.nat: Likewise.
5257 * arm-fbsd-nat.c: New file.
5258
5259 2017-10-11 John Baldwin <jhb@FreeBSD.org>
5260
5261 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
5262 (ALLDEPFILES): Add arm-fbsd-tdep.c.
5263 * NEWS: Mention new FreeBSD/arm target.
5264 * configure.tgt: Add arm*-*-freebsd*.
5265 * arm-fbsd-tdep.c: New file.
5266 * arm-fbsd-tdep.h: New file.
5267
5268 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
5269
5270 * linux-tdep.c (linux_make_corefile_notes): Remove call to
5271 `gdbarch_elfcore_write_linux_prpsinfo'.
5272 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
5273 method.
5274 (elf_internal_linux_prpsinfo): Remove declaration.
5275 * gdbarch.h: Regenerate.
5276 * gdbarch.c: Regenerate.
5277
5278 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
5279
5280 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
5281 `set_gdbarch_elfcore_write_linux_prpsinfo'.
5282
5283 2017-10-11 Pedro Alves <palves@redhat.com>
5284
5285 * breakpoint.c (reattach_breakpoints): Delete.
5286 * breakpoint.h (reattach_breakpoints): Delete.
5287
5288 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
5289
5290 * symfile.c (registered_sym_fns): Make struct, not typedef.
5291 (DEF_VEC_O (registered_sym_fns)): Remove.
5292 (symtab_fns): Change type to std::vector.
5293 (add_symtab_fns): Adjust.
5294 (find_sym_fns): Adjust.
5295
5296 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
5297
5298 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
5299 * arc-tdep.h (arc_arch_is_em): New function.
5300 (arc_arch_is_hs): Likewise.
5301
5302 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
5303
5304 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
5305 parentheses in the declaration.
5306 (macro_lookup_inclusion): Likewise.
5307 (macro_lookup_definition): Likewise.
5308 * p-lang.h (pascal_builtin_types): Likewise.
5309 * tui/tui-data.c (tui_win_list): Likewise.
5310 * tui/tui-data.h (tui_win_list): Likewise.
5311 * utils.h (make_cleanup_free_section_addr_info): Likewise.
5312
5313 2017-10-11 Mark Rages <markrages@gmail.com>
5314
5315 * target-memory.c (block_boundaries): Fix for block address not
5316 aligned on block size.
5317
5318 2017-10-10 Pedro Alves <palves@redhat.com>
5319 Tom Tromey <tom@tromey.com>
5320
5321 * breakpoint.c (struct captured_breakpoint_query_args)
5322 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
5323 (print_breakpoint): New.
5324 * breakpoint.h (print_breakpoint): Declare.
5325 * common/common-exceptions.h (enum return_reason): Remove
5326 references to catch_exceptions.
5327 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
5328 Delete.
5329 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
5330 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
5331 * gdb.h: Delete.
5332 * gdbthread.h (thread_select): Declare.
5333 * mi/mi-cmd-break.c: Don't include gdb.h.
5334 (breakpoint_notify): Use print_breakpoint.
5335 * mi/mi-cmd-catch.c: Don't include gdb.h.
5336 * mi/mi-interp.c: Don't include gdb.h.
5337 (mi_print_breakpoint_for_event): New.
5338 (mi_breakpoint_created, mi_breakpoint_modified): Use
5339 mi_print_breakpoint_for_event.
5340 * mi/mi-main.c: Don't include gdb.h.
5341 (mi_cmd_thread_select): Parse the global thread ID here. Use
5342 thread_select instead of gdb_thread_select.
5343 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
5344 of using gdb_list_thread_ids.
5345 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
5346 FILEIO_ENOSYS here.
5347 (remote_fileio_request): Use TRY/CATCH instead of
5348 catch_exceptions.
5349 * symfile-mem.c (struct symbol_file_add_from_memory_args)
5350 (symbol_file_add_from_memory_wrapper): Delete.
5351 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
5352 * thread.c: Don't include gdb.h.
5353 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
5354 (thread_alive): Use thread_select.
5355 (do_captured_thread_select): Delete, parts salvaged as ...
5356 (thread_select): ... this new function.
5357 (gdb_thread_select): Delete.
5358
5359 2017-10-10 Pedro Alves <palves@redhat.com>
5360 Tom Tromey <tom@tromey.com>
5361
5362 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
5363 and reverse logic.
5364 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
5365 No longer macros. Instead ...
5366 (enum wp_check_result): They're now values of this new
5367 enumeration.
5368 (watchpoint_check): Change return type to wp_check_result and
5369 parameter type to bpstat.
5370 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
5371 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
5372 catch_errors. Reverse logic of watchpoint_check call.
5373 (breakpoint_re_set_one): Now returns void and takes a breakpoint
5374 pointer as parameter.
5375 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
5376 * common/common-exceptions.c (throw_exception_sjlj): Update
5377 comments to avoid mentioning catch_errors.
5378 * exceptions.c (catch_errors): Delete.
5379 * exceptions.h: Update comments to avoid mentioning catch_errors.
5380 (catch_errors_ftype, catch_errors): Delete.
5381 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
5382 (hook_stop_stub): Delete.
5383 (restore_selected_frame): Change return type to void, and
5384 parameter type to const frame_id &.
5385 (restore_infcall_control_state): Use TRY/CATCH instead of
5386 catch_errors.
5387 * main.c (captured_command_loop): Return void and remove
5388 parameter. Remove references to catch_errors.
5389 (captured_main): Use TRY/CATCH instead of catch_errors.
5390 * objc-lang.c (objc_submethod_helper_data)
5391 (find_objc_msgcall_submethod_helper): Delete.
5392 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
5393 catch_errors.
5394 * record-full.c (record_full_message): Return void.
5395 (record_full_message_args, record_full_message_wrapper): Delete.
5396 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
5397 instead of catch_errors.
5398 * solib-aix.c (solib_aix_open_symbol_file_object): Change
5399 parameter type to int.
5400 * solib-darwin.c (open_symbol_file_object): Ditto.
5401 * solib-dsbt.c (open_symbol_file_object): Ditto.
5402 * solib-frv.c (open_symbol_file_object): Ditto.
5403 * solib-svr4.c (open_symbol_file_object): Ditto.
5404 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
5405 * solib.c (update_solib_list): Use TRY/CATCH instead of
5406 catch_errors.
5407 * solist.h (struct target_so_ops) <open_symbol_file_object>:
5408 Change type.
5409 * symmisc.c (struct print_symbol_args): Remove.
5410 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
5411 (print_symbol): Change type.
5412 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
5413 and remove parameters.
5414 (catch_errors): New.
5415 (get_windows_debug_event): Adjust.
5416
5417 2017-10-09 Tom Tromey <tom@tromey.com>
5418
5419 * mi/mi-main.c (free_splay_tree): Remove.
5420 (list_available_thread_groups): Use splay_tree_up.
5421 * common/gdb_splay_tree.h: New file.
5422
5423 2017-10-09 Tom Tromey <tom@tromey.com>
5424
5425 * mi/mi-main.c (do_nothing): Remove.
5426 (list_available_thread_groups): Update.
5427
5428 2017-10-09 Pedro Alves <palves@redhat.com>
5429
5430 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
5431 reading registers when switching context.
5432
5433 2017-10-09 John Baldwin <jhb@FreeBSD.org>
5434
5435 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
5436 (fbsd_convert_siginfo): Likewise.
5437 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
5438
5439 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
5440
5441 * configure.ac (try_guile_versions): Remove guile-2.2.
5442 * configure: Regenerate.
5443
5444 2017-10-09 Tom Tromey <tom@tromey.com>
5445
5446 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
5447 (COMPILE.pre): Use $(CXX).
5448
5449 2017-10-09 Pedro Alves <palves@redhat.com>
5450
5451 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
5452 Use bool.
5453 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5454 * cp-support.h (cp_remove_params): Now returns a
5455 gdb::unique_xmalloc_ptr.
5456 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
5457 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
5458 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
5459 returning a gdb::unique_xmalloc_ptr.
5460 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5461 * stack.c (find_frame_funname): Adjust to cp_remove_params
5462 returning a gdb::unique_xmalloc_ptr.
5463
5464 2017-10-08 Tom Tromey <tom@tromey.com>
5465
5466 * dwarf2read.c (dwarf2_get_dwz_file): Use
5467 gdb::unique_xmalloc_ptr.
5468 (find_slot_in_mapped_hash): Likewise.
5469 (dwarf2_physname): Likewise.
5470 (create_dwo_unit_in_dwp_v1): Use std::string.
5471 (create_dwo_unit_in_dwp_v2): Likewise.
5472 (lookup_dwo_cutu): Likewise.
5473 (inherit_abstract_dies): Use std::vector.
5474 (read_array_type): Likewise.
5475 (dwarf_decode_macros): Remove unused declaration.
5476 (unsigned_int_compar): Remove.
5477 (dwarf2_build_psymtabs_hard): Use scoped_restore.
5478 (psymtabs_addrmap_cleanup): Remove.
5479
5480 2017-10-08 Tom Tromey <tom@tromey.com>
5481
5482 * frame-unwind.c (frame_unwind_try_unwinder): Update.
5483 * frame.h (frame_cleanup_after_sniffer): Declare.
5484 (frame_prepare_for_sniffer): Return void.
5485 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
5486 type of argument.
5487 (frame_prepare_for_sniffer): Return void.
5488
5489 2017-10-08 Tom Tromey <tom@tromey.com>
5490
5491 * utils.h (make_cleanup_value_free): Remove.
5492 * utils.c (do_value_free, struct cleanup): Remove.
5493 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
5494 Use gdb_value_up.
5495 * value.h (struct value_deleter): New.
5496 (gdb_value_up): New typedef.
5497
5498 2017-10-08 Tom Tromey <tom@tromey.com>
5499
5500 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
5501 (make_cleanup_free_search_symbols): Remove.
5502 (search_symbols): Return std::vector.
5503 (symbol_search::compare_search_syms): Now member of
5504 symbol_search. Change arguments.
5505 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
5506 (symtab_symbol_info, rbreak_command): Update.
5507 * symtab.h (struct symbol_search) <next>: Remove.
5508 Add constructors.
5509 (symbol_search::operator<): New function.
5510 (symbol_search::operator==): New function.
5511 (search_symbols): Remove std::vector.
5512 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
5513 (symbol_search::compare_search_syms): Declare.
5514
5515 2017-10-06 Yao Qi <yao.qi@linaro.org>
5516
5517 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
5518 arch/aarch64-insn.o.
5519 Remove one rule.
5520 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
5521
5522 2017-10-06 Yao Qi <yao.qi@linaro.org>
5523
5524 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
5525 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
5526 arch/arm-linux.o respectively.
5527 * configure.tgt: Likewise.
5528
5529 2017-10-06 Yao Qi <yao.qi@linaro.org>
5530
5531 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
5532 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
5533
5534 2017-10-06 Pedro Alves <palves@redhat.com>
5535
5536 * windows-nat.c: Include <algorithm>.
5537
5538 2017-10-06 Yao Qi <yao.qi@linaro.org>
5539
5540 * configure.tgt (i386_tobjs): New variable.
5541 (amd64_tobjs): New variable.
5542 Set $cpu_obs and $os_obs.
5543
5544 2017-10-06 Yao Qi <yao.qi@linaro.org>
5545
5546 * Makefile.in (CONFIG_SRC_SUBDIR): New.
5547 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
5548 (clean): Remove object files and dependency files.
5549 (distclean): Remove the directory.
5550 * configure.ac: Invoke AC_CONFIG_COMMANDS.
5551 * configure: Re-generated.
5552 * configure.tgt: Replace amd64.o with arch/amd64.o.
5553
5554 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
5555
5556 PR build/22188
5557 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
5558 and SETEND.
5559
5560 2017-10-05 Pedro Alves <palves@redhat.com>
5561
5562 * linux-nat.c (linux_child_follow_fork): When following the parent
5563 and detaching the child, consult the parent thread's architecture
5564 instead of the child's.
5565
5566 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5567
5568 * ax.h: Do not include "doublest.h".
5569 (union agent_val): Remove.
5570
5571 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5572
5573 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
5574 (decimal_to_string): Return std::string object.
5575 (decimal_from_string): Accept std::string object. Return bool.
5576 (decimal_from_integral, decimal_from_doublest): Remove.
5577 (decimal_from_longest): Add prototype.
5578 (decimal_from_ulongest): Likewise.
5579 (decimal_to_longest): Likewise.
5580 (decimal_from_doublest): Likewise.
5581 * dfp.c: Do not include "gdbtypes.h" or "value.h".
5582 (MAX_DECIMAL_STRING): Move here.
5583 (decimal_to_string): Return std::string object.
5584 (decimal_from_string): Accept std::string object. Return bool.
5585 (decimal_from_integral): Remove, replace by ...
5586 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
5587 (decimal_to_longest): New function.
5588 (decimal_from_floating): Remove, replace by ...
5589 (decimal_from_doublest): ... this new function.
5590 (decimal_to_doublest): Update to new decimal_to_string interface.
5591
5592 * value.c (unpack_long): Use decimal_to_longest.
5593 * valops.c (value_cast): Use decimal_from_doublest instead of
5594 decimal_from_floating. Use decimal_from_[u]longest isntead of
5595 decimal_from_integral.
5596 * valarith.c (value_args_as_decimal): Likewise.
5597 * valprint.c (print_decimal_floating): Update to new
5598 decimal_to_string interface.
5599 * printcmd.c (printf_decfloat): Likewise.
5600 * c-exp.y (parse_number): Update to new decimal_from_string interface.
5601
5602 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5603
5604 * doublest.h: Do not include "floatformat.h". Remove stale comments.
5605 * gdbtypes.c: Include "floatformat.h".
5606 * value.c: Likewise.
5607 * m68k-tdep.c: Likewise.
5608
5609 * findvar.c: Do not include "floatformat.h".
5610 * amd64-darwin-tdep.c: Likewise.
5611 * arm-linux-tdep.c: Likewise.
5612 * i386-darwin-tdep.c: Likewise.
5613 * i387-tdep.c: Likewise.
5614 * m68k-linux-tdep.c: Likewise.
5615 * mep-tdep.c: Likewise.
5616 * mips-tdep.c: Likewise.
5617 * nios2-tdep.c: Likewise.
5618 * s390-linux-tdep.c: Likewise.
5619 * sparc-obsd-tdep.c: Likewise.
5620 * sparc-tdep.c: Likewise.
5621 * sparc64-tdep.c: Likewise.
5622 * spu-tdep.c: Likewise.
5623 * tic6x-tdep.c: Likewise.
5624 * tilegx-tdep.c: Likewise.
5625 * vax-tdep.c: Likewise.
5626 * xstormy16-tdep.c: Likewise.
5627 * xtensa-tdep.c: Likewise.
5628
5629 * top.c: Do not include "doublest.h".
5630 * aarch64-tdep.c: Likewise.
5631 * alpha-tdep.c: Likewise.
5632 * arm-linux-tdep.c: Likewise.
5633 * m68k-linux-tdep.c: Likewise.
5634 * tilegx-tdep.c: Likewise.
5635 * xstormy16-tdep.c: Likewise.
5636
5637 2017-10-05 John Baldwin <jhb@FreeBSD.org>
5638
5639 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
5640 (mipsn32_fbsd_sigframe): Define.
5641 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
5642 for FreeBSD/mipsn32.
5643
5644 2017-10-05 John Baldwin <jhb@FreeBSD.org>
5645
5646 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
5647 AT_HWCAP.
5648
5649 2017-10-05 Tristan Gingold <tgingold@free.fr>
5650
5651 * MAINTAINERS (Misc): Update my email address.
5652
5653 2017-10-04 Pedro Alves <palves@redhat.com>
5654
5655 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
5656 it instead of target_gdbarch.
5657 (get_remote_state, get_remote_packet_size): Adjust
5658 get_remote_arch_state calls, passing down target_gdbarch
5659 explicitly.
5660 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
5661 'gdbarch' and use it instead of target_gdbarch.
5662 (get_memory_packet_size): Adjust get_remote_arch_state calls,
5663 passing down target_gdbarch explicitly.
5664 (struct stop_reply) <arch>: New field.
5665 (remote_parse_stop_reply): Use the stopped thread's architecture,
5666 not the current inferior's. Save the architecture in the
5667 stop_reply.
5668 (process_stop_reply): Use the stop reply's architecture.
5669 (process_g_packet, remote_fetch_registers)
5670 (remote_prepare_to_store, store_registers_using_G)
5671 (remote_store_registers): Adjust get_remote_arch_state calls,
5672 using the regcache's architecture.
5673 (remote_get_trace_status): Adjust get_remote_arch_state calls,
5674 passing down target_gdbarch explicitly.
5675 * spu-multiarch.c (spu_thread_architecture): Defer to the target
5676 beneath instead of calling target_gdbarch.
5677 * target.c (default_thread_architecture): Use the specified
5678 inferior's architecture, instead of the current inferior's
5679 architecture (via target_gdbarch).
5680
5681 2017-10-04 Pedro Alves <palves@redhat.com>
5682
5683 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
5684 case.
5685 (regcache_print): Handle !target_has_registers here instead.
5686
5687 2017-10-04 Pedro Alves <palves@redhat.com>
5688
5689 * frame.c (create_test_frame): Delete.
5690 * frame.h (create_test_frame): Delete.
5691 * gdbarch-selftests.c: Include gdbthread.h and target.h.
5692 (class regcache_test): Delete.
5693 (test_target_has_registers, test_target_has_stack)
5694 (test_target_has_memory, test_target_prepare_to_store)
5695 (test_target_store_registers): New functions.
5696 (test_target_ops): New class.
5697 (register_to_value_test): Error out if there's already a
5698 process_stratum (or higher) target pushed. Create a fuller mock
5699 environment, with mock target_ops, inferior, address space, thread
5700 and inferior_ptid.
5701 * progspace.c (struct address_space): Move to ...
5702 * progspace.h (struct address_space): ... here.
5703 * regcache.h (regcache::~regcache, regcache::raw_write)
5704 [GDB_SELF_TEST]: No longer virtual.
5705
5706 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
5707
5708 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
5709
5710 2017-10-04 Pedro Alves <palves@redhat.com>
5711
5712 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
5713 out of 'between TRY and CATCH'.
5714
5715 2017-10-04 Pedro Alves <palves@redhat.com>
5716
5717 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
5718 * common/common-exceptions.h (TRY): Open an outermost scope.
5719 Expand intro comment.
5720 (CATCH): Reindent.
5721 (END_CATCH): Close the outermost scope.
5722 * completer.c (complete_line_internal): Add missing END_CATCH.
5723
5724 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5725
5726 * NEWS (Changes since GDB 8.0): Add entry about new
5727 'set-cwd-on-gdbserver' feature.
5728 (New remote packets): Add entry for QSetWorkingDir.
5729 * common/common-inferior.h (set_inferior_cwd): New prototype.
5730 * infcmd.c (set_inferior_cwd): Remove "static".
5731 (show_cwd_command): Expand text to include remote debugging.
5732 * remote.c: Add PACKET_QSetWorkingDir.
5733 (remote_protocol_features) <QSetWorkingDir>: New entry for
5734 PACKET_QSetWorkingDir.
5735 (extended_remote_set_inferior_cwd): New function.
5736 (extended_remote_create_inferior): Call
5737 "extended_remote_set_inferior_cwd".
5738 (_initialize_remote): Call "add_packet_config_cmd" for
5739 QSetWorkingDir.
5740
5741 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5742
5743 * NEWS (New commands): Mention "set/show cwd".
5744 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
5745 "cd" command's help text.
5746 * common/common-inferior.h (get_inferior_cwd): New prototype.
5747 * infcmd.c (inferior_cwd_scratch): New global variable.
5748 (set_inferior_cwd): New function.
5749 (get_inferior_cwd): Likewise.
5750 (set_cwd_command): Likewise.
5751 (show_cwd_command): Likewise.
5752 (_initialize_infcmd): Add "set/show cwd" commands.
5753 * inferior.h (class inferior) <cwd>: New field.
5754 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
5755 (fork_inferior): Change inferior's cwd before its execution.
5756 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
5757 to CreateProcess.
5758
5759 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5760
5761 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
5762 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
5763 (COMMON_OBS): Add gdb_tilde_expand.o.
5764 * common/gdb_tilde_expand.c: New file.
5765 * common/gdb_tilde_expand.h: Likewise.
5766
5767 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
5768
5769 * gdbarch.sh (objfile): Remove duplicate declaration.
5770 * gdbarch.h: Regenerate.
5771
5772 2017-10-03 Tom Tromey <tom@tromey.com>
5773
5774 * utils.c (internal_vproblem): Use string_vprintf.
5775
5776 2017-10-03 Tom Tromey <tom@tromey.com>
5777
5778 * printcmd.c (info_symbol_command): Use std::string.
5779
5780 2017-10-03 Tom Tromey <tom@tromey.com>
5781
5782 * top.c (gdb_safe_append_history): Use std::string.
5783
5784 2017-10-03 Tom Tromey <tom@tromey.com>
5785
5786 * event-top.c (stdin_event_handler): Update.
5787 * main.c (captured_main_1): Update.
5788 * top.h (make_delete_ui_cleanup): Remove.
5789 (struct ui): Add constructor and destructor.
5790 (new_ui, delete_ui): Remove.
5791 * top.c (make_delete_ui_cleanup): Remove.
5792 (new_ui_command): Use std::unique_ptr.
5793 (delete_ui_cleanup): Remove.
5794 (ui::ui): Rename from new_ui. Update.
5795 (free_ui): Remove.
5796 (ui::~ui): Rename from delete_ui. Update.
5797
5798 2017-10-03 Tom Tromey <tom@tromey.com>
5799
5800 * symfile.c (load_progress): Use gdb::byte_vector.
5801
5802 2017-10-03 Tom Tromey <tom@tromey.com>
5803
5804 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
5805 declaration.
5806 * printcmd.c (x_command): Remove unused declaration.
5807 * symfile.c (symbol_file_command): Remove unused declaration.
5808
5809 2017-10-03 Tom Tromey <tom@tromey.com>
5810
5811 * utils.c (internal_vproblem): Use std::string.
5812 (defaulted_query): Likewise.
5813
5814 2017-10-03 Tom Tromey <tom@tromey.com>
5815
5816 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
5817 * top.c (execute_command_to_string): Update.
5818 * utils.c (make_cleanup_restore_page_info): Remove.
5819 (do_restore_page_info_cleanup): Remove.
5820 (set_batch_flag_and_restore_page_info):
5821 New.
5822 (make_cleanup_restore_page_info): Remove.
5823 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5824 (~set_batch_flag_and_restore_page_info): New
5825 (make_cleanup_restore_uinteger): Remove.
5826 (make_cleanup_restore_integer): Remove.
5827 (struct restore_integer_closure): Remove.
5828 (restore_integer): Remove.
5829 * utils.h (struct set_batch_flag_and_restore_page_info): New
5830 class.
5831 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5832 (make_cleanup_restore_page_info): Remove.
5833 (make_cleanup_restore_uinteger) Remove.
5834 (make_cleanup_restore_integer) Remove.
5835
5836 2017-10-03 Tom Tromey <tom@tromey.com>
5837
5838 * record-full.h (record_full_gdb_operation_disable_set): Return
5839 scoped_restore_tmpl<int>.
5840 * infrun.c (adjust_pc_after_break): Update.
5841 (handle_signal_stop): Update.
5842 * record-full.c (record_full_gdb_operation_disable_set): Return
5843 scoped_restore_tmpl<int>.
5844 (record_full_wait_1, record_full_insert_breakpoint)
5845 (record_full_remove_breakpoint, record_full_save)
5846 (record_full_goto_insn): Update.
5847
5848 2017-10-02 Tom Tromey <tom@tromey.com>
5849
5850 PR rust/22236:
5851 * rust-lang.c (rust_val_print_str): New function.
5852 (val_print_struct): Call it.
5853 (rust_subscript): Preserve name of slice type.
5854
5855 2017-10-02 Tom Tromey <tom@tromey.com>
5856
5857 * rust-lang.c (rust_subscript): Handle slices in
5858 EVAL_AVOID_SIDE_EFFECTS case.
5859
5860 2017-10-02 Tom Tromey <tom@tromey.com>
5861
5862 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
5863
5864 2017-10-02 Tom Tromey <tom@tromey.com>
5865
5866 * rust-lang.h (rust_slice_type): Add "extern".
5867
5868 2017-10-02 Tom Tromey <tom@tromey.com>
5869 Pedro Alves <palves@redhat.com>
5870
5871 * ada-lang.h (ada_exc_info::operator<): Make const.
5872 (ada_exc_info::operator==): Make const.
5873 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
5874 Make const.
5875
5876 2017-09-29 Tom Tromey <tom@tromey.com>
5877
5878 * target.c (read_whatever_is_readable): Change type of "result".
5879 Update.
5880 (free_memory_read_result_vector): Remove.
5881 (read_memory_robust): Change return type. Update.
5882 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
5883 bin2hex, std::string.
5884 * target.h (memory_read_result_s): Remove typedef.
5885 (free_memory_read_result_vector): Remove.
5886 (read_memory_robust): Return std::vector.
5887
5888 2017-09-29 Tom Tromey <tom@tromey.com>
5889
5890 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
5891
5892 2017-09-29 Tom Tromey <tom@tromey.com>
5893
5894 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
5895 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
5896 operator< and operator==.
5897 (ada_exceptions_list): Return a std::vector.
5898 * ada-lang.c (ada_exc_info::operator<): Rename from
5899 compare_ada_exception_info.
5900 (ada_exc_info::operator==): New.
5901 (sort_remove_dups_ada_exceptions_list): Change type of
5902 "exceptions".
5903 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
5904 (ada_add_global_exceptions): Likewise.
5905 (ada_exceptions_list_1): Return a std::vector.
5906 (ada_exceptions_list): Likewise.
5907
5908 2017-09-29 Tom Tromey <tom@tromey.com>
5909
5910 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
5911 'std::set *'.
5912 (print_one_inferior): Update.
5913 (free_vector_of_ints): Remove.
5914 (list_available_thread_groups): Change "ids" to std::set.
5915 (mi_cmd_list_thread_groups): Update.
5916 (struct collect_cores_data) <core>: Now a std::set.
5917 (collect_cores): Update.
5918 (unique): Remove.
5919 (print_one_inferior): Update.
5920
5921 2017-09-29 Tom Tromey <tom@tromey.com>
5922
5923 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
5924 (mi_execute_async_cli_command): Likewise.
5925 (mi_cmd_trace_frame_collected): Use field_fmt.
5926
5927 2017-09-29 Tom Tromey <tom@tromey.com>
5928
5929 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
5930 gdb::byte_vector.
5931
5932 2017-09-29 Tom Tromey <tom@tromey.com>
5933
5934 * mi/mi-parse.c (mi_parse): Remove unused declaration.
5935
5936 2017-09-29 Tom Tromey <tom@tromey.com>
5937
5938 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
5939
5940 2017-09-29 Tom Tromey <tom@tromey.com>
5941
5942 * varobj.h (varobj_gen_name): Return std::string.
5943 * varobj.c (varobj_gen_name): Return std::string.
5944 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
5945 (mi_cmd_var_delete): Don't copy "name".
5946
5947 2017-09-29 Tom Tromey <tom@tromey.com>
5948
5949 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
5950 (mi_cmd_break_insert_1): Update.
5951
5952 2017-09-29 Tom Tromey <tom@tromey.com>
5953
5954 * target.h (make_scoped_defer_target_commit_resume): Update.
5955 * target.c (make_scoped_defer_target_commit_resume): Rename from
5956 make_cleanup_defer_target_commit_resume. Return a
5957 scoped_restore.
5958 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
5959
5960 2017-09-29 Tom Tromey <tom@tromey.com>
5961
5962 * main.c (captured_main_1): Remove unused declaration.
5963 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
5964
5965 2017-09-29 Tom Tromey <tom@tromey.com>
5966
5967 * symtab.c (search_symbols): Remove unused outer cleanup.
5968 (make_source_files_completion_list): Remove unused declaration.
5969
5970 2017-09-29 Tom Tromey <tom@tromey.com>
5971
5972 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
5973
5974 2017-09-29 Tom Tromey <tom@tromey.com>
5975
5976 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
5977 gdb::byte_vector.
5978
5979 2017-09-29 Tom Tromey <tom@tromey.com>
5980
5981 * complaints.c (vcomplaint): Use std::string.
5982
5983 2017-09-29 Tom Tromey <tom@tromey.com>
5984
5985 * tracepoint.c (trace_variable_command): Use std::string.
5986 (encode_actions_1): Remove unused declarations.
5987 (create_tsv_from_upload): Use std::string.
5988
5989 2017-09-29 Tom Tromey <tom@tromey.com>
5990
5991 * cp-support.c (gdb_demangle): Use std::string.
5992
5993 2017-09-29 Tom Tromey <tom@tromey.com>
5994
5995 * stack.c (parse_frame_specification): Use std::string
5996 (info_frame_command): Use gdb::unique_xmalloc_ptr.
5997
5998 2017-09-29 Tom Tromey <tom@tromey.com>
5999
6000 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
6001
6002 2017-09-29 Tom Tromey <tom@tromey.com>
6003
6004 * utils.c (vfprintf_maybe_filtered): Use std::string.
6005 (vfprintf_unfiltered): Likewise.
6006
6007 2017-09-29 Tom Tromey <tom@tromey.com>
6008
6009 * event-top.c (top_level_prompt): Return std::string.
6010 (display_gdb_prompt): Update.
6011
6012 2017-09-29 Tom Tromey <tom@tromey.com>
6013
6014 * unittests/common-utils-selftests.c (format): New function.
6015 (string_vprintf_tests): New function.
6016 (_initialize_common_utils_selftests): Register new tests.
6017 * common/common-utils.c (string_vprintf): New function.
6018 * common/common-utils.h (string_vprintf): Declare.
6019
6020 2017-09-29 Pedro Alves <palves@redhat.com>
6021
6022 * common/rsp-low.c (unpack_varlen_hex): Constify.
6023 * common/rsp-low.h (unpack_varlen_hex): Constify.
6024 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
6025 Constify.
6026 * remote.c (remote_set_permissions, read_ptid)
6027 (remote_current_thread, remote_get_threads_with_qthreadinfo)
6028 (remote_static_tracepoint_marker_at)
6029 (remote_static_tracepoint_markers_by_strid)
6030 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
6031 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
6032 (parse_tracepoint_definition, parse_tsv_definition)
6033 (parse_static_tracepoint_marker_definition): Constify.
6034 * tracepoint.h (parse_static_tracepoint_marker_definition)
6035 (parse_trace_status, parse_tracepoint_status)
6036 (parse_tracepoint_definition, parse_tsv_definition): Constify.
6037
6038 2017-09-29 Pedro Alves <palves@redhat.com>
6039
6040 * remote.c (target_buf, target_buf_size): Delete.
6041 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
6042 Use the connection's packet buffer instead.
6043 All callers adjusted.
6044 (_initialize_remote): Remove references to target_buf and
6045 target_buf_size.
6046
6047 2017-09-28 Pedro Alves <palves@redhat.com>
6048
6049 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6050 unittests/common-utils-selftests.c.
6051 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
6052 (COMMON_OBS): Remove utils-selftests.o.
6053 * utils-selftests.c: Move to ...
6054 * unittests/common-utils-selftests.c: ... here and rename self
6055 test to "string_printf".
6056
6057 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
6058
6059 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
6060 having NULL cus or tus.
6061
6062 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6063
6064 * arm-tdep.c: (convert_from_extended): Remove.
6065 (convert_to_extended): Likewise.
6066 (arm_extract_return_value): Use convert_typed_floating.
6067 (arm_store_return_value): Likewise.
6068
6069 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
6070 * sh-tdep.c: Do not include "floatformat.h".
6071 (sh_littlebyte_bigword_type): New function.
6072 (sh_register_convert_to_virtual): Use convert_typed_floating.
6073 (sh_register_convert_to_raw): Likewise.
6074 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
6075 (sh64_littlebyte_bigword_type): New function.
6076 (sh64_extract_return_value): Use convert_typed_floating.
6077 (sh64_register_convert_to_virtual): Likewise.
6078 (sh64_register_convert_to_raw): Likewise.
6079
6080 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6081
6082 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
6083 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
6084
6085 * gdbtypes.h (union type_specific): Make field floatformat hold
6086 just a single struct floatformat, not an array.
6087 (floatformat_from_type): Move here.
6088 * gdbtypes.c (floatformat_from_type): Move here. Update to
6089 changed TYPE_FLOATFORMAT definition.
6090 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
6091 (recursive_dump_type): Likewise.
6092 (init_float_type): Install correct floatformat for byte order.
6093 (arch_float_type): Likewise.
6094
6095 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6096
6097 * gdbtypes.c (init_type): Change incoming argument from
6098 length-in-bytes to length-in-bits. Assert length is a
6099 multiple of TARGET_CHAR_BITS.
6100 (arch_type, arch_flags_type): Likewise.
6101 (init_integer_type): Update call to init_type.
6102 (init_character_type): Likewise.
6103 (init_boolean_type): Likewise.
6104 (init_float_type): Likewise.
6105 (init_decfloat_type): Likewise.
6106 (init_complex_type): Likewise.
6107 (init_pointer_type): Likewise.
6108 (objfile_type): Likewise.
6109 (arch_integer_type): Update call to arch_type.
6110 (arch_character_type): Likewise.
6111 (arch_boolean_type): Likewise.
6112 (arch_float_type): Likewise.
6113 (arch_decfloat_type): Likewise.
6114 (arch_complex_type): Likewise.
6115 (arch_pointer_type): Likewise.
6116 (gdbtypes_post_init): Likewise.
6117
6118 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
6119 (read_base_type): Likewise.
6120 * mdebugread.c (basic_type): Likewise.
6121 * stabsread.c (dbx_init_float_type): Likewise.
6122 (rs6000_builtin_type): Likewise.
6123 (read_range_type): Likewise. Also, fix call to init_integer_type
6124 with erroneous length argument.
6125
6126 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
6127 * d-lang.c (build_d_types): Likewise.
6128 * f-lang.c (build_fortran_types): Likewise.
6129 * go-lang.c (build_go_types): Likewise.
6130 * opencl-lang.c (build_opencl_types): Likewise.
6131 * jit.c (finalize_symtab): Likewise.
6132 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
6133 (build_std_type_info_type): Likewise.
6134 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
6135 update call to arch_flags_type.
6136
6137 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
6138 arch_type.
6139 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
6140 * windows-tdep.c (windows_get_tlb_type): Likewise.
6141
6142 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
6143 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6144 * m32c-tdep.c (make_types): Likewise.
6145 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
6146 (rl78_psw_type): Update call to arch_flags_type.
6147 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
6148 * rx-tdep.c (rx_psw_type): Likewise.
6149 (rx_fpsw_type): Likewise.
6150 * sparc-tdep.c (sparc_psr_type): Likewise.
6151 (sparc_fsr_type): Likewise.
6152 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
6153 (sparc64_ccr_type): Likewise.
6154 (sparc64_fsr_type): Likewise.
6155 (sparc64_fprs_type): Likewise.
6156
6157 2017-09-27 Tom Tromey <tom@tromey.com>
6158
6159 * findcmd.c (find_command): Constify.
6160
6161 2017-09-27 Tom Tromey <tom@tromey.com>
6162
6163 * ada-tasks.c (task_command_1, task_command): Constify.
6164
6165 2017-09-27 Tom Tromey <tom@tromey.com>
6166
6167 * symtab.c (maintenance_print_symbol_cache)
6168 (maintenance_flush_symbol_cache)
6169 (maintenance_print_symbol_cache_statistics): Constify.
6170
6171 2017-09-27 Tom Tromey <tom@tromey.com>
6172
6173 * inferior.c (detach_inferior_command, kill_inferior_command)
6174 (inferior_command): Constify.
6175
6176 2017-09-27 Tom Tromey <tom@tromey.com>
6177
6178 * regcache.c (regcache_print, maintenance_print_registers)
6179 (maintenance_print_raw_registers)
6180 (maintenance_print_cooked_registers)
6181 (maintenance_print_register_groups)
6182 (maintenance_print_remote_registers): Constify.
6183
6184 2017-09-27 Tom Tromey <tom@tromey.com>
6185
6186 * printcmd.c (map_display_numbers, undisplay_command)
6187 (enable_disable_display_command, enable_display_command)
6188 (disable_display_command): Constify.
6189
6190 2017-09-27 Tom Tromey <tom@tromey.com>
6191
6192 * breakpoint.h (delete_command): Don't declare.
6193 * breakpoint.c (delete_command, enable_once_command)
6194 (enable_count_command, enable_delete_command, breakpoint_1)
6195 (maintenance_info_breakpoints, stopin_command, stopat_command)
6196 (delete_command, delete_trace_command, save_breakpoints)
6197 (save_breakpoints_command, save_tracepoints_command): Constify.
6198
6199 2017-09-27 Tom Tromey <tom@tromey.com>
6200
6201 * macrocmd.c (macro_expand_command, macro_expand_once_command)
6202 (skip_ws, extract_identifier, macro_define_command)
6203 (macro_undef_command, macro_list_command): Constify.
6204
6205 2017-09-27 Tom Tromey <tom@tromey.com>
6206
6207 * infcmd.c (environment_info, set_environment_command)
6208 (unset_environment_command, path_info, info_proc_cmd_1)
6209 (info_proc_cmd_mappings, info_proc_cmd_stat)
6210 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
6211 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
6212
6213 2017-09-27 Tom Tromey <tom@tromey.com>
6214
6215 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
6216 Constify.
6217
6218 2017-09-27 Tom Tromey <tom@tromey.com>
6219
6220 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
6221
6222 2017-09-27 Tom Tromey <tom@tromey.com>
6223
6224 * demangle.c (demangle_command): Constify.
6225
6226 2017-09-27 Tom Tromey <tom@tromey.com>
6227
6228 * progspace.c (maintenance_info_program_spaces_command):
6229 Constify.
6230
6231 2017-09-27 Tom Tromey <tom@tromey.com>
6232
6233 * compile/compile.c (check_raw_argument, compile_file_command)
6234 (compile_code_command, compile_print_command): Constify.
6235
6236 2017-09-27 Tom Tromey <tom@tromey.com>
6237
6238 * reggroups.c (maintenance_print_reggroups): Constify.
6239
6240 2017-09-27 Tom Tromey <tom@tromey.com>
6241
6242 * dwarf2read.c (save_gdb_index_command): Constify.
6243
6244 2017-09-27 Tom Tromey <tom@tromey.com>
6245
6246 * stap-probe.c (info_probes_stap_command): Constify.
6247
6248 2017-09-27 Tom Tromey <tom@tromey.com>
6249
6250 * fork-child.c (unset_exec_wrapper_command): Constify.
6251
6252 2017-09-27 Tom Tromey <tom@tromey.com>
6253
6254 * btrace.c (get_uint, get_context_size, no_chunk)
6255 (maint_btrace_packet_history_cmd)
6256 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
6257 (maint_info_btrace_cmd): Constify.
6258
6259 2017-09-27 Tom Tromey <tom@tromey.com>
6260
6261 * reverse.c (delete_bookmark_command): Constify.
6262
6263 2017-09-27 Tom Tromey <tom@tromey.com>
6264
6265 * remote.c (set_memory_packet_size)
6266 (set_memory_write_packet_size, show_memory_write_packet_size)
6267 (set_memory_read_packet_size, show_memory_read_packet_size)
6268 (compare_sections_command, packet_command, remote_put_command)
6269 (remote_get_command, remote_delete_command): Constify.
6270
6271 2017-09-27 Tom Tromey <tom@tromey.com>
6272
6273 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
6274 (set_mipsfpu_double_command, set_mipsfpu_none_command)
6275 (set_mipsfpu_auto_command): Constify.
6276
6277 2017-09-27 Tom Tromey <tom@tromey.com>
6278
6279 * cli/cli-cmds.h (cd_command): Constify.
6280 * cli/cli-cmds.c (cd_command): Constify.
6281
6282 2017-09-27 Tom Tromey <tom@tromey.com>
6283
6284 * thread.c (thread_name_command, thread_find_command): Constify.
6285
6286 2017-09-27 Tom Tromey <tom@tromey.com>
6287
6288 * probe.c (enable_probes_command, disable_probes_command):
6289 Constify.
6290
6291 2017-09-27 Tom Tromey <tom@tromey.com>
6292
6293 * symfile.c (symbol_file_command): Constify.
6294 * gdbcore.h (deprecated_file_changed_hook): Constify.
6295 * exec.c (deprecated_file_changed_hook, exec_file_command)
6296 (file_command): Constify.
6297 * defs.h (symbol_file_command): Constify.
6298
6299 2017-09-27 Tom Tromey <tom@tromey.com>
6300
6301 * remote-fileio.c (set_system_call_allowed)
6302 (show_system_call_allowed): Constify.
6303
6304 2017-09-27 Tom Tromey <tom@tromey.com>
6305
6306 * tracepoint.c (delete_trace_variable_command)
6307 (tfind_end_command, tfind_start_command, tfind_pc_command)
6308 (tfind_tracepoint_command, tfind_line_command)
6309 (tfind_range_command, tfind_outside_command): Constify.
6310
6311 2017-09-27 Tom Tromey <tom@tromey.com>
6312
6313 * ax-gdb.c (maint_agent_printf_command, agent_command)
6314 (agent_eval_command): Constify.
6315
6316 2017-09-27 Tom Tromey <tom@tromey.com>
6317
6318 * tracepoint.c (info_scope_command): Constify.
6319 * python/python.c (gdbpy_decode_line): Constify.
6320 * python/py-breakpoint.c (bppy_init): Constify.
6321 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
6322 * location.h: (new_linespec_location)
6323 (string_to_event_location_basic, string_to_event_location):
6324 Constify.
6325 * location.c (new_linespec_location)
6326 (string_to_event_location_basic, string_to_event_location):
6327 Constify.
6328 * linespec.h (decode_line_with_current_source)
6329 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
6330 * linespec.c (linespec_lex_to_end)
6331 (decode_line_with_current_source)
6332 (decode_line_with_last_displayed): Constify.
6333 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
6334 Constify.
6335 * cli/cli-cmds.c (edit_command, list_command): Constify.
6336 * breakpoint.h (until_break_command, watch_command_wrapper)
6337 (awatch_command_wrapper, rwatch_command_wrapper)
6338 (init_ada_exception_breakpoint): Constify.
6339 * breakpoint.c (break_command_1, dprintf_command)
6340 (break_range_command, watch_command_wrapper)
6341 (rwatch_command_wrapper, awatch_command_wrapper)
6342 (until_break_command, init_ada_exception_breakpoint)
6343 (strace_marker_create_sals_from_location, trace_command)
6344 (ftrace_command, strace_command, struct tracepoint): Constify.
6345 * ax-gdb.c (agent_command_1): Constify.
6346 * ada-lang.c (ada_exception_sal): Constify.
6347
6348 2017-09-27 Tom Tromey <tom@tromey.com>
6349
6350 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
6351 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
6352 (get_context_size, no_chunk, get_insn_history_modifiers)
6353 (cmd_record_insn_history, get_call_history_modifiers)
6354 (cmd_record_call_history): Constify.
6355
6356 2017-09-27 Tom Tromey <tom@tromey.com>
6357
6358 * source.c (show_substitute_path_command)
6359 (unset_substitute_path_command, set_substitute_path_command):
6360 Constify.
6361
6362 2017-09-27 Tom Tromey <tom@tromey.com>
6363
6364 * typeprint.c (maintenance_print_type): Constify.
6365 * maint.c (maintenance_dump_me, maintenance_demangle)
6366 (maintenance_time_display, maintenance_info_sections)
6367 (maintenance_print_statistics, maintenance_deprecate)
6368 (maintenance_undeprecate): Constify.
6369 (maintenance_do_deprecate): Constify. Use std::string.
6370 (maintenance_selftest): Constify.
6371 * gdbtypes.h (maintenance_print_type): Constify.
6372
6373 2017-09-27 Tom Tromey <tom@tromey.com>
6374
6375 * hppa-tdep.c (unwind_command): Constify.
6376
6377 2017-09-27 Tom Tromey <tom@tromey.com>
6378
6379 * target-descriptions.c (unset_tdesc_filename_cmd)
6380 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
6381 Constify.
6382
6383 2017-09-27 Tom Tromey <tom@tromey.com>
6384
6385 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
6386
6387 2017-09-27 Tom Tromey <tom@tromey.com>
6388
6389 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
6390
6391 2017-09-27 Tom Tromey <tom@tromey.com>
6392
6393 * tui/tui-regs.c (tui_reg_command): Constify.
6394
6395 2017-09-27 Tom Tromey <tom@tromey.com>
6396
6397 * skip.c (skip_file_command, skip_function_command)
6398 (skip_enable_command, skip_disable_command, skip_delete_command):
6399 Constify.
6400
6401 2017-09-27 Tom Tromey <tom@tromey.com>
6402
6403 * record-btrace.c (cmd_record_btrace_bts_start)
6404 (cmd_record_btrace_pt_start): Constify.
6405
6406 2017-09-27 Tom Tromey <tom@tromey.com>
6407
6408 * symmisc.c (maintenance_print_symbols)
6409 (maintenance_print_msymbols, maintenance_print_objfiles)
6410 (maintenance_info_symtabs, maintenance_check_symtabs)
6411 (maintenance_expand_symtabs, maintenance_info_line_tables):
6412 Constify.
6413
6414 2017-09-27 Tom Tromey <tom@tromey.com>
6415
6416 * top.c (new_ui_command): Constify.
6417
6418 2017-09-27 Tom Tromey <tom@tromey.com>
6419
6420 * symfile.c (add_symbol_file_command)
6421 (remove_symbol_file_command, list_overlays_command)
6422 (map_overlay_command, unmap_overlay_command)
6423 (overlay_auto_command, overlay_manual_command)
6424 (overlay_off_command, overlay_load_command): Constify.
6425
6426 2017-09-27 Tom Tromey <tom@tromey.com>
6427
6428 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
6429 (info_spu_mailbox_command, info_spu_dma_command)
6430 (info_spu_proxydma_command): Constify.
6431
6432 2017-09-27 Tom Tromey <tom@tromey.com>
6433
6434 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
6435
6436 2017-09-27 Tom Tromey <tom@tromey.com>
6437
6438 * cli/cli-script.c (user_defined_command): Constify.
6439
6440 2017-09-27 Tom Tromey <tom@tromey.com>
6441
6442 * cli/cli-dump.c (dump_memory_command, dump_value_command)
6443 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
6444 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
6445 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
6446 (dump_binary_value, append_binary_memory, append_binary_value):
6447 Constify.
6448 (struct dump_context) <func>: Constify.
6449 (add_dump_command): Update.
6450
6451 2017-09-27 Tom Tromey <tom@tromey.com>
6452
6453 * cli/cli-cmds.c (show_version, show_configuration)
6454 (source_command, show_user): Constify.
6455
6456 2017-09-27 Tom Tromey <tom@tromey.com>
6457
6458 * target.c (maintenance_print_target_stack): Constify.
6459
6460 2017-09-27 Tom Tromey <tom@tromey.com>
6461
6462 * interps.c (interpreter_exec_cmd): Constify.
6463
6464 2017-09-27 Tom Tromey <tom@tromey.com>
6465
6466 * record-full.c (cmd_record_full_restore): Constify.
6467
6468 2017-09-27 Tom Tromey <tom@tromey.com>
6469
6470 * memattr.c (enable_mem_command, disable_mem_command)
6471 (delete_mem_command): Constify.
6472
6473 2017-09-27 Tom Tromey <tom@tromey.com>
6474
6475 * value.c (show_convenience): Constify.
6476
6477 2017-09-27 Tom Tromey <tom@tromey.com>
6478
6479 * gdbcore.h (core_file_command): Update.
6480 * corefile.c (core_file_command): Constify.
6481
6482 2017-09-27 Tom Tromey <tom@tromey.com>
6483
6484 * user-regs.c (maintenance_print_user_registers): Constify.
6485
6486 2017-09-27 Tom Tromey <tom@tromey.com>
6487
6488 * cp-namespace.c (maintenance_cplus_namespace): Constify.
6489
6490 2017-09-27 Tom Tromey <tom@tromey.com>
6491
6492 * cp-support.c (first_component_command): Constify.
6493
6494 2017-09-27 Tom Tromey <tom@tromey.com>
6495
6496 * psymtab.c (maintenance_print_psymbols)
6497 (maintenance_info_psymtabs, maintenance_check_psymtabs):
6498 Constify.
6499
6500 2017-09-27 Tom Tromey <tom@tromey.com>
6501
6502 * windows-tdep.c (display_tib): Constify.
6503
6504 2017-09-27 Tom Tromey <tom@tromey.com>
6505
6506 * linux-fork.c (delete_checkpoint_command)
6507 (detach_checkpoint_command): Constify.
6508
6509 2017-09-27 Tom Tromey <tom@tromey.com>
6510
6511 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
6512
6513 2017-09-27 Tom Tromey <tom@tromey.com>
6514
6515 * arc-tdep.c (dump_arc_instruction_command): Constify.
6516
6517 2017-09-27 Tom Tromey <tom@tromey.com>
6518
6519 * valprint.c (set_radix, show_radix): Constify.
6520
6521 2017-09-27 Tom Tromey <tom@tromey.com>
6522
6523 * dtrace-probe.c (info_probes_dtrace_command): Constify.
6524
6525 2017-09-27 Tom Tromey <tom@tromey.com>
6526
6527 * command.h (not_just_help_class_command): Update.
6528 * cli/cli-decode.h (not_just_help_class_command): Update.
6529 * cli/cli-decode.c (not_just_help_class_command): Constify.
6530
6531 2017-09-27 Tom Tromey <tom@tromey.com>
6532
6533 * gdb_bfd.c (maintenance_info_bfds): Constify.
6534
6535 2017-09-27 Tom Tromey <tom@tromey.com>
6536
6537 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
6538 overloads.
6539 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
6540 (do_const_cfunc): New function.
6541 (cmd_cfunc_eq): New overload.
6542 (cli_user_command_p): Check do_const_cfunc.
6543 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
6544 const_cfunc.
6545 * command.h (add_cmd): Add const overload and no-function
6546 overload.
6547 (set_cmd_cfunc): Add const overload.
6548 (cmd_const_cfunc_ftype): Declare.
6549 (cmd_cfunc_eq): Add const overload.
6550 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
6551 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
6552 overload.
6553
6554 2017-09-27 Tom Tromey <tom@tromey.com>
6555
6556 * macroexp.c (get_next_token_for_substitution): New function.
6557 (substitute_args): Call it. Check for __VA_OPT__.
6558
6559 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
6560 Pedro Alves <palves@redhat.com>
6561
6562 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
6563 producer_is_icc_lt_14.
6564 (producer_is_icc_lt_14): New function.
6565 (check_producer): Add code for checking version of ICC.
6566 (producer_is_icc): Move to producer.c.
6567 (read_structure_type): Restrict ICC workaround to ICC<14.
6568 * producer.c: Include selftest.h.
6569 (producer_is_icc, producer_parsing_tests, _initialize_producer):
6570 New functions.
6571 * producer.h (producer_is_icc): New declaration.
6572
6573 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
6574
6575 * Makefile.in (SFILES): Add producer.c.
6576 (COMMON_OBS): Add producer.o
6577 * amd64-tdep.c (producer.h): Add new include.
6578 * dwarf2read.c (producer.h): Add new include.
6579 * producer.c: New file.
6580 * producer.h: New file.
6581 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
6582 producer.c.
6583 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
6584 producer.h.
6585
6586 2017-09-26 Matthias Klose <doko@ubuntu.com>
6587
6588 * configure.ac: Search ncursesw before ncurses.
6589 Check ncursesw/ncurses.h before ncurses/ncurses.h.
6590 * gdb_curses.h: Include <ncursesw/ncurses.h>
6591 * config.in, configure: Regenerate.
6592
6593 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6594
6595 PR gdb/22185
6596 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
6597 obsolete.
6598 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
6599 Remove i386sol2 support.
6600 * configure.nat <i386sol2>: Remove.
6601 <sol2-64>: Fold into ...
6602 <sol2>: ... this.
6603 Move common settings to default section.
6604 Add sol-thread.o.
6605 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
6606 x86_64-*-solaris2.1[0-9]*>: Rename to ...
6607 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
6608 <i[34567]86-*-solaris*>: Remove.
6609 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
6610
6611 * configure.ac: Remove wctype in libw check.
6612 (_MSE_INT_H): Don't define on Solaris 7-9.
6613 <solaris*>: Remove libthread_db.so.1 check.
6614 * configure: Regenerate.
6615 * config.in: Regenerate.
6616
6617 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
6618 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
6619 (gdb_ps_size_t): Remove.
6620 Use base types in users.
6621 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
6622
6623 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
6624
6625 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6626
6627 PR build/22206
6628 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
6629 (adi_is_addr_mapped): Likewise.
6630 (PSR_ICC): Don't redefine.
6631 (PSR_IMPL): Likewise.
6632
6633 2017-09-25 Tom Tromey <tom@tromey.com>
6634
6635 * regcache.c (regcache::dump): Use string_printf.
6636
6637 2017-09-25 Tom Tromey <tom@tromey.com>
6638
6639 * regcache.c (class regcache_invalidator): New.
6640 (struct register_to_invalidate): Remove.
6641 (make_cleanup_regcache_invalidate): Remove.
6642 (regcache::raw_write): Use regcache_invalidator.
6643
6644 2017-09-25 Tom Tromey <tom@tromey.com>
6645
6646 * spu-tdep.c (spu2ppu_sniffer): Update.
6647 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
6648 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
6649 Remove.
6650 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
6651 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
6652 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
6653 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
6654 (frame_pop): Update.
6655
6656 2017-09-25 Tom Tromey <tom@tromey.com>
6657
6658 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
6659 * regcache.h (regcache_xfree): Don't declare.
6660 * regcache.c (regcache_xfree): Remove.
6661 (do_regcache_xfree): Use delete.
6662 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
6663 * linux-fork.c (free_fork): Use delete.
6664 (fork_save_infrun_state): Likewise.
6665 * jit.c (jit_dealloc_cache): Use delete.
6666 * infrun.c (discard_infcall_suspend_state): Use delete.
6667
6668 2017-09-25 Tom Tromey <tom@tromey.com>
6669
6670 * regcache.h (regcache_xmalloc): Don't declare.
6671 (regcache_raw_set_cached_value): Update comment.
6672 * regcache.c (regcache_xmalloc): Remove.
6673 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
6674 * jit.c (jit_frame_sniffer): Use new.
6675 * frame.c (frame_save_as_regcache): Use new.
6676
6677 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6678
6679 * NEWS: Advertise support for guarded-storage registers on IBM z.
6680
6681 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6682
6683 * s390-linux-nat.c (have_regset_gs): New static variable.
6684 (s390_linux_fetch_inferior_registers): Handle guarded-storage
6685 control block and guarded-storage broadcast control regsets.
6686 (s390_read_description): Detect whether the target has
6687 guarded-storage support, return appropriate tdesc.
6688 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
6689 (features/s390x-gs-linux64.c): Likewise.
6690 (struct gdbarch_tdep) <have_gs>: New field.
6691 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
6692 (s390_gsbc_regset): New variables.
6693 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
6694 and s390_gsbc_regset, if applicable.
6695 (s390_core_read_description): Check whether core file was from a
6696 target with guarded-storage support; include appropriate regsets.
6697 (s390_gdbarch_init): Add registers for guarded-storage support.
6698 (_initialize_s390_tdep): Initialize new target descriptions that
6699 include registers for guarded-storage support.
6700 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
6701 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
6702 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
6703 (S390_NUM_REGS): Adjust macro definition.
6704 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
6705 (tdesc_s390x_gs_linux64): New declarations.
6706
6707 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6708
6709 * features/s390-gs-linux64.xml: New file.
6710 * features/s390-gs.xml: New file.
6711 * features/s390-gsbc.xml: New file.
6712 * features/s390x-gs-linux64.xml: New file.
6713 * features/Makefile (WHICH): Add s390-gs-linux64 and
6714 s390x-gs-linux64.
6715 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
6716 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
6717 * features/s390-gs-linux64.c: New generated file.
6718 * features/s390x-gs-linux64.c: New file.
6719 * regformats/s390-gs-linux64.dat: New file.
6720 * regformats/s390x-gs-linux64.dat: New file.
6721
6722 2017-09-23 Tom Tromey <tom@tromey.com>
6723
6724 * defs.h (make_cleanup_override_quit_handler): Don't declare.
6725
6726 2017-09-22 Tom Tromey <tom@tromey.com>
6727
6728 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
6729 type to scoped_restore_tmpl.
6730 <scoped_input_handler>: Initialize m_quit_handler directly.
6731
6732 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
6733
6734 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
6735 (cd_command): Likewise. Free "current_directory" before
6736 assigning to it.
6737 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
6738 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
6739 * top.c (gdb_dirbuf): Remove global declaration.
6740 * top.h (gdb_dirbuf): Likewise.
6741
6742 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
6743
6744 * gnulib/aclocal.m4: Regenerate.
6745 * gnulib/config.in: Regenerate.
6746 * gnulib/configure: Regenerate.
6747 * gnulib/import/Makefile.am: Regenerate.
6748 * gnulib/import/Makefile.in: Regenerate.
6749 * gnulib/import/assure.h: New file.
6750 * gnulib/import/at-func.c: Likewise
6751 * gnulib/import/chdir-long.c: New file.
6752 * gnulib/import/chdir-long.h: New file.
6753 * gnulib/import/cloexec.c: New file.
6754 * gnulib/import/cloexec.h: New file.
6755 * gnulib/import/close.c: New file.
6756 * gnulib/import/closedir.c: New file.
6757 * gnulib/import/dirent-private.h: New file.
6758 * gnulib/import/dup-safer.c: New file.
6759 * gnulib/import/dup.c: New file.
6760 * gnulib/import/dup2.c: New file.
6761 * gnulib/import/error.c: New file.
6762 * gnulib/import/error.h: New file.
6763 * gnulib/import/exitfail.c: New file.
6764 * gnulib/import/exitfail.h: New file.
6765 * gnulib/import/fchdir.c: New file.
6766 * gnulib/import/fcntl.c: New file.
6767 * gnulib/import/fcntl.in.h: New file.
6768 * gnulib/import/fd-hook.c: New file.
6769 * gnulib/import/fd-hook.h: New file.
6770 * gnulib/import/fd-safer.c: New file.
6771 * gnulib/import/fdopendir.c: New file.
6772 * gnulib/import/filename.h: New file.
6773 * gnulib/import/filenamecat-lgpl.c: New file.
6774 * gnulib/import/filenamecat.h: New file.
6775 * gnulib/import/fstat.c: New file.
6776 * gnulib/import/fstatat.c: New file.
6777 * gnulib/import/getcwd-lgpl.c: New file.
6778 * gnulib/import/getcwd.c: New file.
6779 * gnulib/import/getdtablesize.c: New file.
6780 * gnulib/import/getlogin_r.c: New file.
6781 * gnulib/import/getprogname.c: New file.
6782 * gnulib/import/getprogname.h: New file.
6783 * gnulib/import/gettext.h: New file.
6784 * gnulib/import/glob-libc.h: New file.
6785 * gnulib/import/glob.c: New file.
6786 * gnulib/import/glob.in.h: New file.
6787 * gnulib/import/intprops.h: New file.
6788 * gnulib/import/m4/chdir-long.m4: New file.
6789 * gnulib/import/m4/close.m4: New file.
6790 * gnulib/import/m4/closedir.m4: New file.
6791 * gnulib/import/m4/d-ino.m4: New file.
6792 * gnulib/import/m4/d-type.m4: New file.
6793 * gnulib/import/m4/dup.m4: New file.
6794 * gnulib/import/m4/dup2.m4: New file.
6795 * gnulib/import/m4/error.m4: New file.
6796 * gnulib/import/m4/fchdir.m4: New file.
6797 * gnulib/import/m4/fcntl.m4: New file.
6798 * gnulib/import/m4/fcntl_h.m4: New file.
6799 * gnulib/import/m4/fdopendir.m4: New file.
6800 * gnulib/import/m4/filenamecat.m4: New file.
6801 * gnulib/import/m4/fstat.m4: New file.
6802 * gnulib/import/m4/fstatat.m4: New file.
6803 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
6804 * gnulib/import/m4/getcwd-path-max.m4: New file.
6805 * gnulib/import/m4/getcwd.m4: New file.
6806 * gnulib/import/m4/getdtablesize.m4: New file.
6807 * gnulib/import/m4/getlogin_r.m4: New file.
6808 * gnulib/import/m4/getprogname.m4: New file.
6809 * gnulib/import/m4/glob.m4: New file.
6810 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6811 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6812 * gnulib/import/m4/mempcpy.m4: New file.
6813 * gnulib/import/m4/memrchr.m4: New file.
6814 * gnulib/import/m4/mode_t.m4: New file.
6815 * gnulib/import/m4/msvc-inval.m4: New file.
6816 * gnulib/import/m4/msvc-nothrow.m4: New file.
6817 * gnulib/import/m4/open.m4: New file.
6818 * gnulib/import/m4/openat.m4: New file.
6819 * gnulib/import/m4/opendir.m4: New file.
6820 * gnulib/import/m4/readdir.m4: New file.
6821 * gnulib/import/m4/realloc.m4: New file.
6822 * gnulib/import/m4/rewinddir.m4: New file.
6823 * gnulib/import/m4/save-cwd.m4: New file.
6824 * gnulib/import/m4/strdup.m4: New file.
6825 * gnulib/import/m4/strerror.m4: New file.
6826 * gnulib/import/m4/unistd-safer.m4: New file.
6827 * gnulib/import/mempcpy.c: New file.
6828 * gnulib/import/memrchr.c: New file.
6829 * gnulib/import/msvc-inval.c: New file.
6830 * gnulib/import/msvc-inval.h: New file.
6831 * gnulib/import/msvc-nothrow.c: New file.
6832 * gnulib/import/msvc-nothrow.h: New file.
6833 * gnulib/import/open.c: New file.
6834 * gnulib/import/openat-die.c: New file.
6835 * gnulib/import/openat-priv.h: New file.
6836 * gnulib/import/openat-proc.c: New file.
6837 * gnulib/import/openat.c: New file.
6838 * gnulib/import/openat.h: New file.
6839 * gnulib/import/opendir.c: New file.
6840 * gnulib/import/pipe-safer.c: New file.
6841 * gnulib/import/readdir.c: New file.
6842 * gnulib/import/realloc.c: New file.
6843 * gnulib/import/rewinddir.c: New file.
6844 * gnulib/import/save-cwd.c: New file.
6845 * gnulib/import/save-cwd.h: New file.
6846 * gnulib/import/strdup.c: New file.
6847 * gnulib/import/strerror-override.c: New file.
6848 * gnulib/import/strerror-override.h: New file.
6849 * gnulib/import/strerror.c: New file.
6850 * gnulib/import/unistd--.h: New file.
6851 * gnulib/import/unistd-safer.h: New file.
6852 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
6853 "getcwd" and "glob".
6854 * ser-tcp.c: Undefine "close" before redefining it.
6855
6856 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6857
6858 * guile/scm-value.c (gdbscm_value_address): Initialize address,
6859 get rid of res_val.
6860
6861 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6862
6863 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
6864 <sol2,sparc>: Likewise.
6865 <sol2-64,i386>: Likewise.
6866
6867 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
6868 -Wdeprecated-declarations on *-*-solaris*.
6869 * configure: Regenerate.
6870
6871 * procfs.c: Include "nat/inferior.h".
6872 (procfs_info_proc): Fix typo.
6873
6874 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6875
6876 * remote.c (vector): Include.
6877 (struct private_thread_info): Add field, thread_handle.
6878 (free_private_thread_info): Deallocate storage associated with
6879 thread handle.
6880 (get_private_info_thread): Initialize `thread_handle' field.
6881 (struct thread_item): Add field, thread_handle.
6882 (clear_threads_listing_context): Deallocate storage associated
6883 with thread handle.
6884 (start_thread): Add support for "handle" attribute.
6885 (thread_attributes): Add "handle".
6886 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
6887 field.
6888 (remote_update_thread_list): Update thread_handle.
6889 (remote_thread_handle_to_thread_info): New function.
6890 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
6891
6892 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6893
6894 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
6895 function.
6896 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
6897 * python/python-internal.h (thread_object_type): Declare.
6898
6899 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6900
6901 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
6902 (target_thread_handle_to_thread_info): Declare.
6903 * target.c (target_thread_handle_to_thread_info): New function.
6904 * target-delegates.c: Regenerate.
6905 * gdbthread.h (find_thread_by_handle): Declare.
6906 * thread.c (find_thread_by_handle): New function.
6907 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
6908 function.
6909 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
6910
6911 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6912
6913 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
6914
6915 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6916
6917 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
6918
6919 2017-09-21 Yao Qi <yao.qi@linaro.org>
6920
6921 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
6922 to gdb_target_obs.
6923
6924 2017-09-20 Tom Tromey <tom@tromey.com>
6925
6926 * breakpoint.c (struct counted_command_line): Remove.
6927 (breakpoint_commands): Update.
6928 (alloc_counted_command_line, incref_counted_command_line)
6929 (decref_counted_command_line, do_cleanup_counted_command_line)
6930 (make_cleanup_decref_counted_command_line): Remove.
6931 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
6932 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
6933 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
6934 (save_breakpoints): Update.
6935 * breakpoint.h (counted_command_line): Now a typedef to
6936 shared_ptr.
6937 (struct breakpoint) <commands>: Now a counted_command_line.
6938 (struct bpstats) <command>: Likewise.
6939
6940 2017-09-20 Tom Tromey <tom@tromey.com>
6941
6942 * breakpoint.c (struct commands_info, do_map_commands_command):
6943 Remove.
6944 (commands_command_1): Update.
6945 (iterate_over_related_breakpoints): Take a function_view.
6946 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
6947 (delete_command): Update.
6948 (map_breakpoint_numbers): Take a function_view.
6949 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
6950 (disable_command): Update.
6951 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
6952 (enable_command): Update.
6953 (struct disp_data, do_enable_breakpoint_disp)
6954 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
6955 (do_map_enable_delete_breakpoint): Remove.
6956 (enable_once_command, enable_count_command, enable_delete_command)
6957 (delete_trace_variable_command): Update.
6958
6959 2017-09-20 Tom Tromey <tom@tromey.com>
6960
6961 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
6962 (bpstat_clear): Use delete.
6963 (bpstats): New constructors.
6964 (bpstat_copy, bpstat_stop_status): Use new.
6965 (dprintf_after_condition_true): Update.
6966 * breakpoint.h (bpstats::bpstats): Add constructors.
6967 (bpstats::~bpstats): Add destructor.
6968
6969 2017-09-20 Pedro Alves <palves@redhat.com>
6970
6971 * eval.c (make_params): Delete, refactored as ...
6972 (class fake_method): ... this new type's ctor.
6973 (fake_method::~fake_method): New.
6974 (evaluate_subexp_standard): Use 'fake_method'.
6975
6976 2017-09-20 Tom Tromey <tom@tromey.com>
6977
6978 * windows-nat.c (get_windows_debug_event, windows_wait)
6979 (do_initial_windows_stuff, windows_attach): Update.
6980 * utils.c (vwarning, internal_vproblem): Update.
6981 (ui_unregister_input_event_handler_cleanup)
6982 (prepare_to_handle_input): Remove.
6983 (class scoped_input_handler): New.
6984 (defaulted_query, prompt_for_continue): Update.
6985 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
6986 Update.
6987 * top.c (undo_terminal_modifications_before_exit): Update.
6988 * target/target.h (target_terminal_init, target_terminal_inferior)
6989 (target_terminal_ours): Don't declare.
6990 (class target_terminal): New.
6991 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
6992 (target_terminal_ours_for_output)
6993 (make_cleanup_restore_target_terminal): Don't declare.
6994 (target_terminal_info): Remove.
6995 * target.c (enum terminal_state, terminal_state): Remove.
6996 (target_terminal::terminal_state): Define.
6997 (target_terminal::init): Rename from target_terminal_init.
6998 (target_terminal::inferior): Rename from
6999 target_terminal_inferior.
7000 (target_terminal::ours): Rename from target_terminal_ours.
7001 (target_terminal::ours_for_output): Rename from
7002 target_terminal_ours_for_output.
7003 (target_terminal::info): New method.
7004 (cleanup_restore_target_terminal)
7005 (make_cleanup_restore_target_terminal): Remove.
7006 * solib.c (handle_solib_event): Update.
7007 * remote.c (remote_serial_quit_handler): Update.
7008 (remote_terminal_inferior, remote_wait_as): Update.
7009 * record-full.c (record_full_wait_1): Update.
7010 * nto-procfs.c (procfs_create_inferior): Update.
7011 * nat/fork-inferior.c (startup_inferior): Update.
7012 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
7013 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
7014 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
7015 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
7016 (mi_breakpoint_created, mi_breakpoint_deleted)
7017 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
7018 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7019 (mi_user_selected_context_changed, report_initial_inferior):
7020 Update.
7021 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
7022 (linux_nat_terminal_inferior): Update.
7023 * infrun.c (follow_fork_inferior)
7024 (handle_vfork_child_exec_or_exit, do_target_resume)
7025 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
7026 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
7027 Update.
7028 * inflow.c (child_terminal_init, info_terminal_command): Update.
7029 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
7030 (attach_command): Update.
7031 * infcall.c (call_thread_fsm_should_stop): Update.
7032 * gnu-nat.c (gnu_attach): Update.
7033 * extension.c (struct active_ext_lang_state)
7034 (restore_active_ext_lang): Update.
7035 * exceptions.c (print_flush): Update.
7036 * event-top.c (async_enable_stdin, default_quit_handler): Update.
7037 (struct quit_handler_cleanup_data, restore_quit_handler)
7038 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
7039 Remove.
7040 * cp-support.c (gdb_demangle): Update.
7041 * breakpoint.c (update_inserted_breakpoint_locations)
7042 (insert_breakpoint_locations, handle_jit_event)
7043 (disable_breakpoints_in_unloaded_shlib): Update.
7044 * annotate.c (annotate_breakpoints_invalid)
7045 (annotate_frames_invalid): Update.
7046
7047 2017-09-20 Tom Tromey <tom@tromey.com>
7048
7049 * main.c (catch_command_errors): Rename from
7050 catch_command_errors_const.
7051 (captured_main_1): Update.
7052
7053 2017-09-20 Pedro Alves <palves@redhat.com>
7054
7055 * cli/cli-cmds.c (list_command): Use print_sal_location.
7056 (print_sal_location): New function.
7057 (ambiguous_line_spec): Use print_sal_location.
7058 * linespec.c (symbol_to_sal): Record the symbol in the sal.
7059 * symtab.c (find_function_start_sal): Likewise.
7060 * symtab.h (symtab_and_line::symbol): New field.
7061
7062 2017-09-20 Pedro Alves <palves@redhat.com>
7063
7064 * linespec.c (minsym_found): Handle non-text minsyms.
7065 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
7066
7067 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7068
7069 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
7070 backslash.
7071
7072 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7073
7074 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
7075 vmovups instead vmovaps.
7076 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
7077
7078 2017-09-19 John Baldwin <jhb@FreeBSD.org>
7079
7080 * NEWS (Changes since GDB 8.0): Add starti.
7081 * infcmd.c (enum run_break): New.
7082 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
7083 case.
7084 (run_command): Use enum run_how.
7085 (start_command): Likewise.
7086 (starti_command): New function.
7087 (RUN_ARGS_HELP): New macro.
7088 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
7089 commands. Add starti command.
7090
7091 2017-09-19 Yao Qi <yao.qi@linaro.org>
7092
7093 * Makefile.in (monitor.o): Remove the rule.
7094
7095 2017-09-19 Yao Qi <yao.qi@linaro.org>
7096
7097 * annotate.h (struct annotate_arg_emitter): Use
7098 DISABLE_COPY_AND_ASSIGN.
7099 * common/refcounted-object.h (refcounted_object): Likewise.
7100 * completer.h (struct completion_result): Likewise.
7101 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
7102 * filename-seen-cache.h (filename_seen_cache): Likewise.
7103 * gdbcore.h (thread_section_name): Likewise.
7104 * gdb_regex.h (compiled_regex): Likewise.
7105 * gdbthread.h (scoped_restore_current_thread): Likewise.
7106 * inferior.h (scoped_restore_current_inferior): Likewise.
7107 * jit.c (jit_reader): Likewise.
7108 * linespec.h (struct linespec_result): Likewise.
7109 * mi/mi-parse.h (struct mi_parse): Likewise.
7110 * nat/fork-inferior.c (execv_argv): Likewise.
7111 * progspace.h (scoped_restore_current_program_space): Likewise.
7112 * python/python-internal.h (class gdbpy_enter): Likewise.
7113 * regcache.h (regcache): Likewise.
7114 * target-descriptions.c (struct tdesc_reg): Likewise.
7115 (struct tdesc_type): Likewise.
7116 (struct tdesc_feature): Likewise.
7117 * ui-out.h (ui_out_emit_type): Likewise.
7118
7119 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
7120
7121 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
7122 label abort_expression.
7123
7124 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7125
7126 * common/buffer.c (buffer_xml_printf): Adjust.
7127 * common/xml-utils.c (xml_escape_text): Change return type to
7128 std::string, update code accordingly.
7129 * common/xml-utils.h (xml_escape_text): Change return type to
7130 std::string.
7131 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
7132 * windows-tdep.c (windows_xfer_shared_library): Adjust.
7133 * unittests/xml-utils-selftests.c (test_xml_escape_text):
7134 Adjust.
7135
7136 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7137
7138 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
7139 (SUBDIR_UNITTESTS_OBS): Add new object file.
7140 * unittests/xml-utils-selftests.c: New file.
7141
7142 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7143
7144 * common/selftest.h (selftest): New struct/interface.
7145 (register_test): Add name parameter, add new overload.
7146 (run_tests): Add filter parameter.
7147 (for_each_selftest_ftype): New typedef.
7148 (for_each_selftest): New declaration.
7149 * common/selftest.c (tests): Change type to
7150 map<string, unique_ptr<selftest>>.
7151 (simple_selftest): New struct.
7152 (register_test): New function.
7153 (register_test): Add name parameter and use it.
7154 (run_tests): Add filter parameter and use it. Add prints.
7155 Adjust to vector -> map change.
7156 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
7157 registering selftests.
7158 * arm-tdep.c (_initialize_arm_tdep): Likewise.
7159 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
7160 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
7161 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
7162 * findvar.c (_initialize_findvar): Likewise.
7163 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
7164 * maint.c (maintenance_selftest): Update call to run_tests.
7165 (maintenance_info_selftests): New function.
7166 (_initialize_maint_cmds): Register "maintenance info selftests"
7167 command. Update "maintenance selftest" doc.
7168 * regcache.c (_initialize_regcache): Add names when registering
7169 selftests.
7170 * rust-exp.y (_initialize_rust_exp): Likewise.
7171 * selftest-arch.c (gdbarch_selftest): New struct.
7172 (gdbarch_tests): Remove.
7173 (register_test_foreach_arch): Add name parameter. Call
7174 register_test.
7175 (tests_with_arch): Remove, move most content to
7176 gdbarch_selftest::operator().
7177 (_initialize_selftests_foreach_arch): Remove.
7178 * selftest-arch.h (register_test_foreach_arch): Add name
7179 parameter.
7180 (run_tests_with_arch): New declaration.
7181 * utils-selftests.c (_initialize_utils_selftests): Add names
7182 when registering selftests.
7183 * utils.c (_initialize_utils): Likewise.
7184 * unittests/array-view-selftests.c
7185 (_initialize_array_view_selftests): Likewise.
7186 * unittests/environ-selftests.c (_initialize_environ_selftests):
7187 Likewise.
7188 * unittests/function-view-selftests.c
7189 (_initialize_function_view_selftests): Likewise.
7190 * unittests/offset-type-selftests.c
7191 (_initialize_offset_type_selftests): Likewise.
7192 * unittests/optional-selftests.c
7193 (_initialize_optional_selftests): Likewise.
7194 * unittests/scoped_restore-selftests.c
7195 (_initialize_scoped_restore_selftests): Likewise.
7196 * NEWS: Document "maintenance selftest" and "maint info
7197 selftests".
7198
7199 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7200
7201 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
7202 scoped_restore.
7203
7204 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7205
7206 * mi/mi-main.c (mi_load_progress): Make uiout variable
7207 a unique_ptr.
7208
7209 2017-09-15 Pedro Alves <palves@redhat.com>
7210
7211 * compile/compile-c-types.c (convert_enum, convert_int)
7212 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
7213
7214 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7215
7216 * dwarf2read.c (copy_string): Remove.
7217 (parse_macro_definition): Replace copy_string with savestring.
7218
7219 2017-09-15 Yao Qi <yao.qi@linaro.org>
7220
7221 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
7222 gdb_target_obs.
7223 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
7224 Likewise.
7225 (i[34567]86-*-linux*): Likewise.
7226
7227 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7228
7229 * dwarf2expr.h (dwarf_stack_value): Add constructor.
7230 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
7231 <stack>: Change type to std::vector.
7232 <stack_len, stack_allocated>: Remove.
7233 <grow_stack>: Remove.
7234 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7235 (dwarf_expr_context::~dwarf_expr_context): Remove.
7236 (dwarf_expr_context::grow_stack): Remove.
7237 (dwarf_expr_context::push): Adjust.
7238 (dwarf_expr_context::pop): Adjust.
7239 (dwarf_expr_context::fetch): Adjust.
7240 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
7241 (dwarf_expr_context::stack_empty_p): Adjust.
7242 (dwarf_expr_context::execute_stack_op): Adjust.
7243
7244 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7245
7246 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
7247 return type to bool.
7248 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
7249
7250 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7251
7252 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
7253 Change type to bool.
7254 (dwarf_stack_value) <in_stack_memory>: Likewise.
7255 (dwarf_expr_context) <push_address>: Change parameter type to
7256 bool.
7257 <fetch_in_stack_memory>: Change return type to bool.
7258 <push>: Change parameter type to bool.
7259 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
7260 to bool.
7261 (dwarf_expr_context::push_address): Likewise.
7262 (dwarf_expr_context::fetch_in_stack_memory): Change return type
7263 to bool.
7264 (dwarf_expr_context::execute_stack_op): Adjust.
7265 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
7266
7267 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7268
7269 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
7270 (struct dwarf_expr_context) <n_pieces>: Remove.
7271 <pieces>: Change type to std::vector.
7272 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7273 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
7274 pieces.
7275 (dwarf_expr_context::add_piece): Adjust.
7276 * dwarf2loc.c (struct piece_closure): Initialize fields.
7277 <n_pieces>: Remove.
7278 <pieces>: Change type to std::vector.
7279 (allocate_piece_closure): Adjust, change parameter to
7280 std::vector rvalue and std::move it to piece_closure.
7281 (rw_pieced_value): Adjust.
7282 (check_pieced_synthetic_pointer): Adjust.
7283 (indirect_synthetic_pointer): Adjust.
7284 (coerce_pieced_ref): Adjust.
7285 (free_pieced_value_closure): Adjust. Use delete to free
7286 piece_closure.
7287 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
7288 to allocate_piece_closure.
7289 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
7290
7291 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7292
7293 * probe.h (probe_ops_cp): Remove typedef.
7294 (DEF_VEC_P (probe_ops_cp)): Remove.
7295 (all_probe_ops): Change type to std::vector.
7296 * probe.c (info_probes_for_ops): Adjust to vector change.
7297 (probe_linespec_to_ops): Likewise.
7298 (all_probe_ops): Change type to std::vector.
7299 (_initialize_probe): Adjust to vector change.
7300 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
7301 * elfread.c (elf_get_probes): Likewise.
7302 * stap-probe.c (_initialize_stap_probe): Likewise.
7303
7304 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7305
7306 * probe.h (struct bound_probe): Define constructors.
7307 * probe.c (bound_probe_s): Remove typedef.
7308 (DEF_VEC_O (bound_probe_s)): Remove VEC.
7309 (collect_probes): Change return type to std::vector, remove
7310 cleanup.
7311 (compare_probes): Return bool, change parameter type. Change
7312 semantic to "less than".
7313 (gen_ui_out_table_header_info): Change parameter to std::vector
7314 and update.
7315 (exists_probe_with_pops): Likewise.
7316 (info_probes_for_ops): Update to std::vector change.
7317 (enable_probes_command): Likewise.
7318 (disable_probes_command): Likewise.
7319
7320 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7321
7322 * probe.h (struct probe_ops) <get_probes>: Change parameter from
7323 vec to std::vector.
7324 * probe.c (parse_probes_in_pspace): Update.
7325 (find_probes_in_objfile): Update.
7326 (find_probe_by_pc): Update.
7327 (collect_probes): Update.
7328 (probe_any_get_probes): Update.
7329 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
7330 return type to reference to std::vector.
7331 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
7332 std::vector and update.
7333 (dtrace_process_dof): Likewise.
7334 (dtrace_get_probes): Likewise.
7335 * elfread.c (elf_get_probes): Change return type to std::vector,
7336 store an std::vector in bfd_data.
7337 (probe_key_free): Update to std::vector.
7338 * stap-probe.c (handle_stap_probe): Change parameter to
7339 std::vector and update.
7340 (stap_get_probes): Likewise.
7341 * symfile-debug.c (debug_sym_get_probes): Change return type to
7342 std::vector and update.
7343
7344 2017-09-11 Tom Tromey <tom@tromey.com>
7345
7346 * breakpoint.c (program_breakpoint_here_p): Update.
7347 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
7348 from make_show_memory_breakpoints_cleanup. Return a
7349 scoped_restore_tmpl<int>.
7350 (restore_show_memory_breakpoints): Remove.
7351 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
7352 * mem-break.c (memory_validate_breakpoint): Update.
7353 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
7354 (ia64_memory_remove_breakpoint): Update.
7355 (ia64_breakpoint_from_pc): Update.
7356 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
7357 from make_show_memory_breakpoints_cleanup.
7358
7359 2017-09-11 Tom Tromey <tom@tromey.com>
7360
7361 * d-namespace.c (d_lookup_symbol): Use std::string.
7362 (find_symbol_in_baseclass): Likewise.
7363
7364 2017-09-11 Tom Tromey <tom@tromey.com>
7365
7366 * ctf.c (ctf_start): Use std::string.
7367
7368 2017-09-11 Tom Tromey <tom@tromey.com>
7369
7370 * ada-lang.c (is_known_support_routine): Update.
7371 (ada_unhandled_exception_name_addr_from_raise): Update.
7372 * guile/scm-frame.c (gdbscm_frame_name): Update.
7373 * python/py-frame.c (frapy_name): Update.
7374 (frapy_function): Update.
7375 * stack.h (find_frame_funname): Update.
7376 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
7377 (print_frame): Update.
7378
7379 2017-09-11 Tom Tromey <tom@tromey.com>
7380
7381 * findcmd.c (put_bits): Take a gdb::byte_vector.
7382 (parse_find_args): Return gdb::byte_vector. "args" now const.
7383 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
7384 cleanups.
7385 (find_command): Update.
7386
7387 2017-09-11 Tom Tromey <tom@tromey.com>
7388
7389 * cli/cli-script.c (class scoped_restore_hook_in): New.
7390 (clear_hook_in_cleanup): Remove.
7391 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
7392 scoped_restore_hook_in.
7393
7394 2017-09-11 Tom Tromey <tom@tromey.com>
7395
7396 * cli/cli-script.c (restore_interp): Remove.
7397 (read_command_lines): Use scoped_restore_interp.
7398 * interps.c (scoped_restore_interp::set_temp): Rename from
7399 interp_set_temp.
7400 * interps.h (class scoped_restore_interp): New.
7401 (interp_set_temp): Remove.
7402
7403 2017-09-11 Tom Tromey <tom@tromey.com>
7404
7405 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7406 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
7407 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
7408 scoped_restore.
7409 (mi_cmd_break_insert_1): Update.
7410 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
7411 scoped_restore.
7412
7413 2017-09-11 Tom Tromey <tom@tromey.com>
7414
7415 * demangle.c (demangle_command): Update.
7416 * breakpoint.c (disable_command): Update.
7417 (enable_command): Update.
7418 (find_location_by_number): Make "number" const. Use
7419 get_number_trailer.
7420 * cli/cli-utils.c (extract_arg): Return std::string.
7421 * probe.c (parse_probe_linespec): Update. Change types.
7422 (collect_probes): Take string arguments.
7423 (parse_probe_linespec): Likewise.
7424 (info_probes_for_ops): Update.
7425 (enable_probes_command): Update.
7426 (disable_probes_command): Update.
7427 * break-catch-sig.c (catch_signal_split_args): Update.
7428 * mi/mi-parse.c (mi_parse): Update.
7429
7430 2017-09-11 Tom Tromey <tom@tromey.com>
7431
7432 * language.h (language_enum): Make argument const.
7433 * language.c (language_enum): Make argument const.
7434
7435 2017-09-11 Tom Tromey <tom@tromey.com>
7436
7437 * common/common-utils.h (skip_to_space): Remove macro, redeclare
7438 as function.
7439 (skip_to_space): Rename from skip_to_space_const.
7440 * common/common-utils.c (skip_to_space): New function.
7441 (skip_to_space): Rename from skip_to_space_const.
7442 * cli/cli-utils.h (get_number): Rename from get_number_const.
7443 (extract_arg): Rename from extract_arg_const.
7444 * cli/cli-utils.c (get_number): Rename from get_number_const.
7445 (extract_arg): Rename from extract_arg_const.
7446 (number_or_range_parser::get_number): Use ::get_number.
7447 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
7448 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
7449 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
7450 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
7451 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
7452 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
7453 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
7454 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
7455
7456 2017-09-11 Tom Tromey <tom@tromey.com>
7457
7458 * python/python.c (do_start_initialization): Use
7459 py-event-types.def to initialize types.
7460 Define all object type structures.
7461 * python/python-internal.h: Don't declare event initialization
7462 functions.
7463 * python/py-threadevent.c (thread_event_object_type): Don't
7464 define.
7465 * python/py-stopevent.c (stop_event_object_type): Don't define.
7466 * python/py-signalevent.c (signal_event_object_type): Don't
7467 declare or define.
7468 * python/py-newobjfileevent.c (new_objfile_event_object_type)
7469 (clear_objfiles_event_object_type): Don't declare or define.
7470 * python/py-infevents.c (inferior_call_pre_event_object_type)
7471 (inferior_call_post_event_object_type)
7472 (register_changed_event_object_type)
7473 (memory_changed_event_object_type): Don't declare or define.
7474 * python/py-inferior.c (new_thread_event_object_type)
7475 (new_inferior_event_object_type)
7476 (inferior_deleted_event_object_type): Don't declare or define.
7477 * python/py-exitedevent.c (exited_event_object_type): Don't
7478 declare or define.
7479 * python/py-evts.c (gdbpy_initialize_py_events): Use
7480 py-all-events.def.
7481 * python/py-events.h (thread_event_object_type): Don't declare.
7482 (events_object): Use py-all-events.def.
7483 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
7484 py-event-types.def.
7485 * python/py-event-types.def: New file.
7486 * python/py-continueevent.c (create_continue_event_object): Don't
7487 declare or define.
7488 * python/py-bpevent.c (breakpoint_event_object_type): Don't
7489 declare or define.
7490 * python/py-all-events.def: New file.
7491
7492 2017-09-11 Tom Tromey <tom@tromey.com>
7493
7494 * python/py-threadevent.c (create_thread_event_object): Return
7495 gdbpy_ref.
7496 * python/py-stopevent.h (create_stop_event_object)
7497 (create_breakpoint_event_object, create_signal_event_object):
7498 Update.
7499 * python/py-stopevent.c (create_stop_event_object): Return
7500 gdbpy_ref.
7501 (emit_stop_event): Update.
7502 * python/py-signalevent.c (create_signal_event_object): Return
7503 gdbpy_ref.
7504 * python/py-infevents.c (create_inferior_call_event_object):
7505 Update.
7506 * python/py-event.h (create_event_object)
7507 (create_thread_event_object): Update.
7508 * python/py-event.c (create_event_object): Return gdbpy_ref.
7509 * python/py-continueevent.c: Return gdbpy_ref.
7510 * python/py-bpevent.c (create_breakpoint_event_object): Return
7511 gdbpy_ref.
7512
7513 2017-09-11 Tom Tromey <tom@tromey.com>
7514
7515 PR python/15622:
7516 * NEWS: Add entry.
7517 * python/python.c (do_start_initialization): Initialize new event
7518 types.
7519 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
7520 (gdbpy_initialize_inferior_deleted_event)
7521 (gdbpy_initialize_new_thread_event): Declare.
7522 * python/py-threadevent.c (create_thread_event_object): Add option
7523 "thread" parameter.
7524 * python/py-inferior.c (new_thread_event_object_type)
7525 (new_inferior_event_object_type)
7526 (inferior_deleted_event_object_type): Declare.
7527 (python_new_inferior, python_inferior_deleted): New functions.
7528 (add_thread_object): Emit new_thread event.
7529 (gdbpy_initialize_inferior): Attach new functions to corresponding
7530 observers.
7531 (new_thread, new_inferior, inferior_deleted): Define new event
7532 types.
7533 * python/py-evts.c (gdbpy_initialize_py_events): Add new
7534 registries.
7535 * python/py-events.h (events_object) <new_inferior,
7536 inferior_deleted, new_thread>: New fields.
7537 * python/py-event.h (create_thread_event_breakpoint): Add optional
7538 "thread" parameter.
7539
7540 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
7541
7542 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
7543 check current_ui instead.
7544 (internal_vproblem): Likewise.
7545
7546 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
7547
7548 * thread.c (print_thread_info_1): Remove unnecessary calls to
7549 uiout->is_mi_like_p.
7550
7551 2017-09-09 Tom Tromey <tom@tromey.com>
7552
7553 * namespace.h (add_using_directive): Update.
7554 * namespace.c (add_using_directive): Change type of excludes to
7555 std::vector.
7556 * dwarf2read.c (read_import_statement): Use std::vector.
7557 (read_namespace): Update.
7558 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
7559
7560 2017-09-09 Tom Tromey <tom@tromey.com>
7561
7562 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
7563
7564 2017-09-09 Tom Tromey <tom@tromey.com>
7565
7566 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
7567
7568 2017-09-09 Tom Tromey <tom@tromey.com>
7569
7570 * stack.c (func_command): Use gdb::def_vector.
7571
7572 2017-09-09 Tom Tromey <tom@tromey.com>
7573
7574 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
7575 ui_out_emit_list, ui_out_emit_tuple.
7576 (mi_cmd_var_update): Likewise.
7577
7578 2017-09-09 Tom Tromey <tom@tromey.com>
7579
7580 * mi/mi-interp.c (mi_user_selected_context_changed): Use
7581 ui_out_redirect_pop.
7582 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7583 ui_out_redirect_pop.
7584 * utils.c (do_ui_out_redirect_pop)
7585 (make_cleanup_ui_out_redirect_pop): Remove.
7586 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
7587 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
7588 * ui-out.h (ui_out_redirect_pop): New class.
7589
7590 2017-09-09 Tom Tromey <tom@tromey.com>
7591
7592 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
7593 (list_available_thread_groups, mi_cmd_list_thread_groups)
7594 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
7595 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
7596 Likewise.
7597
7598 2017-09-09 Tom Tromey <tom@tromey.com>
7599
7600 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
7601 ui_out_emit_tuple.
7602
7603 2017-09-09 Tom Tromey <tom@tromey.com>
7604
7605 * target.c (flash_erase_command): Use ui_out_emit_tuple.
7606 * stack.c (print_frame): Use ui_out_emit_tuple.
7607 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
7608 (info_spu_mailbox_command, info_spu_dma_command)
7609 (info_spu_proxydma_command): Likewise.
7610 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
7611 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
7612 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7613 ui_out_emit_tuple.
7614 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
7615
7616 2017-09-09 Tom Tromey <tom@tromey.com>
7617
7618 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
7619 (class ui_out_emit_table): Update comment.
7620 * ui-out.c (do_cleanup_table_end)
7621 (make_cleanup_ui_out_table_begin_end): Remove.
7622 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
7623 (info_spu_dma_cmdlist): Likewise.
7624 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
7625 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
7626 ui_out_emit_table.
7627
7628 2017-09-09 Tom Tromey <tom@tromey.com>
7629
7630 * thread.c (print_thread_info_1): Use ui_out_emit_table,
7631 ui_out_emit_list, gdb::optional.
7632
7633 2017-09-09 John Baldwin <jhb@FreeBSD.org>
7634
7635 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
7636 prototype.
7637 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
7638 prototype.
7639 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
7640 prototype.
7641 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
7642 * ada-exp.y: Remove _initialize_ada_exp prototype.
7643 * ada-lang.c: Remove _initialize_ada_language prototype.
7644 * ada-tasks.c: Remove _initialize_tasks prototype.
7645 * addrmap.c: Remove _initialize_addrmap prototype.
7646 * agent.c: Remove _initialize_agent prototype.
7647 * aix-thread.c: Remove _initialize_aix_thread prototype.
7648 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
7649 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
7650 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
7651 prototype.
7652 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
7653 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
7654 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
7655 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
7656 prototype.
7657 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
7658 prototype.
7659 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
7660 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
7661 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
7662 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
7663 prototype.
7664 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
7665 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
7666 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
7667 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
7668 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7669 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
7670 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
7671 prototype.
7672 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
7673 prototype.
7674 * annotate.c: Remove _initialize_annotate prototype.
7675 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
7676 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
7677 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
7678 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
7679 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
7680 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
7681 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
7682 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
7683 prototype.
7684 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
7685 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
7686 * auto-load.c: Remove _initialize_auto_load prototype.
7687 * auxv.c: Remove _initialize_auxv prototype.
7688 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
7689 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
7690 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
7691 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
7692 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
7693 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
7694 prototype.
7695 * break-catch-throw.c: Remove _initialize_break_catch_throw
7696 prototype.
7697 * breakpoint.c: Remove _initialize_breakpoint prototype.
7698 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
7699 * btrace.c: Remove _initialize_btrace prototype.
7700 * charset.c: Remove _initialize_charset prototype.
7701 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
7702 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
7703 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
7704 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
7705 * cli/cli-script.c: Remove _initialize_cli_script prototype.
7706 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
7707 * coffread.c: Remove _initialize_coffread prototype.
7708 * compile/compile.c: Remove _initialize_compile prototype.
7709 * complaints.c: Remove _initialize_complaints prototype.
7710 * completer.c: Remove _initialize_completer prototype.
7711 * copying.awk: Remove _initialize_copying prototype.
7712 * copying.c: Regenerate.
7713 * core-regset.c: Remove _initialize_core_regset prototype.
7714 * corefile.c: Remove _initialize_core prototype.
7715 * corelow.c: Remove _initialize_corelow prototype.
7716 * cp-abi.c: Remove _initialize_cp_abi prototype.
7717 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
7718 * cp-support.c: Remove _initialize_cp_support prototype.
7719 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
7720 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
7721 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
7722 * ctf.c: Remove _initialize_ctf prototype.
7723 * d-lang.c: Remove _initialize_d_language prototype.
7724 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
7725 prototype.
7726 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
7727 * dbxread.c: Remove _initialize_dbxread prototype.
7728 * dcache.c: Remove _initialize_dcache prototype.
7729 * demangle.c: Remove _initialize_demangler prototype.
7730 * disasm-selftests.c: Remove _initialize_disasm_selftests
7731 prototype.
7732 * disasm.c: Remove _initialize_disasm prototype.
7733 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
7734 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
7735 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
7736 prototype.
7737 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
7738 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
7739 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
7740 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
7741 * elfread.c: Remove _initialize_elfread prototype.
7742 * exec.c: Remove _initialize_exec prototype.
7743 * extension.c: Remove _initialize_extension prototype.
7744 * f-lang.c: Remove _initialize_f_language prototype.
7745 * f-valprint.c: Remove _initialize_f_valprint prototype.
7746 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
7747 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
7748 * filesystem.c: Remove _initialize_filesystem prototype.
7749 * findcmd.c: Remove _initialize_mem_search prototype.
7750 * fork-child.c: Remove _initialize_fork_child prototype.
7751 * frame-base.c: Remove _initialize_frame_base prototype.
7752 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
7753 * frame.c: Remove _initialize_frame prototype.
7754 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
7755 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
7756 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
7757 * gcore.c: Remove _initialize_gcore prototype.
7758 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
7759 * gdbarch.c: Regenerate.
7760 * gdbarch.sh: Remove _initialize_gdbarch prototype.
7761 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
7762 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
7763 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
7764 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
7765 * go-lang.c: Remove _initialize_go_language prototype.
7766 * go32-nat.c: Remove _initialize_go32_nat prototype.
7767 * guile/guile.c: Remove _initialize_guile prototype.
7768 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
7769 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
7770 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
7771 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
7772 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
7773 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
7774 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
7775 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
7776 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
7777 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
7778 prototype.
7779 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
7780 prototype.
7781 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
7782 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
7783 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
7784 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
7785 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
7786 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
7787 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
7788 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
7789 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
7790 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
7791 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
7792 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
7793 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
7794 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7795 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
7796 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
7797 prototype.
7798 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
7799 prototype.
7800 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
7801 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
7802 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
7803 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
7804 * infcall.c: Remove _initialize_infcall prototype.
7805 * infcmd.c: Remove _initialize_infcmd prototype.
7806 * inferior.c: Remove _initialize_inferiors prototype.
7807 * inflow.c: Remove _initialize_inflow prototype.
7808 * infrun.c: Remove _initialize_infrun prototype.
7809 * interps.c: Remove _initialize_interpreter prototype.
7810 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
7811 * jit.c: Remove _initialize_jit prototype.
7812 * language.c: Remove _initialize_language prototype.
7813 * linux-fork.c: Remove _initialize_linux_fork prototype.
7814 * linux-nat.c: Remove _initialize_linux_nat prototype.
7815 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
7816 * linux-thread-db.c: Remove _initialize_thread_db prototype.
7817 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
7818 * m2-lang.c: Remove _initialize_m2_language prototype.
7819 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
7820 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
7821 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
7822 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
7823 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
7824 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7825 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7826 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
7827 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
7828 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
7829 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7830 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7831 * machoread.c: Remove _initialize_machoread prototype.
7832 * macrocmd.c: Remove _initialize_macrocmd prototype.
7833 * macroscope.c: Remove _initialize_macroscope prototype.
7834 * maint.c: Remove _initialize_maint_cmds prototype.
7835 * mdebugread.c: Remove _initialize_mdebugread prototype.
7836 * memattr.c: Remove _initialize_mem prototype.
7837 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
7838 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
7839 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
7840 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
7841 * mi/mi-main.c: Remove _initialize_mi_main prototype.
7842 * microblaze-linux-tdep.c: Remove
7843 _initialize_microblaze_linux_tdep prototype.
7844 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
7845 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
7846 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
7847 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
7848 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
7849 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
7850 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
7851 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
7852 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
7853 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
7854 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
7855 prototype.
7856 * mipsread.c: Remove _initialize_mipsread prototype.
7857 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
7858 prototype.
7859 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
7860 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
7861 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
7862 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
7863 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
7864 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
7865 prototype.
7866 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
7867 * nto-procfs.c: Remove _initialize_procfs prototype.
7868 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
7869 * objc-lang.c: Remove _initialize_objc_language prototype.
7870 * objfiles.c: Remove _initialize_objfiles prototype.
7871 * observer.c: Remove observer_test_first_notification_function,
7872 observer_test_second_notification_function,
7873 observer_test_third_notification_function, and
7874 _initialize_observer prototypes.
7875 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
7876 * osabi.c: Remove _initialize_gdb_osabi prototype.
7877 * osdata.c: Remove _initialize_osdata prototype.
7878 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
7879 * parse.c: Remove _initialize_parse prototype.
7880 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
7881 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
7882 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
7883 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
7884 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
7885 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
7886 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
7887 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
7888 * printcmd.c: Remove _initialize_printcmd prototype.
7889 * probe.c: Remove _initialize_probe prototype.
7890 * proc-api.c: Remove _initialize_proc_api prototype.
7891 * proc-events.c: Remove _initialize_proc_events prototype.
7892 * proc-service.c: Remove _initialize_proc_service prototype.
7893 * procfs.c: Remove _initialize_procfs prototype.
7894 * psymtab.c: Remove _initialize_psymtab prototype.
7895 * python/python.c: Remove _initialize_python prototype.
7896 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
7897 * record-btrace.c: Remove _initialize_record_btrace prototype.
7898 * record-full.c: Remove _initialize_record_full prototype.
7899 * record.c: Remove _initialize_record prototype.
7900 * regcache.c: Remove _initialize_regcache prototype.
7901 * reggroups.c: Remove _initialize_reggroup prototype.
7902 * remote-notif.c: Remove _initialize_notif prototype.
7903 * remote-sim.c: Remove _initialize_remote_sim prototype.
7904 * remote.c: Remove _initialize_remote prototype.
7905 * reverse.c: Remove _initialize_reverse prototype.
7906 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
7907 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
7908 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
7909 prototype.
7910 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
7911 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
7912 * rust-exp.y: Remove _initialize_rust_exp prototype.
7913 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
7914 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
7915 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
7916 * score-tdep.c: Remove _initialize_score_tdep prototype.
7917 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
7918 prototype.
7919 * ser-go32.c: Remove _initialize_ser_dos prototype.
7920 * ser-mingw.c: Remove _initialize_ser_windows prototype.
7921 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
7922 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
7923 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
7924 * serial.c: Remove _initialize_serial prototype.
7925 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
7926 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
7927 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
7928 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
7929 * skip.c: Remove _initialize_step_skip prototype.
7930 * sol-thread.c: Remove _initialize_sol_thread prototype.
7931 * solib-aix.c: Remove _initialize_solib_aix prototype.
7932 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
7933 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
7934 * solib-frv.c: Remove _initialize_frv_solib prototype.
7935 * solib-spu.c: Remove _initialize_spu_solib prototype.
7936 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
7937 * solib-target.c: Remove _initialize_solib_target prototype.
7938 * solib.c: Remove _initialize_solib prototype.
7939 * source.c: Remove _initialize_source prototype.
7940 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
7941 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
7942 prototype.
7943 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
7944 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
7945 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
7946 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
7947 prototype.
7948 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
7949 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
7950 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
7951 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
7952 prototype.
7953 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
7954 prototype.
7955 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
7956 prototype.
7957 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
7958 prototype.
7959 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
7960 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
7961 prototype.
7962 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
7963 prototype.
7964 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
7965 prototype.
7966 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
7967 prototype.
7968 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
7969 prototype.
7970 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
7971 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
7972 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
7973 * stabsread.c: Remove _initialize_stabsread prototype.
7974 * stack.c: Remove _initialize_stack prototype.
7975 * stap-probe.c: Remove _initialize_stap_probe prototype.
7976 * std-regs.c: Remove _initialize_frame_reg prototype.
7977 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
7978 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
7979 * symfile.c: Remove _initialize_symfile prototype.
7980 * symmisc.c: Remove _initialize_symmisc prototype.
7981 * symtab.c: Remove _initialize_symtab prototype.
7982 * target-dcache.c: Remove _initialize_target_dcache prototype.
7983 * target-descriptions.c: Remove _initialize_target_descriptions
7984 prototype.
7985 * thread.c: Remove _initialize_thread prototype.
7986 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
7987 prototype.
7988 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
7989 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
7990 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
7991 prototype.
7992 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
7993 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
7994 * tracefile.c: Remove _initialize_tracefile prototype.
7995 * tracepoint.c: Remove _initialize_tracepoint prototype.
7996 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
7997 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
7998 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
7999 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
8000 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
8001 * tui/tui-win.c: Remove _initialize_tui_win prototype.
8002 * tui/tui.c: Remove _initialize_tui prototype.
8003 * typeprint.c: Remove _initialize_typeprint prototype.
8004 * user-regs.c: Remove _initialize_user_regs prototype.
8005 * utils.c: Remove _initialize_utils prototype.
8006 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
8007 * valarith.c: Remove _initialize_valarith prototype.
8008 * valops.c: Remove _initialize_valops prototype.
8009 * valprint.c: Remove _initialize_valprint prototype.
8010 * value.c: Remove _initialize_values prototype.
8011 * varobj.c: Remove _initialize_varobj prototype.
8012 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
8013 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
8014 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
8015 * windows-nat.c: Remove _initialize_windows_nat,
8016 _initialize_check_for_gdb_ini, and _initialize_loadable
8017 prototypes.
8018 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
8019 * xcoffread.c: Remove _initialize_xcoffread prototype.
8020 * xml-support.c: Remove _initialize_xml_support prototype.
8021 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
8022 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
8023 prototype.
8024 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
8025 prototype.
8026 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
8027
8028 2017-09-08 Keith Seitz <keiths@redhat.com>
8029
8030 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
8031 field.
8032
8033 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
8034
8035 * f-valprint.c (f_val_print): Remove check for one byte
8036 sized integers. Remove printing of character type.
8037
8038 2017-09-08 Frank Penczek <frank.penczek@intel.com>
8039 Christoph Weinmann <christoph.t.weinmann@intel.com>
8040 Bernhard Heckel <bernhard.heckel@intel.com>
8041
8042 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
8043 to maintain proper indentation when printing pointers/refs.
8044
8045 2017-09-07 Joel Brobecker <brobecker@adacore.com>
8046
8047 GDB 8.0.1 released.
8048
8049 2017-09-07 Joel Brobecker <brobecker@adacore.com>
8050
8051 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
8052
8053 2017-09-05 Tom Tromey <tom@tromey.com>
8054
8055 * parse.c (funcall_chain): Now a std::vector.
8056 (start_arglist, end_arglist): Simplify.
8057 (free_funcalls): Remove.
8058 (parse_exp_in_context_1): Remove cleanup.
8059
8060 2017-09-05 Tom Tromey <tom@tromey.com>
8061
8062 * go-exp.y (go_parse): Don't create a cleanup.
8063
8064 2017-09-05 Tom Tromey <tom@tromey.com>
8065
8066 * d-exp.y (PrimaryExpression): Use std::string.
8067 (d_parse): Don't create a cleanup.
8068
8069 2017-09-05 Tom Tromey <tom@tromey.com>
8070
8071 * utils.c (do_clear_parser_state): Remove.
8072 (make_cleanup_clear_parser_state): Remove.
8073 * p-exp.y (pascal_parse): Use scoped_restore.
8074 * m2-exp.y (m2_parse): Use scoped_restore.
8075 * f-exp.y (f_parse): Use scoped_restore.
8076 * d-exp.y (d_parse): Use scoped_restore.
8077 * c-exp.y (c_parse): Use scoped_restore.
8078 * ada-exp.y (ada_parse): Use scoped_restore.
8079 * utils.h (make_cleanup_clear_parser_state): Remove.
8080
8081 2017-09-06 Keith Seitz <keiths@redhat.com>
8082
8083 * dwarf2read.c (dw2_linkage_name_attr): New function.
8084 (dw2_linkage_name): New function.
8085 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
8086 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
8087 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
8088
8089 2017-09-06 Kamil Rytarowski <n54@gmx.com>
8090
8091 * config/djgpp/djconfig.sh: Correct shell portability issue.
8092
8093 2017-09-06 Kamil Rytarowski <n54@gmx.com>
8094
8095 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
8096
8097 2017-09-06 John Baldwin <jhb@FreeBSD.org>
8098
8099 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
8100 * NEWS: Mention new FreeBSD/mips native configuration.
8101 * configure.host: Add aarch64*-*-freebsd*.
8102 * configure.nat: Likewise.
8103 * aarch64-fbsd-nat.c: New file.
8104
8105 2017-09-06 John Baldwin <jhb@FreeBSD.org>
8106
8107 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
8108 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
8109 * NEWS: Mention new FreeBSD/aarch64 target.
8110 * configure.tgt: Add aarch64*-*-freebsd*.
8111 * aarch64-fbsd-tdep.c: New file.
8112 * aarch64-fbsd-tdep.h: New file.
8113
8114 2017-09-06 Kamil Rytarowski <n54@gmx.com>
8115
8116 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
8117
8118 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8119
8120 * parse.c (find_minsym_type_and_address): Don't relocate addresses
8121 of TLS symbols.
8122
8123 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8124
8125 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
8126 call.
8127
8128 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8129
8130 * infrun.c (follow_exec): Call add_thread after
8131 target_find_description.
8132
8133 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8134
8135 * infrun.c (handle_inferior_event_1): When exec'ing, read
8136 stop_pc after follow_exec.
8137
8138 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8139
8140 * remote.c (process_g_packet): Update error message.
8141
8142 2017-09-05 Yao Qi <yao.qi@linaro.org>
8143
8144 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
8145 targets.
8146
8147 2017-09-05 Pedro Alves <palves@redhat.com>
8148
8149 * eval.c (eval_call, evaluate_funcall): New functions, factored
8150 out from ...
8151 (evaluate_subexp_standard): ... this.
8152
8153 2017-09-05 Yao Qi <yao.qi@linaro.org>
8154
8155 * amd64-tdep.c (amd64_target_description): Create target
8156 descriptions.
8157 (_initialize_amd64_tdep): Don't call functions
8158 initialize_tdesc_amd64_*. Add self tests.
8159 * arch/amd64.c (amd64_create_target_description): Add parameter
8160 is_linux. Call set_tdesc_osabi if is_linux is true.
8161 * arch/amd64.h (amd64_create_target_description): Update the
8162 declaration.
8163 * arch/i386.c (i386_create_target_description): Add parameter
8164 is_linux. Call set_tdesc_osabi if is_linux is true.
8165 * arch/i386.h (i386_create_target_description): Update
8166 declaration.
8167 * configure.tgt: Add i386.o to gdb_target_obs.
8168 * features/Makefile (XMLTOC): Remove i386/*.xml.
8169 * features/i386/amd64-avx-avx512.c: Remove.
8170 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
8171 * features/i386/amd64-avx-mpx.c: Remove.
8172 * features/i386/amd64-avx.c: Remove.
8173 * features/i386/amd64-mpx.c: Remove.
8174 * features/i386/amd64.c: Remove.
8175 * features/i386/i386-avx-avx512.c: Remove.
8176 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
8177 * features/i386/i386-avx-mpx.c: Remove.
8178 * features/i386/i386-avx.c: Remove.
8179 * features/i386/i386-mmx.c: Remove.
8180 * features/i386/i386-mpx.c: Remove.
8181 * features/i386/i386.c: Remove.
8182 * i386-tdep.c: Don't include features/i386/i386*.c., include
8183 target-descriptions.h and arch/i386.h.
8184 (i386_target_description): Create target descriptions.
8185 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
8186 functions. Do self tests.
8187
8188 2017-09-05 Yao Qi <yao.qi@linaro.org>
8189
8190 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
8191 * features/i386/amd64-avx-avx512-linux.c: Removed.
8192 * features/i386/amd64-avx-linux.c: Removed.
8193 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
8194 * features/i386/amd64-avx-mpx-linux.c: Removed.
8195 * features/i386/amd64-linux.c: Removed.
8196 * features/i386/amd64-mpx-linux.c: Removed.
8197 * features/i386/x32-avx-avx512-linux.c: Removed.
8198 * features/i386/x32-avx-linux.c: Removed.
8199 * features/i386/x32-linux.c: Removed.
8200
8201 2017-09-05 Yao Qi <yao.qi@linaro.org>
8202
8203 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
8204 features/i386/*.c.
8205 (amd64_linux_read_description): Call
8206 amd64_create_target_description.
8207 * arch/amd64.c: New file.
8208 * arch/amd64.h: New file.
8209 * configure.tgt (x86_64-*-linux*): Append amd64.o.
8210 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
8211
8212 2017-09-05 Yao Qi <yao.qi@linaro.org>
8213
8214 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
8215 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
8216 (amd64_linux_read_description): Create target descriptions.
8217 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
8218 functions. Add unit tests.
8219 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
8220 x32-core.xml.
8221 * features/i386/64bit-avx.c: Generated.
8222 * features/i386/64bit-avx512.c: Generated.
8223 * features/i386/64bit-core.c: Generated.
8224 * features/i386/64bit-linux.c: Generated.
8225 * features/i386/64bit-mpx.c: Generated.
8226 * features/i386/64bit-pkeys.c: Generated.
8227 * features/i386/64bit-segments.c: Generated.
8228 * features/i386/64bit-sse.c: Generated.
8229 * features/i386/x32-core.c: Generated.
8230 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
8231 c files for amd64-linux and x32-linux.
8232
8233 2017-09-05 Yao Qi <yao.qi@linaro.org>
8234
8235 * amd64-linux-tdep.c (amd64_linux_read_description): New
8236 function.
8237 (amd64_linux_core_read_description): Call
8238 amd64_linux_read_description.
8239 (amd64_linux_init_abi): Likewise.
8240 (amd64_x32_linux_init_abi): Likewise.
8241 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
8242 * x86-linux-nat.c (x86_linux_read_description): Call
8243 amd64_linux_read_description.
8244
8245 2017-09-05 Yao Qi <yao.qi@linaro.org>
8246
8247 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
8248 comments.
8249
8250 2017-09-05 Yao Qi <yao.qi@linaro.org>
8251
8252 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
8253 * features/i386/i386-avx-avx512-linux.c: Remove.
8254 * features/i386/i386-avx-linux.c: Remove.
8255 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
8256 * features/i386/i386-avx-mpx-linux.c: Remove.
8257 * features/i386/i386-linux.c: Remove.
8258 * features/i386/i386-mmx-linux.c: Remove.
8259 * features/i386/i386-mpx-linux.c: Remove.
8260
8261 2017-09-05 Yao Qi <yao.qi@linaro.org>
8262
8263 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
8264 (SFILES): Add arch/i386.c.
8265 (HFILES_NO_SRCDIR): Add arch/i386.h.
8266 * arch/i386.c: New file.
8267 * arch/i386.h: New file.
8268 * arch/tdesc.h (allocate_target_description): Declare.
8269 (set_tdesc_architecture): Declare.
8270 (set_tdesc_osabi): Declare.
8271 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
8272 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
8273 include arch/i386.h.
8274 (i386_linux_read_description): Remove code and call
8275 i386_create_target_description.
8276 (set_tdesc_architecture): New function.
8277 (set_tdesc_osabi): New function.
8278 * target-descriptions.h (allocate_target_description): Remove.
8279
8280 2017-09-05 Yao Qi <yao.qi@linaro.org>
8281
8282 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
8283 * target-descriptions.c (tdesc_create_feature): Likewise, and
8284 adjust code.
8285 * features/i386/32bit-avx.c: Re-generated.
8286 * features/i386/32bit-avx512.c: Re-generated.
8287 * features/i386/32bit-core.c: Re-generated.
8288 * features/i386/32bit-linux.c: Re-generated.
8289 * features/i386/32bit-mpx.c: Re-generated.
8290 * features/i386/32bit-pkeys.c: Re-generated.
8291 * features/i386/32bit-sse.c: Re-generated.
8292
8293 2017-09-05 Yao Qi <yao.qi@linaro.org>
8294
8295 * regformats/regdef.h (struct reg): Override operator == and !=.
8296
8297 2017-09-05 Yao Qi <yao.qi@linaro.org>
8298
8299 * arch/tdesc.h: New file.
8300 * regformats/regdat.sh: Generate code using tdesc_create_reg.
8301 * target-descriptions.c: Update comments.
8302 * target-descriptions.h: Include "arch/tdesc.h". Remove the
8303 declarations.
8304 * features/i386/32bit-avx.c: Re-generated.
8305 * features/i386/32bit-avx512.c: Re-generated.
8306 * features/i386/32bit-core.c: Re-generated.
8307 * features/i386/32bit-linux.c: Re-generated.
8308 * features/i386/32bit-mpx.c: Re-generated.
8309 * features/i386/32bit-pkeys.c: Re-generated.
8310 * features/i386/32bit-sse.c: Re-generated.
8311
8312 2017-09-05 Yao Qi <yao.qi@linaro.org>
8313
8314 * regformats/regdat.sh: Update generated code.
8315
8316 2017-09-05 Yao Qi <yao.qi@linaro.org>
8317
8318 * regformats/regdat.sh: Adjust code order.
8319
8320 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8321
8322 * expprint.c (dump_subexp_body_standard): Use constant format
8323 string in fprintf_filtered call.
8324
8325 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8326
8327 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
8328 NetBSD/i386.
8329 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
8330
8331 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8332
8333 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
8334
8335 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8336
8337 * bsd-kvm.o: Define _KMEMUSER.
8338 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
8339 * configure: Regenerate.
8340
8341 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8342
8343 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
8344 * i386-fbsd-nat.c: Likewise.
8345
8346 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8347
8348 * unittests/array-view-selftests.c: Add include of <array>.
8349
8350 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8351
8352 * spu-tdep.c (flush_ea_cache): Add missing argument to
8353 call_function_by_hand.
8354
8355 2017-09-04 Pedro Alves <palves@redhat.com>
8356
8357 * NEWS (Safer support for debugging with no debug info): New.
8358
8359 2017-09-04 Pedro Alves <palves@redhat.com>
8360
8361 * c-exp.y (function_method, function_method_void): Add current
8362 instance flags to TYPE_INSTANCE.
8363 * dwarf2read.c (check_modifier): New.
8364 (compute_delayed_physnames): Assert that only C++ adds delayed
8365 physnames. Mark fn_fields as const/volatile depending on
8366 physname.
8367 * eval.c (make_params): New type_instance_flags parameter. Use
8368 it as the new type's instance flags.
8369 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
8370 flags element and pass it to make_params.
8371 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
8372 instance flags element.
8373 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
8374 * gdbtypes.h: Include "enum-flags.h".
8375 (type_instance_flags): New enum-flags type.
8376 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
8377 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
8378 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
8379 (follow_type_instance_flags): New function.
8380 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
8381 * parser-defs.h (follow_type_instance_flags): Declare.
8382 * valops.c (value_struct_elt_for_reference): const/volatile must
8383 match too.
8384
8385 2017-09-04 Pedro Alves <palves@redhat.com>
8386
8387 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
8388 function/method scopes; lookup the nested name as a function local
8389 static variable.
8390
8391 2017-09-04 Pedro Alves <palves@redhat.com>
8392
8393 (%type <voidval>): Add function_method.
8394 * c-exp.y (exp): New production for calls with no arguments.
8395 (function_method, function_method_void_or_typelist): New
8396 productions.
8397 (exp): New production for "method()::static_var".
8398 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
8399 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8400 Handle OP_FUNC_STATIC_VAR.
8401 * parse.c (operator_length_standard):
8402 Handle OP_FUNC_STATIC_VAR.
8403
8404 2017-09-04 Pedro Alves <palves@redhat.com>
8405
8406 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
8407 handling.
8408 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8409 Ditto.
8410 * parse.c (operator_length_standard, operator_check_standard):
8411 Ditto.
8412 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
8413
8414 2017-09-04 Pedro Alves <palves@redhat.com>
8415
8416 * ax-gdb.c: Include "typeprint.h".
8417 (gen_expr_for_cast): New function.
8418 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
8419 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
8420 type is unknown.
8421 * dwarf2read.c (new_symbol_full): Fallback to int instead of
8422 nodebug_data_symbol.
8423 * eval.c: Include "typeprint.h".
8424 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
8425 Error out if symbol has unknown type.
8426 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
8427 evaluate_subexp_for_cast.
8428 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
8429 OP_VAR_MSYM_VALUE.
8430 (evaluate_subexp_for_cast): New function.
8431 * gdbtypes.c (init_nodebug_var_type): New function.
8432 (objfile_type): Use it to initialize types of variables with no
8433 debug info.
8434 * typeprint.c (error_unknown_type): New.
8435 * typeprint.h (error_unknown_type): New declaration.
8436 * compile/compile-c-types.c (convert_type_basic): Handle
8437 TYPE_CODE_ERROR; warn and fallback to int for variables with
8438 unknown type.
8439
8440 2017-09-04 Pedro Alves <palves@redhat.com>
8441
8442 * eval.c (evaluate_var_value): New function, factored out from ...
8443 (evaluate_subexp_standard): ... here.
8444
8445 2017-09-04 Pedro Alves <palves@redhat.com>
8446
8447 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
8448 Remove useless assignments to 'op'.
8449
8450 2017-09-04 Pedro Alves <palves@redhat.com>
8451
8452 * eval.c (eval_skip_value): New function.
8453 (evaluate_subexp_standard): Use it.
8454
8455 2017-09-04 Pedro Alves <palves@redhat.com>
8456
8457 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
8458 function name from symbol/minsym and pass it to
8459 error_call_unknown_return_type.
8460
8461 2017-09-04 Pedro Alves <palves@redhat.com>
8462
8463 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
8464 * ax-gdb.c (gen_msym_var_ref): New function.
8465 (gen_expr): Handle OP_VAR_MSYM_VALUE.
8466 * eval.c (evaluate_var_msym_value): New function.
8467 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
8468 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
8469 to call_function_by_hand.
8470 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8471 Handle OP_VAR_MSYM_VALUE.
8472 (union exp_element) <msymbol>: New field.
8473 * minsyms.h (struct type): Forward declare.
8474 (find_minsym_type_and_address): Declare.
8475 * parse.c (write_exp_elt_msym): New function.
8476 (write_exp_msymbol): Delete, refactored as ...
8477 (find_minsym_type_and_address): ... this new function.
8478 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
8479 (operator_length_standard, operator_check_standard): Handle
8480 OP_VAR_MSYM_VALUE.
8481 * std-operator.def (OP_VAR_MSYM_VALUE): New.
8482
8483 2017-09-04 Pedro Alves <palves@redhat.com>
8484
8485 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
8486 TYPE_GNU_IFUNC specially here. Throw error if return type is
8487 unknown.
8488 * ada-typeprint.c (print_func_type): Handle functions with unknown
8489 return type.
8490 * c-typeprint.c (c_type_print_base): Handle functions and methods
8491 with unknown return type.
8492 * compile/compile-c-symbols.c (convert_symbol_bmsym)
8493 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
8494 * compile/compile-c-types.c: Include "objfiles.h".
8495 (convert_func): For functions with unknown return type, warn and
8496 default to int.
8497 * compile/compile-object-run.c (compile_object_run): Adjust call
8498 to call_function_by_hand_dummy.
8499 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
8500 call_function_by_hand.
8501 * eval.c (evaluate_subexp_standard): Adjust calls to
8502 call_function_by_hand. Handle functions and methods with unknown
8503 return type. Pass expect_type to call_function_by_hand.
8504 * f-typeprint.c (f_type_print_base): Handle functions with unknown
8505 return type.
8506 * gcore.c (call_target_sbrk): Adjust call to
8507 call_function_by_hand.
8508 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
8509 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
8510 an integer address type instead of nodebug.
8511 * guile/scm-value.c (gdbscm_value_call): Adjust call to
8512 call_function_by_hand.
8513 * infcall.c (error_call_unknown_return_type): New function.
8514 (call_function_by_hand): New "default_return_type" parameter.
8515 Pass it down.
8516 (call_function_by_hand_dummy): New "default_return_type"
8517 parameter. Use it instead of defaulting to int. If there's no
8518 default and the return type is unknown, throw an error. If
8519 there's a default return type, and the called function has no
8520 debug info, then assume the function is prototyped.
8521 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
8522 New "default_return_type" parameter.
8523 (error_call_unknown_return_type): New declaration.
8524 * linux-fork.c (call_lseek): Cast return type of lseek.
8525 (inferior_call_waitpid, checkpoint_command): Adjust calls to
8526 call_function_by_hand.
8527 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
8528 calls to call_function_by_hand.
8529 * m2-typeprint.c (m2_procedure): Handle functions with unknown
8530 return type.
8531 * objc-lang.c (lookup_objc_class, lookup_child_selector)
8532 (value_nsstring, print_object_command): Adjust calls to
8533 call_function_by_hand.
8534 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
8535 functions with unknown return type.
8536 (pascal_type_print_func_varspec_suffix): New function.
8537 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
8538 TYPE_CODE_METHOD>: Use it.
8539 * python/py-value.c (valpy_call): Adjust call to
8540 call_function_by_hand.
8541 * rust-lang.c (rust_evaluate_funcall): Adjust call to
8542 call_function_by_hand.
8543 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
8544 call_function_by_hand.
8545 * valops.c (value_allocate_space_in_inferior): Adjust call to
8546 call_function_by_hand.
8547 * typeprint.c (type_print_unknown_return_type): New function.
8548 * typeprint.h (type_print_unknown_return_type): New declaration.
8549
8550 2017-09-04 Pedro Alves <palves@redhat.com>
8551
8552 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
8553 types with more than one parameter as prototyped.
8554
8555 2017-09-04 Pedro Alves <palves@redhat.com>
8556
8557 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
8558 (disassemble_command): Use gdb_disassembly_flags instead of bare
8559 int.
8560 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
8561 (dump_insns, do_mixed_source_and_assembly_deprecated)
8562 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
8563 Use gdb_disassembly_flags instead of bare int.
8564 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
8565 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
8566 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
8567 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
8568 (enum gdb_disassembly_flag): ... values of this new enumeration.
8569 (gdb_disassembly_flags): Define.
8570 (gdb_disassembly)
8571 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
8572 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
8573 gdb_disassembly_flags instead of bare int.
8574 * record-btrace.c (btrace_insn_history)
8575 (record_btrace_insn_history, record_btrace_insn_history_range)
8576 (record_btrace_insn_history_from): Use gdb_disassembly_flags
8577 instead of bare int.
8578 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
8579 Use gdb_disassembly_flags instead of bare int.
8580 * target-debug.h (target_debug_print_gdb_disassembly_flags):
8581 Define.
8582 * target-delegates.c: Regenerate.
8583 * target.c (target_insn_history, target_insn_history_from)
8584 (target_insn_history_range): Use gdb_disassembly_flags instead of
8585 bare int.
8586 * target.h: Include "disasm.h".
8587 (struct target_ops) <to_insn_history, to_insn_history_from,
8588 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
8589 int.
8590 (target_insn_history, target_insn_history_from)
8591 (target_insn_history_range): Use gdb_disassembly_flags instead of
8592 bare int.
8593
8594 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8595
8596 * cli/cli-script.c (build_command_line): For if/while commands,
8597 check whether args is empty.
8598
8599 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8600
8601 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
8602 (enum command_control_type): Likewise.
8603 (struct command_line): Likewise.
8604 (free_command_lines): Likewise.
8605 (struct command_lines_deleter): Likewise.
8606 (command_line_up): Likewise.
8607 (read_command_lines): Likewise.
8608 (read_command_lines_1): Likewise.
8609 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
8610 (enum command_control_type): Likewise.
8611 (struct command_line): Likewise.
8612 (free_command_lines): Likewise.
8613 (struct command_lines_deleter): Likewise.
8614 (command_line_up): Likewise.
8615 (read_command_lines): Likewise.
8616 (read_command_lines_1): Likewise.
8617 * breakpoint.h: Include cli/cli-script.h.
8618 * extension-priv.h: Likewise.
8619 * gdbcmd.h: Likewise.
8620
8621 2017-09-04 Pedro Alves <palves@redhat.com>
8622
8623 * ada-lang.c (is_known_support_routine): Move sal declaration to
8624 where it is initialized.
8625 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
8626 (parse_breakpoint_sals, decode_static_tracepoint_spec)
8627 (clear_command, update_static_tracepoint): Remove init_sal
8628 references. Move declarations closer to initializations.
8629 * cli/cli-cmds.c (list_command): Move sal declarations closer to
8630 initializations.
8631 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
8632 references. Move sal declarations closer to initializations.
8633 * frame.c (find_frame_sal): Return a symtab_and_line via function
8634 return instead of output parameter. Remove init_sal references.
8635 * frame.h (find_frame_sal): Return a symtab_and_line via function
8636 return instead of output parameter.
8637 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
8638 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
8639 instead of memset.
8640 (gdbscm_find_pc_line): Remove init_sal reference.
8641 * infcall.c (call_function_by_hand_dummy): Remove init_sal
8642 references. Move declarations closer to initializations.
8643 * infcmd.c (set_step_frame): Update. Move declarations closer to
8644 initializations.
8645 (finish_backward): Remove init_sal references. Move declarations
8646 closer to initializations.
8647 * infrun.c (process_event_stop_test, handle_step_into_function)
8648 (insert_hp_step_resume_breakpoint_at_frame)
8649 (insert_step_resume_breakpoint_at_caller): Likewise.
8650 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
8651 (symbol_to_sal): Likewise.
8652 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
8653 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
8654 to its initialization.
8655 * reverse.c (save_bookmark_command): Use new/delete. Remove
8656 init_sal references. Move declarations closer to initializations.
8657 * source.c (get_current_source_symtab_and_line): Remove brace
8658 initialization.
8659 (set_current_source_symtab_and_line): Now takes the sal by const
8660 reference. Remove brace initialization.
8661 (line_info): Remove init_sal reference.
8662 * source.h (set_current_source_symtab_and_line): Now takes a
8663 symtab_and_line via const reference.
8664 * stack.c (set_current_sal_from_frame): Adjust.
8665 (print_frame_info): Adjust.
8666 (get_last_displayed_sal): Return the sal via function return
8667 instead of via output parameter. Simplify.
8668 (frame_info): Adjust.
8669 * stack.h (get_last_displayed_sal): Return the sal via function
8670 return instead of via output parameter.
8671 * symtab.c (init_sal): Delete.
8672 (find_pc_sect_line): Remove init_sal references. Move
8673 declarations closer to initializations.
8674 (find_function_start_sal): Remove init_sal references. Move
8675 declarations closer to initializations.
8676 * symtab.h (struct symtab_and_line): In-class initialize all
8677 fields.
8678 * tracepoint.c (set_traceframe_context)
8679 (print_one_static_tracepoint_marker): Remove init_sal references.
8680 Move declarations closer to initializations.
8681 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
8682 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
8683 declarations closer to initializations.
8684 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
8685 init_sal references. Adjust.
8686
8687 2017-09-04 Pedro Alves <palves@redhat.com>
8688
8689 * ax-gdb.c (agent_command_1): Use range-for.
8690 * break-catch-throw.c (re_set_exception_catchpoint): Update.
8691 * breakpoint.c: Include "common/array-view.h".
8692 (init_breakpoint_sal, create_breakpoint_sal): Change sals
8693 parameter from struct symtabs_and_lines to
8694 array_view<symtab_and_line>. Adjust. Use range-for. Update.
8695 (breakpoint_sals_to_pc): Change sals parameter from struct
8696 symtabs_and_lines to std::vector reference.
8697 (check_fast_tracepoint_sals): Change sals parameter from struct
8698 symtabs_and_lines to std::array_view. Use range-for.
8699 (decode_static_tracepoint_spec): Return a std::vector instead of
8700 symtabs_and_lines. Update.
8701 (create_breakpoint): Update.
8702 (break_range_command, until_break_command, clear_command): Update.
8703 (base_breakpoint_decode_location, bkpt_decode_location)
8704 (bkpt_probe_create_sals_from_location)
8705 (bkpt_probe_decode_location, tracepoint_decode_location)
8706 (tracepoint_probe_decode_location)
8707 (strace_marker_create_sals_from_location): Return a std::vector
8708 instead of symtabs_and_lines.
8709 (strace_marker_create_breakpoints_sal): Update.
8710 (strace_marker_decode_location): Return a std::vector instead of
8711 symtabs_and_lines. Update.
8712 (update_breakpoint_locations): Change struct symtabs_and_lines
8713 parameters to gdb::array_view. Adjust.
8714 (location_to_sals): Return a std::vector instead of
8715 symtabs_and_lines. Update.
8716 (breakpoint_re_set_default): Use std::vector instead of struct
8717 symtabs_and_lines.
8718 (decode_location_default): Return a std::vector instead of
8719 symtabs_and_lines. Update.
8720 * breakpoint.h: Include "common/array-view.h".
8721 (struct breakpoint_ops) <decode_location>: Now returns a
8722 std::vector instead of returning a symtabs_and_lines via output
8723 parameter.
8724 (update_breakpoint_locations): Change sals parameters to use
8725 gdb::array_view.
8726 * cli/cli-cmds.c (edit_command, list_command): Update to use
8727 std::vector and gdb::array_view.
8728 (ambiguous_line_spec): Adjust to use gdb::array_view and
8729 range-for.
8730 (compare_symtabs): Rename to ...
8731 (cmp_symtabs): ... this. Change parameters to symtab_and_line
8732 const reference and adjust.
8733 (filter_sals): Rewrite using std::vector and standard algorithms.
8734 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
8735 (jump_command): Update to use std::vector.
8736 * linespec.c (struct linespec_state) <canonical_names>: Update
8737 comment.
8738 (add_sal_to_sals_basic): Delete.
8739 (add_sal_to_sals, filter_results, convert_results_to_lsals)
8740 (decode_line_2, create_sals_line_offset)
8741 (convert_address_location_to_sals, convert_linespec_to_sals)
8742 (convert_explicit_location_to_sals, parse_linespec)
8743 (event_location_to_sals, decode_line_full, decode_line_1)
8744 (decode_line_with_current_source)
8745 (decode_line_with_last_displayed, decode_objc)
8746 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
8747 (linespec_result::~linespec_result): Adjust to use std::vector
8748 instead of symtabs_and_lines.
8749 * linespec.h (linespec_sals::sals): Now a std::vector.
8750 (struct linespec_result): Use std::vector, bool, and in-class
8751 initialization.
8752 (decode_line_1, decode_line_with_current_source)
8753 (decode_line_with_last_displayed): Return std::vector.
8754 * macrocmd.c (info_macros_command): Use std::vector.
8755 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
8756 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
8757 std::vector.
8758 * probe.h (parse_probes): Return a std::vector.
8759 * python/python.c (gdbpy_decode_line): Use std::vector and
8760 gdb::array_view.
8761 * source.c (select_source_symtab, line_info): Use std::vector.
8762 * stack.c (func_command): Use std::vector.
8763 * symtab.h (struct symtabs_and_lines): Delete.
8764 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
8765
8766 2017-09-04 Pedro Alves <palves@redhat.com>
8767
8768 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8769 unittests/array-view-selftests.c.
8770 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
8771 * common/array-view.h: New file.
8772 * unittests/array-view-selftests.c: New file.
8773
8774 2017-09-04 Pedro Alves <palves@redhat.com>
8775
8776 * cli/cli-cmds.c (edit_command): Pass message to
8777 ambiguous_line_spec.
8778 (list_command): Pass message to ambiguous_line_spec. Say
8779 "first"/"last" instead of "start" and "end" to be consistent with
8780 the manual.
8781 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
8782 them to print formatted message.
8783
8784 2017-09-04 Pedro Alves <palves@redhat.com>
8785
8786 * btrace.c (ftrace_add_pt): Pass btrace_insn to
8787 ftrace_update_insns by reference instead of pointer.
8788
8789 2017-09-04 Yao Qi <yao.qi@linaro.org>
8790
8791 * i386-go32-tdep.c: Include x86-xstate.h.
8792 (i386_go32_init_abi): Call i386_target_description.
8793 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
8794 if xcr0 is X86_XSTATE_X87_MASK.
8795 * i386-tdep.h (tdesc_i386): Remove the declaration.
8796 (tdesc_i386_mmx): Likewise.
8797
8798 2017-09-04 Yao Qi <yao.qi@linaro.org>
8799
8800 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
8801 X86_XSTATE_SSE_MASK instead of 0.
8802
8803 2017-09-04 Yao Qi <yao.qi@linaro.org>
8804
8805 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
8806 i386_target_description.
8807 * i386-fbsd-nat.c (i386fbsd_read_description): Call
8808 i386_target_description.
8809 * i386-tdep.c (i386_gdbarch_init): Likewise.
8810
8811 2017-09-04 Yao Qi <yao.qi@linaro.org>
8812
8813 * amd64-darwin-tdep.c: Include "x86-xstate.h".
8814 (x86_darwin_init_abi_64): Call amd64_target_description.
8815 * amd64-dicos-tdep.c: Likewise.
8816 * amd64-fbsd-nat.c: Likewise.
8817 * amd64-fbsd-tdep.c: Likewise.
8818 * amd64-nbsd-tdep.c: Likewise.
8819 * amd64-obsd-tdep.c: Likewise.
8820 * amd64-sol2-tdep.c: Likewise.
8821 * amd64-windows-tdep.c: Likewise.
8822 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
8823
8824 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8825
8826 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
8827 (btrace_function) <insn>: Change type to use std::vector.
8828 * btrace.c (ftrace_debug, ftrace_call_num_insn,
8829 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
8830 ftrace_update_insns, ftrace_compute_global_level_offset,
8831 btrace_stitch_bts, btrace_clear, btrace_insn_get,
8832 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
8833 change to std::vector.
8834 (ftrace_update_insns): Adjust to change to std::vector, change
8835 type of INSN parameter.
8836 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
8837 * record-btrace.c (btrace_call_history_insn_range,
8838 btrace_compute_src_line_range,
8839 record_btrace_frame_prev_register): Adjust to change to
8840 std::vector.
8841 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
8842 to change to std::vector.
8843
8844 2017-09-03 Tom Tromey <tom@tromey.com>
8845
8846 * corefile.c (reopen_exec_file): Use std::string.
8847
8848 2017-09-03 Tom Tromey <tom@tromey.com>
8849
8850 * compile/compile.c (compile_register_name_mangled): Return
8851 std::string.
8852 * compile/compile-loc2c.c (pushf_register_address): Update.
8853 (pushf_register): Update.
8854 * compile/compile-c-types.c (convert_array): Update.
8855 * compile/compile-c-symbols.c (generate_vla_size): Update.
8856 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
8857 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
8858 (convert_one_symbol): Update.
8859 (generate_c_for_for_one_variable): Update.
8860 * compile/compile-c-support.c (c_get_range_decl_name): Return a
8861 std::string.
8862 (generate_register_struct): Update.
8863 * compile/compile-internal.h (c_get_range_decl_name): Return a
8864 std::string.
8865 (compile_register_name_mangled): Return std::string.
8866
8867 2017-09-03 Tom Tromey <tom@tromey.com>
8868
8869 * utils.c (perror_string): Return a std::string.
8870 (throw_perror_with_name, perror_warning_with_name): Update.
8871
8872 2017-09-03 Tom Tromey <tom@tromey.com>
8873
8874 * demangle.c (demangle_command): Use std::string,
8875 unique_xmalloc_ptr.
8876
8877 2017-09-03 Tom Tromey <tom@tromey.com>
8878
8879 * cli/cli-setshow.c (do_set_command): Use std::string.
8880
8881 2017-09-03 Tom Tromey <tom@tromey.com>
8882
8883 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
8884
8885 2017-09-03 Tom Tromey <tom@tromey.com>
8886
8887 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
8888
8889 2017-09-03 Tom Tromey <tom@tromey.com>
8890
8891 * mi/mi-cmd-env.c (env_execute_cli_command): Use
8892 gdb::unique_xmalloc_ptr.
8893
8894 2017-09-03 Tom Tromey <tom@tromey.com>
8895
8896 * thread.c (print_thread_info_1): Use string_printf.
8897 (thread_apply_command, thread_apply_all_command): Use
8898 std::string.
8899
8900 2017-09-03 Tom Tromey <tom@tromey.com>
8901
8902 * valprint.c (val_print_string): Update.
8903 * gdbcore.h (memory_error_message): Return std::string.
8904 * corefile.c (memory_error_message): Return std::string.
8905 (memory_error): Update.
8906 * breakpoint.c (insert_bp_location): Update.
8907
8908 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
8909
8910 * target/waitstatus.h (target_waitstatus_to_string): Change
8911 return type to std::string.
8912 * target/waitstatus.c (target_waitstatus_to_string): Return
8913 std::string.
8914 * target.h (target_waitstatus_to_string): Remove declaration.
8915 * infrun.c (resume, clear_proceed_status_thread,
8916 print_target_wait_results, do_target_wait, save_waitstatus,
8917 stop_all_threads): Adjust.
8918 * record-btrace.c (record_btrace_wait): Adjust.
8919 * target-debug.h
8920 (target_debug_print_struct_target_waitstatus_p): Adjust.
8921
8922 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8923
8924 PR gdb/22046
8925 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
8926 detection.
8927
8928 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
8929
8930 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
8931 for setting/unsetting environment variables on the remote target.
8932 (New remote packets): Add entries for QEnvironmentHexEncoded,
8933 QEnvironmentUnset and QEnvironmentReset.
8934 * common/environ.c (gdb_environ::operator=): Extend method to
8935 handle m_user_set_env_list and m_user_unset_env_list.
8936 (gdb_environ::clear): Likewise.
8937 (match_var_in_string): Change type of first parameter from 'char
8938 *' to 'const char *'.
8939 (gdb_environ::set): Extend method to handle
8940 m_user_set_env_list and m_user_unset_env_list.
8941 (gdb_environ::unset): Likewise.
8942 (gdb_environ::clear_user_set_env): New method.
8943 (gdb_environ::user_set_envp): Likewise.
8944 (gdb_environ::user_unset_envp): Likewise.
8945 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
8946 m_user_unset_env_list on move constructor/assignment.
8947 (unset): Add new default parameter 'update_unset_list = true'.
8948 (clear_user_set_env): New method.
8949 (user_set_envp): Likewise.
8950 (user_unset_envp): Likewise.
8951 (m_user_set_env_list): New std::set.
8952 (m_user_unset_env_list): Likewise.
8953 * common/rsp-low.c (hex2str): New function.
8954 (bin2hex): New overload for bin2hex function.
8955 * common/rsp-low.c (hex2str): New prototype.
8956 (str2hex): New overload prototype.
8957 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
8958 QEnvironmentUnset and QEnvironmentReset.
8959 (remote_protocol_features): Add QEnvironmentHexEncoded,
8960 QEnvironmentUnset and QEnvironmentReset packets.
8961 (send_environment_packet): New function.
8962 (extended_remote_environment_support): Likewise.
8963 (extended_remote_create_inferior): Call
8964 extended_remote_environment_support.
8965 (_initialize_remote): Add QEnvironmentHexEncoded,
8966 QEnvironmentUnset and QEnvironmentReset packet configs.
8967 * unittests/environ-selftests.c (gdb_selftest_env_var):
8968 New variable.
8969 (test_vector_initialization): New function.
8970 (test_init_from_host_environ): Likewise.
8971 (test_reinit_from_host_environ): Likewise.
8972 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
8973 Likewise.
8974 (test_unset_set_empty_vector): Likewise.
8975 (test_vector_clear): Likewise.
8976 (test_std_move): Likewise.
8977 (test_move_constructor):
8978 (test_self_move): Likewise.
8979 (test_set_unset_reset): Likewise.
8980 (run_tests): Rewrite in terms of the functions above.
8981
8982 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
8983
8984 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
8985 (adi_available): Use a temp variable of type CORE_ADDR as argument
8986 3 when calling target_auxv_search.
8987 (adi_normalize_address): Use masks and xor operators to calculate
8988 normalized address.
8989 (adi_read_versions, adi_write_versions, adi_print_versions)
8990 (do_examine, do_assign): Use paddress.
8991
8992 2017-08-29 John Baldwin <jhb@FreeBSD.org>
8993
8994 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
8995 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
8996 out of loop and add supply of FIR.
8997 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
8998 add collect of FIR.
8999
9000 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
9001
9002 PR gdb/21827
9003 * cli/cli-script.c (define_command): Don't convert command name
9004 to lower case.
9005
9006 2017-08-25 Joel Brobecker <brobecker@adacore.com>
9007
9008 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
9009 Update all callers accordingly. Remove all code blocks handling
9010 the case where DISPP is not NULL.
9011
9012 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9013
9014 PR symtab/22003
9015 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
9016 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9017 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
9018
9019 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9020
9021 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
9022 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
9023 (read_comp_units_from_section): New parameter abbrev_section, use
9024 read_and_check_comp_unit_head, allocate signatured_type if needed.
9025 (create_all_comp_units): Update read_comp_units_from_section caller.
9026
9027 2017-08-23 Pedro Alves <palves@redhat.com>
9028
9029 PR remote/21852
9030 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
9031 to null_ptid and switch to thread without reading the registers
9032 after adding the inferior.
9033
9034 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
9035
9036 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
9037 compile-gcc.
9038 * compile/compile.c (compile_gcc, show_compile_gcc): New.
9039 (compile_to_object): Implement compile_gcc.
9040 (_initialize_compile): Install "set compile-gcc". Initialize
9041 compile_gcc.
9042
9043 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
9044
9045 * compile/compile.c (compile_to_object): Conditionally call
9046 set_verbose. Conditionally call compile or compile_v0.
9047
9048 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
9049
9050 * sparc64-tdep.h: (adi_normalize_address): New export.
9051 * sparc-nat.h: (open_adi_tag_fd): New export.
9052 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
9053 * sparc64-linux-tdep.c:
9054 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
9055 (sparc64_linux_handle_segmentation_fault): New function.
9056 (sparc64_linux_init_abi): Register
9057 sparc64_linux_handle_segmentation_fault
9058 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
9059 (sparc64_addr_bits_remove): New function.
9060 (sparc64_init_abi): Register sparc64_addr_bits_remove.
9061 (MAX_PROC_NAME_SIZE): New macro.
9062 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
9063 (sparc64adilist): New variable.
9064 (adi_proc_list): New variable.
9065 (find_adi_info): New function.
9066 (add_adi_info): New function.
9067 (get_adi_info_proc): New function.
9068 (get_adi_info): New function.
9069 (info_adi_command): New function.
9070 (read_maps_entry): New function.
9071 (adi_available): New function.
9072 (adi_normalize_address): New function.
9073 (adi_align_address): New function.
9074 (adi_convert_byte_count): New function.
9075 (adi_tag_fd): New function.
9076 (adi_is_addr_mapped): New function.
9077 (adi_read_versions): New function.
9078 (adi_write_versions): New function.
9079 (adi_print_versions): New function.
9080 (do_examine): New function.
9081 (do_assign): New function.
9082 (adi_examine_command): New function.
9083 (adi_assign_command): New function.
9084 (_initialize_sparc64_adi_tdep): New function.
9085
9086 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
9087
9088 * breakpoint.c (breakpoints_info): Rename to ...
9089 (info_breakpoints_command): ... this.
9090 (watchpoints_info): Rename to ...
9091 (info_watchpoints_command): ... this.
9092 (tracepoints_info): Rename to ...
9093 (info_tracepoints_command): ... this.
9094 (_initialize_breakpoint): Adjust.
9095 * dcache.c (dcache_info): Rename to ...
9096 (info_display_command): ... this.
9097 (_initialize_dcache): Adjust.
9098 * frame.h (args_info): Rename to ...
9099 (info_args_command): ... this.
9100 (locals_info): Rename to ...
9101 (info_locals_command): ... this.
9102 * infcmd.c (nofp_registers_info): Rename to ...
9103 (info_registers_command): ... this.
9104 (float_info): Rename to ...
9105 (info_float_command): ... this.
9106 (program_info): Rename to ...
9107 (info_program_command): ... this.
9108 (all_registers_info): Rename to ...
9109 (info_all_registers_command): ... this.
9110 (vector_info): Rename to ...
9111 (info_vector_command): ... this.
9112 (float_info): Rename to ...
9113 (info_float_command): ... this.
9114 (_initialize_infcmd): Adjust.
9115 * inferior.h (term_info): Rename to ...
9116 (info_terminal_command): ... this.
9117 * inflow.c (term_info): Rename to ...
9118 (info_terminal_command): ... this.
9119 (_initialize_inflow): Adjust.
9120 * infrun.c (signals_info): Rename to ...
9121 (info_signals_command): ... this.
9122 (_initialize_infrun): Adjust.
9123 * objc-lang.c (classes_info): Rename to ...
9124 (info_classes_command): ... this.
9125 (selectors_info): Rename to ...
9126 (info_selectors_command): ... this.
9127 (_initialize_objc_language): Adjust.
9128 * printcmd.c (sym_info): Rename to ...
9129 (info_symbol_command): ... this.
9130 (address_info): Rename to ...
9131 (info_address_command): ... this.
9132 (display_info): Rename to ...
9133 (info_display_command): ... this.
9134 (_initialize_printcmd): Adjust.
9135 * reverse.c (bookmarks_info): Rename to ...
9136 (info_breakpoints_command): ... this.
9137 (_initialize_reverse): Adjust.
9138 * ser-go32.c (dos_info): Rename to ...
9139 (info_serial_command): ... this.
9140 (_initialize_ser_dos): Adjust.
9141 * skip.c (skip_info): Rename to ...
9142 (info_skip_command): ... this.
9143 (_initialize_step_skip): Adjust.
9144 * source.c (line_info): Rename to ...
9145 (info_line_command): ... this.
9146 (source_info): Rename to ...
9147 (info_source_command)
9148 * stack.c (frame_info): Rename to ...
9149 (info_frame_command): ... this.
9150 (locals_info): Rename to ...
9151 (info_locals_command): ... this.
9152 (args_info): Rename to ...
9153 (info_args_command): ... this.
9154 (_initialize_stack): Adjust.
9155 * symtab.c (sources_info): Rename to ...
9156 (info_sources_command): ... this.
9157 (variables_info): Rename to ...
9158 (info_variables_command): ... this.
9159 (functions_info): Rename to ...
9160 (info_functions_command): ... this.
9161 (types_info): Rename to ...
9162 (info_types_command): ... this.
9163 (_initialize_symtab): Adjust.
9164 * target.c (target_info): Rename to ...
9165 (info_target_command): ... this.
9166 (initialize_targets): Adjust.
9167 * tracepoint.c (tvariables_info): Rename to ...
9168 (info_tvariables_command): ... this.
9169 (scope_info): Rename to ...
9170 (info_scope_command): ... this.
9171 (trace_dump_actions): Adjust.
9172 (_initialize_tracepoint): Adjust.
9173
9174 2017-08-22 Tom Tromey <tom@tromey.com>
9175
9176 * breakpoint.h (install_breakpoint): Update.
9177 * breakpoint.c (add_solib_catchpoint): Update.
9178 (install_breakpoint): Change argument to a std::unique_ptr.
9179 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
9180 (create_breakpoint_sal, create_breakpoint): Update.
9181 (watch_command_1, catch_exec_command_1)
9182 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
9183 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
9184 Return the breakpoint.
9185 (set_raw_breakpoint_without_location, set_raw_breakpoint)
9186 (new_single_step_breakpoint): Update.
9187 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
9188 std::unique_ptr.
9189 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9190 std::unique_ptr.
9191 * break-catch-sig.c (create_signal_catchpoint): Use
9192 std::unique_ptr.
9193 * ada-lang.c (create_ada_exception_catchpoint): Use
9194 std::unique_ptr.
9195
9196 2017-08-22 Tom Tromey <tom@tromey.com>
9197
9198 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
9199
9200 2017-08-22 Tom Tromey <tom@tromey.com>
9201
9202 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
9203 (lookup_partial_symbol): Update.
9204
9205 2017-08-22 Tom Tromey <tom@tromey.com>
9206
9207 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
9208 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
9209 (find_and_open_source, symtab_to_fullname): Update.
9210 * psymtab.c (psymtab_to_fullname): Update.
9211
9212 2017-08-22 Tom Tromey <tom@tromey.com>
9213
9214 * exec.c (exec_file_attach): Update.
9215 * linux-thread-db.c (try_thread_db_load): Update.
9216 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
9217 * utils.c (gdb_realpath): Change return type.
9218 (gdb_realpath_keepfile): Update.
9219 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
9220 (_initialize_utils): Register the new self test.
9221 * source.c (openp): Update.
9222 (find_and_open_source): Update.
9223 * nto-tdep.c (nto_find_and_open_solib): Update.
9224 * main.c (set_gdb_data_directory): Update.
9225 (captured_main_1): Update.
9226 * dwarf2read.c (dwarf2_get_dwz_file): Update
9227 (dw2_map_symbol_filenames): Update.
9228 * auto-load.c (auto_load_safe_path_vec_update): Update.
9229 (filename_is_in_auto_load_safe_path_vec): Change type of
9230 "filename_realp".
9231 (auto_load_objfile_script): Update.
9232 (file_is_auto_load_safe): Update. Use std::string.
9233 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
9234
9235 2017-08-22 Tom Tromey <tom@tromey.com>
9236
9237 * utils.c (gdb_realpath_keepfile): Return a
9238 gdb::unique_xmalloc_ptr.
9239 * exec.c (exec_file_attach): Update.
9240 * utils.h (gdb_realpath_keepfile): Return a
9241 gdb::unique_xmalloc_ptr.
9242
9243 2017-08-22 Tom Tromey <tom@tromey.com>
9244
9245 * compile/compile.c (compile_file_command): Use
9246 gdb::unique_xmalloc_ptr, std::string.
9247 * utils.c (gdb_abspath): Change return type.
9248 * source.c (openp): Update.
9249 * objfiles.c (allocate_objfile): Update.
9250 * main.c (set_gdb_data_directory): Update.
9251 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
9252
9253 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
9254
9255 * cli-cmds.c (list_commands): List actual code around more than
9256 one location.
9257
9258 2017-08-21 John Baldwin <jhb@FreeBSD.org>
9259
9260 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
9261
9262 2017-08-21 Pedro Alves <palves@redhat.com>
9263
9264 PR gdb/19487
9265 * c-exp.y (variable production): Handle function aliases.
9266 * minsyms.c (msymbol_is_text): New function.
9267 * minsyms.h (msymbol_is_text): Declare.
9268 * symtab.c (find_function_alias_target): New function.
9269 * symtab.h (find_function_alias_target): Declare.
9270
9271 2017-08-21 Pedro Alves <palves@redhat.com>
9272
9273 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
9274 typedefs.
9275 * typeprint.c (whatis_exp): If handling "whatis", and expression
9276 is OP_TYPE, strip one typedef level. Otherwise don't strip
9277 typedefs here.
9278 * valops.c (value_cast): Save "to" type before resolving
9279 stubs/typedefs. Use that type as resulting value's type.
9280
9281 2017-08-18 Tom Tromey <tom@tromey.com>
9282 Pedro Alves <palves@redhat.com>
9283
9284 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
9285 * sol-thread.c (sol_thread_resume, sol_thread_wait)
9286 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
9287 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
9288 * proc-service.c (ps_xfer_memory): Use scoped_restore.
9289 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
9290 (linux_get_siginfo_data): Add "thread" argument. Use
9291 scoped_restore.
9292 * linux-nat.c (linux_child_follow_fork)
9293 (check_stopped_by_watchpoint): Use scoped_restore.
9294 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
9295 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
9296 (restore_inferior_ptid, save_inferior_ptid): Remove.
9297 * btrace.c (btrace_fetch): Use scoped_restore.
9298 * bsd-uthread.c (bsd_uthread_fetch_registers)
9299 (bsd_uthread_store_registers): Use scoped_restore.
9300 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
9301 scoped_restore.
9302 * aix-thread.c (aix_thread_resume, aix_thread_wait)
9303 (aix_thread_xfer_partial): Use scoped_restore.
9304 * inferior.h (save_inferior_ptid): Remove.
9305
9306 2017-08-18 Yao Qi <yao.qi@linaro.org>
9307
9308 PR tdep/21818
9309 * arm-tdep.c (gdb_print_insn_arm): Mark
9310 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
9311
9312 2017-08-18 Yao Qi <yao.qi@linaro.org>
9313
9314 * NEWS: Mention GDBserver's new option "--selftest".
9315 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
9316 * selftest.c: Move it to common/selftest.c.
9317 * selftest.h: Move it to common/selftest.h.
9318 * selftest-arch.c (reset): New function.
9319 (tests_with_arch): Call reset.
9320
9321 2017-08-18 Yao Qi <yao.qi@linaro.org>
9322
9323 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
9324 instead of exception_fprintf and printf_filtered.
9325
9326 2017-08-18 Yao Qi <yao.qi@linaro.org>
9327
9328 * selftest.c (register_self_test): Rename it to
9329 selftests::register_test.
9330 (run_self_tests): selftest::run_tests.
9331 * selftest.h: Update declarations.
9332 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
9333 selftests::register_test_foreach_arch.
9334 * selftest-arch.h: Update declaration.
9335 * aarch64-tdep.c: Update.
9336 * arm-tdep.c: Likewise.
9337 * disasm-selftests.c: Likewise.
9338 * dwarf2loc.c: Likewise.
9339 * dwarf2-frame.c: Likewise.
9340 * findvar.c: Likewise.
9341 * gdbarch-selftests.c: Likewise.
9342 * maint.c (maintenance_selftest): Likewise.
9343 * regcache.c: Likewise.
9344 * rust-exp.y: Likewise.
9345 * selftest-arch.c: Likewise.
9346 * unittests/environ-selftests.c: Likewise.
9347 * unittests/function-view-selftests.c: Likewise.
9348 * unittests/offset-type-selftests.c: Likewise.
9349 * unittests/optional-selftests.c: Likewise.
9350 * unittests/scoped_restore-selftests.c: Likewise.
9351 * utils-selftests.c: Likewise.
9352
9353 2017-08-17 Pedro Alves <palves@redhat.com>
9354
9355 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
9356 local.
9357
9358 2017-08-17 Pedro Alves <palves@redhat.com>
9359
9360 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
9361 field.
9362 (reset_die_in_process): Delete, replaced by ...
9363 (process_die_scope): ... this new class. Make it responsible for
9364 freeing cu->line_header too.
9365 (process_die): Use process_die_scope.
9366 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
9367 cu->line_header_die_owner. Don't release the line header if it's
9368 owned by the CU.
9369 (setup_type_unit_groups): Make the CU/DIE own the line header.
9370 Don't release the line header here.
9371
9372 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
9373
9374 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
9375
9376 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
9377
9378 * NEWS: Mention new shortcuts for nexti and stepi in TUI
9379 Single-Key mode
9380
9381 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
9382
9383 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
9384 mode command list.
9385
9386 2017-08-15 Stafford Horne <shorne@gmail.com>
9387
9388 * MAINTAINERS (Write After Approval): Add Stafford Horne.
9389
9390 2017-08-15 Stafford Horne <shorne@gmail.com>
9391
9392 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
9393
9394 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
9395
9396 PR gdb/21954
9397 * infcmd.c (unset_environment_command): Use the 'clear' method on
9398 the environment instead of resetting it.
9399
9400 2017-08-15 John Baldwin <jhb@FreeBSD.org>
9401
9402 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
9403 platforms.
9404
9405 2017-08-14 Tom Tromey <tom@tromey.com>
9406
9407 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
9408 (print_binary_chars): Likewise.
9409 (BITS_IN_BYTES): Remove.
9410
9411 2017-08-14 Tom Tromey <tom@tromey.com>
9412
9413 PR gdb/21675
9414 * valprint.c (LOW_ZERO): Change value to 034.
9415 (print_octal_chars): Add static_asserts for octal constants.
9416 * printcmd.c (print_scalar_formatted): Add 'd' case.
9417
9418 2017-08-11 Tom Tromey <tom@tromey.com>
9419
9420 * symfile.c (add_symbol_file_command): Use std::vector.
9421
9422 2017-08-14 Tom Tromey <tom@tromey.com>
9423
9424 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
9425 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9426 std::move.
9427 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
9428
9429 2017-08-11 Pedro Alves <palves@redhat.com>
9430
9431 * infrun.c (process_event_stop_test): Adjust
9432 function_name_is_marked_for_skip call.
9433 * skip.c: Include <list>.
9434 (skiplist_entry): Make it a class with private fields, and
9435 getters/setters.
9436 (skiplist_entry_chain): Delete.
9437 (skiplist_entries): New.
9438 (skiplist_entry_count): Delete.
9439 (highest_skiplist_entry_num): New.
9440 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
9441 (add_skiplist_entry): Delete.
9442 (skiplist_entry::skiplist_entry): New.
9443 (skiplist_entry::add_entry): New.
9444 (skip_file_command, skip_function): Adjust.
9445 (compile_skip_regexp): Delete.
9446 (skip_command): Don't compile regexp here. Adjust to use
9447 skiplist_entry::add_entry.
9448 (skip_info): Adjust to use range-for and getters.
9449 (skip_enable_command, skip_disable_command): Adjust to use
9450 range-for and setters.
9451 (skip_delete_command): Adjust to use std::list.
9452 (add_skiplist_entry): Delete.
9453 (skip_file_p): Delete, refactored as ...
9454 (skiplist_entry::do_skip_file_p): ... this new method.
9455 (skip_gfile_p): Delete, refactored as ...
9456 (skiplist_entry::do_gskip_file_p): ... this new method.
9457 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
9458 (skiplist_entry::skip_function_p): ... this new method.
9459 (function_name_is_marked_for_skip): Now returns bool, and takes
9460 the function sal by const reference. Adjust to use range-for and
9461 skiplist_entry methods.
9462 (_initialize_step_skip): Remove references to
9463 skiplist_entry_chain, skiplist_entry_count.
9464 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
9465 takes the function sal by const reference.
9466
9467 2017-08-11 Yao Qi <yao.qi@linaro.org>
9468
9469 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
9470 (dwarf2_frame_cache): Remove reset_cache_cleanup.
9471 (dwarf2_frame_cache):
9472 * frame-unwind.c (frame_unwind_try_unwinder): Catch
9473 RETURN_MASK_ALL and set *this_case to NULL.
9474 * frame-unwind.h: Update comments.
9475
9476 2017-08-11 Yao Qi <yao.qi@linaro.org>
9477
9478 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
9479 (dwarf2_frame_state_copy_regs): Remove.
9480 (dwarf2_frame_state_free_regs): Remove.
9481 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
9482 (dwarf2_restore_rule): Call method .alloc_regs instead of
9483 dwarf2_frame_state_alloc_regs.
9484 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
9485 constructor. Call std::move.
9486 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
9487 (dwarf2_frame_cache): Likewise.
9488
9489 [GDB_SELF_TEST]: Include selftest.h and
9490 selftest-arch.h.
9491 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
9492 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
9493 execute_cfa_program_test.
9494
9495 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
9496 copy ctor, assignment operator, move assignment.
9497 <alloc_regs>: New method.
9498 <swap>: New method.
9499 (struct dwarf2_frame_state): Delete dtor.
9500 (dwarf2_frame_state_alloc_regs): Remove declaration.
9501 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
9502 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
9503
9504 2017-08-11 Yao Qi <yao.qi@linaro.org>
9505
9506 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
9507 (dwarf2_frame_state::dwarf2_frame_state): New.
9508 (dwarf2_frame_state::~dwarf2_frame_state): New.
9509 (dwarf2_fetch_cfa_info): Update.
9510 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
9511 rather than a pointer. Update code.
9512 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
9513 dtor.
9514 <data_align, code_align, retaddr_column>: Change them to const.
9515 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
9516 to bool.
9517
9518 2017-08-11 Yao Qi <yao.qi@linaro.org>
9519
9520 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
9521 <loc.exp>: New field.
9522 * dwarf2-frame.c (execute_cfa_program): Update.
9523 (dwarf2_frame_prev_register): Update.
9524
9525 2017-08-10 Pedro Alves <palves@redhat.com>
9526
9527 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
9528
9529 2017-08-09 John Baldwin <jhb@FreeBSD.org>
9530
9531 * fbsd-nat.c (struct fbsd_fork_info): Remove.
9532 (fbsd_pending_children): Use std::list.
9533 (fbsd_remember_child): Likewise.
9534 (fbsd_is_child_pending): Likewise.
9535 (fbsd_pending_vfork_done): Use std::forward_list.
9536 (fbsd_add_vfork_done): Likewise.
9537 (fbsd_is_vfork_done_pending): Likewise.
9538 (fbsd_next_vfork_done): Likewise.
9539
9540 2017-08-09 John Baldwin <jhb@FreeBSD.org>
9541
9542 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
9543 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
9544 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
9545 for `mapfilename'.
9546 (fbsd_xfer_partial): Use gdb::byte_vector.
9547 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
9548
9549 2017-08-09 John Baldwin <jhb@FreeBSD.org>
9550
9551 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
9552 "filestuff.h".
9553 (fbsd_find_memory_regions): Fix `mapfile' initialization.
9554
9555 2017-08-09 Tom Tromey <tom@tromey.com>
9556
9557 * skip.c (skiplist_entry): New constructor.
9558 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
9559 (skiplist_entry::file_is_glob): Now bool.
9560 (skiplist_entry::file, skiplist_entry::function): Now
9561 std::string.
9562 (make_skip_entry): Return a unique_ptr. Use new.
9563 (free_skiplist_entry, free_skiplist_entry_cleanup)
9564 (make_free_skiplist_entry_cleanup): Remove.
9565 (skip_command, skip_disable_command, add_skiplist_entry)
9566 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
9567 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
9568 (function_name_is_marked_for_skip): Update.
9569 (skip_delete_command): Update. Use delete.
9570
9571 2017-08-09 Jiong Wang <jiong.wang@arm.com>
9572
9573 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
9574 (aarch64_linux_core_read_description): New function.
9575 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
9576
9577 2017-08-09 Pedro Alves <palves@redhat.com>
9578
9579 * cp-name-parser.y (cp_comp_to_string): Return a
9580 gdb::unique_xmalloc_ptr<char>.
9581 * cp-support.c (replace_typedefs_qualified_name)
9582 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
9583 (cp_canonicalize_string_full): Use op= instead of explicit
9584 convertion.
9585 (cp_class_name_from_physname, method_name_from_physname)
9586 (cp_func_name, cp_remove_params): Adjust to use
9587 gdb::unique_xmalloc_ptr<char>.
9588 * cp-support.h (cp_comp_to_string): Return a
9589 gdb::unique_xmalloc_ptr<char>.
9590 * python/py-type.c (typy_lookup_type): Adjust to use
9591 gdb::unique_xmalloc_ptr<char>.
9592
9593 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
9594
9595 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
9596
9597 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
9598 Yao Qi <yao.qi@linaro.org>
9599
9600 * cp-support.c (cp_canonicalize_string_full): Use
9601 gdb::unique_xmalloc_ptr<char>.
9602 (cp_canonicalize_string): Likewise.
9603
9604 2017-08-09 Yao Qi <yao.qi@linaro.org>
9605
9606 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
9607 * regformats/i386/amd64-avx-avx512.dat: Remove.
9608 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
9609 * regformats/i386/amd64-avx-mpx.dat:Remove.
9610 * regformats/i386/amd64-avx.dat: Remove.
9611 * regformats/i386/amd64-mpx.dat: Remove.
9612 * regformats/i386/i386-avx-avx512.dat: Remove.
9613 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
9614 * regformats/i386/i386-avx-mpx.dat: Remove.
9615 * regformats/i386/i386-mmx.dat: Remove.
9616 * regformats/i386/i386-mpx.dat: Remove.
9617
9618 2017-08-09 Yao Qi <yao.qi@linaro.org>
9619
9620 * amd64-tdep.h (tdesc_x32): Remove the declaration.
9621 * amd64-tdep.c: Don't include features/i386/x32*.c.
9622 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
9623 functions.
9624 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
9625 and i386/x32-avx-avx512.
9626 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
9627 and i386/x32.xml.
9628 * features/i386/x32-avx-avx512.c: Removed.
9629 * features/i386/x32-avx-avx512.xml: Removed.
9630 * features/i386/x32-avx.c: Removed.
9631 * features/i386/x32-avx.xml: Removed.
9632 * features/i386/x32.c: Removed.
9633 * features/i386/x32.xml: Removed.
9634 * regformats/i386/x32-avx-avx512.dat: Removed.
9635 * regformats/i386/x32-avx.dat: Removed.
9636 * regformats/i386/x32.dat: Removed.
9637
9638 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9639
9640 PR breakpoints/21886
9641 * mem-break.c (default_memory_insert_breakpoint): Use
9642 `->placed_address' rather than `->reqstd_address' for the
9643 breakpoint location.
9644
9645 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9646
9647 * arch-utils.c (default_print_insn): Remove arch/mach/endian
9648 assertions.
9649
9650 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9651
9652 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
9653 a union of `tdep_info', `tdesc_data' and `id'.
9654 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
9655 rather than `info.tdep_info'.
9656 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
9657 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9658 * i386-tdep.c (i386_gdbarch_init): Likewise.
9659 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
9660 * mips-tdep.c (mips_gdbarch_init): Likewise.
9661 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9662 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9663 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
9664 `info.tdep_info'.
9665 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
9666 `info.tdep_info'.
9667 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9668 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
9669 `info.tdep_info'.
9670 * spu-tdep.c (spu_gdbarch_init): Likewise.
9671 * gdbarch.h: Regenerate.
9672
9673 2017-08-07 Leszek Swirski <leszeks@google.com>
9674
9675 PR symtab/20899
9676 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
9677
9678 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
9679
9680 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
9681 (gdbsim_open): Rename gdb_argv args object to argv.
9682
9683 2017-08-05 Tom Tromey <tom@tromey.com>
9684
9685 * compile/compile-object-load.c (compile_object_load): Use
9686 gdb::unique_xmalloc_ptr.
9687 * cli/cli-dump.c (scan_filename): Rename from
9688 scan_filename_with_cleanup. Change return type.
9689 (scan_expression): Rename from scan_expression_with_cleanup.
9690 Change return type.
9691 (dump_memory_to_file, dump_value_to_file, restore_command):
9692 Use gdb::unique_xmalloc_ptr. Update.
9693 * cli/cli-cmds.c (find_and_open_script): Use
9694 gdb::unique_xmalloc_ptr.
9695 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
9696 * symmisc.c (maintenance_print_symbols)
9697 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
9698 * symfile.c (symfile_bfd_open, generic_load)
9699 (add_symbol_file_command, remove_symbol_file_command): Use
9700 gdb::unique_xmalloc_ptr.
9701 * source.c (openp): Use gdb::unique_xmalloc_ptr.
9702 * psymtab.c (maintenance_print_psymbols): Use
9703 gdb::unique_xmalloc_ptr.
9704 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
9705 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
9706 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
9707 (reload_shared_libraries_1): Likewise.
9708
9709 2017-08-05 Tom Tromey <tom@tromey.com>
9710
9711 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
9712 (rust_op_vector, rust_set_vector): New typedefs.
9713 (current_parser): New global.
9714 (work_obstack): Change to pointer type. Update all users.
9715 (rust_ast, pstate): Remove globals.
9716 (struct rust_parser): New.
9717 (%union) <params, field_inits>: Change type.
9718 (start, tuple_expr, unit_expr, struct_expr_list, literal)
9719 (field_expr, expr_list, maybe_expr_list, type_list): Update.
9720 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
9721 (convert_params_to_types, convert_params_to_expression): Change
9722 type of "params".
9723 (ast_string): Change type of "fields".
9724 (rust_parse): Make a rust_parser. Remove cleanups.
9725 (rust_lex_tests): Make and install an auto_obstack.
9726
9727 2017-08-04 Yao Qi <yao.qi@linaro.org>
9728
9729 * configure.srv (ipa_x32_linux_regobj): New.
9730 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
9731 instead of X86_TDESC_AVX512.
9732 (initialize_low_tracepoint): Call
9733 init_registers_x32_avx_avx512_linux.
9734
9735 2017-08-04 Yao Qi <yao.qi@linaro.org>
9736
9737 * utils.h (gdb_argv): Add namespace std for nullptr_t.
9738
9739 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
9740
9741 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
9742
9743 2017-08-03 Tom Tromey <tom@tromey.com>
9744
9745 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
9746 Remove.
9747 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
9748
9749 2017-08-03 Tom Tromey <tom@tromey.com>
9750
9751 * python/py-param.c (compute_enum_values): Use gdb_argv.
9752
9753 2017-08-03 Tom Tromey <tom@tromey.com>
9754
9755 * utils.h (struct gdb_argv_deleter): New.
9756 (gdb_argv): New class.
9757 * utils.c (gdb_argv::reset): New method.
9758 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
9759 * tracefile.c (tsave_command): Use gdb_argv.
9760 * top.c (new_ui_command): Use gdb_argv.
9761 * symmisc.c (maintenance_print_symbols)
9762 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
9763 * symfile.c (symbol_file_command, generic_load)
9764 (remove_symbol_file_command): Use gdb_argv.
9765 * stack.c (backtrace_command): Use gdb_argv.
9766 * source.c (add_path, show_substitute_path_command)
9767 (unset_substitute_path_command, set_substitute_path_command):
9768 Use gdb_argv.
9769 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
9770 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
9771 * remote.c (extended_remote_run, remote_put_command)
9772 (remote_get_command, remote_delete_command): Use gdb_argv.
9773 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
9774 (gdbsim_open): Use gdb_argv.
9775 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
9776 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
9777 * procfs.c (procfs_info_proc): Use gdb_argv.
9778 * interps.c (interpreter_exec_cmd): Use gdb_argv.
9779 * infrun.c (handle_command): Use gdb_argv.
9780 * inferior.c (add_inferior_command, clone_inferior_command):
9781 Use gdb_argv.
9782 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
9783 * exec.c (exec_file_command): Use gdb_argv.
9784 * cli/cli-cmds.c (alias_command): Use gdb_argv.
9785 * compile/compile.c (build_argc_argv): Use gdb_argv.
9786
9787 2017-08-03 Tom Tromey <tom@tromey.com>
9788
9789 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
9790
9791 2017-08-03 Tom Tromey <tom@tromey.com>
9792
9793 * python/python.c (compute_python_string): Return std::string.
9794 (gdbpy_eval_from_control_command): Update.
9795 (do_start_initialization): Use std::string.
9796 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
9797 xstrprintf.
9798 * python/py-breakpoint.c (local_setattro): Use string_printf, not
9799 xstrprintf.
9800
9801 2017-08-03 Tom Tromey <tom@tromey.com>
9802
9803 * top.h (do_restore_instream_cleanup): Remove.
9804 * top.c (do_restore_instream_cleanup): Remove.
9805 (read_command_file): Use scoped_restore.
9806 * cli/cli-script.c (execute_user_command): Use scoped_restore.
9807
9808 2017-08-03 Tom Tromey <tom@tromey.com>
9809
9810 * cli/cli-script.c (execute_user_command)
9811 (execute_control_command): Use scoped_restore.
9812
9813 2017-08-03 Tom Tromey <tom@tromey.com>
9814
9815 * cli/cli-script.c (do_restore_user_call_depth): Remove.
9816 (execute_user_command): Remove user_call_depth; use
9817 user_args_stack's size instead.
9818
9819 2017-08-03 Tom Tromey <tom@tromey.com>
9820
9821 * top.h (in_user_command): Remove.
9822 * top.c (in_user_command): Remove.
9823 * cli/cli-script.c (do_restore_user_call_depth)
9824 (execute_user_command): Update.
9825
9826 2017-08-03 Tom Tromey <tom@tromey.com>
9827
9828 * valops.c (search_struct_method): Use gdb::byte_vector.
9829 * valarith.c (value_concat): Use std::vector.
9830 * target.c (memory_xfer_partial): Use gdb::byte_vector.
9831 (simple_search_memory): Likewise.
9832 * printcmd.c (find_string_backward): Use gdb::byte_vector.
9833 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
9834 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
9835 * elfread.c (elf_rel_plt_read): Use std::string.
9836 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
9837 * cli/cli-dump.c (restore_section_callback): Use
9838 gdb::byte_vector.
9839
9840 2017-08-03 Tom Tromey <tom@tromey.com>
9841
9842 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
9843
9844 2017-08-03 Tom Tromey <tom@tromey.com>
9845
9846 * tui/tui-regs.c (tui_restore_gdbout): Remove.
9847 (tui_register_format): Use scoped_restore.
9848
9849 2017-08-03 Tom Tromey <tom@tromey.com>
9850
9851 * reverse.c (exec_direction_default): Remove.
9852 (exec_reverse_once): Use scoped_restore.
9853 * remote.c (restore_remote_timeout): Remove.
9854 (remote_flash_erase, remote_flash_write, remote_flash_done)
9855 (readchar, remote_serial_write): Use scoped_restore.
9856 * cli/cli-script.c (struct source_cleanup_lines_args)
9857 (source_cleanup_lines): Remove.
9858 (script_from_file): Use scoped_restore.
9859 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
9860 (source_command): Use scoped_restore.
9861
9862 2017-08-03 Tom Tromey <tom@tromey.com>
9863
9864 * utils.h (make_cleanup_free_so): Remove.
9865 * utils.c (do_free_so, make_cleanup_free_so): Remove.
9866 * solist.h (struct so_deleter): New.
9867 (so_list_up): New typedef.
9868 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
9869
9870 2017-08-03 Tom Tromey <tom@tromey.com>
9871
9872 * utils.h (make_cleanup_restore_current_language): Remove.
9873 * utils.c (do_restore_current_language)
9874 (make_cleanup_restore_current_language): Remove.
9875 * parse.c (parse_exp_in_context_1)
9876 (parse_expression_with_language): Use
9877 scoped_restore_current_language.
9878 * mi/mi-main.c (mi_cmd_execute): Use
9879 scoped_restore_current_language.
9880 * language.h (scoped_restore_current_language): New class.
9881
9882 2017-08-03 Tom Tromey <tom@tromey.com>
9883
9884 * compile/compile.c (cleanup_unlink_file): Remove.
9885 (compile_to_object): Use gdb::unlinker.
9886 (eval_compile_command): Likewise.
9887
9888 2017-08-03 Tom Tromey <tom@tromey.com>
9889
9890 * utils.h (make_cleanup_fclose): Remove.
9891 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
9892
9893 2017-08-03 Tom Tromey <tom@tromey.com>
9894
9895 * top.c (open_terminal_stream): Return gdb_file_up.
9896 (new_ui_command): Update.
9897
9898 2017-08-03 Tom Tromey <tom@tromey.com>
9899
9900 * source.c (print_source_lines_base, forward_search_command)
9901 (reverse_search_command): Use gdb_file_up.
9902
9903 2017-08-03 Tom Tromey <tom@tromey.com>
9904
9905 * fbsd-nat.c (fbsd_find_memory_regions): Update.
9906
9907 2017-08-03 Tom Tromey <tom@tromey.com>
9908
9909 * cli/cli-cmds.c (find_and_open_script): Change return type.
9910 Remove "streamp" and "full_path" parameters.
9911 (source_script_with_search): Update.
9912 * auto-load.c (source_script_file): Update.
9913 * cli/cli-cmds.h (find_and_open_script): Change type.
9914 (open_script): New struct.
9915
9916 2017-08-03 Tom Tromey <tom@tromey.com>
9917
9918 * xml-support.c (xml_fetch_content_from_file): Update.
9919 * ui-file.c (stdio_file::open): Update.
9920 * tracefile-tfile.c (tfile_start): Update.
9921 * remote.c (remote_file_put, remote_file_get): Update.
9922 * nat/linux-procfs.c (linux_proc_get_int)
9923 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
9924 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
9925 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
9926 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
9927 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
9928 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
9929 * linux-nat.c (linux_proc_pending_signals): Update.
9930 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
9931 (file_closer): Remove.
9932 * compile/compile.c (compile_to_object): Update.
9933 * common/filestuff.h (struct gdb_file_deleter): New.
9934 (gdb_file_up): New typedef.
9935 (gdb_fopen_cloexec): Change return type.
9936 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
9937 * cli/cli-dump.c (fopen_with_cleanup): Remove.
9938 (dump_binary_file, restore_binary_file): Update.
9939 * auto-load.c (auto_load_objfile_script_1): Update.
9940
9941 2017-08-03 Tom Tromey <tom@tromey.com>
9942
9943 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
9944 (info_static_tracepoint_markers_command): Likewise.
9945 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
9946 * skip.c (skip_info): Use ui_out_emit_table.
9947 * progspace.c (print_program_space): Use ui_out_emit_table.
9948 * osdata.c (info_osdata): Use ui_out_emit_table.
9949 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
9950 ui_out_emit_table.
9951 * linux-thread-db.c (info_auto_load_libthread_db): Use
9952 ui_out_emit_table.
9953 * inferior.c (print_inferior): Use ui_out_emit_table.
9954 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
9955 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
9956 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
9957 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
9958 * ui-out.h (class ui_out_emit_table): New.
9959
9960 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
9961
9962 * mips-tdep.c (mips_fpu_type_str): New function.
9963 (mips_dump_tdep): Call it.
9964
9965 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
9966
9967 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
9968 `->mips_fpu_type'.
9969
9970 2017-07-31 Xavier Roirand <roirand@adacore.com>
9971
9972 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
9973
9974 2017-07-27 Xavier Roirand <roirand@adacore.com>
9975
9976 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
9977
9978 2017-07-26 Yao Qi <yao.qi@linaro.org>
9979
9980 * cli/cli-cmds.c (maintenancechecklist): New variable.
9981 * gdbcmd.h (maintenancechecklist): Declare it.
9982 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
9983 Call i386_linux_read_description with different masks.
9984 * maint.c (maintenance_check_command): New function.
9985 (_initialize_maint_cmds): Call add_prefix_cmd.
9986 * target-descriptions.c (tdesc_reg): override operator != and ==.
9987 (tdesc_type): Likewise.
9988 (tdesc_feature): Likewise.
9989 (target_desc): Likewise.
9990 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
9991 (maintenance_check_xml_descriptions): New function.
9992 (_initialize_target_descriptions) Add command "xml-descriptions".
9993 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
9994
9995 2017-07-26 Yao Qi <yao.qi@linaro.org>
9996
9997 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
9998 Include features/i386/32bit-*.c.
9999 (i386_linux_read_description): Generate target description if it
10000 doesn't exist.
10001 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
10002 functions.
10003 * features/i386/32bit-linux.c: Re-generated.
10004 * features/i386/32bit-sse.c: Likewise.
10005 * target-descriptions.c (print_c_feature::visit): Print code to
10006 set register number if needed.
10007 (print_c_feature) <m_next_regnum>: New field.
10008
10009 2017-07-26 Yao Qi <yao.qi@linaro.org>
10010
10011 * features/Makefile (CFILES): Rename with TDESC_CFILES.
10012 (FEATURE_XMLFILES): New.
10013 (FEATURE_CFILES): New.
10014 New rules.
10015 (clean-cfiles): Remove generated c files.
10016 * features/i386/32bit-avx.c: Generated.
10017 * features/i386/32bit-avx512.c: Generated.
10018 * features/i386/32bit-core.c: Generated.
10019 * features/i386/32bit-linux.c: Generated.
10020 * features/i386/32bit-mpx.c: Generated.
10021 * features/i386/32bit-pkeys.c: Generated.
10022 * features/i386/32bit-sse.c: Generated.
10023 * target-descriptions.c: Include algorithm.
10024 (tdesc_element_visitor): Add method visit_end.
10025 (print_c_tdesc): Implement visit_end.
10026 (print_c_tdesc:: m_filename_after_features): Move it to
10027 protected.
10028 (print_c_feature): New class.
10029 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
10030 name starts with "i386/32bit-".
10031
10032 2017-07-26 Yao Qi <yao.qi@linaro.org>
10033
10034 * target-descriptions.c (tdesc_element_visitor): New class.
10035 (tdesc_element): New class.
10036 (tdesc_reg): Inherit from tdesc_element.
10037 (tdesc_reg::accept): New function.
10038 (tdesc_type): Inherit from tdesc_element.
10039 (tdesc_type::accept): New function.
10040 (tdesc_feature): Inherit from tdesc_element.
10041 (tdesc_feature::accept): New function.
10042 (target_desc): Inherit from tdesc_element.
10043 (target_desc::target_desc): New.
10044 (target_desc::~target_desc): New.
10045 (target_desc::accept): New.
10046 (allocate_target_description): Use new.
10047 (free_target_description): Use delete.
10048 (print_c_tdesc): New class.
10049 (maint_print_c_tdesc_cmd): Adjust.
10050
10051 * features/aarch64.c: Re-generated.
10052 * features/arc-arcompact.c: Re-generated.
10053 * features/arc-v2.c: Re-generated.
10054 * features/arm/arm-with-iwmmxt.c: Re-generated.
10055 * features/arm/arm-with-m.c: Re-generated.
10056 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
10057 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
10058 * features/arm/arm-with-neon.c: Re-generated.
10059 * features/arm/arm-with-vfpv2.c: Re-generated.
10060 * features/arm/arm-with-vfpv3.c: Re-generated.
10061 * features/i386/amd64-avx-avx512.c: Re-generated.
10062 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10063 * features/i386/amd64-avx.c: Re-generated.
10064 * features/i386/amd64-avx-linux.c: Re-generated.
10065 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
10066 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10067 * features/i386/amd64-avx-mpx.c: Re-generated.
10068 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
10069 * features/i386/amd64.c: Re-generated.
10070 * features/i386/amd64-linux.c: Re-generated.
10071 * features/i386/amd64-mpx.c: Re-generated.
10072 * features/i386/amd64-mpx-linux.c: Re-generated.
10073 * features/i386/i386-avx-avx512.c: Re-generated.
10074 * features/i386/i386-avx-avx512-linux.c: Re-generated.
10075 * features/i386/i386-avx.c: Re-generated.
10076 * features/i386/i386-avx-linux.c: Re-generated.
10077 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
10078 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
10079 * features/i386/i386-avx-mpx.c: Re-generated.
10080 * features/i386/i386-avx-mpx-linux.c: Re-generated.
10081 * features/i386/i386.c: Re-generated.
10082 * features/i386/i386-linux.c: Re-generated.
10083 * features/i386/i386-mmx.c: Re-generated.
10084 * features/i386/i386-mmx-linux.c: Re-generated.
10085 * features/i386/i386-mpx.c: Re-generated.
10086 * features/i386/i386-mpx-linux.c: Re-generated.
10087 * features/i386/x32-avx-avx512.c: Re-generated.
10088 * features/i386/x32-avx-avx512-linux.c: Re-generated.
10089 * features/i386/x32-avx.c: Re-generated.
10090 * features/i386/x32-avx-linux.c: Re-generated.
10091 * features/i386/x32.c: Re-generated.
10092 * features/i386/x32-linux.c: Re-generated.
10093 * features/microblaze.c: Re-generated.
10094 * features/microblaze-with-stack-protect.c: Re-generated.
10095 * features/mips64-dsp-linux.c: Re-generated.
10096 * features/mips64-linux.c: Re-generated.
10097 * features/mips-dsp-linux.c: Re-generated.
10098 * features/mips-linux.c: Re-generated.
10099 * features/nds32.c: Re-generated.
10100 * features/nios2.c: Re-generated.
10101 * features/nios2-linux.c: Re-generated.
10102 * features/rs6000/powerpc-32.c: Re-generated.
10103 * features/rs6000/powerpc-32l.c: Re-generated.
10104 * features/rs6000/powerpc-403.c: Re-generated.
10105 * features/rs6000/powerpc-403gc.c : Re-generated.
10106 * features/rs6000/powerpc-405.c: Re-generated.
10107 * features/rs6000/powerpc-505.c: Re-generated.
10108 * features/rs6000/powerpc-601.c: Re-generated.
10109 * features/rs6000/powerpc-602.c: Re-generated.
10110 * features/rs6000/powerpc-603.c: Re-generated.
10111 * features/rs6000/powerpc-604.c: Re-generated.
10112 * features/rs6000/powerpc-64.c: Re-generated.
10113 * features/rs6000/powerpc-64l.c: Re-generated.
10114 * features/rs6000/powerpc-7400.c: Re-generated.
10115 * features/rs6000/powerpc-750.c: Re-generated.
10116 * features/rs6000/powerpc-860.c: Re-generated.
10117 * features/rs6000/powerpc-altivec32.c: Re-generated.
10118 * features/rs6000/powerpc-altivec32l.c: Re-generated.
10119 * features/rs6000/powerpc-altivec64.c: Re-generated.
10120 * features/rs6000/powerpc-altivec64l.c: Re-generated.
10121 * features/rs6000/powerpc-cell32l.c: Re-generated.
10122 * features/rs6000/powerpc-cell64l.c: Re-generated.
10123 * features/rs6000/powerpc-e500.c: Re-generated.
10124 * features/rs6000/powerpc-e500l.c: Re-generated.
10125 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
10126 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
10127 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
10128 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
10129 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
10130 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
10131 * features/rs6000/powerpc-vsx32.c: Re-generated.
10132 * features/rs6000/powerpc-vsx32l.c: Re-generated.
10133 * features/rs6000/powerpc-vsx64.c: Re-generated.
10134 * features/rs6000/powerpc-vsx64l.c: Re-generated.
10135 * features/rs6000/rs6000.c: Re-generated.
10136 * features/s390-linux32.c: Re-generated.
10137 * features/s390-linux32v1.c: Re-generated.
10138 * features/s390-linux32v2.c: Re-generated.
10139 * features/s390-linux64.c: Re-generated.
10140 * features/s390-linux64v1.c: Re-generated.
10141 * features/s390-linux64v2.c: Re-generated.
10142 * features/s390-te-linux64.c: Re-generated.
10143 * features/s390-tevx-linux64.c: Re-generated.
10144 * features/s390-vx-linux64.c: Re-generated.
10145 * features/s390x-linux64.c: Re-generated.
10146 * features/s390x-linux64v1.c: Re-generated.
10147 * features/s390x-linux64v2.c: Re-generated.
10148 * features/s390x-te-linux64.c: Re-generated.
10149 * features/s390x-tevx-linux64.c: Re-generated.
10150 * features/s390x-vx-linux64.c: Re-generated.
10151 * features/sparc/sparc32-solaris.c: Re-generated.
10152 * features/sparc/sparc64-solaris.c: Re-generated.
10153 * features/tic6x-c62x.c: Re-generated.
10154 * features/tic6x-c62x-linux.c: Re-generated.
10155 * features/tic6x-c64x.c: Re-generated.
10156 * features/tic6x-c64x-linux.c: Re-generated.
10157 * features/tic6x-c64xp.c: Re-generated.
10158 * features/tic6x-c64xp-linux.c: Re-generated.
10159
10160 2017-07-26 Yao Qi <yao.qi@linaro.org>
10161
10162 * i386-linux-tdep.c (i386_linux_read_description): New function.
10163 (i386_linux_core_read_description): Call
10164 i386_linux_read_description.
10165 * i386-linux-tdep.h (i386_linux_read_description): Declare.
10166 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
10167 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
10168 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
10169 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
10170 * x86-linux-nat.c (x86_linux_read_description): Call
10171 i386_linux_read_description.
10172
10173 2017-07-26 Yao Qi <yao.qi@linaro.org>
10174
10175 * NEWS: Mention it.
10176 * features/Makefile (%.c: %.xml): Pass the xml file name to
10177 command "maint print c-tdesc".
10178 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
10179 name from 'arg'.
10180
10181 2017-07-26 Yao Qi <yao.qi@linaro.org>
10182
10183 * target-descriptions.c (target_desc): Add ctor and dtor. Do
10184 in-class initialization.
10185 (tdesc_create_feature): Call new instead of XCNEW.
10186 (free_target_description): Ue delete.
10187
10188 2017-07-25 John Baldwin <jhb@FreeBSD.org>
10189
10190 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
10191
10192 2017-07-25 Yao Qi <yao.qi@linaro.org>
10193
10194 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
10195 constant.
10196 (amd64_x32_init_abi): Likewise.
10197 * amd64-tdep.h (amd64_init_abi): Update declaration.
10198 (amd64_x32_init_abi): Likewise.
10199
10200 2017-07-25 Yao Qi <yao.qi@linaro.org>
10201
10202 PR tdep/21717
10203 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
10204 condition for FPSCR.
10205 (arm_linux_store_inferior_registers): Likewise.
10206
10207 2017-07-22 Tom Tromey <tom@tromey.com>
10208
10209 * break-catch-syscall.c (struct catch_syscall_inferior_data)
10210 <syscalls_counts>: Now a std::vector.
10211 (get_catch_syscall_inferior_data): Use "new".
10212 (catch_syscall_inferior_data_cleanup): Use "delete".
10213 (insert_catch_syscall, remove_catch_syscall)
10214 (clear_syscall_counts): Update.
10215
10216 2017-07-22 Tom Tromey <tom@tromey.com>
10217
10218 * break-catch-syscall.c (syscall_catchpoint)
10219 <syscalls_to_be_caught>: Now a std::vector<int>
10220 (~syscall_catchpoint): Remove.
10221 (insert_catch_syscall, remove_catch_syscall)
10222 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
10223 (print_mention_catch_syscall, print_recreate_catch_syscall):
10224 Update.
10225 (create_syscall_event_catchpoint): Change type of "filter"
10226 parameter.
10227 (catch_syscall_split_args): Return a std::vector.
10228 (catch_syscall_command_1, catching_syscall_number_1): Update.
10229
10230 2017-07-22 Tom Tromey <tom@tromey.com>
10231
10232 * break-catch-throw.c (struct exception_catchpoint)
10233 <exception_rx>: Now a std::string.
10234 (~exception_catchpoint): Remove.
10235 (print_one_detail_exception_catchpoint): Update.
10236 (handle_gnu_v3_exceptions): Change type of except_rx.
10237 (extract_exception_regexp): Return a std::string.
10238 (catch_exception_command_1): Update.
10239
10240 2017-07-22 Tom Tromey <tom@tromey.com>
10241
10242 * break-catch-sig.c (gdb_signal_type): Remove typedef.
10243 (struct signal_catchpoint) <signals_to_be_caught>: Now a
10244 std::vector.
10245 <catch_all>: Now a bool.
10246 (~signal_catchpoint): Remove.
10247 (signal_catchpoint_insert_location)
10248 (signal_catchpoint_remove_location)
10249 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
10250 (signal_catchpoint_print_mention)
10251 (signal_catchpoint_print_recreate)
10252 (signal_catchpoint_explains_signal): Update.
10253 (create_signal_catchpoint): Change type of "filter" and
10254 "catch_all".
10255 (catch_signal_split_args): Return a std::vector. Change type of
10256 "catch_all".
10257 (catch_signal_command): Update.
10258
10259 2017-07-20 Pedro Alves <palves@redhat.com>
10260
10261 * ada-lang.c (ada_language_defn): Make extern.
10262 (_initialize_ada_language): Remove add_language call.
10263 * c-lang.c (c_language_defn, cplus_language_defn)
10264 (asm_language_defn, minimal_language_defn): Make extern.
10265 (_initialize_c_language): Delete.
10266 * completer.c (compare_cstrings): Delete, moved to utils.h.
10267 * d-lang.c (d_language_defn): Make extern.
10268 (_initialize_d_language): Remove add_language calls.
10269 * defs.h (enum language): Add comment.
10270 * f-lang.c (f_language_defn): Make extern.
10271 (_initialize_f_language): Remove add_language call.
10272 * go-lang.c (go_language_defn): Make extern.
10273 (_initialize_go_language): Remove add_language call.
10274 * language.c: Include <algorithm>.
10275 (languages): Redefine as const array.
10276 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
10277 (set_language_command): Handle "local". Use for-range loop.
10278 (set_language): Remove loop.
10279 (language_enum): Rewrite.
10280 (language_def, language_str): Remove loops.
10281 (add_language): Delete.
10282 (add_set_language_command): New, based on add_languages.
10283 (skip_language_trampoline): Adjust.
10284 (local_language_defn): Delete.
10285 (language_gdbarch_post_init): Adjust.
10286 (_initialize_language): Remove add_language calls. Call
10287 add_set_language_command.
10288 * language.h (add_language): Delete.
10289 (auto_language_defn)
10290 (unknown_language_defn, minimal_language_defn, ada_language_defn)
10291 (asm_language_defn, c_language_defn, cplus_language_defn)
10292 (d_language_defn, f_language_defn, go_language_defn)
10293 (m2_language_defn, objc_language_defn, opencl_language_defn)
10294 (pascal_language_defn, rust_language_defn): Declare.
10295 * m2-lang.c (m2_language_defn): Make extern.
10296 (_initialize_m2_language): Remove add_language call.
10297 * objc-lang.c (objc_language_defn): Make extern.
10298 (_initialize_objc_language): Remove add_language call.
10299 * opencl-lang.c (opencl_language_defn): Make extern.
10300 (_initialize_opencl_language): Remove add_language call.
10301 * p-lang.c (pascal_language_defn): Make extern.
10302 (_initialize_pascal_language): Delete.
10303 * rust-lang.c (rust_language_defn): Make extern.
10304 (_initialize_rust_language): Delete.
10305 * utils.h (compare_cstrings): New static inline function.
10306
10307 2017-07-20 Pedro Alves <palves@redhat.com>
10308
10309 * ada-lang.c (ada_to_fixed_type_1): Adjust.
10310 (get_var_value): Constify parameters.
10311 (get_int_var_value): Change prototype.
10312 (to_fixed_range_type): Adjust.
10313 * ada-lang.h (get_int_var_value): Change prototype.
10314
10315 2017-07-20 Pedro Alves <palves@redhat.com>
10316
10317 * dwarf2read.c (dw2_lookup_symbol): Use
10318 SYMBOL_MATCHES_SEARCH_NAME.
10319 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
10320
10321 2017-07-20 Pedro Alves <palves@redhat.com>
10322
10323 * block.c (block_iter_name_step, block_iter_name_first)
10324 (block_iter_name_next): Delete.
10325 (block_lookup_symbol_primary): Adjust to use
10326 dict_iter_match_first/dict_iter_match_next.
10327 * block.h (block_iter_name_first, block_iter_name_next): Delete
10328 declarations.
10329 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
10330 dict_iter_match_first/dict_iter_match_next.
10331
10332 2017-07-20 Pedro Alves <palves@redhat.com>
10333
10334 * cp-support.c (cp_find_first_component_aux): Add missing case for
10335 end of string.
10336
10337 2017-07-18 David Blaikie <dblaikie@gmail.com>
10338
10339 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
10340 of dwo_cu's dwo_file.
10341
10342 2017-07-18 Yao Qi <yao.qi@linaro.org>
10343
10344 * remote.c (store_registers_using_G): Remove one line comment.
10345
10346 2017-07-18 Yao Qi <yao.qi@linaro.org>
10347
10348 * regcache.c (regcache_cpy): Simplify it.
10349 (regcache::cpy_no_passthrough): Remove it.
10350 * regcache.h (cpy_no_passthrough): Remove it.
10351 (regcache_dup, regcache_cpy): Update comments.
10352
10353 2017-07-18 Pedro Alves <palves@redhat.com>
10354
10355 * remote-sim.c (sim_command_completer): Adjust to work with a
10356 completion_tracker instead of a VEC.
10357
10358 2017-07-17 Pedro Alves <palves@redhat.com>
10359
10360 * completer.c (complete_source_filenames): New function.
10361 (complete_address_and_linespec_locations): New function.
10362 (location_completer): Use complete_address_and_linespec_locations.
10363 (completion_tracker::build_completion_result): Honor the tracker's
10364 request to suppress append.
10365 * completer.h (completion_tracker::suppress_append_ws)
10366 (completion_tracker::set_suppress_append_ws): New methods.
10367 (completion_tracker::m_suppress_append_ws): New field.
10368 (complete_source_filenames): New declaration.
10369 * linespec.c (linespec_complete_what): New.
10370 (struct ls_parser) <complete_what, completion_word,
10371 completion_quote_char, completion_quote_end, completion_tracker>:
10372 New fields.
10373 (string_find_incomplete_keyword_at_end): New.
10374 (linespec_lexer_lex_string): Record quote char. If in completion
10375 mode, don't throw.
10376 (linespec_lexer_consume_token): Advance the completion word point.
10377 (linespec_lexer_peek_token): Save/restore completion info.
10378 (save_stream_and_consume_token): New.
10379 (set_completion_after_number): New.
10380 (linespec_parse_basic): Set what to complete next depending on
10381 token. Handle function and label completions specially.
10382 (parse_linespec): Disable objc shortcut in completion mode. Set
10383 what to complete next depending on token type. Skip keyword if in
10384 completion mode.
10385 (complete_linespec_component, linespec_complete): New.
10386 * linespec.h (linespec_complete): Declare.
10387
10388 2017-07-17 Pedro Alves <palves@redhat.com>
10389
10390 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
10391 Handle 'operator<' / 'operator<<'.
10392
10393 2017-07-17 Pedro Alves <palves@redhat.com>
10394
10395 * completer.c (collect_explicit_location_matches): Handle
10396 MATCH_LABEL.
10397 (convert_explicit_location_to_linespec): New, factored out from
10398 ...
10399 (convert_explicit_location_to_sals): ... this.
10400 (complete_label): New.
10401 (linespec_complete_label, find_label_symbols_in_block): New.
10402 (find_label_symbols): Add completion_mode parameter and adjust to
10403 call find_label_symbols_in_block.
10404 * linespec.h (linespec_complete_label): Declare.
10405
10406 2017-07-17 Pedro Alves <palves@redhat.com>
10407
10408 * ada-lang.c (ada_collect_symbol_completion_matches): Add
10409 complete_symbol_mode parameter.
10410 * cli/cli-cmds.c (complete_command): Get the completion result out
10411 of the handle_brkchars tracker if used a custom word point.
10412 * completer.c: Include "linespec.h".
10413 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
10414 (advance_to_expression_complete_word_point): New.
10415 (completion_tracker::completes_to_completion_word): New.
10416 (complete_files_symbols): Pass down
10417 complete_symbol_mode::EXPRESSION.
10418 (explicit_options, probe_options): New.
10419 (collect_explicit_location_matches): Complete on the
10420 explictit_loc->foo instead of word. Use
10421 linespec_complete_function. Handle MATCH_LINE. Handle offering
10422 keyword and options completions.
10423 (backup_text_ptr): Delete.
10424 (skip_keyword): New.
10425 (complete_explicit_location): Remove 'word' parameter. Add
10426 language, quoted_arg_start and quoted_arg_end parameters.
10427 Rewrite, parsing left to right.
10428 (location_completer): Rewrite.
10429 (location_completer_handle_brkchars): New function.
10430 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
10431 (enum complete_line_internal_reason): Adjust comments.
10432 (completion_tracker::discard_completions): New.
10433 (completer_handle_brkchars_func_for_completer): Handle
10434 location_completer.
10435 (gdb_custom_word_point_brkchars)
10436 (gdb_org_rl_basic_quote_characters): New.
10437 (gdb_completion_word_break_characters_throw)
10438 (completion_find_completion_word): Handle trackers that use a
10439 custom word point.
10440 (completion_tracker::advance_custom_word_point_by): New.
10441 (completion_tracker::build_completion_result): Don't rely on
10442 readline appending the quote char.
10443 (gdb_rl_attempted_completion_function_throw): Handle trackers that
10444 use a custom word point.
10445 (gdb_rl_attempted_completion_function): Restore
10446 rl_basic_quote_characters.
10447 * completer.h (class completion_tracker): Extend intro comment.
10448 (completion_tracker::set_quote_char)
10449 (completion_tracker::quote_char)
10450 (completion_tracker::set_use_custom_word_point)
10451 (completion_tracker::use_custom_word_point)
10452 (completion_tracker::custom_word_point)
10453 (completion_tracker::set_custom_word_point)
10454 (completion_tracker::advance_custom_word_point_by)
10455 (completion_tracker::completes_to_completion_word)
10456 (completion_tracker::discard_completions): New methods.
10457 (completion_tracker::m_quote_char)
10458 (completion_tracker::m_use_custom_word_point)
10459 (completion_tracker::m_custom_word_point): New fields.
10460 (advance_to_expression_complete_word_point): Declare.
10461 * f-lang.c (f_collect_symbol_completion_matches): Add
10462 complete_symbol_mode parameter.
10463 * language.h (struct language_defn)
10464 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
10465 parameter.
10466 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
10467 (linespec_complete_function): New function.
10468 (linespec_lexer_lex_keyword): Adjust.
10469 * linespec.h (linespec_keywords, linespec_complete_function): New
10470 declarations.
10471 * location.c (find_end_quote): New function.
10472 (explicit_location_lex_one): Add explicit_completion_info
10473 parameter. Save quoting info. Don't throw if being called for
10474 completion. Don't handle Ada operators here.
10475 (is_cp_operator, skip_op_false_positives, first_of)
10476 (explicit_location_lex_one_function): New function.
10477 (string_to_explicit_location): Replace 'dont_throw' parameter with
10478 an explicit_completion_info pointer parameter. Handle it. Don't
10479 use explicit_location_lex_one to lex function names. Use
10480 explicit_location_lex_one_function instead.
10481 * location.h (struct explicit_completion_info): New.
10482 (string_to_explicit_location): Replace 'dont_throw' parameter with
10483 an explicit_completion_info pointer parameter.
10484 * symtab.c (default_collect_symbol_completion_matches_break_on):
10485 Add complete_symbol_mode parameter. Handle LINESPEC mode.
10486 (default_collect_symbol_completion_matches)
10487 (collect_symbol_completion_matches): Add complete_symbol_mode
10488 parameter.
10489 (collect_symbol_completion_matches_type): Pass down
10490 complete_symbol_mode::EXPRESSION.
10491 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10492 parameter. Handle LINESPEC mode.
10493 * symtab.h (complete_symbol_mode): New.
10494 (default_collect_symbol_completion_matches_break_on)
10495 (default_collect_symbol_completion_matches)
10496 (collect_symbol_completion_matches)
10497 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10498 parameter.
10499
10500 2017-07-17 Pedro Alves <palves@redhat.com>
10501
10502 * utils.c (enum class strncmp_iw_mode): New.
10503 (strcmp_iw): Rename to ...
10504 (strncmp_iw_with_mode): ... this. Add string2_len and mode
10505 parameters. Handle them.
10506 (strncmp_iw): New.
10507 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
10508 * utils.h (strncmp_iw): Declare.
10509 (strcmp_iw): Move describing comments here.
10510
10511 2017-07-17 Pedro Alves <palves@redhat.com>
10512
10513 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
10514 CP_OPERATOR_STR.
10515 * c-typeprint.c (is_type_conversion_operator): Use
10516 CP_OPERATOR_STR.
10517 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
10518 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
10519 CP_OPERATOR_LEN.
10520 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
10521 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
10522 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
10523 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
10524 CP_OPERATOR_STR.
10525 * location.c: Include "cp-support.h".
10526 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
10527 CP_OPERATOR_STR.
10528 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
10529 CP_OPERATOR_LEN.
10530
10531 2017-07-17 Pedro Alves <palves@redhat.com>
10532
10533 * cli/cli-cmds.c (complete_command): Use a completion tracker
10534 along with completion_find_completion_word for handle_brkchars
10535 phase.
10536 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
10537 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
10538 (struct gdb_rl_completion_word_info): New.
10539 (gdb_rl_find_completion_word): New.
10540 (completion_find_completion_word): New.
10541 * completer.h (completion_find_completion_word): Declare.
10542
10543 2017-07-17 Pedro Alves <palves@redhat.com>
10544
10545 * ada-lang.c (symbol_completion_match): Adjust comments.
10546 (symbol_completion_add): Replace vector parameter with
10547 completion_tracker parameter. Use it.
10548 (ada_make_symbol_completion_list): Rename to...
10549 (ada_collect_symbol_completion_matches): ... this. Add
10550 completion_tracker parameter and use it.
10551 (ada_language_defn): Adjust.
10552 * break-catch-syscall.c (catch_syscall_completer): Adjust
10553 prototype and work with completion_tracker instead of VEC.
10554 * breakpoint.c (condition_completer): Adjust prototype and work
10555 with completion_tracker instead of VEC.
10556 * c-lang.c (c_language_defn, cplus_language_defn)
10557 (asm_language_defn, minimal_language_defn): Adjust to renames.
10558 * cli/cli-cmds.c (complete_command): Rework using
10559 completion_tracker. Catch exceptions when completing.
10560 * cli/cli-decode.c (integer_unlimited_completer)
10561 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
10562 with completion_tracker instead of VEC.
10563 * command.h (struct completion_tracker): Forward declare.
10564 (completer_ftype, completer_handle_brkchars_ftype): Change
10565 types.
10566 (complete_on_cmdlist, complete_on_enum): Adjust.
10567 * completer.c: Include <algorithm>.
10568 (struct gdb_completer_state): New.
10569 (current_completion): New global.
10570 (readline_line_completion_function): Delete.
10571 (noop_completer, filename_completer)
10572 (filename_completer_handle_brkchars, complete_files_symbols)
10573 (linespec_location_completer): Adjust to work with a
10574 completion_tracker instead of a VEC.
10575 (string_or_empty): New.
10576 (collect_explicit_location_matches): Adjust to work with a
10577 completion_tracker instead of a VEC.
10578 (explicit_location_completer): Rename to ...
10579 (complete_explicit_location): ... this and adjust to work with a
10580 completion_tracker instead of a VEC.
10581 (location_completer): Adjust to work with a completion_tracker
10582 instead of a VEC.
10583 (add_struct_fields): Adjust to work with a completion_list instead
10584 of VEC.
10585 (expression_completer): Rename to ...
10586 (complete_expression): ... this and adjust to work with a
10587 completion_tracker instead of a VEC. Use complete_files_symbols.
10588 (expression_completer): Reimplement on top of complete_expression.
10589 (symbol_completer): Adjust to work with a completion_tracker
10590 instead of a VEC.
10591 (enum complete_line_internal_reason): Add describing comments.
10592 (complete_line_internal_normal_command): Adjust to work with a
10593 completion_tracker instead of a VEC.
10594 (complete_line_internal): Rename to ...
10595 (complete_line_internal_1): ... this and adjust to work with a
10596 completion_tracker instead of a VEC. Assert TEXT is NULL in the
10597 handle_brkchars phase.
10598 (new_completion_tracker): Delete.
10599 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
10600 complete_line_internal_1.
10601 (free_completion_tracker): Delete.
10602 (INITIAL_COMPLETION_HTAB_SIZE): New.
10603 (completion_tracker::completion_tracker)
10604 (completion_tracker::~completion_tracker): New.
10605 (maybe_add_completion): Delete.
10606 (completion_tracker::maybe_add_completion)
10607 (completion_tracker::add_completion)
10608 (completion_tracker::add_completions): New.
10609 (throw_max_completions_reached_error): Delete.
10610 (complete_line): Adjust to work with a completion_tracker instead
10611 of a VEC. Don't create a completion_tracker_t or check for max
10612 completions here.
10613 (command_completer, command_completer_handle_brkchars)
10614 (signal_completer, reg_or_group_completer_1)
10615 (reg_or_group_completer, default_completer_handle_brkchars):
10616 Adjust to work with a completion_tracker.
10617 (gdb_completion_word_break_characters_throw): New.
10618 (gdb_completion_word_break_characters): Reimplement.
10619 (line_completion_function): Delete.
10620 (completion_tracker::recompute_lowest_common_denominator)
10621 (expand_preserving_ws)
10622 (completion_tracker::build_completion_result)
10623 (completion_result::completion_result)
10624 (completion_result::completion_result)
10625 (completion_result::~completion_result)
10626 (completion_result::completion_result)
10627 (completion_result::release_match_list, compare_cstrings)
10628 (completion_result::sort_match_list)
10629 (completion_result::reset_match_list)
10630 (gdb_rl_attempted_completion_function_throw)
10631 (gdb_rl_attempted_completion_function): New.
10632 * completer.h (completion_list, struct completion_result)
10633 (class completion_tracker): New.
10634 (complete_line): Add completion_tracker parameter.
10635 (readline_line_completion_function): Delete.
10636 (gdb_rl_attempted_completion_function): New.
10637 (noop_completer, filename_completer, expression_completer)
10638 (location_completer, symbol_completer, command_completer)
10639 (signal_completer, reg_or_group_completer): Update prototypes.
10640 (completion_tracker_t, new_completion_tracker)
10641 (make_cleanup_free_completion_tracker): Delete.
10642 (enum maybe_add_completion_enum): Delete.
10643 (maybe_add_completion): Delete.
10644 (throw_max_completions_reached_error): Delete.
10645 * corefile.c (complete_set_gnutarget): Adjust to work with a
10646 completion_tracker instead of a VEC.
10647 * cp-abi.c (cp_abi_completer): Adjust to work with a
10648 completion_tracker instead of a VEC.
10649 * d-lang.c (d_language_defn): Adjust.
10650 * disasm.c (disassembler_options_completer): Adjust to work with a
10651 completion_tracker instead of a VEC.
10652 * f-lang.c (f_make_symbol_completion_list): Rename to ...
10653 (f_collect_symbol_completion_matches): ... this. Adjust to work
10654 with a completion_tracker instead of a VEC.
10655 (f_language_defn): Adjust.
10656 * go-lang.c (go_language_defn): Adjust.
10657 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
10658 Adjust to work with a completion_tracker instead of a VEC.
10659 * infrun.c (handle_completer): Likewise.
10660 * interps.c (interpreter_completer): Likewise.
10661 * interps.h (interpreter_completer): Likewise.
10662 * language.c (unknown_language_defn, auto_language_defn)
10663 (local_language_defn): Adjust.
10664 * language.h (language_defn::la_make_symbol_completion_list):
10665 Rename to ...
10666 (language_defn::la_collect_symbol_completion_matches): ... this
10667 and adjust to work with a completion_tracker instead of a VEC.
10668 * m2-lang.c (m2_language_defn): Adjust.
10669 * objc-lang.c (objc_language_defn): Adjust.
10670 * opencl-lang.c (opencl_language_defn): Adjust.
10671 * p-lang.c (pascal_language_defn): Adjust.
10672 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
10673 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
10674 with a completion_tracker.
10675 * rust-lang.c (rust_language_defn): Adjust.
10676 * symtab.c (free_completion_list, do_free_completion_list)
10677 (return_val, completion_tracker): Delete.
10678 (completion_list_add_name, completion_list_add_symbol)
10679 (completion_list_add_msymbol, completion_list_objc_symbol)
10680 (completion_list_add_fields, add_symtab_completions): Add
10681 completion_tracker parameter and use it.
10682 (default_make_symbol_completion_list_break_on_1): Rename to...
10683 (default_collect_symbol_completion_matches_break_on): ... this.
10684 Add completion_tracker parameter and use it instead of allocating
10685 a completion tracker here.
10686 (default_make_symbol_completion_list_break_on): Delete old
10687 implementation.
10688 (default_make_symbol_completion_list): Delete.
10689 (default_collect_symbol_completion_matches): New.
10690 (make_symbol_completion_list): Delete.
10691 (collect_symbol_completion_matches): New.
10692 (make_symbol_completion_type): Rename to ...
10693 (collect_symbol_completion_matches_type): ... this. Add
10694 completion_tracker parameter and use it instead of VEC.
10695 (make_file_symbol_completion_list_1): Rename to...
10696 (collect_file_symbol_completion_matches): ... this. Add
10697 completion_tracker parameter and use it instead of VEC.
10698 (make_file_symbol_completion_list): Delete.
10699 (add_filename_to_list): Use completion_list instead of a VEC.
10700 (add_partial_filename_data::list): Now a completion_list.
10701 (make_source_files_completion_list): Work with a completion_list
10702 instead of a VEC.
10703 * symtab.h: Include "completer.h".
10704 (default_make_symbol_completion_list_break_on)
10705 (default_make_symbol_completion_list, make_symbol_completion_list)
10706 (make_symbol_completion_type, make_file_symbol_completion_list)
10707 (make_source_files_completion_list): Delete.
10708 (default_collect_symbol_completion_matches_break_on)
10709 (default_collect_symbol_completion_matches)
10710 (collect_symbol_completion_matches)
10711 (collect_symbol_completion_matches_type)
10712 (collect_file_symbol_completion_matches)
10713 (make_source_files_completion_list): New.
10714 * top.c (init_main): Don't install a rl_completion_entry_function
10715 hook. Install a rl_attempted_completion_function hook instead.
10716 * tui/tui-layout.c (layout_completer): Adjust to work with a
10717 completion_tracker.
10718 * tui/tui-regs.c (tui_reggroup_completer):
10719 * tui/tui-win.c (window_name_completer, focus_completer)
10720 (winheight_completer): Adjust to work with a completion_tracker.
10721 * value.c: Include "completer.h".
10722 (complete_internalvar): Adjust to work with a completion_tracker.
10723 * value.h (complete_internalvar): Likewise.
10724
10725 2017-07-17 Pedro Alves <palves@redhat.com>
10726
10727 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
10728 renames.
10729 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
10730 comments to completer_ftype's declaration.
10731 <completer_handle_brkchars>: Change type to
10732 completer_handle_brkchars_ftype.
10733 * command.h (completer_ftype): Add describing comment and give
10734 names to parameters.
10735 (completer_ftype_void): Rename to ...
10736 (completer_handle_brkchars_ftype) ... this. Add describing comment.
10737 (set_cmd_completer_handle_brkchars): Adjust.
10738 * completer.c (filename_completer_handle_brkchars): New function.
10739 (complete_line_internal_normal_command): New function, factored
10740 out from ...
10741 (complete_line_internal): ... here.
10742 (command_completer_handle_brkchars)
10743 (default_completer_handle_brkchars)
10744 (completer_handle_brkchars_func_for_completer): New functions.
10745 * completer.h (set_gdb_completion_word_break_characters): Delete
10746 declaration.
10747 (completer_handle_brkchars_func_for_completer): New declaration.
10748 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
10749 completer_handle_brkchars_func_for_completer.
10750
10751 2017-07-17 Pedro Alves <palves@redhat.com>
10752
10753 * completer.c (symbol_completer): New function, based on
10754 make_symbol_completion_list_fn.
10755 * completer.h (symbol_completer): New declaration.
10756 * guile/scm-cmd.c (cmdscm_completers): Adjust.
10757 * python/py-cmd.c (completers): Adjust.
10758 * symtab.c (make_symbol_completion_list_fn): Delete.
10759 * symtab.h (make_symbol_completion_list_fn): Delete.
10760 * cli/cli-decode.c (add_cmd): Adjust.
10761
10762 2017-07-17 Pedro Alves <palves@redhat.com>
10763
10764 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
10765 * dwarf2read.c: Include "filename-seen-cache.h".
10766 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
10767 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
10768 * filename-seen-cache.c: New file.
10769 * filename-seen-cache.h: New file.
10770 * symtab.c: Include "filename-seen-cache.h".
10771 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
10772 (create_filename_seen_cache, clear_filename_seen_cache)
10773 (delete_filename_seen_cache, filename_seen): Delete, parts moved
10774 to filename-seen-cache.h/filename-seen-cache.c.
10775 (output_source_filename, sources_info)
10776 (maybe_add_partial_symtab_filename)
10777 (make_source_files_completion_list): Adjust to use
10778 filename_seen_cache.
10779
10780 2017-07-17 Pedro Alves <palves@redhat.com>
10781
10782 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
10783 fields.
10784 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
10785 dwarf2_debug_sections*)): New.
10786 (dwarf2_per_objfile::dwarf2_per_objfile(const
10787 dwarf2_per_objfile&)): Declare as deleted.
10788 (dwarf2_per_objfile::operator=): Declare as deleted.
10789 (dwarf2_per_objfile::dwarf2_per_objfile)
10790 (dwarf2_per_objfile::~dwarf2_per_objfile)
10791 (dwarf2_per_objfile::free_cached_comp_units): New.
10792 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
10793 ctor. Call dwarf2_per_objfile's ctor manually.
10794 (dwarf2_locate_sections): Deleted/refactored as ...
10795 (dwarf2_per_objfile::locate_sections): ... this new method.
10796 (free_cached_comp_units): Defer to
10797 dwarf2_per_objfile::free_cached_comp_units.
10798 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
10799
10800 2017-07-14 Tom Tromey <tom@tromey.com>
10801
10802 PR rust/21764:
10803 * rust-exp.y (convert_ast_to_expression): Add "want_type"
10804 parameter.
10805 <UNOP_SIZEOF>: Split into separate case.
10806 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
10807
10808 2017-07-14 Tom Tromey <tom@tromey.com>
10809
10810 PR rust/21763:
10811 * symtab.c (symbol_matches_domain): Add language_rust to special
10812 case.
10813 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
10814 treat LOC_TYPEDEF symbols as variables.
10815
10816 2017-07-14 Pedro Alves <palves@redhat.com>
10817
10818 * symtab.c (make_file_symbol_completion_list_1): Iterate over
10819 symtabs matching all symtabs with SRCFILE as file name instead of
10820 only considering the first hit, with lookup_symtab.
10821
10822 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10823
10824 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
10825 operator_name parameters.
10826 (gen_expr): Update function call.
10827
10828 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10829
10830 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
10831 parameter.
10832 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
10833 Likewise.
10834 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
10835 parameter, use agent_expr::gdbarch instead, update function
10836 calls.
10837 (locexpr_tracepoint_var_ref): Likewise.
10838 (loclist_tracepoint_var_ref): Likewise.
10839 * ax-gdb.c (gen_trace_static_fields): Likewise.
10840 (gen_traced_pop): Likewise.
10841 (gen_frame_args_address): Likewise.
10842 (gen_frame_locals_address): Likewise.
10843 (gen_var_ref): Likewise.
10844 (gen_struct_ref_recursive): Likewise.
10845 (gen_static_field): Likewise.
10846 (gen_maybe_namespace_elt): Likewise.
10847 (gen_expr): Likewise.
10848 (gen_trace_for_var): Likewise.
10849 (gen_trace_for_expr): Likewise.
10850 (gen_trace_for_return_address): Likewise.
10851
10852 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10853
10854 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
10855 parameter.
10856 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
10857
10858 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10859
10860 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
10861 from ax, update calls.
10862 (gen_usual_arithmetic): Likewise.
10863 (gen_integral_promotions): Likewise.
10864 (gen_bitfield_ref): Likewise.
10865 (gen_primitive_field): Likewise.
10866 (gen_struct_ref_recursive): Likewise.
10867 (gen_struct_ref): Likewise.
10868 (gen_maybe_namespace_elt): Likewise.
10869 (gen_struct_elt_for_reference): Likewise.
10870 (gen_namespace_elt): Likewise.
10871 (gen_aggregate_elt_ref): Likewise.
10872 (gen_expr): Get gdbarch from ax, update calls.
10873 (gen_expr_binop_rest): Likewise.
10874
10875 2017-07-13 Pedro Alves <palves@redhat.com>
10876
10877 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
10878 as default tdesc.
10879 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
10880 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
10881 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
10882 tdesc_amd64_linux as default tdesc. Get final tdesc from the
10883 tdep.
10884 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
10885 Get final tdesc from the tdep.
10886 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
10887 default tdesc.
10888 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
10889 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
10890 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
10891 Use it as default tdesc.
10892 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
10893 down to amd_init_abi. No longer handle fallback tdesc here.
10894 * amd64-tdep.h (tdesc_x32): Declare.
10895 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
10896 parameter.
10897 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
10898 as default tdesc.
10899
10900 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10901
10902 * s390-linux-tdep.c (s390_process_record): Add support for
10903 instructions new in arch12.
10904
10905 2017-07-11 John Baldwin <jhb@FreeBSD.org>
10906
10907 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
10908 PT_GETFSBASE and PT_GETGSBASE.
10909 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
10910 PT_SETGSBASE.
10911
10912 2017-07-11 John Baldwin <jhb@FreeBSD.org>
10913
10914 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
10915 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
10916 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
10917 those rules.
10918 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
10919 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
10920 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
10921 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
10922 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
10923 * features/i386/amd64.xml: Add 64bit-segments.xml.
10924 * features/i386/amd64-avx-avx512.c: Regenerated.
10925 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
10926 * features/i386/amd64-avx-mpx.c: Regenerated.
10927 * features/i386/amd64-avx.c: Regenerated.
10928 * features/i386/amd64-mpx.c: Regenerated.
10929 * features/i386/amd64.c: Regenerated.
10930 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
10931 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10932 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
10933 * regformats/i386/amd64-avx.dat: Regenerated.
10934 * regformats/i386/amd64-mpx.dat: Regenerated.
10935 * regformats/i386/amd64.dat: Regenerated.
10936
10937 2017-07-10 Yao Qi <yao.qi@linaro.org>
10938
10939 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10940 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10941
10942 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
10943
10944 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
10945 unsetenv.
10946 * gnulib/aclocal.m4: Regenerate.
10947 * gnulib/config.in: Regenerate.
10948 * gnulib/configure: Regenerate.
10949 * gnulib/import/Makefile.am: Regenerate.
10950 * gnulib/import/Makefile.in: Regenerate.
10951 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
10952 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
10953 * gnulib/import/m4/environ.m4: New file.
10954 * gnulib/import/m4/setenv.m4: New file.
10955 * gnulib/import/setenv.c: New file.
10956 * gnulib/import/unsetenv.c: New file.
10957
10958 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
10959
10960 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
10961 address when op is DW_OP_addr.
10962
10963 2017-07-09 Tom Tromey <tom@tromey.com>
10964
10965 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
10966 check and apply to outer type.
10967
10968 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10969
10970 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
10971 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
10972 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
10973 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
10974
10975 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10976
10977 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
10978
10979 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10980
10981 * corelow.c (get_core_siginfo): Remove.
10982 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
10983 instead of get_core_siginfo.
10984 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
10985 * gdbarch.h: Re-generate.
10986 * gdbarch.c: Re-generate.
10987 * linux-tdep.c (linux_core_xfer_siginfo): New.
10988 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
10989
10990 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10991
10992 * corelow.c (thread_section_name): Move to ...
10993 * gdbcore.h (thread_section_name): ... here.
10994
10995 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10996
10997 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
10998 (struct siginfo32): New.
10999 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
11000 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
11001 via ptrace(PT_LWPINFO).
11002
11003 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11004
11005 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
11006 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
11007 (fbsd_get_siginfo_type): New.
11008 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
11009 (_initialize_fbsd_tdep): New.
11010
11011 2017-07-06 David Blaikie <dblaikie@gmail.com>
11012
11013 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
11014 a singular dwo_unit*) to support multiple CUs in the same way that
11015 multiple TUs are supported.
11016 (create_cus_hash_table): Replace create_dwo_cu with a function for
11017 parsing multiple CUs from a DWO file.
11018 (open_and_init_dwo_file): Use create_cus_hash_table rather than
11019 create_dwo_cu.
11020 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
11021 htab_find, rather than comparing the signature to a singleton CU in
11022 the dwo_file.
11023
11024 2017-07-06 Pedro Alves <palves@redhat.com>
11025
11026 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
11027
11028 2017-07-04 Pedro Alves <palves@redhat.com>
11029
11030 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
11031 * gdbtypes.h (TYPE_STATIC): Delete.
11032 (struct fn_field) <is_public, is_abstract, is_static, is_final,
11033 is_synchronized, is_native>: Delete.
11034 <dummy>: Bump.
11035 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
11036 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
11037 (TYPE_FN_FIELD_ABSTRACT): Delete.
11038
11039 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
11040
11041 * buffer.h (buffer_finish): Fix spelling mistakes.
11042
11043 2017-07-01 Eli Zaretskii <eliz@gnu.org>
11044
11045 * .dir-locals.el: Automatically switch to C-style comments in
11046 versions of Emacs that support the feature.
11047
11048 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
11049 Pedro Alves <palves@redhat.com>
11050
11051 PR cli/21688
11052 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
11053 (process_next_line): New variable 'inline_cmd'.
11054 Adjust 'if' clauses for "python", "compile" and "guile" to use
11055 'command_name_equals' and check for '!inline_cmd'.
11056
11057 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
11058
11059 PR cli/21688
11060 * cli/cli-script.c (command_name_equals_not_inline): New function.
11061 (process_next_line): Adjust 'if' clauses for "python", "compile"
11062 and "guile" to use command_name_equals_not_inline.
11063
11064 2017-06-29 Pedro Alves <palves@redhat.com>
11065
11066 * completer.c (expression_completer): Call
11067 linespec_location_completer instead of location_completer.
11068
11069 2017-06-29 Pedro Alves <palves@redhat.com>
11070
11071 * completer.c (expression_completer): Remove code that recomputes
11072 'text' from 'word'.
11073
11074 2017-06-29 Yao Qi <yao.qi@linaro.org>
11075
11076 * regformats/regdat.sh: Generate code with
11077 "ifndef IN_PROCESS_AGENT".
11078
11079 2017-06-28 Pedro Alves <palves@redhat.com>
11080
11081 * command.h: Include "common/scoped_restore.h".
11082
11083 2017-06-28 Yao Qi <yao.qi@linaro.org>
11084
11085 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
11086 instead of obstack_grow.
11087
11088 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
11089
11090 PR gdb/21337
11091 * symfile.c (reread_symbols): Call objfiles_changed just before
11092 read_symbols.
11093
11094 2017-06-27 Pedro Alves <palves@redhat.com>
11095
11096 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
11097 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
11098 (completion_list_add_symbol, completion_list_add_msymbol):
11099 ... these new functions.
11100 (add_symtab_completions)
11101 (default_make_symbol_completion_list_break_on_1): Adjust.
11102
11103 2017-06-27 Pedro Alves <palves@redhat.com>
11104
11105 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
11106 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
11107 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
11108 dtor.
11109 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
11110 'storage_obstack' field an auto_obstack. In-class initialize all
11111 non-bitfield fields. Make minsyms_read bool.
11112 * symfile.c (read_symbols): Adjust.
11113
11114 2017-06-27 Alan Hayward <alan.hayward@arm.com>
11115
11116 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
11117 (gdbsim_store_register): Likewise.
11118
11119 2017-06-27 Pedro Alves <palves@redhat.com>
11120
11121 * c-exp.y (name_obstack): Now an auto_obstack.
11122 (yylex): Use auto_obstack::clear.
11123 (c_parse): Use auto_obstack::clear instead of reinitializing and
11124 freeing the obstack.
11125 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
11126 * d-exp.y (name_obstack): Now an auto_obstack.
11127 (yylex): Use auto_obstack::clear.
11128 (d_parse): Use auto_obstack::clear instead of reinitializing and
11129 freeing the obstack.
11130 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
11131 auto_obstack.
11132 * dwarf2read.c (create_addrmap_from_index)
11133 (dwarf2_build_psymtabs_hard)
11134 (update_enumeration_type_from_children): Likewise.
11135 * gdb_obstack.h (auto_obstack): New type.
11136 * go-exp.y (name_obstack): Now an auto_obstack.
11137 (build_packaged_name): Use auto_obstack::clear.
11138 (go_parse): Use auto_obstack::clear instead of reinitializing and
11139 freeing the obstack.
11140 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
11141 auto_obstack.
11142 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
11143 * rust-exp.y (work_obstack): Now an auto_obstack.
11144 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
11145 reinitializing and freeing the obstack.
11146 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
11147 (host_char_to_target): Use auto_obstack.
11148 * utils.h (make_cleanup_obstack_free): Delete declaration.
11149 * valprint.c (generic_emit_char, generic_printstr): Use
11150 auto_obstack.
11151
11152 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
11153
11154 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
11155 thread.
11156 (darwin_init_thread_list): Don't update dummy thread.
11157 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
11158
11159 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11160
11161 * record-full.c (netorder16): Remove.
11162
11163 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11164
11165 * common/diagnostics.h: Define macros for GCC.
11166 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
11167 * common/vec.h: Include diagnostics.h.
11168 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
11169 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
11170 warning.
11171
11172 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11173
11174 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
11175 New macro.
11176 * ada-lex.l: Ignore deprecated register warnings.
11177
11178 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11179
11180 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
11181 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
11182
11183 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11184
11185 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
11186 its own line.
11187
11188 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11189
11190 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
11191
11192 2017-06-23 Alan Hayward <alan.hayward@arm.com>
11193
11194 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
11195 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
11196 (xtensa_register_read_masked): Likewise.
11197
11198 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
11199
11200 * common/environ.c (gdb_environ::unset): Update comment.
11201
11202 2017-06-22 Alan Hayward <alan.hayward@arm.com>
11203
11204 * python/py-unwind.c (pyuw_sniffer): Allocate space for
11205 registers.
11206
11207 2017-06-22 Alan Hayward <alan.hayward@arm.com>
11208
11209 * record-full.c (record_full_exec_insn): Use byte_vector.
11210
11211 2017-06-22 Yao Qi <yao.qi@linaro.org>
11212
11213 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
11214 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
11215
11216 2017-06-22 Alan Hayward <alan.hayward@arm.com>
11217
11218 * remote.c (cached_reg): Move from here...
11219 * regcache.h (cached_reg): ...to here.
11220 * python/py-unwind.c (struct reg_info): Remove.
11221 (cached_frame_info): Use cached_reg_t.
11222 (pyuw_prev_register): Likewise.
11223 (pyuw_sniffer): Use cached_reg_t and allocate registers.
11224 (pyuw_dealloc_cache): Free all registers.
11225
11226 2017-06-22 Pedro Alves <palves@redhat.com>
11227 Simon Marchi <simon.marchi@ericsson.com>
11228
11229 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
11230 warning.
11231 * common/diagnostics.h: New file.
11232
11233 2017-06-22 Pedro Alves <palves@redhat.com>
11234
11235 * common/agent.h: Add include guards.
11236
11237 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
11238
11239 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
11240 talk about addressable units instead of bytes.
11241
11242 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
11243
11244 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
11245 of '::const_iterator'.
11246
11247 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
11248
11249 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11250 'unittests/environ-selftests.c'.
11251 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
11252 * charset.c (find_charset_names): Declare object 'iconv_env'.
11253 Update code to use 'iconv_env' object. Remove call to
11254 'free_environ'.
11255 * common/environ.c: Include <utility>.
11256 (make_environ): Delete function.
11257 (free_environ): Delete function.
11258 (gdb_environ::clear): New function.
11259 (gdb_environ::operator=): New function.
11260 (gdb_environ::get): Likewise.
11261 (environ_vector): Delete function.
11262 (set_in_environ): Delete function.
11263 (gdb_environ::set): New function.
11264 (unset_in_environ): Delete function.
11265 (gdb_environ::unset): New function.
11266 (gdb_environ::envp): Likewise.
11267 * common/environ.h: Include <vector>.
11268 (struct gdb_environ): Delete; transform into...
11269 (class gdb_environ): ... this class.
11270 (free_environ): Delete prototype.
11271 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
11272 environ_vector): Likewise.
11273 * infcmd.c (run_command_1): Update code to call
11274 'envp' from 'gdb_environ' class.
11275 (environment_info): Update code to call methods from 'gdb_environ'
11276 class.
11277 (unset_environment_command): Likewise.
11278 (path_info): Likewise.
11279 (path_command): Likewise.
11280 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
11281 (inferior::inferior): Initialize 'environment' using the host's
11282 information.
11283 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
11284 Include "environ.h".
11285 (class inferior) <environment>: Change type from 'struct
11286 gdb_environ' to 'gdb_environ'.
11287 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
11288 methods from 'gdb_environ' class.
11289 * solib.c (solib_find_1): Likewise
11290 * unittests/environ-selftests.c: New file.
11291
11292 2017-06-20 Yao Qi <yao.qi@linaro.org>
11293
11294 * features/i386/i386-linux.xml: Exchange the order of including
11295 32bit-linux.xml and 32bit-sse.xml.
11296 * features/i386/i386-linux.c: Regenerated.
11297
11298 2017-06-20 Yao Qi <yao.qi@linaro.org>
11299
11300 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
11301 Delete copy ctor and assignment operator.
11302 (tdesc_type): Likewise.
11303 (tdesc_feature): Likewise.
11304 (tdesc_free_reg): Remove.
11305 (tdesc_create_reg): Use new.
11306 (tdesc_free_type): Remove.
11307 (tdesc_create_vector): Use new.
11308 (tdesc_create_union): Likewise.
11309 (tdesc_create_flags): Likewise.
11310 (tdesc_create_enum): Likewise.
11311 (tdesc_free_feature): Delete.
11312 (free_target_description): Use delete.
11313
11314 2017-06-19 John Baldwin <jhb@FreeBSD.org>
11315
11316 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
11317 registers.
11318
11319 2017-06-19 Pedro Alves <palves@redhat.com>
11320
11321 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
11322 after gdb::unlinker.
11323
11324 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
11325
11326 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
11327 gdb_environ to access an environment variable.
11328
11329 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
11330
11331 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
11332 gdb_byte*.
11333
11334 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11335
11336 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
11337
11338 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11339
11340 * configure: Re-generate.
11341 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
11342
11343 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11344
11345 * configure: Re-generate.
11346 * warning.m4: Pass -Werror to compiler when checking for
11347 supported warning flags.
11348
11349 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11350
11351 * Makefile.in (COMPILE.pre): Add "-x c++".
11352
11353 2017-06-16 Alan Hayward <alan.hayward@arm.com>
11354 Pedro Alves <palves@redhat.com>
11355 Yao Qi <yao.qi@linaro.org>
11356
11357 * defs.h (RequireLongest): New.
11358 (extract_integer): Declare function template.
11359 (extract_signed_integer): Remove the declaration, but define it
11360 static inline.
11361 (extract_unsigned_integer): Likewise.
11362 (store_integer): Declare function template.
11363 (store_signed_integer): Remove the declaration, but define it
11364 static inline.
11365 (store_unsigned_integer): Likewise.
11366 * findvar.c (extract_integer): New function template.
11367 (extract_signed_integer): Remove.
11368 (extract_unsigned_integer): Remove.
11369 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
11370 instantiations.
11371 (store_integer): New function template.
11372 (store_signed_integer): Remove.
11373 (store_unsigned_integer): Remove.
11374 (store_integer): Explicit instantiations.
11375 * regcache.c (regcache_raw_read_signed): Update.
11376 (regcache::raw_read): New function.
11377 (regcache::raw_read_signed): Remove.
11378 (regcache::raw_read_unsigned): Remove.
11379 (regcache_raw_read_unsigned): Update.
11380 (regcache_raw_write_unsigned): Update.
11381 (regcache::raw_write_signed): Remove.
11382 (regcache::raw_write): New function.
11383 (regcache_cooked_read_signed): Update.
11384 (regcache::raw_write_unsigned): Remove.
11385 (regcache::cooked_read_signed): Remove.
11386 (regcache_cooked_read_unsigned): Update.
11387 (regcache::cooked_read_unsigned): Remove.
11388 (regcache_cooked_write_signed): Update.
11389 (regcache_cooked_write_unsigned): Update.
11390 * regcache.h (regcache) <raw_read_signed>: Remove.
11391 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
11392 <raw_read, raw_write>: New.
11393 <cooked_read_signed, cooked_write_signed>: Remove.
11394 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
11395 <cooked_read, cooked_write>: New.
11396 * sh64-tdep.c (sh64_pseudo_register_read): Update.
11397 (sh64_pseudo_register_write): Update.
11398
11399 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
11400
11401 * arc-tdep.c (arc_disassembler_options): New variable.
11402 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
11403 of default_print_insn.
11404 (arc_delayed_print_insn): Set info->section when needed,
11405 use default_print_insn to retrieve a disassembler.
11406
11407 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
11408
11409 PR gdb/21574
11410 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
11411 to mention $SHELL and startup-with-shell.
11412
11413 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
11414
11415 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
11416
11417 2017-06-14 Yao Qi <yao.qi@linaro.org>
11418
11419 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
11420 default_print_insn instead of print_insn_aarch64.
11421 * arm-tdep.c (gdb_print_insn_arm): Call
11422 default_print_insn instead of print_insn_big_arm
11423 and print_insn_little_arm.
11424 * i386-tdep.c (i386_print_insn): Call default_print_insn
11425 instead of print_insn_i386.
11426 * ia64-tdep.c (ia64_print_insn): Call
11427 default_print_insn instead of print_insn_ia64.
11428 * mips-tdep.c (gdb_print_insn_mips): Call
11429 default_print_insn instead of print_insn_big_mips
11430 and print_insn_little_mips.
11431 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
11432 instead of print_insn_spu.
11433
11434 2017-06-14 Pedro Alves <palves@redhat.com>
11435
11436 * ada-lang.c: Include "common/byte-vector.h".
11437 (ada_value_primitive_packed_val): Use gdb::byte_vector.
11438 * charset.c (wchar_iterator::iterate): Resize the vector instead
11439 of reserving it.
11440 * common/byte-vector.h: Include "common/def-vector.h".
11441 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
11442 * cli/cli-dump.c: Include "common/byte-vector.h".
11443 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
11444 * common/byte-vector.h: New file.
11445 * common/def-vector.h: New file.
11446 * common/default-init-alloc.h: New file.
11447 * dwarf2loc.c: Include "common/byte-vector.h".
11448 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
11449 instead of reserving it.
11450 * dwarf2read.c: Include "common/byte-vector.h".
11451 (data_buf::m_vec): Now a gdb::byte_vector.
11452 * gdb_regex.c: Include "common/def-vector.h".
11453 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
11454 * mi/mi-main.c: Include "common/byte-vector.h".
11455 (mi_cmd_data_read_memory): Use gdb::byte_vector.
11456 * printcmd.c: Include "common/byte-vector.h".
11457 (print_scalar_formatted): Use gdb::byte_vector.
11458 * valprint.c: Include "common/byte-vector.h".
11459 (maybe_negate_by_bytes, print_decimal_chars): Use
11460 gdb::byte_vector.
11461
11462 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11463
11464 * darwin-nat.c: Include "nat/fork-inferior.h".
11465
11466 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11467
11468 * configure.nat: Factor out Darwin bits that are not
11469 architecture-specific. Add fork-inferior.o.
11470
11471 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11472
11473 * configure.nat: Factor out AIX bits that are not
11474 architecture-specific. Add fork-inferior.o.
11475
11476 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11477
11478 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
11479 (read_pieced_value, write_pieced_value): ...here. Reduce to
11480 wrappers that just call rw_pieced_value.
11481
11482 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11483
11484 * dwarf2loc.c (write_pieced_value): When writing the data for a
11485 memory piece, use write_memory_with_notification instead of
11486 write_memory.
11487
11488 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11489
11490 * valops.c (read_value_memory): Change embedded_offset to
11491 represent a bit offset instead of a byte offset.
11492 * value.h (read_value_memory): Adjust comment.
11493
11494 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11495
11496 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
11497 dest_offset_bits and source_offset_bits.
11498 (write_pieced_value): Likewise.
11499
11500 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11501
11502 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
11503 given by DW_OP_bit_piece.
11504 (write_pieced_value): Likewise.
11505
11506 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11507
11508 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
11509 some other preparations to the places where sufficient information
11510 is available.
11511 (write_pieced_value): Likewise.
11512
11513 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11514
11515 * dwarf2loc.c (bits_to_bytes): New function.
11516 (read_pieced_value): Fix offset calculations for register pieces
11517 on big-endian targets.
11518 (write_pieced_value): Likewise.
11519
11520 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11521
11522 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
11523 (write_pieced_value): Likewise.
11524
11525 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11526
11527 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
11528 transfer the source value's least significant bits, instead of its
11529 lowest-addressed ones. Rename type_len to max_offset.
11530 (read_pieced_value): Mirror above changes to write_pieced_value as
11531 applicable.
11532
11533 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11534
11535 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
11536 truncate full bytes from dest_offset_bits before using it as an
11537 offset into the buffer.
11538
11539 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11540
11541 * dwarf2loc.c (write_pieced_value): Include transfer size in
11542 byte-wise check.
11543
11544 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11545
11546 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
11547 calculation of this_size.
11548
11549 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11550
11551 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
11552 when targeting a bit-field.
11553 (write_pieced_value): Likewise.
11554
11555 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11556
11557 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
11558 (allocate_piece_closure): Drop addr_size parameter.
11559 (dwarf2_evaluate_loc_desc_full): Adjust call to
11560 allocate_piece_closure.
11561
11562 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11563
11564 PR gdb/21226
11565 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
11566 the LSB end, independent of endianness.
11567
11568 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11569
11570 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
11571 size capping.
11572
11573 2017-06-13 Yao Qi <yao.qi@linaro.org>
11574
11575 * mips-linux-nat.c: Move include features/mips*-linux.c to
11576 mips-linux-tdep.c.
11577 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
11578 to mips-linux-tdep.c.
11579 * mips-linux-tdep.c: Include features/mips*-linux.c
11580 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
11581 functions.
11582 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
11583 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
11584 (tdesc_mips64_dsp_linux): Declare.
11585
11586 2017-06-12 Tom Tromey <tom@tromey.com>
11587
11588 * valprint.h (val_print_type_code_int): Remove.
11589 * valprint.c (generic_val_print_int): Always call
11590 val_print_scalar_formatted.
11591 (val_print_type_code_int): Remove.
11592 * printcmd.c (print_scalar_formatted): Handle options->format==0.
11593 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
11594 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
11595 * ada-valprint.c (ada_val_print_num): Use
11596 val_print_scalar_formatted.
11597
11598 2017-06-12 Tom Tromey <tom@tromey.com>
11599
11600 * printcmd.c (print_scalar_formatted): Unify the two switches.
11601 Don't convert scalars to LONGEST.
11602
11603 2017-06-12 Tom Tromey <tom@tromey.com>
11604
11605 PR exp/16225:
11606 * valprint.h (print_decimal_chars): Update.
11607 * valprint.c (maybe_negate_by_bytes): New function.
11608 (print_decimal_chars): Add "is_signed" argument.
11609 * printcmd.c (print_scalar_formatted): Update.
11610
11611 2017-06-12 Tom Tromey <tom@tromey.com>
11612
11613 PR exp/16225:
11614 * valprint.h (print_binary_chars, print_hex_chars): Update.
11615 * valprint.c (val_print_type_code_int): Update.
11616 (print_binary_chars): Add "zero_pad" argument.
11617 (emit_octal_digit): New function.
11618 (print_octal_chars): Don't zero-pad.
11619 (print_decimal_chars): Likewise.
11620 (print_hex_chars): Add "zero_pad" argument.
11621 * sh64-tdep.c (sh64_do_fp_register): Update.
11622 * regcache.c (regcache::dump): Update.
11623 * printcmd.c (print_scalar_formatted): Update.
11624 * infcmd.c (default_print_one_register_info): Update.
11625
11626 2017-06-12 Pedro Alves <palves@redhat.com>
11627 Alan Hayward <alan.hayward@arm.com>
11628
11629 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
11630 (mips_eabi_push_dummy_call): Rename local 'regsize' to
11631 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
11632 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
11633 Assert that abi_regsize bytes fit in 'ref_valbuf'.
11634
11635 2017-06-12 Pedro Alves <palves@redhat.com>
11636
11637 * dwarf2read.c (mapped_symtab::data): Now a vector of
11638 symtab_index_entry instead of vector of
11639 std::unique_ptr<symtab_index_entry>. All users adjusted to check
11640 whether an element's name is NULL instead of checking whether the
11641 element itself is NULL.
11642 (find_slot): Change return type. Adjust.
11643 (hash_expand, , add_index_entry, uniquify_cu_indices)
11644 (write_hash_table): Adjust.
11645
11646 2017-06-12 Pedro Alves <palves@redhat.com>
11647
11648 * dwarf2read.c (recursively_count_psymbols): New function.
11649 (write_psymtabs_to_index): Call it to compute number of psyms and
11650 pass estimate size of psyms_seen to unordered_set's ctor.
11651
11652 2017-06-12 Pedro Alves <palves@redhat.com>
11653
11654 * dwarf2read.c (write_hash_table): Check if key already exists
11655 before emplacing.
11656
11657 2017-06-12 Pedro Alves <palves@redhat.com>
11658
11659 * dwarf2read.c (data_buf::append_space): Rename to...
11660 (data_buf::grow): ... this, and make private. Adjust all callers.
11661 (data_buf::append_uint): New method.
11662 (add_address_entry, write_one_signatured_type)
11663 (write_psymtabs_to_index): Use it.
11664
11665 2017-06-12 Pedro Alves <palves@redhat.com>
11666
11667 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
11668 (file_write (FILE *, const std::vector<Elem>&)): Delete.
11669 (data_buf::file_write): Call ::fwrite directly.
11670
11671 2017-06-12 Pedro Alves <palves@redhat.com>
11672
11673 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
11674 std::vector::erase.
11675
11676 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
11677
11678 Code cleanup: C++ify .gdb_index producer.
11679 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
11680 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
11681 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
11682 (create_strtab, add_string): Remove.
11683 (file_write, data_buf): New.
11684 (struct symtab_index_entry): Use std::vector for cu_indices.
11685 (struct mapped_symtab): Use std::vector for data.
11686 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
11687 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
11688 Remove.
11689 (find_slot): Change return type. Update it to the new data structures.
11690 (hash_expand, add_index_entry): Update it to the new data structures.
11691 (offset_type_compare): Remove.
11692 (uniquify_cu_indices): Update it to the new data structures.
11693 (c_str_view, c_str_view_hasher, vector_hasher): New.
11694 (add_indices_to_cpool): Remove.
11695 (write_hash_table): Update it to the new data structures.
11696 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
11697 (eq_psymtab_cu_index): Remove.
11698 (psym_index_map): New typedef.
11699 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
11700 reference and std::unordered_map for cu_index_htab.
11701 (add_address_entry, add_address_entry_worker, write_address_map)
11702 (write_psymbols): Update it to the new data structures.
11703 (write_obstack): Remove.
11704 (struct signatured_type_index_data): Change types_list to a data_buf
11705 reference and psyms_seen to a std::unordered_set reference.
11706 (write_one_signatured_type, recursively_write_psymbols)
11707 (write_psymtabs_to_index): Update it to the new data structures.
11708
11709 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
11710
11711 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
11712 separate-debug-file commands.
11713 * symfile.h (separate_debug_file_debug): New global.
11714 * symfile.c (separate_debug_file_debug): New global.
11715 (separate_debug_file_exists, find_separate_debug_file): Add
11716 debug output.
11717 (_initialize_symfile): Add "set debug separate-debug-file"
11718 command.
11719 * build-id.c (build_id_to_debug_bfd,
11720 find_separate_debug_file_by_buildid): Add debug output.
11721
11722 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
11723
11724 * gdbarch.sh (displaced_step_free_closure): Remove.
11725 * gdbarch.h, gdbarch.c: Re-generate.
11726 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
11727 displaced_step_free_closure.
11728 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
11729 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
11730 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
11731 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11732 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
11733 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11734 * arch-utils.h (simple_displaced_step_free_closure): Remove.
11735 * arch-utils.c (simple_displaced_step_free_closure): Remove.
11736 * infrun.c (displaced_step_clear): Call xfree instead of
11737 gdbarch_displaced_step_free_closure.
11738
11739 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
11740
11741 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
11742 NULL".
11743
11744 2017-06-08 Alan Hayward <alan.hayward@arm.com>
11745
11746 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
11747 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
11748 (mn10300_push_dummy_call): Likewise.
11749
11750 2017-06-08 Alan Hayward <alan.hayward@arm.com>
11751
11752 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
11753
11754 2017-06-08 Alan Hayward <alan.hayward@arm.com>
11755
11756 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
11757
11758 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11759
11760 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
11761 able to start inferiors using a shell.
11762 (New remote packets): Announce new packet "QStartupWithShell".
11763 * remote.c: Add PACKET_QStartupWithShell.
11764 (extended_remote_create_inferior): Handle new
11765 PACKET_QStartupWithShell.
11766 (remote_protocol_features) <QStartupWithShell>: New entry for
11767 PACKET_QStartupWithShell.
11768 (_initialize_remote): Call "add_packet_config_cmd" for
11769 QStartupShell.
11770
11771 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11772 Pedro Alves <palves@redhat.com>
11773
11774 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
11775 and "nat/fork-inferior.h".
11776 * common/common-inferior.h: New file, with contents from
11777 "gdb/inferior.h".
11778 * commom/common-utils.c: Include "common-utils.h".
11779 (stringify_argv): New function.
11780 * common/common-utils.h (stringify_argv): New prototype.
11781 * configure.nat: Add "fork-inferior.o" as a dependency for
11782 "*linux*", "fbsd*" and "nbsd*" hosts.
11783 * corefile.c (get_exec_file): Update comment.
11784 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
11785 instead of "startup_inferior".
11786 (darwin_create_inferior): Call "add_thread_silent" after
11787 "fork_inferior".
11788 * fork-child.c: Cleanup unnecessary includes.
11789 (SHELL_FILE): Move to "common/common-fork-child.c".
11790 (environ): Likewise.
11791 (exec_wrapper): Initialize.
11792 (get_exec_wrapper): New function.
11793 (breakup_args): Move to "common/common-fork-child.c"; rename to
11794 "breakup_args_for_exec".
11795 (escape_bang_in_quoted_argument): Move to
11796 "common/common-fork-child.c".
11797 (saved_ui): New variable.
11798 (prefork_hook): New function.
11799 (postfork_hook): Likewise.
11800 (postfork_child_hook): Likewise.
11801 (gdb_startup_inferior): Likewise.
11802 (fork_inferior): Move to "common/common-fork-child.c". Update
11803 function to support gdbserver.
11804 (startup_inferior): Likewise.
11805 * gdbcore.h (get_exec_file): Remove declaration.
11806 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
11807 instead of "startup_inferior". Call "add_thread_silent" after
11808 "fork_inferior".
11809 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
11810 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
11811 instead of "startup_inferior". Call "add_thread_silent" after
11812 "fork_inferior".
11813 * inferior.h: Include "common-inferior.h".
11814 (trace_start_error): Move to "common/common-utils.h".
11815 (trace_start_error_with_name): Likewise.
11816 (fork_inferior): Move prototype to "nat/fork-inferior.h".
11817 (startup_inferior): Likewise.
11818 (gdb_startup_inferior): New prototype.
11819 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
11820 * nat/fork-inferior.h: New file.
11821 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
11822 instead of "startup_inferior". Call "add_thread_silent" after
11823 "fork_inferior".
11824 * target.h (target_terminal_init): Move prototype to
11825 "target/target.h".
11826 (target_terminal_inferior): Likewise.
11827 (target_terminal_ours): Likewise.
11828 * target/target.h (target_terminal_init): New prototype, moved
11829 from "target.h".
11830 (target_terminal_inferior): Likewise.
11831 (target_terminal_ours): Likewise.
11832 * utils.c (gdb_flush_out_err): New function.
11833
11834 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11835
11836 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
11837 * common/common-gdbthread.h: New file, with parts from
11838 "gdb/gdbthread.h".
11839 * gdbthread.h: Include "common-gdbthread.h".
11840 (switch_to_thread): Moved to "common/common-gdbthread.h".
11841
11842 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11843
11844 * Makefile.in (SFILES): Add "common/job-control.c".
11845 (HFILES_NO_SRCDIR): Add "common/job-control.h".
11846 (COMMON_OBS): Add "job-control.o".
11847 * common/job-control.c: New file, with contents from
11848 "gdb/inflow.c".
11849 * common/job-control.h: New file, with contents from "terminal.h".
11850 * fork-child.c: Include "job-control.h".
11851 * inflow.c: Include "job-control.h".
11852 (gdb_setpgid): Move to "common/common-inflow.c".
11853 (_initialize_inflow): Move setting of "job_control" to
11854 "handle_job_control".
11855 * terminal.h (job_control): Moved to "common/common-terminal.h".
11856 (gdb_setpgid): Likewise.
11857 * top.c: Include "job_control.h".
11858 * utils.c: Likewise.
11859 (job_control): Moved to "job-control.c".
11860
11861 2017-06-07 Pedro Alves <palves@redhat.com>
11862
11863 * Makefile.in (SFILES): Add gdb_regex.c.
11864 (COMMON_OBS): Add gdb_regex.o.
11865 * ada-lang.c (ada_add_standard_exceptions)
11866 (ada_add_exceptions_from_frame, name_matches_regex)
11867 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
11868 parameter type to compiled_regex. Adjust.
11869 (ada_exceptions_list): Use compiled_regex.
11870 * break-catch-throw.c (exception_catchpoint::pattern): Now a
11871 std::unique_ptr<compiled_regex>.
11872 (exception_catchpoint::~exception_catchpoint): Remove regfree
11873 call.
11874 (check_status_exception_catchpoint): Adjust to use compiled_regex.
11875 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
11876 * breakpoint.c (solib_catchpoint::compiled): Now a
11877 std::unique_ptr<compiled_regex>.
11878 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
11879 (check_status_catch_solib): Adjust to use compiled_regex.
11880 (add_solib_catchpoint): Adjust to use compiled_regex.
11881 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
11882 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
11883 compiled_regex reference. Adjust to use it.
11884 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
11885 declaration. Include "gdb_regex.h".
11886 (apropos_cmd): Change regex parameter to compiled_regex reference.
11887 * gdb_regex.c: New file.
11888 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
11889 declarations.
11890 (class compiled_regex): New.
11891 * linux-tdep.c: Include "common/gdb_optional.h".
11892 (struct mapping_regexes): New, factored out from
11893 mapping_is_anonymous_p, and adjusted to use compiled_regex.
11894 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
11895 gdb::optional and remove cleanups. Adjust to compiled_regex.
11896 * probe.c: Include "common/gdb_optional.h".
11897 (collect_probes): Use compiled_regex and gdb::optional and remove
11898 cleanups.
11899 * skip.c: Include "common/gdb_optional.h".
11900 (skiplist_entry::compiled_function_regexp): Now a
11901 gdb::optional<compiled_regex>.
11902 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
11903 (free_skiplist_entry): Remove regfree call.
11904 (compile_skip_regexp, skip_rfunction_p): Adjust to use
11905 compiled_regex and gdb::optional.
11906 * symtab.c: Include "common/gdb_optional.h".
11907 (search_symbols): Use compiled_regex and gdb::optional.
11908 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
11909 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
11910 to gdb_regex.c.
11911
11912 2017-06-07 Alan Hayward <alan.hayward@arm.com>
11913
11914 * regcache.c (regcache::save): Avoid buffer use.
11915 (regcache::dump): Likewise.
11916
11917 2017-06-07 Alan Hayward <alan.hayward@arm.com>
11918
11919 * sh-tdep.c (sh_pseudo_register_read): Remove
11920 MAX_REGISTER_SIZE.
11921 (sh_pseudo_register_write): Likewise.
11922 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
11923 (sh64_pseudo_register_write): Likewise
11924
11925 2017-06-07 Alan Hayward <alan.hayward@arm.com>
11926
11927 * aarch64-tdep.c (aarch64_store_return_value): Use
11928 V_REGISTER_SIZE.
11929 (aarch64_pseudo_read_value): Likewise.
11930 (aarch64_pseudo_write): Likewise.
11931
11932 2017-06-06 Yao Qi <yao.qi@linaro.org>
11933
11934 * regformats/regdef.h (set_register_cache): Remove the
11935 declaration.
11936
11937 2017-06-06 Alan Hayward <alan.hayward@arm.com>
11938
11939 * frame.c (frame_unwind_register_signed): Use
11940 frame_unwind_register_value.
11941
11942 2017-06-06 Pedro Alves <palves@redhat.com>
11943
11944 PR breakpoints/21553
11945 * breakpoint.c (create_breakpoints_sal_default)
11946 (init_breakpoint_sal, create_breakpoint_sal): Use
11947 gdb::unique_xmalloc_ptr for string parameters.
11948 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11949 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
11950 (base_breakpoint_create_breakpoints_sal)
11951 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
11952 (strace_marker_create_breakpoints_sal)
11953 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
11954 string parameters.
11955 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
11956 gdb::unique_xmalloc_ptr for string parameters.
11957 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11958 parameters.
11959
11960 2017-06-06 Alan Hayward <alan.hayward@arm.com>
11961
11962 * alpha-tdep.c (alpha_register_to_value): Use
11963 get_frame_register_value.
11964 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
11965
11966 2017-06-06 Alan Hayward <alan.hayward@arm.com>
11967
11968 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
11969 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
11970 (ia64_value_to_register): Likewise.
11971 (ia64_extract_return_value): Likewise.
11972 (ia64_store_return_value): Likewise.
11973 (ia64_push_dummy_call): Likewise.
11974
11975 2017-06-04 Joel Brobecker <brobecker@adacore.com>
11976
11977 GDB 8.0 released.
11978
11979 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
11980
11981 * x86-linux-nat.c (struct arch_lwp_info): Remove.
11982
11983 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
11984
11985 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
11986 parameter.
11987 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
11988
11989 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
11990
11991 * event-loop.c (poll_timers): Unallocate timer using delete
11992 instead of xfree.
11993
11994 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11995
11996 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
11997 (struct breakpoint) <~breakpoint>: New.
11998 (struct watchpoint): Inherit from breakpoint.
11999 <~watchpoint>: New.
12000 <base>: Remove.
12001 (struct tracepoint): Inherit from breakpoint.
12002 <base>: Remove.
12003 * breakpoint.c (longjmp_breakpoint_ops): Remove.
12004 (struct longjmp_breakpoint): Inherit from breakpoint.
12005 <~longjmp_breakpoint>: New.
12006 <base>: Remove.
12007 (new_breakpoint_from_type): Remove casts.
12008 (watchpoint_in_thread_scope): Remove reference to base field.
12009 (watchpoint_del_at_next_stop): Likewise.
12010 (update_watchpoint): Likewise.
12011 (watchpoint_check): Likewise.
12012 (bpstat_check_watchpoint): Likewise.
12013 (set_longjmp_breakpoint): Likewise.
12014 (struct fork_catchpoint): Inherit from breakpoint.
12015 <base>: Remove.
12016 (struct solib_catchpoint): Inherit from breakpoint.
12017 <~solib_catchpoint>: New.
12018 <base>: Remove.
12019 (dtor_catch_solib): Change to ...
12020 (solib_catchpoint::~solib_catchpoint): ... this.
12021 (breakpoint_hit_catch_solib): Remove reference to base field.
12022 (add_solib_catchpoint): Likewise.
12023 (create_fork_vfork_event_catchpoint): Likewise.
12024 (struct exec_catchpoint): Inherit from breakpoint.
12025 <~exec_catchpoint>: New.
12026 <base>: Remove.
12027 (dtor_catch_exec): Change to ...
12028 (exec_catchpoint::~exec_catchpoint): ... this.
12029 (dtor_watchpoint): Change to ...
12030 (watchpoint::~watchpoint): ... this.
12031 (watch_command_1): Remove reference to base field.
12032 (catch_exec_command_1): Likewise.
12033 (base_breakpoint_dtor): Change to ...
12034 (breakpoint::~breakpoint): ... this.
12035 (base_breakpoint_ops): Remove dtor field value.
12036 (longjmp_bkpt_dtor): Change to ...
12037 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
12038 (strace_marker_create_breakpoints_sal): Remove reference to base
12039 field.
12040 (delete_breakpoint): Don't manually call breakpoint destructor.
12041 (create_tracepoint_from_upload): Remove reference to base field.
12042 (trace_pass_set_count): Likewise.
12043 (initialize_breakpoint_ops): Don't initialize
12044 momentary_breakpoint_ops, don't set dtors.
12045 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
12046 <~ada_catchpoint>: New.
12047 <base>: Remove.
12048 (create_excep_cond_exprs): Remove reference to base field.
12049 (dtor_exception): Change to ...
12050 (ada_catchpoint::~ada_catchpoint): ... this.
12051 (dtor_catch_exception): Remove.
12052 (dtor_catch_exception_unhandled): Remove.
12053 (dtor_catch_assert): Remove.
12054 (create_ada_exception_catchpoint): Remove reference to base
12055 field.
12056 (initialize_ada_catchpoint_ops): Don't set dtors.
12057 * break-catch-sig.c (struct signal_catchpoint): Inherit from
12058 breakpoint.
12059 <~signal_catchpoint>: New.
12060 <base>: Remove.
12061 (signal_catchpoint_dtor): Change to ...
12062 (signal_catchpoint::~signal_catchpoint): ... this.
12063 (create_signal_catchpoint): Remove reference to base field.
12064 (initialize_signal_catchpoint_ops): Don't set dtor.
12065 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
12066 from breakpoint.
12067 <~syscall_catchpoint>: New.
12068 <base>: Remove.
12069 (dtor_catch_syscall): Change to ...
12070 (syscall_catchpoint::~syscall_catchpoint): ... this.
12071 (create_syscall_event_catchpoint): Remove reference to base
12072 field.
12073 (initialize_syscall_catchpoint_ops): Don't set dtor.
12074 * break-catch-throw.c (struct exception_catchpoint): Inherit
12075 from breakpoint.
12076 <~exception_catchpoint>: New.
12077 <base>: Remove.
12078 (dtor_exception_catchpoint): Change to ...
12079 (exception_catchpoint::~exception_catchpoint): ... this.
12080 (handle_gnu_v3_exceptions): Remove reference to base field.
12081 (initialize_throw_catchpoint_ops): Don't set dtor.
12082 * ctf.c (ctf_get_traceframe_address): Remove reference to base
12083 field.
12084 * remote.c (remote_get_tracepoint_status): Likewise.
12085 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
12086 * tracefile.c (tracefile_fetch_registers): Likewise.
12087 * tracepoint.c (actions_command): Likewise.
12088 (validate_actionline): Likewise.
12089 (tfind_1): Likewise.
12090 (get_traceframe_location): Likewise.
12091 (find_matching_tracepoint_location): Likewise.
12092 (parse_tracepoint_status): Likewise.
12093 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
12094
12095 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
12096
12097 * breakpoint.c (struct longjmp_breakpoint): New struct.
12098 (is_tracepoint_type): Change return type to bool.
12099 (is_longjmp_type): New function.
12100 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
12101 (set_raw_breakpoint_without_location): Use
12102 new_breakpoint_from_type.
12103 (set_raw_breakpoint): Likewise.
12104
12105 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
12106
12107 * breakpoint.c (new_breakpoint_from_type): New function.
12108 (create_breakpoint_sal): Use new_breakpoint_from_type and
12109 unique_ptr.
12110 (create_breakpoint): Likewise.
12111
12112 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
12113
12114 * memattr.c (mem_info_command): Rename to ...
12115 (info_mem_command): ... this.
12116 (mem_enable_command): Rename to ...
12117 (enable_mem_command): ... this.
12118 (mem_disable_command): Rename to ...
12119 (disable_mem_command): ... this.
12120 (mem_delete_command): Rename to ...
12121 (delete_mem_command): ... this.
12122 (_initialize_mem): Adjust function names.
12123
12124 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
12125
12126 * btrace.c (handle_pt_insn_events): New.
12127 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
12128 STATUS. Split into this and ...
12129 (handle_pt_insn_event_flags): ... this.
12130
12131 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
12132
12133 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
12134 and struct pt_insn.resynced.
12135 * configure: Regenerated.
12136 * config.in: Regenerated.
12137
12138 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12139
12140 * btrace.c (ftrace_find_call_by_number): New function.
12141 (ftrace_new_function): Store objects, not pointers.
12142 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
12143 ftrace_new_gap, ftrace_update_function,
12144 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
12145 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
12146 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
12147 btrace_ends_with_single_insn, btrace_call_get): Account for
12148 btrace_thread_info::functions now storing objects.
12149 * btrace.h (struct btrace_thread_info): Add constructor.
12150 (struct btrace_thread_info) <functions>: Make std::vector.
12151 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
12152 Initialize with default values.
12153 * record-btrace.c (record_btrace_frame_sniffer): Account for
12154 btrace_thread_info::functions now storing objects.
12155
12156 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12157
12158 * btrace.c: Remove typedef bfun_s.
12159 (ftrace_new_gap): Directly add gaps to the list of gaps.
12160 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
12161 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
12162 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
12163 instead of gdb VEC.
12164
12165 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12166
12167 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
12168 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
12169 with btrace_thread_info::next_segment and
12170 btrace_thread_info::prev_segment.
12171 * btrace.h: Remove struct btrace_func_link.
12172 (struct btrace_function): Replace pair of function segment pointers
12173 with pair of indices.
12174 * python/py-record-btrace.c (btpy_call_prev_sibling,
12175 btpy_call_next_sibling): Replace references to
12176 btrace_thread_info::segment with btrace_thread_info::next_segment and
12177 btrace_thread_info::prev_segment.
12178 * record-btrace.c (record_btrace_frame_this_id): Use
12179 btrace_find_call_by_number.
12180
12181 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12182
12183 * btrace.c (ftrace_new_function, ftrace_fixup_level,
12184 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
12185 btrace_insn_next, btrace_insn_prev): Remove references to
12186 btrace_thread_info::flow.
12187 * btrace.h (struct btrace_function): Remove FLOW.
12188
12189 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12190
12191 * btrace.c (ftrace_find_call_by_number): New function.
12192 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
12193 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
12194 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
12195 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
12196 index.
12197 * btrace.h (struct btrace_function): Turn UP into an index.
12198 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
12199 as an index.
12200 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
12201 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
12202 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
12203
12204 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12205
12206 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12207 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12208 ftrace_update_function, ftrace_compute_global_level_offset,
12209 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
12210 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
12211 btrace_insn_end, btrace_is_empty): Remove references to
12212 btrace_thread_info::begin and btrace_thread_info::end.
12213 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
12214 (struct btrace_thread_info) <functions>: Adjust comment.
12215 * record-btrace.c (record_btrace_start_replaying): Remove reference to
12216 btrace_thread_info::begin.
12217
12218 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12219
12220 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12221 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12222 ftrace_update_function): Remove arguments that implicitly were always
12223 BTINFO->END.
12224 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
12225 Don't pass BTINFO->END.
12226
12227 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12228
12229 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
12230 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
12231 btrace_find_insn_by_number): Replace function segment pointer with
12232 index.
12233 (btrace_insn_cmp): Simplify.
12234 * btrace.h: (struct btrace_insn_iterator) Rename index to
12235 insn_index. Replace function segment pointer with index into function
12236 segment vector.
12237 * record-btrace.c (record_btrace_call_history): Replace function
12238 segment pointer use with index.
12239 (record_btrace_frame_sniffer): Retrieve function call segment through
12240 vector.
12241 (record_btrace_set_replay): Remove defunc't safety check.
12242
12243 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12244
12245 * btrace.c (btrace_ends_with_single_insn): New function.
12246 (btrace_call_get, btrace_call_number, btrace_call_begin,
12247 btrace_call_end, btrace_call_next, btrace_call_prev,
12248 btrace_find_call_by_number): Use index into call segment vector
12249 instead of pointer.
12250 (btrace_call_cmp): Simplify.
12251 * btrace.h (struct btrace_call_iterator): Replace function call segment
12252 pointer with index into vector.
12253 * record-btrace.c (record_btrace_call_history): Use index instead of
12254 pointer.
12255
12256 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12257
12258 * btrace.c (btrace_insn_begin, btrace_insn_end,
12259 btrace_find_insn_by_number): Add btinfo to iterator.
12260 * btrace.h (struct btrace_insn_iterator): Add btinfo.
12261
12262 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12263
12264 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
12265 and save pointers directly.
12266 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
12267 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
12268 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
12269 changed signature of functions.
12270 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
12271 (btrace_fetch): Remove code that adds btrace_function pointers to
12272 vector of btrace_functions.
12273 (btrace_clear): Simplify freeing vector of btrace_functions.
12274
12275 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12276
12277 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
12278 Replace VEC_* with std::vector functions.
12279 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
12280 (struct btrace_thread_info)<functions>: Change type to std::vector.
12281
12282 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
12283
12284 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
12285 "Removed targets and native configurations" up. Merge duplicate
12286 "New commands" sub-sections. Add "New options" sub-sections.
12287
12288 2017-05-26 Alan Hayward <alan.hayward@arm.com>
12289
12290 * defs.h (copy_integer_to_size): New declaration.
12291 * findvar.c (copy_integer_to_size): New function.
12292 (do_cint_test): New selftest function.
12293 (copy_integer_to_size_test): Likewise.
12294 (_initialize_findvar): Likewise.
12295 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
12296 (mips_fbsd_collect_reg): Use raw_collect_integer.
12297 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
12298 (mips64_fill_gregset): Use raw_collect_integer
12299 (mips64_fill_fpregset): Use raw_supply_integer.
12300 * regcache.c (regcache::raw_supply_integer): New function.
12301 (regcache::raw_collect_integer): Likewise.
12302 * regcache.h: (regcache::raw_supply_integer): New declaration.
12303 (regcache::raw_collect_integer): Likewise.
12304
12305 2017-05-24 Yao Qi <yao.qi@linaro.org>
12306
12307 * Makefile.in (SFILES): Add gdbarch-selftests.c.
12308 (COMMON_OBS): Add gdbarch-selftests.o.
12309 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
12310 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
12311 * gdbarch-selftests.c: New file.
12312 * regcache.h (regcache) <~regcache>: Mark it virtual if
12313 GDB_SELF_TEST.
12314 <raw_write>: Likewise.
12315
12316 2017-05-24 Yao Qi <yao.qi@linaro.org>
12317
12318 * regcache.c (current_regcache): Change it to
12319 regcache::current_regcache.
12320 (regcache_observer_target_changed): Update.
12321 (regcache_thread_ptid_changed): Make it a regcache static
12322 method.
12323 (regcache_thread_ptid_changed): Update.
12324 (class regcache_access): New.
12325 (current_regcache_test): Update.
12326 (_initialize_regcache): Update.
12327 * regcache.h: Include forward_list.
12328 (regcache): Declare regcache_thread_ptid_changed and declare
12329 registers_changed_ptid as friend.
12330
12331 2017-05-24 Yao Qi <yao.qi@linaro.org>
12332
12333 * i387-tdep.c (i387_register_to_value): Use register_size
12334 instead of TYPE_LENGTH.
12335 * m68k-tdep.c (m68k_register_to_value): Likewise.
12336
12337 2017-05-24 Yao Qi <yao.qi@linaro.org>
12338
12339 * i387-tdep.c (i387_convert_register_p): Return false if type
12340 code isn't TYPE_CODE_FLT.
12341
12342 2017-05-24 Yao Qi <yao.qi@linaro.org>
12343
12344 * alpha-tdep.c (alpha_convert_register_p): Return true if type
12345 length is 4.
12346 (alpha_register_to_value): Remove type length check.
12347 (alpha_value_to_register): Likewise.
12348
12349 2017-05-24 Yao Qi <yao.qi@linaro.org>
12350
12351 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
12352 TYPE_CODE_FLT.
12353
12354 2017-05-24 Yao Qi <yao.qi@linaro.org>
12355
12356 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
12357 TYPE_CODE_FLT or not.
12358
12359 2017-05-24 Yao Qi <yao.qi@linaro.org>
12360
12361 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
12362 * avr-tdep.c (avr_gdbarch_init): Likewise.
12363 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12364 * cris-tdep.c (cris_gdbarch_init): Likewise.
12365 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12366 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12367 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12368 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
12369 * mep-tdep.c (mep_gdbarch_init): Likewise.
12370 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12371 * mips-tdep.c (mips_gdbarch_init): Likewise.
12372 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12373 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12374 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12375 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12376 * v850-tdep.c (v850_gdbarch_init): Likewise.
12377
12378 2017-05-24 Yao Qi <yao.qi@linaro.org>
12379
12380 * selftest-arch.c (tests_with_arch): Call registers_changed
12381 and reinit_frame_cache.
12382 * selftest.c (run_self_tests): Likewise.
12383
12384 2017-05-24 Yao Qi <yao.qi@linaro.org>
12385
12386 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
12387 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
12388
12389 2017-05-24 Yao Qi <yao.qi@linaro.org>
12390
12391 * rl78-tdep.c (rl78_gdbarch_init): Don't call
12392 set_gdbarch_print_insn.
12393
12394 2017-05-24 Yao Qi <yao.qi@linaro.org>
12395
12396 * h8300-tdep.c (h8300_gdbarch_init): Don't call
12397 set_gdbarch_print_insn.
12398
12399 2017-05-24 Yao Qi <yao.qi@linaro.org>
12400
12401 * alpha-tdep.c (alpha_gdbarch_init): Don't call
12402 set_gdbarch_print_insn.
12403 * arc-tdep.c (arc_gdbarch_init): Likewise.
12404 * arch-utils.c: include dis-asm.h.
12405 (default_print_insn): New function.
12406 * arch-utils.h (default_print_insn): Declare.
12407 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
12408 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12409 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
12410 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
12411 * frv-tdep.c (frv_gdbarch_init): Likewise.
12412 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12413 * gdbarch.sh (print_insn): Use default_print_insn.
12414 * gdbarch.c: Regenerated.
12415 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
12416 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
12417 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12418 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
12419 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12420 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
12421 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
12422 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
12423 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
12424 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12425 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12426 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12427 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12428 * mt-tdep.c (mt_gdbarch_init): Likewise.
12429 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12430 * nios2-tdep.c (nios2_print_insn): Remove.
12431 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
12432 * rx-tdep.c (rx_gdbarch_init): Likewise.
12433 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
12434 * score-tdep.c (score_print_insn): Remove.
12435 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
12436 * sh-tdep.c (sh_gdbarch_init): Likewise.
12437 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12438 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12439 * tic6x-tdep.c (tic6x_print_insn): Remove.
12440 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
12441 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
12442 * v850-tdep.c (v850_gdbarch_init): Likewise.
12443 * vax-tdep.c (vax_gdbarch_init): Likewise.
12444 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12445 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
12446
12447 2017-05-23 John Baldwin <jhb@FreeBSD.org>
12448
12449 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
12450 (MIPS_FP0_REGNUM): Remove.
12451 (MIPS_FSR_REGNUM): Remove.
12452 (mips_fbsd_supply_fpregs): Use mips_regnum.
12453 (mips_fbsd_supply_gregs): Likewise.
12454 (mips_fbsd_collect_fpregs): Likewise.
12455 (mips_fbsd_collect_gregs): Likewise.
12456
12457 2017-05-23 John Baldwin <jhb@FreeBSD.org>
12458
12459 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
12460 (getpfpregs_supplies): New function.
12461 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
12462 getfpregs_supplies.
12463 (mips_fbsd_store_inferior_registers): Likewise.
12464
12465 2017-05-22 Pedro Alves <palves@redhat.com>
12466
12467 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
12468 maintainer.
12469
12470 2017-05-22 Alan Hayward <alan.hayward@arm.com>
12471
12472 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
12473 (store_register): Likewise.
12474 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
12475 (get_decimal_float_return_value): Likewise.
12476 (do_ppc_sysv_return_value): Likewise.
12477 (ppc64_sysv_abi_push_integer): Likewise.
12478 (ppc64_sysv_abi_push_freg): Likewise.
12479 (ppc64_sysv_abi_return_value_base): Likewise.
12480 (ppc64_sysv_abi_return_value): Likewise.
12481 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
12482 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
12483 * rs6000-nat.c: Likewise.
12484 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
12485 (rs6000_value_to_register): Likewise.
12486 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
12487
12488 2017-05-21 Tom Tromey <tom@tromey.com>
12489
12490 PR rust/21466:
12491 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
12492 arrays as "[T]", not "[T; ]".
12493
12494 2017-05-19 Tom Tromey <tom@tromey.com>
12495
12496 PR rust/21484:
12497 * rust-lang.c (exp_descriptor_rust): New function.
12498 (rust_language_defn): Use it.
12499 * p-lang.c (pascal_language_defn): Update.
12500 * opencl-lang.c (opencl_language_defn): Update.
12501 * objc-lang.c (objc_language_defn): Update.
12502 * m2-lang.c (m2_language_defn): Update.
12503 * language.h (struct language_defn)
12504 <la_watch_location_expression>: New member.
12505 * language.c (unknown_language_defn, auto_language_defn)
12506 (local_language_defn): Update.
12507 * go-lang.c (go_language_defn): Update.
12508 * f-lang.c (f_language_defn): Update.
12509 * d-lang.c (d_language_defn): Update.
12510 * c-lang.h (c_watch_location_expression): Declare.
12511 * c-lang.c (c_watch_location_expression): New function.
12512 (c_language_defn, cplus_language_defn, asm_language_defn)
12513 (minimal_language_defn): Use it.
12514 * breakpoint.c (watch_command_1): Call
12515 la_watch_location_expression.
12516 * ada-lang.c (ada_language_defn): Update.
12517
12518 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12519
12520 PR tui/21482
12521 * gdb_curses.h (NOMACROS): Define.
12522 (NCURSES_NOMACROS): Define.
12523
12524 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12525
12526 PR tui/21482
12527 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
12528 arg to char *.
12529 * tui/tui-wingeneral.c (box_win): Likewise.
12530 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
12531 (tui_show_source_line): Likewise.
12532 (tui_show_exec_info_content): Likewise.
12533
12534 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12535
12536 * sparc-tdep.c (sparc_structure_return_p)
12537 (sparc_arg_on_registers_p): New functions.
12538 (sparc32_store_arguments): Use them.
12539 * sparc64-tdep.c (sparc64_16_byte_align_p)
12540 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
12541 Handle TYPE_CODE_ARRAY.
12542
12543 2017-05-17 Yao Qi <yao.qi@linaro.org>
12544
12545 * cli/cli-decode.c (add_alias_cmd): New function.
12546 * command.h (add_alias_cmd): Declare.
12547 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
12548 instead call add_alias_cmd.
12549
12550 2017-05-17 Pedro Alves <palves@redhat.com>
12551
12552 * Makefile.in (nat_extra_makefile_frag): Rename to ...
12553 (nat_makefile_frag): ... this. All references updated.
12554 * configure.ac: Likewise.
12555 * configure.nat: Likewise. Enhance comments.
12556 * configure: Regenerate.
12557
12558 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12559
12560 * procfs.c (procfs_create_inferior): Change prototype to match
12561 definition.
12562
12563 2017-05-13 Eli Zaretskii <eliz@gnu.org>
12564
12565 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
12566 C++ compiler warning.
12567
12568 2017-05-12 Tom Tromey <tom@tromey.com>
12569
12570 PR rust/21483:
12571 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
12572 recurse, just call value_struct_elt directly.
12573
12574 2017-05-12 Tom Tromey <tom@tromey.com>
12575
12576 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
12577 OP_RUST_ARRAY>: Fix.
12578
12579 2017-05-12 Tom Tromey <tom@tromey.com>
12580
12581 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
12582
12583 2017-05-09 Yao Qi <yao.qi@linaro.org>
12584
12585 * regcache.c: Include <forward_list>.
12586 (struct regcache_list): Remove.
12587 (current_regcache): Update.
12588 (get_thread_arch_aspace_regcache): Update for std::forward_list.
12589 (regcache_thread_ptid_changed): Likewise.
12590 (registers_changed_ptid): Likewise.
12591 (current_regcache_size): Likewise.
12592
12593 2017-05-09 Yao Qi <yao.qi@linaro.org>
12594
12595 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
12596 (current_regcache_size): New function.
12597 (current_regcache_test): New function.
12598 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
12599
12600 2017-05-08 Alan Hayward <alan.hayward@arm.com>
12601
12602 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
12603 (print_gp_register_row): Use get_frame_register_value.
12604
12605 2017-05-08 Alan Hayward <alan.hayward@arm.com>
12606
12607 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
12608 (mips_supply_fpregset): Likewise.
12609 (mips64_supply_gregset): Likewise.
12610
12611 2017-05-08 Alan Hayward <alan.hayward@arm.com>
12612
12613 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
12614 regcache->raw_supply_zeroed.
12615
12616 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12617
12618 * configure.nat: Rearrange 'case' statements to match
12619 host before cpu.
12620
12621 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12622
12623 * Makefile.in: Remove "@host_makefile_frag@". Add variables
12624 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
12625 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
12626 "@nat_extra_makefile_frag@".
12627 (Makefile): Remove dependency on "@frags@".
12628 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
12629 (data-directory/Makefile): Likewise.
12630 * config/aarch64/linux.mh: Deleted; moved contents to
12631 "gdb/configure.nat".
12632 * config/alpha/alpha-linux.mh: Likewise.
12633 * config/alpha/nbsd.mh: Likewise.
12634 * config/arm/linux.mh: Likewise.
12635 * config/arm/nbsdelf.mh: Likewise.
12636 * config/i386/cygwin.mh: Likewise.
12637 * config/i386/cygwin64.mh: Likewise.
12638 * config/i386/darwin.mh: Likewise.
12639 * config/i386/fbsd.mh: Likewise.
12640 * config/i386/fbsd64.mh: Likewise.
12641 * config/i386/go32.mh: Likewise.
12642 * config/i386/i386gnu.mh: Likewise.
12643 * config/i386/i386sol2.mh: Likewise.
12644 * config/i386/linux.mh: Likewise.
12645 * config/i386/linux64.mh: Likewise.
12646 * config/i386/mingw.mh: Likewise.
12647 * config/i386/mingw64.mh: Likewise.
12648 * config/i386/nbsd64.mh: Likewise.
12649 * config/i386/nbsdelf.mh: Likewise.
12650 * config/i386/nto.mh: Likewise.
12651 * config/i386/obsd.mh: Likewise.
12652 * config/i386/obsd64.mh: Likewise.
12653 * config/i386/sol2-64.mh: Likewise.
12654 * config/ia64/linux.mh: Likewise.
12655 * config/m32r/linux.mh: Likewise.
12656 * config/m68k/linux.mh: Likewise.
12657 * config/m68k/nbsdelf.mh: Likewise.
12658 * config/m68k/obsd.mh: Likewise.
12659 * config/m88k/obsd.mh: Likewise.
12660 * config/mips/fbsd.mh: Likewise.
12661 * config/mips/linux.mh: Likewise.
12662 * config/mips/nbsd.mh: Likewise.
12663 * config/mips/obsd64.mh: Likewise.
12664 * config/pa/linux.mh: Likewise.
12665 * config/pa/nbsd.mh: Likewise.
12666 * config/pa/obsd.mh: Likewise.
12667 * config/powerpc/aix.mh: Likewise.
12668 * config/powerpc/fbsd.mh: Likewise.
12669 * config/powerpc/linux.mh: Likewise.
12670 * config/powerpc/nbsd.mh: Likewise.
12671 * config/powerpc/obsd.mh: Likewise.
12672 * config/powerpc/ppc64-linux.mh: Likewise.
12673 * config/powerpc/spu-linux.mh: Likewise.
12674 * config/s390/linux.mh: Likewise.
12675 * config/sh/nbsd.mh: Likewise.
12676 * config/sparc/fbsd.mh: Likewise.
12677 * config/sparc/linux.mh: Likewise.
12678 * config/sparc/linux64.mh: Likewise.
12679 * config/sparc/nbsd64.mh: Likewise.
12680 * config/sparc/nbsdelf.mh: Likewise.
12681 * config/sparc/obsd64.mh: Likewise.
12682 * config/sparc/sol2.mh: Likewise.
12683 * config/tilegx/linux.mh: Likewise.
12684 * config/vax/nbsdelf.mh: Likewise.
12685 * config/vax/obsd.mh: Likewise.
12686 * config/xtensa/linux.mh: Likewise.
12687 * config/i386/i386gnu.mn: New file, with excerpts from
12688 "config/i386/i386gnu.mh".
12689 * configure: Regenerate.
12690 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
12691 *.mh files under "gdb/config".
12692 * configure.nat: New file, with contents from the
12693 "gdb/config/*/*.mh" files.
12694
12695 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
12696
12697 * btrace.c (btrace_clear): Free insn vector.
12698
12699 2017-05-05 Pedro Alves <palves@redhat.com>
12700
12701 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
12702 * configure: Regenerate.
12703
12704 2017-05-04 Pedro Alves <palves@redhat.com>
12705
12706 * Makefile.in (SFILES): Add progspace-and-thread.c.
12707 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
12708 (COMMON_OBS): Add progspace-and-thread.o.
12709 * breakpoint.c: Include "progspace-and-thread.h".
12710 (update_inserted_breakpoint_locations)
12711 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
12712 Use scoped_restore_current_pspace_and_thread.
12713 (create_std_terminate_master_breakpoint): Use
12714 scoped_restore_current_program_space.
12715 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
12716 (print_breakpoint_location): Use
12717 scoped_restore_current_program_space.
12718 (bp_loc_is_permanent): Use
12719 scoped_restore_current_pspace_and_thread.
12720 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
12721 (download_tracepoint_locations): Use
12722 scoped_restore_current_pspace_and_thread.
12723 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
12724 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
12725 (enum step_over_calls_kind): Moved from inferior.h.
12726 (class scoped_restore_current_thread): New class.
12727 * gdbthread.h (make_cleanup_restore_current_thread): Delete
12728 declaration.
12729 (scoped_restore_current_thread): New class.
12730 * infcmd.c: Include "common/gdb_optional.h".
12731 (continue_1, proceed_after_attach): Use
12732 scoped_restore_current_thread.
12733 (notice_new_inferior): Use scoped_restore_current_thread.
12734 * inferior.c: Include "progspace-and-thread.h".
12735 (restore_inferior, save_current_inferior): Delete.
12736 (add_inferior_command, clone_inferior_command): Use
12737 scoped_restore_current_pspace_and_thread.
12738 * inferior.h (scoped_restore_current_inferior): New class.
12739 * infrun.c: Include "progspace-and-thread.h" and
12740 "common/gdb_optional.h".
12741 (follow_fork_inferior): Use
12742 scoped_restore_current_pspace_and_thread.
12743 (scoped_restore_exited_inferior): New class.
12744 (handle_vfork_child_exec_or_exit): Use
12745 scoped_restore_exited_inferior,
12746 scoped_restore_current_pspace_and_thread,
12747 scoped_restore_current_thread and scoped_restore.
12748 (fetch_inferior_event): Use scoped_restore_current_thread.
12749 * linespec.c (decode_line_full, decode_line_1): Use
12750 scoped_restore_current_program_space.
12751 * mi/mi-main.c: Include "progspace-and-thread.h".
12752 (exec_continue): Use scoped_restore_current_thread.
12753 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
12754 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
12755 * proc-service.c (ps_pglobal_lookup): Use
12756 scoped_restore_current_program_space.
12757 * progspace-and-thread.c: New file.
12758 * progspace-and-thread.h: New file.
12759 * progspace.c (release_program_space, clone_program_space): Use
12760 scoped_restore_current_program_space.
12761 (restore_program_space, save_current_program_space)
12762 (save_current_space_and_thread): Delete.
12763 (switch_to_program_space_and_thread): Moved to
12764 progspace-and-thread.c.
12765 * progspace.h (save_current_program_space)
12766 (save_current_space_and_thread): Delete declarations.
12767 (scoped_restore_current_program_space): New class.
12768 * remote.c (remote_btrace_maybe_reopen): Use
12769 scoped_restore_current_thread.
12770 * symtab.c: Include "progspace-and-thread.h".
12771 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
12772 * thread.c (print_thread_info_1): Use
12773 scoped_restore_current_thread.
12774 (struct current_thread_cleanup): Delete.
12775 (do_restore_current_thread_cleanup)
12776 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
12777 (scoped_restore_current_thread::~scoped_restore_current_thread):
12778 ... this new dtor.
12779 (make_cleanup_restore_current_thread): Rename/convert to ...
12780 (scoped_restore_current_thread::scoped_restore_current_thread):
12781 ... this new ctor.
12782 (thread_apply_all_command): Use scoped_restore_current_thread.
12783 (thread_apply_command): Use scoped_restore_current_thread.
12784 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
12785 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
12786
12787 2017-05-04 Pedro Alves <palves@redhat.com>
12788
12789 * thread.c (make_cleanup_restore_current_thread): Move
12790 find_thread_ptid call before the is_stopped call. Assert that the
12791 thread is found. Replace is_stopped call by checking the thread's
12792 state directly. Remove unnecessary NULL-thread check.
12793
12794 2017-05-04 Pedro Alves <palves@redhat.com>
12795
12796 * corelow.c (thread_section_name): New class.
12797 (get_core_register_section, get_core_siginfo): Use it.
12798
12799 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
12800
12801 * corelow.c (sniff_core_bfd): Remove extra semicolon.
12802 (get_core_register_section): Remove xfree of NULL pointer.
12803
12804 2017-05-03 Alan Hayward <alan.hayward@arm.com>
12805
12806 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
12807 * regcache.c (regcache::raw_supply_zeroed): New function.
12808 * regcache.h (regcache::raw_supply_zeroed): New declaration.
12809
12810 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
12811
12812 * gdbarch.sh: Remove commented out definition of
12813 TARGET_CHAR_BIT.
12814 * gdbarch.h: Re-generate.
12815
12816 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
12817
12818 * configure: Regenerate.
12819
12820 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
12821
12822 * solib-target.c (solib_target_relocate_section_addresses):
12823 Remove num_section_bases, num_bases, segment_bases variables.
12824
12825 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12826
12827 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
12828
12829 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12830
12831 * solib-target.c: Include <vector>
12832 (struct lm_info_target) <~lm_info_target>: Remove.
12833 <segment_bases, section_bases>: Change type to
12834 std::vector<CORE_ADDR>.
12835 (library_list_start_segment, library_list_start_section,
12836 library_list_end_library,
12837 solib_target_relocate_section_addresses): Adjust.
12838
12839 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12840
12841 * gdbarch.sh (software_single_step): Change return type to
12842 std::vector<CORE_ADDR>.
12843 * gdbarch.c, gdbarch.h: Re-generate.
12844 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
12845 Adjust.
12846 (arm_deal_with_atomic_sequence_raw): Adjust.
12847 (thumb_get_next_pcs_raw): Adjust.
12848 (arm_get_next_pcs_raw): Adjust.
12849 (arm_get_next_pcs): Adjust.
12850 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
12851 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
12852 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
12853 (alpha_software_single_step): Adjust.
12854 * alpha-tdep.h (alpha_software_single_step): Adjust.
12855 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
12856 * arm-tdep.c (arm_software_single_step): Adjust.
12857 (arm_breakpoint_kind_from_current_state): Adjust.
12858 * arm-tdep.h (arm_software_single_step): Adjust.
12859 * breakpoint.c (insert_single_step_breakpoint): Adjust.
12860 * cris-tdep.c (cris_software_single_step): Adjust.
12861 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
12862 (micromips_deal_with_atomic_sequence): Adjust.
12863 (deal_with_atomic_sequence): Adjust.
12864 (mips_software_single_step): Adjust.
12865 * mips-tdep.h (mips_software_single_step): Adjust.
12866 * moxie-tdep.c (moxie_software_single_step): Adjust.
12867 * nios2-tdep.c (nios2_software_single_step): Adjust.
12868 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
12869 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
12870 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
12871 * s390-linux-tdep.c (s390_software_single_step): Adjust.
12872 * sparc-tdep.c (sparc_software_single_step): Adjust.
12873 * spu-tdep.c (spu_software_single_step): Adjust.
12874 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
12875
12876 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12877
12878 * gdbarch.sh: Use semi-colon as field separator instead of colon.
12879 * gdbarch.h: Re-generate.
12880
12881 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12882
12883 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
12884 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
12885 * python/py-instruction.c, python/py-instruction.h: New file.
12886 * python/py-record.c: Add py-instruction.h include.
12887 (gdbpy_initialize_record): Make gdb.Instruction a super class of
12888 gdb.RecordInstruction.
12889 * python/python-internal.h: Add gdbpy_initialize_instruction
12890 declaration.
12891 * python/python.c (do_start_initialization): Add
12892 gdbpy_initialize_instruction.
12893
12894 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12895
12896 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
12897 Remove.
12898 (btrace_func_from_recpy_func): New function.
12899 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
12900 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
12901 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
12902 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
12903 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
12904 Also, use new helper functions.
12905 (btpy_list_item): Use new helper functions.
12906 (recpy_bt_function_call_history): Use new type name.
12907 (btpy_call_getset): Remove.
12908 (gdbpy_initialize_btrace): Remove code to initialize
12909 gdb.BtraceFunctionCall.
12910 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
12911 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
12912 recpy_bt_func_prev, recpy_bt_func_next): New export.
12913 * python/py-record.c (recpy_func_type): New static object.
12914 (recpy_func_new, recpy_func_level, recpy_func_symbol,
12915 recpy_func_instructions, recpy_func_up, recpy_func_prev,
12916 recpy_func_next): New function.
12917 (recpy_element_hash, recpy_element_richcompare): Updated comment.
12918 (recpy_func_getset): New static object.
12919 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
12920 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
12921
12922 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12923
12924 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
12925 (btpy_object, btpy_insn_type, btpy_new): Remove.
12926 (btpy_list_object): Use gdb.RecordInstruction type instead of
12927 gdb.BtraceInstruction type.
12928 (btrace_insn_from_recpy_insn): New function.
12929 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
12930 btpy_new.
12931 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
12932 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
12933 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
12934 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
12935 instead of btpy_object.
12936 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12937 btpy_insn_data, btpy_insn_decode): Rename to ...
12938 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
12939 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
12940 recpy_bt_insn_decode): This. Also, use new helper functions.
12941 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
12942 recpy_insn_type.
12943 (btpy_insn_getset): Remove.
12944 (gdbpy_initialize_btrace): Remove code to initialize
12945 gdb.BtraceInstruction. Use recpy_element_object.
12946 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
12947 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
12948 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
12949 * python/py-record.c (recpy_insn_type): New static object.
12950 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
12951 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
12952 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
12953 New function.
12954 (recpy_insn_getset): New static object.
12955 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
12956 * python/py-record.h (recpy_element_object): New typedef.
12957 (recpy_insn_type, recpy_insn_new): New export.
12958
12959 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12960
12961 * py-record-btrace.c (btpy_insn_new): Removed.
12962 (btpy_insn_or_gap_new): New function.
12963 (btpy_insn_error): Removed.
12964 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12965 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
12966 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
12967 btpy_insn_or_gap_new instead of btpy_insn_new.
12968 (btpy_insn_getset): Remove btpy_insn_error.
12969 * py-record.c (recpy_gap_type): New static object.
12970 (recpy_gap_object): New typedef.
12971 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
12972 recpy_gap_reason_string): New function.
12973 (recpy_gap_getset): New static object.
12974 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
12975 * py-record.h (recpy_gap_new): New export.
12976
12977 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12978
12979 * python/py-record.c (recpy_ptid): Remove.
12980 (recpy_record_getset): Remove recpy_ptid.
12981
12982 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12983
12984 * btrace.c (btrace_fetch): Set inferior_ptid.
12985 * python/py-record-btrace.c: Add "py-record.h" include.
12986 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
12987 recpy_bt_end, recpy_bt_instruction_history,
12988 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
12989 in gdb.Record object instead of current ptid.
12990 * python/py-record.c: Include new "py-record.h" file.
12991 (recpy_record_object): Moved to py-record.h.
12992 * python/py-record.h: New file.
12993
12994 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12995
12996 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
12997 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
12998 indentation.
12999
13000 2017-05-01 Joel Brobecker <brobecker@adacore.com>
13001
13002 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
13003 the past maintainers section.
13004
13005 2017-04-28 Yao Qi <yao.qi@linaro.org>
13006
13007 * infcmd.c (get_return_value): Use regcache ctor, and remove
13008 cleanup.
13009
13010 2017-04-28 Yao Qi <yao.qi@linaro.org>
13011 Pedro Alves <palves@redhat.com>
13012
13013 * regcache.c (regcache::regcache): New tag dispatch ctor.
13014 (do_cooked_read): Moved above.
13015 (regcache_dup): Use the tag dispatch ctor..
13016 * regcache.h (regcache): Declare ctor, delete copy ctor and
13017 assignment operator, remove friend regcache_dup.
13018
13019 2017-04-28 Yao Qi <yao.qi@linaro.org>
13020
13021 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
13022 call method save instead of regcache_cpy.
13023 * regcache.h (struct regcache): Make regcache_dup a friend.
13024
13025 2017-04-28 Yao Qi <yao.qi@linaro.org>
13026
13027 * regcache.c (struct regcache): Move to regcache.h
13028 (regcache::arch): New method.
13029 (regcache_get_ptid): Update.
13030 (get_regcache_arch): Call arch method.
13031 (get_regcache_aspace): Call method aspace.
13032 (register_buffer): Change it to method.
13033 (regcache_save): Change it to regcache::save.
13034 (regcache_restore): Likewise.
13035 (regcache_cpy_no_passthrough): Remove the declaration.
13036 (regcache_cpy): Call methods restore and cpy_no_passthrough.
13037 (regcache_cpy_no_passthrough): Change it to method
13038 cpy_no_passthrough.
13039 (regcache_register_status): Change it to method
13040 get_register_status.
13041 (regcache_invalidate): Change it to method invalidate.
13042 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
13043 (regcache_raw_update): Change it to method raw_update.
13044 (regcache_raw_read): Likewise.
13045 (regcache_raw_read_signed): Likewise.
13046 (regcache_raw_read_unsigned): Likewise.
13047 (regcache_raw_write_signed): Likewise.
13048 (regcache_raw_write_unsigned): Likewise.
13049 (regcache_cooked_read): Likewise.
13050 (regcache_cooked_read_value): Likewise.
13051 (regcache_cooked_read_signed): Likewise.
13052 (regcache_cooked_read_unsigned): Likewise.
13053 (regcache_cooked_write_signed): Likewise.
13054 (regcache_cooked_write_unsigned): Likewise.
13055 (regcache_raw_set_cached_value): Likewise.
13056 (regcache_raw_write): Likewise.
13057 (regcache_cooked_write): Likewise.
13058 (regcache_xfer_part): Likewise.
13059 (regcache_raw_read_part): Likewise.
13060 (regcache_raw_write_part): Likewise.
13061 (regcache_cooked_read_part): Likewise.
13062 (regcache_cooked_write_part): Likewise.
13063 (regcache_raw_supply): Likewise.
13064 (regcache_raw_collect): Likewise.
13065 (regcache_transfer_regset): Likewise.
13066 (regcache_supply_regset): Likewise.
13067 (regcache_collect_regset): Likewise.
13068 (regcache_debug_print_register): Likewise.
13069 (enum regcache_dump_what): Move it to regcache.h.
13070 (regcache_dump): Change it to method dump.
13071 * regcache.h (enum regcache_dump_what): New.
13072 (class regcache): New.
13073 * target.c (target_fetch_registers): Call method
13074 debug_print_register.
13075 (target_store_registers): Likewise.
13076
13077 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13078
13079 * windows-nat.c (struct lm_info_windows): Initialize field.
13080 (windows_make_so): Allocate lm_info_windows with new.
13081 (windows_free_so): Free lm_info_windows with delete.
13082
13083 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13084
13085 * solib-darwin.c (struct lm_info_darwin): Initialize field.
13086 (darwin_current_sos): Allocate lm_info_darwin with new, remove
13087 cleanup.
13088 (darwin_free_so): Free lm_info_darwin with delete.
13089
13090 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13091
13092 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
13093 <l_addr_p>: Change type to bool.
13094 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
13095 (svr4_free_so): Free lm_info_svr4 with delete.
13096 (svr4_copy_library_list): Replace memcpy with call to copy
13097 constructor.
13098 (library_list_start_library, svr4_default_sos): Allocate
13099 lm_info_svr4 with new.
13100
13101 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13102
13103 * solib-target.c (struct lm_info_target): Add destructor,
13104 initialize fields.
13105 <name>: Change type to std::string.
13106 (library_list_start_library): Allocate lm_info_target with new.
13107 (solib_target_free_library_list): Free lm_info_target with
13108 delete.
13109 (solib_target_current_sos): Adapt to std::string.
13110 (solib_target_free_so): Free lm_info_target with delete.
13111
13112 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13113
13114 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
13115 fields.
13116 (frv_current_sos): Allocate lm_info_frv with new.
13117 (frv_relocate_main_executable): Free lm_info_frv with delete,
13118 allocate with new.
13119 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
13120
13121 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13122
13123 * solib-frv.c (struct lm_info_frv): Fix indentation.
13124
13125 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13126
13127 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
13128 map field.
13129 (dsbt_current_sos): Allocate lm_info_dsbt with new.
13130 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
13131 and allocate with new.
13132 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
13133
13134 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13135
13136 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
13137 <filename, member_name>: Change type to std::string.
13138 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
13139 (library_list_start_library): Allocate lm_info_aix with new.
13140 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
13141 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
13142 with copy constructor.
13143
13144 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13145
13146 * solist.h (struct lm_info): Remove.
13147 (struct lm_info_base): New class.
13148 (struct so_list) <lm_info>: Change type to lm_info_base *.
13149 * nto-tdep.c (struct lm_info): Remove.
13150 (lm_addr): Adjust.
13151 * solib-aix.c (struct lm_info): Rename to ...
13152 (struct lm_info_aix): ... this. Extend lm_info_base.
13153 (lm_info_p): Rename to ...
13154 (lm_info_aix_p): ... this, and adjust.
13155 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
13156 solib_aix_parse_libraries, library_list_start_library,
13157 solib_aix_free_library_list, solib_aix_parse_libraries,
13158 solib_aix_get_library_list,
13159 solib_aix_relocate_section_addresses, solib_aix_free_so,
13160 solib_aix_get_section_offsets,
13161 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
13162 Adjust.
13163 (struct solib_aix_inferior_data) <library_list>: Adjust.
13164 * solib-darwin.c (struct lm_info): Rename to ...
13165 (struct lm_info_darwin): ... this. Extend lm_info_base.
13166 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
13167 * solib-dsbt.c (struct lm_info): Rename to ...
13168 (struct lm_info_dsbt): ... this. Extend lm_info_base.
13169 (struct dsbt_info) <main_executable_lm_info): Adjust.
13170 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
13171 dsbt_relocate_section_addresses): Adjust.
13172 * solib-frv.c (struct lm_info): Rename to ...
13173 (struct lm_info_frv): ... this. Extend lm_info_base.
13174 (main_executable_lm_info): Adjust.
13175 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
13176 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
13177 find_canonical_descriptor_in_load_object,
13178 frv_fdpic_find_canonical_descriptor): Adjust.
13179 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
13180 to lm_info_svr4.
13181 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
13182 svr4_clear_so, svr4_copy_library_list,
13183 library_list_start_library, svr4_default_sos, svr4_read_so_list,
13184 svr4_current_sos, svr4_fetch_objfile_link_map,
13185 solist_update_incremental): Adjust.
13186 * solib-svr4.h (struct lm_info_svr4): Move here from
13187 solib-svr4.c.
13188 * solib-target.c (struct lm_info): Rename to ...
13189 (struct lm_info_target): ... this. Extend lm_info_base.
13190 (lm_info_p): Rename to ...
13191 (lm_info_target_p): ... this.
13192 (solib_target_parse_libraries, library_list_start_segment,
13193 library_list_start_section, library_list_start_library,
13194 library_list_end_library, solib_target_free_library_list,
13195 solib_target_current_sos, solib_target_free_so,
13196 solib_target_relocate_section_addresses): Adjust.
13197 * windows-nat.c (struct lm_info): Rename to ...
13198 (struct lm_info_windows): ... this. Extend lm_info_base.
13199 (windows_make_so, handle_load_dll, handle_unload_dll,
13200 windows_xfer_shared_libraries): Adjust.
13201
13202 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13203
13204 * solib-darwin.c (struct darwin_so_list): Remove.
13205 (darwin_current_sos): Allocate an so_list object instead of a
13206 darwin_so_list, separately allocate an lm_info object.
13207 (darwin_free_so): Free lm_info.
13208
13209 2017-04-28 John Baldwin <jhb@FreeBSD.org>
13210
13211 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
13212 with fprintf_filtered.
13213
13214 2017-04-28 Yao Qi <yao.qi@linaro.org>
13215
13216 * regcache.c (regcache::regcache): New function.
13217 (regcache::~regcache): New function.
13218 (regcache_xmalloc_1): Remove.
13219 (regcache_xmalloc): Call new regcache.
13220 (regcache_xfree): Call delete regcache.
13221 (get_thread_arch_aspace_regcache): Call new regcache.
13222
13223 2017-04-28 Yao Qi <yao.qi@linaro.org>
13224
13225 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
13226 lwp instead of ptid_get_lwp.
13227
13228 2017-04-28 Yao Qi <yao.qi@linaro.org>
13229
13230 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
13231 lwp_info instead of getting from inferior_ptid.
13232
13233 2017-04-27 Keith Seitz <keiths@redhat.com>
13234
13235 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
13236 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
13237 (CV_CONVERSION_BADNESS): Define.
13238 (rank_one_type): Remove overly restrictive rvalue reference
13239 rank checks.
13240 Add cv-qualifier checks and subranks for type equality.
13241 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
13242 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
13243 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
13244
13245 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
13246
13247 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
13248 count when creating the object.
13249
13250 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
13251 Ulrich Weigand <uweigand@de.ibm.com>
13252
13253 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
13254 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
13255 is used in AIX.
13256 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
13257 (process_xcoff_symbol): Likewise.
13258 (scan_xcoff_symtab): Likewise.
13259
13260 2017-04-26 Alan Hayward <alan.hayward@arm.com>
13261
13262 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
13263 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
13264 (ia64_access_reg): Use get_frame_register_unsigned.
13265 (ia64_access_rse_reg): Likewise.
13266 (ia64_libunwind_frame_prev_register): Likewise.
13267
13268 2017-04-26 Jiong Wang <jiong.wang@arm.com>
13269
13270 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
13271 * gdbarch.c: Regenerated.
13272 * gdbarch.h: Regenerated.
13273 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
13274 visibility external.
13275 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
13276 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
13277 (enum cfa_how_kind): Move to ...
13278 (struct dwarf2_frame_state_reg_info): Likewise.
13279 (struct dwarf2_frame_state): Likewise.
13280 * dwarf2-frame.h: ... here.
13281 (dwarf2_frame_state_alloc_regs): New declaration.
13282 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
13283 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
13284
13285 2017-04-26 Alan Hayward <alan.hayward@arm.com>
13286
13287 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
13288 regcache_raw_read_unsigned.
13289 (xtensa_pseudo_register_write): Likewise.
13290
13291 2017-04-26 Alan Hayward <alan.hayward@arm.com>
13292
13293 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
13294 (nds32_pseudo_register_write): Likewise.
13295
13296 2017-04-25 Yao Qi <yao.qi@linaro.org>
13297
13298 * regcache.c (struct regcache) <readonly_p>: Change its type
13299 to bool.
13300 (regcache_xmalloc_1): Update parameter type and callers update.
13301
13302 2017-04-25 Yao Qi <yao.qi@linaro.org>
13303
13304 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
13305 set_gdbarch_wchar_bit.
13306 * arm-tdep.c (arm_gdbarch_init): Likewise.
13307
13308 2017-04-25 Pedro Alves <palves@redhat.com>
13309
13310 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
13311 (BothAreRelocatable, memcopy, memmove): Don't define.
13312 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
13313 macros.
13314
13315 2017-04-25 Pedro Alves <palves@redhat.com>
13316
13317 * common/common-defs.h: Include "common/poison.h".
13318 * common/function-view.h: (Not, Or, Requires): Move to traits.h
13319 and adjust.
13320 * common/poison.h: New file.
13321 * common/traits.h: Include <type_traits>.
13322 (Not, Or, Requires): New, moved from common/function-view.h.
13323
13324 2017-04-25 Pedro Alves <palves@redhat.com>
13325
13326 * breakpoint.h (struct breakpoint): In-class initialize all
13327 fields. Make boolean fields "bool".
13328 * breakpoint.c (init_raw_breakpoint_without_location): Remove
13329 memset call and initializations no longer necessary.
13330
13331 2017-04-25 Pedro Alves <palves@redhat.com>
13332
13333 * btrace.c (pt_btrace_insn_flags): Change parameter type to
13334 reference.
13335 (pt_btrace_insn): New function.
13336 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
13337
13338 2017-04-25 Pedro Alves <palves@redhat.com>
13339
13340 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
13341 "base" field and inherit from "bp_location" instead. Add
13342 non-default ctor.
13343 (allocate_location_exception): Use new non-default ctor.
13344 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
13345 (init_bp_location): Convert to ...
13346 (bp_location::bp_location): ... this new ctor, and remove memset
13347 call.
13348 (base_breakpoint_allocate_location): Use the new non-default ctor.
13349 * breakpoint.h (bp_location): Now a class. Declare default and
13350 non-default ctors. In-class initialize all members.
13351 (init_bp_location): Remove declaration.
13352
13353 2017-04-25 Pedro Alves <palves@redhat.com>
13354
13355 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
13356 assignment operator.
13357
13358 2017-04-24 Yao Qi <yao.qi@linaro.org>
13359
13360 * doublest.c (convert_doublest_to_floatformat): Call
13361 floatformat_totalsize_bytes.
13362
13363 2017-04-22 Tom Tromey <tom@tromey.com>
13364
13365 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
13366 ui_out_emit_list.
13367 * stack.c (print_frame): Use ui_out_emit_list.
13368 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13369 ui_out_emit_list.
13370 * mi/mi-main.c (print_one_inferior)
13371 (mi_cmd_data_list_register_names)
13372 (mi_cmd_data_list_register_values, mi_cmd_list_features)
13373 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
13374 ui_out_emit_list.
13375 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
13376 (mi_output_solib_attribs): Use ui_out_emit_list,
13377 ui_out_emit_tuple.
13378 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
13379 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
13380 (mi_cmd_stack_list_args, list_args_or_locals): Use
13381 ui_out_emit_list.
13382 * disasm.c (do_assembly_only): Use ui_out_emit_list.
13383 * breakpoint.c (print_solib_event, output_thread_groups): Use
13384 ui_out_emit_list.
13385
13386 2017-04-22 Tom Tromey <tom@tromey.com>
13387
13388 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
13389 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
13390 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
13391
13392 2017-04-22 Tom Tromey <tom@tromey.com>
13393
13394 * tracepoint.c (tvariables_info_1)
13395 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
13396
13397 2017-04-22 Tom Tromey <tom@tromey.com>
13398
13399 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
13400 annotate_arg_emitter.
13401 * breakpoint.c (print_mention_watchpoint)
13402 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
13403 * annotate.h (struct annotate_arg_emitter): New.
13404
13405 2017-04-22 Tom Tromey <tom@tromey.com>
13406
13407 * record-btrace.c (record_btrace_insn_history)
13408 (record_btrace_insn_history_range, record_btrace_call_history)
13409 (record_btrace_call_history_range): Use ui_out_emit_tuple.
13410 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
13411 ui_out_emit_tuple.
13412 * stack.c (print_frame_info): Use ui_out_emit_tuple.
13413 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
13414 * skip.c (skip_info): Use ui_out_emit_tuple.
13415 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
13416 * progspace.c (print_program_space): Use ui_out_emit_tuple.
13417 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
13418 * osdata.c (info_osdata): Use ui_out_emit_tuple.
13419 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13420 ui_out_emit_tuple.
13421 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
13422 (output_register, mi_cmd_data_read_memory)
13423 (mi_cmd_data_read_memory_bytes, mi_load_progress)
13424 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
13425 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
13426 Use ui_out_emit_tuple.
13427 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
13428 ui_out_emit_tuple.
13429 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13430 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
13431 * linux-thread-db.c (info_auto_load_libthread_db): Use
13432 ui_out_emit_tuple.
13433 * inferior.c (print_inferior): Use ui_out_emit_tuple.
13434 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
13435 * disasm.c (do_mixed_source_and_assembly_deprecated)
13436 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
13437 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
13438 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
13439 * breakpoint.c (print_one_breakpoint_location)
13440 (print_one_breakpoint): Use ui_out_emit_tuple.
13441 * auto-load.c (print_script, info_auto_load_cmd): Use
13442 ui_out_emit_tuple.
13443 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
13444
13445 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
13446
13447 * thread.c (print_thread_info_1): Remove dead code.
13448
13449 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13450
13451 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
13452 GDB_SELF_TEST.
13453 * arm-tdep.c (selftests::arm_record_test): Likewise.
13454
13455 2017-04-21 Yao Qi <yao.qi@linaro.org>
13456
13457 * regcache.c (regcache_restore): Remove argument 2. Replace
13458 argument 3 with regcache. Get register status from
13459 src->register_status and get register contents from
13460 register_buffer (src, regnum).
13461 (regcache_cpy): Update.
13462
13463 2017-04-19 Pedro Alves <palves@redhat.com>
13464
13465 * gdbthread.h (thread): Add missing closing parenthesis in
13466 comment.
13467
13468 2017-04-19 Pedro Alves <palves@redhat.com>
13469
13470 * common/refcounted-object.h: New file.
13471 * gdbthread.h: Include "common/refcounted-object.h".
13472 (thread_info): Inherit from refcounted_object and add comments.
13473 (thread_info::incref, thread_info::decref)
13474 (thread_info::m_refcount): Delete.
13475 (thread_info::deletable): Use the refcounted_object::refcount()
13476 method.
13477 * inferior.c (current_inferior_): Add comment.
13478 (set_current_inferior): Increment/decrement refcounts.
13479 (prune_inferiors, remove_inferior_command): Skip inferiors marked
13480 not-deletable instead of comparing with the current inferior.
13481 (initialize_inferiors): Increment the initial inferior's refcount.
13482 * inferior.h (struct inferior): Forward declare.
13483 Include "common/refcounted-object.h".
13484 (current_inferior, set_current_inferior): Move declaration to
13485 before struct inferior's definition, and fix comment.
13486 (inferior): Inherit from refcounted_object. Add comments.
13487 * thread.c (switch_to_thread_no_regs): Reference the thread's
13488 inferior pointer directly instead of doing a ptid lookup.
13489 (switch_to_no_thread): New function.
13490 (switch_to_thread(thread_info *)): New function, factored out
13491 from ...
13492 (switch_to_thread(ptid_t)): ... this.
13493 (restore_current_thread): Delete.
13494 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
13495 fields, and add 'inf' field.
13496 (do_restore_current_thread_cleanup): Check whether old->inf is
13497 alive instead of looking up an inferior by ptid. Use
13498 switch_to_thread and switch_to_no_thread.
13499 (restore_current_thread_cleanup_dtor): Use old->inf directly
13500 instead of lookup up an inferior by id. Decref the inferior.
13501 Don't restore 'removable'.
13502 (make_cleanup_restore_current_thread): Same the inferior pointer
13503 in old, instead of the inferior number. Incref the inferior.
13504 Don't save/clear 'removable'.
13505
13506 2017-04-19 Pedro Alves <palves@redhat.com>
13507
13508 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13509 unittests/scoped_restore-selftests.c.
13510 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
13511 * common/scoped_restore.h (scoped_restore_base): Make "class".
13512 (scoped_restore_base::release): New public method.
13513 (scoped_restore_base::scoped_restore_base): New protected ctor.
13514 (scoped_restore_base::m_saved_var): New protected field.
13515 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
13516 scoped_restore_base base class instead of m_saved_var directly.
13517 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
13518 (scoped_restore_tmpl::scoped_restore_tmpl(const
13519 scoped_restore_tmpl<T>&)): Likewise.
13520 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
13521 method.
13522 (scoped_restore_tmpl::saved_var): New method.
13523 (scoped_restore_tmpl::m_saved_var): Delete.
13524 * inferior.h (inferior::detaching): Now a bool.
13525 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
13526 cleanup.
13527 * unittests/scoped_restore-selftests.c: New file.
13528
13529 2017-04-19 Pedro Alves <palves@redhat.com>
13530
13531 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
13532 Re-sort in alphabetic order.
13533
13534 2017-04-18 Pedro Alves <palves@redhat.com>
13535
13536 * xml-support.c (obstack_xml_printf): Delete.
13537 * xml-support.h (obstack_xml_printf): Delete.
13538
13539 2017-04-18 Pedro Alves <palves@redhat.com>
13540
13541 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
13542 vdebug, verror, body_text, start_element, end_element, name,
13543 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
13544 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
13545 is_xinclude>: Make private and add m_ prefix.
13546 (gdb_xml_parser::body_text): New method, based on ...
13547 (gdb_xml_body_text): ... this. Adjust.
13548 (gdb_xml_parser::vdebug): New method, based on ...
13549 (gdb_xml_debug): ... this. Adjust.
13550 (gdb_xml_parser::verror): New method, based on ...
13551 (gdb_xml_error): ... this. Adjust.
13552 (gdb_xml_parser::start_element): New method, based on ...
13553 (gdb_xml_start_element): ... this. Adjust.
13554 (gdb_xml_start_element_wrapper): Defer to
13555 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
13556 (gdb_xml_parser::end_element): New method, based on ...
13557 (gdb_xml_end_element_wrapper): ... this. Adjust.
13558 (gdb_xml_parser::~gdb_xml_parser): Adjust.
13559 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
13560 (gdb_xml_parser::use_dtd): New method, based on ...
13561 (gdb_xml_use_dtd): ... this. Adjust.
13562 (gdb_xml_parser::parse): New method, based on ...
13563 (gdb_xml_parse): ... this. Adjust.
13564 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
13565 (xinclude_start_include): Adjust to call the parser's name method.
13566 (xml_xinclude_default, xml_xinclude_start_doctype)
13567 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
13568 method.
13569 (xml_process_xincludes): Adjust to call parser methods.
13570 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
13571 declarations.
13572
13573 2017-04-18 Pedro Alves <palves@redhat.com>
13574
13575 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
13576 gdb::optional<std::string>.
13577 * xml-support.c: Include <string>.
13578 (scope_level::scope_level(scope_level &&))
13579 (scope_level::~scope_level): Delete.
13580 (scope_level::body): Now a std::string.
13581 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
13582 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
13583 parameter.
13584 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
13585 (xinclude_parsing_data::output): Now a std::string reference.
13586 (xinclude_start_include): Adjust.
13587 (xml_xinclude_default): Adjust.
13588 (xml_process_xincludes): Add 'output' parameter, and return bool.
13589 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
13590 and return bool.
13591 * xml-tdesc.c: Include <unordered_map> and <string>.
13592 (tdesc_xml_cache): Delete.
13593 (tdesc_xml_cache_s): Delete.
13594 (xml_cache): Now an std::unordered_map.
13595 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
13596 (target_fetch_description_xml): Change return type to
13597 gdb::optional<std::string>, and adjust.
13598 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
13599 (target_fetch_description_xml): Change return type to
13600 gdb::optional<std::string>.
13601
13602 2017-04-18 Pedro Alves <palves@redhat.com>
13603
13604 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13605 unittests/optional-selftests.c.
13606 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
13607 * unittests/optional-selftests.c: New file.
13608 * unittests/optional/assignment/1.cc: New file.
13609 * unittests/optional/assignment/2.cc: New file.
13610 * unittests/optional/assignment/3.cc: New file.
13611 * unittests/optional/assignment/4.cc: New file.
13612 * unittests/optional/assignment/5.cc: New file.
13613 * unittests/optional/assignment/6.cc: New file.
13614 * unittests/optional/assignment/7.cc: New file.
13615 * unittests/optional/cons/copy.cc: New file.
13616 * unittests/optional/cons/default.cc: New file.
13617 * unittests/optional/cons/move.cc: New file.
13618 * unittests/optional/cons/value.cc: New file.
13619 * unittests/optional/in_place.cc: New file.
13620 * unittests/optional/observers/1.cc: New file.
13621 * unittests/optional/observers/2.cc: New file.
13622
13623 2017-04-18 Pedro Alves <palves@redhat.com>
13624
13625 * common/gdb_optional.h: Include common/traits.h.
13626 (in_place_t): New type.
13627 (in_place): New constexpr variable.
13628 (optional::optional): Remove member initialization of
13629 m_instantiated.
13630 (optional::optional(in_place_t...)): New constructor.
13631 (optional::~optional): Use reset.
13632 (optional::optional(const optional&)): New.
13633 (optional::optional(const optional&&)): New.
13634 (optional::optional(T &)): New.
13635 (optional::optional(T &&)): New.
13636 (operator::operator=(const optional &)): New.
13637 (operator::operator=(optional &&)): New.
13638 (operator::operator= (const T &))
13639 (operator::operator= (T &&))
13640 (operator::emplace (Args &&... args)): Return a T&. Use reset.
13641 (operator::reset): New.
13642 (operator::m_instantiated):: Add in-class initializer.
13643 * common/traits.h: Include <type_traits>.
13644 (struct And): New types.
13645
13646 2017-04-18 Pedro Alves <palves@redhat.com>
13647
13648 * xml-support.c: Include <vector>.
13649 (scope_level::scope_level(const gdb_xml_element *))
13650 (scope_level::scope_level(scope_level&&)): New.
13651 (scope_level::~scope_level): New.
13652 (scope_level_s): Delete.
13653 (gdb_xml_parser::scopes): Now a std::vector.
13654 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
13655 Use std::vector.
13656 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
13657 scope cleanup code.
13658 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
13659 of the scopes member. Use std::vector::emplace_back.
13660
13661 2017-04-18 Pedro Alves <palves@redhat.com>
13662
13663 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
13664 a bool.
13665 (gdb_xml_end_element): Change type of first parameter.
13666 (gdb_xml_cleanup): Rename to ...
13667 (gdb_xml_parser::~gdb_xml_parser): ... this.
13668 (gdb_xml_create_parser_and_cleanup): Delete with ...
13669 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
13670 to this new ctor.
13671 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
13672 using gdb_xml_create_parser_and_cleanup.
13673 (xinclude_parsing_data): Add ctor/dtor.
13674 (xml_xinclude_cleanup): Delete.
13675 (xml_process_xincludes): Create a local xinclude_parsing_data
13676 instead of heap-allocating one. Create a local gdb_xml_parser
13677 instead of heap-allocating one with
13678 gdb_xml_create_parser_and_cleanup.
13679
13680 2017-04-18 John Baldwin <jhb@FreeBSD.org>
13681
13682 PR threads/20743
13683 * fbsd-nat.c (resume_one_thread_cb): Remove.
13684 (resume_all_threads_cb): Remove.
13685 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
13686 iterate_over_threads.
13687
13688 2017-04-17 Joel Brobecker <brobecker@adacore.com>
13689
13690 * NEWS: Create a new section for the next release branch.
13691 Rename the section of the current branch, now that it has
13692 been cut.
13693
13694 2017-04-17 Joel Brobecker <brobecker@adacore.com>
13695
13696 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
13697 * version.in: Bump version to 8.0.50.DATE-git.
13698
13699 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
13700
13701 PR gdb/21385
13702 * windows-nat.c (windows_create_inferior): Declare 'allargs'
13703 independently of the host, and fix build breakage on Cygwin.
13704
13705 2017-04-13 Pedro Alves <palves@redhat.com>
13706
13707 * inferior.c (free_inferior): Convert to ...
13708 (inferior::~inferior): ... this dtor.
13709 (inferior::inferior): New ctor, factored out from ...
13710 (add_inferior_silent): ... here. Allocate the inferior with a new
13711 expression.
13712 (delete_inferior): Call delete instead of free_inferior.
13713 * inferior.h (gdb_environ, continuation): Forward declare.
13714 (inferior): Now a class. Add in-class initialization to all
13715 members. Make boolean fields bool, except 'detaching'.
13716 (inferior::inferior): New explicit ctor.
13717 (inferior::~inferior): New.
13718
13719 2017-04-13 Pedro Alves <palves@redhat.com>
13720
13721 * inferior.c (init_inferior_list): Delete.
13722 * inferior.h (init_inferior_list): Delete.
13723
13724 2017-04-13 Pedro Alves <palves@redhat.com>
13725
13726 PR threads/13217
13727 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
13728 (top level): Call it twice, with different thread sets.
13729
13730 2017-04-13 Pedro Alves <palves@redhat.com>
13731
13732 * thread.c: Include <algorithm>.
13733 (thread_array_cleanup): Delete.
13734 (scoped_inc_dec_ref): New class.
13735 (live_threads_count): New function.
13736 (set_thread_refcount): Delete.
13737 (tp_array_compar_ascending): Now a bool.
13738 (tp_array_compar): Convert to a std::sort comparison function.
13739 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
13740 and live_threads_count.
13741
13742 2017-04-13 Pedro Alves <palves@redhat.com>
13743
13744 * infrun.c (follow_fork_inferior): Also switch the current
13745 inferior.
13746
13747 2017-04-13 Pedro Alves <palves@redhat.com>
13748
13749 * breakpoint.c (watch_command_1): Save watchpoint-frame info
13750 before calling create_internal_breakpoint.
13751
13752 2017-04-13 Pedro Alves <palves@redhat.com>
13753
13754 * fork-child.c (execv_argv): New class.
13755 (breakup_args): Refactored as ...
13756 (execv_argv::init_for_no_shell): .. this method of execv_argv.
13757 Copy arguments to storage and replace separators with NULL
13758 terminators in place.
13759 (escape_bang_in_quoted_argument): Adjust to return bool.
13760 (execv_argv::execv_argv): New ctor.
13761 (execv_argv::init_for_shell): New method, factored out from
13762 fork_inferior. Don't strdup strings into the vector.
13763 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
13764 Remove free_vector_argv call.
13765
13766 2017-04-13 Yao Qi <yao.qi@linaro.org>
13767
13768 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
13769 tdep->rx_psw_type.
13770
13771 2017-04-13 Yao Qi <yao.qi@linaro.org>
13772
13773 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
13774 * rx-tdep.c (rx_gdbarch_init): Likewise.
13775
13776 2017-04-13 Pedro Alves <palves@redhat.com>
13777
13778 * breakpoint.h (struct breakpoint): Reindent.
13779
13780 2017-04-13 Pedro Alves <palves@redhat.com>
13781
13782 * breakpoint.c (bp_location): Rename to ...
13783 (bp_locations): ... this. All references updated.
13784 (bp_location_count): Rename to ...
13785 (bp_locations_count): ... this. All references updated.
13786 (bp_location_placed_address_before_address_max): Rename to ...
13787 (bp_locations_placed_address_before_address_max): ... this. All
13788 references updated.
13789 (bp_location_shadow_len_after_address_max): Rename to ...
13790 (bp_locations_shadow_len_after_address_max): ... this. All
13791 references updated.
13792 (bp_location_compare_addrs): Rename to ...
13793 (bp_locations_compare_addrs): ... this. All references updated.
13794 (bp_location_compare):Rename to ...
13795 (bp_locations_compare): ... this. All references updated.
13796 (bp_location_target_extensions_update): Rename to ...
13797 (bp_locations_target_extensions_update): ... this. All references
13798 updated.
13799
13800 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13801
13802 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
13803 * common/common.m4: Check headers 'termios.h', 'termio.h' and
13804 'sgtty.h'.
13805 * common/gdb_termios.h: New file, with parts of "terminal.h".
13806 * inflow.c: Include "gdb_termios.h".
13807 * ser-unix.c: Include "gdb_termios.h".
13808 * terminal.h: Move terminal-related defines to
13809 "common/gdb_termios.h".
13810
13811 2017-04-12 Tom Tromey <tom@tromey.com>
13812
13813 * probe.c (parse_probes): Update.
13814 * location.h (delete_event_location): Don't declare.
13815 (event_location_deleter::operator()): Update.
13816 * location.c (event_location_deleter::operator()): Rename from
13817 delete_event_location.
13818 * linespec.h (linespec_result) <location>: Change type to
13819 event_location_up.
13820 * linespec.c (canonicalize_linespec, event_location_to_sals)
13821 (decode_objc): Update.
13822 (linespec_result): Don't call delete_event_location.
13823 * breakpoint.c (create_breakpoints_sal)
13824 (bkpt_probe_create_sals_from_location)
13825 (strace_marker_create_sals_from_location): Update.
13826
13827 2017-04-12 Tom Tromey <tom@tromey.com>
13828
13829 * linespec.h (struct linespec_result): Add constructor and
13830 destructor.
13831 (init_linespec_result, destroy_linespec_result)
13832 (make_cleanup_destroy_linespec_result): Don't declare.
13833 * linespec.c (init_linespec_result): Remove.
13834 (linespec_result::~linespec_result): Rename from
13835 destroy_linespec_result. Update.
13836 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
13837 Remove.
13838 * breakpoint.c (create_breakpoint, break_range_command)
13839 (decode_location_default): Update.
13840 * ax-gdb.c (agent_command_1): Update.
13841
13842 2017-04-12 Tom Tromey <tom@tromey.com>
13843
13844 * remote.c (remote_download_tracepoint): Update.
13845 * python/py-breakpoint.c (bppy_get_location): Update.
13846 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
13847 (gdbscm_breakpoint_location): Update.
13848 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
13849 * breakpoint.h (struct breakpoint) <location, location_range_end>:
13850 Change type to event_location_up.
13851 * breakpoint.c (create_overlay_event_breakpoint)
13852 (create_longjmp_master_breakpoint)
13853 (create_std_terminate_master_breakpoint)
13854 (create_exception_master_breakpoint)
13855 (breakpoint_event_location_empty_p, print_breakpoint_location)
13856 (print_one_breakpoint_location, create_thread_event_breakpoint)
13857 (init_breakpoint_sal, create_breakpoint)
13858 (print_recreate_ranged_breakpoint, break_range_command)
13859 (init_ada_exception_breakpoint, say_where): Update.
13860 (base_breakpoint_dtor): Don't call delete_event_location.
13861 (bkpt_print_recreate, tracepoint_print_recreate)
13862 (dprintf_print_recreate, update_static_tracepoint)
13863 (breakpoint_re_set_default): Update.
13864
13865 2017-04-12 Tom Tromey <tom@tromey.com>
13866
13867 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
13868 type of "to_do". Update.
13869 (compute_stack_depth): Use std::vector.
13870
13871 2017-04-12 Tom Tromey <tom@tromey.com>
13872
13873 * printcmd.c (find_instruction_backward): Use std::vector.
13874
13875 2017-04-12 Tom Tromey <tom@tromey.com>
13876
13877 * symfile.c (objfilep): Remove typedef.
13878 (reread_symbols): Use a std::vector.
13879
13880 2017-04-12 Tom Tromey <tom@tromey.com>
13881
13882 * mi/mi-main.c (exec_direction_forward): Remove.
13883 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
13884 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
13885 scoped_restore.
13886 * guile/guile.c (guile_repl_command, guile_command)
13887 (gdbscm_execute_gdb_command): Use scoped_restore.
13888 * go-exp.y (go_parse): Use scoped_restore.
13889 * d-exp.y (d_parse): Use scoped_restore.
13890 * cli/cli-decode.c (cmd_func): Use scoped_restore.
13891 * c-exp.y (c_parse): Use scoped_restore.
13892
13893 2017-04-12 Tom Tromey <tom@tromey.com>
13894
13895 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
13896 (mi_parse): Update return type.
13897 (mi_parse_free): Remove.
13898 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
13899 (mi_parse::~mi_parse): Rename from mi_parse_free.
13900 (mi_parse_cleanup): Remove.
13901 (mi_parse): Return a unique_ptr. Use new.
13902 * mi/mi-main.c (mi_execute_command): Update.
13903
13904 2017-04-12 Tom Tromey <tom@tromey.com>
13905
13906 * location.c (explicit_location_lex_one): Return a
13907 unique_xmalloc_ptr.
13908 (string_to_explicit_location): Update. Remove cleanups.
13909
13910 2017-04-12 Tom Tromey <tom@tromey.com>
13911
13912 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
13913 (compare_value_and_voffset): Change type. Update.
13914 (compute_vtable_size): Change type of "offset_vec".
13915 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
13916 (gnuv3_get_typeid): Remove extraneous declaration.
13917
13918 2017-04-12 Tom Tromey <tom@tromey.com>
13919
13920 * charset.h (wchar_iterator): Fix comment.
13921
13922 2017-04-12 Tom Tromey <tom@tromey.com>
13923
13924 * charset.c (iconv_wrapper): New class.
13925 (cleanup_iconv): Remove.
13926 (convert_between_encodings): Use it.
13927
13928 2017-04-12 Tom Tromey <tom@tromey.com>
13929
13930 * symfile.h (increment_reading_symtab): Update type.
13931 * symfile.c (decrement_reading_symtab): Remove.
13932 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
13933 * psymtab.c (psymtab_to_symtab): Update.
13934 * dwarf2read.c (dw2_instantiate_symtab): Update.
13935
13936 2017-04-12 Tom Tromey <tom@tromey.com>
13937
13938 * jit.c (struct jit_reader): Declare separately. Add constructor
13939 and destructor. Change type of "handle".
13940 (loaded_jit_reader): Define separately.
13941 (jit_reader_load): Update. New "new".
13942 (jit_reader_unload_command): Use "delete".
13943 * gdb-dlfcn.h (struct dlclose_deleter): New.
13944 (gdb_dlhandle_up): New typedef.
13945 (gdb_dlopen, gdb_dlsym): Update types.
13946 (gdb_dlclose): Remove.
13947 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
13948 (gdb_dlsym): Change type of "handle".
13949 (make_cleanup_dlclose): Remove.
13950 (dlclose_deleter::operator()): Rename from gdb_dlclose.
13951 * compile/compile-c-support.c (load_libcc): Update.
13952
13953 2017-04-12 Tom Tromey <tom@tromey.com>
13954
13955 * symtab.h (find_pcs_for_symtab_line): Change return type.
13956 * symtab.c (find_pcs_for_symtab_line): Change return type.
13957 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
13958 type of "vec". Update.
13959 (ltpy_get_pcs_for_line): Update.
13960 * linespec.c (decode_digits_ordinary): Update.
13961
13962 2017-04-12 Tom Tromey <tom@tromey.com>
13963
13964 * tracepoint.c (actions_command): Update.
13965 * python/python.c (python_command, python_interactive_command):
13966 Update.
13967 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
13968 * guile/guile.c (guile_command): Update.
13969 * defs.h (read_command_lines, read_command_lines_1): Return
13970 command_line_up.
13971 (command_lines_deleter): New struct.
13972 (command_line_up): New typedef.
13973 * compile/compile.c (compile_code_command)
13974 (compile_print_command): Update.
13975 * cli/cli-script.h (get_command_line, copy_command_lines): Return
13976 command_line_up.
13977 (make_cleanup_free_command_lines): Remove.
13978 * cli/cli-script.c (get_command_line, read_command_lines_1)
13979 (copy_command_lines): Return command_line_up.
13980 (while_command, if_command, read_command_lines, define_command)
13981 (document_command): Update.
13982 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
13983 Remove.
13984 * breakpoint.h (breakpoint_set_commands): Change type of
13985 "commands".
13986 * breakpoint.c (breakpoint_set_commands): Change type of
13987 "commands". Update.
13988 (do_map_commands_command, update_dprintf_command_list)
13989 (create_tracepoint_from_upload): Update.
13990
13991 2017-04-12 Tom Tromey <tom@tromey.com>
13992
13993 * tracepoint.c (scope_info): Update.
13994 * spu-tdep.c (spu_catch_start): Update.
13995 * python/python.c (gdbpy_decode_line): Update.
13996 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
13997 * python/py-breakpoint.c (bppy_init): Update.
13998 * probe.c (parse_probes): Update.
13999 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
14000 * location.h (event_location_deleter): New struct.
14001 (event_location_up): New typedef.
14002 (new_linespec_location, new_address_location, new_probe_location)
14003 (new_explicit_location, copy_event_location)
14004 (string_to_event_location, string_to_event_location_basic)
14005 (string_to_explicit_location): Update return type.
14006 (make_cleanup_delete_event_location): Remove.
14007 * location.c (new_linespec_location, new_address_location)
14008 (new_probe_location, new_explicit_location, copy_event_location):
14009 Return event_location_up.
14010 (delete_event_location_cleanup)
14011 (make_cleanup_delete_event_location): Remove.
14012 (string_to_explicit_location, string_to_event_location_basic)
14013 (string_to_event_location): Return event_location_up.
14014 * linespec.c (canonicalize_linespec, event_location_to_sals)
14015 (decode_line_with_current_source)
14016 (decode_line_with_last_displayed, decode_objc): Update.
14017 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
14018 * completer.c (location_completer): Update.
14019 * cli/cli-cmds.c (edit_command, list_command): Update.
14020 * breakpoint.c (create_overlay_event_breakpoint)
14021 (create_longjmp_master_breakpoint)
14022 (create_std_terminate_master_breakpoint)
14023 (create_exception_master_breakpoint)
14024 (create_thread_event_breakpoint): Update.
14025 (init_breakpoint_sal): Update. Remove some dead code.
14026 (create_breakpoint_sal): Change type of "location". Update.
14027 (create_breakpoints_sal, create_breakpoint, break_command_1)
14028 (dprintf_command, break_range_command, until_break_command)
14029 (init_ada_exception_breakpoint)
14030 (strace_marker_create_sals_from_location)
14031 (update_static_tracepoint, trace_command, ftrace_command)
14032 (strace_command, create_tracepoint_from_upload): Update.
14033 * break-catch-throw.c (re_set_exception_catchpoint): Update.
14034 * ax-gdb.c (agent_command_1): Update.
14035
14036 2017-04-12 Pedro Alves <palves@redhat.com>
14037
14038 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
14039 * configure.tgt: Handle i[34567]86-*-go32* and
14040 i[34567]86-*-msdosdjgpp*.
14041 * i386-tdep.c (i386_svr4_reg_to_regnum):
14042 Make extern.
14043 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
14044 i386-go32-tdep.c.
14045 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
14046 * i386-go32-tdep.c: New file.
14047 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
14048 declarations.
14049
14050 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
14051
14052 * aix-thread.c (pd_status2str): Change return type to const char *.
14053
14054 2017-04-12 Pedro Alves <palves@redhat.com>
14055
14056 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
14057 calls to set_gdbarch_gnu_triplet_regexp.
14058
14059 2017-04-12 Pedro Alves <palves@redhat.com>
14060
14061 PR gdb/21323
14062 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
14063 New enum value.
14064 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
14065 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
14066 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
14067 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
14068 * gdbarch.h, gdbarch.c: Regenerate.
14069 * aarch64-tdep.c (aarch64_gdbarch_init): Override
14070 gdbarch_wchar_bit and gdbarch_wchar_signed.
14071 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
14072 * arm-tdep.c (arm_gdbarch_init): Likewise.
14073 * avr-tdep.c (avr_gdbarch_init): Likewise.
14074 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
14075 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
14076 * i386-tdep.c (i386_go32_init_abi): Likewise.
14077 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
14078 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
14079 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
14080 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
14081 * sh-tdep.c (sh_gdbarch_init): Likewise.
14082 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
14083 * sparc64-tdep.c (sparc64_init_abi): Likewise.
14084 * windows-tdep.c (windows_init_abi): Likewise.
14085 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
14086
14087 2017-04-12 Pedro Alves <palves@redhat.com>
14088
14089 PR c++/21323
14090 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
14091 cplus_primitive_type_char32_t>: New enum values.
14092 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
14093 and cplus_primitive_type_char32_t.
14094 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
14095 32, use the archtecture's built-in type for char16_t and char32_t,
14096 respectively. Otherwise, fallback to init_integer_type as before,
14097 but make the type unsigned, and issue a complaint.
14098 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
14099
14100 2017-04-12 Alan Hayward <alan.hayward@arm.com>
14101
14102 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
14103 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
14104
14105 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
14106
14107 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
14108 'const char *'.
14109
14110 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
14111
14112 * common/common-utils.c (free_vector_argv): New function.
14113 * common/common-utils.h: Include <vector>.
14114 (free_vector_argv): New prototype.
14115 * darwin-nat.c (darwin_create_inferior): Rewrite function
14116 prototype in order to constify "exec_file" and accept a
14117 "std::string" for "allargs".
14118 * fork-child.c: Include <vector>.
14119 (breakup_args): Rewrite function, using C++.
14120 (fork_inferior): Rewrite function header, constify "exec_file_arg"
14121 and accept "std::string" for "allargs". Update the code to
14122 calculate "argv" based on "allargs". Update calls to "exec_fun"
14123 and "execvp".
14124 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
14125 order to constify "exec_file" and accept a "std::string" for
14126 "allargs".
14127 * go32-nat.c (go32_create_inferior): Likewise.
14128 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
14129 * infcmd.c (run_command_1): Constify "exec_file". Use
14130 "std::string" for inferior arguments.
14131 * inferior.h (fork_inferior): Update prototype.
14132 * linux-nat.c (linux_nat_create_inferior): Rewrite function
14133 prototype in order to constify "exec_file" and accept a
14134 "std::string" for "allargs".
14135 * nto-procfs.c (procfs_create_inferior): Likewise.
14136 * procfs.c (procfs_create_inferior): Likewise.
14137 * remote-sim.c (gdbsim_create_inferior): Likewise.
14138 * remote.c (extended_remote_run): Update code to accept
14139 "std::string" as argument.
14140 (extended_remote_create_inferior): Rewrite function prototype in
14141 order to constify "exec_file" and accept a "std::string" for
14142 "allargs".
14143 * rs6000-nat.c (super_create_inferior): Likewise.
14144 (rs6000_create_inferior): Likewise.
14145 * target.h (struct target_ops) <to_create_inferior>: Likewise.
14146 * windows-nat.c (windows_create_inferior): Likewise.
14147
14148 2017-04-11 Pedro Alves <palves@redhat.com>
14149
14150 * thread.c: Fix whitespace throughout.
14151
14152 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
14153
14154 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
14155
14156 2017-04-11 Alan Hayward <alan.hayward@arm.com>
14157
14158 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
14159
14160 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
14161
14162 PR gdb/21364
14163 * osdata.c (info_osdata): Check if 'type' is an empty string
14164 instead of NULL.
14165
14166 2017-04-10 Pedro Alves <palves@redhat.com>
14167
14168 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
14169 (ptid_to_global_thread_id, in_thread_list)
14170 (do_captured_list_thread_ids, set_resumed, set_running)
14171 (set_executing, set_stop_requested, finish_thread_state)
14172 (validate_registers_access, can_access_registers_ptid)
14173 (print_thread_info_1, switch_to_thread)
14174 (do_restore_current_thread_cleanup)
14175 (make_cleanup_restore_current_thread, thread_command)
14176 (thread_name_command): Use operator== instead of ptid_equal.
14177
14178 2017-04-10 Pedro Alves <palves@redhat.com>
14179
14180 * thread.c (struct current_thread_cleanup) <next>: Delete field.
14181 (current_thread_cleanup_chain): Delete.
14182 (restore_current_thread_cleanup_dtor)
14183 (make_cleanup_restore_current_thread): Remove references to
14184 current_thread_cleanup_chain.
14185
14186 2017-04-10 Alan Hayward <alan.hayward@arm.com>
14187
14188 * msp430-tdep.c (msp430_pseudo_register_read): Never return
14189 REG_UNKNOWN.
14190
14191 2017-04-10 Yao Qi <yao.qi@linaro.org>
14192
14193 PR gdb/19942
14194 * gdbthread.h (thread_info::deletable): New method.
14195 (thread_info::incref): New method.
14196 (thread_info::decref): New method.
14197 (thread_info::refcount): Move it to private.
14198 * infrun.c (save_stop_context): Call inc_refcount.
14199 (release_stop_context_cleanup): Likewise.
14200 * thread.c (set_thread_exited): New function.
14201 (init_thread_list): Delete "tp" only it is deletable, otherwise
14202 call set_thread_exited.
14203 (delete_thread_1): Call set_thread_exited.
14204 (current_thread_cleanup) <inferior_pid>: Remove.
14205 <thread>: New field.
14206 (restore_current_thread_ptid_changed): Removed.
14207 (do_restore_current_thread_cleanup): Adjust.
14208 (restore_current_thread_cleanup_dtor): Don't call
14209 find_thread_ptid.
14210 (set_thread_refcount): Use dec_refcount.
14211 (make_cleanup_restore_current_thread): Adjust.
14212 (thread_apply_all_command): Call inc_refcount.
14213 (_initialize_thread): Don't call
14214 observer_attach_thread_ptid_changed.
14215
14216 2017-04-10 Yao Qi <yao.qi@linaro.org>
14217
14218 * thread.c (delete_thread_1): Hoist code on marking thread as
14219 exited.
14220
14221 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
14222
14223 * windows-nat.c (windows_detach): Initialize ptid with
14224 minus_one_ptid.
14225
14226 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
14227
14228 * unittests/ptid-selftests.c: Fix erroneous assert messages.
14229
14230 2017-04-07 Alan Hayward <alan.hayward@arm.com>
14231
14232 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
14233 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
14234 (bfin_pseudo_register_write): Likewise
14235
14236 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
14237
14238 * common/ptid.h (struct ptid): Change to...
14239 (class ptid_t): ... this.
14240 <ptid_t>: New constructors.
14241 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
14242 matches>: New methods.
14243 <make_null, make_minus_one>: New static methods.
14244 <pid>: Rename to...
14245 <m_pid>: ...this.
14246 <lwp>: Rename to...
14247 <m_lwp>: ...this.
14248 <tid>: Rename to...
14249 <m_tid>: ...this.
14250 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
14251 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
14252 as references, move comment to class ptid_t.
14253 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
14254 ptid_t static methods.
14255 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
14256 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
14257 Take ptid arguments as references, implement using ptid_t methods.
14258 * unittests/ptid-selftests.c: New file.
14259 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14260 unittests/ptid-selftests.c.
14261 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
14262
14263 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
14264
14265 * python/python.c (python_run_simple_file): Cast mode literal to
14266 non-const char pointer as expected by PyFile_FromString.
14267
14268 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
14269
14270 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
14271 minus_one_ptid and null_ptid.
14272
14273 2017-04-05 Pedro Alves <palves@redhat.com>
14274
14275 * warning.m4 (build_warnings): Remove -Wno-write-strings.
14276 * configure: Regenerate.
14277
14278 2017-04-05 Pedro Alves <palves@redhat.com>
14279
14280 * ada-exp.y (yyerror): Constify.
14281 * ada-lang.c (bound_name, get_selections)
14282 (ada_variant_discrim_type)
14283 (ada_variant_discrim_name, ada_value_struct_elt)
14284 (ada_lookup_struct_elt_type, is_unchecked_variant)
14285 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
14286 (catch_ada_exception_command_split)
14287 (catch_ada_assert_command_split, catch_assert_command)
14288 (ada_op_name): Constify.
14289 * ada-lang.h (ada_yyerror, get_selections)
14290 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
14291 * arc-tdep.c (arc_print_frame_cache): Constify.
14292 * arm-tdep.c (arm_skip_stub): Constify.
14293 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
14294 (gen_aggregate_elt_ref): Constify.
14295 * bcache.c (print_bcache_statistics): Constify.
14296 * bcache.h (print_bcache_statistics): Constify.
14297 * break-catch-throw.c (catch_exception_command_1):
14298 * breakpoint.c (struct ep_type_description::description):
14299 Constify.
14300 (add_solib_catchpoint): Constify.
14301 (catch_fork_command_1): Add cast.
14302 (add_catch_command): Constify.
14303 * breakpoint.h (add_catch_command, add_solib_catchpoint):
14304 Constify.
14305 * bsd-uthread.c (bsd_uthread_state): Constify.
14306 * buildsym.c (patch_subfile_names): Constify.
14307 * buildsym.h (next_symbol_text_func, patch_subfile_names):
14308 Constify.
14309 * c-exp.y (yyerror): Constify.
14310 (token::oper): Constify.
14311 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
14312 * c-varobj.c (cplus_describe_child): Constify.
14313 * charset.c (find_charset_names): Add cast.
14314 (find_charset_names): Constify array and add const_cast.
14315 * cli/cli-cmds.c (complete_command, cd_command): Constify.
14316 (edit_command): Constify.
14317 * cli/cli-decode.c (lookup_cmd): Constify.
14318 * cli/cli-dump.c (dump_memory_command, dump_value_command):
14319 Constify.
14320 (struct dump_context): Constify.
14321 (add_dump_command, restore_command): Constify.
14322 * cli/cli-script.c (get_command_line): Constify.
14323 * cli/cli-script.h (get_command_line): Constify.
14324 * cli/cli-utils.c (check_for_argument): Constify.
14325 * cli/cli-utils.h (check_for_argument): Constify.
14326 * coff-pe-read.c (struct read_pe_section_data): Constify.
14327 * command.h (lookup_cmd): Constify.
14328 * common/print-utils.c (decimal2str): Constify.
14329 * completer.c (gdb_print_filename): Constify.
14330 * corefile.c (set_gnutarget): Constify.
14331 * cp-name-parser.y (yyerror): Constify.
14332 * cp-valprint.c (cp_print_class_member): Constify.
14333 * cris-tdep.c (cris_register_name, crisv32_register_name):
14334 Constify.
14335 * d-exp.y (yyerror): Constify.
14336 (struct token::oper): Constify.
14337 * d-lang.h (d_yyerror): Constify.
14338 * dbxread.c (struct header_file_location::name): Constify.
14339 (add_old_header_file, add_new_header_file, last_function_name)
14340 (dbx_next_symbol_text, add_bincl_to_list)
14341 (find_corresponding_bincl_psymtab, set_namestring)
14342 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
14343 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
14344 * defs.h (command_line_input, print_address_symbolic)
14345 (deprecated_readline_begin_hook): Constify.
14346 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
14347 Constify.
14348 * event-top.c (handle_line_of_input): Constify and add cast.
14349 * exceptions.c (catch_errors): Constify.
14350 * exceptions.h (catch_errors): Constify.
14351 * expprint.c (print_subexp_standard, op_string, op_name)
14352 (op_name_standard, dump_raw_expression, dump_raw_expression):
14353 * expression.h (op_name, op_string, dump_raw_expression):
14354 Constify.
14355 * f-exp.y (yyerror): Constify.
14356 (struct token::oper): Constify.
14357 (struct f77_boolean_val::name): Constify.
14358 * f-lang.c (f_word_break_characters): Constify.
14359 * f-lang.h (f_yyerror): Constify.
14360 * fork-child.c (fork_inferior): Add cast.
14361 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
14362 (new_variant): Constify.
14363 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
14364 * gdbarch.c: Regenerate.
14365 * gdbcore.h (set_gnutarget): Constify.
14366 * go-exp.y (yyerror): Constify.
14367 (token::oper): Constify.
14368 * go-lang.h (go_yyerror): Constify.
14369 * go32-nat.c (go32_sysinfo): Constify.
14370 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
14371 * guile/scm-cmd.c (cmdscm_function): Constify.
14372 * guile/scm-param.c (pascm_param_value): Constify.
14373 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
14374 (h8300sx_register_name): Constify.
14375 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
14376 Constify.
14377 * ia64-tdep.c (ia64_register_names): Constify.
14378 * infcmd.c (construct_inferior_arguments): Constify.
14379 (path_command, attach_post_wait): Constify.
14380 * language.c (show_range_command, show_case_command)
14381 (unk_lang_error): Constify.
14382 * language.h (language_defn::la_error)
14383 (language_defn::la_name_of_this): Constify.
14384 * linespec.c (decode_line_2): Constify.
14385 * linux-thread-db.c (thread_db_err_str): Constify.
14386 * lm32-tdep.c (lm32_register_name): Constify.
14387 * m2-exp.y (yyerror): Constify.
14388 * m2-lang.h (m2_yyerror): Constify.
14389 * m32r-tdep.c (m32r_register_names): Constify and make static.
14390 * m68hc11-tdep.c (m68hc11_register_names): Constify.
14391 * m88k-tdep.c (m88k_register_name): Constify.
14392 * macroexp.c (appendmem): Constify.
14393 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
14394 (upgrade_type, parse_external, parse_partial_symbols)
14395 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
14396 (new_symbol): Constify.
14397 * memattr.c (mem_info_command): Constify.
14398 * mep-tdep.c (register_name_from_keyword): Constify.
14399 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
14400 Constify.
14401 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
14402 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
14403 * mi/mi-main.c (captured_mi_execute_command): Constify and add
14404 cast.
14405 (mi_execute_async_cli_command): Constify.
14406 * mips-tdep.c (mips_register_name): Constify.
14407 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
14408 (am33_register_name, am33_2_register_name)
14409 * moxie-tdep.c (moxie_register_names): Constify.
14410 * nat/linux-osdata.c (osdata_type): Constify fields.
14411 * nto-tdep.c (nto_parse_redirection): Constify.
14412 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
14413 (lookup_child_selector): Constify.
14414 (objc_methcall::name): Constify.
14415 * objc-lang.h (lookup_objc_class, lookup_child_selector)
14416 (lookup_struct_typedef): Constify.
14417 * objfiles.c (pc_in_section): Constify.
14418 * objfiles.h (pc_in_section): Constify.
14419 * p-exp.y (struct token::oper): Constify.
14420 (yyerror): Constify.
14421 * p-lang.h (pascal_yyerror): Constify.
14422 * parser-defs.h (op_name_standard): Constify.
14423 (op_print::string): Constify.
14424 (exp_descriptor::op_name): Constify.
14425 * printcmd.c (print_address_symbolic): Constify.
14426 * psymtab.c (print_partial_symbols): Constify.
14427 * python/py-breakpoint.c (stop_func): Constify.
14428 (bppy_get_expression): Constify.
14429 * python/py-cmd.c (cmdpy_completer::name): Constify.
14430 (cmdpy_function): Constify.
14431 * python/py-event.c (evpy_add_attribute)
14432 (gdbpy_initialize_event_generic): Constify.
14433 * python/py-event.h (evpy_add_attribute)
14434 (gdbpy_initialize_event_generic): Constify.
14435 * python/py-evts.c (add_new_registry): Constify.
14436 * python/py-finishbreakpoint.c (outofscope_func): Constify.
14437 * python/py-framefilter.c (get_py_iter_from_func): Constify.
14438 * python/py-inferior.c (get_buffer): Add cast.
14439 * python/py-param.c (parm_constant::name): Constify.
14440 * python/py-unwind.c (fprint_frame_id): Constify.
14441 * python/python.c (gdbpy_parameter_value): Constify.
14442 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
14443 * remote.c (memory_packet_config::name): Constify.
14444 (show_packet_config_cmd, remote_write_bytes)
14445 (remote_buffer_add_string):
14446 * reverse.c (exec_reverse_once): Constify.
14447 * rs6000-tdep.c (variant::name, variant::description): Constify.
14448 * rust-exp.y (rustyyerror): Constify.
14449 * rust-lang.c (rust_op_name): Constify.
14450 * rust-lang.h (rustyyerror): Constify.
14451 * serial.h (serial_ops::name): Constify.
14452 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
14453 (sh_sh3e_register_name, sh_sh2e_register_name)
14454 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
14455 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
14456 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
14457 (sh_sh4al_dsp_register_name): Constify.
14458 * sh64-tdep.c (sh64_register_name): Constify.
14459 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
14460 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
14461 * stabsread.c (patch_block_stabs, read_type_number)
14462 (ref_map::stabs, ref_add, process_reference)
14463 (symbol_reference_defined, define_symbol, define_symbol)
14464 (error_type, read_type, read_member_functions, read_cpp_abbrev)
14465 (read_one_struct_field, read_struct_fields, read_baseclasses)
14466 (read_tilde_fields, read_struct_type, read_array_type)
14467 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
14468 (read_huge_number, read_range_type, read_args, common_block_start)
14469 (find_name_end): Constify.
14470 * stabsread.h (common_block_start, define_symbol)
14471 (process_one_symbol, symbol_reference_defined, ref_add):
14472 * symfile.c (get_section_index, add_symbol_file_command):
14473 * symfile.h (get_section_index): Constify.
14474 * target-descriptions.c (tdesc_type::name): Constify.
14475 (tdesc_free_type): Add cast.
14476 * target.c (find_default_run_target):
14477 (add_deprecated_target_alias, find_default_run_target)
14478 (target_announce_detach): Constify.
14479 (do_option): Constify.
14480 * target.h (add_deprecated_target_alias): Constify.
14481 * thread.c (print_thread_info_1): Constify.
14482 * top.c (deprecated_readline_begin_hook, command_line_input):
14483 Constify.
14484 (init_main): Add casts.
14485 * top.h (handle_line_of_input): Constify.
14486 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
14487 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
14488 (tfind_command): Rename to ...
14489 (tfind_command_1): ... this and constify.
14490 (tfind_command): New function.
14491 (tfind_end_command, tfind_start_command): Adjust.
14492 (encode_source_string): Constify.
14493 * tracepoint.h (encode_source_string): Constify.
14494 * tui/tui-data.c (tui_partial_win_by_name): Constify.
14495 * tui/tui-data.h (tui_partial_win_by_name): Constify.
14496 * tui/tui-source.c (tui_set_source_content_nil): Constify.
14497 * tui/tui-source.h (tui_set_source_content_nil): Constify.
14498 * tui/tui-win.c (parse_scrolling_args): Constify.
14499 * tui/tui-windata.c (tui_erase_data_content): Constify.
14500 * tui/tui-windata.h (tui_erase_data_content): Constify.
14501 * tui/tui-winsource.c (tui_erase_source_content): Constify.
14502 * tui/tui.c (tui_enable): Add cast.
14503 * utils.c (defaulted_query): Constify.
14504 (init_page_info): Add cast.
14505 (puts_debug, subset_compare): Constify.
14506 * utils.h (subset_compare): Constify.
14507 * varobj.c (varobj_format_string): Constify.
14508 * varobj.h (varobj_format_string): Constify.
14509 * vax-tdep.c (vax_register_name): Constify.
14510 * windows-nat.c (windows_detach): Constify.
14511 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
14512 * xml-support.c (gdb_xml_end_element): Constify.
14513 * xml-tdesc.c (tdesc_start_reg): Constify.
14514 * xstormy16-tdep.c (xstormy16_register_name): Constify.
14515 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
14516 * xtensa-tdep.h (xtensa_register_t::name): Constify.
14517
14518 2017-04-05 Pedro Alves <palves@redhat.com>
14519
14520 * proc-api.c (struct trans): Constify.
14521 (procfs_note): Constify.
14522 * proc-events.c (struct trans, syscall_table):
14523 * proc-flags.c (struct trans): Constify.
14524 * proc-utils.h (procfs_note): Constify.
14525 * proc-why.c (struct trans): Constify.
14526 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
14527 (procfs_detach): Constify.
14528 * sol-thread.c (struct string_map): Constify.
14529 (td_err_string, td_state_string): Constify.
14530
14531 2017-04-05 Pedro Alves <palves@redhat.com>
14532
14533 * proc-api.c (procfs_filename): Don't initialize
14534 procfs_filename.
14535 (prepare_to_trace): Assume procfs_filename is non-NULL.
14536 (_initialize_proc_api): Give procfs_filename a default value here.
14537
14538 2017-04-05 Pedro Alves <palves@redhat.com>
14539
14540 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
14541 'cond_string' parameter.
14542 (extract_exception_regexp): Constify 'string' parameter.
14543 (catch_exception_command_1): Constify.
14544 * breakpoint.c (init_catchpoint)
14545 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
14546 parameter.
14547 (ep_parse_optional_if_clause, catch_fork_command_1)
14548 (catch_exec_command_1): Constify.
14549 * breakpoint.h (init_catchpoint): Constify 'cond_string'
14550 parameter.
14551 (ep_parse_optional_if_clause): Constify.
14552 * cli/cli-utils.c (remove_trailing_whitespace)
14553 (check_for_argument): Constify.
14554 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
14555 non-const overload.
14556 (check_for_argument): Likewise.
14557
14558 2017-04-05 Pedro Alves <palves@redhat.com>
14559
14560 * event-top.c (command_line_handler): Add cast to execute_command
14561 call.
14562 * record-btrace.c (cmd_record_btrace_bts_start)
14563 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
14564 (cmd_record_btrace_start): Add cast to execute_command call.
14565 * record-full.c (record_full_goto_insn):
14566 * record.c (record_start, record_stop): Add cast to
14567 execute_command_to_string calls.
14568 (cmd_record_start): Add cast to execute_command calls.
14569
14570 2017-04-05 Pedro Alves <palves@redhat.com>
14571
14572 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
14573 static inline function.
14574 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
14575 array and use gdb_PyArg_ParseTupleAndKeywords.
14576 * python/py-cmd.c (cmdpy_init): Likewise.
14577 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
14578 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
14579 (infpy_search_memory): Likewise.
14580 * python/py-objfile.c (objfpy_add_separate_debug_file)
14581 (gdbpy_lookup_objfile): Likewise.
14582 * python/py-symbol.c (gdbpy_lookup_symbol)
14583 (gdbpy_lookup_global_symbol): Likewise.
14584 * python/py-type.c (gdbpy_lookup_type): Likewise.
14585 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
14586 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
14587 Likewise.
14588
14589 2017-04-05 Pedro Alves <palves@redhat.com>
14590
14591 * python/python-internal.h (gdb_PyGetSetDef): New type.
14592 * python/py-block.c (block_object_getset)
14593 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
14594 * python/py-event.c (event_object_getset)
14595 (finish_breakpoint_object_getset): Likewise.
14596 * python/py-inferior.c (inferior_object_getset): Likewise.
14597 * python/py-infthread.c (thread_object_getset): Likewise.
14598 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
14599 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
14600 * python/py-objfile.c (objfile_getset): Likewise.
14601 * python/py-progspace.c (pspace_getset): Likewise.
14602 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
14603 Likewise.
14604 * python/py-record.c (recpy_record_getset): Likewise.
14605 * python/py-symbol.c (symbol_object_getset): Likewise.
14606 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
14607 Likewise.
14608 * python/py-type.c (type_object_getset, field_object_getset):
14609 Likewise.
14610 * python/py-value.c (value_object_getset): Likewise.
14611
14612 2017-04-05 Pedro Alves <palves@redhat.com>
14613
14614 * python/python-internal.h (gdb_PyObject_CallMethod)
14615 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
14616 New functions.
14617 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
14618 (PySys_GetObject, PySys_SetPath): New macros.
14619
14620 2017-04-05 Pedro Alves <palves@redhat.com>
14621
14622 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
14623 info_osdata_command.
14624 * osdata.c (info_osdata_command): Rename to ...
14625 (info_osdata): ... this. Constify 'type' parameter, and remove
14626 the 'from_tty' parameter. Accept NULL TYPE.
14627 (info_osdata_command): New function.
14628 * osdata.h (info_osdata_command): Remove declaration.
14629 (info_osdata): New declaration.
14630
14631 2017-04-05 Pedro Alves <palves@redhat.com>
14632
14633 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
14634 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
14635 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
14636 parameter.
14637 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
14638 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
14639 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
14640 parameter.
14641 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
14642 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
14643 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
14644 (mi_cmd_file_list_exec_source_files)
14645 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
14646 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
14647 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
14648 parameter.
14649 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
14650 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
14651 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
14652 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
14653 (mi_cmd_stack_info_frame): Constify 'command' parameter.
14654 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
14655 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
14656 'command' parameter.
14657 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
14658 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
14659 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
14660 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
14661 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
14662 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
14663 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
14664 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
14665 (mi_cmd_var_set_update_range): Constify 'command' parameter.
14666 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
14667 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
14668 parameter.
14669 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
14670 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
14671 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
14672 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
14673 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
14674 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
14675 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
14676 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
14677 (mi_cmd_data_list_changed_registers)
14678 (mi_cmd_data_write_register_values)
14679 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
14680 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
14681 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
14682 (mi_cmd_list_features, mi_cmd_list_target_features)
14683 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
14684 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
14685 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
14686 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
14687 (mi_cmd_trace_frame_collected): Constify 'command'
14688 parameter.
14689 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
14690 'command' parameter.
14691
14692 2017-04-05 Pedro Alves <palves@redhat.com>
14693
14694 * ada-lang.c (ada_completer_word_break_characters): Now a const
14695 array.
14696 (ada_get_gdb_completer_word_break_characters): Constify.
14697 * completer.c (gdb_completer_command_word_break_characters)
14698 (gdb_completer_file_name_break_characters)
14699 (gdb_completer_quote_characters): Now const arrays.
14700 (get_gdb_completer_quote_characters): Constify.
14701 (set_rl_completer_word_break_characters): New function.
14702 (set_gdb_completion_word_break_characters)
14703 (complete_line_internal): Use it.
14704 * completer.h (get_gdb_completer_quote_characters): Constify.
14705 (set_rl_completer_word_break_characters): Declare.
14706 * f-lang.c (f_word_break_characters): Constify.
14707 * language.c (default_word_break_characters): Constify.
14708 * language.h (language_defn::la_word_break_characters): Constify.
14709 (default_word_break_characters): Constify.
14710 * top.c (init_main): Use set_rl_completer_word_break_characters.
14711
14712 2017-04-05 Pedro Alves <palves@redhat.com>
14713
14714 * aix-thread.c (aix_thread_pid_to_str)
14715 (aix_thread_extra_thread_info): Constify.
14716 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
14717 * bsd-uthread.c (bsd_uthread_extra_thread_info)
14718 (bsd_uthread_pid_to_str): Constify.
14719 * corelow.c (core_pid_to_str): Constify.
14720 * darwin-nat.c (darwin_pid_to_str): Constify.
14721 * fbsd-nat.c (fbsd_pid_to_str): Constify.
14722 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
14723 Constify.
14724 * gnu-nat.c (gnu_pid_to_str): Constify.
14725 * go32-nat.c (go32_pid_to_str): Constify.
14726 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
14727 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
14728 * inferior.c (inferior_pid_to_str): Constify.
14729 * linux-nat.c (linux_nat_pid_to_str): Constify.
14730 * linux-tdep.c (linux_core_pid_to_str): Constify.
14731 * linux-thread-db.c (thread_db_pid_to_str)
14732 (thread_db_extra_thread_info): Constify.
14733 * nto-tdep.c (nto_extra_thread_info): Constify.
14734 * nto-tdep.h (nto_extra_thread_info): Constify.
14735 * obsd-nat.c (obsd_pid_to_str): Constify.
14736 * procfs.c (procfs_pid_to_str): Constify.
14737 * ravenscar-thread.c (ravenscar_extra_thread_info)
14738 (ravenscar_pid_to_str): Constify.
14739 * remote-sim.c (gdbsim_pid_to_str): Constify.
14740 * remote.c (remote_threads_extra_info, remote_pid_to_str):
14741 Constify.
14742 * sol-thread.c (solaris_pid_to_str): Constify.
14743 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
14744 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
14745 * target.c (default_pid_to_str, target_pid_to_str)
14746 (normal_pid_to_str, default_pid_to_str): Constify.
14747 * target.h (target_ops::to_pid_to_str)
14748 (target_ops::to_extra_thread_info): Constify.
14749 (target_pid_to_str, normal_pid_to_str): Constify.
14750 * windows-nat.c (windows_pid_to_str): Constify.
14751 * gdbarch.sh (core_pid_to_str): Constify.
14752 * target-delegates.c: Regenerate.
14753 * gdbarch.h, gdbarch.c: Regenerate.
14754
14755 2017-04-05 Pedro Alves <palves@redhat.com>
14756
14757 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
14758 the memory of the temporary warning_pre_print override.
14759 * utils.c (warning_pre_print): Constify.
14760 * utils.h (warning_pre_print): Constify.
14761
14762 2017-04-05 Pedro Alves <palves@redhat.com>
14763
14764 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
14765 (shell_command): New function.
14766 (make_command): Use std::string.
14767 (init_cli_cmds): Register shell_command instead of shell_escape.
14768
14769 2017-04-05 Pedro Alves <palves@redhat.com>
14770
14771 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
14772 * tracepoint.c (default_collect): Don't initialize.
14773
14774 2017-04-05 Pedro Alves <palves@redhat.com>
14775
14776 * macroexp.c (macro_buffer::shared): Now a bool.
14777 (init_buffer): Update.
14778 (init_shared_buffer): Constify 'addr' parameter.
14779 (substitute_args, expand, macro_expand, macro_expand_next): Remove
14780 casts.
14781
14782 2017-04-05 Pedro Alves <palves@redhat.com>
14783
14784 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
14785 * disasm.c (set_disassembler_options): Constify local.
14786 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
14787
14788 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
14789
14790 PR gdb/21352
14791 * tracefile.c (tsave_command): Fix argument parsing for '-r'
14792 option.
14793
14794 2017-04-05 Yao Qi <yao.qi@linaro.org>
14795
14796 * frame.c (frame_unwind_register_unsigned): Call
14797 frame_unwind_register_value.
14798
14799 2017-04-05 Yao Qi <yao.qi@linaro.org>
14800
14801 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
14802 Use gdb_test_multiple, and don't match anchor.
14803
14804 2017-04-05 Pedro Alves <palves@redhat.com>
14805
14806 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
14807 (Write After Approval): Remove Simon Marchi.
14808
14809 2017-04-05 Pedro Alves <palves@redhat.com>
14810
14811 * common/gdb_optional.h (optional::optional): Make constexpr and
14812 initialize m_dummy.
14813
14814 2017-04-04 John Baldwin <jhb@FreeBSD.org>
14815
14816 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14817 (amd64fbsd_jmp_buf_reg_offset): Remove.
14818 (amd64fbsd_supply_uthread): Remove function.
14819 (amd64fbsd_collect_uthread): Remove function.
14820 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
14821 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
14822 (x86_64-*-freebsd*): Remove bsd-uthread.o.
14823 (fbsd-nat.c): Update comment.
14824 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14825 (i386fbsd_jmp_buf_reg_offset): Remove.
14826 (i386fbsd_supply_uthread): Remove function.
14827 (i386fbsd_collect_uthread): Remove function.
14828 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
14829
14830 2017-04-04 John Baldwin <jhb@FreeBSD.org>
14831
14832 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
14833 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
14834 * NEWS: Mention that support for FreeBSD/alpha was removed.
14835 * alpha-fbsd-tdep.c: Delete file.
14836 * config/alpha/fbsd.mh: Delete file.
14837 * configure.host: Delete alpha*-*-freebsd* and
14838 alpha*-*-kfreebsd*-gnu.
14839 * configure.tgt: Delete alpha*-*-freebsd* and
14840 alpha*-*-kfreebsd*-gnu.
14841
14842 2017-04-04 John Baldwin <jhb@FreeBSD.org>
14843
14844 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
14845 amd64bsd_store_inferior_registers): Use ptid from regcache.
14846
14847 2017-04-04 Pedro Alves <palves@redhat.com>
14848
14849 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
14850 data fields, make them private and add "m_" prefixes.
14851 (lnp_state_machine::lnp_state_machine): New ctor.
14852 (record_line, check_line_address, handle_set_discriminator)
14853 (handle_set_address, handle_advance_pc, handle_special_opcode)
14854 (handle_advance_line, handle_set_file, handle_negate_stmt)
14855 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
14856 (end_sequence, advance_line): New methods.
14857 (m_gdbarch, m_record_lines_p): New fields.
14858 (lnp_reader_state): Delete.
14859 (dwarf_record_line): Rename to ...
14860 (lnp_state_machine::record_line): ... adjust.
14861 (init_lnp_state_machine): Delete.
14862 (lnp_state_machine::lnp_state_machine): New.
14863 (check_line_address): Rename to ...
14864 (lnp_state_machine::check_line_address): This.
14865 (dwarf_decode_lines_1): Remove reference to "reader_state".
14866 Adjust lnp_state_machine having a non-default ctor. Use bool.
14867 State machine internal state manipulation moved to
14868 lnp_state_machine methods.
14869
14870 2017-04-04 Pedro Alves <palves@redhat.com>
14871
14872 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14873 unittests/offset-type-selftests.c.
14874 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
14875 * common/offset-type.h: New file.
14876 * common/preprocessor.h: New file.
14877 * common/traits.h: New file.
14878 * common/valid-expr.h: New file.
14879 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
14880 sect_offset and cu_offset strong typedefs throughout.
14881 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
14882 typedefs throughout.
14883 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
14884 sect_offset and cu_offset strong typedefs throughout.
14885 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
14886 typedefs throughout.
14887 * gdbtypes.h: Include "common/offset-type.h".
14888 (cu_offset): Now an offset type (strong typedef) instead of a
14889 struct.
14890 (sect_offset): Likewise.
14891 (union call_site_parameter_u): Rename "param_offset" field to
14892 "param_cu_off".
14893 * unittests/offset-type-selftests.c: New file.
14894
14895 2017-04-04 Pedro Alves <palves@redhat.com>
14896
14897 * common/underlying.h: New file.
14898 * dwarf2read.c: Include "common/gdb_optional.h" and
14899 "common/underlying.h".
14900 (dir_index, file_name_index): New types.
14901 (file_entry): Use them.
14902 (file_entry::include): Use to_underlying.
14903 (line_header::add_file_name): Use dir_index.
14904 (read_formatted_entries): Use gdb::optional. Read form before
14905 writting to file_entry.
14906 (dwarf_decode_line_header): Use dir_index.
14907 (lnp_state_machine::current_file): Use to_underlying.
14908 (lnp_state_machine::file): Change type to file_name_index.
14909 (dwarf_record_line): Use to_underlying.
14910 (init_lnp_state_machine): Use file_name_index.
14911 (dwarf_decode_lines_1): Use dir_index and file_name_index.
14912
14913 2017-04-04 Pedro Alves <palves@redhat.com>
14914
14915 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
14916 operator bool, has_value and get methods.
14917
14918 2017-04-04 Pedro Alves <palves@redhat.com>
14919
14920 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
14921 fields.
14922 (line_header): Initialize all data fields. Change type of
14923 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
14924 Change type of include_dirs to std::vector<const char *>. Remove
14925 num_include_dirs, include_dirs_size. Change type of file_names to
14926 std::vector<file_entry>. Remove num_file_names, file_names_size.
14927 (line_header::line_header): New.
14928 (line_header::add_include_dir, line_header::add_file_name): New
14929 methods.
14930 (line_header::include_dir_at): Remove NULL check.
14931 (line_header::file_name_at): Add const overload.
14932 (line_header_up): New unique_ptr typedef.
14933 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
14934 std::vector. Remove free_line_header call.
14935 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
14936 free_line_header call.
14937 (free_cu_line_header): Delete.
14938 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
14939 (setup_type_unit_groups): Use line_header_up instead of cleanups.
14940 Adjust to use std::vector.
14941 (free_line_header): Delete.
14942 (free_line_header_voidp): Use delete.
14943 (add_include_dir): Replace with ...
14944 (line_header::add_include_dir): ... this method. Use std::vector.
14945 (add_file_name): Replace with ...
14946 (line_header::add_file_name): ... this method. Use std::vector.
14947 (add_include_dir_stub): Delete.
14948 (read_formatted_entries): Remove memset.
14949 (dwarf_decode_line_header): Return a line_header_up instead of a
14950 raw pointer. Remove cleanup handling. Pass lambdas to
14951 read_formatted_entries. Adjust to use line_header methods.
14952 (dwarf_decode_lines_1): Adjust to use line_header methods.
14953 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
14954 use std::vector.
14955
14956 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
14957
14958 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
14959 instead of struct ptid.
14960
14961 2017-05-04 Alan Hayward <alan.hayward@arm.com>
14962
14963 * frame.c (get_frame_register_bytes): Unwind using value.
14964 (put_frame_register_bytes): Likewise.
14965
14966 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
14967
14968 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
14969 aggregate-like.
14970
14971 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
14972
14973 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
14974
14975 2017-03-29 Yao Qi <yao.qi@linaro.org>
14976
14977 * gdbthread.h (struct thread_info): Declare constructor and
14978 destructor. Add some in-class member initializers.
14979 * thread.c (free_thread): Remove.
14980 (init_thread_list): Call delete instead of free_thread.
14981 (new_thread): Call thread_info constructor.
14982 (thread_info::thread_info): New function.
14983 (thread_info::~thread_info): New function.
14984 (delete_thread_1): Call delete instead of free_thread.
14985 (make_cleanup_restore_current_thread): Move tp and frame to
14986 inner block.
14987
14988 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14989
14990 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
14991 (arc_skip_prologue): Likewise.
14992 (arc_make_frame_cache): Likewise.
14993 (arc_pv_get_operand): New function.
14994 (arc_is_in_prologue): Likewise.
14995 (arc_analyze_prologue): Likewise.
14996 (arc_print_frame_cache): Likewise.
14997 (MAX_PROLOGUE_LENGTH): New constant.
14998
14999 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
15000
15001 * configure.tgt: Add arc-insn.o.
15002 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
15003 (dump_arc_instruction_command): New function.
15004 (arc_fprintf_disasm): Likewise.
15005 (arc_disassemble_info): Likewise.
15006 (arc_insn_get_operand_value): Likewise.
15007 (arc_insn_get_operand_value_signed): Likewise.
15008 (arc_insn_get_memory_base_reg): Likewise.
15009 (arc_insn_get_memory_offset): Likewise.
15010 (arc_insn_get_branch_target): Likewise.
15011 (arc_insn_dump): Likewise.
15012 (arc_insn_get_linear_next_pc): Likewise.
15013 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
15014 (arc_disassemble_info): Likewise.
15015 (arc_insn_get_branch_target): Likewise.
15016 (arc_insn_get_linear_next_pc): Likewise.
15017 * NEWS: Mention new "maint print arc arc-instruction".
15018
15019 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
15020
15021 * arc-tdep (maintenance_print_arc_list): New variable.
15022 (maintenance_print_arc_command): New function.
15023
15024 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
15025
15026 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
15027 Add "limm" and "reserved".
15028 (arc_cannot_fetch_register, arc_cannot_store_register): Add
15029 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
15030 * arc-tdep.h (arc_regnum): Likewise.
15031
15032 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15033
15034 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
15035 for THREADPTR register.
15036 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
15037 register.
15038 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
15039 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
15040 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
15041
15042 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15043
15044 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
15045 registers above gdbarch_num_regs (gdbarch) as privileged in
15046 call0 ABI.
15047
15048 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15049
15050 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
15051 for a single specified register or for all registers in
15052 a0_base..a0_base + C0_NREGS range.
15053 (supply_gregset_reg): Call regcache_raw_supply for a single
15054 specified register or for all registers in a0_base..a0_base +
15055 C0_NREGS range.
15056
15057 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15058
15059 * arch/xtensa.h (C0_NREGS): Add definition.
15060 * xtensa-tdep.c (C0_NREGS): Remove definition.
15061
15062 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15063
15064 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
15065 Drop xtensa_default_isa initialization.
15066 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
15067
15068 2017-03-27 Pedro Alves <palves@redhat.com>
15069
15070 * dwarf2read.c (file_entry) <dir_index>: Add comment.
15071 (file_entry::include_dir): New method.
15072 (line_header::include_dir_at, line_header::file_name_at): New
15073 methods.
15074 (setup_type_unit_groups, setup_type_unit_groups)
15075 (psymtab_include_file_name): Simplify using the new methods.
15076 (lnp_state_machine) <the_line_header>: New field.
15077 <file>: Add comment.
15078 (lnp_state_machine::current_file): New method.
15079 (dwarf_record_line): Simplify using the new methods.
15080 (init_lnp_state_machine): Initialize the "the_line_header" field.
15081 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
15082 Simplify using the new methods.
15083
15084 2017-03-27 Pedro Alves <palves@redhat.com>
15085
15086 * cp-name-parser.y (make_empty): Delete.
15087 (demangler_special, nested_name, ptr_operator, array_indicator)
15088 (direct_declarator, declarator_1): Use fill_comp instead of
15089 make_empty.
15090
15091 2017-03-27 Pedro Alves <palves@redhat.com>
15092
15093 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
15094 to ATTRIBUTE_PRINTF.
15095 * solib-target.c (library_list_start_list): Print "string" not
15096 "version".
15097 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
15098 gdb_xml_error call.
15099
15100 2017-03-27 Pedro Alves <palves@redhat.com>
15101
15102 * dwarf2read.c (struct file_and_directory): New.
15103 (dwarf2_get_dwz_file): Adjust to use std::string.
15104 (dw2_get_file_names_reader): Adjust to use file_and_directory.
15105 (find_file_and_directory): Adjust to return a file_and_directory
15106 object.
15107 (read_file_scope): Adjust to use file_and_directory. Remove
15108 make_cleanup/do_cleanups calls.
15109 (open_and_init_dwp_file): Adjust to use std::string. Remove
15110 make_cleanup/do_cleanups calls.
15111 * python/python.c (do_start_initialization): Adjust to ldirname
15112 returning a std::string.
15113 * utils.c (ldirname): Now returns a std::string.
15114 * utils.h (ldirname): Change return type to std::string.
15115 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
15116 returning a std::string.
15117 * xml-tdesc.c (file_read_description_xml): Likewise.
15118
15119 2017-03-24 Alan Hayward <alan.hayward@arm.com>
15120
15121 * regcache.c (regcache_debug_print_register): New function.
15122 * regcache.h (regcache_debug_print_register): New declaration.
15123 * target.c (debug_print_register): Remove.
15124 (target_fetch_registers): Call regcache_debug_print_register.
15125 (target_store_registers): Likewise.
15126
15127 2017-03-24 Pádraig Brady <pbrady@fb.com>
15128
15129 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
15130 reference beyond the 'lh->include_dirs' array before accessing to
15131 it.
15132 (psymtab_include_file_name): Likewise.
15133 (dwarf_decode_lines_1): Likewise.
15134 (dwarf_decode_lines): Likewise.
15135 (file_file_name): Likewise.
15136
15137 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
15138
15139 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
15140 inferior_ptid.
15141 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
15142 ps_lsetfpregs): Likewise.
15143 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
15144 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
15145 ps_lsetfpregs): Likewise.
15146 * target.c (target_fetch_registers, target_store_registers):
15147 Remove asserts.
15148
15149 2017-03-23 Alan Hayward <alan.hayward@arm.com>
15150
15151 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
15152
15153 2017-03-23 Yao Qi <yao.qi@linaro.org>
15154
15155 * aarch64-tdep.c (aarch64_process_record_test): Declare.
15156 (_initialize_aarch64_tdep): Register it.
15157 (aarch64_record_load_store): Handle PRFM instruction.
15158 (aarch64_process_record_test): New function.
15159
15160 2017-03-23 Yao Qi <yao.qi@linaro.org>
15161
15162 * aarch64-tdep.c (aarch64_record_load_store): Fix code
15163 indentation.
15164
15165 2017-03-23 Yao Qi <yao.qi@linaro.org>
15166
15167 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
15168
15169 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15170
15171 python/python.c (do_start_initialization): Fix memory leak.
15172
15173 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
15174
15175 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
15176 using get_ptrace_pid.
15177 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
15178 inferior_ptid.
15179 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
15180 inferior_ptid instead of pid.
15181
15182 2017-03-22 Yao Qi <yao.qi@linaro.org>
15183
15184 * aarch64-tdep.c: Wrap locally used classes in anonymous
15185 namespace.
15186 * arm-tdep.c: Likewise.
15187 * linespec.c: Likewise.
15188 * ui-out.c: Likewise.
15189
15190 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
15191
15192 PR gdb/19637
15193 * python/lib/gdb/printer/bound_registers.py: Import sys.
15194
15195 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
15196
15197 * windows-nat.c (do_windows_fetch_inferior_registers): Add
15198 windows_thread_info parameter and use it instead of
15199 current_thread.
15200 (windows_fetch_inferior_registers): Don't set current_thread,
15201 pass the thread to do_windows_fetch_inferior_registers. Use
15202 ptid from regcache instead of inferior_ptid.
15203 (do_windows_store_inferior_registers): Add windows_thread_info
15204 parameter and use it instead of current_thread.
15205 (windows_store_inferior_registers): Don't set current_thread,
15206 pass the thread to do_windows_store_inferior_registers. Use
15207 ptid from regcache instead of inferior_ptid.
15208
15209 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
15210
15211 * ser-mingw.c (ser_windows_raw): Remove reference to
15212 struct serial::current_timeout.
15213
15214 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
15215
15216 PR tdep/20928
15217 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
15218 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
15219 (sparc64_fsr_type): Fix %fsr decoding.
15220
15221 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
15222
15223 * python/py-record-btrace.c (btpy_insn_data): Change return type
15224 for Python 2.
15225
15226 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
15227
15228 * spu-linux-nat.c (spu_fetch_inferior_registers,
15229 spu_store_inferior_registers): Use ptid from regcache, set and
15230 restore inferior_ptid.
15231 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
15232 Likewise.
15233
15234 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
15235
15236 * i386-linux-nat.c (fetch_register, store_register,
15237 i386_linux_fetch_inferior_registers,
15238 i386_linux_store_inferior_registers): Use ptid from regcache.
15239 * ia64-linux-nat.c (ia64_linux_fetch_register,
15240 ia64_linux_store_register): Likewise.
15241 * inf-ptrace.c (inf_ptrace_fetch_register,
15242 inf_ptrace_store_register): Likewise.
15243 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
15244 m32r_linux_store_inferior_registers): Likewise.
15245 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
15246 m68kbsd_store_inferior_registers): Likewise.
15247 * m68k-linux-nat.c (fetch_register, store_register,
15248 m68k_linux_fetch_inferior_registers,
15249 m68k_linux_store_inferior_registers): Likewise.
15250 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
15251 m88kbsd_store_inferior_registers): Likewise.
15252 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
15253 mips_fbsd_store_inferior_registers): Likewise.
15254 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
15255 mips64_linux_regsets_store_registers): Likewise.
15256 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
15257 mipsnbsd_store_inferior_registers): Likewise.
15258 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
15259 mips64obsd_store_inferior_registers): Likewise.
15260 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
15261 Likewise.
15262 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
15263 ppcfbsd_store_inferior_registers): Likewise.
15264 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
15265 ppc_linux_store_inferior_registers): Likewise.
15266 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
15267 ppcnbsd_store_inferior_registers): Likewise.
15268 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
15269 ppcobsd_store_registers): Likewise.
15270 * procfs.c (procfs_fetch_registers, procfs_store_registers):
15271 Likewise.
15272 * ravenscar-thread.c (ravenscar_fetch_registers,
15273 ravenscar_store_registers, ravenscar_prepare_to_store):
15274 Likewise.
15275 * record-btrace.c (record_btrace_fetch_registers,
15276 record_btrace_store_registers, record_btrace_prepare_to_store):
15277 Likewise.
15278 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
15279 Lookup inferior using ptid from regcache, instead of
15280 current_inferior.
15281 * remote.c (remote_fetch_registers, remote_store_registers): Use
15282 ptid from regcache.
15283 * rs6000-nat.c (fetch_register, store_register): Likewise.
15284 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
15285 s390_linux_store_inferior_registers): Likewise.
15286 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
15287 shnbsd_store_inferior_registers): Likewise.
15288 * sol-thread.c (sol_thread_fetch_registers,
15289 sol_thread_store_registers): Likewise.
15290 * sparc-nat.c (sparc_fetch_inferior_registers,
15291 sparc_store_inferior_registers): Likewise.
15292 * tilegx-linux-nat.c (fetch_inferior_registers,
15293 store_inferior_registers): Likewise.
15294 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
15295 vaxbsd_store_inferior_registers): Likewise.
15296 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
15297 store_xtregs): Likewise.
15298
15299 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15300
15301 PR gdb/14441
15302 * NEWS: Mention support for rvalue references in GDB and python.
15303 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
15304 supports both lvalue and rvalue references.
15305
15306 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15307
15308 PR gdb/14441
15309 * gdbtypes.c (rank_one_type): Implement overloading
15310 resolution rules regarding rvalue references.
15311
15312 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15313
15314 PR gdb/14441
15315 * aarch64-tdep.c (aarch64_type_align)
15316 (aarch64_extract_return_value, aarch64_store_return_value): Change
15317 lvalue reference type checks to general reference type checks.
15318 * amd64-tdep.c (amd64_classify): Likewise.
15319 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
15320 Likewise.
15321 * arm-tdep.c (arm_type_align, arm_extract_return_value)
15322 (arm_store_return_value): Likewise.
15323 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
15324 * c-typeprint.c (c_print_type): Likewise.
15325 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
15326 (cplus_number_of_children, cplus_describe_child): Likewise.
15327 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
15328 * completer.c (expression_completer): Likewise.
15329 * cp-support.c (make_symbol_overload_list_adl_namespace):
15330 Likewise.
15331 * darwin-nat-info.c (info_mach_region_command): Likewise.
15332 * dwarf2loc.c (entry_data_value_coerce_ref)
15333 (value_of_dwarf_reg_entry): Likewise.
15334 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
15335 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
15336 Likewise.
15337 * findvar.c (extract_typed_address, store_typed_address):
15338 Likewise.
15339 * gdbtypes.c (rank_one_type): Likewise.
15340 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
15341 * infcall.c (value_arg_coerce): Likewise.
15342 * language.c (pointer_type): Likewise.
15343 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
15344 Likewise.
15345 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
15346 * mn10300-tdep.c (mn10300_type_align): Likewise.
15347 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
15348 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
15349 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
15350 Likewise.
15351 * printcmd.c (print_formatted, x_command): Likewise.
15352 * python/py-type.c (typy_get_composite, typy_template_argument):
15353 Likewise.
15354 * python/py-value.c (valpy_referenced_value)
15355 (valpy_get_dynamic_type, value_has_field): Likewise.
15356 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
15357 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
15358 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
15359 * spu-tdep.c (spu_scalar_value_p): Likewise.
15360 * symtab.c (lookup_symbol_aux): Likewise.
15361 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
15362 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
15363 Likewise.
15364 * valops.c (value_cast_pointers, value_cast)
15365 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
15366 (value_struct_elt, value_struct_elt_bitpos)
15367 (value_find_oload_method_list, find_overload_match)
15368 (value_rtti_indirect_type): Likewise.
15369 * valprint.c (val_print_scalar_type_p, generic_val_print):
15370 Likewise.
15371 * value.c (value_actual_type, value_as_address, unpack_long)
15372 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
15373 (coerce_ref): Likewise.
15374 * varobj.c (varobj_get_value_type): Likewise.
15375
15376 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15377
15378 PR gdb/14441
15379 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
15380 table of constants.
15381 * python/lib/gdb/command/explore.py: Support exploring values
15382 of rvalue reference types.
15383 * python/lib/gdb/types.py: Implement get_basic_type() for
15384 rvalue reference types.
15385 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
15386 constant.
15387 * python/py-value.c (valpy_getitem): Add an rvalue reference
15388 check.
15389 (valpy_reference_value): Add new parameter "refcode".
15390 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
15391 New wrappers for valpy_reference_value().
15392 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15393 (gdbpy_invoke_xmethod): Likewise.
15394
15395 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15396
15397 PR gdb/14441
15398 * dwarf2read.c (process_die, read_type_die_1): Handle the
15399 DW_TAG_rvalue_reference_type DIE.
15400 (read_tag_reference_type): Add new parameter "refcode".
15401
15402 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15403
15404 PR gdb/14441
15405 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
15406 (c_type_print_modifier, c_type_print_varspec_suffix)
15407 (c_type_print_base): Support printing rvalue reference types.
15408 * c-valprint.c (c_val_print, c_value_print): Support printing
15409 rvalue reference values.
15410
15411 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15412
15413 PR gdb/14441
15414 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
15415 typename.
15416 * cp-support.c (replace_typedefs): Handle
15417 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
15418 * python/py-type.c (typy_lookup_type): Likewise.
15419
15420 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15421
15422 PR gdb/14441
15423 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
15424 * parse.c (insert_type): Change assert statement.
15425 (follow_types): Handle rvalue reference types.
15426 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
15427 constant.
15428
15429 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15430
15431 PR gdb/14441
15432 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
15433 value_ref() interface.
15434 * c-valprint.c (c_value_print): Likewise.
15435 * infcall.c (value_arg_coerce): Likewise.
15436 * python/py-value.c (valpy_reference_value): Likewise.
15437 * valops.c (value_cast, value_reinterpret_cast)
15438 (value_dynamic_cast, typecmp): Likewise.
15439 (value_ref): Parameterize by kind of return value reference type.
15440 * value.h (value_ref): Add new parameter "refcode".
15441
15442 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15443
15444 PR gdb/14441
15445 * dwarf2read.c (read_tag_reference_type): Use
15446 lookup_lvalue_reference_type() instead of lookup_reference_type().
15447 * eval.c (evaluate_subexp_standard): Likewise.
15448 * f-exp.y: Likewise.
15449 * gdbtypes.c (make_reference_type, lookup_reference_type):
15450 Generalize with rvalue reference types.
15451 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
15452 convenience wrappers for lookup_reference_type().
15453 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
15454 reference kind parameter.
15455 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
15456 wrappers for lookup_reference_type().
15457 * guile/scm-type.c (gdbscm_type_reference): Use
15458 lookup_lvalue_reference_type() instead of lookup_reference_type().
15459 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
15460 * parse.c (follow_types): Likewise.
15461 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
15462 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
15463 Likewise.
15464 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15465 (gdbpy_invoke_xmethod): Likewise.
15466 * stabsread.c: Provide extra argument to make_reference_type()
15467 call.
15468 * valops.c (value_ref, value_rtti_indirect_type): Use
15469 lookup_lvalue_reference_type() instead of lookup_reference_type().
15470
15471 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15472
15473 PR gdb/14441
15474 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
15475 (TYPE_IS_REFERENCE): New macro.
15476 (struct type): Add rvalue_reference_type field.
15477 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
15478
15479 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15480
15481 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
15482 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
15483 New function definition.
15484 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
15485 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
15486 New function declaration.
15487 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
15488 * mi/mi-interp.h: New file.
15489 * solib.c (info_sharedlibrary_command): Replace for loop with
15490 ALL_SO_LIBS macro
15491 * solib.h (update_solib_list): New function declaration.
15492 (so_list_head): Move macro.
15493 * solist.h (ALL_SO_LIBS): New macro.
15494
15495 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15496
15497 * infcmd.c (post_create_inferior): Remove unused argument in
15498 call to solib_add.
15499 * remote.c (remote_start_remote): Likewise.
15500 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
15501 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
15502 (enable_break): Likewise.
15503 * solib.c (update_solib_list): Remove unused target argument
15504 and its documentation.
15505 (solib_add): Remove unused target argument. Remove unused
15506 argument in call to update_solib_list.
15507 (info_sharedlibrary_command): Remove unused argument in call
15508 to update_solib_list.
15509 (sharedlibrary_command): Remove unused argument in call to
15510 solib_add.
15511 (handle_solib_event): Likewise.
15512 (reload_shared_libraries): Likewise.
15513 * solib.h (solib_add): Remove unused target argument.
15514
15515 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
15516
15517 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
15518 (s390_displaced_step_fixup): Cover relative branches with the
15519 default fixup handling. This fixes lack of support for some
15520 relative branch instructions.
15521
15522 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15523
15524 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
15525 ptid from regcache.
15526
15527 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15528
15529 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
15530 i386_darwin_store_inferior_registers): Use ptid from regcache.
15531
15532 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15533
15534 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
15535 i386bsd_store_inferior_registers): Use ptid from regcache.
15536
15537 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15538
15539 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
15540 hppaobsd_store_registers): Use ptid from regcache.
15541
15542 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15543
15544 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
15545 hppanbsd_store_registers): Use ptid from regcache.
15546
15547 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15548
15549 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
15550 from regcache. Use get_ptrace_pid.
15551
15552 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15553
15554 * corelow.c (get_core_register_section): Use ptid from regcache,
15555 update doc.
15556
15557 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15558
15559 * bsd-uthread.c (bsd_uthread_fetch_registers,
15560 bsd_uthread_store_registers): Use ptid from regcache, set and
15561 restore inferior_ptid.
15562
15563 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15564
15565 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
15566 fetch_fp_regs, store_register, store_regs, store_fp_register,
15567 store_fp_regs): Use ptid from regcache.
15568
15569 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15570
15571 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
15572 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
15573 store_vfp_regs): Use ptid from regcache.
15574
15575 2017-03-17 Pedro Alves <palves@redhat.com>
15576
15577 PR remote/21188
15578 * ser-base.c (ser_base_wait_for): Add comment.
15579 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
15580 version.
15581 * ser-unix.c (hardwire_raw): Remove reference to
15582 scb->current_timeout.
15583 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
15584 (hardwire_ops): Install ser_base_readchar instead of
15585 hardwire_readchar.
15586 * serial.h (struct serial) <current_timeout, timeout_remaining>:
15587 Remove fields.
15588
15589 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
15590
15591 PR gdb/19637
15592 * python/lib/gdb/printer/bound_registers.py: Add support for
15593 Python 3.
15594
15595 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
15596
15597 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
15598 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
15599 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
15600 byte_offset to subobj_byte_offset. Fix the handling of
15601 DWARF_VALUE_STACK on big-endian targets when coming via an
15602 implicit pointer.
15603 (dwarf2_evaluate_loc_desc): Adjust call to
15604 dwarf2_evaluate_loc_desc_full.
15605 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
15606 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
15607
15608 2017-03-16 Yao Qi <yao.qi@linaro.org>
15609
15610 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
15611 and REVSH instructions.
15612
15613 2017-03-16 Yao Qi <yao.qi@linaro.org>
15614
15615 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
15616 (arm_record_test): Declare.
15617 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
15618 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
15619 align with the manual.
15620 (thumb_record_misc): Adjust the code order to align with the
15621 manual.
15622 (thumb2_record_decode_insn_handler): Fix instruction matching.
15623 (instruction_reader_thumb): New class.
15624 (arm_record_test): New function.
15625
15626 2017-03-16 Yao Qi <yao.qi@linaro.org>
15627
15628 * arm-tdep.c (abstract_memory_reader): New class.
15629 (instruction_reader): New class.
15630 (extract_arm_insn): Add argument 'reader'. Callers updated.
15631 (decode_insn): Likewise.
15632
15633 2017-03-16 Doug Evans <dje@google.com>
15634
15635 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
15636 member. Change type of TYPE member to SCM. All uses updated.
15637 (lsscm_make_lazy_string_smob): Add assert.
15638 (lsscm_make_lazy_string): Flag bad length values.
15639 (lsscm_elt_type): New function.
15640 (gdbscm_lazy_string_to_value): Rewrite to use
15641 lsscm_safe_lazy_string_to_value.
15642 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
15643 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
15644 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
15645 in incoming type.
15646 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15647 * guile/scm-type.c (tyscm_scm_to_type): New function.
15648
15649 2017-03-15 Doug Evans <dje@google.com>
15650
15651 PR python/17728, python/18439, python/18779
15652 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
15653 member. Change type of TYPE member to PyObject *. All uses updated.
15654 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
15655 (gdbpy_create_lazy_string_object): Flag bad length values.
15656 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
15657 Handle typedefs in incoming type.
15658 (stpy_lazy_string_elt_type): New function.
15659 (gdbpy_extract_lazy_string): Call it.
15660 * python/py-value.c (valpy_lazy_string): Flag bad length values.
15661 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
15662 typedefs in incoming type.
15663
15664 2017-03-16 Doug Evans <dje@google.com>
15665
15666 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15667 * guile/scm-type.c (tyscm_scm_to_type): New function.
15668
15669 2017-03-16 Jiong Wang <jiong.wang@arm.com>
15670
15671 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
15672 "ULONGEST" for "skip".
15673
15674 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
15675
15676 PR gdb/21220
15677 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
15678 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
15679 (inf_ptrace_peek_poke): ...here. New function. Now also loop
15680 over ptrace peek/poke until end of buffer or error.
15681
15682 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
15683
15684 * parse.c (length_of_subexp): Make static.
15685 * parser-defs.h (length_of_subexp): Remove.
15686
15687 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
15688
15689 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
15690 as well.
15691
15692 2017-03-14 Pedro Alves <palves@redhat.com>
15693
15694 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
15695 (main): Use std::unique_ptr. Remove calls to
15696 cp_demangled_name_parse_free.
15697
15698 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15699
15700 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
15701 alphabsd_store_inferior_registers): Use regcache->ptid instead
15702 of inferior_ptid.
15703
15704 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15705
15706 * aix-thread.c (aix_thread_fetch_registers,
15707 aix_thread_store_registers): Use regcache->ptid instead of
15708 inferior_ptid.
15709
15710 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15711
15712 * aarch64-linux-nat.c (fetch_gregs_from_thread,
15713 store_gregs_to_thread, fetch_fpregs_from_thread,
15714 store_fpregs_to_thread): Use regcache->ptid instead of
15715 inferior_ptid.
15716
15717 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15718
15719 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
15720 amd64_linux_fetch_inferior_registers): Use regcache->ptid
15721 instead of inferior_ptid.
15722
15723 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15724
15725 * target.c (target_fetch_registers, target_store_registers): Add
15726 assert.
15727
15728 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15729
15730 * regcache.h (regcache_get_ptid): New function.
15731 * regcache.c (regcache_get_ptid): New function.
15732
15733 2017-03-13 Mark Wielaard <mark@klomp.org>
15734
15735 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
15736
15737 2017-03-10 Keith Seitz <keiths@redhat.com>
15738
15739 PR c++/8218
15740 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
15741
15742 2017-03-08 Pedro Alves <palves@redhat.com>
15743
15744 PR gdb/18360
15745 * infrun.c (start_step_over, do_target_resume, resume)
15746 (restart_threads): Assert we're not resuming a thread that is
15747 meant to be stopped.
15748 (infrun_thread_stop_requested_callback): Delete.
15749 (infrun_thread_stop_requested): If the thread is internally
15750 stopped, queue a pending stop event and clear the thread's
15751 inline-frame state.
15752 (handle_stop_requested): New function.
15753 (handle_syscall_event, handle_inferior_event_1): Use
15754 handle_stop_requested.
15755 (handle_stop_requested): New function.
15756 (handle_signal_stop): Set the thread's stop_signal here instead of
15757 at caller.
15758 (finish_step_over): Clear step over info unconditionally.
15759 (handle_signal_stop): If the user had interrupted the event
15760 thread, consider the stop a random signal.
15761 (handle_signal_stop) <signal arrived while stepping over
15762 breakpoint>: Don't restart threads here.
15763 (stop_waiting): Don't clear step-over info here.
15764
15765 2017-03-08 Pedro Alves <palves@redhat.com>
15766
15767 PR 21206
15768 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
15769 goes to argument 2, not 1.
15770
15771 2017-03-08 Pedro Alves <palves@redhat.com>
15772
15773 PR cli/21218
15774 * top.c (gdb_readline_wrapper): Avoid passing NULL to
15775 display_gdb_prompt.
15776 (command_line_input): Add comment.
15777
15778 2017-03-08 Pedro Alves <palves@redhat.com>
15779
15780 PR tui/21216
15781 * tui/tui-file.c (tui_file::write): New.
15782 * tui/tui-file.h (tui_file): Override "write".
15783 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
15784 factored out from ...
15785 (tui_puts): ... here.
15786 (tui_putc): Use them.
15787 (tui_write): New function.
15788 * tui/tui-io.h (tui_write): Declare.
15789
15790 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
15791
15792 * Makefile.in (SFILES): Replace "environ.c" with
15793 "common/environ.c".
15794 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
15795 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
15796 to...
15797 * common/environ.c: ... here.
15798 * environ.h: Moved to...
15799 * common/environ.h: ... here.
15800
15801 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
15802
15803 * gdbarch.sh (pstring_ptr): New static function.
15804 (gdbarch_disassembler_options): Use it.
15805 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
15806 not valid_disassembler_option->name.
15807 * gdbarch.c: Regenerate.
15808
15809 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
15810
15811 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
15812
15813 2017-03-07 Pedro Alves <palves@redhat.com>
15814
15815 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
15816
15817 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
15818
15819 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
15820 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
15821 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
15822 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
15823
15824 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
15825
15826 * xtensa-linux-nat.c (fetch_gregs): Remove const.
15827
15828 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
15829
15830 * remote.c (remote_add_target_side_commands): Use range-based
15831 for loop.
15832
15833 2017-03-03 Yao Qi <yao.qi@linaro.org>
15834
15835 PR gdb/21165
15836 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
15837 value is lazy.
15838 * valprint.c (common_val_print): Likewise.
15839
15840 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
15841
15842 * NEWS: Mention new set/show disassembler-options commands.
15843 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
15844 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
15845 (prospective_options): New static variable.
15846 (gdb_disassembler::gdb_disassembler): Initialize
15847 m_di.disassembler_options.
15848 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
15849 (get_disassembler_options): New function.
15850 (set_disassembler_options): Likewise.
15851 (set_disassembler_options_sfunc): Likewise.
15852 (show_disassembler_options_sfunc): Likewise.
15853 (disassembler_options_completer): Likewise.
15854 (_initialize_disasm): Likewise.
15855 * disasm.h (get_disassembler_options): New prototype.
15856 (set_disassembler_options): Likewise.
15857 * gdbarch.sh (gdbarch_disassembler_options): New variable.
15858 (gdbarch_verify_disassembler_options): Likewise.
15859 * gdbarch.c: Regenerate.
15860 * gdbarch.h: Likewise.
15861 * arm-tdep.c (num_disassembly_options): Delete.
15862 (set_disassembly_style): Likewise.
15863 (arm_disassembler_options): New static variable.
15864 (set_disassembly_style_sfunc): Convert short style name into long
15865 option name. Call set_disassembler_options.
15866 (show_disassembly_style_sfunc): New function.
15867 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
15868 set_gdbarch_verify_disassembler_options.
15869 (_initialize_arm_tdep): Delete regnames variable and update callers.
15870 (arm_disassembler_options): Initialize.
15871 (disasm_options): New variable.
15872 (num_disassembly_options): Rename from this...
15873 (num_disassembly_styles): ...to this. Compute by scanning through
15874 disasm_options.
15875 (valid_disassembly_styles): Initialize using disasm_options.
15876 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
15877 set_arm_regname_option.
15878 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
15879 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
15880 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
15881 set_gdbarch_verify_disassembler_options.
15882 * s390-tdep.c (s390_disassembler_options): New static variable.
15883 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
15884 set_gdbarch_verify_disassembler_options.
15885
15886 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
15887
15888 * remote.c (remote_add_target_side_condition): Remove "struct"
15889 keyword from range-based for loop.
15890
15891 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
15892
15893 * remote.c (remote_add_target_side_condition): Use range-based
15894 for loop. Update comment.
15895
15896 2017-02-27 Yao Qi <yao.qi@linaro.org>
15897
15898 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
15899
15900 2017-02-26 Alan Hayward <alan.hayward@arm.com>
15901
15902 * regcache.c (regcache_raw_update): New function.
15903 (regcache_raw_read): Move code to regcache_raw_update.
15904 * regcache.h (regcache_raw_update): New declaration.
15905 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
15906
15907 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
15908
15909 * dwarf2read.c (create_debug_type_hash_table): Initialize
15910 header.signature and header.type_offset_in_tu.
15911
15912 2017-02-24 Pedro Alves <palves@redhat.com>
15913
15914 * symtab.c (make_file_symbol_completion_list_1): Use
15915 add_symtab_completions.
15916
15917 2017-02-24 Alan Hayward <alan.hayward@arm.com>
15918
15919 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
15920
15921 2017-02-24 Alan Hayward <alan.hayward@arm.com>
15922
15923 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
15924 I386_MAX_REGISTER_SIZE.
15925 (i386_pseudo_register_write): Likewise.
15926 (i386_process_record): Likewise.
15927 * i387-tdep.c (i387_supply_xsave): Likewise.
15928 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
15929 (store_register): Likewise.
15930
15931 2017-02-23 Pedro Alves <palves@redhat.com>
15932
15933 * ada-lang.c: Include "common/function-view.h".
15934 (ada_iterate_over_symbols): Adjust to use function_view as
15935 callback type.
15936 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
15937 (ada_make_symbol_completion_list): Use a lambda.
15938 (ada_exc_search_name_matches): Delete.
15939 (name_matches_regex): New.
15940 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
15941 * compile/compile-c-support.c: Include "common/function-view.h".
15942 (print_one_macro): Change prototype to accept a ui_file pointer.
15943 (write_macro_definitions): Use a lambda.
15944 * dwarf2read.c: Include "common/function-view.h".
15945 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
15946 (dw2_expand_symtabs_matching): Adjust to use function_view as
15947 callback type.
15948 * language.h: Include "common/function-view.h".
15949 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
15950 function_view as callback type.
15951 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
15952 * linespec.c: Include "common/function-view.h".
15953 (collect_info::add_symbol): New method.
15954 (struct symbol_and_data_callback, iterate_inline_only, struct
15955 symbol_matcher_data, iterate_name_matcher): Delete.
15956 (iterate_over_all_matching_symtabs): Adjust to use function_view
15957 as callback type and lambdas.
15958 (iterate_over_file_blocks): Adjust to use function_view as
15959 callback type.
15960 (decode_compound_collector): Now a class with private fields.
15961 (decode_compound_collector::release_symbols): New method.
15962 (collect_one_symbol): Rename to...
15963 (decode_compound_collector::operator()): ... this and adjust.
15964 (lookup_prefix_sym): decode_compound_collector construction bits
15965 move to decode_compound_collector ctor. Pass the
15966 decode_compound_collector object directly as callback. Remove
15967 cleanups and use decode_compound_collector::release_symbols
15968 instead.
15969 (symtab_collector): Now a class with private fields.
15970 (symtab_collector::release_symtabs): New method.
15971 (add_symtabs_to_list): Rename to...
15972 (symtab_collector::operator()): ... this and adjust.
15973 (collect_symtabs_from_filename): symtab_collector construction
15974 bits move to symtab_collector ctor. Pass the symtab_collector
15975 object directly as callback. Remove cleanups and use
15976 symtab_collector::release_symtabs instead.
15977 (collect_symbols): Delete.
15978 (add_matching_symbols_to_info): Use lambdas.
15979 * macrocmd.c (print_macro_callback): Delete.
15980 (info_macro_command): Use a lambda.
15981 (info_macros_command): Pass print_macro_definition as callable
15982 directly.
15983 (print_one_macro): Remove 'ignore' parameter.
15984 (macro_list_command): Adjust.
15985 * macrotab.c (macro_for_each_data::fn): Now a function_view.
15986 (macro_for_each_data::user_data): Delete field.
15987 (foreach_macro): Adjust to call the function_view.
15988 (macro_for_each): Adjust to use function_view as callback type.
15989 (foreach_macro_in_scope): Adjust to call the function_view.
15990 (macro_for_each_in_scope): Adjust to use function_view as callback
15991 type.
15992 * macrotab.h: Include "common/function-view.h".
15993 (macro_callback_fn): Declare a prototype instead of a pointer.
15994 Remove "user_data" parameter.
15995 (macro_for_each, macro_for_each_in_scope): Adjust to use
15996 function_view as callback type.
15997 * psymtab.c (partial_map_expand_apply)
15998 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
15999 Adjust to use function_view as callback type and to return bool.
16000 (psym_expand_symtabs_matching): Adjust to use function_view as
16001 callback types.
16002 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
16003 to use function_view as callback type and to return bool.
16004 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
16005 callback types.
16006 * symfile.c (expand_symtabs_matching): Adjust to use function_view
16007 as callback types.
16008 * symfile.h: Include "common/function-view.h".
16009 (expand_symtabs_file_matcher_ftype)
16010 (expand_symtabs_symbol_matcher_ftype)
16011 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
16012 return bool.
16013 (quick_symbol_functions::map_symtabs_matching_filename)
16014 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
16015 function_view as callback type and return bool.
16016 (expand_symtabs_matching): Adjust to use function_view as callback
16017 type.
16018 (maintenance_expand_name_matcher)
16019 (maintenance_expand_file_matcher): Delete.
16020 (maintenance_expand_symtabs): Use lambdas.
16021 * symtab.c (iterate_over_some_symtabs): Adjust to use
16022 function_view as callback types and return bool.
16023 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
16024 of a cleanup.
16025 (lookup_symtab_callback): Delete.
16026 (lookup_symtab): Use a lambda.
16027 (iterate_over_symbols): Adjust to use function_view as callback
16028 type.
16029 (struct search_symbols_data, search_symbols_file_matches)
16030 (search_symbols_name_matches): Delete.
16031 (search_symbols): Use a pair of lambdas.
16032 (struct add_name_data, add_macro_name, symbol_completion_matcher)
16033 (symtab_expansion_callback): Delete.
16034 (default_make_symbol_completion_list_break_on_1): Use lambdas.
16035 * symtab.h: Include "common/function-view.h".
16036 (iterate_over_some_symtabs): Adjust to use function_view as
16037 callback type and return bool.
16038 (iterate_over_symtabs): Adjust to use function_view as callback
16039 type.
16040 (symbol_found_callback_ftype): Remove 'data' parameter and return
16041 bool.
16042 (iterate_over_symbols): Adjust to use function_view as callback
16043 type.
16044
16045 2017-02-23 Pedro Alves <palves@redhat.com>
16046
16047 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
16048 (%.o) <unittests/%.c>: New pattern.
16049 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
16050 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
16051 * common/function-view.h: New file.
16052 * unittests/function-view-selftests.c: New file.
16053 * configure: Regenerate.
16054
16055 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
16056
16057 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
16058 inferior_ptid.
16059 * go32-nat.c (go32_thread_alive): Likewise.
16060
16061 2017-02-23 Yao Qi <yao.qi@linaro.org>
16062
16063 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
16064 delete.
16065
16066 2017-02-23 Yao Qi <yao.qi@linaro.org>
16067
16068 * varobj.c (varobj_clear_saved_item): Use delete instead of
16069 xfree.
16070 (update_dynamic_varobj_children): Likewise.
16071
16072 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
16073
16074 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
16075
16076 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
16077
16078 * common/enum-flags.h (enum_flags::enum_flags): Initialize
16079 m_enum_value to 0 in default constructor.
16080
16081 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
16082
16083 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
16084 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
16085 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
16086 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
16087 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
16088 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
16089 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
16090 IS_STORE_CONDITIONAL_INSN.
16091
16092 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
16093
16094 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
16095
16096 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16097
16098 * NEWS (Changes since GDB 7.12): Add DWARF-5.
16099
16100 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16101
16102 * dwarf2read.c (skip_one_die, read_attribute_value)
16103 (dwarf2_const_value_attr, dump_die_shallow)
16104 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
16105 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
16106
16107 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16108
16109 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
16110 (dwarf_parse_macro_header): Accept DWARF version 5.
16111 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
16112
16113 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16114
16115 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
16116 DW_AT_GNU_*.
16117 * common/common-exceptions.h (enum errors): Likewise.
16118 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
16119 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
16120 (dwarf_expr_context::execute_stack_op): Likewise.
16121 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
16122 Likewise.
16123 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
16124 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
16125 (show_entry_values_debug, call_site_to_target_addr)
16126 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
16127 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
16128 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
16129 (value_of_dwarf_block_entry, indirect_pieced_value)
16130 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
16131 (disassemble_dwarf_expression): Likewise.
16132 * dwarf2read.c (process_die, inherit_abstract_dies)
16133 (read_call_site_scope): Likewise.
16134 * gdbtypes.h (struct func_type, struct call_site_parameter)
16135 (struct call_site): Likewise.
16136 * stack.c (read_frame_arg): Likewise.
16137 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
16138
16139 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16140
16141 * defs.h (read_unsigned_leb128): New declaration.
16142 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
16143 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
16144 (dwarf2_find_location_expression): Call also
16145 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
16146 * dwarf2loc.h (dwarf2_version): New declaration.
16147 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
16148 rnglists.
16149 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
16150 .debug_rnglists.
16151 (struct dwop_section_names): Add loclists_dwo.
16152 (dwop_section_names): Add .debug_loclists.dwo.
16153 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
16154 (struct dwarf2_per_cu_data): Add dwarf_version.
16155 (struct dwo_sections): Add loclists.
16156 (struct attr_abbrev): Add implicit_const.
16157 (read_indirect_line_string): New declaration.
16158 (read_unsigned_leb128): Delete declaration.
16159 (rcuh_kind): New definition.
16160 (read_and_check_comp_unit_head): Change parameter
16161 is_debug_types_section to section_kind.
16162 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
16163 (read_comp_unit_head): Change parameter abfd to section, add parameter
16164 section_kind. Handle DWARF-5.
16165 (error_check_comp_unit_head): Accept also DWARF version 5.
16166 (read_and_check_comp_unit_head): Change parameter
16167 is_debug_types_section to section_kind.
16168 (read_and_check_type_unit_head): Delete function.
16169 (read_abbrev_offset): Handle DWARF-5.
16170 (create_debug_type_hash_table): Add parameter section_kind. Process
16171 only DW_UT_type. Use signature and type_offset_in_tu from struct
16172 comp_unit_head.
16173 (create_debug_types_hash_table): Update create_debug_type_hash_table
16174 caller.
16175 (create_all_type_units): Call create_debug_type_hash_table.
16176 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
16177 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
16178 caller.
16179 (skip_one_die): Handle DW_FORM_implicit_const.
16180 (dwarf2_rnglists_process): New function.
16181 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
16182 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
16183 (read_attribute_value): Handle DW_FORM_implicit_const,
16184 DW_FORM_line_strp.
16185 (read_attribute): Handle DW_FORM_implicit_const.
16186 (read_indirect_string_at_offset_from): New function from
16187 read_indirect_string_at_offset.
16188 (read_indirect_string_at_offset): Call
16189 read_indirect_string_at_offset_from.
16190 (read_indirect_line_string_at_offset): New function.
16191 (read_indirect_string): New function comment.
16192 (read_indirect_line_string): New function.
16193 (read_unsigned_leb128): Make it global.
16194 (dwarf2_string_attr): Handle DWARF-5.
16195 (add_include_dir_stub, read_formatted_entries): New functions.
16196 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
16197 Handle DWARF-5.
16198 (per_cu_header_read_in): Update read_comp_unit_head caller.
16199 (dwarf2_version): New function.
16200 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
16201 rnglists.
16202 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
16203 fields.
16204
16205 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16206
16207 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
16208
16209 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16210
16211 * dwarf2read.c (dwarf2_ranges_process): New function from
16212 dwarf2_ranges_read.
16213 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
16214 dwarf2_ranges_process.
16215
16216 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16217
16218 * dwarf2read.c (create_debug_type_hash_table): New function from
16219 create_debug_types_hash_table.
16220 (create_debug_types_hash_table): Call create_debug_type_hash_table.
16221 (create_all_type_units, open_and_init_dwo_file): Update
16222 create_debug_types_hash_table callers.
16223
16224 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
16225
16226 PR gdb/16188
16227 * fork-child.c (trace_start_error): Fix thinko. va_end should
16228 refer to 'ap', not 'args'.
16229
16230 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
16231 Pedro Alves <palves@redhat.com>
16232
16233 PR gdb/16188
16234 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
16235 calls succeeded.
16236 * fork-child.c (trace_start_error): New function.
16237 (trace_start_error_with_name): Likewise.
16238 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
16239 * inf-ptrace.c (inf_ptrace_me): Likewise.
16240 * inferior.h (trace_start_error): New prototype.
16241 (trace_start_error_with_name): Likewise.
16242
16243 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
16244
16245 PR gdb/21164
16246 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
16247 NULL before using it.
16248 * symmisc.c (maintenance_print_symbols): Likewise.
16249 (maintenance_print_msymbols): Likewise.
16250
16251 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16252
16253 * NEWS: Add record Python bindings entry.
16254
16255 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16256
16257 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
16258 py-record-full.o.
16259 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
16260 * python/py-record-btrace.c, python/py-record-btrace.h,
16261 python/py-record-full.c, python/py-record-full.h: New file.
16262 * python/py-record.c: Add include for py-record-btrace.h and
16263 py-record-full.h.
16264 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
16265 recpy_instruction_history, recpy_function_call_history, recpy_begin,
16266 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
16267 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
16268 New definition.
16269 (gdbpy_initialize_btrace): New export.
16270 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
16271
16272 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16273
16274 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
16275 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
16276 * python/py-record.c: New file.
16277 * python/python-internal.h (gdbpy_start_recording,
16278 gdbpy_current_recording, gdpy_stop_recording,
16279 gdbpy_initialize_record): New export.
16280 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
16281 (python_GdbMethods): Add gdbpy_start_recording,
16282 gdbpy_current_recording and gdbpy_stop_recording.
16283
16284 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16285
16286 * record-btrace.c (record_btrace_record_method): New function.
16287 (init_record_btrace_ops): Initialize to_record_method.
16288 * record-full.c (record_full_record_method): New function.
16289 (init_record_full_ops, init_record_full_core_ops): Add
16290 record_full_record_method.
16291 * record.h (enum record_method): New enum.
16292 * target-debug.h (target_debug_print_enum_record_method: New define.
16293 * target-delegates.c: Regenerate.
16294 * target.c (target_record_method): New function.
16295 * target.h: Include record.h.
16296 (struct target_ops) <to_record_method>: New field.
16297 (target_record_method): New export.
16298
16299 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16300
16301 * record.h (record_start, record_stop): New export.
16302 * record.c (record_start, record_stop): New function.
16303
16304 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16305
16306 * btrace.c (btrace_fetch): Copy function call segments pointer
16307 into a vector.
16308 (btrace_clear): Clear the vector.
16309 (btrace_find_insn_by_number): Use binary search to find the correct
16310 function call segment.
16311 * btrace.h (brace_fun_p): New typedef.
16312 (struct btrace_thread_info) <functions>: New field.
16313
16314 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16315
16316 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
16317 * btrace.c (btrace_decode_error): ... here. New function.
16318 * btrace.h (btrace_decode_error): New export.
16319
16320 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16321
16322 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
16323 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
16324 btrace_find_insn_by_number): Remove special case for gaps.
16325 * btrace.h (btrace_insn_get_error): New export.
16326 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
16327 * record-btrace.c (btrace_insn_history): Print number for gaps.
16328 (record_btrace_info, record_btrace_goto): Handle gaps.
16329
16330 2017-02-14 Tom Tromey <tom@tromey.com>
16331
16332 PR python/13598:
16333 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
16334 event.
16335 * python/py-evts.c (gdbpy_initialize_py_events): Add
16336 before_prompt registry.
16337 * python/py-events.h (events_object) <before_prompt>: New field.
16338
16339 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
16340
16341 * btrace.c (ftrace_new_switch): Preserve up link and flags.
16342
16343 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
16344
16345 * symfile (_initialize_symfile): Add usage text to the load command's
16346 help text.
16347
16348 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
16349
16350 * utils.c (defaulted_query): Don't query on secondary UIs.
16351
16352 2017-02-10 Tom Tromey <tom@tromey.com>
16353
16354 * rust-lang.c (rust_get_disr_info): Remove unused variable.
16355
16356 2017-02-10 Tom Tromey <tom@tromey.com>
16357
16358 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
16359 "cleanup" local.
16360 * python/py-type.c (typy_legacy_template_argument): Remove
16361 unnecessary "cleanup" local.
16362
16363 2017-02-10 Tom Tromey <tom@tromey.com>
16364
16365 * python/python.c (do_start_initialization): New function, from
16366 _initialize_python.
16367 (_initialize_python): Call do_start_initialization.
16368 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
16369 goto.
16370
16371 2017-02-10 Tom Tromey <tom@tromey.com>
16372
16373 * python/py-prettyprint.c (pretty_print_one_value): Use
16374 gdbpy_ref.
16375
16376 2017-02-10 Tom Tromey <tom@tromey.com>
16377
16378 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
16379 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
16380 gdbpy_ref.
16381 * python/py-type.c (field_new): Use gdbpy_ref.
16382 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
16383 gdbpy_ref.
16384 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
16385 (py_free_pspace): Likewise.
16386 (pspace_to_pspace_object): Likewise.
16387 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
16388 (py_free_objfile): Likewise.
16389 (objfile_to_objfile_object): Likewise.
16390 * python/py-inferior.c (delete_thread_object): Use
16391 gdbpy_ref.
16392 (infpy_read_memory): Likewise.
16393 (py_free_inferior): Likewise.
16394 * python/py-evtregistry.c (create_eventregistry_object): Use
16395 gdbpy_ref.
16396 * python/py-event.c (create_event_object): Use gdbpy_ref.
16397
16398 2017-02-10 Tom Tromey <tom@tromey.com>
16399
16400 * python/py-ref.h (gdbpy_ref_policy): Now a template.
16401 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
16402 used.
16403 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
16404 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
16405 python/py-exitedevent.c, python/py-finishbreakpoint.c,
16406 python/py-framefilter.c, python/py-function.c,
16407 python/py-inferior.c, python/py-infevents.c,
16408 python/py-linetable.c, python/py-newobjfileevent.c,
16409 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
16410 python/py-signalevent.c, python/py-stopevent.c,
16411 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
16412 python/py-unwind.c, python/py-utils.c, python/py-value.c,
16413 python/py-varobj.c, python/py-xmethods.c, python/python.c,
16414 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
16415
16416 2017-02-10 Tom Tromey <tom@tromey.com>
16417
16418 * ui-out.h (ui_out_emit_type): New class.
16419 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
16420 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
16421 and ui_out_emit_tuple.
16422 (enumerate_locals): Likewise.
16423 (py_mi_print_variables, py_print_locals, py_print_args): Use
16424 ui_out_emit_list.
16425 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
16426 ui_out_emit_list.
16427 * common/gdb_optional.h: New file.
16428
16429 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
16430
16431 * MAINTAINERS (Write After Approval): Update my e-mail address.
16432
16433 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
16434
16435 PR gdb/21122
16436 * breakpoint.c (_initialize_breakpoint): Update the help description
16437 of the 'commands' command to indicate that it takes a list argument.
16438
16439 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
16440
16441 * interps.c (current_interp_set_logging): Remove "return".
16442
16443 2017-02-09 Gary Benson <gbenson@redhat.com>
16444
16445 * symtab.c (add_symtab_completions): Prevent NULL pointer
16446 dereference.
16447
16448 2017-02-08 Pedro Alves <palves@redhat.com>
16449
16450 * interps.c (interp::interp): Remove reference to quiet_p.
16451 (interp_set): Make static. Remove dead "Switching to" output
16452 code.
16453 (interp_quiet_p, interp_set_quiet): Delete.
16454 (interpreter_exec_cmd): Don't set the interpreter quiet.
16455 * interps.h (interp_quiet_p): Make static.
16456 (class interp) <quiet_p>: Remove field
16457
16458 2017-02-08 Jerome Guitton <guitton@adacore.com>
16459
16460 * cli/cli-decode.c (find_command_name_length): Make it extern.
16461 * cli/cli-decode.h (find_command_name_length): Declare.
16462 * cli/cli-script.c (command_name_equals, line_first_arg):
16463 New functions.
16464 (process_next_line): Use cli-decode to parse command names.
16465 (build_command_line): Make args a constant pointer.
16466
16467 2017-02-08 Jerome Guitton <guitton@adacore.com>
16468
16469 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
16470 Remove case-insensitive search.
16471
16472 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
16473
16474 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
16475 at the end of the line. Avoids an ARI warning.
16476
16477 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
16478
16479 * NEWS: Mention support for record/replay of Intel 64 rdrand and
16480 rdseed instructions.
16481 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
16482
16483 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
16484
16485 PR tdep/20936
16486 Provide and use sparc32 and sparc64 target description XML files.
16487 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
16488 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
16489 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
16490 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
16491 * features/sparc/sparc32-solaris.xml: New file.
16492 * features/sparc/sparc64-solaris.xml: New file.
16493 * features/sparc/sparc32-solaris.c: Generated.
16494 * features/sparc/sparc64-solaris.c: Generated.
16495 * sparc-tdep.h: Account for differences in target descriptions.
16496 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
16497 (sparc32_register_type): Use target provided registers.
16498 (validate_tdesc_registers): New function.
16499 (sparc32_gdbarch_init): Use tdesc_has_registers.
16500 Set pseudoregister functions.
16501 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
16502 (sparc64_register_type): Use target provided registers.
16503 (sparc64_init_abi): Set pseudoregister functions.
16504
16505 2017-02-03 Tom Tromey <tom@tromey.com>
16506
16507 PR rust/21097:
16508 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
16509 with a single member.
16510
16511 2017-02-03 Pedro Alves <palves@redhat.com>
16512
16513 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
16514 (cli_interp_base::~cli_interp_base): New.
16515 (cli_interp): New struct.
16516 (as_cli_interp): Cast the interp itself to cli_interp.
16517 (cli_interpreter_pre_command_loop): Rename to ...
16518 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
16519 parameter.
16520 (cli_interpreter_init): Rename to ...
16521 (cli_interp::init): ... this. Remove 'self' parameter. Use
16522 boolean. Make extern.
16523 (cli_interpreter_resume): Rename to ...
16524 (cli_interp::resume): ... this. Remove 'data' parameter. Make
16525 extern.
16526 (cli_interpreter_suspend): Rename to ...
16527 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
16528 extern.
16529 (cli_interpreter_exec): Rename to ...
16530 (cli_interp::exec): ... this. Remove 'data' parameter. Make
16531 extern.
16532 (cli_interpreter_supports_command_editing): Rename to ...
16533 (cli_interp_base::supports_command_editing): ... this. Remove
16534 'interp' parameter. Make extern.
16535 (cli_ui_out): Rename to ...
16536 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
16537 Make extern.
16538 (cli_set_logging): Rename to ...
16539 (cli_interp_base::set_logging): ... this. Remove 'interp'
16540 parameter. Make extern.
16541 (cli_interp_procs): Delete.
16542 (cli_interp_factory): Adjust to use "new".
16543 * cli/cli-interp.h: Include "interps.h".
16544 (struct cli_interp_base): New struct.
16545 * interps.c (struct interp): Delete. Fields moved to interps.h.
16546 (interp_new): Delete.
16547 (interp::interp, interp::~interp): New.
16548 (interp_set): Use bool, and return void. Assume the interpreter
16549 has suspend, init and resume methods, and that the all return
16550 void.
16551 (set_top_level_interpreter): interp_set returns void.
16552 (interp_ui_out): Adapt.
16553 (current_interp_set_logging): Adapt.
16554 (interp_data): Delete.
16555 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
16556 (interp_exec): Adapt.
16557 (top_level_interpreter_data): Delete.
16558 * interps.h (interp_init_ftype, interp_resume_ftype)
16559 (interp_suspend_ftype, interp_exec_ftype)
16560 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
16561 (class interp): New.
16562 (interp_new): Delete.
16563 (interp_set): Now returns void. Use bool.
16564 (interp_data, top_level_interpreter_data): Delete.
16565 * mi/mi-common.h: Include interps.h.
16566 (class mi_interp): Inherit from interp. Define a ctor. Declare
16567 init, resume, suspect, exec, interp_ui_out, set_logging and
16568 pre_command_loop methods.
16569 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
16570 (mi_interpreter_init): Rename to ...
16571 (mi_interp::init): ... this. Remove the 'interp' parameter, use
16572 bool, return void and make extern. Adjust.
16573 (mi_interpreter_resume): ... Rename to ...
16574 (mi_interp::resume): ... this. Remove the 'data' parameter,
16575 return void and make extern. Adjust.
16576 (mi_interpreter_suspend): ... Rename to ...
16577 (mi_interp::suspend): ... this. Remove the 'data' parameter,
16578 return void and make extern. Adjust.
16579 (mi_interpreter_exec): ... Rename to ...
16580 (mi_interp::exec): ... this. Remove the 'data' parameter and make
16581 extern. Adjust.
16582 (mi_interpreter_pre_command_loop): ... Rename to ...
16583 (mi_interp::pre_command_loop): ... this. Remove the 'self'
16584 parameter and make extern.
16585 (mi_on_normal_stop_1): Adjust.
16586 (mi_ui_out): Rename to ...
16587 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
16588 parameter and make extern. Adjust.
16589 (mi_set_logging): Rename to ...
16590 (mi_interp::set_logging): ... this. Remove the 'interp'
16591 parameter and make extern. Adjust.
16592 (mi_interp_procs): Delete.
16593 (mi_interp_factory): Adjust to use 'new'.
16594 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
16595 (mi_print_exception, mi_execute_command, mi_load_progress):
16596 Adjust.
16597 * tui/tui-interp.c (tui_interp): New class.
16598 (as_tui_interp): Return a tui_interp pointer.
16599 (tui_on_normal_stop, tui_on_signal_received)
16600 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
16601 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
16602 to use interp::interp_ui_out.
16603 (tui_init): Rename to ...
16604 (tui_interp::init): ... this. Remove the 'self' parameter, use
16605 bool, return void and make extern. Adjust.
16606 (tui_resume): Rename to ...
16607 (tui_interp::resume): ... this. Remove the 'data' parameter,
16608 return void and make extern. Adjust.
16609 (tui_suspend): Rename to ...
16610 (tui_interp::suspend): ... this. Remove the 'data' parameter,
16611 return void and make extern. Adjust.
16612 (tui_ui_out): Rename to ...
16613 (tui_interp::interp_ui_out): ... this. Remove the 'self'
16614 parameter, and make extern. Adjust.
16615 (tui_exec): Rename to ...
16616 (tui_interp::exec): ... this. Remove the 'data' parameter and
16617 make extern.
16618 (tui_interp_procs): Delete.
16619 (tui_interp_factory): Use "new".
16620
16621 2017-02-02 Tom Tromey <tom@tromey.com>
16622
16623 * rust-exp.y (ends_raw_string, space_then_number)
16624 (rust_identifier_start_p): Return bool.
16625 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
16626 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
16627 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
16628 (rust_chartype_p): Return bool.
16629 (val_print_struct, rust_print_struct_def, rust_print_type):
16630 Update.
16631 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
16632 Return bool.
16633
16634 2017-02-02 Tom Tromey <tom@tromey.com>
16635
16636 * rust-lang.c: Reindent.
16637
16638 2017-02-02 Tom Tromey <tom@tromey.com>
16639
16640 * rust-lang.h (rust_crate_for_block): Update.
16641 * rust-lang.c (rust_crate_for_block): Return std::string.
16642 (rust_get_disr_info): Use std:;string, not
16643 gdb::unique_xmalloc_ptr.
16644 * rust-exp.y (crate_name): Update.
16645
16646 2017-02-02 Pedro Alves <palves@redhat.com>
16647
16648 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
16649 field out of gdb_disassembler_test and make it static.
16650
16651 2017-02-02 Pedro Alves <palves@redhat.com>
16652
16653 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
16654 mi1_interp and mi_interp fields.
16655
16656 2017-02-02 Pedro Alves <palves@redhat.com>
16657
16658 * cli/cli-interp.c (struct saved_output_files, saved_output):
16659 Moved from cli/cli-logging.c.
16660 (cli_set_logging): New function.
16661 (cli_interp_procs): Install cli_set_logging.
16662 * cli/cli-interp.h (make_logging_output, cli_set_logging):
16663 Declare.
16664 * cli/cli-logging.c (struct saved_output_files, saved_output):
16665 Moved to cli/cli-interp.c.
16666 (pop_output_files): Don't save outputs here.
16667 (make_logging_output): New function.
16668 (handle_redirections): Don't build tee nor save previous outputs
16669 here.
16670 * interps.c (current_interp_set_logging): Change prototype.
16671 Assume there's always a set_logging_proc method installed.
16672 * interps.h (interp_set_logging_ftype): Change prototype.
16673 (current_interp_set_logging): Change prototype and adjust comment.
16674 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
16675 use make_logging_output.
16676 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
16677 2017-02-02 Pedro Alves <palves@redhat.com>
16678
16679 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
16680 from ...
16681 (set_logging_overwrite): ... here.
16682 (logging_no_redirect_file): Delete.
16683 (set_logging_redirect): Don't handle redirection on the fly.
16684 Instead warn that "logging off" / "logging on" is necessary.
16685 (pop_output_files): Delete references to logging_no_redirect_file.
16686 (show_logging_command): Always speak in terms of what will happen
16687 once logging is reenabled.
16688
16689 2017-02-02 Pedro Alves <palves@redhat.com>
16690
16691 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
16692
16693 2017-02-02 Pedro Alves <palves@redhat.com>
16694
16695 * disasm.c (gdb_pretty_print_insn): Rename to ...
16696 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
16697 Remove gdbarch parameter. Adapt to clear the object's buffers
16698 instead of allocating new buffers, and to print using the object's
16699 gdb_disassembler instead of calling gdb_print_insn.
16700 (dump_insns): Use gdb_pretty_print_disassembler.
16701 * disasm.h (gdb_pretty_print_insn): Delete declaration.
16702 (gdb_pretty_print_disassembler): New class.
16703 * record-btrace.c (btrace_insn_history): Use
16704 gdb_pretty_print_disassembler.
16705
16706 2017-02-02 Pedro Alves <palves@redhat.com>
16707
16708 * ada-lang.c (type_as_string): Use string_file.
16709 * ada-valprint.c (ada_print_floating): Use string_file.
16710 * ada-varobj.c (ada_varobj_scalar_image)
16711 (ada_varobj_get_value_image): Use string_file.
16712 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
16713 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
16714 * breakpoint.c (update_inserted_breakpoint_locations)
16715 (insert_breakpoint_locations, reattach_breakpoints)
16716 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
16717 (print_it_watchpoint): Use string_file.
16718 (save_breakpoints): Use stdio_file.
16719 * c-exp.y (oper): Use string_file.
16720 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
16721 tee_file.
16722 (pop_output_files): Use delete.
16723 (handle_redirections): Use stdio_file and tee_file.
16724 * cli/cli-setshow.c (do_show_command): Use string_file.
16725 * compile/compile-c-support.c (c_compute_program): Use
16726 string_file.
16727 * compile/compile-c-symbols.c (generate_vla_size): Take a
16728 'string_file &' instead of a 'ui_file *'.
16729 (generate_c_for_for_one_variable): Take a 'string_file &' instead
16730 of a 'ui_file *'. Use string_file.
16731 (generate_c_for_variable_locations): Take a 'string_file &'
16732 instead of a 'ui_file *'.
16733 * compile/compile-internal.h (generate_c_for_for_one_variable):
16734 Take a 'string_file &' instead of a 'ui_file *'.
16735 * compile/compile-loc2c.c (push, pushf, unary, binary)
16736 (print_label, pushf_register_address, pushf_register)
16737 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
16738 'ui_file *'. Adjust.
16739 * compile/compile.c (compile_to_object): Use string_file.
16740 * compile/compile.h (compile_dwarf_expr_to_c)
16741 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
16742 'ui_file *'.
16743 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
16744 (replace_typedefs_qualified_name): Use string_file and
16745 obstack_copy0.
16746 * disasm.c (gdb_pretty_print_insn): Use string_file.
16747 (gdb_disassembly): Adjust reference the null_stream global.
16748 (do_ui_file_delete): Delete.
16749 (gdb_insn_length): Use null_stream.
16750 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
16751 * dwarf2loc.c (dwarf2_compile_property_to_c)
16752 (locexpr_generate_c_location, loclist_generate_c_location): Take a
16753 'string_file &' instead of a 'ui_file *'.
16754 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
16755 * dwarf2read.c (do_ui_file_peek_last): Delete.
16756 (dwarf2_compute_name): Use string_file.
16757 * event-top.c (gdb_setup_readline): Use stdio_file.
16758 * gdbarch.sh (verify_gdbarch): Use string_file.
16759 * gdbtypes.c (safe_parse_type): Use null_stream.
16760 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
16761 string_file.
16762 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
16763 'string_file *' instead of a 'ui_file *'.
16764 (gdbscm_arch_disassemble): Use string_file.
16765 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
16766 * guile/scm-ports.c (class ioscm_file_port): Now a class that
16767 inherits from ui_file.
16768 (ioscm_file_port_delete, ioscm_file_port_rewind)
16769 (ioscm_file_port_put): Delete.
16770 (ioscm_file_port_write): Rename to ...
16771 (ioscm_file_port::write): ... this. Remove file_port_magic
16772 checks.
16773 (ioscm_file_port_new): Delete.
16774 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
16775 ui_file_up.
16776 * guile/scm-type.c (tyscm_type_name): Use string_file.
16777 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
16778 Use string_file.
16779 * infcmd.c (print_return_value_1): Use string_file.
16780 * infrun.c (print_target_wait_results): Use string_file.
16781 * language.c (add_language): Use string_file.
16782 * location.c (explicit_to_string_internal): Use string_file.
16783 * main.c (captured_main_1): Use null_file.
16784 * maint.c (maintenance_print_architecture): Use stdio_file.
16785 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
16786 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
16787 event_channel>: Change type to mi_console_file pointer.
16788 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
16789 (mi_console_file_delete): Delete.
16790 (struct mi_console_file): Delete.
16791 (mi_console_file_magic): Delete.
16792 (mi_console_file_new): Delete.
16793 (mi_console_file::mi_console_file): New.
16794 (mi_console_file_delete): Delete.
16795 (mi_console_file_fputs): Delete.
16796 (mi_console_file::write): New.
16797 (mi_console_raw_packet): Delete.
16798 (mi_console_file::flush): New.
16799 (mi_console_file_flush): Delete.
16800 (mi_console_set_raw): Rename to ...
16801 (mi_console_file::set_raw): ... this.
16802 * mi/mi-console.h (class mi_console_file): New class.
16803 (mi_console_file_new, mi_console_set_raw): Delete.
16804 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
16805 (mi_set_logging): Use delete and tee_file. Adjust.
16806 * mi/mi-main.c (output_register): Use string_file.
16807 (mi_cmd_data_evaluate_expression): Use string_file.
16808 (mi_cmd_data_read_memory): Use string_file.
16809 (mi_cmd_execute, print_variable_or_computed): Use string_file.
16810 * mi/mi-out.c (mi_ui_out::main_stream): New.
16811 (mi_ui_out::rewind): Use main_stream and
16812 string_file.
16813 (mi_ui_out::put): Use main_stream and string_file.
16814 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16815 Allocate a 'string_file' instead.
16816 (mi_out_new): Don't allocate a mem_fileopen stream here.
16817 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16818 (mi_ui_out::main_stream): Declare method.
16819 * printcmd.c (eval_command): Use string_file.
16820 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
16821 * python/py-arch.c (archpy_disassemble): Use string_file.
16822 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
16823 * python/py-frame.c (frapy_str): Use string_file.
16824 * python/py-framefilter.c (py_print_type, py_print_single_arg):
16825 Use string_file.
16826 * python/py-type.c (typy_str): Use string_file.
16827 * python/py-unwind.c (unwind_infopy_str): Use string_file.
16828 * python/py-value.c (valpy_str): Use string_file.
16829 * record-btrace.c (btrace_insn_history): Use string_file.
16830 * regcache.c (regcache_print): Use stdio_file.
16831 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
16832 * remote.c (escape_buffer): Use string_file.
16833 * rust-lang.c (rust_get_disr_info): Use string_file.
16834 * serial.c (serial_open_ops_1): Use stdio_file.
16835 (do_serial_close): Use delete.
16836 * stack.c (print_frame_arg): Use string_file.
16837 (print_frame_args): Remove local mem_fileopen stream, not used.
16838 (print_frame): Use string_file.
16839 * symmisc.c (maintenance_print_symbols): Use stdio_file.
16840 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
16841 Take a 'string_file *' instead of a 'ui_file *'.
16842 * top.c (new_ui): Use stdio_file and stderr_file.
16843 (free_ui): Use delete.
16844 (execute_command_to_string): Use string_file.
16845 (quit_confirm): Use string_file.
16846 * tracepoint.c (collection_list::append_exp): Use string_file.
16847 * tui/tui-disasm.c (tui_disassemble): Use string_file.
16848 * tui/tui-file.c: Don't include "ui-file.h".
16849 (enum streamtype, struct tui_stream): Delete.
16850 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
16851 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
16852 (tui_file::tui_file): New method.
16853 (tui_file_fputs): Delete.
16854 (tui_file_get_strbuf): Delete.
16855 (tui_file::puts): New method.
16856 (tui_file_adjust_strbuf): Delete.
16857 (tui_file_flush): Delete.
16858 (tui_file::flush): New method.
16859 * tui/tui-file.h: Tweak intro comment.
16860 Include ui-file.h.
16861 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
16862 (tui_file_adjust_strbuf): Delete declarations.
16863 (class tui_file): New class.
16864 * tui/tui-io.c (tui_initialize_io): Use tui_file.
16865 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
16866 (tui_register_format): Use string_stream.
16867 * tui/tui-stack.c (tui_make_status_line): Use string_file.
16868 (tui_get_function_from_frame): Use string_file.
16869 * typeprint.c (type_to_string): Use string_file.
16870 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
16871 (null_stream): New global.
16872 (ui_file_delete): Delete.
16873 (ui_file::ui_file): New.
16874 (null_file_isatty): Delete.
16875 (ui_file::~ui_file): New.
16876 (null_file_rewind): Delete.
16877 (ui_file::printf): New.
16878 (null_file_put): Delete.
16879 (null_file_flush): Delete.
16880 (ui_file::putstr): New.
16881 (null_file_write): Delete.
16882 (ui_file::putstrn): New.
16883 (null_file_read): Delete.
16884 (ui_file::putc): New.
16885 (null_file_fputs): Delete.
16886 (null_file_write_async_safe): Delete.
16887 (ui_file::vprintf): New.
16888 (null_file_delete): Delete.
16889 (null_file::write): New.
16890 (null_file_fseek): Delete.
16891 (null_file::puts): New.
16892 (ui_file_data): Delete.
16893 (null_file::write_async_safe): New.
16894 (gdb_flush, ui_file_isatty): Adjust.
16895 (ui_file_put, ui_file_rewind): Delete.
16896 (ui_file_write): Adjust.
16897 (ui_file_write_for_put): Delete.
16898 (ui_file_write_async_safe, ui_file_read): Adjust.
16899 (ui_file_fseek): Delete.
16900 (fputs_unfiltered): Adjust.
16901 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
16902 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
16903 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
16904 (set_ui_file_data): Delete.
16905 (string_file::~string_file, string_file::write)
16906 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
16907 (do_ui_file_as_string, ui_file_as_string): Delete.
16908 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
16909 (struct mem_file): Delete.
16910 (mem_file_new): Delete.
16911 (stdio_file::stdio_file): New.
16912 (mem_file_delete): Delete.
16913 (stdio_file::stdio_file): New.
16914 (mem_fileopen): Delete.
16915 (stdio_file::~stdio_file): New.
16916 (mem_file_rewind): Delete.
16917 (stdio_file::set_stream): New.
16918 (mem_file_put): Delete.
16919 (stdio_file::open): New.
16920 (mem_file_write): Delete.
16921 (stdio_file_magic, struct stdio_file): Delete.
16922 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
16923 (stdio_file::flush): New.
16924 (stdio_file_read): Rename to ...
16925 (stdio_file::read): ... this. Adjust.
16926 (stdio_file_write): Rename to ...
16927 (stdio_file::write): ... this. Adjust.
16928 (stdio_file_write_async_safe): Rename to ...
16929 (stdio_file::write_async_safe) ... this. Adjust.
16930 (stdio_file_fputs): Rename to ...
16931 (stdio_file::puts) ... this. Adjust.
16932 (stdio_file_isatty): Delete.
16933 (stdio_file_fseek): Delete.
16934 (stdio_file::isatty): New.
16935 (stderr_file_write): Rename to ...
16936 (stderr_file::write) ... this. Adjust.
16937 (stderr_file_fputs): Rename to ...
16938 (stderr_file::puts) ... this. Adjust.
16939 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
16940 (stderr_file::stderr_file): New.
16941 (tee_file_magic): Delete.
16942 (struct tee_file): Delete.
16943 (tee_file::tee_file): New.
16944 (tee_file_new): Delete.
16945 (tee_file::~tee_file): New.
16946 (tee_file_delete): Delete.
16947 (tee_file_flush): Rename to ...
16948 (tee_file::flush): ... this. Adjust.
16949 (tee_file_write): Rename to ...
16950 (tee_file::write): ... this. Adjust.
16951 (tee_file::write_async_safe): New.
16952 (tee_file_fputs): Rename to ...
16953 (tee_file::puts): ... this. Adjust.
16954 (tee_file_isatty): Rename to ...
16955 (tee_file::isatty): ... this. Adjust.
16956 * ui-file.h (struct obstack, struct ui_file): Don't
16957 forward-declare.
16958 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
16959 (ui_file_write_ftype)
16960 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
16961 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
16962 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
16963 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
16964 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
16965 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
16966 (set_ui_file_fseek): Delete.
16967 (ui_file_data, ui_file_delete, ui_file_rewind)
16968 (struct ui_file): New.
16969 (ui_file_up): New.
16970 (class null_file): New.
16971 (null_stream): Declare.
16972 (ui_file_write_for_put, ui_file_put): Delete.
16973 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
16974 Delete.
16975 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
16976 (gdb_fopen, tee_file_new): Delete.
16977 (struct string_file): New.
16978 (struct stdio_file): New.
16979 (stdio_file_up): New.
16980 (struct stderr_file): New.
16981 (class tee_file): New.
16982 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
16983 of a 'ui_file *'. Adjust.
16984 * ui-out.h (class ui_out) <field_stream>: Likewise.
16985 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
16986 (null_stream): Delete.
16987 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
16988 Adjust.
16989 * utils.h (struct ui_file): Delete forward declaration..
16990 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
16991 (error_stream): Take a 'string_file &' instead of a
16992 'ui_file *'.
16993 * varobj.c (varobj_value_get_print_value): Use string_file.
16994 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
16995 * gdbarch.c: Regenerate.
16996
16997 2017-02-02 Pedro Alves <palves@redhat.com>
16998
16999 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
17000 (gdb_pretty_print_insn): ... this. Now a free function. Add back
17001 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
17002 Adjust to call gdb_print_insn instead of
17003 gdb_disassembler::print_insn.
17004 (dump_insns, do_mixed_source_and_assembly_deprecated)
17005 (do_mixed_source_and_assembly, do_assembly_only): Add back a
17006 'gdbarch' parameter. Remove gdb_disassembler parameter.
17007 (gdb_disassembly): Don't allocate a gdb_disassembler here.
17008 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
17009 declaration.
17010 (gdb_pretty_print_insn): Re-add declaration.
17011 * record-btrace.c (btrace_insn_history): Don't allocate a
17012 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
17013
17014 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
17015
17016 * disasm.h (gdb_disassembly): Remove file_string parameter.
17017 * disasm.c (gdb_disassembly): Likewise.
17018 * cli/cli-cmds.c (print_disassembly): Adapt.
17019 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
17020 * stack.c (do_gdb_disassembly): Likewise.
17021
17022 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
17023
17024 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
17025 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
17026 targets. And if the implicit value is longer than needed, extract
17027 the first bytes instead of the "least significant" ones.
17028
17029 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
17030
17031 * btrace.c (btrace_enable): Do not call btrace_add_pc for
17032 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
17033 (btrace_fetch): Assert can_access_registers_ptid.
17034 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
17035 validate_registers_access.
17036
17037 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
17038
17039 * gdbthread.h (can_access_registers_ptid): New.
17040 * thread.c (can_access_registers_ptid): New.
17041
17042 2017-02-01 Pedro Alves <palves@redhat.com>
17043
17044 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
17045
17046 2017-01-31 Pedro Alves <palves@redhat.com>
17047
17048 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
17049 Fix typos.
17050
17051 2017-01-31 Pedro Alves <palves@redhat.com>
17052
17053 * stack.c (print_frame_args): Remove local mem_fileopen stream,
17054 not used.
17055
17056 2017-01-31 Pedro Alves <palves@redhat.com>
17057
17058 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
17059
17060 2017-01-31 Pedro Alves <palves@redhat.com>
17061
17062 * common/scoped_restore.h
17063 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
17064 change the value's parameter type to T2.
17065 (make_scoped_restore): Likewise.
17066
17067 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
17068 Richard Henderson <rth@redhat.com>
17069
17070 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
17071 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
17072 GS_BASE for older kernels.
17073 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
17074 GS_BASE for older kernels.
17075 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
17076 and GS_BASE to the offset table.
17077 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
17078 system register group.
17079 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
17080 for older kernels.
17081 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
17082 amd64 ABI.
17083 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
17084 AMD64_GSBASE_REGNUM.
17085 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
17086 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
17087 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
17088 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
17089 i386/64bit-segments.xml in those rules.
17090 * features/i386/64bit-segments.xml: New file.
17091 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
17092 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
17093 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
17094 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
17095 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
17096 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
17097 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
17098 * features/i386/amd64-avx-linux.c: Regenerated.
17099 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
17100 * features/i386/amd64-avx-mpx.c: Regenerated.
17101 * features/i386/amd64-avx512-linux.c: Regenerated.
17102 * features/i386/amd64-linux.c: Regenerated.
17103 * features/i386/amd64-mpx-linux.c: Regenerated.
17104 * features/i386/i386-avx-mpx-linux.c: Regenerated.
17105 * features/i386/i386-avx-mpx.c: Regenerated.
17106 * features/i386/x32-avx-linux.c: Regenerated.
17107 * features/i386/x32-avx512-linux.c: Regenerated.
17108 * regformats/i386/amd64-avx-linux.dat: Regenerated.
17109 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
17110 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
17111 * regformats/i386/amd64-linux.dat: Regenerated.
17112 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
17113 * regformats/i386/x32-avx-linux.dat: Regenerated.
17114 * regformats/i386/x32-avx512-linux.dat: Regenerated.
17115 * regformats/i386/x32-linux.dat: Regenerated.
17116
17117 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
17118
17119 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
17120 Set to AMD64_NUM_REGS.
17121
17122 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
17123
17124 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
17125 that checks validity of a register number.
17126
17127 2017-01-27 Kees Cook <keescook@google.com>
17128
17129 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
17130 fetch_fpregs if target has fpa registers.
17131 (arm_linux_store_inferior_registers): Call store_fpregs if target
17132 has fpa registers.
17133
17134 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
17135
17136 * cris-tdep.c (cris_gdbarch_init): Remove check for
17137 info.byte_order and force it to BFD_ENDIAN_LITTLE.
17138
17139 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
17140
17141 * corelow.c (get_core_register_section): Check for regset
17142 existence before checking for REGSET_VARIABLE_SIZE.
17143
17144 2017-01-26 Yao Qi <yao.qi@linaro.org>
17145 Pedro Alves <palves@redhat.com>
17146
17147 PR gdb/20939
17148 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
17149 call memory_error, save memaddr instead.
17150 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
17151 negative, cal memory_error.
17152 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
17153
17154 2017-01-26 Yao Qi <yao.qi@linaro.org>
17155
17156 * disasm-selftests.c (memory_error_test): New function.
17157 (_initialize_disasm_selftests): Register memory_error_test.
17158
17159 2017-01-26 Yao Qi <yao.qi@linaro.org>
17160
17161 * Makefile.in (SFILES): Add disasm-selftests.c and
17162 selftest-arch.c.
17163 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
17164 * disasm-selftests.c: New file.
17165 * selftest-arch.c: New file.
17166 * selftest-arch.h: New file.
17167
17168 2017-01-26 Yao Qi <yao.qi@linaro.org>
17169
17170 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
17171 to bfd_arch_mep. Don't return 0 if section is not
17172 found. Call print_insn_mep.
17173
17174 2017-01-26 Pedro Alves <palves@redhat.com>
17175 Yao Qi <yao.qi@linaro.org>
17176
17177 * arm-tdep.c: Include "disasm.h".
17178 (gdb_print_insn_arm): Update code to get gdbarch.
17179 * disasm.c (dis_asm_read_memory): Change it to
17180 gdb_disassembler::dis_asm_read_memory.
17181 (dis_asm_memory_error): Likewise.
17182 (dis_asm_print_address): Likewise.
17183 (gdb_pretty_print_insn): Change it to
17184 gdb_disassembler::pretty_print_insn.
17185 (dump_insns): Add one argument gdb_disassemlber. All
17186 callers updated.
17187 (do_mixed_source_and_assembly_deprecated): Likewise.
17188 (do_mixed_source_and_assembly): Likewise.
17189 (do_assembly_only): Likewise.
17190 (gdb_disassembler::gdb_disassembler): New.
17191 (gdb_disassembler::print_insn): New.
17192 * disasm.h (class gdb_disassembler): New.
17193 (gdb_pretty_print_insn): Remove declaration.
17194 (gdb_disassemble_info): Likewise.
17195 * guile/scm-disasm.c (class gdbscm_disassembler): New.
17196 (gdbscm_disasm_read_memory_worker): Update.
17197 (gdbscm_disasm_read_memory): Update.
17198 (gdbscm_disasm_memory_error): Remove.
17199 (gdbscm_disasm_print_address): Remove.
17200 (gdbscm_disassembler::gdbscm_disassembler): New.
17201 (gdbscm_print_insn_from_port): Update.
17202 * mips-tdep.c: Include disasm.h.
17203 (gdb_print_insn_mips): Update code to get gdbarch.
17204 * record-btrace.c (btrace_insn_history): Update.
17205 * spu-tdep.c: Include disasm.h.
17206 (struct spu_dis_asm_data): Remove.
17207 (struct spu_dis_asm_info): New.
17208 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
17209 SPU id.
17210 (gdb_print_insn_spu): Cast disassemble_info to
17211 spu_dis_asm_info.
17212
17213 2017-01-26 Yao Qi <yao.qi@linaro.org>
17214
17215 * disasm.c (do_ui_file_delete): Delete.
17216 (gdb_insn_length): Move code creating stream to ...
17217 * utils.c (null_stream): ... here. New function.
17218 * utils.h (null_stream): Declare.
17219
17220 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
17221
17222 * python/py-inferior.c (find_thread_object): Return directly
17223 from the loop. Remove "found" variable.
17224
17225 2017-01-21 Joel Brobecker <brobecker@adacore.com>
17226
17227 GDB 7.12.1 released.
17228
17229 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
17230
17231 * python/py-function.c (fnpy_call): Reorder declarations to have
17232 the gdbpy_enter object declared first.
17233 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
17234
17235 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
17236
17237 PR python/21068
17238 * python/python-internal.h (PyMem_RawMalloc): Define for
17239 Python < 3.4.
17240 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
17241 PyMem_RawMalloc instead of PyMem_Malloc.
17242
17243 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
17244 Luis Machado <lgustavo@codesourcery.com>
17245
17246 * NEWS (New commands): Mention flash-erase.
17247 (New MI commands): Mention target-flash-erase.
17248 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
17249 command.
17250 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
17251 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
17252 * target.c (flash_erase_command): New function.
17253 (initialize_targets): Add new flash-erase command.
17254 * target.h (flash_erase_command): New declaration.
17255
17256 2017-01-20 Joel Brobecker <brobecker@adacore.com>
17257
17258 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
17259 HAVE_SYS_PROCFS_H is defined.
17260
17261 2017-01-18 Alan Hayward <alan.hayward@arm.com>
17262
17263 * remote.c (struct cached_reg): Change data into a pointer.
17264 * (stop_reply_dtr): Free data pointers before deleting vector.
17265 (process_stop_reply): Likewise.
17266 (remote_parse_stop_reply): Allocate space for data
17267
17268 2017-01-18 Alan Hayward <alan.hayward@arm.com>
17269
17270 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
17271 MAX_REGISTER_SIZE.
17272 (amd64_pseudo_register_read_value): Likewise.
17273 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
17274 (store_register_using_P): Likewise.
17275 * regcache.c (regcache_xfer_part): Likewise.
17276
17277 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
17278
17279 Split real and pseudo registers.
17280 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
17281 (sparc32_pseudo_regnum): New enum.
17282 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
17283 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
17284 (SPARC32_CP0_REGISTERS): New macro.
17285 (sparc32_pseudo_register_name): New function.
17286 (sparc32_register_name): Use sparc32_pseudo_register_name.
17287 (sparc32_pseudo_register_type): New function.
17288 (sparc32_register_type): Use sparc32_pseudo_register_type.
17289 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
17290 pseudo register numbers.
17291 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
17292 (SPARC64_CP0_REGISTERS): New macro.
17293 (sparc64_pseudo_register_name): New function.
17294 (sparc64_register_name): Use sparc64_pseudo_register_name.
17295 (sparc64_pseudo_register_type): New function.
17296 (sparc64_register_type): Use sparc64_pseudo_register_type.
17297 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
17298 pseudo register numbers.
17299 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
17300 sparc64_store_arguments): Handle pseudo register numbers.
17301
17302 2017-01-13 Yao Qi <yao.qi@linaro.org>
17303
17304 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
17305 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
17306 output.
17307 (getpkt_or_notif_sane_1): Likewise.
17308
17309 2017-01-13 Yao Qi <yao.qi@linaro.org>
17310
17311 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
17312 of CC. Pass "-x c++-header" instead of "-x c".
17313
17314 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17315
17316 * remote.c (remote_can_async_p): Update comment.
17317
17318 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17319
17320 * linux-nat.c (linux_nat_can_async_p): Update comment.
17321
17322 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17323
17324 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
17325
17326 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
17327
17328 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
17329
17330 2017-01-10 Tom Tromey <tom@tromey.com>
17331
17332 * python/py-type.c (typy_legacy_template_argument): Update.
17333 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
17334 ~demangle_parse_info): Declare new members.
17335 (cp_demangled_name_to_comp): Return unique_ptr.
17336 (cp_demangled_name_parse_free)
17337 (make_cleanup_cp_demangled_name_parse_free)
17338 (cp_new_demangle_parse_info): Remove.
17339 * cp-support.c (do_demangled_name_parse_free_cleanup)
17340 (make_cleanup_cp_demangled_name_parse_free): Remove.
17341 (inspect_type, cp_canonicalize_string_full)
17342 (cp_canonicalize_string): Update.
17343 (mangled_name_to_comp): Change return type.
17344 (cp_class_name_from_physname, method_name_from_physname)
17345 (cp_func_name, cp_remove_params): Update.
17346 * cp-name-parser.y (demangle_parse_info): New constructor, from
17347 cp_new_demangle_parse_info.
17348 (~demangle_parse_info): New destructor, from
17349 cp_demangled_name_parse_free.
17350 (cp_merge_demangle_parse_infos): Update.
17351 (cp_demangled_name_to_comp): Change return type.
17352
17353 2017-01-10 Tom Tromey <tom@tromey.com>
17354
17355 * top.c (prevent_dont_repeat): Change return type.
17356 * python/python.c (execute_gdb_command): Use std::string.
17357 Update.
17358 * guile/guile.c (gdbscm_execute_gdb_command): Update.
17359 * command.h (prevent_dont_repeat): Change return type.
17360 * breakpoint.c (bpstat_do_actions_1): Update.
17361
17362 2017-01-10 Tom Tromey <tom@tromey.com>
17363
17364 * value.h (scoped_value_mark::~scoped_value_mark): Call
17365 free_to_mark.
17366 (scoped_value_mark::free_to_mark): New method.
17367 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
17368 scoped_value_mark.
17369
17370 2017-01-10 Tom Tromey <tom@tromey.com>
17371
17372 * python/py-value.c (valpy_dereference, valpy_referenced_value)
17373 (valpy_reference_value, valpy_const_value, valpy_get_address)
17374 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
17375 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
17376 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
17377 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
17378 scoped_value_mark.
17379 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
17380 * value.h (scoped_value_mark): New class.
17381
17382 2017-01-10 Tom Tromey <tom@tromey.com>
17383
17384 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
17385 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
17386 * psymtab.c (discard_psymtabs_upto): Remove.
17387 (make_cleanup_discard_psymtabs): Remove.
17388 (struct psymtab_state): Remove.
17389
17390 2017-01-10 Tom Tromey <tom@tromey.com>
17391
17392 * record-full.c (record_full_save_cleanups): Remove.
17393 (record_full_save): Use gdb::unlinker.
17394 * gcore.c (do_bfd_delete_cleanup): Remove.
17395 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
17396 cleanups.
17397 * dwarf2read.c (unlink_if_set): Remove.
17398 (write_psymtabs_to_index): Use gdb::unlinker.
17399 * common/gdb_unlinker.h: New file.
17400
17401 2017-01-10 Tom Tromey <tom@tromey.com>
17402
17403 * windows-tdep.c (windows_xfer_shared_library): Update.
17404 * windows-nat.c (windows_make_so): Update.
17405 * utils.h (make_cleanup_bfd_unref): Remove.
17406 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
17407 * symfile.h (symfile_bfd_open)
17408 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
17409 * symfile.c (read_symbols, symbol_file_add)
17410 (separate_debug_file_exists): Update.
17411 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
17412 (generic_load, reread_symbols): Update.
17413 * symfile-mem.c (symbol_file_add_from_memory): Update.
17414 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
17415 (spu_symbol_file_add_from_memory): Update.
17416 * solist.h (struct target_so_ops) <bfd_open>: Return
17417 gdb_bfd_ref_ptr.
17418 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
17419 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
17420 gdb_bfd_ref_ptr.
17421 (solib_map_sections, reload_shared_libraries_1): Update.
17422 * solib-svr4.c (enable_break): Update.
17423 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
17424 * solib-frv.c (enable_break2): Update.
17425 * solib-dsbt.c (enable_break): Update.
17426 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
17427 gdb_bfd_ref_ptr.
17428 (darwin_solib_get_all_image_info_addr_at_init): Update.
17429 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
17430 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
17431 * record-full.c (record_full_save): Update.
17432 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
17433 * procfs.c (insert_dbx_link_bpt_in_file): Update.
17434 * minidebug.c (find_separate_debug_file_in_section): Return
17435 gdb_bfd_ref_ptr.
17436 * machoread.c (macho_add_oso_symfile): Change abfd to
17437 gdb_bfd_ref_ptr.
17438 (macho_symfile_read_all_oso): Update.
17439 (macho_check_dsym): Return gdb_bfd_ref_ptr.
17440 (macho_symfile_read): Update.
17441 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
17442 (jit_bfd_try_read_symtab): Update.
17443 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17444 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17445 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17446 gdb_bfd_ref_ptr.
17447 (gdb_bfd_ref_policy): New struct.
17448 (gdb_bfd_ref_ptr): New typedef.
17449 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17450 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17451 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17452 gdb_bfd_ref_ptr.
17453 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17454 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17455 (gcore_command): Update.
17456 * exec.c (exec_file_attach): Update.
17457 * elfread.c (elf_symfile_read): Update.
17458 * dwarf2read.c (dwarf2_get_dwz_file): Update.
17459 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
17460 (open_and_init_dwo_file): Update.
17461 (open_dwp_file): Return gdb_bfd_ref_ptr.
17462 (open_and_init_dwp_file): Update.
17463 * corelow.c (core_open): Update.
17464 * compile/compile-object-load.c (compile_object_load): Update.
17465 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
17466 * coffread.c (coff_symfile_read): Update.
17467 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
17468 gdb_bfd_ref_ptr. Rename.
17469 (dump_bfd_file, restore_command): Update.
17470 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17471 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17472 (find_separate_debug_file_by_buildid): Update.
17473
17474 2017-01-10 Tom Tromey <tom@tromey.com>
17475
17476 * common/gdb_ref_ptr.h: New file.
17477 * python/py-ref.h (struct gdbpy_ref_policy): New.
17478 (gdbpy_ref): Now a typedef.
17479
17480 2017-01-10 Tom Tromey <tom@tromey.com>
17481
17482 * utils.h (make_cleanup_htab_delete): Don't declare.
17483 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
17484 Remove.
17485 * linespec.c (decode_compound_collector): Add constructor,
17486 destructor.
17487 (lookup_prefix_sym): Remove cleanup.
17488 (symtab_collector): Add constructor, destructor.
17489 (collect_symtabs_from_filename): Remove cleanup.
17490 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
17491 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
17492 Use htab_up.
17493 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
17494 * dwarf2read.c (dw2_expand_symtabs_matching)
17495 (dw2_map_symbol_filenames, dwarf_decode_macros)
17496 (write_psymtabs_to_index): Use htab_up.
17497 * dwarf2loc.c (func_verify_no_selftailcall)
17498 (call_site_find_chain_1, func_verify_no_selftailcall)
17499 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
17500 std::vector, gdb::unique_xmalloc_ptr.
17501 (call_sitep): Remove typedef.
17502 (dwarf2_locexpr_baton_eval): Remove unused variable.
17503
17504 2017-01-10 Tom Tromey <tom@tromey.com>
17505
17506 * python/python-internal.h (make_cleanup_py_decref)
17507 (make_cleanup_py_xdecref): Don't declare.
17508 * python/py-utils.c (py_decref, make_cleanup_py_decref)
17509 (py_xdecref, make_cleanup_py_xdecref): Remove.
17510
17511 2017-01-10 Tom Tromey <tom@tromey.com>
17512
17513 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
17514 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
17515
17516 2017-01-10 Tom Tromey <tom@tromey.com>
17517
17518 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
17519
17520 2017-01-10 Tom Tromey <tom@tromey.com>
17521
17522 * python/py-utils.c (unicode_to_encoded_string)
17523 (python_string_to_target_string)
17524 (python_string_to_target_python_string)
17525 (python_string_to_host_string, gdbpy_obj_to_string)
17526 (get_addr_from_python): Use gdbpy_ref.
17527
17528 2017-01-10 Tom Tromey <tom@tromey.com>
17529
17530 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
17531 gdbpy_ref.
17532
17533 2017-01-10 Tom Tromey <tom@tromey.com>
17534
17535 * python/python.c (eval_python_command, gdbpy_decode_line)
17536 (gdbpy_run_events, gdbpy_start_type_printers)
17537 (gdbpy_apply_type_printers): Use gdbpy_ref.
17538
17539 2017-01-10 Tom Tromey <tom@tromey.com>
17540
17541 * python/py-param.c (get_doc_string, compute_enum_values): Use
17542 gdbpy_ref.
17543
17544 2017-01-10 Tom Tromey <tom@tromey.com>
17545
17546 * python/py-inferior.c (find_thread_object, build_inferior_list):
17547 Use gdbpy_ref.
17548
17549 2017-01-10 Tom Tromey <tom@tromey.com>
17550
17551 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17552
17553 2017-01-10 Tom Tromey <tom@tromey.com>
17554
17555 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
17556 gdbpy_ref.
17557
17558 2017-01-10 Tom Tromey <tom@tromey.com>
17559
17560 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
17561 extra incref.
17562 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
17563 Use gdbpy_ref.
17564
17565 2017-01-10 Tom Tromey <tom@tromey.com>
17566
17567 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17568 gdbpy_ref.
17569
17570 2017-01-10 Tom Tromey <tom@tromey.com>
17571
17572 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
17573 decref results of PyArg_ParseTupleAndKeywords.
17574
17575 2017-01-10 Tom Tromey <tom@tromey.com>
17576
17577 * python/python.c (python_run_simple_file): Use
17578 unique_xmalloc_ptr, gdbpy_ref.
17579
17580 2017-01-10 Tom Tromey <tom@tromey.com>
17581
17582 * python/py-prettyprint.c (print_stack_unless_memory_error)
17583 (print_string_repr, print_children): Use gdbpy_ref.
17584 (dummy_python_frame): New class.
17585 (dummy_python_frame::dummy_python_frame): Rename from
17586 push_dummy_python_frame.
17587 (py_restore_tstate): Remove.
17588
17589 2017-01-10 Tom Tromey <tom@tromey.com>
17590
17591 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17592
17593 2017-01-10 Tom Tromey <tom@tromey.com>
17594
17595 * python/python.c (ensure_python_env, restore_python_env):
17596 Remove.
17597 * python/python-internal.h (ensure_python_env): Don't declare.
17598 * varobj.h (varobj_ensure_python_env): Don't declare.
17599 * varobj.c (varobj_ensure_python_env): Remove.
17600
17601 2017-01-10 Tom Tromey <tom@tromey.com>
17602
17603 * varobj.c (varobj_value_get_print_value): Use
17604 gdbpy_enter_varobj.
17605
17606 2017-01-10 Tom Tromey <tom@tromey.com>
17607
17608 * python/py-prettyprint.c (print_string_repr, print_children):
17609 Update.
17610 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
17611 of "encoding".
17612 * varobj.c (varobj_value_get_print_value): Update.
17613 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
17614
17615 2017-01-10 Tom Tromey <tom@tromey.com>
17616
17617 * varobj.c (varobj_get_display_hint)
17618 (dynamic_varobj_has_child_method, install_new_value_visualizer)
17619 (varobj_set_visualizer, free_variable): Use
17620 gdbpy_enter_varobj.
17621
17622 2017-01-10 Tom Tromey <tom@tromey.com>
17623
17624 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
17625 (do_finish_initialization): New function. Use gdbpy_ref.
17626 (gdbpy_finish_initialization): Use gdbpy_enter. Call
17627 do_finish_initialization.
17628
17629 2017-01-10 Tom Tromey <tom@tromey.com>
17630
17631 * python/py-param.c (get_set_value, get_show_value): Use
17632 gdbpy_enter, gdbpy_ref.
17633
17634 2017-01-10 Tom Tromey <tom@tromey.com>
17635
17636 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
17637
17638 2017-01-10 Tom Tromey <tom@tromey.com>
17639
17640 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
17641
17642 2017-01-10 Tom Tromey <tom@tromey.com>
17643
17644 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
17645 Use gdbpy_enter_varobj.
17646
17647 2017-01-10 Tom Tromey <tom@tromey.com>
17648
17649 * varobj.c (gdbpy_enter_varobj): New constructor.
17650 * python/python-internal.h (gdbpy_enter_varobj): New class.
17651 * python/py-varobj.c (py_varobj_get_iterator): Use
17652 gdbpy_enter_varobj.
17653
17654 2017-01-10 Tom Tromey <tom@tromey.com>
17655
17656 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
17657 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17658 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
17659 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
17660 unique_xmalloc_ptr.
17661 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
17662
17663 2017-01-10 Tom Tromey <tom@tromey.com>
17664
17665 * python/py-xmethods.c (invoke_match_method): Use
17666 gdbpy_ref.
17667
17668 2017-01-10 Tom Tromey <tom@tromey.com>
17669
17670 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
17671 gdbpy_enter, gdbpy_ref.
17672
17673 2017-01-10 Tom Tromey <tom@tromey.com>
17674
17675 * python/python.c (python_interactive_command): Use gdbpy_enter.
17676
17677 2017-01-10 Tom Tromey <tom@tromey.com>
17678
17679 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
17680 gdbpy_ref.
17681
17682 2017-01-10 Tom Tromey <tom@tromey.com>
17683
17684 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
17685 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17686
17687 2017-01-10 Tom Tromey <tom@tromey.com>
17688
17689 * utils.h (htab_deleter): New struct.
17690 (htab_up): New typedef.
17691 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
17692 gdbpy_enter, gdbpy_ref, htab_up.
17693
17694 2017-01-10 Tom Tromey <tom@tromey.com>
17695
17696 * python/py-unwind.c (pending_frame_invalidate): Remove.
17697 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
17698
17699 2017-01-10 Tom Tromey <tom@tromey.com>
17700
17701 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
17702 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
17703
17704 2017-01-10 Tom Tromey <tom@tromey.com>
17705
17706 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
17707
17708 2017-01-10 Tom Tromey <tom@tromey.com>
17709
17710 * python/python.c (gdbpy_eval_from_control_command)
17711 (gdbpy_source_script, gdbpy_run_events)
17712 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
17713 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
17714 gdbpy_enter.
17715
17716 2017-01-10 Tom Tromey <tom@tromey.com>
17717
17718 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
17719
17720 2017-01-10 Tom Tromey <tom@tromey.com>
17721
17722 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
17723
17724 2017-01-10 Tom Tromey <tom@tromey.com>
17725
17726 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
17727 (python_on_inferior_call_pre, python_on_inferior_call_post)
17728 (python_on_memory_change, python_on_register_change)
17729 (python_inferior_exit, python_new_objfile, add_thread_object)
17730 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
17731
17732 2017-01-10 Tom Tromey <tom@tromey.com>
17733
17734 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
17735 (bpfinishpy_handle_exit): Use gdbpy_enter.
17736
17737 2017-01-10 Tom Tromey <tom@tromey.com>
17738
17739 * python/py-cmd.c (cmdpy_destroyer)
17740 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
17741 gdbpy_enter.
17742
17743 2017-01-10 Tom Tromey <tom@tromey.com>
17744
17745 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17746 gdbpy_enter.
17747 (gdbpy_breakpoint_has_cond): Likewise.
17748
17749 2017-01-10 Tom Tromey <tom@tromey.com>
17750
17751 * python/python.c (gdbpy_enter): New constructor.
17752 (~gdbpy_enter): New destructor.
17753 (restore_python_env, ensure_python_env): Rewrite.
17754 * python/python-internal.h (gdbpy_enter): New class.
17755
17756 2017-01-10 Tom Tromey <tom@tromey.com>
17757
17758 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
17759
17760 2017-01-10 Tom Tromey <tom@tromey.com>
17761
17762 * python/py-value.c (value_has_field, get_field_flag)
17763 (get_field_type, valpy_getitem, convert_value_from_python): Use
17764 gdbpy_ref.
17765
17766 2017-01-10 Tom Tromey <tom@tromey.com>
17767
17768 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
17769 gdbpy_ref.
17770
17771 2017-01-10 Tom Tromey <tom@tromey.com>
17772
17773 * python/py-prettyprint.c (search_pp_list)
17774 (find_pretty_printer_from_objfiles)
17775 (find_pretty_printer_from_progspace)
17776 (find_pretty_printer_from_gdb, find_pretty_printer)
17777 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
17778 gdbpy_ref.
17779
17780 2017-01-10 Tom Tromey <tom@tromey.com>
17781
17782 * python/py-param.c (call_doc_function): Use gdbpy_ref.
17783
17784 2017-01-10 Tom Tromey <tom@tromey.com>
17785
17786 * python/py-linetable.c (build_line_table_tuple_from_pcs)
17787 (ltpy_get_all_source_lines): Use gdbpy_ref.
17788
17789 2017-01-10 Tom Tromey <tom@tromey.com>
17790
17791 * python/py-framefilter.c (extract_sym, extract_value)
17792 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
17793 gdbpy_ref.
17794
17795 2017-01-10 Tom Tromey <tom@tromey.com>
17796
17797 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
17798
17799 2017-01-10 Tom Tromey <tom@tromey.com>
17800
17801 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
17802
17803 2017-01-10 Tom Tromey <tom@tromey.com>
17804
17805 * python/py-function.c (convert_values_to_python, fnpy_init): Use
17806 gdbpy_ref.
17807
17808 2017-01-10 Tom Tromey <tom@tromey.com>
17809
17810 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
17811
17812 2017-01-10 Tom Tromey <tom@tromey.com>
17813
17814 * python/py-type.c (convert_field, make_fielditem, typy_fields)
17815 (typy_range): Use gdbpy_ref.
17816
17817 2017-01-10 Tom Tromey <tom@tromey.com>
17818
17819 * python/py-threadevent.c (create_thread_event_object): Use
17820 gdbpy_ref.
17821 * python/py-stopevent.c (create_stop_event_object): Simplify.
17822 (emit_stop_event): Use gdbpy_ref.
17823 * python/py-signalevent.c (create_signal_event_object): Use
17824 gdbpy_ref.
17825 * python/py-newobjfileevent.c (create_new_objfile_event_object)
17826 (emit_new_objfile_event, create_clear_objfiles_event_object)
17827 (emit_clear_objfiles_event): Use gdbpy_ref.
17828 * python/py-infevents.c (create_inferior_call_event_object)
17829 (create_register_changed_event_object)
17830 (create_memory_changed_event_object, emit_inferior_call_event)
17831 (emit_memory_changed_event, emit_register_changed_event): Use
17832 gdbpy_ref.
17833 * python/py-exitedevent.c (create_exited_event_object)
17834 (emit_exited_event): Use gdbpy_ref.
17835 * python/py-event.h (evpy_emit_event): Remove
17836 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
17837 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
17838 * python/py-continueevent.c (emit_continue_event): Use
17839 gdbpy_ref.
17840 * python/py-breakpoint.c (gdbpy_breakpoint_created)
17841 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
17842 gdbpy_ref.
17843 * python/py-bpevent.c (create_breakpoint_event_object): Use
17844 gdbpy_ref.
17845
17846 2017-01-10 Tom Tromey <tom@tromey.com>
17847
17848 * python/py-ref.h: New file.
17849
17850 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
17851
17852 * cli-out.c (cli_ui_out::do_redirect): Change return type to
17853 void.
17854 * cli-out.h (cli_ui_out::do_redirect): Likewise.
17855 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
17856 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
17857 * ui-out.c (ui_out::redirect): Likewise.
17858 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
17859 * cli/cli-logging.c (set_logging_redirect): Update call site of
17860 ui_out::redirect.
17861 (handle_redirections): Likewise.
17862 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
17863 * top.c (execute_command_to_string): Likewise.
17864 * utils.c (do_ui_out_redirect_pop): Likewise.
17865
17866 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
17867
17868 * stack.c (_initialize_stack): Update "frame" command help message.
17869
17870 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
17871
17872 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
17873
17874 2017-01-06 Yao Qi <yao.qi@linaro.org>
17875
17876 * x86-linux-nat.h: Include gdb_proc_service.h.
17877
17878 2017-01-06 Yao Qi <yao.qi@linaro.org>
17879
17880 * ser-base.h: Include serial.h.
17881
17882 2017-01-06 Yao Qi <yao.qi@linaro.org>
17883
17884 * ppc-linux-tdep.h: Include ppc-tdep.h.
17885
17886 2017-01-06 Yao Qi <yao.qi@linaro.org>
17887
17888 * nat/amd64-linux-siginfo.h: Include signal.h.
17889
17890 2017-01-06 Yao Qi <yao.qi@linaro.org>
17891
17892 * nat/aarch64-linux-hw-point.h: Include break-common.h.
17893
17894 2017-01-06 Yao Qi <yao.qi@linaro.org>
17895
17896 * mi/mi-parse.h: Include mi-cmds.h.
17897
17898 2017-01-06 Yao Qi <yao.qi@linaro.org>
17899
17900 * inf-loop.c: Don't include "target.h".
17901 * inf-loop.h: Include it here.
17902
17903 2017-01-06 Yao Qi <yao.qi@linaro.org>
17904
17905 * dfp.h: Include "dboulest.h" and "expression.h".
17906
17907 2017-01-06 Yao Qi <yao.qi@linaro.org>
17908
17909 * ax-gdb.h: Include "ax.h".
17910
17911 2017-01-06 Yao Qi <yao.qi@linaro.org>
17912
17913 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
17914 with nat/gdb_ptrace.h.
17915
17916 2017-01-05 Yao Qi <yao.qi@linaro.org>
17917
17918 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
17919 new line.
17920 (mips64_fbsd_sigframe_init): Likewise.
17921
17922 2017-01-04 John Baldwin <jhb@FreeBSD.org>
17923
17924 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
17925 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
17926
17927 2017-01-04 John Baldwin <jhb@FreeBSD.org>
17928
17929 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
17930 * NEWS: Mention new FreeBSD/mips native configuration.
17931 * config/mips/fbsd.mh: New file.
17932 * configure.host: Add mips*-*-freebsd*.
17933 * mips-fbsd-nat.c: New file.
17934
17935 2017-01-04 John Baldwin <jhb@FreeBSD.org>
17936
17937 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
17938 (ALLDEPFILES): Add mips-fbsd-tdep.c.
17939 * NEWS: Mention new FreeBSD/mips target.
17940 * configure.tgt: Add mips*-*-freebsd*.
17941 * mips-fbsd-tdep.c: New file.
17942 * mips-fbsd-tdep.h: New file.
17943
17944 2017-01-04 Yao Qi <yao.qi@linaro.org>
17945
17946 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
17947 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
17948
17949 2017-01-01 Joel Brobecker <brobecker@adacore.com>
17950
17951 Update copyright year range in all GDB files.
17952
17953 2017-01-01 Joel Brobecker <brobecker@adacore.com>
17954
17955 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
17956
17957 For older changes see ChangeLog-2016.
17958 \f
17959 Local Variables:
17960 mode: change-log
17961 left-margin: 8
17962 fill-column: 74
17963 version-control: never
17964 coding: utf-8
17965 End:
This page took 0.381347 seconds and 5 git commands to generate.