Fix ptype of Rust slices
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-10-02 Tom Tromey <tom@tromey.com>
2
3 * rust-lang.c (rust_subscript): Handle slices in
4 EVAL_AVOID_SIDE_EFFECTS case.
5
6 2017-10-02 Tom Tromey <tom@tromey.com>
7
8 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
9
10 2017-10-02 Tom Tromey <tom@tromey.com>
11
12 * rust-lang.h (rust_slice_type): Add "extern".
13
14 2017-10-02 Tom Tromey <tom@tromey.com>
15 Pedro Alves <palves@redhat.com>
16
17 * ada-lang.h (ada_exc_info::operator<): Make const.
18 (ada_exc_info::operator==): Make const.
19 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
20 Make const.
21
22 2017-09-29 Tom Tromey <tom@tromey.com>
23
24 * target.c (read_whatever_is_readable): Change type of "result".
25 Update.
26 (free_memory_read_result_vector): Remove.
27 (read_memory_robust): Change return type. Update.
28 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
29 bin2hex, std::string.
30 * target.h (memory_read_result_s): Remove typedef.
31 (free_memory_read_result_vector): Remove.
32 (read_memory_robust): Return std::vector.
33
34 2017-09-29 Tom Tromey <tom@tromey.com>
35
36 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
37
38 2017-09-29 Tom Tromey <tom@tromey.com>
39
40 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
41 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
42 operator< and operator==.
43 (ada_exceptions_list): Return a std::vector.
44 * ada-lang.c (ada_exc_info::operator<): Rename from
45 compare_ada_exception_info.
46 (ada_exc_info::operator==): New.
47 (sort_remove_dups_ada_exceptions_list): Change type of
48 "exceptions".
49 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
50 (ada_add_global_exceptions): Likewise.
51 (ada_exceptions_list_1): Return a std::vector.
52 (ada_exceptions_list): Likewise.
53
54 2017-09-29 Tom Tromey <tom@tromey.com>
55
56 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
57 'std::set *'.
58 (print_one_inferior): Update.
59 (free_vector_of_ints): Remove.
60 (list_available_thread_groups): Change "ids" to std::set.
61 (mi_cmd_list_thread_groups): Update.
62 (struct collect_cores_data) <core>: Now a std::set.
63 (collect_cores): Update.
64 (unique): Remove.
65 (print_one_inferior): Update.
66
67 2017-09-29 Tom Tromey <tom@tromey.com>
68
69 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
70 (mi_execute_async_cli_command): Likewise.
71 (mi_cmd_trace_frame_collected): Use field_fmt.
72
73 2017-09-29 Tom Tromey <tom@tromey.com>
74
75 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
76 gdb::byte_vector.
77
78 2017-09-29 Tom Tromey <tom@tromey.com>
79
80 * mi/mi-parse.c (mi_parse): Remove unused declaration.
81
82 2017-09-29 Tom Tromey <tom@tromey.com>
83
84 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
85
86 2017-09-29 Tom Tromey <tom@tromey.com>
87
88 * varobj.h (varobj_gen_name): Return std::string.
89 * varobj.c (varobj_gen_name): Return std::string.
90 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
91 (mi_cmd_var_delete): Don't copy "name".
92
93 2017-09-29 Tom Tromey <tom@tromey.com>
94
95 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
96 (mi_cmd_break_insert_1): Update.
97
98 2017-09-29 Tom Tromey <tom@tromey.com>
99
100 * target.h (make_scoped_defer_target_commit_resume): Update.
101 * target.c (make_scoped_defer_target_commit_resume): Rename from
102 make_cleanup_defer_target_commit_resume. Return a
103 scoped_restore.
104 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
105
106 2017-09-29 Tom Tromey <tom@tromey.com>
107
108 * main.c (captured_main_1): Remove unused declaration.
109 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
110
111 2017-09-29 Tom Tromey <tom@tromey.com>
112
113 * symtab.c (search_symbols): Remove unused outer cleanup.
114 (make_source_files_completion_list): Remove unused declaration.
115
116 2017-09-29 Tom Tromey <tom@tromey.com>
117
118 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
119
120 2017-09-29 Tom Tromey <tom@tromey.com>
121
122 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
123 gdb::byte_vector.
124
125 2017-09-29 Tom Tromey <tom@tromey.com>
126
127 * complaints.c (vcomplaint): Use std::string.
128
129 2017-09-29 Tom Tromey <tom@tromey.com>
130
131 * tracepoint.c (trace_variable_command): Use std::string.
132 (encode_actions_1): Remove unused declarations.
133 (create_tsv_from_upload): Use std::string.
134
135 2017-09-29 Tom Tromey <tom@tromey.com>
136
137 * cp-support.c (gdb_demangle): Use std::string.
138
139 2017-09-29 Tom Tromey <tom@tromey.com>
140
141 * stack.c (parse_frame_specification): Use std::string
142 (info_frame_command): Use gdb::unique_xmalloc_ptr.
143
144 2017-09-29 Tom Tromey <tom@tromey.com>
145
146 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
147
148 2017-09-29 Tom Tromey <tom@tromey.com>
149
150 * utils.c (vfprintf_maybe_filtered): Use std::string.
151 (vfprintf_unfiltered): Likewise.
152
153 2017-09-29 Tom Tromey <tom@tromey.com>
154
155 * event-top.c (top_level_prompt): Return std::string.
156 (display_gdb_prompt): Update.
157
158 2017-09-29 Tom Tromey <tom@tromey.com>
159
160 * unittests/common-utils-selftests.c (format): New function.
161 (string_vprintf_tests): New function.
162 (_initialize_common_utils_selftests): Register new tests.
163 * common/common-utils.c (string_vprintf): New function.
164 * common/common-utils.h (string_vprintf): Declare.
165
166 2017-09-29 Pedro Alves <palves@redhat.com>
167
168 * common/rsp-low.c (unpack_varlen_hex): Constify.
169 * common/rsp-low.h (unpack_varlen_hex): Constify.
170 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
171 Constify.
172 * remote.c (remote_set_permissions, read_ptid)
173 (remote_current_thread, remote_get_threads_with_qthreadinfo)
174 (remote_static_tracepoint_marker_at)
175 (remote_static_tracepoint_markers_by_strid)
176 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
177 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
178 (parse_tracepoint_definition, parse_tsv_definition)
179 (parse_static_tracepoint_marker_definition): Constify.
180 * tracepoint.h (parse_static_tracepoint_marker_definition)
181 (parse_trace_status, parse_tracepoint_status)
182 (parse_tracepoint_definition, parse_tsv_definition): Constify.
183
184 2017-09-29 Pedro Alves <palves@redhat.com>
185
186 * remote.c (target_buf, target_buf_size): Delete.
187 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
188 Use the connection's packet buffer instead.
189 All callers adjusted.
190 (_initialize_remote): Remove references to target_buf and
191 target_buf_size.
192
193 2017-09-28 Pedro Alves <palves@redhat.com>
194
195 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
196 unittests/common-utils-selftests.c.
197 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
198 (COMMON_OBS): Remove utils-selftests.o.
199 * utils-selftests.c: Move to ...
200 * unittests/common-utils-selftests.c: ... here and rename self
201 test to "string_printf".
202
203 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
204
205 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
206 having NULL cus or tus.
207
208 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
209
210 * arm-tdep.c: (convert_from_extended): Remove.
211 (convert_to_extended): Likewise.
212 (arm_extract_return_value): Use convert_typed_floating.
213 (arm_store_return_value): Likewise.
214
215 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
216 * sh-tdep.c: Do not include "floatformat.h".
217 (sh_littlebyte_bigword_type): New function.
218 (sh_register_convert_to_virtual): Use convert_typed_floating.
219 (sh_register_convert_to_raw): Likewise.
220 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
221 (sh64_littlebyte_bigword_type): New function.
222 (sh64_extract_return_value): Use convert_typed_floating.
223 (sh64_register_convert_to_virtual): Likewise.
224 (sh64_register_convert_to_raw): Likewise.
225
226 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
227
228 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
229 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
230
231 * gdbtypes.h (union type_specific): Make field floatformat hold
232 just a single struct floatformat, not an array.
233 (floatformat_from_type): Move here.
234 * gdbtypes.c (floatformat_from_type): Move here. Update to
235 changed TYPE_FLOATFORMAT definition.
236 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
237 (recursive_dump_type): Likewise.
238 (init_float_type): Install correct floatformat for byte order.
239 (arch_float_type): Likewise.
240
241 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
242
243 * gdbtypes.c (init_type): Change incoming argument from
244 length-in-bytes to length-in-bits. Assert length is a
245 multiple of TARGET_CHAR_BITS.
246 (arch_type, arch_flags_type): Likewise.
247 (init_integer_type): Update call to init_type.
248 (init_character_type): Likewise.
249 (init_boolean_type): Likewise.
250 (init_float_type): Likewise.
251 (init_decfloat_type): Likewise.
252 (init_complex_type): Likewise.
253 (init_pointer_type): Likewise.
254 (objfile_type): Likewise.
255 (arch_integer_type): Update call to arch_type.
256 (arch_character_type): Likewise.
257 (arch_boolean_type): Likewise.
258 (arch_float_type): Likewise.
259 (arch_decfloat_type): Likewise.
260 (arch_complex_type): Likewise.
261 (arch_pointer_type): Likewise.
262 (gdbtypes_post_init): Likewise.
263
264 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
265 (read_base_type): Likewise.
266 * mdebugread.c (basic_type): Likewise.
267 * stabsread.c (dbx_init_float_type): Likewise.
268 (rs6000_builtin_type): Likewise.
269 (read_range_type): Likewise. Also, fix call to init_integer_type
270 with erroneous length argument.
271
272 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
273 * d-lang.c (build_d_types): Likewise.
274 * f-lang.c (build_fortran_types): Likewise.
275 * go-lang.c (build_go_types): Likewise.
276 * opencl-lang.c (build_opencl_types): Likewise.
277 * jit.c (finalize_symtab): Likewise.
278 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
279 (build_std_type_info_type): Likewise.
280 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
281 update call to arch_flags_type.
282
283 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
284 arch_type.
285 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
286 * windows-tdep.c (windows_get_tlb_type): Likewise.
287
288 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
289 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
290 * m32c-tdep.c (make_types): Likewise.
291 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
292 (rl78_psw_type): Update call to arch_flags_type.
293 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
294 * rx-tdep.c (rx_psw_type): Likewise.
295 (rx_fpsw_type): Likewise.
296 * sparc-tdep.c (sparc_psr_type): Likewise.
297 (sparc_fsr_type): Likewise.
298 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
299 (sparc64_ccr_type): Likewise.
300 (sparc64_fsr_type): Likewise.
301 (sparc64_fprs_type): Likewise.
302
303 2017-09-27 Tom Tromey <tom@tromey.com>
304
305 * findcmd.c (find_command): Constify.
306
307 2017-09-27 Tom Tromey <tom@tromey.com>
308
309 * ada-tasks.c (task_command_1, task_command): Constify.
310
311 2017-09-27 Tom Tromey <tom@tromey.com>
312
313 * symtab.c (maintenance_print_symbol_cache)
314 (maintenance_flush_symbol_cache)
315 (maintenance_print_symbol_cache_statistics): Constify.
316
317 2017-09-27 Tom Tromey <tom@tromey.com>
318
319 * inferior.c (detach_inferior_command, kill_inferior_command)
320 (inferior_command): Constify.
321
322 2017-09-27 Tom Tromey <tom@tromey.com>
323
324 * regcache.c (regcache_print, maintenance_print_registers)
325 (maintenance_print_raw_registers)
326 (maintenance_print_cooked_registers)
327 (maintenance_print_register_groups)
328 (maintenance_print_remote_registers): Constify.
329
330 2017-09-27 Tom Tromey <tom@tromey.com>
331
332 * printcmd.c (map_display_numbers, undisplay_command)
333 (enable_disable_display_command, enable_display_command)
334 (disable_display_command): Constify.
335
336 2017-09-27 Tom Tromey <tom@tromey.com>
337
338 * breakpoint.h (delete_command): Don't declare.
339 * breakpoint.c (delete_command, enable_once_command)
340 (enable_count_command, enable_delete_command, breakpoint_1)
341 (maintenance_info_breakpoints, stopin_command, stopat_command)
342 (delete_command, delete_trace_command, save_breakpoints)
343 (save_breakpoints_command, save_tracepoints_command): Constify.
344
345 2017-09-27 Tom Tromey <tom@tromey.com>
346
347 * macrocmd.c (macro_expand_command, macro_expand_once_command)
348 (skip_ws, extract_identifier, macro_define_command)
349 (macro_undef_command, macro_list_command): Constify.
350
351 2017-09-27 Tom Tromey <tom@tromey.com>
352
353 * infcmd.c (environment_info, set_environment_command)
354 (unset_environment_command, path_info, info_proc_cmd_1)
355 (info_proc_cmd_mappings, info_proc_cmd_stat)
356 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
357 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
358
359 2017-09-27 Tom Tromey <tom@tromey.com>
360
361 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
362 Constify.
363
364 2017-09-27 Tom Tromey <tom@tromey.com>
365
366 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
367
368 2017-09-27 Tom Tromey <tom@tromey.com>
369
370 * demangle.c (demangle_command): Constify.
371
372 2017-09-27 Tom Tromey <tom@tromey.com>
373
374 * progspace.c (maintenance_info_program_spaces_command):
375 Constify.
376
377 2017-09-27 Tom Tromey <tom@tromey.com>
378
379 * compile/compile.c (check_raw_argument, compile_file_command)
380 (compile_code_command, compile_print_command): Constify.
381
382 2017-09-27 Tom Tromey <tom@tromey.com>
383
384 * reggroups.c (maintenance_print_reggroups): Constify.
385
386 2017-09-27 Tom Tromey <tom@tromey.com>
387
388 * dwarf2read.c (save_gdb_index_command): Constify.
389
390 2017-09-27 Tom Tromey <tom@tromey.com>
391
392 * stap-probe.c (info_probes_stap_command): Constify.
393
394 2017-09-27 Tom Tromey <tom@tromey.com>
395
396 * fork-child.c (unset_exec_wrapper_command): Constify.
397
398 2017-09-27 Tom Tromey <tom@tromey.com>
399
400 * btrace.c (get_uint, get_context_size, no_chunk)
401 (maint_btrace_packet_history_cmd)
402 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
403 (maint_info_btrace_cmd): Constify.
404
405 2017-09-27 Tom Tromey <tom@tromey.com>
406
407 * reverse.c (delete_bookmark_command): Constify.
408
409 2017-09-27 Tom Tromey <tom@tromey.com>
410
411 * remote.c (set_memory_packet_size)
412 (set_memory_write_packet_size, show_memory_write_packet_size)
413 (set_memory_read_packet_size, show_memory_read_packet_size)
414 (compare_sections_command, packet_command, remote_put_command)
415 (remote_get_command, remote_delete_command): Constify.
416
417 2017-09-27 Tom Tromey <tom@tromey.com>
418
419 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
420 (set_mipsfpu_double_command, set_mipsfpu_none_command)
421 (set_mipsfpu_auto_command): Constify.
422
423 2017-09-27 Tom Tromey <tom@tromey.com>
424
425 * cli/cli-cmds.h (cd_command): Constify.
426 * cli/cli-cmds.c (cd_command): Constify.
427
428 2017-09-27 Tom Tromey <tom@tromey.com>
429
430 * thread.c (thread_name_command, thread_find_command): Constify.
431
432 2017-09-27 Tom Tromey <tom@tromey.com>
433
434 * probe.c (enable_probes_command, disable_probes_command):
435 Constify.
436
437 2017-09-27 Tom Tromey <tom@tromey.com>
438
439 * symfile.c (symbol_file_command): Constify.
440 * gdbcore.h (deprecated_file_changed_hook): Constify.
441 * exec.c (deprecated_file_changed_hook, exec_file_command)
442 (file_command): Constify.
443 * defs.h (symbol_file_command): Constify.
444
445 2017-09-27 Tom Tromey <tom@tromey.com>
446
447 * remote-fileio.c (set_system_call_allowed)
448 (show_system_call_allowed): Constify.
449
450 2017-09-27 Tom Tromey <tom@tromey.com>
451
452 * tracepoint.c (delete_trace_variable_command)
453 (tfind_end_command, tfind_start_command, tfind_pc_command)
454 (tfind_tracepoint_command, tfind_line_command)
455 (tfind_range_command, tfind_outside_command): Constify.
456
457 2017-09-27 Tom Tromey <tom@tromey.com>
458
459 * ax-gdb.c (maint_agent_printf_command, agent_command)
460 (agent_eval_command): Constify.
461
462 2017-09-27 Tom Tromey <tom@tromey.com>
463
464 * tracepoint.c (info_scope_command): Constify.
465 * python/python.c (gdbpy_decode_line): Constify.
466 * python/py-breakpoint.c (bppy_init): Constify.
467 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
468 * location.h: (new_linespec_location)
469 (string_to_event_location_basic, string_to_event_location):
470 Constify.
471 * location.c (new_linespec_location)
472 (string_to_event_location_basic, string_to_event_location):
473 Constify.
474 * linespec.h (decode_line_with_current_source)
475 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
476 * linespec.c (linespec_lex_to_end)
477 (decode_line_with_current_source)
478 (decode_line_with_last_displayed): Constify.
479 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
480 Constify.
481 * cli/cli-cmds.c (edit_command, list_command): Constify.
482 * breakpoint.h (until_break_command, watch_command_wrapper)
483 (awatch_command_wrapper, rwatch_command_wrapper)
484 (init_ada_exception_breakpoint): Constify.
485 * breakpoint.c (break_command_1, dprintf_command)
486 (break_range_command, watch_command_wrapper)
487 (rwatch_command_wrapper, awatch_command_wrapper)
488 (until_break_command, init_ada_exception_breakpoint)
489 (strace_marker_create_sals_from_location, trace_command)
490 (ftrace_command, strace_command, struct tracepoint): Constify.
491 * ax-gdb.c (agent_command_1): Constify.
492 * ada-lang.c (ada_exception_sal): Constify.
493
494 2017-09-27 Tom Tromey <tom@tromey.com>
495
496 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
497 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
498 (get_context_size, no_chunk, get_insn_history_modifiers)
499 (cmd_record_insn_history, get_call_history_modifiers)
500 (cmd_record_call_history): Constify.
501
502 2017-09-27 Tom Tromey <tom@tromey.com>
503
504 * source.c (show_substitute_path_command)
505 (unset_substitute_path_command, set_substitute_path_command):
506 Constify.
507
508 2017-09-27 Tom Tromey <tom@tromey.com>
509
510 * typeprint.c (maintenance_print_type): Constify.
511 * maint.c (maintenance_dump_me, maintenance_demangle)
512 (maintenance_time_display, maintenance_info_sections)
513 (maintenance_print_statistics, maintenance_deprecate)
514 (maintenance_undeprecate): Constify.
515 (maintenance_do_deprecate): Constify. Use std::string.
516 (maintenance_selftest): Constify.
517 * gdbtypes.h (maintenance_print_type): Constify.
518
519 2017-09-27 Tom Tromey <tom@tromey.com>
520
521 * hppa-tdep.c (unwind_command): Constify.
522
523 2017-09-27 Tom Tromey <tom@tromey.com>
524
525 * target-descriptions.c (unset_tdesc_filename_cmd)
526 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
527 Constify.
528
529 2017-09-27 Tom Tromey <tom@tromey.com>
530
531 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
532
533 2017-09-27 Tom Tromey <tom@tromey.com>
534
535 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
536
537 2017-09-27 Tom Tromey <tom@tromey.com>
538
539 * tui/tui-regs.c (tui_reg_command): Constify.
540
541 2017-09-27 Tom Tromey <tom@tromey.com>
542
543 * skip.c (skip_file_command, skip_function_command)
544 (skip_enable_command, skip_disable_command, skip_delete_command):
545 Constify.
546
547 2017-09-27 Tom Tromey <tom@tromey.com>
548
549 * record-btrace.c (cmd_record_btrace_bts_start)
550 (cmd_record_btrace_pt_start): Constify.
551
552 2017-09-27 Tom Tromey <tom@tromey.com>
553
554 * symmisc.c (maintenance_print_symbols)
555 (maintenance_print_msymbols, maintenance_print_objfiles)
556 (maintenance_info_symtabs, maintenance_check_symtabs)
557 (maintenance_expand_symtabs, maintenance_info_line_tables):
558 Constify.
559
560 2017-09-27 Tom Tromey <tom@tromey.com>
561
562 * top.c (new_ui_command): Constify.
563
564 2017-09-27 Tom Tromey <tom@tromey.com>
565
566 * symfile.c (add_symbol_file_command)
567 (remove_symbol_file_command, list_overlays_command)
568 (map_overlay_command, unmap_overlay_command)
569 (overlay_auto_command, overlay_manual_command)
570 (overlay_off_command, overlay_load_command): Constify.
571
572 2017-09-27 Tom Tromey <tom@tromey.com>
573
574 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
575 (info_spu_mailbox_command, info_spu_dma_command)
576 (info_spu_proxydma_command): Constify.
577
578 2017-09-27 Tom Tromey <tom@tromey.com>
579
580 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
581
582 2017-09-27 Tom Tromey <tom@tromey.com>
583
584 * cli/cli-script.c (user_defined_command): Constify.
585
586 2017-09-27 Tom Tromey <tom@tromey.com>
587
588 * cli/cli-dump.c (dump_memory_command, dump_value_command)
589 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
590 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
591 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
592 (dump_binary_value, append_binary_memory, append_binary_value):
593 Constify.
594 (struct dump_context) <func>: Constify.
595 (add_dump_command): Update.
596
597 2017-09-27 Tom Tromey <tom@tromey.com>
598
599 * cli/cli-cmds.c (show_version, show_configuration)
600 (source_command, show_user): Constify.
601
602 2017-09-27 Tom Tromey <tom@tromey.com>
603
604 * target.c (maintenance_print_target_stack): Constify.
605
606 2017-09-27 Tom Tromey <tom@tromey.com>
607
608 * interps.c (interpreter_exec_cmd): Constify.
609
610 2017-09-27 Tom Tromey <tom@tromey.com>
611
612 * record-full.c (cmd_record_full_restore): Constify.
613
614 2017-09-27 Tom Tromey <tom@tromey.com>
615
616 * memattr.c (enable_mem_command, disable_mem_command)
617 (delete_mem_command): Constify.
618
619 2017-09-27 Tom Tromey <tom@tromey.com>
620
621 * value.c (show_convenience): Constify.
622
623 2017-09-27 Tom Tromey <tom@tromey.com>
624
625 * gdbcore.h (core_file_command): Update.
626 * corefile.c (core_file_command): Constify.
627
628 2017-09-27 Tom Tromey <tom@tromey.com>
629
630 * user-regs.c (maintenance_print_user_registers): Constify.
631
632 2017-09-27 Tom Tromey <tom@tromey.com>
633
634 * cp-namespace.c (maintenance_cplus_namespace): Constify.
635
636 2017-09-27 Tom Tromey <tom@tromey.com>
637
638 * cp-support.c (first_component_command): Constify.
639
640 2017-09-27 Tom Tromey <tom@tromey.com>
641
642 * psymtab.c (maintenance_print_psymbols)
643 (maintenance_info_psymtabs, maintenance_check_psymtabs):
644 Constify.
645
646 2017-09-27 Tom Tromey <tom@tromey.com>
647
648 * windows-tdep.c (display_tib): Constify.
649
650 2017-09-27 Tom Tromey <tom@tromey.com>
651
652 * linux-fork.c (delete_checkpoint_command)
653 (detach_checkpoint_command): Constify.
654
655 2017-09-27 Tom Tromey <tom@tromey.com>
656
657 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
658
659 2017-09-27 Tom Tromey <tom@tromey.com>
660
661 * arc-tdep.c (dump_arc_instruction_command): Constify.
662
663 2017-09-27 Tom Tromey <tom@tromey.com>
664
665 * valprint.c (set_radix, show_radix): Constify.
666
667 2017-09-27 Tom Tromey <tom@tromey.com>
668
669 * dtrace-probe.c (info_probes_dtrace_command): Constify.
670
671 2017-09-27 Tom Tromey <tom@tromey.com>
672
673 * command.h (not_just_help_class_command): Update.
674 * cli/cli-decode.h (not_just_help_class_command): Update.
675 * cli/cli-decode.c (not_just_help_class_command): Constify.
676
677 2017-09-27 Tom Tromey <tom@tromey.com>
678
679 * gdb_bfd.c (maintenance_info_bfds): Constify.
680
681 2017-09-27 Tom Tromey <tom@tromey.com>
682
683 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
684 overloads.
685 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
686 (do_const_cfunc): New function.
687 (cmd_cfunc_eq): New overload.
688 (cli_user_command_p): Check do_const_cfunc.
689 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
690 const_cfunc.
691 * command.h (add_cmd): Add const overload and no-function
692 overload.
693 (set_cmd_cfunc): Add const overload.
694 (cmd_const_cfunc_ftype): Declare.
695 (cmd_cfunc_eq): Add const overload.
696 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
697 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
698 overload.
699
700 2017-09-27 Tom Tromey <tom@tromey.com>
701
702 * macroexp.c (get_next_token_for_substitution): New function.
703 (substitute_args): Call it. Check for __VA_OPT__.
704
705 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
706 Pedro Alves <palves@redhat.com>
707
708 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
709 producer_is_icc_lt_14.
710 (producer_is_icc_lt_14): New function.
711 (check_producer): Add code for checking version of ICC.
712 (producer_is_icc): Move to producer.c.
713 (read_structure_type): Restrict ICC workaround to ICC<14.
714 * producer.c: Include selftest.h.
715 (producer_is_icc, producer_parsing_tests, _initialize_producer):
716 New functions.
717 * producer.h (producer_is_icc): New declaration.
718
719 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
720
721 * Makefile.in (SFILES): Add producer.c.
722 (COMMON_OBS): Add producer.o
723 * amd64-tdep.c (producer.h): Add new include.
724 * dwarf2read.c (producer.h): Add new include.
725 * producer.c: New file.
726 * producer.h: New file.
727 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
728 producer.c.
729 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
730 producer.h.
731
732 2017-09-26 Matthias Klose <doko@ubuntu.com>
733
734 * configure.ac: Search ncursesw before ncurses.
735 Check ncursesw/ncurses.h before ncurses/ncurses.h.
736 * gdb_curses.h: Include <ncursesw/ncurses.h>
737 * config.in, configure: Regenerate.
738
739 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
740
741 PR gdb/22185
742 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
743 obsolete.
744 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
745 Remove i386sol2 support.
746 * configure.nat <i386sol2>: Remove.
747 <sol2-64>: Fold into ...
748 <sol2>: ... this.
749 Move common settings to default section.
750 Add sol-thread.o.
751 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
752 x86_64-*-solaris2.1[0-9]*>: Rename to ...
753 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
754 <i[34567]86-*-solaris*>: Remove.
755 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
756
757 * configure.ac: Remove wctype in libw check.
758 (_MSE_INT_H): Don't define on Solaris 7-9.
759 <solaris*>: Remove libthread_db.so.1 check.
760 * configure: Regenerate.
761 * config.in: Regenerate.
762
763 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
764 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
765 (gdb_ps_size_t): Remove.
766 Use base types in users.
767 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
768
769 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
770
771 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
772
773 PR build/22206
774 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
775 (adi_is_addr_mapped): Likewise.
776 (PSR_ICC): Don't redefine.
777 (PSR_IMPL): Likewise.
778
779 2017-09-25 Tom Tromey <tom@tromey.com>
780
781 * regcache.c (regcache::dump): Use string_printf.
782
783 2017-09-25 Tom Tromey <tom@tromey.com>
784
785 * regcache.c (class regcache_invalidator): New.
786 (struct register_to_invalidate): Remove.
787 (make_cleanup_regcache_invalidate): Remove.
788 (regcache::raw_write): Use regcache_invalidator.
789
790 2017-09-25 Tom Tromey <tom@tromey.com>
791
792 * spu-tdep.c (spu2ppu_sniffer): Update.
793 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
794 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
795 Remove.
796 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
797 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
798 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
799 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
800 (frame_pop): Update.
801
802 2017-09-25 Tom Tromey <tom@tromey.com>
803
804 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
805 * regcache.h (regcache_xfree): Don't declare.
806 * regcache.c (regcache_xfree): Remove.
807 (do_regcache_xfree): Use delete.
808 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
809 * linux-fork.c (free_fork): Use delete.
810 (fork_save_infrun_state): Likewise.
811 * jit.c (jit_dealloc_cache): Use delete.
812 * infrun.c (discard_infcall_suspend_state): Use delete.
813
814 2017-09-25 Tom Tromey <tom@tromey.com>
815
816 * regcache.h (regcache_xmalloc): Don't declare.
817 (regcache_raw_set_cached_value): Update comment.
818 * regcache.c (regcache_xmalloc): Remove.
819 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
820 * jit.c (jit_frame_sniffer): Use new.
821 * frame.c (frame_save_as_regcache): Use new.
822
823 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
824
825 * NEWS: Advertise support for guarded-storage registers on IBM z.
826
827 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
828
829 * s390-linux-nat.c (have_regset_gs): New static variable.
830 (s390_linux_fetch_inferior_registers): Handle guarded-storage
831 control block and guarded-storage broadcast control regsets.
832 (s390_read_description): Detect whether the target has
833 guarded-storage support, return appropriate tdesc.
834 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
835 (features/s390x-gs-linux64.c): Likewise.
836 (struct gdbarch_tdep) <have_gs>: New field.
837 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
838 (s390_gsbc_regset): New variables.
839 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
840 and s390_gsbc_regset, if applicable.
841 (s390_core_read_description): Check whether core file was from a
842 target with guarded-storage support; include appropriate regsets.
843 (s390_gdbarch_init): Add registers for guarded-storage support.
844 (_initialize_s390_tdep): Initialize new target descriptions that
845 include registers for guarded-storage support.
846 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
847 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
848 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
849 (S390_NUM_REGS): Adjust macro definition.
850 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
851 (tdesc_s390x_gs_linux64): New declarations.
852
853 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
854
855 * features/s390-gs-linux64.xml: New file.
856 * features/s390-gs.xml: New file.
857 * features/s390-gsbc.xml: New file.
858 * features/s390x-gs-linux64.xml: New file.
859 * features/Makefile (WHICH): Add s390-gs-linux64 and
860 s390x-gs-linux64.
861 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
862 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
863 * features/s390-gs-linux64.c: New generated file.
864 * features/s390x-gs-linux64.c: New file.
865 * regformats/s390-gs-linux64.dat: New file.
866 * regformats/s390x-gs-linux64.dat: New file.
867
868 2017-09-23 Tom Tromey <tom@tromey.com>
869
870 * defs.h (make_cleanup_override_quit_handler): Don't declare.
871
872 2017-09-22 Tom Tromey <tom@tromey.com>
873
874 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
875 type to scoped_restore_tmpl.
876 <scoped_input_handler>: Initialize m_quit_handler directly.
877
878 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
879
880 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
881 (cd_command): Likewise. Free "current_directory" before
882 assigning to it.
883 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
884 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
885 * top.c (gdb_dirbuf): Remove global declaration.
886 * top.h (gdb_dirbuf): Likewise.
887
888 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
889
890 * gnulib/aclocal.m4: Regenerate.
891 * gnulib/config.in: Regenerate.
892 * gnulib/configure: Regenerate.
893 * gnulib/import/Makefile.am: Regenerate.
894 * gnulib/import/Makefile.in: Regenerate.
895 * gnulib/import/assure.h: New file.
896 * gnulib/import/at-func.c: Likewise
897 * gnulib/import/chdir-long.c: New file.
898 * gnulib/import/chdir-long.h: New file.
899 * gnulib/import/cloexec.c: New file.
900 * gnulib/import/cloexec.h: New file.
901 * gnulib/import/close.c: New file.
902 * gnulib/import/closedir.c: New file.
903 * gnulib/import/dirent-private.h: New file.
904 * gnulib/import/dup-safer.c: New file.
905 * gnulib/import/dup.c: New file.
906 * gnulib/import/dup2.c: New file.
907 * gnulib/import/error.c: New file.
908 * gnulib/import/error.h: New file.
909 * gnulib/import/exitfail.c: New file.
910 * gnulib/import/exitfail.h: New file.
911 * gnulib/import/fchdir.c: New file.
912 * gnulib/import/fcntl.c: New file.
913 * gnulib/import/fcntl.in.h: New file.
914 * gnulib/import/fd-hook.c: New file.
915 * gnulib/import/fd-hook.h: New file.
916 * gnulib/import/fd-safer.c: New file.
917 * gnulib/import/fdopendir.c: New file.
918 * gnulib/import/filename.h: New file.
919 * gnulib/import/filenamecat-lgpl.c: New file.
920 * gnulib/import/filenamecat.h: New file.
921 * gnulib/import/fstat.c: New file.
922 * gnulib/import/fstatat.c: New file.
923 * gnulib/import/getcwd-lgpl.c: New file.
924 * gnulib/import/getcwd.c: New file.
925 * gnulib/import/getdtablesize.c: New file.
926 * gnulib/import/getlogin_r.c: New file.
927 * gnulib/import/getprogname.c: New file.
928 * gnulib/import/getprogname.h: New file.
929 * gnulib/import/gettext.h: New file.
930 * gnulib/import/glob-libc.h: New file.
931 * gnulib/import/glob.c: New file.
932 * gnulib/import/glob.in.h: New file.
933 * gnulib/import/intprops.h: New file.
934 * gnulib/import/m4/chdir-long.m4: New file.
935 * gnulib/import/m4/close.m4: New file.
936 * gnulib/import/m4/closedir.m4: New file.
937 * gnulib/import/m4/d-ino.m4: New file.
938 * gnulib/import/m4/d-type.m4: New file.
939 * gnulib/import/m4/dup.m4: New file.
940 * gnulib/import/m4/dup2.m4: New file.
941 * gnulib/import/m4/error.m4: New file.
942 * gnulib/import/m4/fchdir.m4: New file.
943 * gnulib/import/m4/fcntl.m4: New file.
944 * gnulib/import/m4/fcntl_h.m4: New file.
945 * gnulib/import/m4/fdopendir.m4: New file.
946 * gnulib/import/m4/filenamecat.m4: New file.
947 * gnulib/import/m4/fstat.m4: New file.
948 * gnulib/import/m4/fstatat.m4: New file.
949 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
950 * gnulib/import/m4/getcwd-path-max.m4: New file.
951 * gnulib/import/m4/getcwd.m4: New file.
952 * gnulib/import/m4/getdtablesize.m4: New file.
953 * gnulib/import/m4/getlogin_r.m4: New file.
954 * gnulib/import/m4/getprogname.m4: New file.
955 * gnulib/import/m4/glob.m4: New file.
956 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
957 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
958 * gnulib/import/m4/mempcpy.m4: New file.
959 * gnulib/import/m4/memrchr.m4: New file.
960 * gnulib/import/m4/mode_t.m4: New file.
961 * gnulib/import/m4/msvc-inval.m4: New file.
962 * gnulib/import/m4/msvc-nothrow.m4: New file.
963 * gnulib/import/m4/open.m4: New file.
964 * gnulib/import/m4/openat.m4: New file.
965 * gnulib/import/m4/opendir.m4: New file.
966 * gnulib/import/m4/readdir.m4: New file.
967 * gnulib/import/m4/realloc.m4: New file.
968 * gnulib/import/m4/rewinddir.m4: New file.
969 * gnulib/import/m4/save-cwd.m4: New file.
970 * gnulib/import/m4/strdup.m4: New file.
971 * gnulib/import/m4/strerror.m4: New file.
972 * gnulib/import/m4/unistd-safer.m4: New file.
973 * gnulib/import/mempcpy.c: New file.
974 * gnulib/import/memrchr.c: New file.
975 * gnulib/import/msvc-inval.c: New file.
976 * gnulib/import/msvc-inval.h: New file.
977 * gnulib/import/msvc-nothrow.c: New file.
978 * gnulib/import/msvc-nothrow.h: New file.
979 * gnulib/import/open.c: New file.
980 * gnulib/import/openat-die.c: New file.
981 * gnulib/import/openat-priv.h: New file.
982 * gnulib/import/openat-proc.c: New file.
983 * gnulib/import/openat.c: New file.
984 * gnulib/import/openat.h: New file.
985 * gnulib/import/opendir.c: New file.
986 * gnulib/import/pipe-safer.c: New file.
987 * gnulib/import/readdir.c: New file.
988 * gnulib/import/realloc.c: New file.
989 * gnulib/import/rewinddir.c: New file.
990 * gnulib/import/save-cwd.c: New file.
991 * gnulib/import/save-cwd.h: New file.
992 * gnulib/import/strdup.c: New file.
993 * gnulib/import/strerror-override.c: New file.
994 * gnulib/import/strerror-override.h: New file.
995 * gnulib/import/strerror.c: New file.
996 * gnulib/import/unistd--.h: New file.
997 * gnulib/import/unistd-safer.h: New file.
998 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
999 "getcwd" and "glob".
1000 * ser-tcp.c: Undefine "close" before redefining it.
1001
1002 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1003
1004 * guile/scm-value.c (gdbscm_value_address): Initialize address,
1005 get rid of res_val.
1006
1007 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1008
1009 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
1010 <sol2,sparc>: Likewise.
1011 <sol2-64,i386>: Likewise.
1012
1013 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
1014 -Wdeprecated-declarations on *-*-solaris*.
1015 * configure: Regenerate.
1016
1017 * procfs.c: Include "nat/inferior.h".
1018 (procfs_info_proc): Fix typo.
1019
1020 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1021
1022 * remote.c (vector): Include.
1023 (struct private_thread_info): Add field, thread_handle.
1024 (free_private_thread_info): Deallocate storage associated with
1025 thread handle.
1026 (get_private_info_thread): Initialize `thread_handle' field.
1027 (struct thread_item): Add field, thread_handle.
1028 (clear_threads_listing_context): Deallocate storage associated
1029 with thread handle.
1030 (start_thread): Add support for "handle" attribute.
1031 (thread_attributes): Add "handle".
1032 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
1033 field.
1034 (remote_update_thread_list): Update thread_handle.
1035 (remote_thread_handle_to_thread_info): New function.
1036 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
1037
1038 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1039
1040 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
1041 function.
1042 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
1043 * python/python-internal.h (thread_object_type): Declare.
1044
1045 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1046
1047 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
1048 (target_thread_handle_to_thread_info): Declare.
1049 * target.c (target_thread_handle_to_thread_info): New function.
1050 * target-delegates.c: Regenerate.
1051 * gdbthread.h (find_thread_by_handle): Declare.
1052 * thread.c (find_thread_by_handle): New function.
1053 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
1054 function.
1055 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
1056
1057 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1058
1059 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
1060
1061 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
1062
1063 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
1064
1065 2017-09-21 Yao Qi <yao.qi@linaro.org>
1066
1067 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
1068 to gdb_target_obs.
1069
1070 2017-09-20 Tom Tromey <tom@tromey.com>
1071
1072 * breakpoint.c (struct counted_command_line): Remove.
1073 (breakpoint_commands): Update.
1074 (alloc_counted_command_line, incref_counted_command_line)
1075 (decref_counted_command_line, do_cleanup_counted_command_line)
1076 (make_cleanup_decref_counted_command_line): Remove.
1077 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
1078 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
1079 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
1080 (save_breakpoints): Update.
1081 * breakpoint.h (counted_command_line): Now a typedef to
1082 shared_ptr.
1083 (struct breakpoint) <commands>: Now a counted_command_line.
1084 (struct bpstats) <command>: Likewise.
1085
1086 2017-09-20 Tom Tromey <tom@tromey.com>
1087
1088 * breakpoint.c (struct commands_info, do_map_commands_command):
1089 Remove.
1090 (commands_command_1): Update.
1091 (iterate_over_related_breakpoints): Take a function_view.
1092 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
1093 (delete_command): Update.
1094 (map_breakpoint_numbers): Take a function_view.
1095 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
1096 (disable_command): Update.
1097 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
1098 (enable_command): Update.
1099 (struct disp_data, do_enable_breakpoint_disp)
1100 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
1101 (do_map_enable_delete_breakpoint): Remove.
1102 (enable_once_command, enable_count_command, enable_delete_command)
1103 (delete_trace_variable_command): Update.
1104
1105 2017-09-20 Tom Tromey <tom@tromey.com>
1106
1107 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
1108 (bpstat_clear): Use delete.
1109 (bpstats): New constructors.
1110 (bpstat_copy, bpstat_stop_status): Use new.
1111 (dprintf_after_condition_true): Update.
1112 * breakpoint.h (bpstats::bpstats): Add constructors.
1113 (bpstats::~bpstats): Add destructor.
1114
1115 2017-09-20 Pedro Alves <palves@redhat.com>
1116
1117 * eval.c (make_params): Delete, refactored as ...
1118 (class fake_method): ... this new type's ctor.
1119 (fake_method::~fake_method): New.
1120 (evaluate_subexp_standard): Use 'fake_method'.
1121
1122 2017-09-20 Tom Tromey <tom@tromey.com>
1123
1124 * windows-nat.c (get_windows_debug_event, windows_wait)
1125 (do_initial_windows_stuff, windows_attach): Update.
1126 * utils.c (vwarning, internal_vproblem): Update.
1127 (ui_unregister_input_event_handler_cleanup)
1128 (prepare_to_handle_input): Remove.
1129 (class scoped_input_handler): New.
1130 (defaulted_query, prompt_for_continue): Update.
1131 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
1132 Update.
1133 * top.c (undo_terminal_modifications_before_exit): Update.
1134 * target/target.h (target_terminal_init, target_terminal_inferior)
1135 (target_terminal_ours): Don't declare.
1136 (class target_terminal): New.
1137 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
1138 (target_terminal_ours_for_output)
1139 (make_cleanup_restore_target_terminal): Don't declare.
1140 (target_terminal_info): Remove.
1141 * target.c (enum terminal_state, terminal_state): Remove.
1142 (target_terminal::terminal_state): Define.
1143 (target_terminal::init): Rename from target_terminal_init.
1144 (target_terminal::inferior): Rename from
1145 target_terminal_inferior.
1146 (target_terminal::ours): Rename from target_terminal_ours.
1147 (target_terminal::ours_for_output): Rename from
1148 target_terminal_ours_for_output.
1149 (target_terminal::info): New method.
1150 (cleanup_restore_target_terminal)
1151 (make_cleanup_restore_target_terminal): Remove.
1152 * solib.c (handle_solib_event): Update.
1153 * remote.c (remote_serial_quit_handler): Update.
1154 (remote_terminal_inferior, remote_wait_as): Update.
1155 * record-full.c (record_full_wait_1): Update.
1156 * nto-procfs.c (procfs_create_inferior): Update.
1157 * nat/fork-inferior.c (startup_inferior): Update.
1158 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
1159 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
1160 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
1161 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
1162 (mi_breakpoint_created, mi_breakpoint_deleted)
1163 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
1164 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1165 (mi_user_selected_context_changed, report_initial_inferior):
1166 Update.
1167 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
1168 (linux_nat_terminal_inferior): Update.
1169 * infrun.c (follow_fork_inferior)
1170 (handle_vfork_child_exec_or_exit, do_target_resume)
1171 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
1172 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
1173 Update.
1174 * inflow.c (child_terminal_init, info_terminal_command): Update.
1175 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
1176 (attach_command): Update.
1177 * infcall.c (call_thread_fsm_should_stop): Update.
1178 * gnu-nat.c (gnu_attach): Update.
1179 * extension.c (struct active_ext_lang_state)
1180 (restore_active_ext_lang): Update.
1181 * exceptions.c (print_flush): Update.
1182 * event-top.c (async_enable_stdin, default_quit_handler): Update.
1183 (struct quit_handler_cleanup_data, restore_quit_handler)
1184 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
1185 Remove.
1186 * cp-support.c (gdb_demangle): Update.
1187 * breakpoint.c (update_inserted_breakpoint_locations)
1188 (insert_breakpoint_locations, handle_jit_event)
1189 (disable_breakpoints_in_unloaded_shlib): Update.
1190 * annotate.c (annotate_breakpoints_invalid)
1191 (annotate_frames_invalid): Update.
1192
1193 2017-09-20 Tom Tromey <tom@tromey.com>
1194
1195 * main.c (catch_command_errors): Rename from
1196 catch_command_errors_const.
1197 (captured_main_1): Update.
1198
1199 2017-09-20 Pedro Alves <palves@redhat.com>
1200
1201 * cli/cli-cmds.c (list_command): Use print_sal_location.
1202 (print_sal_location): New function.
1203 (ambiguous_line_spec): Use print_sal_location.
1204 * linespec.c (symbol_to_sal): Record the symbol in the sal.
1205 * symtab.c (find_function_start_sal): Likewise.
1206 * symtab.h (symtab_and_line::symbol): New field.
1207
1208 2017-09-20 Pedro Alves <palves@redhat.com>
1209
1210 * linespec.c (minsym_found): Handle non-text minsyms.
1211 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1212
1213 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1214
1215 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1216 backslash.
1217
1218 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1219
1220 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1221 vmovups instead vmovaps.
1222 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1223
1224 2017-09-19 John Baldwin <jhb@FreeBSD.org>
1225
1226 * NEWS (Changes since GDB 8.0): Add starti.
1227 * infcmd.c (enum run_break): New.
1228 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1229 case.
1230 (run_command): Use enum run_how.
1231 (start_command): Likewise.
1232 (starti_command): New function.
1233 (RUN_ARGS_HELP): New macro.
1234 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1235 commands. Add starti command.
1236
1237 2017-09-19 Yao Qi <yao.qi@linaro.org>
1238
1239 * Makefile.in (monitor.o): Remove the rule.
1240
1241 2017-09-19 Yao Qi <yao.qi@linaro.org>
1242
1243 * annotate.h (struct annotate_arg_emitter): Use
1244 DISABLE_COPY_AND_ASSIGN.
1245 * common/refcounted-object.h (refcounted_object): Likewise.
1246 * completer.h (struct completion_result): Likewise.
1247 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1248 * filename-seen-cache.h (filename_seen_cache): Likewise.
1249 * gdbcore.h (thread_section_name): Likewise.
1250 * gdb_regex.h (compiled_regex): Likewise.
1251 * gdbthread.h (scoped_restore_current_thread): Likewise.
1252 * inferior.h (scoped_restore_current_inferior): Likewise.
1253 * jit.c (jit_reader): Likewise.
1254 * linespec.h (struct linespec_result): Likewise.
1255 * mi/mi-parse.h (struct mi_parse): Likewise.
1256 * nat/fork-inferior.c (execv_argv): Likewise.
1257 * progspace.h (scoped_restore_current_program_space): Likewise.
1258 * python/python-internal.h (class gdbpy_enter): Likewise.
1259 * regcache.h (regcache): Likewise.
1260 * target-descriptions.c (struct tdesc_reg): Likewise.
1261 (struct tdesc_type): Likewise.
1262 (struct tdesc_feature): Likewise.
1263 * ui-out.h (ui_out_emit_type): Likewise.
1264
1265 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
1266
1267 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1268 label abort_expression.
1269
1270 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1271
1272 * common/buffer.c (buffer_xml_printf): Adjust.
1273 * common/xml-utils.c (xml_escape_text): Change return type to
1274 std::string, update code accordingly.
1275 * common/xml-utils.h (xml_escape_text): Change return type to
1276 std::string.
1277 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
1278 * windows-tdep.c (windows_xfer_shared_library): Adjust.
1279 * unittests/xml-utils-selftests.c (test_xml_escape_text):
1280 Adjust.
1281
1282 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1283
1284 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
1285 (SUBDIR_UNITTESTS_OBS): Add new object file.
1286 * unittests/xml-utils-selftests.c: New file.
1287
1288 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1289
1290 * common/selftest.h (selftest): New struct/interface.
1291 (register_test): Add name parameter, add new overload.
1292 (run_tests): Add filter parameter.
1293 (for_each_selftest_ftype): New typedef.
1294 (for_each_selftest): New declaration.
1295 * common/selftest.c (tests): Change type to
1296 map<string, unique_ptr<selftest>>.
1297 (simple_selftest): New struct.
1298 (register_test): New function.
1299 (register_test): Add name parameter and use it.
1300 (run_tests): Add filter parameter and use it. Add prints.
1301 Adjust to vector -> map change.
1302 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
1303 registering selftests.
1304 * arm-tdep.c (_initialize_arm_tdep): Likewise.
1305 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
1306 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
1307 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
1308 * findvar.c (_initialize_findvar): Likewise.
1309 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
1310 * maint.c (maintenance_selftest): Update call to run_tests.
1311 (maintenance_info_selftests): New function.
1312 (_initialize_maint_cmds): Register "maintenance info selftests"
1313 command. Update "maintenance selftest" doc.
1314 * regcache.c (_initialize_regcache): Add names when registering
1315 selftests.
1316 * rust-exp.y (_initialize_rust_exp): Likewise.
1317 * selftest-arch.c (gdbarch_selftest): New struct.
1318 (gdbarch_tests): Remove.
1319 (register_test_foreach_arch): Add name parameter. Call
1320 register_test.
1321 (tests_with_arch): Remove, move most content to
1322 gdbarch_selftest::operator().
1323 (_initialize_selftests_foreach_arch): Remove.
1324 * selftest-arch.h (register_test_foreach_arch): Add name
1325 parameter.
1326 (run_tests_with_arch): New declaration.
1327 * utils-selftests.c (_initialize_utils_selftests): Add names
1328 when registering selftests.
1329 * utils.c (_initialize_utils): Likewise.
1330 * unittests/array-view-selftests.c
1331 (_initialize_array_view_selftests): Likewise.
1332 * unittests/environ-selftests.c (_initialize_environ_selftests):
1333 Likewise.
1334 * unittests/function-view-selftests.c
1335 (_initialize_function_view_selftests): Likewise.
1336 * unittests/offset-type-selftests.c
1337 (_initialize_offset_type_selftests): Likewise.
1338 * unittests/optional-selftests.c
1339 (_initialize_optional_selftests): Likewise.
1340 * unittests/scoped_restore-selftests.c
1341 (_initialize_scoped_restore_selftests): Likewise.
1342 * NEWS: Document "maintenance selftest" and "maint info
1343 selftests".
1344
1345 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1346
1347 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1348 scoped_restore.
1349
1350 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1351
1352 * mi/mi-main.c (mi_load_progress): Make uiout variable
1353 a unique_ptr.
1354
1355 2017-09-15 Pedro Alves <palves@redhat.com>
1356
1357 * compile/compile-c-types.c (convert_enum, convert_int)
1358 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1359
1360 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1361
1362 * dwarf2read.c (copy_string): Remove.
1363 (parse_macro_definition): Replace copy_string with savestring.
1364
1365 2017-09-15 Yao Qi <yao.qi@linaro.org>
1366
1367 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1368 gdb_target_obs.
1369 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1370 Likewise.
1371 (i[34567]86-*-linux*): Likewise.
1372
1373 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1374
1375 * dwarf2expr.h (dwarf_stack_value): Add constructor.
1376 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1377 <stack>: Change type to std::vector.
1378 <stack_len, stack_allocated>: Remove.
1379 <grow_stack>: Remove.
1380 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1381 (dwarf_expr_context::~dwarf_expr_context): Remove.
1382 (dwarf_expr_context::grow_stack): Remove.
1383 (dwarf_expr_context::push): Adjust.
1384 (dwarf_expr_context::pop): Adjust.
1385 (dwarf_expr_context::fetch): Adjust.
1386 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
1387 (dwarf_expr_context::stack_empty_p): Adjust.
1388 (dwarf_expr_context::execute_stack_op): Adjust.
1389
1390 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1391
1392 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
1393 return type to bool.
1394 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
1395
1396 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1397
1398 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
1399 Change type to bool.
1400 (dwarf_stack_value) <in_stack_memory>: Likewise.
1401 (dwarf_expr_context) <push_address>: Change parameter type to
1402 bool.
1403 <fetch_in_stack_memory>: Change return type to bool.
1404 <push>: Change parameter type to bool.
1405 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
1406 to bool.
1407 (dwarf_expr_context::push_address): Likewise.
1408 (dwarf_expr_context::fetch_in_stack_memory): Change return type
1409 to bool.
1410 (dwarf_expr_context::execute_stack_op): Adjust.
1411 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
1412
1413 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1414
1415 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
1416 (struct dwarf_expr_context) <n_pieces>: Remove.
1417 <pieces>: Change type to std::vector.
1418 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1419 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
1420 pieces.
1421 (dwarf_expr_context::add_piece): Adjust.
1422 * dwarf2loc.c (struct piece_closure): Initialize fields.
1423 <n_pieces>: Remove.
1424 <pieces>: Change type to std::vector.
1425 (allocate_piece_closure): Adjust, change parameter to
1426 std::vector rvalue and std::move it to piece_closure.
1427 (rw_pieced_value): Adjust.
1428 (check_pieced_synthetic_pointer): Adjust.
1429 (indirect_synthetic_pointer): Adjust.
1430 (coerce_pieced_ref): Adjust.
1431 (free_pieced_value_closure): Adjust. Use delete to free
1432 piece_closure.
1433 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
1434 to allocate_piece_closure.
1435 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
1436
1437 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1438
1439 * probe.h (probe_ops_cp): Remove typedef.
1440 (DEF_VEC_P (probe_ops_cp)): Remove.
1441 (all_probe_ops): Change type to std::vector.
1442 * probe.c (info_probes_for_ops): Adjust to vector change.
1443 (probe_linespec_to_ops): Likewise.
1444 (all_probe_ops): Change type to std::vector.
1445 (_initialize_probe): Adjust to vector change.
1446 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
1447 * elfread.c (elf_get_probes): Likewise.
1448 * stap-probe.c (_initialize_stap_probe): Likewise.
1449
1450 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1451
1452 * probe.h (struct bound_probe): Define constructors.
1453 * probe.c (bound_probe_s): Remove typedef.
1454 (DEF_VEC_O (bound_probe_s)): Remove VEC.
1455 (collect_probes): Change return type to std::vector, remove
1456 cleanup.
1457 (compare_probes): Return bool, change parameter type. Change
1458 semantic to "less than".
1459 (gen_ui_out_table_header_info): Change parameter to std::vector
1460 and update.
1461 (exists_probe_with_pops): Likewise.
1462 (info_probes_for_ops): Update to std::vector change.
1463 (enable_probes_command): Likewise.
1464 (disable_probes_command): Likewise.
1465
1466 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1467
1468 * probe.h (struct probe_ops) <get_probes>: Change parameter from
1469 vec to std::vector.
1470 * probe.c (parse_probes_in_pspace): Update.
1471 (find_probes_in_objfile): Update.
1472 (find_probe_by_pc): Update.
1473 (collect_probes): Update.
1474 (probe_any_get_probes): Update.
1475 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
1476 return type to reference to std::vector.
1477 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
1478 std::vector and update.
1479 (dtrace_process_dof): Likewise.
1480 (dtrace_get_probes): Likewise.
1481 * elfread.c (elf_get_probes): Change return type to std::vector,
1482 store an std::vector in bfd_data.
1483 (probe_key_free): Update to std::vector.
1484 * stap-probe.c (handle_stap_probe): Change parameter to
1485 std::vector and update.
1486 (stap_get_probes): Likewise.
1487 * symfile-debug.c (debug_sym_get_probes): Change return type to
1488 std::vector and update.
1489
1490 2017-09-11 Tom Tromey <tom@tromey.com>
1491
1492 * breakpoint.c (program_breakpoint_here_p): Update.
1493 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
1494 from make_show_memory_breakpoints_cleanup. Return a
1495 scoped_restore_tmpl<int>.
1496 (restore_show_memory_breakpoints): Remove.
1497 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
1498 * mem-break.c (memory_validate_breakpoint): Update.
1499 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
1500 (ia64_memory_remove_breakpoint): Update.
1501 (ia64_breakpoint_from_pc): Update.
1502 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
1503 from make_show_memory_breakpoints_cleanup.
1504
1505 2017-09-11 Tom Tromey <tom@tromey.com>
1506
1507 * d-namespace.c (d_lookup_symbol): Use std::string.
1508 (find_symbol_in_baseclass): Likewise.
1509
1510 2017-09-11 Tom Tromey <tom@tromey.com>
1511
1512 * ctf.c (ctf_start): Use std::string.
1513
1514 2017-09-11 Tom Tromey <tom@tromey.com>
1515
1516 * ada-lang.c (is_known_support_routine): Update.
1517 (ada_unhandled_exception_name_addr_from_raise): Update.
1518 * guile/scm-frame.c (gdbscm_frame_name): Update.
1519 * python/py-frame.c (frapy_name): Update.
1520 (frapy_function): Update.
1521 * stack.h (find_frame_funname): Update.
1522 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
1523 (print_frame): Update.
1524
1525 2017-09-11 Tom Tromey <tom@tromey.com>
1526
1527 * findcmd.c (put_bits): Take a gdb::byte_vector.
1528 (parse_find_args): Return gdb::byte_vector. "args" now const.
1529 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
1530 cleanups.
1531 (find_command): Update.
1532
1533 2017-09-11 Tom Tromey <tom@tromey.com>
1534
1535 * cli/cli-script.c (class scoped_restore_hook_in): New.
1536 (clear_hook_in_cleanup): Remove.
1537 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
1538 scoped_restore_hook_in.
1539
1540 2017-09-11 Tom Tromey <tom@tromey.com>
1541
1542 * cli/cli-script.c (restore_interp): Remove.
1543 (read_command_lines): Use scoped_restore_interp.
1544 * interps.c (scoped_restore_interp::set_temp): Rename from
1545 interp_set_temp.
1546 * interps.h (class scoped_restore_interp): New.
1547 (interp_set_temp): Remove.
1548
1549 2017-09-11 Tom Tromey <tom@tromey.com>
1550
1551 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1552 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
1553 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
1554 scoped_restore.
1555 (mi_cmd_break_insert_1): Update.
1556 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
1557 scoped_restore.
1558
1559 2017-09-11 Tom Tromey <tom@tromey.com>
1560
1561 * demangle.c (demangle_command): Update.
1562 * breakpoint.c (disable_command): Update.
1563 (enable_command): Update.
1564 (find_location_by_number): Make "number" const. Use
1565 get_number_trailer.
1566 * cli/cli-utils.c (extract_arg): Return std::string.
1567 * probe.c (parse_probe_linespec): Update. Change types.
1568 (collect_probes): Take string arguments.
1569 (parse_probe_linespec): Likewise.
1570 (info_probes_for_ops): Update.
1571 (enable_probes_command): Update.
1572 (disable_probes_command): Update.
1573 * break-catch-sig.c (catch_signal_split_args): Update.
1574 * mi/mi-parse.c (mi_parse): Update.
1575
1576 2017-09-11 Tom Tromey <tom@tromey.com>
1577
1578 * language.h (language_enum): Make argument const.
1579 * language.c (language_enum): Make argument const.
1580
1581 2017-09-11 Tom Tromey <tom@tromey.com>
1582
1583 * common/common-utils.h (skip_to_space): Remove macro, redeclare
1584 as function.
1585 (skip_to_space): Rename from skip_to_space_const.
1586 * common/common-utils.c (skip_to_space): New function.
1587 (skip_to_space): Rename from skip_to_space_const.
1588 * cli/cli-utils.h (get_number): Rename from get_number_const.
1589 (extract_arg): Rename from extract_arg_const.
1590 * cli/cli-utils.c (get_number): Rename from get_number_const.
1591 (extract_arg): Rename from extract_arg_const.
1592 (number_or_range_parser::get_number): Use ::get_number.
1593 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
1594 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
1595 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
1596 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
1597 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
1598 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
1599 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
1600 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
1601
1602 2017-09-11 Tom Tromey <tom@tromey.com>
1603
1604 * python/python.c (do_start_initialization): Use
1605 py-event-types.def to initialize types.
1606 Define all object type structures.
1607 * python/python-internal.h: Don't declare event initialization
1608 functions.
1609 * python/py-threadevent.c (thread_event_object_type): Don't
1610 define.
1611 * python/py-stopevent.c (stop_event_object_type): Don't define.
1612 * python/py-signalevent.c (signal_event_object_type): Don't
1613 declare or define.
1614 * python/py-newobjfileevent.c (new_objfile_event_object_type)
1615 (clear_objfiles_event_object_type): Don't declare or define.
1616 * python/py-infevents.c (inferior_call_pre_event_object_type)
1617 (inferior_call_post_event_object_type)
1618 (register_changed_event_object_type)
1619 (memory_changed_event_object_type): Don't declare or define.
1620 * python/py-inferior.c (new_thread_event_object_type)
1621 (new_inferior_event_object_type)
1622 (inferior_deleted_event_object_type): Don't declare or define.
1623 * python/py-exitedevent.c (exited_event_object_type): Don't
1624 declare or define.
1625 * python/py-evts.c (gdbpy_initialize_py_events): Use
1626 py-all-events.def.
1627 * python/py-events.h (thread_event_object_type): Don't declare.
1628 (events_object): Use py-all-events.def.
1629 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
1630 py-event-types.def.
1631 * python/py-event-types.def: New file.
1632 * python/py-continueevent.c (create_continue_event_object): Don't
1633 declare or define.
1634 * python/py-bpevent.c (breakpoint_event_object_type): Don't
1635 declare or define.
1636 * python/py-all-events.def: New file.
1637
1638 2017-09-11 Tom Tromey <tom@tromey.com>
1639
1640 * python/py-threadevent.c (create_thread_event_object): Return
1641 gdbpy_ref.
1642 * python/py-stopevent.h (create_stop_event_object)
1643 (create_breakpoint_event_object, create_signal_event_object):
1644 Update.
1645 * python/py-stopevent.c (create_stop_event_object): Return
1646 gdbpy_ref.
1647 (emit_stop_event): Update.
1648 * python/py-signalevent.c (create_signal_event_object): Return
1649 gdbpy_ref.
1650 * python/py-infevents.c (create_inferior_call_event_object):
1651 Update.
1652 * python/py-event.h (create_event_object)
1653 (create_thread_event_object): Update.
1654 * python/py-event.c (create_event_object): Return gdbpy_ref.
1655 * python/py-continueevent.c: Return gdbpy_ref.
1656 * python/py-bpevent.c (create_breakpoint_event_object): Return
1657 gdbpy_ref.
1658
1659 2017-09-11 Tom Tromey <tom@tromey.com>
1660
1661 PR python/15622:
1662 * NEWS: Add entry.
1663 * python/python.c (do_start_initialization): Initialize new event
1664 types.
1665 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
1666 (gdbpy_initialize_inferior_deleted_event)
1667 (gdbpy_initialize_new_thread_event): Declare.
1668 * python/py-threadevent.c (create_thread_event_object): Add option
1669 "thread" parameter.
1670 * python/py-inferior.c (new_thread_event_object_type)
1671 (new_inferior_event_object_type)
1672 (inferior_deleted_event_object_type): Declare.
1673 (python_new_inferior, python_inferior_deleted): New functions.
1674 (add_thread_object): Emit new_thread event.
1675 (gdbpy_initialize_inferior): Attach new functions to corresponding
1676 observers.
1677 (new_thread, new_inferior, inferior_deleted): Define new event
1678 types.
1679 * python/py-evts.c (gdbpy_initialize_py_events): Add new
1680 registries.
1681 * python/py-events.h (events_object) <new_inferior,
1682 inferior_deleted, new_thread>: New fields.
1683 * python/py-event.h (create_thread_event_breakpoint): Add optional
1684 "thread" parameter.
1685
1686 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1687
1688 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
1689 check current_ui instead.
1690 (internal_vproblem): Likewise.
1691
1692 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
1693
1694 * thread.c (print_thread_info_1): Remove unnecessary calls to
1695 uiout->is_mi_like_p.
1696
1697 2017-09-09 Tom Tromey <tom@tromey.com>
1698
1699 * namespace.h (add_using_directive): Update.
1700 * namespace.c (add_using_directive): Change type of excludes to
1701 std::vector.
1702 * dwarf2read.c (read_import_statement): Use std::vector.
1703 (read_namespace): Update.
1704 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1705
1706 2017-09-09 Tom Tromey <tom@tromey.com>
1707
1708 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
1709
1710 2017-09-09 Tom Tromey <tom@tromey.com>
1711
1712 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
1713
1714 2017-09-09 Tom Tromey <tom@tromey.com>
1715
1716 * stack.c (func_command): Use gdb::def_vector.
1717
1718 2017-09-09 Tom Tromey <tom@tromey.com>
1719
1720 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
1721 ui_out_emit_list, ui_out_emit_tuple.
1722 (mi_cmd_var_update): Likewise.
1723
1724 2017-09-09 Tom Tromey <tom@tromey.com>
1725
1726 * mi/mi-interp.c (mi_user_selected_context_changed): Use
1727 ui_out_redirect_pop.
1728 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1729 ui_out_redirect_pop.
1730 * utils.c (do_ui_out_redirect_pop)
1731 (make_cleanup_ui_out_redirect_pop): Remove.
1732 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
1733 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
1734 * ui-out.h (ui_out_redirect_pop): New class.
1735
1736 2017-09-09 Tom Tromey <tom@tromey.com>
1737
1738 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
1739 (list_available_thread_groups, mi_cmd_list_thread_groups)
1740 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
1741 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
1742 Likewise.
1743
1744 2017-09-09 Tom Tromey <tom@tromey.com>
1745
1746 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
1747 ui_out_emit_tuple.
1748
1749 2017-09-09 Tom Tromey <tom@tromey.com>
1750
1751 * target.c (flash_erase_command): Use ui_out_emit_tuple.
1752 * stack.c (print_frame): Use ui_out_emit_tuple.
1753 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
1754 (info_spu_mailbox_command, info_spu_dma_command)
1755 (info_spu_proxydma_command): Likewise.
1756 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
1757 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
1758 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
1759 ui_out_emit_tuple.
1760 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
1761
1762 2017-09-09 Tom Tromey <tom@tromey.com>
1763
1764 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
1765 (class ui_out_emit_table): Update comment.
1766 * ui-out.c (do_cleanup_table_end)
1767 (make_cleanup_ui_out_table_begin_end): Remove.
1768 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
1769 (info_spu_dma_cmdlist): Likewise.
1770 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
1771 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
1772 ui_out_emit_table.
1773
1774 2017-09-09 Tom Tromey <tom@tromey.com>
1775
1776 * thread.c (print_thread_info_1): Use ui_out_emit_table,
1777 ui_out_emit_list, gdb::optional.
1778
1779 2017-09-09 John Baldwin <jhb@FreeBSD.org>
1780
1781 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
1782 prototype.
1783 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
1784 prototype.
1785 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
1786 prototype.
1787 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
1788 * ada-exp.y: Remove _initialize_ada_exp prototype.
1789 * ada-lang.c: Remove _initialize_ada_language prototype.
1790 * ada-tasks.c: Remove _initialize_tasks prototype.
1791 * addrmap.c: Remove _initialize_addrmap prototype.
1792 * agent.c: Remove _initialize_agent prototype.
1793 * aix-thread.c: Remove _initialize_aix_thread prototype.
1794 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
1795 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
1796 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
1797 prototype.
1798 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
1799 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
1800 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
1801 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
1802 prototype.
1803 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
1804 prototype.
1805 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
1806 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
1807 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
1808 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
1809 prototype.
1810 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
1811 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
1812 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
1813 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
1814 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1815 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
1816 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
1817 prototype.
1818 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
1819 prototype.
1820 * annotate.c: Remove _initialize_annotate prototype.
1821 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
1822 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
1823 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
1824 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
1825 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1826 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1827 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1828 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1829 prototype.
1830 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1831 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1832 * auto-load.c: Remove _initialize_auto_load prototype.
1833 * auxv.c: Remove _initialize_auxv prototype.
1834 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1835 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1836 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1837 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1838 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1839 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1840 prototype.
1841 * break-catch-throw.c: Remove _initialize_break_catch_throw
1842 prototype.
1843 * breakpoint.c: Remove _initialize_breakpoint prototype.
1844 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1845 * btrace.c: Remove _initialize_btrace prototype.
1846 * charset.c: Remove _initialize_charset prototype.
1847 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1848 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1849 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1850 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1851 * cli/cli-script.c: Remove _initialize_cli_script prototype.
1852 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1853 * coffread.c: Remove _initialize_coffread prototype.
1854 * compile/compile.c: Remove _initialize_compile prototype.
1855 * complaints.c: Remove _initialize_complaints prototype.
1856 * completer.c: Remove _initialize_completer prototype.
1857 * copying.awk: Remove _initialize_copying prototype.
1858 * copying.c: Regenerate.
1859 * core-regset.c: Remove _initialize_core_regset prototype.
1860 * corefile.c: Remove _initialize_core prototype.
1861 * corelow.c: Remove _initialize_corelow prototype.
1862 * cp-abi.c: Remove _initialize_cp_abi prototype.
1863 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1864 * cp-support.c: Remove _initialize_cp_support prototype.
1865 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1866 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1867 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1868 * ctf.c: Remove _initialize_ctf prototype.
1869 * d-lang.c: Remove _initialize_d_language prototype.
1870 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1871 prototype.
1872 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1873 * dbxread.c: Remove _initialize_dbxread prototype.
1874 * dcache.c: Remove _initialize_dcache prototype.
1875 * demangle.c: Remove _initialize_demangler prototype.
1876 * disasm-selftests.c: Remove _initialize_disasm_selftests
1877 prototype.
1878 * disasm.c: Remove _initialize_disasm prototype.
1879 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1880 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1881 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1882 prototype.
1883 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1884 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1885 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1886 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1887 * elfread.c: Remove _initialize_elfread prototype.
1888 * exec.c: Remove _initialize_exec prototype.
1889 * extension.c: Remove _initialize_extension prototype.
1890 * f-lang.c: Remove _initialize_f_language prototype.
1891 * f-valprint.c: Remove _initialize_f_valprint prototype.
1892 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1893 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1894 * filesystem.c: Remove _initialize_filesystem prototype.
1895 * findcmd.c: Remove _initialize_mem_search prototype.
1896 * fork-child.c: Remove _initialize_fork_child prototype.
1897 * frame-base.c: Remove _initialize_frame_base prototype.
1898 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1899 * frame.c: Remove _initialize_frame prototype.
1900 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1901 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1902 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1903 * gcore.c: Remove _initialize_gcore prototype.
1904 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1905 * gdbarch.c: Regenerate.
1906 * gdbarch.sh: Remove _initialize_gdbarch prototype.
1907 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1908 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1909 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1910 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1911 * go-lang.c: Remove _initialize_go_language prototype.
1912 * go32-nat.c: Remove _initialize_go32_nat prototype.
1913 * guile/guile.c: Remove _initialize_guile prototype.
1914 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
1915 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
1916 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
1917 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
1918 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
1919 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
1920 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
1921 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
1922 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
1923 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
1924 prototype.
1925 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
1926 prototype.
1927 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
1928 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
1929 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
1930 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
1931 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
1932 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
1933 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
1934 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
1935 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
1936 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
1937 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
1938 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
1939 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
1940 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1941 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
1942 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
1943 prototype.
1944 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
1945 prototype.
1946 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
1947 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
1948 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
1949 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
1950 * infcall.c: Remove _initialize_infcall prototype.
1951 * infcmd.c: Remove _initialize_infcmd prototype.
1952 * inferior.c: Remove _initialize_inferiors prototype.
1953 * inflow.c: Remove _initialize_inflow prototype.
1954 * infrun.c: Remove _initialize_infrun prototype.
1955 * interps.c: Remove _initialize_interpreter prototype.
1956 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
1957 * jit.c: Remove _initialize_jit prototype.
1958 * language.c: Remove _initialize_language prototype.
1959 * linux-fork.c: Remove _initialize_linux_fork prototype.
1960 * linux-nat.c: Remove _initialize_linux_nat prototype.
1961 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
1962 * linux-thread-db.c: Remove _initialize_thread_db prototype.
1963 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
1964 * m2-lang.c: Remove _initialize_m2_language prototype.
1965 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
1966 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
1967 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
1968 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
1969 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
1970 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1971 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1972 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
1973 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
1974 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
1975 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1976 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1977 * machoread.c: Remove _initialize_machoread prototype.
1978 * macrocmd.c: Remove _initialize_macrocmd prototype.
1979 * macroscope.c: Remove _initialize_macroscope prototype.
1980 * maint.c: Remove _initialize_maint_cmds prototype.
1981 * mdebugread.c: Remove _initialize_mdebugread prototype.
1982 * memattr.c: Remove _initialize_mem prototype.
1983 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
1984 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
1985 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
1986 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
1987 * mi/mi-main.c: Remove _initialize_mi_main prototype.
1988 * microblaze-linux-tdep.c: Remove
1989 _initialize_microblaze_linux_tdep prototype.
1990 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
1991 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
1992 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
1993 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
1994 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
1995 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
1996 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
1997 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
1998 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
1999 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
2000 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
2001 prototype.
2002 * mipsread.c: Remove _initialize_mipsread prototype.
2003 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
2004 prototype.
2005 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
2006 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
2007 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
2008 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
2009 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
2010 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
2011 prototype.
2012 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
2013 * nto-procfs.c: Remove _initialize_procfs prototype.
2014 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
2015 * objc-lang.c: Remove _initialize_objc_language prototype.
2016 * objfiles.c: Remove _initialize_objfiles prototype.
2017 * observer.c: Remove observer_test_first_notification_function,
2018 observer_test_second_notification_function,
2019 observer_test_third_notification_function, and
2020 _initialize_observer prototypes.
2021 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
2022 * osabi.c: Remove _initialize_gdb_osabi prototype.
2023 * osdata.c: Remove _initialize_osdata prototype.
2024 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
2025 * parse.c: Remove _initialize_parse prototype.
2026 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
2027 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
2028 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
2029 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
2030 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
2031 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
2032 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
2033 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
2034 * printcmd.c: Remove _initialize_printcmd prototype.
2035 * probe.c: Remove _initialize_probe prototype.
2036 * proc-api.c: Remove _initialize_proc_api prototype.
2037 * proc-events.c: Remove _initialize_proc_events prototype.
2038 * proc-service.c: Remove _initialize_proc_service prototype.
2039 * procfs.c: Remove _initialize_procfs prototype.
2040 * psymtab.c: Remove _initialize_psymtab prototype.
2041 * python/python.c: Remove _initialize_python prototype.
2042 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
2043 * record-btrace.c: Remove _initialize_record_btrace prototype.
2044 * record-full.c: Remove _initialize_record_full prototype.
2045 * record.c: Remove _initialize_record prototype.
2046 * regcache.c: Remove _initialize_regcache prototype.
2047 * reggroups.c: Remove _initialize_reggroup prototype.
2048 * remote-notif.c: Remove _initialize_notif prototype.
2049 * remote-sim.c: Remove _initialize_remote_sim prototype.
2050 * remote.c: Remove _initialize_remote prototype.
2051 * reverse.c: Remove _initialize_reverse prototype.
2052 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
2053 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
2054 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
2055 prototype.
2056 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
2057 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
2058 * rust-exp.y: Remove _initialize_rust_exp prototype.
2059 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
2060 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
2061 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
2062 * score-tdep.c: Remove _initialize_score_tdep prototype.
2063 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
2064 prototype.
2065 * ser-go32.c: Remove _initialize_ser_dos prototype.
2066 * ser-mingw.c: Remove _initialize_ser_windows prototype.
2067 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
2068 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
2069 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
2070 * serial.c: Remove _initialize_serial prototype.
2071 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
2072 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
2073 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
2074 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
2075 * skip.c: Remove _initialize_step_skip prototype.
2076 * sol-thread.c: Remove _initialize_sol_thread prototype.
2077 * solib-aix.c: Remove _initialize_solib_aix prototype.
2078 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
2079 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
2080 * solib-frv.c: Remove _initialize_frv_solib prototype.
2081 * solib-spu.c: Remove _initialize_spu_solib prototype.
2082 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
2083 * solib-target.c: Remove _initialize_solib_target prototype.
2084 * solib.c: Remove _initialize_solib prototype.
2085 * source.c: Remove _initialize_source prototype.
2086 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
2087 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
2088 prototype.
2089 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
2090 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
2091 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
2092 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
2093 prototype.
2094 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
2095 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
2096 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
2097 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
2098 prototype.
2099 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
2100 prototype.
2101 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
2102 prototype.
2103 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
2104 prototype.
2105 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
2106 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
2107 prototype.
2108 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
2109 prototype.
2110 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
2111 prototype.
2112 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
2113 prototype.
2114 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
2115 prototype.
2116 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
2117 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
2118 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
2119 * stabsread.c: Remove _initialize_stabsread prototype.
2120 * stack.c: Remove _initialize_stack prototype.
2121 * stap-probe.c: Remove _initialize_stap_probe prototype.
2122 * std-regs.c: Remove _initialize_frame_reg prototype.
2123 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
2124 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
2125 * symfile.c: Remove _initialize_symfile prototype.
2126 * symmisc.c: Remove _initialize_symmisc prototype.
2127 * symtab.c: Remove _initialize_symtab prototype.
2128 * target-dcache.c: Remove _initialize_target_dcache prototype.
2129 * target-descriptions.c: Remove _initialize_target_descriptions
2130 prototype.
2131 * thread.c: Remove _initialize_thread prototype.
2132 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
2133 prototype.
2134 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
2135 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
2136 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
2137 prototype.
2138 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
2139 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
2140 * tracefile.c: Remove _initialize_tracefile prototype.
2141 * tracepoint.c: Remove _initialize_tracepoint prototype.
2142 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
2143 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
2144 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
2145 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
2146 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
2147 * tui/tui-win.c: Remove _initialize_tui_win prototype.
2148 * tui/tui.c: Remove _initialize_tui prototype.
2149 * typeprint.c: Remove _initialize_typeprint prototype.
2150 * user-regs.c: Remove _initialize_user_regs prototype.
2151 * utils.c: Remove _initialize_utils prototype.
2152 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
2153 * valarith.c: Remove _initialize_valarith prototype.
2154 * valops.c: Remove _initialize_valops prototype.
2155 * valprint.c: Remove _initialize_valprint prototype.
2156 * value.c: Remove _initialize_values prototype.
2157 * varobj.c: Remove _initialize_varobj prototype.
2158 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
2159 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
2160 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
2161 * windows-nat.c: Remove _initialize_windows_nat,
2162 _initialize_check_for_gdb_ini, and _initialize_loadable
2163 prototypes.
2164 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
2165 * xcoffread.c: Remove _initialize_xcoffread prototype.
2166 * xml-support.c: Remove _initialize_xml_support prototype.
2167 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
2168 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
2169 prototype.
2170 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
2171 prototype.
2172 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2173
2174 2017-09-08 Keith Seitz <keiths@redhat.com>
2175
2176 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
2177 field.
2178
2179 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
2180
2181 * f-valprint.c (f_val_print): Remove check for one byte
2182 sized integers. Remove printing of character type.
2183
2184 2017-09-08 Frank Penczek <frank.penczek@intel.com>
2185 Christoph Weinmann <christoph.t.weinmann@intel.com>
2186 Bernhard Heckel <bernhard.heckel@intel.com>
2187
2188 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
2189 to maintain proper indentation when printing pointers/refs.
2190
2191 2017-09-07 Joel Brobecker <brobecker@adacore.com>
2192
2193 GDB 8.0.1 released.
2194
2195 2017-09-07 Joel Brobecker <brobecker@adacore.com>
2196
2197 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2198
2199 2017-09-05 Tom Tromey <tom@tromey.com>
2200
2201 * parse.c (funcall_chain): Now a std::vector.
2202 (start_arglist, end_arglist): Simplify.
2203 (free_funcalls): Remove.
2204 (parse_exp_in_context_1): Remove cleanup.
2205
2206 2017-09-05 Tom Tromey <tom@tromey.com>
2207
2208 * go-exp.y (go_parse): Don't create a cleanup.
2209
2210 2017-09-05 Tom Tromey <tom@tromey.com>
2211
2212 * d-exp.y (PrimaryExpression): Use std::string.
2213 (d_parse): Don't create a cleanup.
2214
2215 2017-09-05 Tom Tromey <tom@tromey.com>
2216
2217 * utils.c (do_clear_parser_state): Remove.
2218 (make_cleanup_clear_parser_state): Remove.
2219 * p-exp.y (pascal_parse): Use scoped_restore.
2220 * m2-exp.y (m2_parse): Use scoped_restore.
2221 * f-exp.y (f_parse): Use scoped_restore.
2222 * d-exp.y (d_parse): Use scoped_restore.
2223 * c-exp.y (c_parse): Use scoped_restore.
2224 * ada-exp.y (ada_parse): Use scoped_restore.
2225 * utils.h (make_cleanup_clear_parser_state): Remove.
2226
2227 2017-09-06 Keith Seitz <keiths@redhat.com>
2228
2229 * dwarf2read.c (dw2_linkage_name_attr): New function.
2230 (dw2_linkage_name): New function.
2231 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2232 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2233 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2234
2235 2017-09-06 Kamil Rytarowski <n54@gmx.com>
2236
2237 * config/djgpp/djconfig.sh: Correct shell portability issue.
2238
2239 2017-09-06 Kamil Rytarowski <n54@gmx.com>
2240
2241 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2242
2243 2017-09-06 John Baldwin <jhb@FreeBSD.org>
2244
2245 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2246 * NEWS: Mention new FreeBSD/mips native configuration.
2247 * configure.host: Add aarch64*-*-freebsd*.
2248 * configure.nat: Likewise.
2249 * aarch64-fbsd-nat.c: New file.
2250
2251 2017-09-06 John Baldwin <jhb@FreeBSD.org>
2252
2253 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2254 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2255 * NEWS: Mention new FreeBSD/aarch64 target.
2256 * configure.tgt: Add aarch64*-*-freebsd*.
2257 * aarch64-fbsd-tdep.c: New file.
2258 * aarch64-fbsd-tdep.h: New file.
2259
2260 2017-09-06 Kamil Rytarowski <n54@gmx.com>
2261
2262 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2263
2264 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2265
2266 * parse.c (find_minsym_type_and_address): Don't relocate addresses
2267 of TLS symbols.
2268
2269 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2270
2271 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2272 call.
2273
2274 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2275
2276 * infrun.c (follow_exec): Call add_thread after
2277 target_find_description.
2278
2279 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2280
2281 * infrun.c (handle_inferior_event_1): When exec'ing, read
2282 stop_pc after follow_exec.
2283
2284 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2285
2286 * remote.c (process_g_packet): Update error message.
2287
2288 2017-09-05 Yao Qi <yao.qi@linaro.org>
2289
2290 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
2291 targets.
2292
2293 2017-09-05 Pedro Alves <palves@redhat.com>
2294
2295 * eval.c (eval_call, evaluate_funcall): New functions, factored
2296 out from ...
2297 (evaluate_subexp_standard): ... this.
2298
2299 2017-09-05 Yao Qi <yao.qi@linaro.org>
2300
2301 * amd64-tdep.c (amd64_target_description): Create target
2302 descriptions.
2303 (_initialize_amd64_tdep): Don't call functions
2304 initialize_tdesc_amd64_*. Add self tests.
2305 * arch/amd64.c (amd64_create_target_description): Add parameter
2306 is_linux. Call set_tdesc_osabi if is_linux is true.
2307 * arch/amd64.h (amd64_create_target_description): Update the
2308 declaration.
2309 * arch/i386.c (i386_create_target_description): Add parameter
2310 is_linux. Call set_tdesc_osabi if is_linux is true.
2311 * arch/i386.h (i386_create_target_description): Update
2312 declaration.
2313 * configure.tgt: Add i386.o to gdb_target_obs.
2314 * features/Makefile (XMLTOC): Remove i386/*.xml.
2315 * features/i386/amd64-avx-avx512.c: Remove.
2316 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
2317 * features/i386/amd64-avx-mpx.c: Remove.
2318 * features/i386/amd64-avx.c: Remove.
2319 * features/i386/amd64-mpx.c: Remove.
2320 * features/i386/amd64.c: Remove.
2321 * features/i386/i386-avx-avx512.c: Remove.
2322 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2323 * features/i386/i386-avx-mpx.c: Remove.
2324 * features/i386/i386-avx.c: Remove.
2325 * features/i386/i386-mmx.c: Remove.
2326 * features/i386/i386-mpx.c: Remove.
2327 * features/i386/i386.c: Remove.
2328 * i386-tdep.c: Don't include features/i386/i386*.c., include
2329 target-descriptions.h and arch/i386.h.
2330 (i386_target_description): Create target descriptions.
2331 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2332 functions. Do self tests.
2333
2334 2017-09-05 Yao Qi <yao.qi@linaro.org>
2335
2336 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2337 * features/i386/amd64-avx-avx512-linux.c: Removed.
2338 * features/i386/amd64-avx-linux.c: Removed.
2339 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2340 * features/i386/amd64-avx-mpx-linux.c: Removed.
2341 * features/i386/amd64-linux.c: Removed.
2342 * features/i386/amd64-mpx-linux.c: Removed.
2343 * features/i386/x32-avx-avx512-linux.c: Removed.
2344 * features/i386/x32-avx-linux.c: Removed.
2345 * features/i386/x32-linux.c: Removed.
2346
2347 2017-09-05 Yao Qi <yao.qi@linaro.org>
2348
2349 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
2350 features/i386/*.c.
2351 (amd64_linux_read_description): Call
2352 amd64_create_target_description.
2353 * arch/amd64.c: New file.
2354 * arch/amd64.h: New file.
2355 * configure.tgt (x86_64-*-linux*): Append amd64.o.
2356 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2357
2358 2017-09-05 Yao Qi <yao.qi@linaro.org>
2359
2360 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2361 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
2362 (amd64_linux_read_description): Create target descriptions.
2363 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2364 functions. Add unit tests.
2365 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2366 x32-core.xml.
2367 * features/i386/64bit-avx.c: Generated.
2368 * features/i386/64bit-avx512.c: Generated.
2369 * features/i386/64bit-core.c: Generated.
2370 * features/i386/64bit-linux.c: Generated.
2371 * features/i386/64bit-mpx.c: Generated.
2372 * features/i386/64bit-pkeys.c: Generated.
2373 * features/i386/64bit-segments.c: Generated.
2374 * features/i386/64bit-sse.c: Generated.
2375 * features/i386/x32-core.c: Generated.
2376 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2377 c files for amd64-linux and x32-linux.
2378
2379 2017-09-05 Yao Qi <yao.qi@linaro.org>
2380
2381 * amd64-linux-tdep.c (amd64_linux_read_description): New
2382 function.
2383 (amd64_linux_core_read_description): Call
2384 amd64_linux_read_description.
2385 (amd64_linux_init_abi): Likewise.
2386 (amd64_x32_linux_init_abi): Likewise.
2387 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
2388 * x86-linux-nat.c (x86_linux_read_description): Call
2389 amd64_linux_read_description.
2390
2391 2017-09-05 Yao Qi <yao.qi@linaro.org>
2392
2393 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
2394 comments.
2395
2396 2017-09-05 Yao Qi <yao.qi@linaro.org>
2397
2398 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
2399 * features/i386/i386-avx-avx512-linux.c: Remove.
2400 * features/i386/i386-avx-linux.c: Remove.
2401 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
2402 * features/i386/i386-avx-mpx-linux.c: Remove.
2403 * features/i386/i386-linux.c: Remove.
2404 * features/i386/i386-mmx-linux.c: Remove.
2405 * features/i386/i386-mpx-linux.c: Remove.
2406
2407 2017-09-05 Yao Qi <yao.qi@linaro.org>
2408
2409 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
2410 (SFILES): Add arch/i386.c.
2411 (HFILES_NO_SRCDIR): Add arch/i386.h.
2412 * arch/i386.c: New file.
2413 * arch/i386.h: New file.
2414 * arch/tdesc.h (allocate_target_description): Declare.
2415 (set_tdesc_architecture): Declare.
2416 (set_tdesc_osabi): Declare.
2417 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
2418 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
2419 include arch/i386.h.
2420 (i386_linux_read_description): Remove code and call
2421 i386_create_target_description.
2422 (set_tdesc_architecture): New function.
2423 (set_tdesc_osabi): New function.
2424 * target-descriptions.h (allocate_target_description): Remove.
2425
2426 2017-09-05 Yao Qi <yao.qi@linaro.org>
2427
2428 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
2429 * target-descriptions.c (tdesc_create_feature): Likewise, and
2430 adjust code.
2431 * features/i386/32bit-avx.c: Re-generated.
2432 * features/i386/32bit-avx512.c: Re-generated.
2433 * features/i386/32bit-core.c: Re-generated.
2434 * features/i386/32bit-linux.c: Re-generated.
2435 * features/i386/32bit-mpx.c: Re-generated.
2436 * features/i386/32bit-pkeys.c: Re-generated.
2437 * features/i386/32bit-sse.c: Re-generated.
2438
2439 2017-09-05 Yao Qi <yao.qi@linaro.org>
2440
2441 * regformats/regdef.h (struct reg): Override operator == and !=.
2442
2443 2017-09-05 Yao Qi <yao.qi@linaro.org>
2444
2445 * arch/tdesc.h: New file.
2446 * regformats/regdat.sh: Generate code using tdesc_create_reg.
2447 * target-descriptions.c: Update comments.
2448 * target-descriptions.h: Include "arch/tdesc.h". Remove the
2449 declarations.
2450 * features/i386/32bit-avx.c: Re-generated.
2451 * features/i386/32bit-avx512.c: Re-generated.
2452 * features/i386/32bit-core.c: Re-generated.
2453 * features/i386/32bit-linux.c: Re-generated.
2454 * features/i386/32bit-mpx.c: Re-generated.
2455 * features/i386/32bit-pkeys.c: Re-generated.
2456 * features/i386/32bit-sse.c: Re-generated.
2457
2458 2017-09-05 Yao Qi <yao.qi@linaro.org>
2459
2460 * regformats/regdat.sh: Update generated code.
2461
2462 2017-09-05 Yao Qi <yao.qi@linaro.org>
2463
2464 * regformats/regdat.sh: Adjust code order.
2465
2466 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2467
2468 * expprint.c (dump_subexp_body_standard): Use constant format
2469 string in fprintf_filtered call.
2470
2471 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2472
2473 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
2474 NetBSD/i386.
2475 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
2476
2477 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2478
2479 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
2480
2481 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2482
2483 * bsd-kvm.o: Define _KMEMUSER.
2484 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
2485 * configure: Regenerate.
2486
2487 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2488
2489 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
2490 * i386-fbsd-nat.c: Likewise.
2491
2492 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2493
2494 * unittests/array-view-selftests.c: Add include of <array>.
2495
2496 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2497
2498 * spu-tdep.c (flush_ea_cache): Add missing argument to
2499 call_function_by_hand.
2500
2501 2017-09-04 Pedro Alves <palves@redhat.com>
2502
2503 * NEWS (Safer support for debugging with no debug info): New.
2504
2505 2017-09-04 Pedro Alves <palves@redhat.com>
2506
2507 * c-exp.y (function_method, function_method_void): Add current
2508 instance flags to TYPE_INSTANCE.
2509 * dwarf2read.c (check_modifier): New.
2510 (compute_delayed_physnames): Assert that only C++ adds delayed
2511 physnames. Mark fn_fields as const/volatile depending on
2512 physname.
2513 * eval.c (make_params): New type_instance_flags parameter. Use
2514 it as the new type's instance flags.
2515 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
2516 flags element and pass it to make_params.
2517 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
2518 instance flags element.
2519 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
2520 * gdbtypes.h: Include "enum-flags.h".
2521 (type_instance_flags): New enum-flags type.
2522 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
2523 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
2524 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
2525 (follow_type_instance_flags): New function.
2526 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
2527 * parser-defs.h (follow_type_instance_flags): Declare.
2528 * valops.c (value_struct_elt_for_reference): const/volatile must
2529 match too.
2530
2531 2017-09-04 Pedro Alves <palves@redhat.com>
2532
2533 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
2534 function/method scopes; lookup the nested name as a function local
2535 static variable.
2536
2537 2017-09-04 Pedro Alves <palves@redhat.com>
2538
2539 (%type <voidval>): Add function_method.
2540 * c-exp.y (exp): New production for calls with no arguments.
2541 (function_method, function_method_void_or_typelist): New
2542 productions.
2543 (exp): New production for "method()::static_var".
2544 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
2545 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2546 Handle OP_FUNC_STATIC_VAR.
2547 * parse.c (operator_length_standard):
2548 Handle OP_FUNC_STATIC_VAR.
2549
2550 2017-09-04 Pedro Alves <palves@redhat.com>
2551
2552 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
2553 handling.
2554 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2555 Ditto.
2556 * parse.c (operator_length_standard, operator_check_standard):
2557 Ditto.
2558 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
2559
2560 2017-09-04 Pedro Alves <palves@redhat.com>
2561
2562 * ax-gdb.c: Include "typeprint.h".
2563 (gen_expr_for_cast): New function.
2564 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
2565 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
2566 type is unknown.
2567 * dwarf2read.c (new_symbol_full): Fallback to int instead of
2568 nodebug_data_symbol.
2569 * eval.c: Include "typeprint.h".
2570 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
2571 Error out if symbol has unknown type.
2572 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
2573 evaluate_subexp_for_cast.
2574 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
2575 OP_VAR_MSYM_VALUE.
2576 (evaluate_subexp_for_cast): New function.
2577 * gdbtypes.c (init_nodebug_var_type): New function.
2578 (objfile_type): Use it to initialize types of variables with no
2579 debug info.
2580 * typeprint.c (error_unknown_type): New.
2581 * typeprint.h (error_unknown_type): New declaration.
2582 * compile/compile-c-types.c (convert_type_basic): Handle
2583 TYPE_CODE_ERROR; warn and fallback to int for variables with
2584 unknown type.
2585
2586 2017-09-04 Pedro Alves <palves@redhat.com>
2587
2588 * eval.c (evaluate_var_value): New function, factored out from ...
2589 (evaluate_subexp_standard): ... here.
2590
2591 2017-09-04 Pedro Alves <palves@redhat.com>
2592
2593 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
2594 Remove useless assignments to 'op'.
2595
2596 2017-09-04 Pedro Alves <palves@redhat.com>
2597
2598 * eval.c (eval_skip_value): New function.
2599 (evaluate_subexp_standard): Use it.
2600
2601 2017-09-04 Pedro Alves <palves@redhat.com>
2602
2603 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
2604 function name from symbol/minsym and pass it to
2605 error_call_unknown_return_type.
2606
2607 2017-09-04 Pedro Alves <palves@redhat.com>
2608
2609 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
2610 * ax-gdb.c (gen_msym_var_ref): New function.
2611 (gen_expr): Handle OP_VAR_MSYM_VALUE.
2612 * eval.c (evaluate_var_msym_value): New function.
2613 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
2614 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
2615 to call_function_by_hand.
2616 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2617 Handle OP_VAR_MSYM_VALUE.
2618 (union exp_element) <msymbol>: New field.
2619 * minsyms.h (struct type): Forward declare.
2620 (find_minsym_type_and_address): Declare.
2621 * parse.c (write_exp_elt_msym): New function.
2622 (write_exp_msymbol): Delete, refactored as ...
2623 (find_minsym_type_and_address): ... this new function.
2624 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
2625 (operator_length_standard, operator_check_standard): Handle
2626 OP_VAR_MSYM_VALUE.
2627 * std-operator.def (OP_VAR_MSYM_VALUE): New.
2628
2629 2017-09-04 Pedro Alves <palves@redhat.com>
2630
2631 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
2632 TYPE_GNU_IFUNC specially here. Throw error if return type is
2633 unknown.
2634 * ada-typeprint.c (print_func_type): Handle functions with unknown
2635 return type.
2636 * c-typeprint.c (c_type_print_base): Handle functions and methods
2637 with unknown return type.
2638 * compile/compile-c-symbols.c (convert_symbol_bmsym)
2639 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
2640 * compile/compile-c-types.c: Include "objfiles.h".
2641 (convert_func): For functions with unknown return type, warn and
2642 default to int.
2643 * compile/compile-object-run.c (compile_object_run): Adjust call
2644 to call_function_by_hand_dummy.
2645 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
2646 call_function_by_hand.
2647 * eval.c (evaluate_subexp_standard): Adjust calls to
2648 call_function_by_hand. Handle functions and methods with unknown
2649 return type. Pass expect_type to call_function_by_hand.
2650 * f-typeprint.c (f_type_print_base): Handle functions with unknown
2651 return type.
2652 * gcore.c (call_target_sbrk): Adjust call to
2653 call_function_by_hand.
2654 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
2655 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
2656 an integer address type instead of nodebug.
2657 * guile/scm-value.c (gdbscm_value_call): Adjust call to
2658 call_function_by_hand.
2659 * infcall.c (error_call_unknown_return_type): New function.
2660 (call_function_by_hand): New "default_return_type" parameter.
2661 Pass it down.
2662 (call_function_by_hand_dummy): New "default_return_type"
2663 parameter. Use it instead of defaulting to int. If there's no
2664 default and the return type is unknown, throw an error. If
2665 there's a default return type, and the called function has no
2666 debug info, then assume the function is prototyped.
2667 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
2668 New "default_return_type" parameter.
2669 (error_call_unknown_return_type): New declaration.
2670 * linux-fork.c (call_lseek): Cast return type of lseek.
2671 (inferior_call_waitpid, checkpoint_command): Adjust calls to
2672 call_function_by_hand.
2673 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
2674 calls to call_function_by_hand.
2675 * m2-typeprint.c (m2_procedure): Handle functions with unknown
2676 return type.
2677 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2678 (value_nsstring, print_object_command): Adjust calls to
2679 call_function_by_hand.
2680 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
2681 functions with unknown return type.
2682 (pascal_type_print_func_varspec_suffix): New function.
2683 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
2684 TYPE_CODE_METHOD>: Use it.
2685 * python/py-value.c (valpy_call): Adjust call to
2686 call_function_by_hand.
2687 * rust-lang.c (rust_evaluate_funcall): Adjust call to
2688 call_function_by_hand.
2689 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
2690 call_function_by_hand.
2691 * valops.c (value_allocate_space_in_inferior): Adjust call to
2692 call_function_by_hand.
2693 * typeprint.c (type_print_unknown_return_type): New function.
2694 * typeprint.h (type_print_unknown_return_type): New declaration.
2695
2696 2017-09-04 Pedro Alves <palves@redhat.com>
2697
2698 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
2699 types with more than one parameter as prototyped.
2700
2701 2017-09-04 Pedro Alves <palves@redhat.com>
2702
2703 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
2704 (disassemble_command): Use gdb_disassembly_flags instead of bare
2705 int.
2706 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
2707 (dump_insns, do_mixed_source_and_assembly_deprecated)
2708 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
2709 Use gdb_disassembly_flags instead of bare int.
2710 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
2711 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
2712 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
2713 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
2714 (enum gdb_disassembly_flag): ... values of this new enumeration.
2715 (gdb_disassembly_flags): Define.
2716 (gdb_disassembly)
2717 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
2718 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
2719 gdb_disassembly_flags instead of bare int.
2720 * record-btrace.c (btrace_insn_history)
2721 (record_btrace_insn_history, record_btrace_insn_history_range)
2722 (record_btrace_insn_history_from): Use gdb_disassembly_flags
2723 instead of bare int.
2724 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
2725 Use gdb_disassembly_flags instead of bare int.
2726 * target-debug.h (target_debug_print_gdb_disassembly_flags):
2727 Define.
2728 * target-delegates.c: Regenerate.
2729 * target.c (target_insn_history, target_insn_history_from)
2730 (target_insn_history_range): Use gdb_disassembly_flags instead of
2731 bare int.
2732 * target.h: Include "disasm.h".
2733 (struct target_ops) <to_insn_history, to_insn_history_from,
2734 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
2735 int.
2736 (target_insn_history, target_insn_history_from)
2737 (target_insn_history_range): Use gdb_disassembly_flags instead of
2738 bare int.
2739
2740 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2741
2742 * cli/cli-script.c (build_command_line): For if/while commands,
2743 check whether args is empty.
2744
2745 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2746
2747 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
2748 (enum command_control_type): Likewise.
2749 (struct command_line): Likewise.
2750 (free_command_lines): Likewise.
2751 (struct command_lines_deleter): Likewise.
2752 (command_line_up): Likewise.
2753 (read_command_lines): Likewise.
2754 (read_command_lines_1): Likewise.
2755 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
2756 (enum command_control_type): Likewise.
2757 (struct command_line): Likewise.
2758 (free_command_lines): Likewise.
2759 (struct command_lines_deleter): Likewise.
2760 (command_line_up): Likewise.
2761 (read_command_lines): Likewise.
2762 (read_command_lines_1): Likewise.
2763 * breakpoint.h: Include cli/cli-script.h.
2764 * extension-priv.h: Likewise.
2765 * gdbcmd.h: Likewise.
2766
2767 2017-09-04 Pedro Alves <palves@redhat.com>
2768
2769 * ada-lang.c (is_known_support_routine): Move sal declaration to
2770 where it is initialized.
2771 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
2772 (parse_breakpoint_sals, decode_static_tracepoint_spec)
2773 (clear_command, update_static_tracepoint): Remove init_sal
2774 references. Move declarations closer to initializations.
2775 * cli/cli-cmds.c (list_command): Move sal declarations closer to
2776 initializations.
2777 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
2778 references. Move sal declarations closer to initializations.
2779 * frame.c (find_frame_sal): Return a symtab_and_line via function
2780 return instead of output parameter. Remove init_sal references.
2781 * frame.h (find_frame_sal): Return a symtab_and_line via function
2782 return instead of output parameter.
2783 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
2784 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
2785 instead of memset.
2786 (gdbscm_find_pc_line): Remove init_sal reference.
2787 * infcall.c (call_function_by_hand_dummy): Remove init_sal
2788 references. Move declarations closer to initializations.
2789 * infcmd.c (set_step_frame): Update. Move declarations closer to
2790 initializations.
2791 (finish_backward): Remove init_sal references. Move declarations
2792 closer to initializations.
2793 * infrun.c (process_event_stop_test, handle_step_into_function)
2794 (insert_hp_step_resume_breakpoint_at_frame)
2795 (insert_step_resume_breakpoint_at_caller): Likewise.
2796 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
2797 (symbol_to_sal): Likewise.
2798 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
2799 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
2800 to its initialization.
2801 * reverse.c (save_bookmark_command): Use new/delete. Remove
2802 init_sal references. Move declarations closer to initializations.
2803 * source.c (get_current_source_symtab_and_line): Remove brace
2804 initialization.
2805 (set_current_source_symtab_and_line): Now takes the sal by const
2806 reference. Remove brace initialization.
2807 (line_info): Remove init_sal reference.
2808 * source.h (set_current_source_symtab_and_line): Now takes a
2809 symtab_and_line via const reference.
2810 * stack.c (set_current_sal_from_frame): Adjust.
2811 (print_frame_info): Adjust.
2812 (get_last_displayed_sal): Return the sal via function return
2813 instead of via output parameter. Simplify.
2814 (frame_info): Adjust.
2815 * stack.h (get_last_displayed_sal): Return the sal via function
2816 return instead of via output parameter.
2817 * symtab.c (init_sal): Delete.
2818 (find_pc_sect_line): Remove init_sal references. Move
2819 declarations closer to initializations.
2820 (find_function_start_sal): Remove init_sal references. Move
2821 declarations closer to initializations.
2822 * symtab.h (struct symtab_and_line): In-class initialize all
2823 fields.
2824 * tracepoint.c (set_traceframe_context)
2825 (print_one_static_tracepoint_marker): Remove init_sal references.
2826 Move declarations closer to initializations.
2827 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2828 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
2829 declarations closer to initializations.
2830 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2831 init_sal references. Adjust.
2832
2833 2017-09-04 Pedro Alves <palves@redhat.com>
2834
2835 * ax-gdb.c (agent_command_1): Use range-for.
2836 * break-catch-throw.c (re_set_exception_catchpoint): Update.
2837 * breakpoint.c: Include "common/array-view.h".
2838 (init_breakpoint_sal, create_breakpoint_sal): Change sals
2839 parameter from struct symtabs_and_lines to
2840 array_view<symtab_and_line>. Adjust. Use range-for. Update.
2841 (breakpoint_sals_to_pc): Change sals parameter from struct
2842 symtabs_and_lines to std::vector reference.
2843 (check_fast_tracepoint_sals): Change sals parameter from struct
2844 symtabs_and_lines to std::array_view. Use range-for.
2845 (decode_static_tracepoint_spec): Return a std::vector instead of
2846 symtabs_and_lines. Update.
2847 (create_breakpoint): Update.
2848 (break_range_command, until_break_command, clear_command): Update.
2849 (base_breakpoint_decode_location, bkpt_decode_location)
2850 (bkpt_probe_create_sals_from_location)
2851 (bkpt_probe_decode_location, tracepoint_decode_location)
2852 (tracepoint_probe_decode_location)
2853 (strace_marker_create_sals_from_location): Return a std::vector
2854 instead of symtabs_and_lines.
2855 (strace_marker_create_breakpoints_sal): Update.
2856 (strace_marker_decode_location): Return a std::vector instead of
2857 symtabs_and_lines. Update.
2858 (update_breakpoint_locations): Change struct symtabs_and_lines
2859 parameters to gdb::array_view. Adjust.
2860 (location_to_sals): Return a std::vector instead of
2861 symtabs_and_lines. Update.
2862 (breakpoint_re_set_default): Use std::vector instead of struct
2863 symtabs_and_lines.
2864 (decode_location_default): Return a std::vector instead of
2865 symtabs_and_lines. Update.
2866 * breakpoint.h: Include "common/array-view.h".
2867 (struct breakpoint_ops) <decode_location>: Now returns a
2868 std::vector instead of returning a symtabs_and_lines via output
2869 parameter.
2870 (update_breakpoint_locations): Change sals parameters to use
2871 gdb::array_view.
2872 * cli/cli-cmds.c (edit_command, list_command): Update to use
2873 std::vector and gdb::array_view.
2874 (ambiguous_line_spec): Adjust to use gdb::array_view and
2875 range-for.
2876 (compare_symtabs): Rename to ...
2877 (cmp_symtabs): ... this. Change parameters to symtab_and_line
2878 const reference and adjust.
2879 (filter_sals): Rewrite using std::vector and standard algorithms.
2880 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2881 (jump_command): Update to use std::vector.
2882 * linespec.c (struct linespec_state) <canonical_names>: Update
2883 comment.
2884 (add_sal_to_sals_basic): Delete.
2885 (add_sal_to_sals, filter_results, convert_results_to_lsals)
2886 (decode_line_2, create_sals_line_offset)
2887 (convert_address_location_to_sals, convert_linespec_to_sals)
2888 (convert_explicit_location_to_sals, parse_linespec)
2889 (event_location_to_sals, decode_line_full, decode_line_1)
2890 (decode_line_with_current_source)
2891 (decode_line_with_last_displayed, decode_objc)
2892 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2893 (linespec_result::~linespec_result): Adjust to use std::vector
2894 instead of symtabs_and_lines.
2895 * linespec.h (linespec_sals::sals): Now a std::vector.
2896 (struct linespec_result): Use std::vector, bool, and in-class
2897 initialization.
2898 (decode_line_1, decode_line_with_current_source)
2899 (decode_line_with_last_displayed): Return std::vector.
2900 * macrocmd.c (info_macros_command): Use std::vector.
2901 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2902 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2903 std::vector.
2904 * probe.h (parse_probes): Return a std::vector.
2905 * python/python.c (gdbpy_decode_line): Use std::vector and
2906 gdb::array_view.
2907 * source.c (select_source_symtab, line_info): Use std::vector.
2908 * stack.c (func_command): Use std::vector.
2909 * symtab.h (struct symtabs_and_lines): Delete.
2910 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2911
2912 2017-09-04 Pedro Alves <palves@redhat.com>
2913
2914 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2915 unittests/array-view-selftests.c.
2916 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
2917 * common/array-view.h: New file.
2918 * unittests/array-view-selftests.c: New file.
2919
2920 2017-09-04 Pedro Alves <palves@redhat.com>
2921
2922 * cli/cli-cmds.c (edit_command): Pass message to
2923 ambiguous_line_spec.
2924 (list_command): Pass message to ambiguous_line_spec. Say
2925 "first"/"last" instead of "start" and "end" to be consistent with
2926 the manual.
2927 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
2928 them to print formatted message.
2929
2930 2017-09-04 Pedro Alves <palves@redhat.com>
2931
2932 * btrace.c (ftrace_add_pt): Pass btrace_insn to
2933 ftrace_update_insns by reference instead of pointer.
2934
2935 2017-09-04 Yao Qi <yao.qi@linaro.org>
2936
2937 * i386-go32-tdep.c: Include x86-xstate.h.
2938 (i386_go32_init_abi): Call i386_target_description.
2939 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
2940 if xcr0 is X86_XSTATE_X87_MASK.
2941 * i386-tdep.h (tdesc_i386): Remove the declaration.
2942 (tdesc_i386_mmx): Likewise.
2943
2944 2017-09-04 Yao Qi <yao.qi@linaro.org>
2945
2946 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
2947 X86_XSTATE_SSE_MASK instead of 0.
2948
2949 2017-09-04 Yao Qi <yao.qi@linaro.org>
2950
2951 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
2952 i386_target_description.
2953 * i386-fbsd-nat.c (i386fbsd_read_description): Call
2954 i386_target_description.
2955 * i386-tdep.c (i386_gdbarch_init): Likewise.
2956
2957 2017-09-04 Yao Qi <yao.qi@linaro.org>
2958
2959 * amd64-darwin-tdep.c: Include "x86-xstate.h".
2960 (x86_darwin_init_abi_64): Call amd64_target_description.
2961 * amd64-dicos-tdep.c: Likewise.
2962 * amd64-fbsd-nat.c: Likewise.
2963 * amd64-fbsd-tdep.c: Likewise.
2964 * amd64-nbsd-tdep.c: Likewise.
2965 * amd64-obsd-tdep.c: Likewise.
2966 * amd64-sol2-tdep.c: Likewise.
2967 * amd64-windows-tdep.c: Likewise.
2968 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
2969
2970 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2971
2972 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
2973 (btrace_function) <insn>: Change type to use std::vector.
2974 * btrace.c (ftrace_debug, ftrace_call_num_insn,
2975 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
2976 ftrace_update_insns, ftrace_compute_global_level_offset,
2977 btrace_stitch_bts, btrace_clear, btrace_insn_get,
2978 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
2979 change to std::vector.
2980 (ftrace_update_insns): Adjust to change to std::vector, change
2981 type of INSN parameter.
2982 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
2983 * record-btrace.c (btrace_call_history_insn_range,
2984 btrace_compute_src_line_range,
2985 record_btrace_frame_prev_register): Adjust to change to
2986 std::vector.
2987 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
2988 to change to std::vector.
2989
2990 2017-09-03 Tom Tromey <tom@tromey.com>
2991
2992 * corefile.c (reopen_exec_file): Use std::string.
2993
2994 2017-09-03 Tom Tromey <tom@tromey.com>
2995
2996 * compile/compile.c (compile_register_name_mangled): Return
2997 std::string.
2998 * compile/compile-loc2c.c (pushf_register_address): Update.
2999 (pushf_register): Update.
3000 * compile/compile-c-types.c (convert_array): Update.
3001 * compile/compile-c-symbols.c (generate_vla_size): Update.
3002 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
3003 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
3004 (convert_one_symbol): Update.
3005 (generate_c_for_for_one_variable): Update.
3006 * compile/compile-c-support.c (c_get_range_decl_name): Return a
3007 std::string.
3008 (generate_register_struct): Update.
3009 * compile/compile-internal.h (c_get_range_decl_name): Return a
3010 std::string.
3011 (compile_register_name_mangled): Return std::string.
3012
3013 2017-09-03 Tom Tromey <tom@tromey.com>
3014
3015 * utils.c (perror_string): Return a std::string.
3016 (throw_perror_with_name, perror_warning_with_name): Update.
3017
3018 2017-09-03 Tom Tromey <tom@tromey.com>
3019
3020 * demangle.c (demangle_command): Use std::string,
3021 unique_xmalloc_ptr.
3022
3023 2017-09-03 Tom Tromey <tom@tromey.com>
3024
3025 * cli/cli-setshow.c (do_set_command): Use std::string.
3026
3027 2017-09-03 Tom Tromey <tom@tromey.com>
3028
3029 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
3030
3031 2017-09-03 Tom Tromey <tom@tromey.com>
3032
3033 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
3034
3035 2017-09-03 Tom Tromey <tom@tromey.com>
3036
3037 * mi/mi-cmd-env.c (env_execute_cli_command): Use
3038 gdb::unique_xmalloc_ptr.
3039
3040 2017-09-03 Tom Tromey <tom@tromey.com>
3041
3042 * thread.c (print_thread_info_1): Use string_printf.
3043 (thread_apply_command, thread_apply_all_command): Use
3044 std::string.
3045
3046 2017-09-03 Tom Tromey <tom@tromey.com>
3047
3048 * valprint.c (val_print_string): Update.
3049 * gdbcore.h (memory_error_message): Return std::string.
3050 * corefile.c (memory_error_message): Return std::string.
3051 (memory_error): Update.
3052 * breakpoint.c (insert_bp_location): Update.
3053
3054 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3055
3056 * target/waitstatus.h (target_waitstatus_to_string): Change
3057 return type to std::string.
3058 * target/waitstatus.c (target_waitstatus_to_string): Return
3059 std::string.
3060 * target.h (target_waitstatus_to_string): Remove declaration.
3061 * infrun.c (resume, clear_proceed_status_thread,
3062 print_target_wait_results, do_target_wait, save_waitstatus,
3063 stop_all_threads): Adjust.
3064 * record-btrace.c (record_btrace_wait): Adjust.
3065 * target-debug.h
3066 (target_debug_print_struct_target_waitstatus_p): Adjust.
3067
3068 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3069
3070 PR gdb/22046
3071 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
3072 detection.
3073
3074 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3075
3076 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
3077 for setting/unsetting environment variables on the remote target.
3078 (New remote packets): Add entries for QEnvironmentHexEncoded,
3079 QEnvironmentUnset and QEnvironmentReset.
3080 * common/environ.c (gdb_environ::operator=): Extend method to
3081 handle m_user_set_env_list and m_user_unset_env_list.
3082 (gdb_environ::clear): Likewise.
3083 (match_var_in_string): Change type of first parameter from 'char
3084 *' to 'const char *'.
3085 (gdb_environ::set): Extend method to handle
3086 m_user_set_env_list and m_user_unset_env_list.
3087 (gdb_environ::unset): Likewise.
3088 (gdb_environ::clear_user_set_env): New method.
3089 (gdb_environ::user_set_envp): Likewise.
3090 (gdb_environ::user_unset_envp): Likewise.
3091 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
3092 m_user_unset_env_list on move constructor/assignment.
3093 (unset): Add new default parameter 'update_unset_list = true'.
3094 (clear_user_set_env): New method.
3095 (user_set_envp): Likewise.
3096 (user_unset_envp): Likewise.
3097 (m_user_set_env_list): New std::set.
3098 (m_user_unset_env_list): Likewise.
3099 * common/rsp-low.c (hex2str): New function.
3100 (bin2hex): New overload for bin2hex function.
3101 * common/rsp-low.c (hex2str): New prototype.
3102 (str2hex): New overload prototype.
3103 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
3104 QEnvironmentUnset and QEnvironmentReset.
3105 (remote_protocol_features): Add QEnvironmentHexEncoded,
3106 QEnvironmentUnset and QEnvironmentReset packets.
3107 (send_environment_packet): New function.
3108 (extended_remote_environment_support): Likewise.
3109 (extended_remote_create_inferior): Call
3110 extended_remote_environment_support.
3111 (_initialize_remote): Add QEnvironmentHexEncoded,
3112 QEnvironmentUnset and QEnvironmentReset packet configs.
3113 * unittests/environ-selftests.c (gdb_selftest_env_var):
3114 New variable.
3115 (test_vector_initialization): New function.
3116 (test_init_from_host_environ): Likewise.
3117 (test_reinit_from_host_environ): Likewise.
3118 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
3119 Likewise.
3120 (test_unset_set_empty_vector): Likewise.
3121 (test_vector_clear): Likewise.
3122 (test_std_move): Likewise.
3123 (test_move_constructor):
3124 (test_self_move): Likewise.
3125 (test_set_unset_reset): Likewise.
3126 (run_tests): Rewrite in terms of the functions above.
3127
3128 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
3129
3130 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
3131 (adi_available): Use a temp variable of type CORE_ADDR as argument
3132 3 when calling target_auxv_search.
3133 (adi_normalize_address): Use masks and xor operators to calculate
3134 normalized address.
3135 (adi_read_versions, adi_write_versions, adi_print_versions)
3136 (do_examine, do_assign): Use paddress.
3137
3138 2017-08-29 John Baldwin <jhb@FreeBSD.org>
3139
3140 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
3141 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
3142 out of loop and add supply of FIR.
3143 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
3144 add collect of FIR.
3145
3146 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
3147
3148 PR gdb/21827
3149 * cli/cli-script.c (define_command): Don't convert command name
3150 to lower case.
3151
3152 2017-08-25 Joel Brobecker <brobecker@adacore.com>
3153
3154 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
3155 Update all callers accordingly. Remove all code blocks handling
3156 the case where DISPP is not NULL.
3157
3158 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3159
3160 PR symtab/22003
3161 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
3162 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3163 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
3164
3165 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3166
3167 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
3168 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
3169 (read_comp_units_from_section): New parameter abbrev_section, use
3170 read_and_check_comp_unit_head, allocate signatured_type if needed.
3171 (create_all_comp_units): Update read_comp_units_from_section caller.
3172
3173 2017-08-23 Pedro Alves <palves@redhat.com>
3174
3175 PR remote/21852
3176 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
3177 to null_ptid and switch to thread without reading the registers
3178 after adding the inferior.
3179
3180 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3181
3182 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
3183 compile-gcc.
3184 * compile/compile.c (compile_gcc, show_compile_gcc): New.
3185 (compile_to_object): Implement compile_gcc.
3186 (_initialize_compile): Install "set compile-gcc". Initialize
3187 compile_gcc.
3188
3189 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3190
3191 * compile/compile.c (compile_to_object): Conditionally call
3192 set_verbose. Conditionally call compile or compile_v0.
3193
3194 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
3195
3196 * sparc64-tdep.h: (adi_normalize_address): New export.
3197 * sparc-nat.h: (open_adi_tag_fd): New export.
3198 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3199 * sparc64-linux-tdep.c:
3200 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3201 (sparc64_linux_handle_segmentation_fault): New function.
3202 (sparc64_linux_init_abi): Register
3203 sparc64_linux_handle_segmentation_fault
3204 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3205 (sparc64_addr_bits_remove): New function.
3206 (sparc64_init_abi): Register sparc64_addr_bits_remove.
3207 (MAX_PROC_NAME_SIZE): New macro.
3208 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3209 (sparc64adilist): New variable.
3210 (adi_proc_list): New variable.
3211 (find_adi_info): New function.
3212 (add_adi_info): New function.
3213 (get_adi_info_proc): New function.
3214 (get_adi_info): New function.
3215 (info_adi_command): New function.
3216 (read_maps_entry): New function.
3217 (adi_available): New function.
3218 (adi_normalize_address): New function.
3219 (adi_align_address): New function.
3220 (adi_convert_byte_count): New function.
3221 (adi_tag_fd): New function.
3222 (adi_is_addr_mapped): New function.
3223 (adi_read_versions): New function.
3224 (adi_write_versions): New function.
3225 (adi_print_versions): New function.
3226 (do_examine): New function.
3227 (do_assign): New function.
3228 (adi_examine_command): New function.
3229 (adi_assign_command): New function.
3230 (_initialize_sparc64_adi_tdep): New function.
3231
3232 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
3233
3234 * breakpoint.c (breakpoints_info): Rename to ...
3235 (info_breakpoints_command): ... this.
3236 (watchpoints_info): Rename to ...
3237 (info_watchpoints_command): ... this.
3238 (tracepoints_info): Rename to ...
3239 (info_tracepoints_command): ... this.
3240 (_initialize_breakpoint): Adjust.
3241 * dcache.c (dcache_info): Rename to ...
3242 (info_display_command): ... this.
3243 (_initialize_dcache): Adjust.
3244 * frame.h (args_info): Rename to ...
3245 (info_args_command): ... this.
3246 (locals_info): Rename to ...
3247 (info_locals_command): ... this.
3248 * infcmd.c (nofp_registers_info): Rename to ...
3249 (info_registers_command): ... this.
3250 (float_info): Rename to ...
3251 (info_float_command): ... this.
3252 (program_info): Rename to ...
3253 (info_program_command): ... this.
3254 (all_registers_info): Rename to ...
3255 (info_all_registers_command): ... this.
3256 (vector_info): Rename to ...
3257 (info_vector_command): ... this.
3258 (float_info): Rename to ...
3259 (info_float_command): ... this.
3260 (_initialize_infcmd): Adjust.
3261 * inferior.h (term_info): Rename to ...
3262 (info_terminal_command): ... this.
3263 * inflow.c (term_info): Rename to ...
3264 (info_terminal_command): ... this.
3265 (_initialize_inflow): Adjust.
3266 * infrun.c (signals_info): Rename to ...
3267 (info_signals_command): ... this.
3268 (_initialize_infrun): Adjust.
3269 * objc-lang.c (classes_info): Rename to ...
3270 (info_classes_command): ... this.
3271 (selectors_info): Rename to ...
3272 (info_selectors_command): ... this.
3273 (_initialize_objc_language): Adjust.
3274 * printcmd.c (sym_info): Rename to ...
3275 (info_symbol_command): ... this.
3276 (address_info): Rename to ...
3277 (info_address_command): ... this.
3278 (display_info): Rename to ...
3279 (info_display_command): ... this.
3280 (_initialize_printcmd): Adjust.
3281 * reverse.c (bookmarks_info): Rename to ...
3282 (info_breakpoints_command): ... this.
3283 (_initialize_reverse): Adjust.
3284 * ser-go32.c (dos_info): Rename to ...
3285 (info_serial_command): ... this.
3286 (_initialize_ser_dos): Adjust.
3287 * skip.c (skip_info): Rename to ...
3288 (info_skip_command): ... this.
3289 (_initialize_step_skip): Adjust.
3290 * source.c (line_info): Rename to ...
3291 (info_line_command): ... this.
3292 (source_info): Rename to ...
3293 (info_source_command)
3294 * stack.c (frame_info): Rename to ...
3295 (info_frame_command): ... this.
3296 (locals_info): Rename to ...
3297 (info_locals_command): ... this.
3298 (args_info): Rename to ...
3299 (info_args_command): ... this.
3300 (_initialize_stack): Adjust.
3301 * symtab.c (sources_info): Rename to ...
3302 (info_sources_command): ... this.
3303 (variables_info): Rename to ...
3304 (info_variables_command): ... this.
3305 (functions_info): Rename to ...
3306 (info_functions_command): ... this.
3307 (types_info): Rename to ...
3308 (info_types_command): ... this.
3309 (_initialize_symtab): Adjust.
3310 * target.c (target_info): Rename to ...
3311 (info_target_command): ... this.
3312 (initialize_targets): Adjust.
3313 * tracepoint.c (tvariables_info): Rename to ...
3314 (info_tvariables_command): ... this.
3315 (scope_info): Rename to ...
3316 (info_scope_command): ... this.
3317 (trace_dump_actions): Adjust.
3318 (_initialize_tracepoint): Adjust.
3319
3320 2017-08-22 Tom Tromey <tom@tromey.com>
3321
3322 * breakpoint.h (install_breakpoint): Update.
3323 * breakpoint.c (add_solib_catchpoint): Update.
3324 (install_breakpoint): Change argument to a std::unique_ptr.
3325 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3326 (create_breakpoint_sal, create_breakpoint): Update.
3327 (watch_command_1, catch_exec_command_1)
3328 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3329 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3330 Return the breakpoint.
3331 (set_raw_breakpoint_without_location, set_raw_breakpoint)
3332 (new_single_step_breakpoint): Update.
3333 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3334 std::unique_ptr.
3335 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3336 std::unique_ptr.
3337 * break-catch-sig.c (create_signal_catchpoint): Use
3338 std::unique_ptr.
3339 * ada-lang.c (create_ada_exception_catchpoint): Use
3340 std::unique_ptr.
3341
3342 2017-08-22 Tom Tromey <tom@tromey.com>
3343
3344 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3345
3346 2017-08-22 Tom Tromey <tom@tromey.com>
3347
3348 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3349 (lookup_partial_symbol): Update.
3350
3351 2017-08-22 Tom Tromey <tom@tromey.com>
3352
3353 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3354 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3355 (find_and_open_source, symtab_to_fullname): Update.
3356 * psymtab.c (psymtab_to_fullname): Update.
3357
3358 2017-08-22 Tom Tromey <tom@tromey.com>
3359
3360 * exec.c (exec_file_attach): Update.
3361 * linux-thread-db.c (try_thread_db_load): Update.
3362 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3363 * utils.c (gdb_realpath): Change return type.
3364 (gdb_realpath_keepfile): Update.
3365 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3366 (_initialize_utils): Register the new self test.
3367 * source.c (openp): Update.
3368 (find_and_open_source): Update.
3369 * nto-tdep.c (nto_find_and_open_solib): Update.
3370 * main.c (set_gdb_data_directory): Update.
3371 (captured_main_1): Update.
3372 * dwarf2read.c (dwarf2_get_dwz_file): Update
3373 (dw2_map_symbol_filenames): Update.
3374 * auto-load.c (auto_load_safe_path_vec_update): Update.
3375 (filename_is_in_auto_load_safe_path_vec): Change type of
3376 "filename_realp".
3377 (auto_load_objfile_script): Update.
3378 (file_is_auto_load_safe): Update. Use std::string.
3379 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3380
3381 2017-08-22 Tom Tromey <tom@tromey.com>
3382
3383 * utils.c (gdb_realpath_keepfile): Return a
3384 gdb::unique_xmalloc_ptr.
3385 * exec.c (exec_file_attach): Update.
3386 * utils.h (gdb_realpath_keepfile): Return a
3387 gdb::unique_xmalloc_ptr.
3388
3389 2017-08-22 Tom Tromey <tom@tromey.com>
3390
3391 * compile/compile.c (compile_file_command): Use
3392 gdb::unique_xmalloc_ptr, std::string.
3393 * utils.c (gdb_abspath): Change return type.
3394 * source.c (openp): Update.
3395 * objfiles.c (allocate_objfile): Update.
3396 * main.c (set_gdb_data_directory): Update.
3397 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
3398
3399 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
3400
3401 * cli-cmds.c (list_commands): List actual code around more than
3402 one location.
3403
3404 2017-08-21 John Baldwin <jhb@FreeBSD.org>
3405
3406 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
3407
3408 2017-08-21 Pedro Alves <palves@redhat.com>
3409
3410 PR gdb/19487
3411 * c-exp.y (variable production): Handle function aliases.
3412 * minsyms.c (msymbol_is_text): New function.
3413 * minsyms.h (msymbol_is_text): Declare.
3414 * symtab.c (find_function_alias_target): New function.
3415 * symtab.h (find_function_alias_target): Declare.
3416
3417 2017-08-21 Pedro Alves <palves@redhat.com>
3418
3419 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
3420 typedefs.
3421 * typeprint.c (whatis_exp): If handling "whatis", and expression
3422 is OP_TYPE, strip one typedef level. Otherwise don't strip
3423 typedefs here.
3424 * valops.c (value_cast): Save "to" type before resolving
3425 stubs/typedefs. Use that type as resulting value's type.
3426
3427 2017-08-18 Tom Tromey <tom@tromey.com>
3428 Pedro Alves <palves@redhat.com>
3429
3430 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
3431 * sol-thread.c (sol_thread_resume, sol_thread_wait)
3432 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
3433 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
3434 * proc-service.c (ps_xfer_memory): Use scoped_restore.
3435 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
3436 (linux_get_siginfo_data): Add "thread" argument. Use
3437 scoped_restore.
3438 * linux-nat.c (linux_child_follow_fork)
3439 (check_stopped_by_watchpoint): Use scoped_restore.
3440 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
3441 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
3442 (restore_inferior_ptid, save_inferior_ptid): Remove.
3443 * btrace.c (btrace_fetch): Use scoped_restore.
3444 * bsd-uthread.c (bsd_uthread_fetch_registers)
3445 (bsd_uthread_store_registers): Use scoped_restore.
3446 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
3447 scoped_restore.
3448 * aix-thread.c (aix_thread_resume, aix_thread_wait)
3449 (aix_thread_xfer_partial): Use scoped_restore.
3450 * inferior.h (save_inferior_ptid): Remove.
3451
3452 2017-08-18 Yao Qi <yao.qi@linaro.org>
3453
3454 PR tdep/21818
3455 * arm-tdep.c (gdb_print_insn_arm): Mark
3456 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
3457
3458 2017-08-18 Yao Qi <yao.qi@linaro.org>
3459
3460 * NEWS: Mention GDBserver's new option "--selftest".
3461 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
3462 * selftest.c: Move it to common/selftest.c.
3463 * selftest.h: Move it to common/selftest.h.
3464 * selftest-arch.c (reset): New function.
3465 (tests_with_arch): Call reset.
3466
3467 2017-08-18 Yao Qi <yao.qi@linaro.org>
3468
3469 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
3470 instead of exception_fprintf and printf_filtered.
3471
3472 2017-08-18 Yao Qi <yao.qi@linaro.org>
3473
3474 * selftest.c (register_self_test): Rename it to
3475 selftests::register_test.
3476 (run_self_tests): selftest::run_tests.
3477 * selftest.h: Update declarations.
3478 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
3479 selftests::register_test_foreach_arch.
3480 * selftest-arch.h: Update declaration.
3481 * aarch64-tdep.c: Update.
3482 * arm-tdep.c: Likewise.
3483 * disasm-selftests.c: Likewise.
3484 * dwarf2loc.c: Likewise.
3485 * dwarf2-frame.c: Likewise.
3486 * findvar.c: Likewise.
3487 * gdbarch-selftests.c: Likewise.
3488 * maint.c (maintenance_selftest): Likewise.
3489 * regcache.c: Likewise.
3490 * rust-exp.y: Likewise.
3491 * selftest-arch.c: Likewise.
3492 * unittests/environ-selftests.c: Likewise.
3493 * unittests/function-view-selftests.c: Likewise.
3494 * unittests/offset-type-selftests.c: Likewise.
3495 * unittests/optional-selftests.c: Likewise.
3496 * unittests/scoped_restore-selftests.c: Likewise.
3497 * utils-selftests.c: Likewise.
3498
3499 2017-08-17 Pedro Alves <palves@redhat.com>
3500
3501 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
3502 local.
3503
3504 2017-08-17 Pedro Alves <palves@redhat.com>
3505
3506 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
3507 field.
3508 (reset_die_in_process): Delete, replaced by ...
3509 (process_die_scope): ... this new class. Make it responsible for
3510 freeing cu->line_header too.
3511 (process_die): Use process_die_scope.
3512 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
3513 cu->line_header_die_owner. Don't release the line header if it's
3514 owned by the CU.
3515 (setup_type_unit_groups): Make the CU/DIE own the line header.
3516 Don't release the line header here.
3517
3518 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
3519
3520 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
3521
3522 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
3523
3524 * NEWS: Mention new shortcuts for nexti and stepi in TUI
3525 Single-Key mode
3526
3527 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
3528
3529 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
3530 mode command list.
3531
3532 2017-08-15 Stafford Horne <shorne@gmail.com>
3533
3534 * MAINTAINERS (Write After Approval): Add Stafford Horne.
3535
3536 2017-08-15 Stafford Horne <shorne@gmail.com>
3537
3538 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
3539
3540 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
3541
3542 PR gdb/21954
3543 * infcmd.c (unset_environment_command): Use the 'clear' method on
3544 the environment instead of resetting it.
3545
3546 2017-08-15 John Baldwin <jhb@FreeBSD.org>
3547
3548 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
3549 platforms.
3550
3551 2017-08-14 Tom Tromey <tom@tromey.com>
3552
3553 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
3554 (print_binary_chars): Likewise.
3555 (BITS_IN_BYTES): Remove.
3556
3557 2017-08-14 Tom Tromey <tom@tromey.com>
3558
3559 PR gdb/21675
3560 * valprint.c (LOW_ZERO): Change value to 034.
3561 (print_octal_chars): Add static_asserts for octal constants.
3562 * printcmd.c (print_scalar_formatted): Add 'd' case.
3563
3564 2017-08-11 Tom Tromey <tom@tromey.com>
3565
3566 * symfile.c (add_symbol_file_command): Use std::vector.
3567
3568 2017-08-14 Tom Tromey <tom@tromey.com>
3569
3570 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
3571 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3572 std::move.
3573 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
3574
3575 2017-08-11 Pedro Alves <palves@redhat.com>
3576
3577 * infrun.c (process_event_stop_test): Adjust
3578 function_name_is_marked_for_skip call.
3579 * skip.c: Include <list>.
3580 (skiplist_entry): Make it a class with private fields, and
3581 getters/setters.
3582 (skiplist_entry_chain): Delete.
3583 (skiplist_entries): New.
3584 (skiplist_entry_count): Delete.
3585 (highest_skiplist_entry_num): New.
3586 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
3587 (add_skiplist_entry): Delete.
3588 (skiplist_entry::skiplist_entry): New.
3589 (skiplist_entry::add_entry): New.
3590 (skip_file_command, skip_function): Adjust.
3591 (compile_skip_regexp): Delete.
3592 (skip_command): Don't compile regexp here. Adjust to use
3593 skiplist_entry::add_entry.
3594 (skip_info): Adjust to use range-for and getters.
3595 (skip_enable_command, skip_disable_command): Adjust to use
3596 range-for and setters.
3597 (skip_delete_command): Adjust to use std::list.
3598 (add_skiplist_entry): Delete.
3599 (skip_file_p): Delete, refactored as ...
3600 (skiplist_entry::do_skip_file_p): ... this new method.
3601 (skip_gfile_p): Delete, refactored as ...
3602 (skiplist_entry::do_gskip_file_p): ... this new method.
3603 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
3604 (skiplist_entry::skip_function_p): ... this new method.
3605 (function_name_is_marked_for_skip): Now returns bool, and takes
3606 the function sal by const reference. Adjust to use range-for and
3607 skiplist_entry methods.
3608 (_initialize_step_skip): Remove references to
3609 skiplist_entry_chain, skiplist_entry_count.
3610 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
3611 takes the function sal by const reference.
3612
3613 2017-08-11 Yao Qi <yao.qi@linaro.org>
3614
3615 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
3616 (dwarf2_frame_cache): Remove reset_cache_cleanup.
3617 (dwarf2_frame_cache):
3618 * frame-unwind.c (frame_unwind_try_unwinder): Catch
3619 RETURN_MASK_ALL and set *this_case to NULL.
3620 * frame-unwind.h: Update comments.
3621
3622 2017-08-11 Yao Qi <yao.qi@linaro.org>
3623
3624 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
3625 (dwarf2_frame_state_copy_regs): Remove.
3626 (dwarf2_frame_state_free_regs): Remove.
3627 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
3628 (dwarf2_restore_rule): Call method .alloc_regs instead of
3629 dwarf2_frame_state_alloc_regs.
3630 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
3631 constructor. Call std::move.
3632 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
3633 (dwarf2_frame_cache): Likewise.
3634
3635 [GDB_SELF_TEST]: Include selftest.h and
3636 selftest-arch.h.
3637 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
3638 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
3639 execute_cfa_program_test.
3640
3641 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
3642 copy ctor, assignment operator, move assignment.
3643 <alloc_regs>: New method.
3644 <swap>: New method.
3645 (struct dwarf2_frame_state): Delete dtor.
3646 (dwarf2_frame_state_alloc_regs): Remove declaration.
3647 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
3648 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
3649
3650 2017-08-11 Yao Qi <yao.qi@linaro.org>
3651
3652 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
3653 (dwarf2_frame_state::dwarf2_frame_state): New.
3654 (dwarf2_frame_state::~dwarf2_frame_state): New.
3655 (dwarf2_fetch_cfa_info): Update.
3656 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
3657 rather than a pointer. Update code.
3658 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
3659 dtor.
3660 <data_align, code_align, retaddr_column>: Change them to const.
3661 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
3662 to bool.
3663
3664 2017-08-11 Yao Qi <yao.qi@linaro.org>
3665
3666 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
3667 <loc.exp>: New field.
3668 * dwarf2-frame.c (execute_cfa_program): Update.
3669 (dwarf2_frame_prev_register): Update.
3670
3671 2017-08-10 Pedro Alves <palves@redhat.com>
3672
3673 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
3674
3675 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3676
3677 * fbsd-nat.c (struct fbsd_fork_info): Remove.
3678 (fbsd_pending_children): Use std::list.
3679 (fbsd_remember_child): Likewise.
3680 (fbsd_is_child_pending): Likewise.
3681 (fbsd_pending_vfork_done): Use std::forward_list.
3682 (fbsd_add_vfork_done): Likewise.
3683 (fbsd_is_vfork_done_pending): Likewise.
3684 (fbsd_next_vfork_done): Likewise.
3685
3686 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3687
3688 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
3689 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
3690 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
3691 for `mapfilename'.
3692 (fbsd_xfer_partial): Use gdb::byte_vector.
3693 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
3694
3695 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3696
3697 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
3698 "filestuff.h".
3699 (fbsd_find_memory_regions): Fix `mapfile' initialization.
3700
3701 2017-08-09 Tom Tromey <tom@tromey.com>
3702
3703 * skip.c (skiplist_entry): New constructor.
3704 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
3705 (skiplist_entry::file_is_glob): Now bool.
3706 (skiplist_entry::file, skiplist_entry::function): Now
3707 std::string.
3708 (make_skip_entry): Return a unique_ptr. Use new.
3709 (free_skiplist_entry, free_skiplist_entry_cleanup)
3710 (make_free_skiplist_entry_cleanup): Remove.
3711 (skip_command, skip_disable_command, add_skiplist_entry)
3712 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
3713 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
3714 (function_name_is_marked_for_skip): Update.
3715 (skip_delete_command): Update. Use delete.
3716
3717 2017-08-09 Jiong Wang <jiong.wang@arm.com>
3718
3719 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
3720 (aarch64_linux_core_read_description): New function.
3721 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
3722
3723 2017-08-09 Pedro Alves <palves@redhat.com>
3724
3725 * cp-name-parser.y (cp_comp_to_string): Return a
3726 gdb::unique_xmalloc_ptr<char>.
3727 * cp-support.c (replace_typedefs_qualified_name)
3728 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
3729 (cp_canonicalize_string_full): Use op= instead of explicit
3730 convertion.
3731 (cp_class_name_from_physname, method_name_from_physname)
3732 (cp_func_name, cp_remove_params): Adjust to use
3733 gdb::unique_xmalloc_ptr<char>.
3734 * cp-support.h (cp_comp_to_string): Return a
3735 gdb::unique_xmalloc_ptr<char>.
3736 * python/py-type.c (typy_lookup_type): Adjust to use
3737 gdb::unique_xmalloc_ptr<char>.
3738
3739 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
3740
3741 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
3742
3743 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
3744 Yao Qi <yao.qi@linaro.org>
3745
3746 * cp-support.c (cp_canonicalize_string_full): Use
3747 gdb::unique_xmalloc_ptr<char>.
3748 (cp_canonicalize_string): Likewise.
3749
3750 2017-08-09 Yao Qi <yao.qi@linaro.org>
3751
3752 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
3753 * regformats/i386/amd64-avx-avx512.dat: Remove.
3754 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
3755 * regformats/i386/amd64-avx-mpx.dat:Remove.
3756 * regformats/i386/amd64-avx.dat: Remove.
3757 * regformats/i386/amd64-mpx.dat: Remove.
3758 * regformats/i386/i386-avx-avx512.dat: Remove.
3759 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
3760 * regformats/i386/i386-avx-mpx.dat: Remove.
3761 * regformats/i386/i386-mmx.dat: Remove.
3762 * regformats/i386/i386-mpx.dat: Remove.
3763
3764 2017-08-09 Yao Qi <yao.qi@linaro.org>
3765
3766 * amd64-tdep.h (tdesc_x32): Remove the declaration.
3767 * amd64-tdep.c: Don't include features/i386/x32*.c.
3768 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
3769 functions.
3770 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
3771 and i386/x32-avx-avx512.
3772 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
3773 and i386/x32.xml.
3774 * features/i386/x32-avx-avx512.c: Removed.
3775 * features/i386/x32-avx-avx512.xml: Removed.
3776 * features/i386/x32-avx.c: Removed.
3777 * features/i386/x32-avx.xml: Removed.
3778 * features/i386/x32.c: Removed.
3779 * features/i386/x32.xml: Removed.
3780 * regformats/i386/x32-avx-avx512.dat: Removed.
3781 * regformats/i386/x32-avx.dat: Removed.
3782 * regformats/i386/x32.dat: Removed.
3783
3784 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3785
3786 PR breakpoints/21886
3787 * mem-break.c (default_memory_insert_breakpoint): Use
3788 `->placed_address' rather than `->reqstd_address' for the
3789 breakpoint location.
3790
3791 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3792
3793 * arch-utils.c (default_print_insn): Remove arch/mach/endian
3794 assertions.
3795
3796 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3797
3798 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
3799 a union of `tdep_info', `tdesc_data' and `id'.
3800 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
3801 rather than `info.tdep_info'.
3802 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
3803 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3804 * i386-tdep.c (i386_gdbarch_init): Likewise.
3805 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
3806 * mips-tdep.c (mips_gdbarch_init): Likewise.
3807 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3808 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3809 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
3810 `info.tdep_info'.
3811 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
3812 `info.tdep_info'.
3813 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3814 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
3815 `info.tdep_info'.
3816 * spu-tdep.c (spu_gdbarch_init): Likewise.
3817 * gdbarch.h: Regenerate.
3818
3819 2017-08-07 Leszek Swirski <leszeks@google.com>
3820
3821 PR symtab/20899
3822 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
3823
3824 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
3825
3826 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3827 (gdbsim_open): Rename gdb_argv args object to argv.
3828
3829 2017-08-05 Tom Tromey <tom@tromey.com>
3830
3831 * compile/compile-object-load.c (compile_object_load): Use
3832 gdb::unique_xmalloc_ptr.
3833 * cli/cli-dump.c (scan_filename): Rename from
3834 scan_filename_with_cleanup. Change return type.
3835 (scan_expression): Rename from scan_expression_with_cleanup.
3836 Change return type.
3837 (dump_memory_to_file, dump_value_to_file, restore_command):
3838 Use gdb::unique_xmalloc_ptr. Update.
3839 * cli/cli-cmds.c (find_and_open_script): Use
3840 gdb::unique_xmalloc_ptr.
3841 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3842 * symmisc.c (maintenance_print_symbols)
3843 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3844 * symfile.c (symfile_bfd_open, generic_load)
3845 (add_symbol_file_command, remove_symbol_file_command): Use
3846 gdb::unique_xmalloc_ptr.
3847 * source.c (openp): Use gdb::unique_xmalloc_ptr.
3848 * psymtab.c (maintenance_print_psymbols): Use
3849 gdb::unique_xmalloc_ptr.
3850 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3851 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3852 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3853 (reload_shared_libraries_1): Likewise.
3854
3855 2017-08-05 Tom Tromey <tom@tromey.com>
3856
3857 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3858 (rust_op_vector, rust_set_vector): New typedefs.
3859 (current_parser): New global.
3860 (work_obstack): Change to pointer type. Update all users.
3861 (rust_ast, pstate): Remove globals.
3862 (struct rust_parser): New.
3863 (%union) <params, field_inits>: Change type.
3864 (start, tuple_expr, unit_expr, struct_expr_list, literal)
3865 (field_expr, expr_list, maybe_expr_list, type_list): Update.
3866 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3867 (convert_params_to_types, convert_params_to_expression): Change
3868 type of "params".
3869 (ast_string): Change type of "fields".
3870 (rust_parse): Make a rust_parser. Remove cleanups.
3871 (rust_lex_tests): Make and install an auto_obstack.
3872
3873 2017-08-04 Yao Qi <yao.qi@linaro.org>
3874
3875 * configure.srv (ipa_x32_linux_regobj): New.
3876 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3877 instead of X86_TDESC_AVX512.
3878 (initialize_low_tracepoint): Call
3879 init_registers_x32_avx_avx512_linux.
3880
3881 2017-08-04 Yao Qi <yao.qi@linaro.org>
3882
3883 * utils.h (gdb_argv): Add namespace std for nullptr_t.
3884
3885 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
3886
3887 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3888
3889 2017-08-03 Tom Tromey <tom@tromey.com>
3890
3891 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3892 Remove.
3893 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3894
3895 2017-08-03 Tom Tromey <tom@tromey.com>
3896
3897 * python/py-param.c (compute_enum_values): Use gdb_argv.
3898
3899 2017-08-03 Tom Tromey <tom@tromey.com>
3900
3901 * utils.h (struct gdb_argv_deleter): New.
3902 (gdb_argv): New class.
3903 * utils.c (gdb_argv::reset): New method.
3904 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3905 * tracefile.c (tsave_command): Use gdb_argv.
3906 * top.c (new_ui_command): Use gdb_argv.
3907 * symmisc.c (maintenance_print_symbols)
3908 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3909 * symfile.c (symbol_file_command, generic_load)
3910 (remove_symbol_file_command): Use gdb_argv.
3911 * stack.c (backtrace_command): Use gdb_argv.
3912 * source.c (add_path, show_substitute_path_command)
3913 (unset_substitute_path_command, set_substitute_path_command):
3914 Use gdb_argv.
3915 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
3916 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
3917 * remote.c (extended_remote_run, remote_put_command)
3918 (remote_get_command, remote_delete_command): Use gdb_argv.
3919 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
3920 (gdbsim_open): Use gdb_argv.
3921 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
3922 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
3923 * procfs.c (procfs_info_proc): Use gdb_argv.
3924 * interps.c (interpreter_exec_cmd): Use gdb_argv.
3925 * infrun.c (handle_command): Use gdb_argv.
3926 * inferior.c (add_inferior_command, clone_inferior_command):
3927 Use gdb_argv.
3928 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
3929 * exec.c (exec_file_command): Use gdb_argv.
3930 * cli/cli-cmds.c (alias_command): Use gdb_argv.
3931 * compile/compile.c (build_argc_argv): Use gdb_argv.
3932
3933 2017-08-03 Tom Tromey <tom@tromey.com>
3934
3935 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
3936
3937 2017-08-03 Tom Tromey <tom@tromey.com>
3938
3939 * python/python.c (compute_python_string): Return std::string.
3940 (gdbpy_eval_from_control_command): Update.
3941 (do_start_initialization): Use std::string.
3942 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
3943 xstrprintf.
3944 * python/py-breakpoint.c (local_setattro): Use string_printf, not
3945 xstrprintf.
3946
3947 2017-08-03 Tom Tromey <tom@tromey.com>
3948
3949 * top.h (do_restore_instream_cleanup): Remove.
3950 * top.c (do_restore_instream_cleanup): Remove.
3951 (read_command_file): Use scoped_restore.
3952 * cli/cli-script.c (execute_user_command): Use scoped_restore.
3953
3954 2017-08-03 Tom Tromey <tom@tromey.com>
3955
3956 * cli/cli-script.c (execute_user_command)
3957 (execute_control_command): Use scoped_restore.
3958
3959 2017-08-03 Tom Tromey <tom@tromey.com>
3960
3961 * cli/cli-script.c (do_restore_user_call_depth): Remove.
3962 (execute_user_command): Remove user_call_depth; use
3963 user_args_stack's size instead.
3964
3965 2017-08-03 Tom Tromey <tom@tromey.com>
3966
3967 * top.h (in_user_command): Remove.
3968 * top.c (in_user_command): Remove.
3969 * cli/cli-script.c (do_restore_user_call_depth)
3970 (execute_user_command): Update.
3971
3972 2017-08-03 Tom Tromey <tom@tromey.com>
3973
3974 * valops.c (search_struct_method): Use gdb::byte_vector.
3975 * valarith.c (value_concat): Use std::vector.
3976 * target.c (memory_xfer_partial): Use gdb::byte_vector.
3977 (simple_search_memory): Likewise.
3978 * printcmd.c (find_string_backward): Use gdb::byte_vector.
3979 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
3980 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
3981 * elfread.c (elf_rel_plt_read): Use std::string.
3982 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
3983 * cli/cli-dump.c (restore_section_callback): Use
3984 gdb::byte_vector.
3985
3986 2017-08-03 Tom Tromey <tom@tromey.com>
3987
3988 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
3989
3990 2017-08-03 Tom Tromey <tom@tromey.com>
3991
3992 * tui/tui-regs.c (tui_restore_gdbout): Remove.
3993 (tui_register_format): Use scoped_restore.
3994
3995 2017-08-03 Tom Tromey <tom@tromey.com>
3996
3997 * reverse.c (exec_direction_default): Remove.
3998 (exec_reverse_once): Use scoped_restore.
3999 * remote.c (restore_remote_timeout): Remove.
4000 (remote_flash_erase, remote_flash_write, remote_flash_done)
4001 (readchar, remote_serial_write): Use scoped_restore.
4002 * cli/cli-script.c (struct source_cleanup_lines_args)
4003 (source_cleanup_lines): Remove.
4004 (script_from_file): Use scoped_restore.
4005 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
4006 (source_command): Use scoped_restore.
4007
4008 2017-08-03 Tom Tromey <tom@tromey.com>
4009
4010 * utils.h (make_cleanup_free_so): Remove.
4011 * utils.c (do_free_so, make_cleanup_free_so): Remove.
4012 * solist.h (struct so_deleter): New.
4013 (so_list_up): New typedef.
4014 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
4015
4016 2017-08-03 Tom Tromey <tom@tromey.com>
4017
4018 * utils.h (make_cleanup_restore_current_language): Remove.
4019 * utils.c (do_restore_current_language)
4020 (make_cleanup_restore_current_language): Remove.
4021 * parse.c (parse_exp_in_context_1)
4022 (parse_expression_with_language): Use
4023 scoped_restore_current_language.
4024 * mi/mi-main.c (mi_cmd_execute): Use
4025 scoped_restore_current_language.
4026 * language.h (scoped_restore_current_language): New class.
4027
4028 2017-08-03 Tom Tromey <tom@tromey.com>
4029
4030 * compile/compile.c (cleanup_unlink_file): Remove.
4031 (compile_to_object): Use gdb::unlinker.
4032 (eval_compile_command): Likewise.
4033
4034 2017-08-03 Tom Tromey <tom@tromey.com>
4035
4036 * utils.h (make_cleanup_fclose): Remove.
4037 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
4038
4039 2017-08-03 Tom Tromey <tom@tromey.com>
4040
4041 * top.c (open_terminal_stream): Return gdb_file_up.
4042 (new_ui_command): Update.
4043
4044 2017-08-03 Tom Tromey <tom@tromey.com>
4045
4046 * source.c (print_source_lines_base, forward_search_command)
4047 (reverse_search_command): Use gdb_file_up.
4048
4049 2017-08-03 Tom Tromey <tom@tromey.com>
4050
4051 * fbsd-nat.c (fbsd_find_memory_regions): Update.
4052
4053 2017-08-03 Tom Tromey <tom@tromey.com>
4054
4055 * cli/cli-cmds.c (find_and_open_script): Change return type.
4056 Remove "streamp" and "full_path" parameters.
4057 (source_script_with_search): Update.
4058 * auto-load.c (source_script_file): Update.
4059 * cli/cli-cmds.h (find_and_open_script): Change type.
4060 (open_script): New struct.
4061
4062 2017-08-03 Tom Tromey <tom@tromey.com>
4063
4064 * xml-support.c (xml_fetch_content_from_file): Update.
4065 * ui-file.c (stdio_file::open): Update.
4066 * tracefile-tfile.c (tfile_start): Update.
4067 * remote.c (remote_file_put, remote_file_get): Update.
4068 * nat/linux-procfs.c (linux_proc_get_int)
4069 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
4070 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
4071 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
4072 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
4073 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
4074 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
4075 * linux-nat.c (linux_proc_pending_signals): Update.
4076 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
4077 (file_closer): Remove.
4078 * compile/compile.c (compile_to_object): Update.
4079 * common/filestuff.h (struct gdb_file_deleter): New.
4080 (gdb_file_up): New typedef.
4081 (gdb_fopen_cloexec): Change return type.
4082 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
4083 * cli/cli-dump.c (fopen_with_cleanup): Remove.
4084 (dump_binary_file, restore_binary_file): Update.
4085 * auto-load.c (auto_load_objfile_script_1): Update.
4086
4087 2017-08-03 Tom Tromey <tom@tromey.com>
4088
4089 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
4090 (info_static_tracepoint_markers_command): Likewise.
4091 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
4092 * skip.c (skip_info): Use ui_out_emit_table.
4093 * progspace.c (print_program_space): Use ui_out_emit_table.
4094 * osdata.c (info_osdata): Use ui_out_emit_table.
4095 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
4096 ui_out_emit_table.
4097 * linux-thread-db.c (info_auto_load_libthread_db): Use
4098 ui_out_emit_table.
4099 * inferior.c (print_inferior): Use ui_out_emit_table.
4100 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
4101 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
4102 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
4103 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
4104 * ui-out.h (class ui_out_emit_table): New.
4105
4106 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
4107
4108 * mips-tdep.c (mips_fpu_type_str): New function.
4109 (mips_dump_tdep): Call it.
4110
4111 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
4112
4113 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
4114 `->mips_fpu_type'.
4115
4116 2017-07-31 Xavier Roirand <roirand@adacore.com>
4117
4118 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
4119
4120 2017-07-27 Xavier Roirand <roirand@adacore.com>
4121
4122 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
4123
4124 2017-07-26 Yao Qi <yao.qi@linaro.org>
4125
4126 * cli/cli-cmds.c (maintenancechecklist): New variable.
4127 * gdbcmd.h (maintenancechecklist): Declare it.
4128 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
4129 Call i386_linux_read_description with different masks.
4130 * maint.c (maintenance_check_command): New function.
4131 (_initialize_maint_cmds): Call add_prefix_cmd.
4132 * target-descriptions.c (tdesc_reg): override operator != and ==.
4133 (tdesc_type): Likewise.
4134 (tdesc_feature): Likewise.
4135 (target_desc): Likewise.
4136 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
4137 (maintenance_check_xml_descriptions): New function.
4138 (_initialize_target_descriptions) Add command "xml-descriptions".
4139 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
4140
4141 2017-07-26 Yao Qi <yao.qi@linaro.org>
4142
4143 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
4144 Include features/i386/32bit-*.c.
4145 (i386_linux_read_description): Generate target description if it
4146 doesn't exist.
4147 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
4148 functions.
4149 * features/i386/32bit-linux.c: Re-generated.
4150 * features/i386/32bit-sse.c: Likewise.
4151 * target-descriptions.c (print_c_feature::visit): Print code to
4152 set register number if needed.
4153 (print_c_feature) <m_next_regnum>: New field.
4154
4155 2017-07-26 Yao Qi <yao.qi@linaro.org>
4156
4157 * features/Makefile (CFILES): Rename with TDESC_CFILES.
4158 (FEATURE_XMLFILES): New.
4159 (FEATURE_CFILES): New.
4160 New rules.
4161 (clean-cfiles): Remove generated c files.
4162 * features/i386/32bit-avx.c: Generated.
4163 * features/i386/32bit-avx512.c: Generated.
4164 * features/i386/32bit-core.c: Generated.
4165 * features/i386/32bit-linux.c: Generated.
4166 * features/i386/32bit-mpx.c: Generated.
4167 * features/i386/32bit-pkeys.c: Generated.
4168 * features/i386/32bit-sse.c: Generated.
4169 * target-descriptions.c: Include algorithm.
4170 (tdesc_element_visitor): Add method visit_end.
4171 (print_c_tdesc): Implement visit_end.
4172 (print_c_tdesc:: m_filename_after_features): Move it to
4173 protected.
4174 (print_c_feature): New class.
4175 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
4176 name starts with "i386/32bit-".
4177
4178 2017-07-26 Yao Qi <yao.qi@linaro.org>
4179
4180 * target-descriptions.c (tdesc_element_visitor): New class.
4181 (tdesc_element): New class.
4182 (tdesc_reg): Inherit from tdesc_element.
4183 (tdesc_reg::accept): New function.
4184 (tdesc_type): Inherit from tdesc_element.
4185 (tdesc_type::accept): New function.
4186 (tdesc_feature): Inherit from tdesc_element.
4187 (tdesc_feature::accept): New function.
4188 (target_desc): Inherit from tdesc_element.
4189 (target_desc::target_desc): New.
4190 (target_desc::~target_desc): New.
4191 (target_desc::accept): New.
4192 (allocate_target_description): Use new.
4193 (free_target_description): Use delete.
4194 (print_c_tdesc): New class.
4195 (maint_print_c_tdesc_cmd): Adjust.
4196
4197 * features/aarch64.c: Re-generated.
4198 * features/arc-arcompact.c: Re-generated.
4199 * features/arc-v2.c: Re-generated.
4200 * features/arm/arm-with-iwmmxt.c: Re-generated.
4201 * features/arm/arm-with-m.c: Re-generated.
4202 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4203 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4204 * features/arm/arm-with-neon.c: Re-generated.
4205 * features/arm/arm-with-vfpv2.c: Re-generated.
4206 * features/arm/arm-with-vfpv3.c: Re-generated.
4207 * features/i386/amd64-avx-avx512.c: Re-generated.
4208 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4209 * features/i386/amd64-avx.c: Re-generated.
4210 * features/i386/amd64-avx-linux.c: Re-generated.
4211 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4212 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4213 * features/i386/amd64-avx-mpx.c: Re-generated.
4214 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4215 * features/i386/amd64.c: Re-generated.
4216 * features/i386/amd64-linux.c: Re-generated.
4217 * features/i386/amd64-mpx.c: Re-generated.
4218 * features/i386/amd64-mpx-linux.c: Re-generated.
4219 * features/i386/i386-avx-avx512.c: Re-generated.
4220 * features/i386/i386-avx-avx512-linux.c: Re-generated.
4221 * features/i386/i386-avx.c: Re-generated.
4222 * features/i386/i386-avx-linux.c: Re-generated.
4223 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4224 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4225 * features/i386/i386-avx-mpx.c: Re-generated.
4226 * features/i386/i386-avx-mpx-linux.c: Re-generated.
4227 * features/i386/i386.c: Re-generated.
4228 * features/i386/i386-linux.c: Re-generated.
4229 * features/i386/i386-mmx.c: Re-generated.
4230 * features/i386/i386-mmx-linux.c: Re-generated.
4231 * features/i386/i386-mpx.c: Re-generated.
4232 * features/i386/i386-mpx-linux.c: Re-generated.
4233 * features/i386/x32-avx-avx512.c: Re-generated.
4234 * features/i386/x32-avx-avx512-linux.c: Re-generated.
4235 * features/i386/x32-avx.c: Re-generated.
4236 * features/i386/x32-avx-linux.c: Re-generated.
4237 * features/i386/x32.c: Re-generated.
4238 * features/i386/x32-linux.c: Re-generated.
4239 * features/microblaze.c: Re-generated.
4240 * features/microblaze-with-stack-protect.c: Re-generated.
4241 * features/mips64-dsp-linux.c: Re-generated.
4242 * features/mips64-linux.c: Re-generated.
4243 * features/mips-dsp-linux.c: Re-generated.
4244 * features/mips-linux.c: Re-generated.
4245 * features/nds32.c: Re-generated.
4246 * features/nios2.c: Re-generated.
4247 * features/nios2-linux.c: Re-generated.
4248 * features/rs6000/powerpc-32.c: Re-generated.
4249 * features/rs6000/powerpc-32l.c: Re-generated.
4250 * features/rs6000/powerpc-403.c: Re-generated.
4251 * features/rs6000/powerpc-403gc.c : Re-generated.
4252 * features/rs6000/powerpc-405.c: Re-generated.
4253 * features/rs6000/powerpc-505.c: Re-generated.
4254 * features/rs6000/powerpc-601.c: Re-generated.
4255 * features/rs6000/powerpc-602.c: Re-generated.
4256 * features/rs6000/powerpc-603.c: Re-generated.
4257 * features/rs6000/powerpc-604.c: Re-generated.
4258 * features/rs6000/powerpc-64.c: Re-generated.
4259 * features/rs6000/powerpc-64l.c: Re-generated.
4260 * features/rs6000/powerpc-7400.c: Re-generated.
4261 * features/rs6000/powerpc-750.c: Re-generated.
4262 * features/rs6000/powerpc-860.c: Re-generated.
4263 * features/rs6000/powerpc-altivec32.c: Re-generated.
4264 * features/rs6000/powerpc-altivec32l.c: Re-generated.
4265 * features/rs6000/powerpc-altivec64.c: Re-generated.
4266 * features/rs6000/powerpc-altivec64l.c: Re-generated.
4267 * features/rs6000/powerpc-cell32l.c: Re-generated.
4268 * features/rs6000/powerpc-cell64l.c: Re-generated.
4269 * features/rs6000/powerpc-e500.c: Re-generated.
4270 * features/rs6000/powerpc-e500l.c: Re-generated.
4271 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4272 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4273 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4274 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4275 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
4276 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
4277 * features/rs6000/powerpc-vsx32.c: Re-generated.
4278 * features/rs6000/powerpc-vsx32l.c: Re-generated.
4279 * features/rs6000/powerpc-vsx64.c: Re-generated.
4280 * features/rs6000/powerpc-vsx64l.c: Re-generated.
4281 * features/rs6000/rs6000.c: Re-generated.
4282 * features/s390-linux32.c: Re-generated.
4283 * features/s390-linux32v1.c: Re-generated.
4284 * features/s390-linux32v2.c: Re-generated.
4285 * features/s390-linux64.c: Re-generated.
4286 * features/s390-linux64v1.c: Re-generated.
4287 * features/s390-linux64v2.c: Re-generated.
4288 * features/s390-te-linux64.c: Re-generated.
4289 * features/s390-tevx-linux64.c: Re-generated.
4290 * features/s390-vx-linux64.c: Re-generated.
4291 * features/s390x-linux64.c: Re-generated.
4292 * features/s390x-linux64v1.c: Re-generated.
4293 * features/s390x-linux64v2.c: Re-generated.
4294 * features/s390x-te-linux64.c: Re-generated.
4295 * features/s390x-tevx-linux64.c: Re-generated.
4296 * features/s390x-vx-linux64.c: Re-generated.
4297 * features/sparc/sparc32-solaris.c: Re-generated.
4298 * features/sparc/sparc64-solaris.c: Re-generated.
4299 * features/tic6x-c62x.c: Re-generated.
4300 * features/tic6x-c62x-linux.c: Re-generated.
4301 * features/tic6x-c64x.c: Re-generated.
4302 * features/tic6x-c64x-linux.c: Re-generated.
4303 * features/tic6x-c64xp.c: Re-generated.
4304 * features/tic6x-c64xp-linux.c: Re-generated.
4305
4306 2017-07-26 Yao Qi <yao.qi@linaro.org>
4307
4308 * i386-linux-tdep.c (i386_linux_read_description): New function.
4309 (i386_linux_core_read_description): Call
4310 i386_linux_read_description.
4311 * i386-linux-tdep.h (i386_linux_read_description): Declare.
4312 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
4313 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
4314 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
4315 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
4316 * x86-linux-nat.c (x86_linux_read_description): Call
4317 i386_linux_read_description.
4318
4319 2017-07-26 Yao Qi <yao.qi@linaro.org>
4320
4321 * NEWS: Mention it.
4322 * features/Makefile (%.c: %.xml): Pass the xml file name to
4323 command "maint print c-tdesc".
4324 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4325 name from 'arg'.
4326
4327 2017-07-26 Yao Qi <yao.qi@linaro.org>
4328
4329 * target-descriptions.c (target_desc): Add ctor and dtor. Do
4330 in-class initialization.
4331 (tdesc_create_feature): Call new instead of XCNEW.
4332 (free_target_description): Ue delete.
4333
4334 2017-07-25 John Baldwin <jhb@FreeBSD.org>
4335
4336 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4337
4338 2017-07-25 Yao Qi <yao.qi@linaro.org>
4339
4340 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4341 constant.
4342 (amd64_x32_init_abi): Likewise.
4343 * amd64-tdep.h (amd64_init_abi): Update declaration.
4344 (amd64_x32_init_abi): Likewise.
4345
4346 2017-07-25 Yao Qi <yao.qi@linaro.org>
4347
4348 PR tdep/21717
4349 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4350 condition for FPSCR.
4351 (arm_linux_store_inferior_registers): Likewise.
4352
4353 2017-07-22 Tom Tromey <tom@tromey.com>
4354
4355 * break-catch-syscall.c (struct catch_syscall_inferior_data)
4356 <syscalls_counts>: Now a std::vector.
4357 (get_catch_syscall_inferior_data): Use "new".
4358 (catch_syscall_inferior_data_cleanup): Use "delete".
4359 (insert_catch_syscall, remove_catch_syscall)
4360 (clear_syscall_counts): Update.
4361
4362 2017-07-22 Tom Tromey <tom@tromey.com>
4363
4364 * break-catch-syscall.c (syscall_catchpoint)
4365 <syscalls_to_be_caught>: Now a std::vector<int>
4366 (~syscall_catchpoint): Remove.
4367 (insert_catch_syscall, remove_catch_syscall)
4368 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4369 (print_mention_catch_syscall, print_recreate_catch_syscall):
4370 Update.
4371 (create_syscall_event_catchpoint): Change type of "filter"
4372 parameter.
4373 (catch_syscall_split_args): Return a std::vector.
4374 (catch_syscall_command_1, catching_syscall_number_1): Update.
4375
4376 2017-07-22 Tom Tromey <tom@tromey.com>
4377
4378 * break-catch-throw.c (struct exception_catchpoint)
4379 <exception_rx>: Now a std::string.
4380 (~exception_catchpoint): Remove.
4381 (print_one_detail_exception_catchpoint): Update.
4382 (handle_gnu_v3_exceptions): Change type of except_rx.
4383 (extract_exception_regexp): Return a std::string.
4384 (catch_exception_command_1): Update.
4385
4386 2017-07-22 Tom Tromey <tom@tromey.com>
4387
4388 * break-catch-sig.c (gdb_signal_type): Remove typedef.
4389 (struct signal_catchpoint) <signals_to_be_caught>: Now a
4390 std::vector.
4391 <catch_all>: Now a bool.
4392 (~signal_catchpoint): Remove.
4393 (signal_catchpoint_insert_location)
4394 (signal_catchpoint_remove_location)
4395 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
4396 (signal_catchpoint_print_mention)
4397 (signal_catchpoint_print_recreate)
4398 (signal_catchpoint_explains_signal): Update.
4399 (create_signal_catchpoint): Change type of "filter" and
4400 "catch_all".
4401 (catch_signal_split_args): Return a std::vector. Change type of
4402 "catch_all".
4403 (catch_signal_command): Update.
4404
4405 2017-07-20 Pedro Alves <palves@redhat.com>
4406
4407 * ada-lang.c (ada_language_defn): Make extern.
4408 (_initialize_ada_language): Remove add_language call.
4409 * c-lang.c (c_language_defn, cplus_language_defn)
4410 (asm_language_defn, minimal_language_defn): Make extern.
4411 (_initialize_c_language): Delete.
4412 * completer.c (compare_cstrings): Delete, moved to utils.h.
4413 * d-lang.c (d_language_defn): Make extern.
4414 (_initialize_d_language): Remove add_language calls.
4415 * defs.h (enum language): Add comment.
4416 * f-lang.c (f_language_defn): Make extern.
4417 (_initialize_f_language): Remove add_language call.
4418 * go-lang.c (go_language_defn): Make extern.
4419 (_initialize_go_language): Remove add_language call.
4420 * language.c: Include <algorithm>.
4421 (languages): Redefine as const array.
4422 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
4423 (set_language_command): Handle "local". Use for-range loop.
4424 (set_language): Remove loop.
4425 (language_enum): Rewrite.
4426 (language_def, language_str): Remove loops.
4427 (add_language): Delete.
4428 (add_set_language_command): New, based on add_languages.
4429 (skip_language_trampoline): Adjust.
4430 (local_language_defn): Delete.
4431 (language_gdbarch_post_init): Adjust.
4432 (_initialize_language): Remove add_language calls. Call
4433 add_set_language_command.
4434 * language.h (add_language): Delete.
4435 (auto_language_defn)
4436 (unknown_language_defn, minimal_language_defn, ada_language_defn)
4437 (asm_language_defn, c_language_defn, cplus_language_defn)
4438 (d_language_defn, f_language_defn, go_language_defn)
4439 (m2_language_defn, objc_language_defn, opencl_language_defn)
4440 (pascal_language_defn, rust_language_defn): Declare.
4441 * m2-lang.c (m2_language_defn): Make extern.
4442 (_initialize_m2_language): Remove add_language call.
4443 * objc-lang.c (objc_language_defn): Make extern.
4444 (_initialize_objc_language): Remove add_language call.
4445 * opencl-lang.c (opencl_language_defn): Make extern.
4446 (_initialize_opencl_language): Remove add_language call.
4447 * p-lang.c (pascal_language_defn): Make extern.
4448 (_initialize_pascal_language): Delete.
4449 * rust-lang.c (rust_language_defn): Make extern.
4450 (_initialize_rust_language): Delete.
4451 * utils.h (compare_cstrings): New static inline function.
4452
4453 2017-07-20 Pedro Alves <palves@redhat.com>
4454
4455 * ada-lang.c (ada_to_fixed_type_1): Adjust.
4456 (get_var_value): Constify parameters.
4457 (get_int_var_value): Change prototype.
4458 (to_fixed_range_type): Adjust.
4459 * ada-lang.h (get_int_var_value): Change prototype.
4460
4461 2017-07-20 Pedro Alves <palves@redhat.com>
4462
4463 * dwarf2read.c (dw2_lookup_symbol): Use
4464 SYMBOL_MATCHES_SEARCH_NAME.
4465 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
4466
4467 2017-07-20 Pedro Alves <palves@redhat.com>
4468
4469 * block.c (block_iter_name_step, block_iter_name_first)
4470 (block_iter_name_next): Delete.
4471 (block_lookup_symbol_primary): Adjust to use
4472 dict_iter_match_first/dict_iter_match_next.
4473 * block.h (block_iter_name_first, block_iter_name_next): Delete
4474 declarations.
4475 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
4476 dict_iter_match_first/dict_iter_match_next.
4477
4478 2017-07-20 Pedro Alves <palves@redhat.com>
4479
4480 * cp-support.c (cp_find_first_component_aux): Add missing case for
4481 end of string.
4482
4483 2017-07-18 David Blaikie <dblaikie@gmail.com>
4484
4485 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
4486 of dwo_cu's dwo_file.
4487
4488 2017-07-18 Yao Qi <yao.qi@linaro.org>
4489
4490 * remote.c (store_registers_using_G): Remove one line comment.
4491
4492 2017-07-18 Yao Qi <yao.qi@linaro.org>
4493
4494 * regcache.c (regcache_cpy): Simplify it.
4495 (regcache::cpy_no_passthrough): Remove it.
4496 * regcache.h (cpy_no_passthrough): Remove it.
4497 (regcache_dup, regcache_cpy): Update comments.
4498
4499 2017-07-18 Pedro Alves <palves@redhat.com>
4500
4501 * remote-sim.c (sim_command_completer): Adjust to work with a
4502 completion_tracker instead of a VEC.
4503
4504 2017-07-17 Pedro Alves <palves@redhat.com>
4505
4506 * completer.c (complete_source_filenames): New function.
4507 (complete_address_and_linespec_locations): New function.
4508 (location_completer): Use complete_address_and_linespec_locations.
4509 (completion_tracker::build_completion_result): Honor the tracker's
4510 request to suppress append.
4511 * completer.h (completion_tracker::suppress_append_ws)
4512 (completion_tracker::set_suppress_append_ws): New methods.
4513 (completion_tracker::m_suppress_append_ws): New field.
4514 (complete_source_filenames): New declaration.
4515 * linespec.c (linespec_complete_what): New.
4516 (struct ls_parser) <complete_what, completion_word,
4517 completion_quote_char, completion_quote_end, completion_tracker>:
4518 New fields.
4519 (string_find_incomplete_keyword_at_end): New.
4520 (linespec_lexer_lex_string): Record quote char. If in completion
4521 mode, don't throw.
4522 (linespec_lexer_consume_token): Advance the completion word point.
4523 (linespec_lexer_peek_token): Save/restore completion info.
4524 (save_stream_and_consume_token): New.
4525 (set_completion_after_number): New.
4526 (linespec_parse_basic): Set what to complete next depending on
4527 token. Handle function and label completions specially.
4528 (parse_linespec): Disable objc shortcut in completion mode. Set
4529 what to complete next depending on token type. Skip keyword if in
4530 completion mode.
4531 (complete_linespec_component, linespec_complete): New.
4532 * linespec.h (linespec_complete): Declare.
4533
4534 2017-07-17 Pedro Alves <palves@redhat.com>
4535
4536 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
4537 Handle 'operator<' / 'operator<<'.
4538
4539 2017-07-17 Pedro Alves <palves@redhat.com>
4540
4541 * completer.c (collect_explicit_location_matches): Handle
4542 MATCH_LABEL.
4543 (convert_explicit_location_to_linespec): New, factored out from
4544 ...
4545 (convert_explicit_location_to_sals): ... this.
4546 (complete_label): New.
4547 (linespec_complete_label, find_label_symbols_in_block): New.
4548 (find_label_symbols): Add completion_mode parameter and adjust to
4549 call find_label_symbols_in_block.
4550 * linespec.h (linespec_complete_label): Declare.
4551
4552 2017-07-17 Pedro Alves <palves@redhat.com>
4553
4554 * ada-lang.c (ada_collect_symbol_completion_matches): Add
4555 complete_symbol_mode parameter.
4556 * cli/cli-cmds.c (complete_command): Get the completion result out
4557 of the handle_brkchars tracker if used a custom word point.
4558 * completer.c: Include "linespec.h".
4559 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
4560 (advance_to_expression_complete_word_point): New.
4561 (completion_tracker::completes_to_completion_word): New.
4562 (complete_files_symbols): Pass down
4563 complete_symbol_mode::EXPRESSION.
4564 (explicit_options, probe_options): New.
4565 (collect_explicit_location_matches): Complete on the
4566 explictit_loc->foo instead of word. Use
4567 linespec_complete_function. Handle MATCH_LINE. Handle offering
4568 keyword and options completions.
4569 (backup_text_ptr): Delete.
4570 (skip_keyword): New.
4571 (complete_explicit_location): Remove 'word' parameter. Add
4572 language, quoted_arg_start and quoted_arg_end parameters.
4573 Rewrite, parsing left to right.
4574 (location_completer): Rewrite.
4575 (location_completer_handle_brkchars): New function.
4576 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
4577 (enum complete_line_internal_reason): Adjust comments.
4578 (completion_tracker::discard_completions): New.
4579 (completer_handle_brkchars_func_for_completer): Handle
4580 location_completer.
4581 (gdb_custom_word_point_brkchars)
4582 (gdb_org_rl_basic_quote_characters): New.
4583 (gdb_completion_word_break_characters_throw)
4584 (completion_find_completion_word): Handle trackers that use a
4585 custom word point.
4586 (completion_tracker::advance_custom_word_point_by): New.
4587 (completion_tracker::build_completion_result): Don't rely on
4588 readline appending the quote char.
4589 (gdb_rl_attempted_completion_function_throw): Handle trackers that
4590 use a custom word point.
4591 (gdb_rl_attempted_completion_function): Restore
4592 rl_basic_quote_characters.
4593 * completer.h (class completion_tracker): Extend intro comment.
4594 (completion_tracker::set_quote_char)
4595 (completion_tracker::quote_char)
4596 (completion_tracker::set_use_custom_word_point)
4597 (completion_tracker::use_custom_word_point)
4598 (completion_tracker::custom_word_point)
4599 (completion_tracker::set_custom_word_point)
4600 (completion_tracker::advance_custom_word_point_by)
4601 (completion_tracker::completes_to_completion_word)
4602 (completion_tracker::discard_completions): New methods.
4603 (completion_tracker::m_quote_char)
4604 (completion_tracker::m_use_custom_word_point)
4605 (completion_tracker::m_custom_word_point): New fields.
4606 (advance_to_expression_complete_word_point): Declare.
4607 * f-lang.c (f_collect_symbol_completion_matches): Add
4608 complete_symbol_mode parameter.
4609 * language.h (struct language_defn)
4610 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
4611 parameter.
4612 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
4613 (linespec_complete_function): New function.
4614 (linespec_lexer_lex_keyword): Adjust.
4615 * linespec.h (linespec_keywords, linespec_complete_function): New
4616 declarations.
4617 * location.c (find_end_quote): New function.
4618 (explicit_location_lex_one): Add explicit_completion_info
4619 parameter. Save quoting info. Don't throw if being called for
4620 completion. Don't handle Ada operators here.
4621 (is_cp_operator, skip_op_false_positives, first_of)
4622 (explicit_location_lex_one_function): New function.
4623 (string_to_explicit_location): Replace 'dont_throw' parameter with
4624 an explicit_completion_info pointer parameter. Handle it. Don't
4625 use explicit_location_lex_one to lex function names. Use
4626 explicit_location_lex_one_function instead.
4627 * location.h (struct explicit_completion_info): New.
4628 (string_to_explicit_location): Replace 'dont_throw' parameter with
4629 an explicit_completion_info pointer parameter.
4630 * symtab.c (default_collect_symbol_completion_matches_break_on):
4631 Add complete_symbol_mode parameter. Handle LINESPEC mode.
4632 (default_collect_symbol_completion_matches)
4633 (collect_symbol_completion_matches): Add complete_symbol_mode
4634 parameter.
4635 (collect_symbol_completion_matches_type): Pass down
4636 complete_symbol_mode::EXPRESSION.
4637 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4638 parameter. Handle LINESPEC mode.
4639 * symtab.h (complete_symbol_mode): New.
4640 (default_collect_symbol_completion_matches_break_on)
4641 (default_collect_symbol_completion_matches)
4642 (collect_symbol_completion_matches)
4643 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4644 parameter.
4645
4646 2017-07-17 Pedro Alves <palves@redhat.com>
4647
4648 * utils.c (enum class strncmp_iw_mode): New.
4649 (strcmp_iw): Rename to ...
4650 (strncmp_iw_with_mode): ... this. Add string2_len and mode
4651 parameters. Handle them.
4652 (strncmp_iw): New.
4653 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
4654 * utils.h (strncmp_iw): Declare.
4655 (strcmp_iw): Move describing comments here.
4656
4657 2017-07-17 Pedro Alves <palves@redhat.com>
4658
4659 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
4660 CP_OPERATOR_STR.
4661 * c-typeprint.c (is_type_conversion_operator): Use
4662 CP_OPERATOR_STR.
4663 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
4664 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
4665 CP_OPERATOR_LEN.
4666 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
4667 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
4668 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
4669 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
4670 CP_OPERATOR_STR.
4671 * location.c: Include "cp-support.h".
4672 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
4673 CP_OPERATOR_STR.
4674 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
4675 CP_OPERATOR_LEN.
4676
4677 2017-07-17 Pedro Alves <palves@redhat.com>
4678
4679 * cli/cli-cmds.c (complete_command): Use a completion tracker
4680 along with completion_find_completion_word for handle_brkchars
4681 phase.
4682 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
4683 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
4684 (struct gdb_rl_completion_word_info): New.
4685 (gdb_rl_find_completion_word): New.
4686 (completion_find_completion_word): New.
4687 * completer.h (completion_find_completion_word): Declare.
4688
4689 2017-07-17 Pedro Alves <palves@redhat.com>
4690
4691 * ada-lang.c (symbol_completion_match): Adjust comments.
4692 (symbol_completion_add): Replace vector parameter with
4693 completion_tracker parameter. Use it.
4694 (ada_make_symbol_completion_list): Rename to...
4695 (ada_collect_symbol_completion_matches): ... this. Add
4696 completion_tracker parameter and use it.
4697 (ada_language_defn): Adjust.
4698 * break-catch-syscall.c (catch_syscall_completer): Adjust
4699 prototype and work with completion_tracker instead of VEC.
4700 * breakpoint.c (condition_completer): Adjust prototype and work
4701 with completion_tracker instead of VEC.
4702 * c-lang.c (c_language_defn, cplus_language_defn)
4703 (asm_language_defn, minimal_language_defn): Adjust to renames.
4704 * cli/cli-cmds.c (complete_command): Rework using
4705 completion_tracker. Catch exceptions when completing.
4706 * cli/cli-decode.c (integer_unlimited_completer)
4707 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
4708 with completion_tracker instead of VEC.
4709 * command.h (struct completion_tracker): Forward declare.
4710 (completer_ftype, completer_handle_brkchars_ftype): Change
4711 types.
4712 (complete_on_cmdlist, complete_on_enum): Adjust.
4713 * completer.c: Include <algorithm>.
4714 (struct gdb_completer_state): New.
4715 (current_completion): New global.
4716 (readline_line_completion_function): Delete.
4717 (noop_completer, filename_completer)
4718 (filename_completer_handle_brkchars, complete_files_symbols)
4719 (linespec_location_completer): Adjust to work with a
4720 completion_tracker instead of a VEC.
4721 (string_or_empty): New.
4722 (collect_explicit_location_matches): Adjust to work with a
4723 completion_tracker instead of a VEC.
4724 (explicit_location_completer): Rename to ...
4725 (complete_explicit_location): ... this and adjust to work with a
4726 completion_tracker instead of a VEC.
4727 (location_completer): Adjust to work with a completion_tracker
4728 instead of a VEC.
4729 (add_struct_fields): Adjust to work with a completion_list instead
4730 of VEC.
4731 (expression_completer): Rename to ...
4732 (complete_expression): ... this and adjust to work with a
4733 completion_tracker instead of a VEC. Use complete_files_symbols.
4734 (expression_completer): Reimplement on top of complete_expression.
4735 (symbol_completer): Adjust to work with a completion_tracker
4736 instead of a VEC.
4737 (enum complete_line_internal_reason): Add describing comments.
4738 (complete_line_internal_normal_command): Adjust to work with a
4739 completion_tracker instead of a VEC.
4740 (complete_line_internal): Rename to ...
4741 (complete_line_internal_1): ... this and adjust to work with a
4742 completion_tracker instead of a VEC. Assert TEXT is NULL in the
4743 handle_brkchars phase.
4744 (new_completion_tracker): Delete.
4745 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
4746 complete_line_internal_1.
4747 (free_completion_tracker): Delete.
4748 (INITIAL_COMPLETION_HTAB_SIZE): New.
4749 (completion_tracker::completion_tracker)
4750 (completion_tracker::~completion_tracker): New.
4751 (maybe_add_completion): Delete.
4752 (completion_tracker::maybe_add_completion)
4753 (completion_tracker::add_completion)
4754 (completion_tracker::add_completions): New.
4755 (throw_max_completions_reached_error): Delete.
4756 (complete_line): Adjust to work with a completion_tracker instead
4757 of a VEC. Don't create a completion_tracker_t or check for max
4758 completions here.
4759 (command_completer, command_completer_handle_brkchars)
4760 (signal_completer, reg_or_group_completer_1)
4761 (reg_or_group_completer, default_completer_handle_brkchars):
4762 Adjust to work with a completion_tracker.
4763 (gdb_completion_word_break_characters_throw): New.
4764 (gdb_completion_word_break_characters): Reimplement.
4765 (line_completion_function): Delete.
4766 (completion_tracker::recompute_lowest_common_denominator)
4767 (expand_preserving_ws)
4768 (completion_tracker::build_completion_result)
4769 (completion_result::completion_result)
4770 (completion_result::completion_result)
4771 (completion_result::~completion_result)
4772 (completion_result::completion_result)
4773 (completion_result::release_match_list, compare_cstrings)
4774 (completion_result::sort_match_list)
4775 (completion_result::reset_match_list)
4776 (gdb_rl_attempted_completion_function_throw)
4777 (gdb_rl_attempted_completion_function): New.
4778 * completer.h (completion_list, struct completion_result)
4779 (class completion_tracker): New.
4780 (complete_line): Add completion_tracker parameter.
4781 (readline_line_completion_function): Delete.
4782 (gdb_rl_attempted_completion_function): New.
4783 (noop_completer, filename_completer, expression_completer)
4784 (location_completer, symbol_completer, command_completer)
4785 (signal_completer, reg_or_group_completer): Update prototypes.
4786 (completion_tracker_t, new_completion_tracker)
4787 (make_cleanup_free_completion_tracker): Delete.
4788 (enum maybe_add_completion_enum): Delete.
4789 (maybe_add_completion): Delete.
4790 (throw_max_completions_reached_error): Delete.
4791 * corefile.c (complete_set_gnutarget): Adjust to work with a
4792 completion_tracker instead of a VEC.
4793 * cp-abi.c (cp_abi_completer): Adjust to work with a
4794 completion_tracker instead of a VEC.
4795 * d-lang.c (d_language_defn): Adjust.
4796 * disasm.c (disassembler_options_completer): Adjust to work with a
4797 completion_tracker instead of a VEC.
4798 * f-lang.c (f_make_symbol_completion_list): Rename to ...
4799 (f_collect_symbol_completion_matches): ... this. Adjust to work
4800 with a completion_tracker instead of a VEC.
4801 (f_language_defn): Adjust.
4802 * go-lang.c (go_language_defn): Adjust.
4803 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
4804 Adjust to work with a completion_tracker instead of a VEC.
4805 * infrun.c (handle_completer): Likewise.
4806 * interps.c (interpreter_completer): Likewise.
4807 * interps.h (interpreter_completer): Likewise.
4808 * language.c (unknown_language_defn, auto_language_defn)
4809 (local_language_defn): Adjust.
4810 * language.h (language_defn::la_make_symbol_completion_list):
4811 Rename to ...
4812 (language_defn::la_collect_symbol_completion_matches): ... this
4813 and adjust to work with a completion_tracker instead of a VEC.
4814 * m2-lang.c (m2_language_defn): Adjust.
4815 * objc-lang.c (objc_language_defn): Adjust.
4816 * opencl-lang.c (opencl_language_defn): Adjust.
4817 * p-lang.c (pascal_language_defn): Adjust.
4818 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
4819 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
4820 with a completion_tracker.
4821 * rust-lang.c (rust_language_defn): Adjust.
4822 * symtab.c (free_completion_list, do_free_completion_list)
4823 (return_val, completion_tracker): Delete.
4824 (completion_list_add_name, completion_list_add_symbol)
4825 (completion_list_add_msymbol, completion_list_objc_symbol)
4826 (completion_list_add_fields, add_symtab_completions): Add
4827 completion_tracker parameter and use it.
4828 (default_make_symbol_completion_list_break_on_1): Rename to...
4829 (default_collect_symbol_completion_matches_break_on): ... this.
4830 Add completion_tracker parameter and use it instead of allocating
4831 a completion tracker here.
4832 (default_make_symbol_completion_list_break_on): Delete old
4833 implementation.
4834 (default_make_symbol_completion_list): Delete.
4835 (default_collect_symbol_completion_matches): New.
4836 (make_symbol_completion_list): Delete.
4837 (collect_symbol_completion_matches): New.
4838 (make_symbol_completion_type): Rename to ...
4839 (collect_symbol_completion_matches_type): ... this. Add
4840 completion_tracker parameter and use it instead of VEC.
4841 (make_file_symbol_completion_list_1): Rename to...
4842 (collect_file_symbol_completion_matches): ... this. Add
4843 completion_tracker parameter and use it instead of VEC.
4844 (make_file_symbol_completion_list): Delete.
4845 (add_filename_to_list): Use completion_list instead of a VEC.
4846 (add_partial_filename_data::list): Now a completion_list.
4847 (make_source_files_completion_list): Work with a completion_list
4848 instead of a VEC.
4849 * symtab.h: Include "completer.h".
4850 (default_make_symbol_completion_list_break_on)
4851 (default_make_symbol_completion_list, make_symbol_completion_list)
4852 (make_symbol_completion_type, make_file_symbol_completion_list)
4853 (make_source_files_completion_list): Delete.
4854 (default_collect_symbol_completion_matches_break_on)
4855 (default_collect_symbol_completion_matches)
4856 (collect_symbol_completion_matches)
4857 (collect_symbol_completion_matches_type)
4858 (collect_file_symbol_completion_matches)
4859 (make_source_files_completion_list): New.
4860 * top.c (init_main): Don't install a rl_completion_entry_function
4861 hook. Install a rl_attempted_completion_function hook instead.
4862 * tui/tui-layout.c (layout_completer): Adjust to work with a
4863 completion_tracker.
4864 * tui/tui-regs.c (tui_reggroup_completer):
4865 * tui/tui-win.c (window_name_completer, focus_completer)
4866 (winheight_completer): Adjust to work with a completion_tracker.
4867 * value.c: Include "completer.h".
4868 (complete_internalvar): Adjust to work with a completion_tracker.
4869 * value.h (complete_internalvar): Likewise.
4870
4871 2017-07-17 Pedro Alves <palves@redhat.com>
4872
4873 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4874 renames.
4875 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4876 comments to completer_ftype's declaration.
4877 <completer_handle_brkchars>: Change type to
4878 completer_handle_brkchars_ftype.
4879 * command.h (completer_ftype): Add describing comment and give
4880 names to parameters.
4881 (completer_ftype_void): Rename to ...
4882 (completer_handle_brkchars_ftype) ... this. Add describing comment.
4883 (set_cmd_completer_handle_brkchars): Adjust.
4884 * completer.c (filename_completer_handle_brkchars): New function.
4885 (complete_line_internal_normal_command): New function, factored
4886 out from ...
4887 (complete_line_internal): ... here.
4888 (command_completer_handle_brkchars)
4889 (default_completer_handle_brkchars)
4890 (completer_handle_brkchars_func_for_completer): New functions.
4891 * completer.h (set_gdb_completion_word_break_characters): Delete
4892 declaration.
4893 (completer_handle_brkchars_func_for_completer): New declaration.
4894 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4895 completer_handle_brkchars_func_for_completer.
4896
4897 2017-07-17 Pedro Alves <palves@redhat.com>
4898
4899 * completer.c (symbol_completer): New function, based on
4900 make_symbol_completion_list_fn.
4901 * completer.h (symbol_completer): New declaration.
4902 * guile/scm-cmd.c (cmdscm_completers): Adjust.
4903 * python/py-cmd.c (completers): Adjust.
4904 * symtab.c (make_symbol_completion_list_fn): Delete.
4905 * symtab.h (make_symbol_completion_list_fn): Delete.
4906 * cli/cli-decode.c (add_cmd): Adjust.
4907
4908 2017-07-17 Pedro Alves <palves@redhat.com>
4909
4910 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4911 * dwarf2read.c: Include "filename-seen-cache.h".
4912 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
4913 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
4914 * filename-seen-cache.c: New file.
4915 * filename-seen-cache.h: New file.
4916 * symtab.c: Include "filename-seen-cache.h".
4917 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
4918 (create_filename_seen_cache, clear_filename_seen_cache)
4919 (delete_filename_seen_cache, filename_seen): Delete, parts moved
4920 to filename-seen-cache.h/filename-seen-cache.c.
4921 (output_source_filename, sources_info)
4922 (maybe_add_partial_symtab_filename)
4923 (make_source_files_completion_list): Adjust to use
4924 filename_seen_cache.
4925
4926 2017-07-17 Pedro Alves <palves@redhat.com>
4927
4928 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
4929 fields.
4930 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
4931 dwarf2_debug_sections*)): New.
4932 (dwarf2_per_objfile::dwarf2_per_objfile(const
4933 dwarf2_per_objfile&)): Declare as deleted.
4934 (dwarf2_per_objfile::operator=): Declare as deleted.
4935 (dwarf2_per_objfile::dwarf2_per_objfile)
4936 (dwarf2_per_objfile::~dwarf2_per_objfile)
4937 (dwarf2_per_objfile::free_cached_comp_units): New.
4938 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
4939 ctor. Call dwarf2_per_objfile's ctor manually.
4940 (dwarf2_locate_sections): Deleted/refactored as ...
4941 (dwarf2_per_objfile::locate_sections): ... this new method.
4942 (free_cached_comp_units): Defer to
4943 dwarf2_per_objfile::free_cached_comp_units.
4944 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
4945
4946 2017-07-14 Tom Tromey <tom@tromey.com>
4947
4948 PR rust/21764:
4949 * rust-exp.y (convert_ast_to_expression): Add "want_type"
4950 parameter.
4951 <UNOP_SIZEOF>: Split into separate case.
4952 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
4953
4954 2017-07-14 Tom Tromey <tom@tromey.com>
4955
4956 PR rust/21763:
4957 * symtab.c (symbol_matches_domain): Add language_rust to special
4958 case.
4959 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
4960 treat LOC_TYPEDEF symbols as variables.
4961
4962 2017-07-14 Pedro Alves <palves@redhat.com>
4963
4964 * symtab.c (make_file_symbol_completion_list_1): Iterate over
4965 symtabs matching all symtabs with SRCFILE as file name instead of
4966 only considering the first hit, with lookup_symtab.
4967
4968 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4969
4970 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
4971 operator_name parameters.
4972 (gen_expr): Update function call.
4973
4974 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4975
4976 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
4977 parameter.
4978 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
4979 Likewise.
4980 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
4981 parameter, use agent_expr::gdbarch instead, update function
4982 calls.
4983 (locexpr_tracepoint_var_ref): Likewise.
4984 (loclist_tracepoint_var_ref): Likewise.
4985 * ax-gdb.c (gen_trace_static_fields): Likewise.
4986 (gen_traced_pop): Likewise.
4987 (gen_frame_args_address): Likewise.
4988 (gen_frame_locals_address): Likewise.
4989 (gen_var_ref): Likewise.
4990 (gen_struct_ref_recursive): Likewise.
4991 (gen_static_field): Likewise.
4992 (gen_maybe_namespace_elt): Likewise.
4993 (gen_expr): Likewise.
4994 (gen_trace_for_var): Likewise.
4995 (gen_trace_for_expr): Likewise.
4996 (gen_trace_for_return_address): Likewise.
4997
4998 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4999
5000 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
5001 parameter.
5002 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
5003
5004 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
5005
5006 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
5007 from ax, update calls.
5008 (gen_usual_arithmetic): Likewise.
5009 (gen_integral_promotions): Likewise.
5010 (gen_bitfield_ref): Likewise.
5011 (gen_primitive_field): Likewise.
5012 (gen_struct_ref_recursive): Likewise.
5013 (gen_struct_ref): Likewise.
5014 (gen_maybe_namespace_elt): Likewise.
5015 (gen_struct_elt_for_reference): Likewise.
5016 (gen_namespace_elt): Likewise.
5017 (gen_aggregate_elt_ref): Likewise.
5018 (gen_expr): Get gdbarch from ax, update calls.
5019 (gen_expr_binop_rest): Likewise.
5020
5021 2017-07-13 Pedro Alves <palves@redhat.com>
5022
5023 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
5024 as default tdesc.
5025 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
5026 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
5027 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
5028 tdesc_amd64_linux as default tdesc. Get final tdesc from the
5029 tdep.
5030 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
5031 Get final tdesc from the tdep.
5032 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
5033 default tdesc.
5034 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5035 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5036 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
5037 Use it as default tdesc.
5038 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
5039 down to amd_init_abi. No longer handle fallback tdesc here.
5040 * amd64-tdep.h (tdesc_x32): Declare.
5041 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
5042 parameter.
5043 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
5044 as default tdesc.
5045
5046 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5047
5048 * s390-linux-tdep.c (s390_process_record): Add support for
5049 instructions new in arch12.
5050
5051 2017-07-11 John Baldwin <jhb@FreeBSD.org>
5052
5053 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
5054 PT_GETFSBASE and PT_GETGSBASE.
5055 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
5056 PT_SETGSBASE.
5057
5058 2017-07-11 John Baldwin <jhb@FreeBSD.org>
5059
5060 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
5061 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
5062 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
5063 those rules.
5064 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
5065 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
5066 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
5067 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
5068 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
5069 * features/i386/amd64.xml: Add 64bit-segments.xml.
5070 * features/i386/amd64-avx-avx512.c: Regenerated.
5071 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
5072 * features/i386/amd64-avx-mpx.c: Regenerated.
5073 * features/i386/amd64-avx.c: Regenerated.
5074 * features/i386/amd64-mpx.c: Regenerated.
5075 * features/i386/amd64.c: Regenerated.
5076 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
5077 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5078 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
5079 * regformats/i386/amd64-avx.dat: Regenerated.
5080 * regformats/i386/amd64-mpx.dat: Regenerated.
5081 * regformats/i386/amd64.dat: Regenerated.
5082
5083 2017-07-10 Yao Qi <yao.qi@linaro.org>
5084
5085 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5086 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5087
5088 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
5089
5090 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
5091 unsetenv.
5092 * gnulib/aclocal.m4: Regenerate.
5093 * gnulib/config.in: Regenerate.
5094 * gnulib/configure: Regenerate.
5095 * gnulib/import/Makefile.am: Regenerate.
5096 * gnulib/import/Makefile.in: Regenerate.
5097 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5098 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5099 * gnulib/import/m4/environ.m4: New file.
5100 * gnulib/import/m4/setenv.m4: New file.
5101 * gnulib/import/setenv.c: New file.
5102 * gnulib/import/unsetenv.c: New file.
5103
5104 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
5105
5106 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
5107 address when op is DW_OP_addr.
5108
5109 2017-07-09 Tom Tromey <tom@tromey.com>
5110
5111 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
5112 check and apply to outer type.
5113
5114 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5115
5116 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
5117 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
5118 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
5119 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
5120
5121 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5122
5123 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
5124
5125 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5126
5127 * corelow.c (get_core_siginfo): Remove.
5128 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
5129 instead of get_core_siginfo.
5130 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
5131 * gdbarch.h: Re-generate.
5132 * gdbarch.c: Re-generate.
5133 * linux-tdep.c (linux_core_xfer_siginfo): New.
5134 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
5135
5136 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5137
5138 * corelow.c (thread_section_name): Move to ...
5139 * gdbcore.h (thread_section_name): ... here.
5140
5141 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5142
5143 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
5144 (struct siginfo32): New.
5145 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
5146 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
5147 via ptrace(PT_LWPINFO).
5148
5149 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5150
5151 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
5152 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
5153 (fbsd_get_siginfo_type): New.
5154 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
5155 (_initialize_fbsd_tdep): New.
5156
5157 2017-07-06 David Blaikie <dblaikie@gmail.com>
5158
5159 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
5160 a singular dwo_unit*) to support multiple CUs in the same way that
5161 multiple TUs are supported.
5162 (create_cus_hash_table): Replace create_dwo_cu with a function for
5163 parsing multiple CUs from a DWO file.
5164 (open_and_init_dwo_file): Use create_cus_hash_table rather than
5165 create_dwo_cu.
5166 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
5167 htab_find, rather than comparing the signature to a singleton CU in
5168 the dwo_file.
5169
5170 2017-07-06 Pedro Alves <palves@redhat.com>
5171
5172 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
5173
5174 2017-07-04 Pedro Alves <palves@redhat.com>
5175
5176 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
5177 * gdbtypes.h (TYPE_STATIC): Delete.
5178 (struct fn_field) <is_public, is_abstract, is_static, is_final,
5179 is_synchronized, is_native>: Delete.
5180 <dummy>: Bump.
5181 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
5182 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
5183 (TYPE_FN_FIELD_ABSTRACT): Delete.
5184
5185 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
5186
5187 * buffer.h (buffer_finish): Fix spelling mistakes.
5188
5189 2017-07-01 Eli Zaretskii <eliz@gnu.org>
5190
5191 * .dir-locals.el: Automatically switch to C-style comments in
5192 versions of Emacs that support the feature.
5193
5194 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5195 Pedro Alves <palves@redhat.com>
5196
5197 PR cli/21688
5198 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5199 (process_next_line): New variable 'inline_cmd'.
5200 Adjust 'if' clauses for "python", "compile" and "guile" to use
5201 'command_name_equals' and check for '!inline_cmd'.
5202
5203 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5204
5205 PR cli/21688
5206 * cli/cli-script.c (command_name_equals_not_inline): New function.
5207 (process_next_line): Adjust 'if' clauses for "python", "compile"
5208 and "guile" to use command_name_equals_not_inline.
5209
5210 2017-06-29 Pedro Alves <palves@redhat.com>
5211
5212 * completer.c (expression_completer): Call
5213 linespec_location_completer instead of location_completer.
5214
5215 2017-06-29 Pedro Alves <palves@redhat.com>
5216
5217 * completer.c (expression_completer): Remove code that recomputes
5218 'text' from 'word'.
5219
5220 2017-06-29 Yao Qi <yao.qi@linaro.org>
5221
5222 * regformats/regdat.sh: Generate code with
5223 "ifndef IN_PROCESS_AGENT".
5224
5225 2017-06-28 Pedro Alves <palves@redhat.com>
5226
5227 * command.h: Include "common/scoped_restore.h".
5228
5229 2017-06-28 Yao Qi <yao.qi@linaro.org>
5230
5231 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5232 instead of obstack_grow.
5233
5234 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
5235
5236 PR gdb/21337
5237 * symfile.c (reread_symbols): Call objfiles_changed just before
5238 read_symbols.
5239
5240 2017-06-27 Pedro Alves <palves@redhat.com>
5241
5242 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5243 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5244 (completion_list_add_symbol, completion_list_add_msymbol):
5245 ... these new functions.
5246 (add_symtab_completions)
5247 (default_make_symbol_completion_list_break_on_1): Adjust.
5248
5249 2017-06-27 Pedro Alves <palves@redhat.com>
5250
5251 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5252 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
5253 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5254 dtor.
5255 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
5256 'storage_obstack' field an auto_obstack. In-class initialize all
5257 non-bitfield fields. Make minsyms_read bool.
5258 * symfile.c (read_symbols): Adjust.
5259
5260 2017-06-27 Alan Hayward <alan.hayward@arm.com>
5261
5262 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5263 (gdbsim_store_register): Likewise.
5264
5265 2017-06-27 Pedro Alves <palves@redhat.com>
5266
5267 * c-exp.y (name_obstack): Now an auto_obstack.
5268 (yylex): Use auto_obstack::clear.
5269 (c_parse): Use auto_obstack::clear instead of reinitializing and
5270 freeing the obstack.
5271 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5272 * d-exp.y (name_obstack): Now an auto_obstack.
5273 (yylex): Use auto_obstack::clear.
5274 (d_parse): Use auto_obstack::clear instead of reinitializing and
5275 freeing the obstack.
5276 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
5277 auto_obstack.
5278 * dwarf2read.c (create_addrmap_from_index)
5279 (dwarf2_build_psymtabs_hard)
5280 (update_enumeration_type_from_children): Likewise.
5281 * gdb_obstack.h (auto_obstack): New type.
5282 * go-exp.y (name_obstack): Now an auto_obstack.
5283 (build_packaged_name): Use auto_obstack::clear.
5284 (go_parse): Use auto_obstack::clear instead of reinitializing and
5285 freeing the obstack.
5286 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
5287 auto_obstack.
5288 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
5289 * rust-exp.y (work_obstack): Now an auto_obstack.
5290 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
5291 reinitializing and freeing the obstack.
5292 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
5293 (host_char_to_target): Use auto_obstack.
5294 * utils.h (make_cleanup_obstack_free): Delete declaration.
5295 * valprint.c (generic_emit_char, generic_printstr): Use
5296 auto_obstack.
5297
5298 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
5299
5300 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
5301 thread.
5302 (darwin_init_thread_list): Don't update dummy thread.
5303 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
5304
5305 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5306
5307 * record-full.c (netorder16): Remove.
5308
5309 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5310
5311 * common/diagnostics.h: Define macros for GCC.
5312 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
5313 * common/vec.h: Include diagnostics.h.
5314 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
5315 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
5316 warning.
5317
5318 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5319
5320 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5321 New macro.
5322 * ada-lex.l: Ignore deprecated register warnings.
5323
5324 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5325
5326 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5327 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5328
5329 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5330
5331 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5332 its own line.
5333
5334 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5335
5336 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5337
5338 2017-06-23 Alan Hayward <alan.hayward@arm.com>
5339
5340 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5341 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5342 (xtensa_register_read_masked): Likewise.
5343
5344 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
5345
5346 * common/environ.c (gdb_environ::unset): Update comment.
5347
5348 2017-06-22 Alan Hayward <alan.hayward@arm.com>
5349
5350 * python/py-unwind.c (pyuw_sniffer): Allocate space for
5351 registers.
5352
5353 2017-06-22 Alan Hayward <alan.hayward@arm.com>
5354
5355 * record-full.c (record_full_exec_insn): Use byte_vector.
5356
5357 2017-06-22 Yao Qi <yao.qi@linaro.org>
5358
5359 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5360 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5361
5362 2017-06-22 Alan Hayward <alan.hayward@arm.com>
5363
5364 * remote.c (cached_reg): Move from here...
5365 * regcache.h (cached_reg): ...to here.
5366 * python/py-unwind.c (struct reg_info): Remove.
5367 (cached_frame_info): Use cached_reg_t.
5368 (pyuw_prev_register): Likewise.
5369 (pyuw_sniffer): Use cached_reg_t and allocate registers.
5370 (pyuw_dealloc_cache): Free all registers.
5371
5372 2017-06-22 Pedro Alves <palves@redhat.com>
5373 Simon Marchi <simon.marchi@ericsson.com>
5374
5375 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5376 warning.
5377 * common/diagnostics.h: New file.
5378
5379 2017-06-22 Pedro Alves <palves@redhat.com>
5380
5381 * common/agent.h: Add include guards.
5382
5383 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
5384
5385 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
5386 talk about addressable units instead of bytes.
5387
5388 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5389
5390 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
5391 of '::const_iterator'.
5392
5393 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5394
5395 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5396 'unittests/environ-selftests.c'.
5397 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
5398 * charset.c (find_charset_names): Declare object 'iconv_env'.
5399 Update code to use 'iconv_env' object. Remove call to
5400 'free_environ'.
5401 * common/environ.c: Include <utility>.
5402 (make_environ): Delete function.
5403 (free_environ): Delete function.
5404 (gdb_environ::clear): New function.
5405 (gdb_environ::operator=): New function.
5406 (gdb_environ::get): Likewise.
5407 (environ_vector): Delete function.
5408 (set_in_environ): Delete function.
5409 (gdb_environ::set): New function.
5410 (unset_in_environ): Delete function.
5411 (gdb_environ::unset): New function.
5412 (gdb_environ::envp): Likewise.
5413 * common/environ.h: Include <vector>.
5414 (struct gdb_environ): Delete; transform into...
5415 (class gdb_environ): ... this class.
5416 (free_environ): Delete prototype.
5417 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
5418 environ_vector): Likewise.
5419 * infcmd.c (run_command_1): Update code to call
5420 'envp' from 'gdb_environ' class.
5421 (environment_info): Update code to call methods from 'gdb_environ'
5422 class.
5423 (unset_environment_command): Likewise.
5424 (path_info): Likewise.
5425 (path_command): Likewise.
5426 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
5427 (inferior::inferior): Initialize 'environment' using the host's
5428 information.
5429 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
5430 Include "environ.h".
5431 (class inferior) <environment>: Change type from 'struct
5432 gdb_environ' to 'gdb_environ'.
5433 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
5434 methods from 'gdb_environ' class.
5435 * solib.c (solib_find_1): Likewise
5436 * unittests/environ-selftests.c: New file.
5437
5438 2017-06-20 Yao Qi <yao.qi@linaro.org>
5439
5440 * features/i386/i386-linux.xml: Exchange the order of including
5441 32bit-linux.xml and 32bit-sse.xml.
5442 * features/i386/i386-linux.c: Regenerated.
5443
5444 2017-06-20 Yao Qi <yao.qi@linaro.org>
5445
5446 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
5447 Delete copy ctor and assignment operator.
5448 (tdesc_type): Likewise.
5449 (tdesc_feature): Likewise.
5450 (tdesc_free_reg): Remove.
5451 (tdesc_create_reg): Use new.
5452 (tdesc_free_type): Remove.
5453 (tdesc_create_vector): Use new.
5454 (tdesc_create_union): Likewise.
5455 (tdesc_create_flags): Likewise.
5456 (tdesc_create_enum): Likewise.
5457 (tdesc_free_feature): Delete.
5458 (free_target_description): Use delete.
5459
5460 2017-06-19 John Baldwin <jhb@FreeBSD.org>
5461
5462 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
5463 registers.
5464
5465 2017-06-19 Pedro Alves <palves@redhat.com>
5466
5467 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
5468 after gdb::unlinker.
5469
5470 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
5471
5472 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
5473 gdb_environ to access an environment variable.
5474
5475 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
5476
5477 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
5478 gdb_byte*.
5479
5480 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5481
5482 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
5483
5484 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5485
5486 * configure: Re-generate.
5487 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
5488
5489 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5490
5491 * configure: Re-generate.
5492 * warning.m4: Pass -Werror to compiler when checking for
5493 supported warning flags.
5494
5495 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5496
5497 * Makefile.in (COMPILE.pre): Add "-x c++".
5498
5499 2017-06-16 Alan Hayward <alan.hayward@arm.com>
5500 Pedro Alves <palves@redhat.com>
5501 Yao Qi <yao.qi@linaro.org>
5502
5503 * defs.h (RequireLongest): New.
5504 (extract_integer): Declare function template.
5505 (extract_signed_integer): Remove the declaration, but define it
5506 static inline.
5507 (extract_unsigned_integer): Likewise.
5508 (store_integer): Declare function template.
5509 (store_signed_integer): Remove the declaration, but define it
5510 static inline.
5511 (store_unsigned_integer): Likewise.
5512 * findvar.c (extract_integer): New function template.
5513 (extract_signed_integer): Remove.
5514 (extract_unsigned_integer): Remove.
5515 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
5516 instantiations.
5517 (store_integer): New function template.
5518 (store_signed_integer): Remove.
5519 (store_unsigned_integer): Remove.
5520 (store_integer): Explicit instantiations.
5521 * regcache.c (regcache_raw_read_signed): Update.
5522 (regcache::raw_read): New function.
5523 (regcache::raw_read_signed): Remove.
5524 (regcache::raw_read_unsigned): Remove.
5525 (regcache_raw_read_unsigned): Update.
5526 (regcache_raw_write_unsigned): Update.
5527 (regcache::raw_write_signed): Remove.
5528 (regcache::raw_write): New function.
5529 (regcache_cooked_read_signed): Update.
5530 (regcache::raw_write_unsigned): Remove.
5531 (regcache::cooked_read_signed): Remove.
5532 (regcache_cooked_read_unsigned): Update.
5533 (regcache::cooked_read_unsigned): Remove.
5534 (regcache_cooked_write_signed): Update.
5535 (regcache_cooked_write_unsigned): Update.
5536 * regcache.h (regcache) <raw_read_signed>: Remove.
5537 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
5538 <raw_read, raw_write>: New.
5539 <cooked_read_signed, cooked_write_signed>: Remove.
5540 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
5541 <cooked_read, cooked_write>: New.
5542 * sh64-tdep.c (sh64_pseudo_register_read): Update.
5543 (sh64_pseudo_register_write): Update.
5544
5545 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
5546
5547 * arc-tdep.c (arc_disassembler_options): New variable.
5548 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
5549 of default_print_insn.
5550 (arc_delayed_print_insn): Set info->section when needed,
5551 use default_print_insn to retrieve a disassembler.
5552
5553 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
5554
5555 PR gdb/21574
5556 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
5557 to mention $SHELL and startup-with-shell.
5558
5559 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
5560
5561 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
5562
5563 2017-06-14 Yao Qi <yao.qi@linaro.org>
5564
5565 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
5566 default_print_insn instead of print_insn_aarch64.
5567 * arm-tdep.c (gdb_print_insn_arm): Call
5568 default_print_insn instead of print_insn_big_arm
5569 and print_insn_little_arm.
5570 * i386-tdep.c (i386_print_insn): Call default_print_insn
5571 instead of print_insn_i386.
5572 * ia64-tdep.c (ia64_print_insn): Call
5573 default_print_insn instead of print_insn_ia64.
5574 * mips-tdep.c (gdb_print_insn_mips): Call
5575 default_print_insn instead of print_insn_big_mips
5576 and print_insn_little_mips.
5577 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
5578 instead of print_insn_spu.
5579
5580 2017-06-14 Pedro Alves <palves@redhat.com>
5581
5582 * ada-lang.c: Include "common/byte-vector.h".
5583 (ada_value_primitive_packed_val): Use gdb::byte_vector.
5584 * charset.c (wchar_iterator::iterate): Resize the vector instead
5585 of reserving it.
5586 * common/byte-vector.h: Include "common/def-vector.h".
5587 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
5588 * cli/cli-dump.c: Include "common/byte-vector.h".
5589 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
5590 * common/byte-vector.h: New file.
5591 * common/def-vector.h: New file.
5592 * common/default-init-alloc.h: New file.
5593 * dwarf2loc.c: Include "common/byte-vector.h".
5594 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
5595 instead of reserving it.
5596 * dwarf2read.c: Include "common/byte-vector.h".
5597 (data_buf::m_vec): Now a gdb::byte_vector.
5598 * gdb_regex.c: Include "common/def-vector.h".
5599 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
5600 * mi/mi-main.c: Include "common/byte-vector.h".
5601 (mi_cmd_data_read_memory): Use gdb::byte_vector.
5602 * printcmd.c: Include "common/byte-vector.h".
5603 (print_scalar_formatted): Use gdb::byte_vector.
5604 * valprint.c: Include "common/byte-vector.h".
5605 (maybe_negate_by_bytes, print_decimal_chars): Use
5606 gdb::byte_vector.
5607
5608 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5609
5610 * darwin-nat.c: Include "nat/fork-inferior.h".
5611
5612 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5613
5614 * configure.nat: Factor out Darwin bits that are not
5615 architecture-specific. Add fork-inferior.o.
5616
5617 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5618
5619 * configure.nat: Factor out AIX bits that are not
5620 architecture-specific. Add fork-inferior.o.
5621
5622 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5623
5624 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
5625 (read_pieced_value, write_pieced_value): ...here. Reduce to
5626 wrappers that just call rw_pieced_value.
5627
5628 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5629
5630 * dwarf2loc.c (write_pieced_value): When writing the data for a
5631 memory piece, use write_memory_with_notification instead of
5632 write_memory.
5633
5634 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5635
5636 * valops.c (read_value_memory): Change embedded_offset to
5637 represent a bit offset instead of a byte offset.
5638 * value.h (read_value_memory): Adjust comment.
5639
5640 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5641
5642 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
5643 dest_offset_bits and source_offset_bits.
5644 (write_pieced_value): Likewise.
5645
5646 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5647
5648 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
5649 given by DW_OP_bit_piece.
5650 (write_pieced_value): Likewise.
5651
5652 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5653
5654 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
5655 some other preparations to the places where sufficient information
5656 is available.
5657 (write_pieced_value): Likewise.
5658
5659 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5660
5661 * dwarf2loc.c (bits_to_bytes): New function.
5662 (read_pieced_value): Fix offset calculations for register pieces
5663 on big-endian targets.
5664 (write_pieced_value): Likewise.
5665
5666 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5667
5668 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
5669 (write_pieced_value): Likewise.
5670
5671 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5672
5673 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
5674 transfer the source value's least significant bits, instead of its
5675 lowest-addressed ones. Rename type_len to max_offset.
5676 (read_pieced_value): Mirror above changes to write_pieced_value as
5677 applicable.
5678
5679 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5680
5681 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
5682 truncate full bytes from dest_offset_bits before using it as an
5683 offset into the buffer.
5684
5685 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5686
5687 * dwarf2loc.c (write_pieced_value): Include transfer size in
5688 byte-wise check.
5689
5690 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5691
5692 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
5693 calculation of this_size.
5694
5695 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5696
5697 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
5698 when targeting a bit-field.
5699 (write_pieced_value): Likewise.
5700
5701 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5702
5703 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
5704 (allocate_piece_closure): Drop addr_size parameter.
5705 (dwarf2_evaluate_loc_desc_full): Adjust call to
5706 allocate_piece_closure.
5707
5708 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5709
5710 PR gdb/21226
5711 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
5712 the LSB end, independent of endianness.
5713
5714 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5715
5716 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
5717 size capping.
5718
5719 2017-06-13 Yao Qi <yao.qi@linaro.org>
5720
5721 * mips-linux-nat.c: Move include features/mips*-linux.c to
5722 mips-linux-tdep.c.
5723 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
5724 to mips-linux-tdep.c.
5725 * mips-linux-tdep.c: Include features/mips*-linux.c
5726 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
5727 functions.
5728 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
5729 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
5730 (tdesc_mips64_dsp_linux): Declare.
5731
5732 2017-06-12 Tom Tromey <tom@tromey.com>
5733
5734 * valprint.h (val_print_type_code_int): Remove.
5735 * valprint.c (generic_val_print_int): Always call
5736 val_print_scalar_formatted.
5737 (val_print_type_code_int): Remove.
5738 * printcmd.c (print_scalar_formatted): Handle options->format==0.
5739 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
5740 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
5741 * ada-valprint.c (ada_val_print_num): Use
5742 val_print_scalar_formatted.
5743
5744 2017-06-12 Tom Tromey <tom@tromey.com>
5745
5746 * printcmd.c (print_scalar_formatted): Unify the two switches.
5747 Don't convert scalars to LONGEST.
5748
5749 2017-06-12 Tom Tromey <tom@tromey.com>
5750
5751 PR exp/16225:
5752 * valprint.h (print_decimal_chars): Update.
5753 * valprint.c (maybe_negate_by_bytes): New function.
5754 (print_decimal_chars): Add "is_signed" argument.
5755 * printcmd.c (print_scalar_formatted): Update.
5756
5757 2017-06-12 Tom Tromey <tom@tromey.com>
5758
5759 PR exp/16225:
5760 * valprint.h (print_binary_chars, print_hex_chars): Update.
5761 * valprint.c (val_print_type_code_int): Update.
5762 (print_binary_chars): Add "zero_pad" argument.
5763 (emit_octal_digit): New function.
5764 (print_octal_chars): Don't zero-pad.
5765 (print_decimal_chars): Likewise.
5766 (print_hex_chars): Add "zero_pad" argument.
5767 * sh64-tdep.c (sh64_do_fp_register): Update.
5768 * regcache.c (regcache::dump): Update.
5769 * printcmd.c (print_scalar_formatted): Update.
5770 * infcmd.c (default_print_one_register_info): Update.
5771
5772 2017-06-12 Pedro Alves <palves@redhat.com>
5773 Alan Hayward <alan.hayward@arm.com>
5774
5775 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
5776 (mips_eabi_push_dummy_call): Rename local 'regsize' to
5777 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
5778 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
5779 Assert that abi_regsize bytes fit in 'ref_valbuf'.
5780
5781 2017-06-12 Pedro Alves <palves@redhat.com>
5782
5783 * dwarf2read.c (mapped_symtab::data): Now a vector of
5784 symtab_index_entry instead of vector of
5785 std::unique_ptr<symtab_index_entry>. All users adjusted to check
5786 whether an element's name is NULL instead of checking whether the
5787 element itself is NULL.
5788 (find_slot): Change return type. Adjust.
5789 (hash_expand, , add_index_entry, uniquify_cu_indices)
5790 (write_hash_table): Adjust.
5791
5792 2017-06-12 Pedro Alves <palves@redhat.com>
5793
5794 * dwarf2read.c (recursively_count_psymbols): New function.
5795 (write_psymtabs_to_index): Call it to compute number of psyms and
5796 pass estimate size of psyms_seen to unordered_set's ctor.
5797
5798 2017-06-12 Pedro Alves <palves@redhat.com>
5799
5800 * dwarf2read.c (write_hash_table): Check if key already exists
5801 before emplacing.
5802
5803 2017-06-12 Pedro Alves <palves@redhat.com>
5804
5805 * dwarf2read.c (data_buf::append_space): Rename to...
5806 (data_buf::grow): ... this, and make private. Adjust all callers.
5807 (data_buf::append_uint): New method.
5808 (add_address_entry, write_one_signatured_type)
5809 (write_psymtabs_to_index): Use it.
5810
5811 2017-06-12 Pedro Alves <palves@redhat.com>
5812
5813 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
5814 (file_write (FILE *, const std::vector<Elem>&)): Delete.
5815 (data_buf::file_write): Call ::fwrite directly.
5816
5817 2017-06-12 Pedro Alves <palves@redhat.com>
5818
5819 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
5820 std::vector::erase.
5821
5822 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5823
5824 Code cleanup: C++ify .gdb_index producer.
5825 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5826 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5827 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5828 (create_strtab, add_string): Remove.
5829 (file_write, data_buf): New.
5830 (struct symtab_index_entry): Use std::vector for cu_indices.
5831 (struct mapped_symtab): Use std::vector for data.
5832 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5833 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5834 Remove.
5835 (find_slot): Change return type. Update it to the new data structures.
5836 (hash_expand, add_index_entry): Update it to the new data structures.
5837 (offset_type_compare): Remove.
5838 (uniquify_cu_indices): Update it to the new data structures.
5839 (c_str_view, c_str_view_hasher, vector_hasher): New.
5840 (add_indices_to_cpool): Remove.
5841 (write_hash_table): Update it to the new data structures.
5842 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5843 (eq_psymtab_cu_index): Remove.
5844 (psym_index_map): New typedef.
5845 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5846 reference and std::unordered_map for cu_index_htab.
5847 (add_address_entry, add_address_entry_worker, write_address_map)
5848 (write_psymbols): Update it to the new data structures.
5849 (write_obstack): Remove.
5850 (struct signatured_type_index_data): Change types_list to a data_buf
5851 reference and psyms_seen to a std::unordered_set reference.
5852 (write_one_signatured_type, recursively_write_psymbols)
5853 (write_psymtabs_to_index): Update it to the new data structures.
5854
5855 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
5856
5857 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5858 separate-debug-file commands.
5859 * symfile.h (separate_debug_file_debug): New global.
5860 * symfile.c (separate_debug_file_debug): New global.
5861 (separate_debug_file_exists, find_separate_debug_file): Add
5862 debug output.
5863 (_initialize_symfile): Add "set debug separate-debug-file"
5864 command.
5865 * build-id.c (build_id_to_debug_bfd,
5866 find_separate_debug_file_by_buildid): Add debug output.
5867
5868 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5869
5870 * gdbarch.sh (displaced_step_free_closure): Remove.
5871 * gdbarch.h, gdbarch.c: Re-generate.
5872 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5873 displaced_step_free_closure.
5874 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5875 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5876 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5877 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5878 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5879 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5880 * arch-utils.h (simple_displaced_step_free_closure): Remove.
5881 * arch-utils.c (simple_displaced_step_free_closure): Remove.
5882 * infrun.c (displaced_step_clear): Call xfree instead of
5883 gdbarch_displaced_step_free_closure.
5884
5885 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
5886
5887 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5888 NULL".
5889
5890 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5891
5892 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5893 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5894 (mn10300_push_dummy_call): Likewise.
5895
5896 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5897
5898 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5899
5900 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5901
5902 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5903
5904 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5905
5906 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5907 able to start inferiors using a shell.
5908 (New remote packets): Announce new packet "QStartupWithShell".
5909 * remote.c: Add PACKET_QStartupWithShell.
5910 (extended_remote_create_inferior): Handle new
5911 PACKET_QStartupWithShell.
5912 (remote_protocol_features) <QStartupWithShell>: New entry for
5913 PACKET_QStartupWithShell.
5914 (_initialize_remote): Call "add_packet_config_cmd" for
5915 QStartupShell.
5916
5917 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5918 Pedro Alves <palves@redhat.com>
5919
5920 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
5921 and "nat/fork-inferior.h".
5922 * common/common-inferior.h: New file, with contents from
5923 "gdb/inferior.h".
5924 * commom/common-utils.c: Include "common-utils.h".
5925 (stringify_argv): New function.
5926 * common/common-utils.h (stringify_argv): New prototype.
5927 * configure.nat: Add "fork-inferior.o" as a dependency for
5928 "*linux*", "fbsd*" and "nbsd*" hosts.
5929 * corefile.c (get_exec_file): Update comment.
5930 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
5931 instead of "startup_inferior".
5932 (darwin_create_inferior): Call "add_thread_silent" after
5933 "fork_inferior".
5934 * fork-child.c: Cleanup unnecessary includes.
5935 (SHELL_FILE): Move to "common/common-fork-child.c".
5936 (environ): Likewise.
5937 (exec_wrapper): Initialize.
5938 (get_exec_wrapper): New function.
5939 (breakup_args): Move to "common/common-fork-child.c"; rename to
5940 "breakup_args_for_exec".
5941 (escape_bang_in_quoted_argument): Move to
5942 "common/common-fork-child.c".
5943 (saved_ui): New variable.
5944 (prefork_hook): New function.
5945 (postfork_hook): Likewise.
5946 (postfork_child_hook): Likewise.
5947 (gdb_startup_inferior): Likewise.
5948 (fork_inferior): Move to "common/common-fork-child.c". Update
5949 function to support gdbserver.
5950 (startup_inferior): Likewise.
5951 * gdbcore.h (get_exec_file): Remove declaration.
5952 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
5953 instead of "startup_inferior". Call "add_thread_silent" after
5954 "fork_inferior".
5955 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
5956 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
5957 instead of "startup_inferior". Call "add_thread_silent" after
5958 "fork_inferior".
5959 * inferior.h: Include "common-inferior.h".
5960 (trace_start_error): Move to "common/common-utils.h".
5961 (trace_start_error_with_name): Likewise.
5962 (fork_inferior): Move prototype to "nat/fork-inferior.h".
5963 (startup_inferior): Likewise.
5964 (gdb_startup_inferior): New prototype.
5965 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
5966 * nat/fork-inferior.h: New file.
5967 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
5968 instead of "startup_inferior". Call "add_thread_silent" after
5969 "fork_inferior".
5970 * target.h (target_terminal_init): Move prototype to
5971 "target/target.h".
5972 (target_terminal_inferior): Likewise.
5973 (target_terminal_ours): Likewise.
5974 * target/target.h (target_terminal_init): New prototype, moved
5975 from "target.h".
5976 (target_terminal_inferior): Likewise.
5977 (target_terminal_ours): Likewise.
5978 * utils.c (gdb_flush_out_err): New function.
5979
5980 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5981
5982 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
5983 * common/common-gdbthread.h: New file, with parts from
5984 "gdb/gdbthread.h".
5985 * gdbthread.h: Include "common-gdbthread.h".
5986 (switch_to_thread): Moved to "common/common-gdbthread.h".
5987
5988 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5989
5990 * Makefile.in (SFILES): Add "common/job-control.c".
5991 (HFILES_NO_SRCDIR): Add "common/job-control.h".
5992 (COMMON_OBS): Add "job-control.o".
5993 * common/job-control.c: New file, with contents from
5994 "gdb/inflow.c".
5995 * common/job-control.h: New file, with contents from "terminal.h".
5996 * fork-child.c: Include "job-control.h".
5997 * inflow.c: Include "job-control.h".
5998 (gdb_setpgid): Move to "common/common-inflow.c".
5999 (_initialize_inflow): Move setting of "job_control" to
6000 "handle_job_control".
6001 * terminal.h (job_control): Moved to "common/common-terminal.h".
6002 (gdb_setpgid): Likewise.
6003 * top.c: Include "job_control.h".
6004 * utils.c: Likewise.
6005 (job_control): Moved to "job-control.c".
6006
6007 2017-06-07 Pedro Alves <palves@redhat.com>
6008
6009 * Makefile.in (SFILES): Add gdb_regex.c.
6010 (COMMON_OBS): Add gdb_regex.o.
6011 * ada-lang.c (ada_add_standard_exceptions)
6012 (ada_add_exceptions_from_frame, name_matches_regex)
6013 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
6014 parameter type to compiled_regex. Adjust.
6015 (ada_exceptions_list): Use compiled_regex.
6016 * break-catch-throw.c (exception_catchpoint::pattern): Now a
6017 std::unique_ptr<compiled_regex>.
6018 (exception_catchpoint::~exception_catchpoint): Remove regfree
6019 call.
6020 (check_status_exception_catchpoint): Adjust to use compiled_regex.
6021 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
6022 * breakpoint.c (solib_catchpoint::compiled): Now a
6023 std::unique_ptr<compiled_regex>.
6024 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
6025 (check_status_catch_solib): Adjust to use compiled_regex.
6026 (add_solib_catchpoint): Adjust to use compiled_regex.
6027 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
6028 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
6029 compiled_regex reference. Adjust to use it.
6030 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
6031 declaration. Include "gdb_regex.h".
6032 (apropos_cmd): Change regex parameter to compiled_regex reference.
6033 * gdb_regex.c: New file.
6034 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
6035 declarations.
6036 (class compiled_regex): New.
6037 * linux-tdep.c: Include "common/gdb_optional.h".
6038 (struct mapping_regexes): New, factored out from
6039 mapping_is_anonymous_p, and adjusted to use compiled_regex.
6040 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
6041 gdb::optional and remove cleanups. Adjust to compiled_regex.
6042 * probe.c: Include "common/gdb_optional.h".
6043 (collect_probes): Use compiled_regex and gdb::optional and remove
6044 cleanups.
6045 * skip.c: Include "common/gdb_optional.h".
6046 (skiplist_entry::compiled_function_regexp): Now a
6047 gdb::optional<compiled_regex>.
6048 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
6049 (free_skiplist_entry): Remove regfree call.
6050 (compile_skip_regexp, skip_rfunction_p): Adjust to use
6051 compiled_regex and gdb::optional.
6052 * symtab.c: Include "common/gdb_optional.h".
6053 (search_symbols): Use compiled_regex and gdb::optional.
6054 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
6055 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
6056 to gdb_regex.c.
6057
6058 2017-06-07 Alan Hayward <alan.hayward@arm.com>
6059
6060 * regcache.c (regcache::save): Avoid buffer use.
6061 (regcache::dump): Likewise.
6062
6063 2017-06-07 Alan Hayward <alan.hayward@arm.com>
6064
6065 * sh-tdep.c (sh_pseudo_register_read): Remove
6066 MAX_REGISTER_SIZE.
6067 (sh_pseudo_register_write): Likewise.
6068 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
6069 (sh64_pseudo_register_write): Likewise
6070
6071 2017-06-07 Alan Hayward <alan.hayward@arm.com>
6072
6073 * aarch64-tdep.c (aarch64_store_return_value): Use
6074 V_REGISTER_SIZE.
6075 (aarch64_pseudo_read_value): Likewise.
6076 (aarch64_pseudo_write): Likewise.
6077
6078 2017-06-06 Yao Qi <yao.qi@linaro.org>
6079
6080 * regformats/regdef.h (set_register_cache): Remove the
6081 declaration.
6082
6083 2017-06-06 Alan Hayward <alan.hayward@arm.com>
6084
6085 * frame.c (frame_unwind_register_signed): Use
6086 frame_unwind_register_value.
6087
6088 2017-06-06 Pedro Alves <palves@redhat.com>
6089
6090 PR breakpoints/21553
6091 * breakpoint.c (create_breakpoints_sal_default)
6092 (init_breakpoint_sal, create_breakpoint_sal): Use
6093 gdb::unique_xmalloc_ptr for string parameters.
6094 (create_breakpoint): Constify 'extra_string' and 'cond_string'
6095 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
6096 (base_breakpoint_create_breakpoints_sal)
6097 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
6098 (strace_marker_create_breakpoints_sal)
6099 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
6100 string parameters.
6101 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
6102 gdb::unique_xmalloc_ptr for string parameters.
6103 (create_breakpoint): Constify 'extra_string' and 'cond_string'
6104 parameters.
6105
6106 2017-06-06 Alan Hayward <alan.hayward@arm.com>
6107
6108 * alpha-tdep.c (alpha_register_to_value): Use
6109 get_frame_register_value.
6110 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
6111
6112 2017-06-06 Alan Hayward <alan.hayward@arm.com>
6113
6114 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
6115 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
6116 (ia64_value_to_register): Likewise.
6117 (ia64_extract_return_value): Likewise.
6118 (ia64_store_return_value): Likewise.
6119 (ia64_push_dummy_call): Likewise.
6120
6121 2017-06-04 Joel Brobecker <brobecker@adacore.com>
6122
6123 GDB 8.0 released.
6124
6125 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
6126
6127 * x86-linux-nat.c (struct arch_lwp_info): Remove.
6128
6129 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
6130
6131 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
6132 parameter.
6133 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
6134
6135 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
6136
6137 * event-loop.c (poll_timers): Unallocate timer using delete
6138 instead of xfree.
6139
6140 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6141
6142 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
6143 (struct breakpoint) <~breakpoint>: New.
6144 (struct watchpoint): Inherit from breakpoint.
6145 <~watchpoint>: New.
6146 <base>: Remove.
6147 (struct tracepoint): Inherit from breakpoint.
6148 <base>: Remove.
6149 * breakpoint.c (longjmp_breakpoint_ops): Remove.
6150 (struct longjmp_breakpoint): Inherit from breakpoint.
6151 <~longjmp_breakpoint>: New.
6152 <base>: Remove.
6153 (new_breakpoint_from_type): Remove casts.
6154 (watchpoint_in_thread_scope): Remove reference to base field.
6155 (watchpoint_del_at_next_stop): Likewise.
6156 (update_watchpoint): Likewise.
6157 (watchpoint_check): Likewise.
6158 (bpstat_check_watchpoint): Likewise.
6159 (set_longjmp_breakpoint): Likewise.
6160 (struct fork_catchpoint): Inherit from breakpoint.
6161 <base>: Remove.
6162 (struct solib_catchpoint): Inherit from breakpoint.
6163 <~solib_catchpoint>: New.
6164 <base>: Remove.
6165 (dtor_catch_solib): Change to ...
6166 (solib_catchpoint::~solib_catchpoint): ... this.
6167 (breakpoint_hit_catch_solib): Remove reference to base field.
6168 (add_solib_catchpoint): Likewise.
6169 (create_fork_vfork_event_catchpoint): Likewise.
6170 (struct exec_catchpoint): Inherit from breakpoint.
6171 <~exec_catchpoint>: New.
6172 <base>: Remove.
6173 (dtor_catch_exec): Change to ...
6174 (exec_catchpoint::~exec_catchpoint): ... this.
6175 (dtor_watchpoint): Change to ...
6176 (watchpoint::~watchpoint): ... this.
6177 (watch_command_1): Remove reference to base field.
6178 (catch_exec_command_1): Likewise.
6179 (base_breakpoint_dtor): Change to ...
6180 (breakpoint::~breakpoint): ... this.
6181 (base_breakpoint_ops): Remove dtor field value.
6182 (longjmp_bkpt_dtor): Change to ...
6183 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
6184 (strace_marker_create_breakpoints_sal): Remove reference to base
6185 field.
6186 (delete_breakpoint): Don't manually call breakpoint destructor.
6187 (create_tracepoint_from_upload): Remove reference to base field.
6188 (trace_pass_set_count): Likewise.
6189 (initialize_breakpoint_ops): Don't initialize
6190 momentary_breakpoint_ops, don't set dtors.
6191 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6192 <~ada_catchpoint>: New.
6193 <base>: Remove.
6194 (create_excep_cond_exprs): Remove reference to base field.
6195 (dtor_exception): Change to ...
6196 (ada_catchpoint::~ada_catchpoint): ... this.
6197 (dtor_catch_exception): Remove.
6198 (dtor_catch_exception_unhandled): Remove.
6199 (dtor_catch_assert): Remove.
6200 (create_ada_exception_catchpoint): Remove reference to base
6201 field.
6202 (initialize_ada_catchpoint_ops): Don't set dtors.
6203 * break-catch-sig.c (struct signal_catchpoint): Inherit from
6204 breakpoint.
6205 <~signal_catchpoint>: New.
6206 <base>: Remove.
6207 (signal_catchpoint_dtor): Change to ...
6208 (signal_catchpoint::~signal_catchpoint): ... this.
6209 (create_signal_catchpoint): Remove reference to base field.
6210 (initialize_signal_catchpoint_ops): Don't set dtor.
6211 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6212 from breakpoint.
6213 <~syscall_catchpoint>: New.
6214 <base>: Remove.
6215 (dtor_catch_syscall): Change to ...
6216 (syscall_catchpoint::~syscall_catchpoint): ... this.
6217 (create_syscall_event_catchpoint): Remove reference to base
6218 field.
6219 (initialize_syscall_catchpoint_ops): Don't set dtor.
6220 * break-catch-throw.c (struct exception_catchpoint): Inherit
6221 from breakpoint.
6222 <~exception_catchpoint>: New.
6223 <base>: Remove.
6224 (dtor_exception_catchpoint): Change to ...
6225 (exception_catchpoint::~exception_catchpoint): ... this.
6226 (handle_gnu_v3_exceptions): Remove reference to base field.
6227 (initialize_throw_catchpoint_ops): Don't set dtor.
6228 * ctf.c (ctf_get_traceframe_address): Remove reference to base
6229 field.
6230 * remote.c (remote_get_tracepoint_status): Likewise.
6231 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6232 * tracefile.c (tracefile_fetch_registers): Likewise.
6233 * tracepoint.c (actions_command): Likewise.
6234 (validate_actionline): Likewise.
6235 (tfind_1): Likewise.
6236 (get_traceframe_location): Likewise.
6237 (find_matching_tracepoint_location): Likewise.
6238 (parse_tracepoint_status): Likewise.
6239 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6240
6241 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6242
6243 * breakpoint.c (struct longjmp_breakpoint): New struct.
6244 (is_tracepoint_type): Change return type to bool.
6245 (is_longjmp_type): New function.
6246 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6247 (set_raw_breakpoint_without_location): Use
6248 new_breakpoint_from_type.
6249 (set_raw_breakpoint): Likewise.
6250
6251 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6252
6253 * breakpoint.c (new_breakpoint_from_type): New function.
6254 (create_breakpoint_sal): Use new_breakpoint_from_type and
6255 unique_ptr.
6256 (create_breakpoint): Likewise.
6257
6258 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
6259
6260 * memattr.c (mem_info_command): Rename to ...
6261 (info_mem_command): ... this.
6262 (mem_enable_command): Rename to ...
6263 (enable_mem_command): ... this.
6264 (mem_disable_command): Rename to ...
6265 (disable_mem_command): ... this.
6266 (mem_delete_command): Rename to ...
6267 (delete_mem_command): ... this.
6268 (_initialize_mem): Adjust function names.
6269
6270 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6271
6272 * btrace.c (handle_pt_insn_events): New.
6273 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
6274 STATUS. Split into this and ...
6275 (handle_pt_insn_event_flags): ... this.
6276
6277 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6278
6279 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
6280 and struct pt_insn.resynced.
6281 * configure: Regenerated.
6282 * config.in: Regenerated.
6283
6284 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6285
6286 * btrace.c (ftrace_find_call_by_number): New function.
6287 (ftrace_new_function): Store objects, not pointers.
6288 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
6289 ftrace_new_gap, ftrace_update_function,
6290 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
6291 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
6292 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
6293 btrace_ends_with_single_insn, btrace_call_get): Account for
6294 btrace_thread_info::functions now storing objects.
6295 * btrace.h (struct btrace_thread_info): Add constructor.
6296 (struct btrace_thread_info) <functions>: Make std::vector.
6297 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
6298 Initialize with default values.
6299 * record-btrace.c (record_btrace_frame_sniffer): Account for
6300 btrace_thread_info::functions now storing objects.
6301
6302 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6303
6304 * btrace.c: Remove typedef bfun_s.
6305 (ftrace_new_gap): Directly add gaps to the list of gaps.
6306 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
6307 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
6308 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
6309 instead of gdb VEC.
6310
6311 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6312
6313 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
6314 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
6315 with btrace_thread_info::next_segment and
6316 btrace_thread_info::prev_segment.
6317 * btrace.h: Remove struct btrace_func_link.
6318 (struct btrace_function): Replace pair of function segment pointers
6319 with pair of indices.
6320 * python/py-record-btrace.c (btpy_call_prev_sibling,
6321 btpy_call_next_sibling): Replace references to
6322 btrace_thread_info::segment with btrace_thread_info::next_segment and
6323 btrace_thread_info::prev_segment.
6324 * record-btrace.c (record_btrace_frame_this_id): Use
6325 btrace_find_call_by_number.
6326
6327 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6328
6329 * btrace.c (ftrace_new_function, ftrace_fixup_level,
6330 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6331 btrace_insn_next, btrace_insn_prev): Remove references to
6332 btrace_thread_info::flow.
6333 * btrace.h (struct btrace_function): Remove FLOW.
6334
6335 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6336
6337 * btrace.c (ftrace_find_call_by_number): New function.
6338 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6339 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6340 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6341 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6342 index.
6343 * btrace.h (struct btrace_function): Turn UP into an index.
6344 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6345 as an index.
6346 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6347 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6348 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6349
6350 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6351
6352 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6353 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6354 ftrace_update_function, ftrace_compute_global_level_offset,
6355 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6356 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6357 btrace_insn_end, btrace_is_empty): Remove references to
6358 btrace_thread_info::begin and btrace_thread_info::end.
6359 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6360 (struct btrace_thread_info) <functions>: Adjust comment.
6361 * record-btrace.c (record_btrace_start_replaying): Remove reference to
6362 btrace_thread_info::begin.
6363
6364 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6365
6366 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6367 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6368 ftrace_update_function): Remove arguments that implicitly were always
6369 BTINFO->END.
6370 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6371 Don't pass BTINFO->END.
6372
6373 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6374
6375 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6376 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6377 btrace_find_insn_by_number): Replace function segment pointer with
6378 index.
6379 (btrace_insn_cmp): Simplify.
6380 * btrace.h: (struct btrace_insn_iterator) Rename index to
6381 insn_index. Replace function segment pointer with index into function
6382 segment vector.
6383 * record-btrace.c (record_btrace_call_history): Replace function
6384 segment pointer use with index.
6385 (record_btrace_frame_sniffer): Retrieve function call segment through
6386 vector.
6387 (record_btrace_set_replay): Remove defunc't safety check.
6388
6389 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6390
6391 * btrace.c (btrace_ends_with_single_insn): New function.
6392 (btrace_call_get, btrace_call_number, btrace_call_begin,
6393 btrace_call_end, btrace_call_next, btrace_call_prev,
6394 btrace_find_call_by_number): Use index into call segment vector
6395 instead of pointer.
6396 (btrace_call_cmp): Simplify.
6397 * btrace.h (struct btrace_call_iterator): Replace function call segment
6398 pointer with index into vector.
6399 * record-btrace.c (record_btrace_call_history): Use index instead of
6400 pointer.
6401
6402 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6403
6404 * btrace.c (btrace_insn_begin, btrace_insn_end,
6405 btrace_find_insn_by_number): Add btinfo to iterator.
6406 * btrace.h (struct btrace_insn_iterator): Add btinfo.
6407
6408 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6409
6410 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
6411 and save pointers directly.
6412 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
6413 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
6414 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
6415 changed signature of functions.
6416 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
6417 (btrace_fetch): Remove code that adds btrace_function pointers to
6418 vector of btrace_functions.
6419 (btrace_clear): Simplify freeing vector of btrace_functions.
6420
6421 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6422
6423 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
6424 Replace VEC_* with std::vector functions.
6425 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
6426 (struct btrace_thread_info)<functions>: Change type to std::vector.
6427
6428 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
6429
6430 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
6431 "Removed targets and native configurations" up. Merge duplicate
6432 "New commands" sub-sections. Add "New options" sub-sections.
6433
6434 2017-05-26 Alan Hayward <alan.hayward@arm.com>
6435
6436 * defs.h (copy_integer_to_size): New declaration.
6437 * findvar.c (copy_integer_to_size): New function.
6438 (do_cint_test): New selftest function.
6439 (copy_integer_to_size_test): Likewise.
6440 (_initialize_findvar): Likewise.
6441 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
6442 (mips_fbsd_collect_reg): Use raw_collect_integer.
6443 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
6444 (mips64_fill_gregset): Use raw_collect_integer
6445 (mips64_fill_fpregset): Use raw_supply_integer.
6446 * regcache.c (regcache::raw_supply_integer): New function.
6447 (regcache::raw_collect_integer): Likewise.
6448 * regcache.h: (regcache::raw_supply_integer): New declaration.
6449 (regcache::raw_collect_integer): Likewise.
6450
6451 2017-05-24 Yao Qi <yao.qi@linaro.org>
6452
6453 * Makefile.in (SFILES): Add gdbarch-selftests.c.
6454 (COMMON_OBS): Add gdbarch-selftests.o.
6455 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
6456 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
6457 * gdbarch-selftests.c: New file.
6458 * regcache.h (regcache) <~regcache>: Mark it virtual if
6459 GDB_SELF_TEST.
6460 <raw_write>: Likewise.
6461
6462 2017-05-24 Yao Qi <yao.qi@linaro.org>
6463
6464 * regcache.c (current_regcache): Change it to
6465 regcache::current_regcache.
6466 (regcache_observer_target_changed): Update.
6467 (regcache_thread_ptid_changed): Make it a regcache static
6468 method.
6469 (regcache_thread_ptid_changed): Update.
6470 (class regcache_access): New.
6471 (current_regcache_test): Update.
6472 (_initialize_regcache): Update.
6473 * regcache.h: Include forward_list.
6474 (regcache): Declare regcache_thread_ptid_changed and declare
6475 registers_changed_ptid as friend.
6476
6477 2017-05-24 Yao Qi <yao.qi@linaro.org>
6478
6479 * i387-tdep.c (i387_register_to_value): Use register_size
6480 instead of TYPE_LENGTH.
6481 * m68k-tdep.c (m68k_register_to_value): Likewise.
6482
6483 2017-05-24 Yao Qi <yao.qi@linaro.org>
6484
6485 * i387-tdep.c (i387_convert_register_p): Return false if type
6486 code isn't TYPE_CODE_FLT.
6487
6488 2017-05-24 Yao Qi <yao.qi@linaro.org>
6489
6490 * alpha-tdep.c (alpha_convert_register_p): Return true if type
6491 length is 4.
6492 (alpha_register_to_value): Remove type length check.
6493 (alpha_value_to_register): Likewise.
6494
6495 2017-05-24 Yao Qi <yao.qi@linaro.org>
6496
6497 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
6498 TYPE_CODE_FLT.
6499
6500 2017-05-24 Yao Qi <yao.qi@linaro.org>
6501
6502 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
6503 TYPE_CODE_FLT or not.
6504
6505 2017-05-24 Yao Qi <yao.qi@linaro.org>
6506
6507 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
6508 * avr-tdep.c (avr_gdbarch_init): Likewise.
6509 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6510 * cris-tdep.c (cris_gdbarch_init): Likewise.
6511 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6512 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6513 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6514 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
6515 * mep-tdep.c (mep_gdbarch_init): Likewise.
6516 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6517 * mips-tdep.c (mips_gdbarch_init): Likewise.
6518 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6519 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6520 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6521 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6522 * v850-tdep.c (v850_gdbarch_init): Likewise.
6523
6524 2017-05-24 Yao Qi <yao.qi@linaro.org>
6525
6526 * selftest-arch.c (tests_with_arch): Call registers_changed
6527 and reinit_frame_cache.
6528 * selftest.c (run_self_tests): Likewise.
6529
6530 2017-05-24 Yao Qi <yao.qi@linaro.org>
6531
6532 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
6533 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
6534
6535 2017-05-24 Yao Qi <yao.qi@linaro.org>
6536
6537 * rl78-tdep.c (rl78_gdbarch_init): Don't call
6538 set_gdbarch_print_insn.
6539
6540 2017-05-24 Yao Qi <yao.qi@linaro.org>
6541
6542 * h8300-tdep.c (h8300_gdbarch_init): Don't call
6543 set_gdbarch_print_insn.
6544
6545 2017-05-24 Yao Qi <yao.qi@linaro.org>
6546
6547 * alpha-tdep.c (alpha_gdbarch_init): Don't call
6548 set_gdbarch_print_insn.
6549 * arc-tdep.c (arc_gdbarch_init): Likewise.
6550 * arch-utils.c: include dis-asm.h.
6551 (default_print_insn): New function.
6552 * arch-utils.h (default_print_insn): Declare.
6553 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
6554 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6555 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
6556 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
6557 * frv-tdep.c (frv_gdbarch_init): Likewise.
6558 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6559 * gdbarch.sh (print_insn): Use default_print_insn.
6560 * gdbarch.c: Regenerated.
6561 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
6562 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
6563 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6564 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
6565 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6566 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
6567 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
6568 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
6569 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
6570 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6571 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6572 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6573 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6574 * mt-tdep.c (mt_gdbarch_init): Likewise.
6575 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6576 * nios2-tdep.c (nios2_print_insn): Remove.
6577 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
6578 * rx-tdep.c (rx_gdbarch_init): Likewise.
6579 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6580 * score-tdep.c (score_print_insn): Remove.
6581 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
6582 * sh-tdep.c (sh_gdbarch_init): Likewise.
6583 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6584 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6585 * tic6x-tdep.c (tic6x_print_insn): Remove.
6586 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
6587 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
6588 * v850-tdep.c (v850_gdbarch_init): Likewise.
6589 * vax-tdep.c (vax_gdbarch_init): Likewise.
6590 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6591 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
6592
6593 2017-05-23 John Baldwin <jhb@FreeBSD.org>
6594
6595 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
6596 (MIPS_FP0_REGNUM): Remove.
6597 (MIPS_FSR_REGNUM): Remove.
6598 (mips_fbsd_supply_fpregs): Use mips_regnum.
6599 (mips_fbsd_supply_gregs): Likewise.
6600 (mips_fbsd_collect_fpregs): Likewise.
6601 (mips_fbsd_collect_gregs): Likewise.
6602
6603 2017-05-23 John Baldwin <jhb@FreeBSD.org>
6604
6605 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
6606 (getpfpregs_supplies): New function.
6607 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
6608 getfpregs_supplies.
6609 (mips_fbsd_store_inferior_registers): Likewise.
6610
6611 2017-05-22 Pedro Alves <palves@redhat.com>
6612
6613 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
6614 maintainer.
6615
6616 2017-05-22 Alan Hayward <alan.hayward@arm.com>
6617
6618 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
6619 (store_register): Likewise.
6620 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
6621 (get_decimal_float_return_value): Likewise.
6622 (do_ppc_sysv_return_value): Likewise.
6623 (ppc64_sysv_abi_push_integer): Likewise.
6624 (ppc64_sysv_abi_push_freg): Likewise.
6625 (ppc64_sysv_abi_return_value_base): Likewise.
6626 (ppc64_sysv_abi_return_value): Likewise.
6627 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
6628 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
6629 * rs6000-nat.c: Likewise.
6630 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
6631 (rs6000_value_to_register): Likewise.
6632 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
6633
6634 2017-05-21 Tom Tromey <tom@tromey.com>
6635
6636 PR rust/21466:
6637 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
6638 arrays as "[T]", not "[T; ]".
6639
6640 2017-05-19 Tom Tromey <tom@tromey.com>
6641
6642 PR rust/21484:
6643 * rust-lang.c (exp_descriptor_rust): New function.
6644 (rust_language_defn): Use it.
6645 * p-lang.c (pascal_language_defn): Update.
6646 * opencl-lang.c (opencl_language_defn): Update.
6647 * objc-lang.c (objc_language_defn): Update.
6648 * m2-lang.c (m2_language_defn): Update.
6649 * language.h (struct language_defn)
6650 <la_watch_location_expression>: New member.
6651 * language.c (unknown_language_defn, auto_language_defn)
6652 (local_language_defn): Update.
6653 * go-lang.c (go_language_defn): Update.
6654 * f-lang.c (f_language_defn): Update.
6655 * d-lang.c (d_language_defn): Update.
6656 * c-lang.h (c_watch_location_expression): Declare.
6657 * c-lang.c (c_watch_location_expression): New function.
6658 (c_language_defn, cplus_language_defn, asm_language_defn)
6659 (minimal_language_defn): Use it.
6660 * breakpoint.c (watch_command_1): Call
6661 la_watch_location_expression.
6662 * ada-lang.c (ada_language_defn): Update.
6663
6664 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6665
6666 PR tui/21482
6667 * gdb_curses.h (NOMACROS): Define.
6668 (NCURSES_NOMACROS): Define.
6669
6670 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6671
6672 PR tui/21482
6673 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
6674 arg to char *.
6675 * tui/tui-wingeneral.c (box_win): Likewise.
6676 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
6677 (tui_show_source_line): Likewise.
6678 (tui_show_exec_info_content): Likewise.
6679
6680 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6681
6682 * sparc-tdep.c (sparc_structure_return_p)
6683 (sparc_arg_on_registers_p): New functions.
6684 (sparc32_store_arguments): Use them.
6685 * sparc64-tdep.c (sparc64_16_byte_align_p)
6686 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
6687 Handle TYPE_CODE_ARRAY.
6688
6689 2017-05-17 Yao Qi <yao.qi@linaro.org>
6690
6691 * cli/cli-decode.c (add_alias_cmd): New function.
6692 * command.h (add_alias_cmd): Declare.
6693 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
6694 instead call add_alias_cmd.
6695
6696 2017-05-17 Pedro Alves <palves@redhat.com>
6697
6698 * Makefile.in (nat_extra_makefile_frag): Rename to ...
6699 (nat_makefile_frag): ... this. All references updated.
6700 * configure.ac: Likewise.
6701 * configure.nat: Likewise. Enhance comments.
6702 * configure: Regenerate.
6703
6704 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6705
6706 * procfs.c (procfs_create_inferior): Change prototype to match
6707 definition.
6708
6709 2017-05-13 Eli Zaretskii <eliz@gnu.org>
6710
6711 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
6712 C++ compiler warning.
6713
6714 2017-05-12 Tom Tromey <tom@tromey.com>
6715
6716 PR rust/21483:
6717 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
6718 recurse, just call value_struct_elt directly.
6719
6720 2017-05-12 Tom Tromey <tom@tromey.com>
6721
6722 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
6723 OP_RUST_ARRAY>: Fix.
6724
6725 2017-05-12 Tom Tromey <tom@tromey.com>
6726
6727 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
6728
6729 2017-05-09 Yao Qi <yao.qi@linaro.org>
6730
6731 * regcache.c: Include <forward_list>.
6732 (struct regcache_list): Remove.
6733 (current_regcache): Update.
6734 (get_thread_arch_aspace_regcache): Update for std::forward_list.
6735 (regcache_thread_ptid_changed): Likewise.
6736 (registers_changed_ptid): Likewise.
6737 (current_regcache_size): Likewise.
6738
6739 2017-05-09 Yao Qi <yao.qi@linaro.org>
6740
6741 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
6742 (current_regcache_size): New function.
6743 (current_regcache_test): New function.
6744 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
6745
6746 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6747
6748 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
6749 (print_gp_register_row): Use get_frame_register_value.
6750
6751 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6752
6753 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
6754 (mips_supply_fpregset): Likewise.
6755 (mips64_supply_gregset): Likewise.
6756
6757 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6758
6759 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
6760 regcache->raw_supply_zeroed.
6761
6762 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6763
6764 * configure.nat: Rearrange 'case' statements to match
6765 host before cpu.
6766
6767 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6768
6769 * Makefile.in: Remove "@host_makefile_frag@". Add variables
6770 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
6771 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
6772 "@nat_extra_makefile_frag@".
6773 (Makefile): Remove dependency on "@frags@".
6774 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
6775 (data-directory/Makefile): Likewise.
6776 * config/aarch64/linux.mh: Deleted; moved contents to
6777 "gdb/configure.nat".
6778 * config/alpha/alpha-linux.mh: Likewise.
6779 * config/alpha/nbsd.mh: Likewise.
6780 * config/arm/linux.mh: Likewise.
6781 * config/arm/nbsdelf.mh: Likewise.
6782 * config/i386/cygwin.mh: Likewise.
6783 * config/i386/cygwin64.mh: Likewise.
6784 * config/i386/darwin.mh: Likewise.
6785 * config/i386/fbsd.mh: Likewise.
6786 * config/i386/fbsd64.mh: Likewise.
6787 * config/i386/go32.mh: Likewise.
6788 * config/i386/i386gnu.mh: Likewise.
6789 * config/i386/i386sol2.mh: Likewise.
6790 * config/i386/linux.mh: Likewise.
6791 * config/i386/linux64.mh: Likewise.
6792 * config/i386/mingw.mh: Likewise.
6793 * config/i386/mingw64.mh: Likewise.
6794 * config/i386/nbsd64.mh: Likewise.
6795 * config/i386/nbsdelf.mh: Likewise.
6796 * config/i386/nto.mh: Likewise.
6797 * config/i386/obsd.mh: Likewise.
6798 * config/i386/obsd64.mh: Likewise.
6799 * config/i386/sol2-64.mh: Likewise.
6800 * config/ia64/linux.mh: Likewise.
6801 * config/m32r/linux.mh: Likewise.
6802 * config/m68k/linux.mh: Likewise.
6803 * config/m68k/nbsdelf.mh: Likewise.
6804 * config/m68k/obsd.mh: Likewise.
6805 * config/m88k/obsd.mh: Likewise.
6806 * config/mips/fbsd.mh: Likewise.
6807 * config/mips/linux.mh: Likewise.
6808 * config/mips/nbsd.mh: Likewise.
6809 * config/mips/obsd64.mh: Likewise.
6810 * config/pa/linux.mh: Likewise.
6811 * config/pa/nbsd.mh: Likewise.
6812 * config/pa/obsd.mh: Likewise.
6813 * config/powerpc/aix.mh: Likewise.
6814 * config/powerpc/fbsd.mh: Likewise.
6815 * config/powerpc/linux.mh: Likewise.
6816 * config/powerpc/nbsd.mh: Likewise.
6817 * config/powerpc/obsd.mh: Likewise.
6818 * config/powerpc/ppc64-linux.mh: Likewise.
6819 * config/powerpc/spu-linux.mh: Likewise.
6820 * config/s390/linux.mh: Likewise.
6821 * config/sh/nbsd.mh: Likewise.
6822 * config/sparc/fbsd.mh: Likewise.
6823 * config/sparc/linux.mh: Likewise.
6824 * config/sparc/linux64.mh: Likewise.
6825 * config/sparc/nbsd64.mh: Likewise.
6826 * config/sparc/nbsdelf.mh: Likewise.
6827 * config/sparc/obsd64.mh: Likewise.
6828 * config/sparc/sol2.mh: Likewise.
6829 * config/tilegx/linux.mh: Likewise.
6830 * config/vax/nbsdelf.mh: Likewise.
6831 * config/vax/obsd.mh: Likewise.
6832 * config/xtensa/linux.mh: Likewise.
6833 * config/i386/i386gnu.mn: New file, with excerpts from
6834 "config/i386/i386gnu.mh".
6835 * configure: Regenerate.
6836 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6837 *.mh files under "gdb/config".
6838 * configure.nat: New file, with contents from the
6839 "gdb/config/*/*.mh" files.
6840
6841 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
6842
6843 * btrace.c (btrace_clear): Free insn vector.
6844
6845 2017-05-05 Pedro Alves <palves@redhat.com>
6846
6847 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6848 * configure: Regenerate.
6849
6850 2017-05-04 Pedro Alves <palves@redhat.com>
6851
6852 * Makefile.in (SFILES): Add progspace-and-thread.c.
6853 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6854 (COMMON_OBS): Add progspace-and-thread.o.
6855 * breakpoint.c: Include "progspace-and-thread.h".
6856 (update_inserted_breakpoint_locations)
6857 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6858 Use scoped_restore_current_pspace_and_thread.
6859 (create_std_terminate_master_breakpoint): Use
6860 scoped_restore_current_program_space.
6861 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6862 (print_breakpoint_location): Use
6863 scoped_restore_current_program_space.
6864 (bp_loc_is_permanent): Use
6865 scoped_restore_current_pspace_and_thread.
6866 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6867 (download_tracepoint_locations): Use
6868 scoped_restore_current_pspace_and_thread.
6869 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6870 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6871 (enum step_over_calls_kind): Moved from inferior.h.
6872 (class scoped_restore_current_thread): New class.
6873 * gdbthread.h (make_cleanup_restore_current_thread): Delete
6874 declaration.
6875 (scoped_restore_current_thread): New class.
6876 * infcmd.c: Include "common/gdb_optional.h".
6877 (continue_1, proceed_after_attach): Use
6878 scoped_restore_current_thread.
6879 (notice_new_inferior): Use scoped_restore_current_thread.
6880 * inferior.c: Include "progspace-and-thread.h".
6881 (restore_inferior, save_current_inferior): Delete.
6882 (add_inferior_command, clone_inferior_command): Use
6883 scoped_restore_current_pspace_and_thread.
6884 * inferior.h (scoped_restore_current_inferior): New class.
6885 * infrun.c: Include "progspace-and-thread.h" and
6886 "common/gdb_optional.h".
6887 (follow_fork_inferior): Use
6888 scoped_restore_current_pspace_and_thread.
6889 (scoped_restore_exited_inferior): New class.
6890 (handle_vfork_child_exec_or_exit): Use
6891 scoped_restore_exited_inferior,
6892 scoped_restore_current_pspace_and_thread,
6893 scoped_restore_current_thread and scoped_restore.
6894 (fetch_inferior_event): Use scoped_restore_current_thread.
6895 * linespec.c (decode_line_full, decode_line_1): Use
6896 scoped_restore_current_program_space.
6897 * mi/mi-main.c: Include "progspace-and-thread.h".
6898 (exec_continue): Use scoped_restore_current_thread.
6899 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6900 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6901 * proc-service.c (ps_pglobal_lookup): Use
6902 scoped_restore_current_program_space.
6903 * progspace-and-thread.c: New file.
6904 * progspace-and-thread.h: New file.
6905 * progspace.c (release_program_space, clone_program_space): Use
6906 scoped_restore_current_program_space.
6907 (restore_program_space, save_current_program_space)
6908 (save_current_space_and_thread): Delete.
6909 (switch_to_program_space_and_thread): Moved to
6910 progspace-and-thread.c.
6911 * progspace.h (save_current_program_space)
6912 (save_current_space_and_thread): Delete declarations.
6913 (scoped_restore_current_program_space): New class.
6914 * remote.c (remote_btrace_maybe_reopen): Use
6915 scoped_restore_current_thread.
6916 * symtab.c: Include "progspace-and-thread.h".
6917 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
6918 * thread.c (print_thread_info_1): Use
6919 scoped_restore_current_thread.
6920 (struct current_thread_cleanup): Delete.
6921 (do_restore_current_thread_cleanup)
6922 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
6923 (scoped_restore_current_thread::~scoped_restore_current_thread):
6924 ... this new dtor.
6925 (make_cleanup_restore_current_thread): Rename/convert to ...
6926 (scoped_restore_current_thread::scoped_restore_current_thread):
6927 ... this new ctor.
6928 (thread_apply_all_command): Use scoped_restore_current_thread.
6929 (thread_apply_command): Use scoped_restore_current_thread.
6930 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
6931 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
6932
6933 2017-05-04 Pedro Alves <palves@redhat.com>
6934
6935 * thread.c (make_cleanup_restore_current_thread): Move
6936 find_thread_ptid call before the is_stopped call. Assert that the
6937 thread is found. Replace is_stopped call by checking the thread's
6938 state directly. Remove unnecessary NULL-thread check.
6939
6940 2017-05-04 Pedro Alves <palves@redhat.com>
6941
6942 * corelow.c (thread_section_name): New class.
6943 (get_core_register_section, get_core_siginfo): Use it.
6944
6945 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
6946
6947 * corelow.c (sniff_core_bfd): Remove extra semicolon.
6948 (get_core_register_section): Remove xfree of NULL pointer.
6949
6950 2017-05-03 Alan Hayward <alan.hayward@arm.com>
6951
6952 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
6953 * regcache.c (regcache::raw_supply_zeroed): New function.
6954 * regcache.h (regcache::raw_supply_zeroed): New declaration.
6955
6956 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
6957
6958 * gdbarch.sh: Remove commented out definition of
6959 TARGET_CHAR_BIT.
6960 * gdbarch.h: Re-generate.
6961
6962 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6963
6964 * configure: Regenerate.
6965
6966 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
6967
6968 * solib-target.c (solib_target_relocate_section_addresses):
6969 Remove num_section_bases, num_bases, segment_bases variables.
6970
6971 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6972
6973 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
6974
6975 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6976
6977 * solib-target.c: Include <vector>
6978 (struct lm_info_target) <~lm_info_target>: Remove.
6979 <segment_bases, section_bases>: Change type to
6980 std::vector<CORE_ADDR>.
6981 (library_list_start_segment, library_list_start_section,
6982 library_list_end_library,
6983 solib_target_relocate_section_addresses): Adjust.
6984
6985 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6986
6987 * gdbarch.sh (software_single_step): Change return type to
6988 std::vector<CORE_ADDR>.
6989 * gdbarch.c, gdbarch.h: Re-generate.
6990 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
6991 Adjust.
6992 (arm_deal_with_atomic_sequence_raw): Adjust.
6993 (thumb_get_next_pcs_raw): Adjust.
6994 (arm_get_next_pcs_raw): Adjust.
6995 (arm_get_next_pcs): Adjust.
6996 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
6997 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
6998 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
6999 (alpha_software_single_step): Adjust.
7000 * alpha-tdep.h (alpha_software_single_step): Adjust.
7001 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
7002 * arm-tdep.c (arm_software_single_step): Adjust.
7003 (arm_breakpoint_kind_from_current_state): Adjust.
7004 * arm-tdep.h (arm_software_single_step): Adjust.
7005 * breakpoint.c (insert_single_step_breakpoint): Adjust.
7006 * cris-tdep.c (cris_software_single_step): Adjust.
7007 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
7008 (micromips_deal_with_atomic_sequence): Adjust.
7009 (deal_with_atomic_sequence): Adjust.
7010 (mips_software_single_step): Adjust.
7011 * mips-tdep.h (mips_software_single_step): Adjust.
7012 * moxie-tdep.c (moxie_software_single_step): Adjust.
7013 * nios2-tdep.c (nios2_software_single_step): Adjust.
7014 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
7015 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
7016 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
7017 * s390-linux-tdep.c (s390_software_single_step): Adjust.
7018 * sparc-tdep.c (sparc_software_single_step): Adjust.
7019 * spu-tdep.c (spu_software_single_step): Adjust.
7020 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
7021
7022 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7023
7024 * gdbarch.sh: Use semi-colon as field separator instead of colon.
7025 * gdbarch.h: Re-generate.
7026
7027 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7028
7029 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
7030 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
7031 * python/py-instruction.c, python/py-instruction.h: New file.
7032 * python/py-record.c: Add py-instruction.h include.
7033 (gdbpy_initialize_record): Make gdb.Instruction a super class of
7034 gdb.RecordInstruction.
7035 * python/python-internal.h: Add gdbpy_initialize_instruction
7036 declaration.
7037 * python/python.c (do_start_initialization): Add
7038 gdbpy_initialize_instruction.
7039
7040 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7041
7042 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
7043 Remove.
7044 (btrace_func_from_recpy_func): New function.
7045 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
7046 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
7047 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
7048 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
7049 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
7050 Also, use new helper functions.
7051 (btpy_list_item): Use new helper functions.
7052 (recpy_bt_function_call_history): Use new type name.
7053 (btpy_call_getset): Remove.
7054 (gdbpy_initialize_btrace): Remove code to initialize
7055 gdb.BtraceFunctionCall.
7056 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
7057 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
7058 recpy_bt_func_prev, recpy_bt_func_next): New export.
7059 * python/py-record.c (recpy_func_type): New static object.
7060 (recpy_func_new, recpy_func_level, recpy_func_symbol,
7061 recpy_func_instructions, recpy_func_up, recpy_func_prev,
7062 recpy_func_next): New function.
7063 (recpy_element_hash, recpy_element_richcompare): Updated comment.
7064 (recpy_func_getset): New static object.
7065 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
7066 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
7067
7068 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7069
7070 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
7071 (btpy_object, btpy_insn_type, btpy_new): Remove.
7072 (btpy_list_object): Use gdb.RecordInstruction type instead of
7073 gdb.BtraceInstruction type.
7074 (btrace_insn_from_recpy_insn): New function.
7075 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
7076 btpy_new.
7077 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
7078 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
7079 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
7080 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
7081 instead of btpy_object.
7082 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7083 btpy_insn_data, btpy_insn_decode): Rename to ...
7084 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
7085 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
7086 recpy_bt_insn_decode): This. Also, use new helper functions.
7087 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
7088 recpy_insn_type.
7089 (btpy_insn_getset): Remove.
7090 (gdbpy_initialize_btrace): Remove code to initialize
7091 gdb.BtraceInstruction. Use recpy_element_object.
7092 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
7093 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
7094 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
7095 * python/py-record.c (recpy_insn_type): New static object.
7096 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
7097 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
7098 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
7099 New function.
7100 (recpy_insn_getset): New static object.
7101 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
7102 * python/py-record.h (recpy_element_object): New typedef.
7103 (recpy_insn_type, recpy_insn_new): New export.
7104
7105 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7106
7107 * py-record-btrace.c (btpy_insn_new): Removed.
7108 (btpy_insn_or_gap_new): New function.
7109 (btpy_insn_error): Removed.
7110 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7111 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
7112 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
7113 btpy_insn_or_gap_new instead of btpy_insn_new.
7114 (btpy_insn_getset): Remove btpy_insn_error.
7115 * py-record.c (recpy_gap_type): New static object.
7116 (recpy_gap_object): New typedef.
7117 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
7118 recpy_gap_reason_string): New function.
7119 (recpy_gap_getset): New static object.
7120 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
7121 * py-record.h (recpy_gap_new): New export.
7122
7123 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7124
7125 * python/py-record.c (recpy_ptid): Remove.
7126 (recpy_record_getset): Remove recpy_ptid.
7127
7128 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7129
7130 * btrace.c (btrace_fetch): Set inferior_ptid.
7131 * python/py-record-btrace.c: Add "py-record.h" include.
7132 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
7133 recpy_bt_end, recpy_bt_instruction_history,
7134 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
7135 in gdb.Record object instead of current ptid.
7136 * python/py-record.c: Include new "py-record.h" file.
7137 (recpy_record_object): Moved to py-record.h.
7138 * python/py-record.h: New file.
7139
7140 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7141
7142 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
7143 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
7144 indentation.
7145
7146 2017-05-01 Joel Brobecker <brobecker@adacore.com>
7147
7148 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
7149 the past maintainers section.
7150
7151 2017-04-28 Yao Qi <yao.qi@linaro.org>
7152
7153 * infcmd.c (get_return_value): Use regcache ctor, and remove
7154 cleanup.
7155
7156 2017-04-28 Yao Qi <yao.qi@linaro.org>
7157 Pedro Alves <palves@redhat.com>
7158
7159 * regcache.c (regcache::regcache): New tag dispatch ctor.
7160 (do_cooked_read): Moved above.
7161 (regcache_dup): Use the tag dispatch ctor..
7162 * regcache.h (regcache): Declare ctor, delete copy ctor and
7163 assignment operator, remove friend regcache_dup.
7164
7165 2017-04-28 Yao Qi <yao.qi@linaro.org>
7166
7167 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
7168 call method save instead of regcache_cpy.
7169 * regcache.h (struct regcache): Make regcache_dup a friend.
7170
7171 2017-04-28 Yao Qi <yao.qi@linaro.org>
7172
7173 * regcache.c (struct regcache): Move to regcache.h
7174 (regcache::arch): New method.
7175 (regcache_get_ptid): Update.
7176 (get_regcache_arch): Call arch method.
7177 (get_regcache_aspace): Call method aspace.
7178 (register_buffer): Change it to method.
7179 (regcache_save): Change it to regcache::save.
7180 (regcache_restore): Likewise.
7181 (regcache_cpy_no_passthrough): Remove the declaration.
7182 (regcache_cpy): Call methods restore and cpy_no_passthrough.
7183 (regcache_cpy_no_passthrough): Change it to method
7184 cpy_no_passthrough.
7185 (regcache_register_status): Change it to method
7186 get_register_status.
7187 (regcache_invalidate): Change it to method invalidate.
7188 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
7189 (regcache_raw_update): Change it to method raw_update.
7190 (regcache_raw_read): Likewise.
7191 (regcache_raw_read_signed): Likewise.
7192 (regcache_raw_read_unsigned): Likewise.
7193 (regcache_raw_write_signed): Likewise.
7194 (regcache_raw_write_unsigned): Likewise.
7195 (regcache_cooked_read): Likewise.
7196 (regcache_cooked_read_value): Likewise.
7197 (regcache_cooked_read_signed): Likewise.
7198 (regcache_cooked_read_unsigned): Likewise.
7199 (regcache_cooked_write_signed): Likewise.
7200 (regcache_cooked_write_unsigned): Likewise.
7201 (regcache_raw_set_cached_value): Likewise.
7202 (regcache_raw_write): Likewise.
7203 (regcache_cooked_write): Likewise.
7204 (regcache_xfer_part): Likewise.
7205 (regcache_raw_read_part): Likewise.
7206 (regcache_raw_write_part): Likewise.
7207 (regcache_cooked_read_part): Likewise.
7208 (regcache_cooked_write_part): Likewise.
7209 (regcache_raw_supply): Likewise.
7210 (regcache_raw_collect): Likewise.
7211 (regcache_transfer_regset): Likewise.
7212 (regcache_supply_regset): Likewise.
7213 (regcache_collect_regset): Likewise.
7214 (regcache_debug_print_register): Likewise.
7215 (enum regcache_dump_what): Move it to regcache.h.
7216 (regcache_dump): Change it to method dump.
7217 * regcache.h (enum regcache_dump_what): New.
7218 (class regcache): New.
7219 * target.c (target_fetch_registers): Call method
7220 debug_print_register.
7221 (target_store_registers): Likewise.
7222
7223 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7224
7225 * windows-nat.c (struct lm_info_windows): Initialize field.
7226 (windows_make_so): Allocate lm_info_windows with new.
7227 (windows_free_so): Free lm_info_windows with delete.
7228
7229 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7230
7231 * solib-darwin.c (struct lm_info_darwin): Initialize field.
7232 (darwin_current_sos): Allocate lm_info_darwin with new, remove
7233 cleanup.
7234 (darwin_free_so): Free lm_info_darwin with delete.
7235
7236 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7237
7238 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7239 <l_addr_p>: Change type to bool.
7240 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7241 (svr4_free_so): Free lm_info_svr4 with delete.
7242 (svr4_copy_library_list): Replace memcpy with call to copy
7243 constructor.
7244 (library_list_start_library, svr4_default_sos): Allocate
7245 lm_info_svr4 with new.
7246
7247 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7248
7249 * solib-target.c (struct lm_info_target): Add destructor,
7250 initialize fields.
7251 <name>: Change type to std::string.
7252 (library_list_start_library): Allocate lm_info_target with new.
7253 (solib_target_free_library_list): Free lm_info_target with
7254 delete.
7255 (solib_target_current_sos): Adapt to std::string.
7256 (solib_target_free_so): Free lm_info_target with delete.
7257
7258 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7259
7260 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7261 fields.
7262 (frv_current_sos): Allocate lm_info_frv with new.
7263 (frv_relocate_main_executable): Free lm_info_frv with delete,
7264 allocate with new.
7265 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7266
7267 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7268
7269 * solib-frv.c (struct lm_info_frv): Fix indentation.
7270
7271 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7272
7273 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7274 map field.
7275 (dsbt_current_sos): Allocate lm_info_dsbt with new.
7276 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
7277 and allocate with new.
7278 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
7279
7280 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7281
7282 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
7283 <filename, member_name>: Change type to std::string.
7284 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
7285 (library_list_start_library): Allocate lm_info_aix with new.
7286 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
7287 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
7288 with copy constructor.
7289
7290 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7291
7292 * solist.h (struct lm_info): Remove.
7293 (struct lm_info_base): New class.
7294 (struct so_list) <lm_info>: Change type to lm_info_base *.
7295 * nto-tdep.c (struct lm_info): Remove.
7296 (lm_addr): Adjust.
7297 * solib-aix.c (struct lm_info): Rename to ...
7298 (struct lm_info_aix): ... this. Extend lm_info_base.
7299 (lm_info_p): Rename to ...
7300 (lm_info_aix_p): ... this, and adjust.
7301 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
7302 solib_aix_parse_libraries, library_list_start_library,
7303 solib_aix_free_library_list, solib_aix_parse_libraries,
7304 solib_aix_get_library_list,
7305 solib_aix_relocate_section_addresses, solib_aix_free_so,
7306 solib_aix_get_section_offsets,
7307 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
7308 Adjust.
7309 (struct solib_aix_inferior_data) <library_list>: Adjust.
7310 * solib-darwin.c (struct lm_info): Rename to ...
7311 (struct lm_info_darwin): ... this. Extend lm_info_base.
7312 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
7313 * solib-dsbt.c (struct lm_info): Rename to ...
7314 (struct lm_info_dsbt): ... this. Extend lm_info_base.
7315 (struct dsbt_info) <main_executable_lm_info): Adjust.
7316 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
7317 dsbt_relocate_section_addresses): Adjust.
7318 * solib-frv.c (struct lm_info): Rename to ...
7319 (struct lm_info_frv): ... this. Extend lm_info_base.
7320 (main_executable_lm_info): Adjust.
7321 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7322 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7323 find_canonical_descriptor_in_load_object,
7324 frv_fdpic_find_canonical_descriptor): Adjust.
7325 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7326 to lm_info_svr4.
7327 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7328 svr4_clear_so, svr4_copy_library_list,
7329 library_list_start_library, svr4_default_sos, svr4_read_so_list,
7330 svr4_current_sos, svr4_fetch_objfile_link_map,
7331 solist_update_incremental): Adjust.
7332 * solib-svr4.h (struct lm_info_svr4): Move here from
7333 solib-svr4.c.
7334 * solib-target.c (struct lm_info): Rename to ...
7335 (struct lm_info_target): ... this. Extend lm_info_base.
7336 (lm_info_p): Rename to ...
7337 (lm_info_target_p): ... this.
7338 (solib_target_parse_libraries, library_list_start_segment,
7339 library_list_start_section, library_list_start_library,
7340 library_list_end_library, solib_target_free_library_list,
7341 solib_target_current_sos, solib_target_free_so,
7342 solib_target_relocate_section_addresses): Adjust.
7343 * windows-nat.c (struct lm_info): Rename to ...
7344 (struct lm_info_windows): ... this. Extend lm_info_base.
7345 (windows_make_so, handle_load_dll, handle_unload_dll,
7346 windows_xfer_shared_libraries): Adjust.
7347
7348 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7349
7350 * solib-darwin.c (struct darwin_so_list): Remove.
7351 (darwin_current_sos): Allocate an so_list object instead of a
7352 darwin_so_list, separately allocate an lm_info object.
7353 (darwin_free_so): Free lm_info.
7354
7355 2017-04-28 John Baldwin <jhb@FreeBSD.org>
7356
7357 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7358 with fprintf_filtered.
7359
7360 2017-04-28 Yao Qi <yao.qi@linaro.org>
7361
7362 * regcache.c (regcache::regcache): New function.
7363 (regcache::~regcache): New function.
7364 (regcache_xmalloc_1): Remove.
7365 (regcache_xmalloc): Call new regcache.
7366 (regcache_xfree): Call delete regcache.
7367 (get_thread_arch_aspace_regcache): Call new regcache.
7368
7369 2017-04-28 Yao Qi <yao.qi@linaro.org>
7370
7371 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7372 lwp instead of ptid_get_lwp.
7373
7374 2017-04-28 Yao Qi <yao.qi@linaro.org>
7375
7376 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7377 lwp_info instead of getting from inferior_ptid.
7378
7379 2017-04-27 Keith Seitz <keiths@redhat.com>
7380
7381 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
7382 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
7383 (CV_CONVERSION_BADNESS): Define.
7384 (rank_one_type): Remove overly restrictive rvalue reference
7385 rank checks.
7386 Add cv-qualifier checks and subranks for type equality.
7387 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
7388 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
7389 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
7390
7391 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
7392
7393 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
7394 count when creating the object.
7395
7396 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
7397 Ulrich Weigand <uweigand@de.ibm.com>
7398
7399 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
7400 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
7401 is used in AIX.
7402 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
7403 (process_xcoff_symbol): Likewise.
7404 (scan_xcoff_symtab): Likewise.
7405
7406 2017-04-26 Alan Hayward <alan.hayward@arm.com>
7407
7408 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
7409 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
7410 (ia64_access_reg): Use get_frame_register_unsigned.
7411 (ia64_access_rse_reg): Likewise.
7412 (ia64_libunwind_frame_prev_register): Likewise.
7413
7414 2017-04-26 Jiong Wang <jiong.wang@arm.com>
7415
7416 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
7417 * gdbarch.c: Regenerated.
7418 * gdbarch.h: Regenerated.
7419 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
7420 visibility external.
7421 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
7422 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
7423 (enum cfa_how_kind): Move to ...
7424 (struct dwarf2_frame_state_reg_info): Likewise.
7425 (struct dwarf2_frame_state): Likewise.
7426 * dwarf2-frame.h: ... here.
7427 (dwarf2_frame_state_alloc_regs): New declaration.
7428 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
7429 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
7430
7431 2017-04-26 Alan Hayward <alan.hayward@arm.com>
7432
7433 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
7434 regcache_raw_read_unsigned.
7435 (xtensa_pseudo_register_write): Likewise.
7436
7437 2017-04-26 Alan Hayward <alan.hayward@arm.com>
7438
7439 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
7440 (nds32_pseudo_register_write): Likewise.
7441
7442 2017-04-25 Yao Qi <yao.qi@linaro.org>
7443
7444 * regcache.c (struct regcache) <readonly_p>: Change its type
7445 to bool.
7446 (regcache_xmalloc_1): Update parameter type and callers update.
7447
7448 2017-04-25 Yao Qi <yao.qi@linaro.org>
7449
7450 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
7451 set_gdbarch_wchar_bit.
7452 * arm-tdep.c (arm_gdbarch_init): Likewise.
7453
7454 2017-04-25 Pedro Alves <palves@redhat.com>
7455
7456 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
7457 (BothAreRelocatable, memcopy, memmove): Don't define.
7458 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
7459 macros.
7460
7461 2017-04-25 Pedro Alves <palves@redhat.com>
7462
7463 * common/common-defs.h: Include "common/poison.h".
7464 * common/function-view.h: (Not, Or, Requires): Move to traits.h
7465 and adjust.
7466 * common/poison.h: New file.
7467 * common/traits.h: Include <type_traits>.
7468 (Not, Or, Requires): New, moved from common/function-view.h.
7469
7470 2017-04-25 Pedro Alves <palves@redhat.com>
7471
7472 * breakpoint.h (struct breakpoint): In-class initialize all
7473 fields. Make boolean fields "bool".
7474 * breakpoint.c (init_raw_breakpoint_without_location): Remove
7475 memset call and initializations no longer necessary.
7476
7477 2017-04-25 Pedro Alves <palves@redhat.com>
7478
7479 * btrace.c (pt_btrace_insn_flags): Change parameter type to
7480 reference.
7481 (pt_btrace_insn): New function.
7482 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
7483
7484 2017-04-25 Pedro Alves <palves@redhat.com>
7485
7486 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
7487 "base" field and inherit from "bp_location" instead. Add
7488 non-default ctor.
7489 (allocate_location_exception): Use new non-default ctor.
7490 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
7491 (init_bp_location): Convert to ...
7492 (bp_location::bp_location): ... this new ctor, and remove memset
7493 call.
7494 (base_breakpoint_allocate_location): Use the new non-default ctor.
7495 * breakpoint.h (bp_location): Now a class. Declare default and
7496 non-default ctors. In-class initialize all members.
7497 (init_bp_location): Remove declaration.
7498
7499 2017-04-25 Pedro Alves <palves@redhat.com>
7500
7501 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
7502 assignment operator.
7503
7504 2017-04-24 Yao Qi <yao.qi@linaro.org>
7505
7506 * doublest.c (convert_doublest_to_floatformat): Call
7507 floatformat_totalsize_bytes.
7508
7509 2017-04-22 Tom Tromey <tom@tromey.com>
7510
7511 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7512 ui_out_emit_list.
7513 * stack.c (print_frame): Use ui_out_emit_list.
7514 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7515 ui_out_emit_list.
7516 * mi/mi-main.c (print_one_inferior)
7517 (mi_cmd_data_list_register_names)
7518 (mi_cmd_data_list_register_values, mi_cmd_list_features)
7519 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
7520 ui_out_emit_list.
7521 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
7522 (mi_output_solib_attribs): Use ui_out_emit_list,
7523 ui_out_emit_tuple.
7524 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
7525 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
7526 (mi_cmd_stack_list_args, list_args_or_locals): Use
7527 ui_out_emit_list.
7528 * disasm.c (do_assembly_only): Use ui_out_emit_list.
7529 * breakpoint.c (print_solib_event, output_thread_groups): Use
7530 ui_out_emit_list.
7531
7532 2017-04-22 Tom Tromey <tom@tromey.com>
7533
7534 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
7535 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
7536 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
7537
7538 2017-04-22 Tom Tromey <tom@tromey.com>
7539
7540 * tracepoint.c (tvariables_info_1)
7541 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
7542
7543 2017-04-22 Tom Tromey <tom@tromey.com>
7544
7545 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
7546 annotate_arg_emitter.
7547 * breakpoint.c (print_mention_watchpoint)
7548 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
7549 * annotate.h (struct annotate_arg_emitter): New.
7550
7551 2017-04-22 Tom Tromey <tom@tromey.com>
7552
7553 * record-btrace.c (record_btrace_insn_history)
7554 (record_btrace_insn_history_range, record_btrace_call_history)
7555 (record_btrace_call_history_range): Use ui_out_emit_tuple.
7556 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
7557 ui_out_emit_tuple.
7558 * stack.c (print_frame_info): Use ui_out_emit_tuple.
7559 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
7560 * skip.c (skip_info): Use ui_out_emit_tuple.
7561 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
7562 * progspace.c (print_program_space): Use ui_out_emit_tuple.
7563 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
7564 * osdata.c (info_osdata): Use ui_out_emit_tuple.
7565 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7566 ui_out_emit_tuple.
7567 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
7568 (output_register, mi_cmd_data_read_memory)
7569 (mi_cmd_data_read_memory_bytes, mi_load_progress)
7570 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
7571 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
7572 Use ui_out_emit_tuple.
7573 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
7574 ui_out_emit_tuple.
7575 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7576 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
7577 * linux-thread-db.c (info_auto_load_libthread_db): Use
7578 ui_out_emit_tuple.
7579 * inferior.c (print_inferior): Use ui_out_emit_tuple.
7580 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
7581 * disasm.c (do_mixed_source_and_assembly_deprecated)
7582 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
7583 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
7584 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
7585 * breakpoint.c (print_one_breakpoint_location)
7586 (print_one_breakpoint): Use ui_out_emit_tuple.
7587 * auto-load.c (print_script, info_auto_load_cmd): Use
7588 ui_out_emit_tuple.
7589 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
7590
7591 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
7592
7593 * thread.c (print_thread_info_1): Remove dead code.
7594
7595 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7596
7597 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
7598 GDB_SELF_TEST.
7599 * arm-tdep.c (selftests::arm_record_test): Likewise.
7600
7601 2017-04-21 Yao Qi <yao.qi@linaro.org>
7602
7603 * regcache.c (regcache_restore): Remove argument 2. Replace
7604 argument 3 with regcache. Get register status from
7605 src->register_status and get register contents from
7606 register_buffer (src, regnum).
7607 (regcache_cpy): Update.
7608
7609 2017-04-19 Pedro Alves <palves@redhat.com>
7610
7611 * gdbthread.h (thread): Add missing closing parenthesis in
7612 comment.
7613
7614 2017-04-19 Pedro Alves <palves@redhat.com>
7615
7616 * common/refcounted-object.h: New file.
7617 * gdbthread.h: Include "common/refcounted-object.h".
7618 (thread_info): Inherit from refcounted_object and add comments.
7619 (thread_info::incref, thread_info::decref)
7620 (thread_info::m_refcount): Delete.
7621 (thread_info::deletable): Use the refcounted_object::refcount()
7622 method.
7623 * inferior.c (current_inferior_): Add comment.
7624 (set_current_inferior): Increment/decrement refcounts.
7625 (prune_inferiors, remove_inferior_command): Skip inferiors marked
7626 not-deletable instead of comparing with the current inferior.
7627 (initialize_inferiors): Increment the initial inferior's refcount.
7628 * inferior.h (struct inferior): Forward declare.
7629 Include "common/refcounted-object.h".
7630 (current_inferior, set_current_inferior): Move declaration to
7631 before struct inferior's definition, and fix comment.
7632 (inferior): Inherit from refcounted_object. Add comments.
7633 * thread.c (switch_to_thread_no_regs): Reference the thread's
7634 inferior pointer directly instead of doing a ptid lookup.
7635 (switch_to_no_thread): New function.
7636 (switch_to_thread(thread_info *)): New function, factored out
7637 from ...
7638 (switch_to_thread(ptid_t)): ... this.
7639 (restore_current_thread): Delete.
7640 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
7641 fields, and add 'inf' field.
7642 (do_restore_current_thread_cleanup): Check whether old->inf is
7643 alive instead of looking up an inferior by ptid. Use
7644 switch_to_thread and switch_to_no_thread.
7645 (restore_current_thread_cleanup_dtor): Use old->inf directly
7646 instead of lookup up an inferior by id. Decref the inferior.
7647 Don't restore 'removable'.
7648 (make_cleanup_restore_current_thread): Same the inferior pointer
7649 in old, instead of the inferior number. Incref the inferior.
7650 Don't save/clear 'removable'.
7651
7652 2017-04-19 Pedro Alves <palves@redhat.com>
7653
7654 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7655 unittests/scoped_restore-selftests.c.
7656 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
7657 * common/scoped_restore.h (scoped_restore_base): Make "class".
7658 (scoped_restore_base::release): New public method.
7659 (scoped_restore_base::scoped_restore_base): New protected ctor.
7660 (scoped_restore_base::m_saved_var): New protected field.
7661 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
7662 scoped_restore_base base class instead of m_saved_var directly.
7663 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
7664 (scoped_restore_tmpl::scoped_restore_tmpl(const
7665 scoped_restore_tmpl<T>&)): Likewise.
7666 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
7667 method.
7668 (scoped_restore_tmpl::saved_var): New method.
7669 (scoped_restore_tmpl::m_saved_var): Delete.
7670 * inferior.h (inferior::detaching): Now a bool.
7671 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
7672 cleanup.
7673 * unittests/scoped_restore-selftests.c: New file.
7674
7675 2017-04-19 Pedro Alves <palves@redhat.com>
7676
7677 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
7678 Re-sort in alphabetic order.
7679
7680 2017-04-18 Pedro Alves <palves@redhat.com>
7681
7682 * xml-support.c (obstack_xml_printf): Delete.
7683 * xml-support.h (obstack_xml_printf): Delete.
7684
7685 2017-04-18 Pedro Alves <palves@redhat.com>
7686
7687 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
7688 vdebug, verror, body_text, start_element, end_element, name,
7689 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
7690 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
7691 is_xinclude>: Make private and add m_ prefix.
7692 (gdb_xml_parser::body_text): New method, based on ...
7693 (gdb_xml_body_text): ... this. Adjust.
7694 (gdb_xml_parser::vdebug): New method, based on ...
7695 (gdb_xml_debug): ... this. Adjust.
7696 (gdb_xml_parser::verror): New method, based on ...
7697 (gdb_xml_error): ... this. Adjust.
7698 (gdb_xml_parser::start_element): New method, based on ...
7699 (gdb_xml_start_element): ... this. Adjust.
7700 (gdb_xml_start_element_wrapper): Defer to
7701 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
7702 (gdb_xml_parser::end_element): New method, based on ...
7703 (gdb_xml_end_element_wrapper): ... this. Adjust.
7704 (gdb_xml_parser::~gdb_xml_parser): Adjust.
7705 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
7706 (gdb_xml_parser::use_dtd): New method, based on ...
7707 (gdb_xml_use_dtd): ... this. Adjust.
7708 (gdb_xml_parser::parse): New method, based on ...
7709 (gdb_xml_parse): ... this. Adjust.
7710 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
7711 (xinclude_start_include): Adjust to call the parser's name method.
7712 (xml_xinclude_default, xml_xinclude_start_doctype)
7713 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
7714 method.
7715 (xml_process_xincludes): Adjust to call parser methods.
7716 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
7717 declarations.
7718
7719 2017-04-18 Pedro Alves <palves@redhat.com>
7720
7721 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
7722 gdb::optional<std::string>.
7723 * xml-support.c: Include <string>.
7724 (scope_level::scope_level(scope_level &&))
7725 (scope_level::~scope_level): Delete.
7726 (scope_level::body): Now a std::string.
7727 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
7728 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
7729 parameter.
7730 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
7731 (xinclude_parsing_data::output): Now a std::string reference.
7732 (xinclude_start_include): Adjust.
7733 (xml_xinclude_default): Adjust.
7734 (xml_process_xincludes): Add 'output' parameter, and return bool.
7735 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
7736 and return bool.
7737 * xml-tdesc.c: Include <unordered_map> and <string>.
7738 (tdesc_xml_cache): Delete.
7739 (tdesc_xml_cache_s): Delete.
7740 (xml_cache): Now an std::unordered_map.
7741 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
7742 (target_fetch_description_xml): Change return type to
7743 gdb::optional<std::string>, and adjust.
7744 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
7745 (target_fetch_description_xml): Change return type to
7746 gdb::optional<std::string>.
7747
7748 2017-04-18 Pedro Alves <palves@redhat.com>
7749
7750 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7751 unittests/optional-selftests.c.
7752 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
7753 * unittests/optional-selftests.c: New file.
7754 * unittests/optional/assignment/1.cc: New file.
7755 * unittests/optional/assignment/2.cc: New file.
7756 * unittests/optional/assignment/3.cc: New file.
7757 * unittests/optional/assignment/4.cc: New file.
7758 * unittests/optional/assignment/5.cc: New file.
7759 * unittests/optional/assignment/6.cc: New file.
7760 * unittests/optional/assignment/7.cc: New file.
7761 * unittests/optional/cons/copy.cc: New file.
7762 * unittests/optional/cons/default.cc: New file.
7763 * unittests/optional/cons/move.cc: New file.
7764 * unittests/optional/cons/value.cc: New file.
7765 * unittests/optional/in_place.cc: New file.
7766 * unittests/optional/observers/1.cc: New file.
7767 * unittests/optional/observers/2.cc: New file.
7768
7769 2017-04-18 Pedro Alves <palves@redhat.com>
7770
7771 * common/gdb_optional.h: Include common/traits.h.
7772 (in_place_t): New type.
7773 (in_place): New constexpr variable.
7774 (optional::optional): Remove member initialization of
7775 m_instantiated.
7776 (optional::optional(in_place_t...)): New constructor.
7777 (optional::~optional): Use reset.
7778 (optional::optional(const optional&)): New.
7779 (optional::optional(const optional&&)): New.
7780 (optional::optional(T &)): New.
7781 (optional::optional(T &&)): New.
7782 (operator::operator=(const optional &)): New.
7783 (operator::operator=(optional &&)): New.
7784 (operator::operator= (const T &))
7785 (operator::operator= (T &&))
7786 (operator::emplace (Args &&... args)): Return a T&. Use reset.
7787 (operator::reset): New.
7788 (operator::m_instantiated):: Add in-class initializer.
7789 * common/traits.h: Include <type_traits>.
7790 (struct And): New types.
7791
7792 2017-04-18 Pedro Alves <palves@redhat.com>
7793
7794 * xml-support.c: Include <vector>.
7795 (scope_level::scope_level(const gdb_xml_element *))
7796 (scope_level::scope_level(scope_level&&)): New.
7797 (scope_level::~scope_level): New.
7798 (scope_level_s): Delete.
7799 (gdb_xml_parser::scopes): Now a std::vector.
7800 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
7801 Use std::vector.
7802 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
7803 scope cleanup code.
7804 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
7805 of the scopes member. Use std::vector::emplace_back.
7806
7807 2017-04-18 Pedro Alves <palves@redhat.com>
7808
7809 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
7810 a bool.
7811 (gdb_xml_end_element): Change type of first parameter.
7812 (gdb_xml_cleanup): Rename to ...
7813 (gdb_xml_parser::~gdb_xml_parser): ... this.
7814 (gdb_xml_create_parser_and_cleanup): Delete with ...
7815 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
7816 to this new ctor.
7817 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
7818 using gdb_xml_create_parser_and_cleanup.
7819 (xinclude_parsing_data): Add ctor/dtor.
7820 (xml_xinclude_cleanup): Delete.
7821 (xml_process_xincludes): Create a local xinclude_parsing_data
7822 instead of heap-allocating one. Create a local gdb_xml_parser
7823 instead of heap-allocating one with
7824 gdb_xml_create_parser_and_cleanup.
7825
7826 2017-04-18 John Baldwin <jhb@FreeBSD.org>
7827
7828 PR threads/20743
7829 * fbsd-nat.c (resume_one_thread_cb): Remove.
7830 (resume_all_threads_cb): Remove.
7831 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7832 iterate_over_threads.
7833
7834 2017-04-17 Joel Brobecker <brobecker@adacore.com>
7835
7836 * NEWS: Create a new section for the next release branch.
7837 Rename the section of the current branch, now that it has
7838 been cut.
7839
7840 2017-04-17 Joel Brobecker <brobecker@adacore.com>
7841
7842 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7843 * version.in: Bump version to 8.0.50.DATE-git.
7844
7845 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
7846
7847 PR gdb/21385
7848 * windows-nat.c (windows_create_inferior): Declare 'allargs'
7849 independently of the host, and fix build breakage on Cygwin.
7850
7851 2017-04-13 Pedro Alves <palves@redhat.com>
7852
7853 * inferior.c (free_inferior): Convert to ...
7854 (inferior::~inferior): ... this dtor.
7855 (inferior::inferior): New ctor, factored out from ...
7856 (add_inferior_silent): ... here. Allocate the inferior with a new
7857 expression.
7858 (delete_inferior): Call delete instead of free_inferior.
7859 * inferior.h (gdb_environ, continuation): Forward declare.
7860 (inferior): Now a class. Add in-class initialization to all
7861 members. Make boolean fields bool, except 'detaching'.
7862 (inferior::inferior): New explicit ctor.
7863 (inferior::~inferior): New.
7864
7865 2017-04-13 Pedro Alves <palves@redhat.com>
7866
7867 * inferior.c (init_inferior_list): Delete.
7868 * inferior.h (init_inferior_list): Delete.
7869
7870 2017-04-13 Pedro Alves <palves@redhat.com>
7871
7872 PR threads/13217
7873 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7874 (top level): Call it twice, with different thread sets.
7875
7876 2017-04-13 Pedro Alves <palves@redhat.com>
7877
7878 * thread.c: Include <algorithm>.
7879 (thread_array_cleanup): Delete.
7880 (scoped_inc_dec_ref): New class.
7881 (live_threads_count): New function.
7882 (set_thread_refcount): Delete.
7883 (tp_array_compar_ascending): Now a bool.
7884 (tp_array_compar): Convert to a std::sort comparison function.
7885 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7886 and live_threads_count.
7887
7888 2017-04-13 Pedro Alves <palves@redhat.com>
7889
7890 * infrun.c (follow_fork_inferior): Also switch the current
7891 inferior.
7892
7893 2017-04-13 Pedro Alves <palves@redhat.com>
7894
7895 * breakpoint.c (watch_command_1): Save watchpoint-frame info
7896 before calling create_internal_breakpoint.
7897
7898 2017-04-13 Pedro Alves <palves@redhat.com>
7899
7900 * fork-child.c (execv_argv): New class.
7901 (breakup_args): Refactored as ...
7902 (execv_argv::init_for_no_shell): .. this method of execv_argv.
7903 Copy arguments to storage and replace separators with NULL
7904 terminators in place.
7905 (escape_bang_in_quoted_argument): Adjust to return bool.
7906 (execv_argv::execv_argv): New ctor.
7907 (execv_argv::init_for_shell): New method, factored out from
7908 fork_inferior. Don't strdup strings into the vector.
7909 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
7910 Remove free_vector_argv call.
7911
7912 2017-04-13 Yao Qi <yao.qi@linaro.org>
7913
7914 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
7915 tdep->rx_psw_type.
7916
7917 2017-04-13 Yao Qi <yao.qi@linaro.org>
7918
7919 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
7920 * rx-tdep.c (rx_gdbarch_init): Likewise.
7921
7922 2017-04-13 Pedro Alves <palves@redhat.com>
7923
7924 * breakpoint.h (struct breakpoint): Reindent.
7925
7926 2017-04-13 Pedro Alves <palves@redhat.com>
7927
7928 * breakpoint.c (bp_location): Rename to ...
7929 (bp_locations): ... this. All references updated.
7930 (bp_location_count): Rename to ...
7931 (bp_locations_count): ... this. All references updated.
7932 (bp_location_placed_address_before_address_max): Rename to ...
7933 (bp_locations_placed_address_before_address_max): ... this. All
7934 references updated.
7935 (bp_location_shadow_len_after_address_max): Rename to ...
7936 (bp_locations_shadow_len_after_address_max): ... this. All
7937 references updated.
7938 (bp_location_compare_addrs): Rename to ...
7939 (bp_locations_compare_addrs): ... this. All references updated.
7940 (bp_location_compare):Rename to ...
7941 (bp_locations_compare): ... this. All references updated.
7942 (bp_location_target_extensions_update): Rename to ...
7943 (bp_locations_target_extensions_update): ... this. All references
7944 updated.
7945
7946 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7947
7948 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
7949 * common/common.m4: Check headers 'termios.h', 'termio.h' and
7950 'sgtty.h'.
7951 * common/gdb_termios.h: New file, with parts of "terminal.h".
7952 * inflow.c: Include "gdb_termios.h".
7953 * ser-unix.c: Include "gdb_termios.h".
7954 * terminal.h: Move terminal-related defines to
7955 "common/gdb_termios.h".
7956
7957 2017-04-12 Tom Tromey <tom@tromey.com>
7958
7959 * probe.c (parse_probes): Update.
7960 * location.h (delete_event_location): Don't declare.
7961 (event_location_deleter::operator()): Update.
7962 * location.c (event_location_deleter::operator()): Rename from
7963 delete_event_location.
7964 * linespec.h (linespec_result) <location>: Change type to
7965 event_location_up.
7966 * linespec.c (canonicalize_linespec, event_location_to_sals)
7967 (decode_objc): Update.
7968 (linespec_result): Don't call delete_event_location.
7969 * breakpoint.c (create_breakpoints_sal)
7970 (bkpt_probe_create_sals_from_location)
7971 (strace_marker_create_sals_from_location): Update.
7972
7973 2017-04-12 Tom Tromey <tom@tromey.com>
7974
7975 * linespec.h (struct linespec_result): Add constructor and
7976 destructor.
7977 (init_linespec_result, destroy_linespec_result)
7978 (make_cleanup_destroy_linespec_result): Don't declare.
7979 * linespec.c (init_linespec_result): Remove.
7980 (linespec_result::~linespec_result): Rename from
7981 destroy_linespec_result. Update.
7982 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
7983 Remove.
7984 * breakpoint.c (create_breakpoint, break_range_command)
7985 (decode_location_default): Update.
7986 * ax-gdb.c (agent_command_1): Update.
7987
7988 2017-04-12 Tom Tromey <tom@tromey.com>
7989
7990 * remote.c (remote_download_tracepoint): Update.
7991 * python/py-breakpoint.c (bppy_get_location): Update.
7992 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
7993 (gdbscm_breakpoint_location): Update.
7994 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
7995 * breakpoint.h (struct breakpoint) <location, location_range_end>:
7996 Change type to event_location_up.
7997 * breakpoint.c (create_overlay_event_breakpoint)
7998 (create_longjmp_master_breakpoint)
7999 (create_std_terminate_master_breakpoint)
8000 (create_exception_master_breakpoint)
8001 (breakpoint_event_location_empty_p, print_breakpoint_location)
8002 (print_one_breakpoint_location, create_thread_event_breakpoint)
8003 (init_breakpoint_sal, create_breakpoint)
8004 (print_recreate_ranged_breakpoint, break_range_command)
8005 (init_ada_exception_breakpoint, say_where): Update.
8006 (base_breakpoint_dtor): Don't call delete_event_location.
8007 (bkpt_print_recreate, tracepoint_print_recreate)
8008 (dprintf_print_recreate, update_static_tracepoint)
8009 (breakpoint_re_set_default): Update.
8010
8011 2017-04-12 Tom Tromey <tom@tromey.com>
8012
8013 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
8014 type of "to_do". Update.
8015 (compute_stack_depth): Use std::vector.
8016
8017 2017-04-12 Tom Tromey <tom@tromey.com>
8018
8019 * printcmd.c (find_instruction_backward): Use std::vector.
8020
8021 2017-04-12 Tom Tromey <tom@tromey.com>
8022
8023 * symfile.c (objfilep): Remove typedef.
8024 (reread_symbols): Use a std::vector.
8025
8026 2017-04-12 Tom Tromey <tom@tromey.com>
8027
8028 * mi/mi-main.c (exec_direction_forward): Remove.
8029 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
8030 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
8031 scoped_restore.
8032 * guile/guile.c (guile_repl_command, guile_command)
8033 (gdbscm_execute_gdb_command): Use scoped_restore.
8034 * go-exp.y (go_parse): Use scoped_restore.
8035 * d-exp.y (d_parse): Use scoped_restore.
8036 * cli/cli-decode.c (cmd_func): Use scoped_restore.
8037 * c-exp.y (c_parse): Use scoped_restore.
8038
8039 2017-04-12 Tom Tromey <tom@tromey.com>
8040
8041 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
8042 (mi_parse): Update return type.
8043 (mi_parse_free): Remove.
8044 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
8045 (mi_parse::~mi_parse): Rename from mi_parse_free.
8046 (mi_parse_cleanup): Remove.
8047 (mi_parse): Return a unique_ptr. Use new.
8048 * mi/mi-main.c (mi_execute_command): Update.
8049
8050 2017-04-12 Tom Tromey <tom@tromey.com>
8051
8052 * location.c (explicit_location_lex_one): Return a
8053 unique_xmalloc_ptr.
8054 (string_to_explicit_location): Update. Remove cleanups.
8055
8056 2017-04-12 Tom Tromey <tom@tromey.com>
8057
8058 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
8059 (compare_value_and_voffset): Change type. Update.
8060 (compute_vtable_size): Change type of "offset_vec".
8061 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
8062 (gnuv3_get_typeid): Remove extraneous declaration.
8063
8064 2017-04-12 Tom Tromey <tom@tromey.com>
8065
8066 * charset.h (wchar_iterator): Fix comment.
8067
8068 2017-04-12 Tom Tromey <tom@tromey.com>
8069
8070 * charset.c (iconv_wrapper): New class.
8071 (cleanup_iconv): Remove.
8072 (convert_between_encodings): Use it.
8073
8074 2017-04-12 Tom Tromey <tom@tromey.com>
8075
8076 * symfile.h (increment_reading_symtab): Update type.
8077 * symfile.c (decrement_reading_symtab): Remove.
8078 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
8079 * psymtab.c (psymtab_to_symtab): Update.
8080 * dwarf2read.c (dw2_instantiate_symtab): Update.
8081
8082 2017-04-12 Tom Tromey <tom@tromey.com>
8083
8084 * jit.c (struct jit_reader): Declare separately. Add constructor
8085 and destructor. Change type of "handle".
8086 (loaded_jit_reader): Define separately.
8087 (jit_reader_load): Update. New "new".
8088 (jit_reader_unload_command): Use "delete".
8089 * gdb-dlfcn.h (struct dlclose_deleter): New.
8090 (gdb_dlhandle_up): New typedef.
8091 (gdb_dlopen, gdb_dlsym): Update types.
8092 (gdb_dlclose): Remove.
8093 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
8094 (gdb_dlsym): Change type of "handle".
8095 (make_cleanup_dlclose): Remove.
8096 (dlclose_deleter::operator()): Rename from gdb_dlclose.
8097 * compile/compile-c-support.c (load_libcc): Update.
8098
8099 2017-04-12 Tom Tromey <tom@tromey.com>
8100
8101 * symtab.h (find_pcs_for_symtab_line): Change return type.
8102 * symtab.c (find_pcs_for_symtab_line): Change return type.
8103 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
8104 type of "vec". Update.
8105 (ltpy_get_pcs_for_line): Update.
8106 * linespec.c (decode_digits_ordinary): Update.
8107
8108 2017-04-12 Tom Tromey <tom@tromey.com>
8109
8110 * tracepoint.c (actions_command): Update.
8111 * python/python.c (python_command, python_interactive_command):
8112 Update.
8113 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8114 * guile/guile.c (guile_command): Update.
8115 * defs.h (read_command_lines, read_command_lines_1): Return
8116 command_line_up.
8117 (command_lines_deleter): New struct.
8118 (command_line_up): New typedef.
8119 * compile/compile.c (compile_code_command)
8120 (compile_print_command): Update.
8121 * cli/cli-script.h (get_command_line, copy_command_lines): Return
8122 command_line_up.
8123 (make_cleanup_free_command_lines): Remove.
8124 * cli/cli-script.c (get_command_line, read_command_lines_1)
8125 (copy_command_lines): Return command_line_up.
8126 (while_command, if_command, read_command_lines, define_command)
8127 (document_command): Update.
8128 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
8129 Remove.
8130 * breakpoint.h (breakpoint_set_commands): Change type of
8131 "commands".
8132 * breakpoint.c (breakpoint_set_commands): Change type of
8133 "commands". Update.
8134 (do_map_commands_command, update_dprintf_command_list)
8135 (create_tracepoint_from_upload): Update.
8136
8137 2017-04-12 Tom Tromey <tom@tromey.com>
8138
8139 * tracepoint.c (scope_info): Update.
8140 * spu-tdep.c (spu_catch_start): Update.
8141 * python/python.c (gdbpy_decode_line): Update.
8142 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
8143 * python/py-breakpoint.c (bppy_init): Update.
8144 * probe.c (parse_probes): Update.
8145 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
8146 * location.h (event_location_deleter): New struct.
8147 (event_location_up): New typedef.
8148 (new_linespec_location, new_address_location, new_probe_location)
8149 (new_explicit_location, copy_event_location)
8150 (string_to_event_location, string_to_event_location_basic)
8151 (string_to_explicit_location): Update return type.
8152 (make_cleanup_delete_event_location): Remove.
8153 * location.c (new_linespec_location, new_address_location)
8154 (new_probe_location, new_explicit_location, copy_event_location):
8155 Return event_location_up.
8156 (delete_event_location_cleanup)
8157 (make_cleanup_delete_event_location): Remove.
8158 (string_to_explicit_location, string_to_event_location_basic)
8159 (string_to_event_location): Return event_location_up.
8160 * linespec.c (canonicalize_linespec, event_location_to_sals)
8161 (decode_line_with_current_source)
8162 (decode_line_with_last_displayed, decode_objc): Update.
8163 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
8164 * completer.c (location_completer): Update.
8165 * cli/cli-cmds.c (edit_command, list_command): Update.
8166 * breakpoint.c (create_overlay_event_breakpoint)
8167 (create_longjmp_master_breakpoint)
8168 (create_std_terminate_master_breakpoint)
8169 (create_exception_master_breakpoint)
8170 (create_thread_event_breakpoint): Update.
8171 (init_breakpoint_sal): Update. Remove some dead code.
8172 (create_breakpoint_sal): Change type of "location". Update.
8173 (create_breakpoints_sal, create_breakpoint, break_command_1)
8174 (dprintf_command, break_range_command, until_break_command)
8175 (init_ada_exception_breakpoint)
8176 (strace_marker_create_sals_from_location)
8177 (update_static_tracepoint, trace_command, ftrace_command)
8178 (strace_command, create_tracepoint_from_upload): Update.
8179 * break-catch-throw.c (re_set_exception_catchpoint): Update.
8180 * ax-gdb.c (agent_command_1): Update.
8181
8182 2017-04-12 Pedro Alves <palves@redhat.com>
8183
8184 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
8185 * configure.tgt: Handle i[34567]86-*-go32* and
8186 i[34567]86-*-msdosdjgpp*.
8187 * i386-tdep.c (i386_svr4_reg_to_regnum):
8188 Make extern.
8189 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
8190 i386-go32-tdep.c.
8191 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8192 * i386-go32-tdep.c: New file.
8193 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8194 declarations.
8195
8196 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
8197
8198 * aix-thread.c (pd_status2str): Change return type to const char *.
8199
8200 2017-04-12 Pedro Alves <palves@redhat.com>
8201
8202 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8203 calls to set_gdbarch_gnu_triplet_regexp.
8204
8205 2017-04-12 Pedro Alves <palves@redhat.com>
8206
8207 PR gdb/21323
8208 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8209 New enum value.
8210 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8211 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8212 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8213 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8214 * gdbarch.h, gdbarch.c: Regenerate.
8215 * aarch64-tdep.c (aarch64_gdbarch_init): Override
8216 gdbarch_wchar_bit and gdbarch_wchar_signed.
8217 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8218 * arm-tdep.c (arm_gdbarch_init): Likewise.
8219 * avr-tdep.c (avr_gdbarch_init): Likewise.
8220 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8221 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8222 * i386-tdep.c (i386_go32_init_abi): Likewise.
8223 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8224 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8225 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8226 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8227 * sh-tdep.c (sh_gdbarch_init): Likewise.
8228 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8229 * sparc64-tdep.c (sparc64_init_abi): Likewise.
8230 * windows-tdep.c (windows_init_abi): Likewise.
8231 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8232
8233 2017-04-12 Pedro Alves <palves@redhat.com>
8234
8235 PR c++/21323
8236 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8237 cplus_primitive_type_char32_t>: New enum values.
8238 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8239 and cplus_primitive_type_char32_t.
8240 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8241 32, use the archtecture's built-in type for char16_t and char32_t,
8242 respectively. Otherwise, fallback to init_integer_type as before,
8243 but make the type unsigned, and issue a complaint.
8244 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8245
8246 2017-04-12 Alan Hayward <alan.hayward@arm.com>
8247
8248 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
8249 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8250
8251 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8252
8253 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8254 'const char *'.
8255
8256 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8257
8258 * common/common-utils.c (free_vector_argv): New function.
8259 * common/common-utils.h: Include <vector>.
8260 (free_vector_argv): New prototype.
8261 * darwin-nat.c (darwin_create_inferior): Rewrite function
8262 prototype in order to constify "exec_file" and accept a
8263 "std::string" for "allargs".
8264 * fork-child.c: Include <vector>.
8265 (breakup_args): Rewrite function, using C++.
8266 (fork_inferior): Rewrite function header, constify "exec_file_arg"
8267 and accept "std::string" for "allargs". Update the code to
8268 calculate "argv" based on "allargs". Update calls to "exec_fun"
8269 and "execvp".
8270 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8271 order to constify "exec_file" and accept a "std::string" for
8272 "allargs".
8273 * go32-nat.c (go32_create_inferior): Likewise.
8274 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8275 * infcmd.c (run_command_1): Constify "exec_file". Use
8276 "std::string" for inferior arguments.
8277 * inferior.h (fork_inferior): Update prototype.
8278 * linux-nat.c (linux_nat_create_inferior): Rewrite function
8279 prototype in order to constify "exec_file" and accept a
8280 "std::string" for "allargs".
8281 * nto-procfs.c (procfs_create_inferior): Likewise.
8282 * procfs.c (procfs_create_inferior): Likewise.
8283 * remote-sim.c (gdbsim_create_inferior): Likewise.
8284 * remote.c (extended_remote_run): Update code to accept
8285 "std::string" as argument.
8286 (extended_remote_create_inferior): Rewrite function prototype in
8287 order to constify "exec_file" and accept a "std::string" for
8288 "allargs".
8289 * rs6000-nat.c (super_create_inferior): Likewise.
8290 (rs6000_create_inferior): Likewise.
8291 * target.h (struct target_ops) <to_create_inferior>: Likewise.
8292 * windows-nat.c (windows_create_inferior): Likewise.
8293
8294 2017-04-11 Pedro Alves <palves@redhat.com>
8295
8296 * thread.c: Fix whitespace throughout.
8297
8298 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
8299
8300 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
8301
8302 2017-04-11 Alan Hayward <alan.hayward@arm.com>
8303
8304 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
8305
8306 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
8307
8308 PR gdb/21364
8309 * osdata.c (info_osdata): Check if 'type' is an empty string
8310 instead of NULL.
8311
8312 2017-04-10 Pedro Alves <palves@redhat.com>
8313
8314 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
8315 (ptid_to_global_thread_id, in_thread_list)
8316 (do_captured_list_thread_ids, set_resumed, set_running)
8317 (set_executing, set_stop_requested, finish_thread_state)
8318 (validate_registers_access, can_access_registers_ptid)
8319 (print_thread_info_1, switch_to_thread)
8320 (do_restore_current_thread_cleanup)
8321 (make_cleanup_restore_current_thread, thread_command)
8322 (thread_name_command): Use operator== instead of ptid_equal.
8323
8324 2017-04-10 Pedro Alves <palves@redhat.com>
8325
8326 * thread.c (struct current_thread_cleanup) <next>: Delete field.
8327 (current_thread_cleanup_chain): Delete.
8328 (restore_current_thread_cleanup_dtor)
8329 (make_cleanup_restore_current_thread): Remove references to
8330 current_thread_cleanup_chain.
8331
8332 2017-04-10 Alan Hayward <alan.hayward@arm.com>
8333
8334 * msp430-tdep.c (msp430_pseudo_register_read): Never return
8335 REG_UNKNOWN.
8336
8337 2017-04-10 Yao Qi <yao.qi@linaro.org>
8338
8339 PR gdb/19942
8340 * gdbthread.h (thread_info::deletable): New method.
8341 (thread_info::incref): New method.
8342 (thread_info::decref): New method.
8343 (thread_info::refcount): Move it to private.
8344 * infrun.c (save_stop_context): Call inc_refcount.
8345 (release_stop_context_cleanup): Likewise.
8346 * thread.c (set_thread_exited): New function.
8347 (init_thread_list): Delete "tp" only it is deletable, otherwise
8348 call set_thread_exited.
8349 (delete_thread_1): Call set_thread_exited.
8350 (current_thread_cleanup) <inferior_pid>: Remove.
8351 <thread>: New field.
8352 (restore_current_thread_ptid_changed): Removed.
8353 (do_restore_current_thread_cleanup): Adjust.
8354 (restore_current_thread_cleanup_dtor): Don't call
8355 find_thread_ptid.
8356 (set_thread_refcount): Use dec_refcount.
8357 (make_cleanup_restore_current_thread): Adjust.
8358 (thread_apply_all_command): Call inc_refcount.
8359 (_initialize_thread): Don't call
8360 observer_attach_thread_ptid_changed.
8361
8362 2017-04-10 Yao Qi <yao.qi@linaro.org>
8363
8364 * thread.c (delete_thread_1): Hoist code on marking thread as
8365 exited.
8366
8367 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8368
8369 * windows-nat.c (windows_detach): Initialize ptid with
8370 minus_one_ptid.
8371
8372 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
8373
8374 * unittests/ptid-selftests.c: Fix erroneous assert messages.
8375
8376 2017-04-07 Alan Hayward <alan.hayward@arm.com>
8377
8378 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8379 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8380 (bfin_pseudo_register_write): Likewise
8381
8382 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
8383
8384 * common/ptid.h (struct ptid): Change to...
8385 (class ptid_t): ... this.
8386 <ptid_t>: New constructors.
8387 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
8388 matches>: New methods.
8389 <make_null, make_minus_one>: New static methods.
8390 <pid>: Rename to...
8391 <m_pid>: ...this.
8392 <lwp>: Rename to...
8393 <m_lwp>: ...this.
8394 <tid>: Rename to...
8395 <m_tid>: ...this.
8396 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
8397 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
8398 as references, move comment to class ptid_t.
8399 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
8400 ptid_t static methods.
8401 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
8402 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
8403 Take ptid arguments as references, implement using ptid_t methods.
8404 * unittests/ptid-selftests.c: New file.
8405 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8406 unittests/ptid-selftests.c.
8407 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
8408
8409 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
8410
8411 * python/python.c (python_run_simple_file): Cast mode literal to
8412 non-const char pointer as expected by PyFile_FromString.
8413
8414 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
8415
8416 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
8417 minus_one_ptid and null_ptid.
8418
8419 2017-04-05 Pedro Alves <palves@redhat.com>
8420
8421 * warning.m4 (build_warnings): Remove -Wno-write-strings.
8422 * configure: Regenerate.
8423
8424 2017-04-05 Pedro Alves <palves@redhat.com>
8425
8426 * ada-exp.y (yyerror): Constify.
8427 * ada-lang.c (bound_name, get_selections)
8428 (ada_variant_discrim_type)
8429 (ada_variant_discrim_name, ada_value_struct_elt)
8430 (ada_lookup_struct_elt_type, is_unchecked_variant)
8431 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
8432 (catch_ada_exception_command_split)
8433 (catch_ada_assert_command_split, catch_assert_command)
8434 (ada_op_name): Constify.
8435 * ada-lang.h (ada_yyerror, get_selections)
8436 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
8437 * arc-tdep.c (arc_print_frame_cache): Constify.
8438 * arm-tdep.c (arm_skip_stub): Constify.
8439 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
8440 (gen_aggregate_elt_ref): Constify.
8441 * bcache.c (print_bcache_statistics): Constify.
8442 * bcache.h (print_bcache_statistics): Constify.
8443 * break-catch-throw.c (catch_exception_command_1):
8444 * breakpoint.c (struct ep_type_description::description):
8445 Constify.
8446 (add_solib_catchpoint): Constify.
8447 (catch_fork_command_1): Add cast.
8448 (add_catch_command): Constify.
8449 * breakpoint.h (add_catch_command, add_solib_catchpoint):
8450 Constify.
8451 * bsd-uthread.c (bsd_uthread_state): Constify.
8452 * buildsym.c (patch_subfile_names): Constify.
8453 * buildsym.h (next_symbol_text_func, patch_subfile_names):
8454 Constify.
8455 * c-exp.y (yyerror): Constify.
8456 (token::oper): Constify.
8457 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
8458 * c-varobj.c (cplus_describe_child): Constify.
8459 * charset.c (find_charset_names): Add cast.
8460 (find_charset_names): Constify array and add const_cast.
8461 * cli/cli-cmds.c (complete_command, cd_command): Constify.
8462 (edit_command): Constify.
8463 * cli/cli-decode.c (lookup_cmd): Constify.
8464 * cli/cli-dump.c (dump_memory_command, dump_value_command):
8465 Constify.
8466 (struct dump_context): Constify.
8467 (add_dump_command, restore_command): Constify.
8468 * cli/cli-script.c (get_command_line): Constify.
8469 * cli/cli-script.h (get_command_line): Constify.
8470 * cli/cli-utils.c (check_for_argument): Constify.
8471 * cli/cli-utils.h (check_for_argument): Constify.
8472 * coff-pe-read.c (struct read_pe_section_data): Constify.
8473 * command.h (lookup_cmd): Constify.
8474 * common/print-utils.c (decimal2str): Constify.
8475 * completer.c (gdb_print_filename): Constify.
8476 * corefile.c (set_gnutarget): Constify.
8477 * cp-name-parser.y (yyerror): Constify.
8478 * cp-valprint.c (cp_print_class_member): Constify.
8479 * cris-tdep.c (cris_register_name, crisv32_register_name):
8480 Constify.
8481 * d-exp.y (yyerror): Constify.
8482 (struct token::oper): Constify.
8483 * d-lang.h (d_yyerror): Constify.
8484 * dbxread.c (struct header_file_location::name): Constify.
8485 (add_old_header_file, add_new_header_file, last_function_name)
8486 (dbx_next_symbol_text, add_bincl_to_list)
8487 (find_corresponding_bincl_psymtab, set_namestring)
8488 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
8489 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
8490 * defs.h (command_line_input, print_address_symbolic)
8491 (deprecated_readline_begin_hook): Constify.
8492 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
8493 Constify.
8494 * event-top.c (handle_line_of_input): Constify and add cast.
8495 * exceptions.c (catch_errors): Constify.
8496 * exceptions.h (catch_errors): Constify.
8497 * expprint.c (print_subexp_standard, op_string, op_name)
8498 (op_name_standard, dump_raw_expression, dump_raw_expression):
8499 * expression.h (op_name, op_string, dump_raw_expression):
8500 Constify.
8501 * f-exp.y (yyerror): Constify.
8502 (struct token::oper): Constify.
8503 (struct f77_boolean_val::name): Constify.
8504 * f-lang.c (f_word_break_characters): Constify.
8505 * f-lang.h (f_yyerror): Constify.
8506 * fork-child.c (fork_inferior): Add cast.
8507 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
8508 (new_variant): Constify.
8509 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
8510 * gdbarch.c: Regenerate.
8511 * gdbcore.h (set_gnutarget): Constify.
8512 * go-exp.y (yyerror): Constify.
8513 (token::oper): Constify.
8514 * go-lang.h (go_yyerror): Constify.
8515 * go32-nat.c (go32_sysinfo): Constify.
8516 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
8517 * guile/scm-cmd.c (cmdscm_function): Constify.
8518 * guile/scm-param.c (pascm_param_value): Constify.
8519 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
8520 (h8300sx_register_name): Constify.
8521 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
8522 Constify.
8523 * ia64-tdep.c (ia64_register_names): Constify.
8524 * infcmd.c (construct_inferior_arguments): Constify.
8525 (path_command, attach_post_wait): Constify.
8526 * language.c (show_range_command, show_case_command)
8527 (unk_lang_error): Constify.
8528 * language.h (language_defn::la_error)
8529 (language_defn::la_name_of_this): Constify.
8530 * linespec.c (decode_line_2): Constify.
8531 * linux-thread-db.c (thread_db_err_str): Constify.
8532 * lm32-tdep.c (lm32_register_name): Constify.
8533 * m2-exp.y (yyerror): Constify.
8534 * m2-lang.h (m2_yyerror): Constify.
8535 * m32r-tdep.c (m32r_register_names): Constify and make static.
8536 * m68hc11-tdep.c (m68hc11_register_names): Constify.
8537 * m88k-tdep.c (m88k_register_name): Constify.
8538 * macroexp.c (appendmem): Constify.
8539 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
8540 (upgrade_type, parse_external, parse_partial_symbols)
8541 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
8542 (new_symbol): Constify.
8543 * memattr.c (mem_info_command): Constify.
8544 * mep-tdep.c (register_name_from_keyword): Constify.
8545 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
8546 Constify.
8547 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
8548 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
8549 * mi/mi-main.c (captured_mi_execute_command): Constify and add
8550 cast.
8551 (mi_execute_async_cli_command): Constify.
8552 * mips-tdep.c (mips_register_name): Constify.
8553 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
8554 (am33_register_name, am33_2_register_name)
8555 * moxie-tdep.c (moxie_register_names): Constify.
8556 * nat/linux-osdata.c (osdata_type): Constify fields.
8557 * nto-tdep.c (nto_parse_redirection): Constify.
8558 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
8559 (lookup_child_selector): Constify.
8560 (objc_methcall::name): Constify.
8561 * objc-lang.h (lookup_objc_class, lookup_child_selector)
8562 (lookup_struct_typedef): Constify.
8563 * objfiles.c (pc_in_section): Constify.
8564 * objfiles.h (pc_in_section): Constify.
8565 * p-exp.y (struct token::oper): Constify.
8566 (yyerror): Constify.
8567 * p-lang.h (pascal_yyerror): Constify.
8568 * parser-defs.h (op_name_standard): Constify.
8569 (op_print::string): Constify.
8570 (exp_descriptor::op_name): Constify.
8571 * printcmd.c (print_address_symbolic): Constify.
8572 * psymtab.c (print_partial_symbols): Constify.
8573 * python/py-breakpoint.c (stop_func): Constify.
8574 (bppy_get_expression): Constify.
8575 * python/py-cmd.c (cmdpy_completer::name): Constify.
8576 (cmdpy_function): Constify.
8577 * python/py-event.c (evpy_add_attribute)
8578 (gdbpy_initialize_event_generic): Constify.
8579 * python/py-event.h (evpy_add_attribute)
8580 (gdbpy_initialize_event_generic): Constify.
8581 * python/py-evts.c (add_new_registry): Constify.
8582 * python/py-finishbreakpoint.c (outofscope_func): Constify.
8583 * python/py-framefilter.c (get_py_iter_from_func): Constify.
8584 * python/py-inferior.c (get_buffer): Add cast.
8585 * python/py-param.c (parm_constant::name): Constify.
8586 * python/py-unwind.c (fprint_frame_id): Constify.
8587 * python/python.c (gdbpy_parameter_value): Constify.
8588 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
8589 * remote.c (memory_packet_config::name): Constify.
8590 (show_packet_config_cmd, remote_write_bytes)
8591 (remote_buffer_add_string):
8592 * reverse.c (exec_reverse_once): Constify.
8593 * rs6000-tdep.c (variant::name, variant::description): Constify.
8594 * rust-exp.y (rustyyerror): Constify.
8595 * rust-lang.c (rust_op_name): Constify.
8596 * rust-lang.h (rustyyerror): Constify.
8597 * serial.h (serial_ops::name): Constify.
8598 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
8599 (sh_sh3e_register_name, sh_sh2e_register_name)
8600 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
8601 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
8602 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
8603 (sh_sh4al_dsp_register_name): Constify.
8604 * sh64-tdep.c (sh64_register_name): Constify.
8605 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
8606 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
8607 * stabsread.c (patch_block_stabs, read_type_number)
8608 (ref_map::stabs, ref_add, process_reference)
8609 (symbol_reference_defined, define_symbol, define_symbol)
8610 (error_type, read_type, read_member_functions, read_cpp_abbrev)
8611 (read_one_struct_field, read_struct_fields, read_baseclasses)
8612 (read_tilde_fields, read_struct_type, read_array_type)
8613 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
8614 (read_huge_number, read_range_type, read_args, common_block_start)
8615 (find_name_end): Constify.
8616 * stabsread.h (common_block_start, define_symbol)
8617 (process_one_symbol, symbol_reference_defined, ref_add):
8618 * symfile.c (get_section_index, add_symbol_file_command):
8619 * symfile.h (get_section_index): Constify.
8620 * target-descriptions.c (tdesc_type::name): Constify.
8621 (tdesc_free_type): Add cast.
8622 * target.c (find_default_run_target):
8623 (add_deprecated_target_alias, find_default_run_target)
8624 (target_announce_detach): Constify.
8625 (do_option): Constify.
8626 * target.h (add_deprecated_target_alias): Constify.
8627 * thread.c (print_thread_info_1): Constify.
8628 * top.c (deprecated_readline_begin_hook, command_line_input):
8629 Constify.
8630 (init_main): Add casts.
8631 * top.h (handle_line_of_input): Constify.
8632 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
8633 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
8634 (tfind_command): Rename to ...
8635 (tfind_command_1): ... this and constify.
8636 (tfind_command): New function.
8637 (tfind_end_command, tfind_start_command): Adjust.
8638 (encode_source_string): Constify.
8639 * tracepoint.h (encode_source_string): Constify.
8640 * tui/tui-data.c (tui_partial_win_by_name): Constify.
8641 * tui/tui-data.h (tui_partial_win_by_name): Constify.
8642 * tui/tui-source.c (tui_set_source_content_nil): Constify.
8643 * tui/tui-source.h (tui_set_source_content_nil): Constify.
8644 * tui/tui-win.c (parse_scrolling_args): Constify.
8645 * tui/tui-windata.c (tui_erase_data_content): Constify.
8646 * tui/tui-windata.h (tui_erase_data_content): Constify.
8647 * tui/tui-winsource.c (tui_erase_source_content): Constify.
8648 * tui/tui.c (tui_enable): Add cast.
8649 * utils.c (defaulted_query): Constify.
8650 (init_page_info): Add cast.
8651 (puts_debug, subset_compare): Constify.
8652 * utils.h (subset_compare): Constify.
8653 * varobj.c (varobj_format_string): Constify.
8654 * varobj.h (varobj_format_string): Constify.
8655 * vax-tdep.c (vax_register_name): Constify.
8656 * windows-nat.c (windows_detach): Constify.
8657 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
8658 * xml-support.c (gdb_xml_end_element): Constify.
8659 * xml-tdesc.c (tdesc_start_reg): Constify.
8660 * xstormy16-tdep.c (xstormy16_register_name): Constify.
8661 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
8662 * xtensa-tdep.h (xtensa_register_t::name): Constify.
8663
8664 2017-04-05 Pedro Alves <palves@redhat.com>
8665
8666 * proc-api.c (struct trans): Constify.
8667 (procfs_note): Constify.
8668 * proc-events.c (struct trans, syscall_table):
8669 * proc-flags.c (struct trans): Constify.
8670 * proc-utils.h (procfs_note): Constify.
8671 * proc-why.c (struct trans): Constify.
8672 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
8673 (procfs_detach): Constify.
8674 * sol-thread.c (struct string_map): Constify.
8675 (td_err_string, td_state_string): Constify.
8676
8677 2017-04-05 Pedro Alves <palves@redhat.com>
8678
8679 * proc-api.c (procfs_filename): Don't initialize
8680 procfs_filename.
8681 (prepare_to_trace): Assume procfs_filename is non-NULL.
8682 (_initialize_proc_api): Give procfs_filename a default value here.
8683
8684 2017-04-05 Pedro Alves <palves@redhat.com>
8685
8686 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
8687 'cond_string' parameter.
8688 (extract_exception_regexp): Constify 'string' parameter.
8689 (catch_exception_command_1): Constify.
8690 * breakpoint.c (init_catchpoint)
8691 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
8692 parameter.
8693 (ep_parse_optional_if_clause, catch_fork_command_1)
8694 (catch_exec_command_1): Constify.
8695 * breakpoint.h (init_catchpoint): Constify 'cond_string'
8696 parameter.
8697 (ep_parse_optional_if_clause): Constify.
8698 * cli/cli-utils.c (remove_trailing_whitespace)
8699 (check_for_argument): Constify.
8700 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
8701 non-const overload.
8702 (check_for_argument): Likewise.
8703
8704 2017-04-05 Pedro Alves <palves@redhat.com>
8705
8706 * event-top.c (command_line_handler): Add cast to execute_command
8707 call.
8708 * record-btrace.c (cmd_record_btrace_bts_start)
8709 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
8710 (cmd_record_btrace_start): Add cast to execute_command call.
8711 * record-full.c (record_full_goto_insn):
8712 * record.c (record_start, record_stop): Add cast to
8713 execute_command_to_string calls.
8714 (cmd_record_start): Add cast to execute_command calls.
8715
8716 2017-04-05 Pedro Alves <palves@redhat.com>
8717
8718 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
8719 static inline function.
8720 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
8721 array and use gdb_PyArg_ParseTupleAndKeywords.
8722 * python/py-cmd.c (cmdpy_init): Likewise.
8723 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
8724 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
8725 (infpy_search_memory): Likewise.
8726 * python/py-objfile.c (objfpy_add_separate_debug_file)
8727 (gdbpy_lookup_objfile): Likewise.
8728 * python/py-symbol.c (gdbpy_lookup_symbol)
8729 (gdbpy_lookup_global_symbol): Likewise.
8730 * python/py-type.c (gdbpy_lookup_type): Likewise.
8731 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
8732 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
8733 Likewise.
8734
8735 2017-04-05 Pedro Alves <palves@redhat.com>
8736
8737 * python/python-internal.h (gdb_PyGetSetDef): New type.
8738 * python/py-block.c (block_object_getset)
8739 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
8740 * python/py-event.c (event_object_getset)
8741 (finish_breakpoint_object_getset): Likewise.
8742 * python/py-inferior.c (inferior_object_getset): Likewise.
8743 * python/py-infthread.c (thread_object_getset): Likewise.
8744 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
8745 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
8746 * python/py-objfile.c (objfile_getset): Likewise.
8747 * python/py-progspace.c (pspace_getset): Likewise.
8748 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
8749 Likewise.
8750 * python/py-record.c (recpy_record_getset): Likewise.
8751 * python/py-symbol.c (symbol_object_getset): Likewise.
8752 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
8753 Likewise.
8754 * python/py-type.c (type_object_getset, field_object_getset):
8755 Likewise.
8756 * python/py-value.c (value_object_getset): Likewise.
8757
8758 2017-04-05 Pedro Alves <palves@redhat.com>
8759
8760 * python/python-internal.h (gdb_PyObject_CallMethod)
8761 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
8762 New functions.
8763 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
8764 (PySys_GetObject, PySys_SetPath): New macros.
8765
8766 2017-04-05 Pedro Alves <palves@redhat.com>
8767
8768 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
8769 info_osdata_command.
8770 * osdata.c (info_osdata_command): Rename to ...
8771 (info_osdata): ... this. Constify 'type' parameter, and remove
8772 the 'from_tty' parameter. Accept NULL TYPE.
8773 (info_osdata_command): New function.
8774 * osdata.h (info_osdata_command): Remove declaration.
8775 (info_osdata): New declaration.
8776
8777 2017-04-05 Pedro Alves <palves@redhat.com>
8778
8779 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
8780 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
8781 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
8782 parameter.
8783 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
8784 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
8785 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
8786 parameter.
8787 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
8788 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
8789 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
8790 (mi_cmd_file_list_exec_source_files)
8791 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
8792 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8793 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
8794 parameter.
8795 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
8796 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
8797 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
8798 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
8799 (mi_cmd_stack_info_frame): Constify 'command' parameter.
8800 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
8801 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
8802 'command' parameter.
8803 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
8804 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
8805 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
8806 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
8807 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
8808 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
8809 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
8810 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
8811 (mi_cmd_var_set_update_range): Constify 'command' parameter.
8812 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
8813 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
8814 parameter.
8815 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
8816 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
8817 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
8818 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
8819 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
8820 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
8821 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
8822 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
8823 (mi_cmd_data_list_changed_registers)
8824 (mi_cmd_data_write_register_values)
8825 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8826 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8827 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8828 (mi_cmd_list_features, mi_cmd_list_target_features)
8829 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8830 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8831 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8832 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8833 (mi_cmd_trace_frame_collected): Constify 'command'
8834 parameter.
8835 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8836 'command' parameter.
8837
8838 2017-04-05 Pedro Alves <palves@redhat.com>
8839
8840 * ada-lang.c (ada_completer_word_break_characters): Now a const
8841 array.
8842 (ada_get_gdb_completer_word_break_characters): Constify.
8843 * completer.c (gdb_completer_command_word_break_characters)
8844 (gdb_completer_file_name_break_characters)
8845 (gdb_completer_quote_characters): Now const arrays.
8846 (get_gdb_completer_quote_characters): Constify.
8847 (set_rl_completer_word_break_characters): New function.
8848 (set_gdb_completion_word_break_characters)
8849 (complete_line_internal): Use it.
8850 * completer.h (get_gdb_completer_quote_characters): Constify.
8851 (set_rl_completer_word_break_characters): Declare.
8852 * f-lang.c (f_word_break_characters): Constify.
8853 * language.c (default_word_break_characters): Constify.
8854 * language.h (language_defn::la_word_break_characters): Constify.
8855 (default_word_break_characters): Constify.
8856 * top.c (init_main): Use set_rl_completer_word_break_characters.
8857
8858 2017-04-05 Pedro Alves <palves@redhat.com>
8859
8860 * aix-thread.c (aix_thread_pid_to_str)
8861 (aix_thread_extra_thread_info): Constify.
8862 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8863 * bsd-uthread.c (bsd_uthread_extra_thread_info)
8864 (bsd_uthread_pid_to_str): Constify.
8865 * corelow.c (core_pid_to_str): Constify.
8866 * darwin-nat.c (darwin_pid_to_str): Constify.
8867 * fbsd-nat.c (fbsd_pid_to_str): Constify.
8868 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8869 Constify.
8870 * gnu-nat.c (gnu_pid_to_str): Constify.
8871 * go32-nat.c (go32_pid_to_str): Constify.
8872 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8873 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8874 * inferior.c (inferior_pid_to_str): Constify.
8875 * linux-nat.c (linux_nat_pid_to_str): Constify.
8876 * linux-tdep.c (linux_core_pid_to_str): Constify.
8877 * linux-thread-db.c (thread_db_pid_to_str)
8878 (thread_db_extra_thread_info): Constify.
8879 * nto-tdep.c (nto_extra_thread_info): Constify.
8880 * nto-tdep.h (nto_extra_thread_info): Constify.
8881 * obsd-nat.c (obsd_pid_to_str): Constify.
8882 * procfs.c (procfs_pid_to_str): Constify.
8883 * ravenscar-thread.c (ravenscar_extra_thread_info)
8884 (ravenscar_pid_to_str): Constify.
8885 * remote-sim.c (gdbsim_pid_to_str): Constify.
8886 * remote.c (remote_threads_extra_info, remote_pid_to_str):
8887 Constify.
8888 * sol-thread.c (solaris_pid_to_str): Constify.
8889 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8890 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8891 * target.c (default_pid_to_str, target_pid_to_str)
8892 (normal_pid_to_str, default_pid_to_str): Constify.
8893 * target.h (target_ops::to_pid_to_str)
8894 (target_ops::to_extra_thread_info): Constify.
8895 (target_pid_to_str, normal_pid_to_str): Constify.
8896 * windows-nat.c (windows_pid_to_str): Constify.
8897 * gdbarch.sh (core_pid_to_str): Constify.
8898 * target-delegates.c: Regenerate.
8899 * gdbarch.h, gdbarch.c: Regenerate.
8900
8901 2017-04-05 Pedro Alves <palves@redhat.com>
8902
8903 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8904 the memory of the temporary warning_pre_print override.
8905 * utils.c (warning_pre_print): Constify.
8906 * utils.h (warning_pre_print): Constify.
8907
8908 2017-04-05 Pedro Alves <palves@redhat.com>
8909
8910 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8911 (shell_command): New function.
8912 (make_command): Use std::string.
8913 (init_cli_cmds): Register shell_command instead of shell_escape.
8914
8915 2017-04-05 Pedro Alves <palves@redhat.com>
8916
8917 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
8918 * tracepoint.c (default_collect): Don't initialize.
8919
8920 2017-04-05 Pedro Alves <palves@redhat.com>
8921
8922 * macroexp.c (macro_buffer::shared): Now a bool.
8923 (init_buffer): Update.
8924 (init_shared_buffer): Constify 'addr' parameter.
8925 (substitute_args, expand, macro_expand, macro_expand_next): Remove
8926 casts.
8927
8928 2017-04-05 Pedro Alves <palves@redhat.com>
8929
8930 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
8931 * disasm.c (set_disassembler_options): Constify local.
8932 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
8933
8934 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
8935
8936 PR gdb/21352
8937 * tracefile.c (tsave_command): Fix argument parsing for '-r'
8938 option.
8939
8940 2017-04-05 Yao Qi <yao.qi@linaro.org>
8941
8942 * frame.c (frame_unwind_register_unsigned): Call
8943 frame_unwind_register_value.
8944
8945 2017-04-05 Yao Qi <yao.qi@linaro.org>
8946
8947 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
8948 Use gdb_test_multiple, and don't match anchor.
8949
8950 2017-04-05 Pedro Alves <palves@redhat.com>
8951
8952 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
8953 (Write After Approval): Remove Simon Marchi.
8954
8955 2017-04-05 Pedro Alves <palves@redhat.com>
8956
8957 * common/gdb_optional.h (optional::optional): Make constexpr and
8958 initialize m_dummy.
8959
8960 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8961
8962 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8963 (amd64fbsd_jmp_buf_reg_offset): Remove.
8964 (amd64fbsd_supply_uthread): Remove function.
8965 (amd64fbsd_collect_uthread): Remove function.
8966 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
8967 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
8968 (x86_64-*-freebsd*): Remove bsd-uthread.o.
8969 (fbsd-nat.c): Update comment.
8970 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8971 (i386fbsd_jmp_buf_reg_offset): Remove.
8972 (i386fbsd_supply_uthread): Remove function.
8973 (i386fbsd_collect_uthread): Remove function.
8974 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
8975
8976 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8977
8978 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
8979 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
8980 * NEWS: Mention that support for FreeBSD/alpha was removed.
8981 * alpha-fbsd-tdep.c: Delete file.
8982 * config/alpha/fbsd.mh: Delete file.
8983 * configure.host: Delete alpha*-*-freebsd* and
8984 alpha*-*-kfreebsd*-gnu.
8985 * configure.tgt: Delete alpha*-*-freebsd* and
8986 alpha*-*-kfreebsd*-gnu.
8987
8988 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8989
8990 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
8991 amd64bsd_store_inferior_registers): Use ptid from regcache.
8992
8993 2017-04-04 Pedro Alves <palves@redhat.com>
8994
8995 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
8996 data fields, make them private and add "m_" prefixes.
8997 (lnp_state_machine::lnp_state_machine): New ctor.
8998 (record_line, check_line_address, handle_set_discriminator)
8999 (handle_set_address, handle_advance_pc, handle_special_opcode)
9000 (handle_advance_line, handle_set_file, handle_negate_stmt)
9001 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
9002 (end_sequence, advance_line): New methods.
9003 (m_gdbarch, m_record_lines_p): New fields.
9004 (lnp_reader_state): Delete.
9005 (dwarf_record_line): Rename to ...
9006 (lnp_state_machine::record_line): ... adjust.
9007 (init_lnp_state_machine): Delete.
9008 (lnp_state_machine::lnp_state_machine): New.
9009 (check_line_address): Rename to ...
9010 (lnp_state_machine::check_line_address): This.
9011 (dwarf_decode_lines_1): Remove reference to "reader_state".
9012 Adjust lnp_state_machine having a non-default ctor. Use bool.
9013 State machine internal state manipulation moved to
9014 lnp_state_machine methods.
9015
9016 2017-04-04 Pedro Alves <palves@redhat.com>
9017
9018 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9019 unittests/offset-type-selftests.c.
9020 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
9021 * common/offset-type.h: New file.
9022 * common/preprocessor.h: New file.
9023 * common/traits.h: New file.
9024 * common/valid-expr.h: New file.
9025 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
9026 sect_offset and cu_offset strong typedefs throughout.
9027 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
9028 typedefs throughout.
9029 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
9030 sect_offset and cu_offset strong typedefs throughout.
9031 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
9032 typedefs throughout.
9033 * gdbtypes.h: Include "common/offset-type.h".
9034 (cu_offset): Now an offset type (strong typedef) instead of a
9035 struct.
9036 (sect_offset): Likewise.
9037 (union call_site_parameter_u): Rename "param_offset" field to
9038 "param_cu_off".
9039 * unittests/offset-type-selftests.c: New file.
9040
9041 2017-04-04 Pedro Alves <palves@redhat.com>
9042
9043 * common/underlying.h: New file.
9044 * dwarf2read.c: Include "common/gdb_optional.h" and
9045 "common/underlying.h".
9046 (dir_index, file_name_index): New types.
9047 (file_entry): Use them.
9048 (file_entry::include): Use to_underlying.
9049 (line_header::add_file_name): Use dir_index.
9050 (read_formatted_entries): Use gdb::optional. Read form before
9051 writting to file_entry.
9052 (dwarf_decode_line_header): Use dir_index.
9053 (lnp_state_machine::current_file): Use to_underlying.
9054 (lnp_state_machine::file): Change type to file_name_index.
9055 (dwarf_record_line): Use to_underlying.
9056 (init_lnp_state_machine): Use file_name_index.
9057 (dwarf_decode_lines_1): Use dir_index and file_name_index.
9058
9059 2017-04-04 Pedro Alves <palves@redhat.com>
9060
9061 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
9062 operator bool, has_value and get methods.
9063
9064 2017-04-04 Pedro Alves <palves@redhat.com>
9065
9066 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
9067 fields.
9068 (line_header): Initialize all data fields. Change type of
9069 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
9070 Change type of include_dirs to std::vector<const char *>. Remove
9071 num_include_dirs, include_dirs_size. Change type of file_names to
9072 std::vector<file_entry>. Remove num_file_names, file_names_size.
9073 (line_header::line_header): New.
9074 (line_header::add_include_dir, line_header::add_file_name): New
9075 methods.
9076 (line_header::include_dir_at): Remove NULL check.
9077 (line_header::file_name_at): Add const overload.
9078 (line_header_up): New unique_ptr typedef.
9079 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
9080 std::vector. Remove free_line_header call.
9081 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
9082 free_line_header call.
9083 (free_cu_line_header): Delete.
9084 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
9085 (setup_type_unit_groups): Use line_header_up instead of cleanups.
9086 Adjust to use std::vector.
9087 (free_line_header): Delete.
9088 (free_line_header_voidp): Use delete.
9089 (add_include_dir): Replace with ...
9090 (line_header::add_include_dir): ... this method. Use std::vector.
9091 (add_file_name): Replace with ...
9092 (line_header::add_file_name): ... this method. Use std::vector.
9093 (add_include_dir_stub): Delete.
9094 (read_formatted_entries): Remove memset.
9095 (dwarf_decode_line_header): Return a line_header_up instead of a
9096 raw pointer. Remove cleanup handling. Pass lambdas to
9097 read_formatted_entries. Adjust to use line_header methods.
9098 (dwarf_decode_lines_1): Adjust to use line_header methods.
9099 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
9100 use std::vector.
9101
9102 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
9103
9104 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
9105 instead of struct ptid.
9106
9107 2017-05-04 Alan Hayward <alan.hayward@arm.com>
9108
9109 * frame.c (get_frame_register_bytes): Unwind using value.
9110 (put_frame_register_bytes): Likewise.
9111
9112 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
9113
9114 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
9115 aggregate-like.
9116
9117 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
9118
9119 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
9120
9121 2017-03-29 Yao Qi <yao.qi@linaro.org>
9122
9123 * gdbthread.h (struct thread_info): Declare constructor and
9124 destructor. Add some in-class member initializers.
9125 * thread.c (free_thread): Remove.
9126 (init_thread_list): Call delete instead of free_thread.
9127 (new_thread): Call thread_info constructor.
9128 (thread_info::thread_info): New function.
9129 (thread_info::~thread_info): New function.
9130 (delete_thread_1): Call delete instead of free_thread.
9131 (make_cleanup_restore_current_thread): Move tp and frame to
9132 inner block.
9133
9134 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9135
9136 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
9137 (arc_skip_prologue): Likewise.
9138 (arc_make_frame_cache): Likewise.
9139 (arc_pv_get_operand): New function.
9140 (arc_is_in_prologue): Likewise.
9141 (arc_analyze_prologue): Likewise.
9142 (arc_print_frame_cache): Likewise.
9143 (MAX_PROLOGUE_LENGTH): New constant.
9144
9145 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9146
9147 * configure.tgt: Add arc-insn.o.
9148 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
9149 (dump_arc_instruction_command): New function.
9150 (arc_fprintf_disasm): Likewise.
9151 (arc_disassemble_info): Likewise.
9152 (arc_insn_get_operand_value): Likewise.
9153 (arc_insn_get_operand_value_signed): Likewise.
9154 (arc_insn_get_memory_base_reg): Likewise.
9155 (arc_insn_get_memory_offset): Likewise.
9156 (arc_insn_get_branch_target): Likewise.
9157 (arc_insn_dump): Likewise.
9158 (arc_insn_get_linear_next_pc): Likewise.
9159 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
9160 (arc_disassemble_info): Likewise.
9161 (arc_insn_get_branch_target): Likewise.
9162 (arc_insn_get_linear_next_pc): Likewise.
9163 * NEWS: Mention new "maint print arc arc-instruction".
9164
9165 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9166
9167 * arc-tdep (maintenance_print_arc_list): New variable.
9168 (maintenance_print_arc_command): New function.
9169
9170 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9171
9172 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
9173 Add "limm" and "reserved".
9174 (arc_cannot_fetch_register, arc_cannot_store_register): Add
9175 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
9176 * arc-tdep.h (arc_regnum): Likewise.
9177
9178 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9179
9180 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9181 for THREADPTR register.
9182 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
9183 register.
9184 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
9185 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
9186 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
9187
9188 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9189
9190 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
9191 registers above gdbarch_num_regs (gdbarch) as privileged in
9192 call0 ABI.
9193
9194 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9195
9196 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9197 for a single specified register or for all registers in
9198 a0_base..a0_base + C0_NREGS range.
9199 (supply_gregset_reg): Call regcache_raw_supply for a single
9200 specified register or for all registers in a0_base..a0_base +
9201 C0_NREGS range.
9202
9203 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9204
9205 * arch/xtensa.h (C0_NREGS): Add definition.
9206 * xtensa-tdep.c (C0_NREGS): Remove definition.
9207
9208 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9209
9210 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9211 Drop xtensa_default_isa initialization.
9212 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9213
9214 2017-03-27 Pedro Alves <palves@redhat.com>
9215
9216 * dwarf2read.c (file_entry) <dir_index>: Add comment.
9217 (file_entry::include_dir): New method.
9218 (line_header::include_dir_at, line_header::file_name_at): New
9219 methods.
9220 (setup_type_unit_groups, setup_type_unit_groups)
9221 (psymtab_include_file_name): Simplify using the new methods.
9222 (lnp_state_machine) <the_line_header>: New field.
9223 <file>: Add comment.
9224 (lnp_state_machine::current_file): New method.
9225 (dwarf_record_line): Simplify using the new methods.
9226 (init_lnp_state_machine): Initialize the "the_line_header" field.
9227 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9228 Simplify using the new methods.
9229
9230 2017-03-27 Pedro Alves <palves@redhat.com>
9231
9232 * cp-name-parser.y (make_empty): Delete.
9233 (demangler_special, nested_name, ptr_operator, array_indicator)
9234 (direct_declarator, declarator_1): Use fill_comp instead of
9235 make_empty.
9236
9237 2017-03-27 Pedro Alves <palves@redhat.com>
9238
9239 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9240 to ATTRIBUTE_PRINTF.
9241 * solib-target.c (library_list_start_list): Print "string" not
9242 "version".
9243 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9244 gdb_xml_error call.
9245
9246 2017-03-27 Pedro Alves <palves@redhat.com>
9247
9248 * dwarf2read.c (struct file_and_directory): New.
9249 (dwarf2_get_dwz_file): Adjust to use std::string.
9250 (dw2_get_file_names_reader): Adjust to use file_and_directory.
9251 (find_file_and_directory): Adjust to return a file_and_directory
9252 object.
9253 (read_file_scope): Adjust to use file_and_directory. Remove
9254 make_cleanup/do_cleanups calls.
9255 (open_and_init_dwp_file): Adjust to use std::string. Remove
9256 make_cleanup/do_cleanups calls.
9257 * python/python.c (do_start_initialization): Adjust to ldirname
9258 returning a std::string.
9259 * utils.c (ldirname): Now returns a std::string.
9260 * utils.h (ldirname): Change return type to std::string.
9261 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9262 returning a std::string.
9263 * xml-tdesc.c (file_read_description_xml): Likewise.
9264
9265 2017-03-24 Alan Hayward <alan.hayward@arm.com>
9266
9267 * regcache.c (regcache_debug_print_register): New function.
9268 * regcache.h (regcache_debug_print_register): New declaration.
9269 * target.c (debug_print_register): Remove.
9270 (target_fetch_registers): Call regcache_debug_print_register.
9271 (target_store_registers): Likewise.
9272
9273 2017-03-24 Pádraig Brady <pbrady@fb.com>
9274
9275 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
9276 reference beyond the 'lh->include_dirs' array before accessing to
9277 it.
9278 (psymtab_include_file_name): Likewise.
9279 (dwarf_decode_lines_1): Likewise.
9280 (dwarf_decode_lines): Likewise.
9281 (file_file_name): Likewise.
9282
9283 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
9284
9285 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
9286 inferior_ptid.
9287 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9288 ps_lsetfpregs): Likewise.
9289 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
9290 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9291 ps_lsetfpregs): Likewise.
9292 * target.c (target_fetch_registers, target_store_registers):
9293 Remove asserts.
9294
9295 2017-03-23 Alan Hayward <alan.hayward@arm.com>
9296
9297 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
9298
9299 2017-03-23 Yao Qi <yao.qi@linaro.org>
9300
9301 * aarch64-tdep.c (aarch64_process_record_test): Declare.
9302 (_initialize_aarch64_tdep): Register it.
9303 (aarch64_record_load_store): Handle PRFM instruction.
9304 (aarch64_process_record_test): New function.
9305
9306 2017-03-23 Yao Qi <yao.qi@linaro.org>
9307
9308 * aarch64-tdep.c (aarch64_record_load_store): Fix code
9309 indentation.
9310
9311 2017-03-23 Yao Qi <yao.qi@linaro.org>
9312
9313 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
9314
9315 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9316
9317 python/python.c (do_start_initialization): Fix memory leak.
9318
9319 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9320
9321 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9322 using get_ptrace_pid.
9323 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9324 inferior_ptid.
9325 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9326 inferior_ptid instead of pid.
9327
9328 2017-03-22 Yao Qi <yao.qi@linaro.org>
9329
9330 * aarch64-tdep.c: Wrap locally used classes in anonymous
9331 namespace.
9332 * arm-tdep.c: Likewise.
9333 * linespec.c: Likewise.
9334 * ui-out.c: Likewise.
9335
9336 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
9337
9338 PR gdb/19637
9339 * python/lib/gdb/printer/bound_registers.py: Import sys.
9340
9341 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9342
9343 * windows-nat.c (do_windows_fetch_inferior_registers): Add
9344 windows_thread_info parameter and use it instead of
9345 current_thread.
9346 (windows_fetch_inferior_registers): Don't set current_thread,
9347 pass the thread to do_windows_fetch_inferior_registers. Use
9348 ptid from regcache instead of inferior_ptid.
9349 (do_windows_store_inferior_registers): Add windows_thread_info
9350 parameter and use it instead of current_thread.
9351 (windows_store_inferior_registers): Don't set current_thread,
9352 pass the thread to do_windows_store_inferior_registers. Use
9353 ptid from regcache instead of inferior_ptid.
9354
9355 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9356
9357 * ser-mingw.c (ser_windows_raw): Remove reference to
9358 struct serial::current_timeout.
9359
9360 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
9361
9362 PR tdep/20928
9363 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9364 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9365 (sparc64_fsr_type): Fix %fsr decoding.
9366
9367 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
9368
9369 * python/py-record-btrace.c (btpy_insn_data): Change return type
9370 for Python 2.
9371
9372 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9373
9374 * spu-linux-nat.c (spu_fetch_inferior_registers,
9375 spu_store_inferior_registers): Use ptid from regcache, set and
9376 restore inferior_ptid.
9377 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9378 Likewise.
9379
9380 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9381
9382 * i386-linux-nat.c (fetch_register, store_register,
9383 i386_linux_fetch_inferior_registers,
9384 i386_linux_store_inferior_registers): Use ptid from regcache.
9385 * ia64-linux-nat.c (ia64_linux_fetch_register,
9386 ia64_linux_store_register): Likewise.
9387 * inf-ptrace.c (inf_ptrace_fetch_register,
9388 inf_ptrace_store_register): Likewise.
9389 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
9390 m32r_linux_store_inferior_registers): Likewise.
9391 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
9392 m68kbsd_store_inferior_registers): Likewise.
9393 * m68k-linux-nat.c (fetch_register, store_register,
9394 m68k_linux_fetch_inferior_registers,
9395 m68k_linux_store_inferior_registers): Likewise.
9396 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
9397 m88kbsd_store_inferior_registers): Likewise.
9398 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
9399 mips_fbsd_store_inferior_registers): Likewise.
9400 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
9401 mips64_linux_regsets_store_registers): Likewise.
9402 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
9403 mipsnbsd_store_inferior_registers): Likewise.
9404 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
9405 mips64obsd_store_inferior_registers): Likewise.
9406 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
9407 Likewise.
9408 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
9409 ppcfbsd_store_inferior_registers): Likewise.
9410 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
9411 ppc_linux_store_inferior_registers): Likewise.
9412 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
9413 ppcnbsd_store_inferior_registers): Likewise.
9414 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
9415 ppcobsd_store_registers): Likewise.
9416 * procfs.c (procfs_fetch_registers, procfs_store_registers):
9417 Likewise.
9418 * ravenscar-thread.c (ravenscar_fetch_registers,
9419 ravenscar_store_registers, ravenscar_prepare_to_store):
9420 Likewise.
9421 * record-btrace.c (record_btrace_fetch_registers,
9422 record_btrace_store_registers, record_btrace_prepare_to_store):
9423 Likewise.
9424 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
9425 Lookup inferior using ptid from regcache, instead of
9426 current_inferior.
9427 * remote.c (remote_fetch_registers, remote_store_registers): Use
9428 ptid from regcache.
9429 * rs6000-nat.c (fetch_register, store_register): Likewise.
9430 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
9431 s390_linux_store_inferior_registers): Likewise.
9432 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
9433 shnbsd_store_inferior_registers): Likewise.
9434 * sol-thread.c (sol_thread_fetch_registers,
9435 sol_thread_store_registers): Likewise.
9436 * sparc-nat.c (sparc_fetch_inferior_registers,
9437 sparc_store_inferior_registers): Likewise.
9438 * tilegx-linux-nat.c (fetch_inferior_registers,
9439 store_inferior_registers): Likewise.
9440 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
9441 vaxbsd_store_inferior_registers): Likewise.
9442 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
9443 store_xtregs): Likewise.
9444
9445 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9446
9447 PR gdb/14441
9448 * NEWS: Mention support for rvalue references in GDB and python.
9449 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
9450 supports both lvalue and rvalue references.
9451
9452 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9453
9454 PR gdb/14441
9455 * gdbtypes.c (rank_one_type): Implement overloading
9456 resolution rules regarding rvalue references.
9457
9458 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9459
9460 PR gdb/14441
9461 * aarch64-tdep.c (aarch64_type_align)
9462 (aarch64_extract_return_value, aarch64_store_return_value): Change
9463 lvalue reference type checks to general reference type checks.
9464 * amd64-tdep.c (amd64_classify): Likewise.
9465 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
9466 Likewise.
9467 * arm-tdep.c (arm_type_align, arm_extract_return_value)
9468 (arm_store_return_value): Likewise.
9469 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
9470 * c-typeprint.c (c_print_type): Likewise.
9471 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
9472 (cplus_number_of_children, cplus_describe_child): Likewise.
9473 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
9474 * completer.c (expression_completer): Likewise.
9475 * cp-support.c (make_symbol_overload_list_adl_namespace):
9476 Likewise.
9477 * darwin-nat-info.c (info_mach_region_command): Likewise.
9478 * dwarf2loc.c (entry_data_value_coerce_ref)
9479 (value_of_dwarf_reg_entry): Likewise.
9480 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
9481 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
9482 Likewise.
9483 * findvar.c (extract_typed_address, store_typed_address):
9484 Likewise.
9485 * gdbtypes.c (rank_one_type): Likewise.
9486 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
9487 * infcall.c (value_arg_coerce): Likewise.
9488 * language.c (pointer_type): Likewise.
9489 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
9490 Likewise.
9491 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
9492 * mn10300-tdep.c (mn10300_type_align): Likewise.
9493 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
9494 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
9495 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
9496 Likewise.
9497 * printcmd.c (print_formatted, x_command): Likewise.
9498 * python/py-type.c (typy_get_composite, typy_template_argument):
9499 Likewise.
9500 * python/py-value.c (valpy_referenced_value)
9501 (valpy_get_dynamic_type, value_has_field): Likewise.
9502 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
9503 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
9504 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
9505 * spu-tdep.c (spu_scalar_value_p): Likewise.
9506 * symtab.c (lookup_symbol_aux): Likewise.
9507 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
9508 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
9509 Likewise.
9510 * valops.c (value_cast_pointers, value_cast)
9511 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
9512 (value_struct_elt, value_struct_elt_bitpos)
9513 (value_find_oload_method_list, find_overload_match)
9514 (value_rtti_indirect_type): Likewise.
9515 * valprint.c (val_print_scalar_type_p, generic_val_print):
9516 Likewise.
9517 * value.c (value_actual_type, value_as_address, unpack_long)
9518 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
9519 (coerce_ref): Likewise.
9520 * varobj.c (varobj_get_value_type): Likewise.
9521
9522 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9523
9524 PR gdb/14441
9525 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
9526 table of constants.
9527 * python/lib/gdb/command/explore.py: Support exploring values
9528 of rvalue reference types.
9529 * python/lib/gdb/types.py: Implement get_basic_type() for
9530 rvalue reference types.
9531 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
9532 constant.
9533 * python/py-value.c (valpy_getitem): Add an rvalue reference
9534 check.
9535 (valpy_reference_value): Add new parameter "refcode".
9536 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
9537 New wrappers for valpy_reference_value().
9538 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9539 (gdbpy_invoke_xmethod): Likewise.
9540
9541 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9542
9543 PR gdb/14441
9544 * dwarf2read.c (process_die, read_type_die_1): Handle the
9545 DW_TAG_rvalue_reference_type DIE.
9546 (read_tag_reference_type): Add new parameter "refcode".
9547
9548 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9549
9550 PR gdb/14441
9551 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
9552 (c_type_print_modifier, c_type_print_varspec_suffix)
9553 (c_type_print_base): Support printing rvalue reference types.
9554 * c-valprint.c (c_val_print, c_value_print): Support printing
9555 rvalue reference values.
9556
9557 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9558
9559 PR gdb/14441
9560 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
9561 typename.
9562 * cp-support.c (replace_typedefs): Handle
9563 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
9564 * python/py-type.c (typy_lookup_type): Likewise.
9565
9566 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9567
9568 PR gdb/14441
9569 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
9570 * parse.c (insert_type): Change assert statement.
9571 (follow_types): Handle rvalue reference types.
9572 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
9573 constant.
9574
9575 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9576
9577 PR gdb/14441
9578 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
9579 value_ref() interface.
9580 * c-valprint.c (c_value_print): Likewise.
9581 * infcall.c (value_arg_coerce): Likewise.
9582 * python/py-value.c (valpy_reference_value): Likewise.
9583 * valops.c (value_cast, value_reinterpret_cast)
9584 (value_dynamic_cast, typecmp): Likewise.
9585 (value_ref): Parameterize by kind of return value reference type.
9586 * value.h (value_ref): Add new parameter "refcode".
9587
9588 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9589
9590 PR gdb/14441
9591 * dwarf2read.c (read_tag_reference_type): Use
9592 lookup_lvalue_reference_type() instead of lookup_reference_type().
9593 * eval.c (evaluate_subexp_standard): Likewise.
9594 * f-exp.y: Likewise.
9595 * gdbtypes.c (make_reference_type, lookup_reference_type):
9596 Generalize with rvalue reference types.
9597 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
9598 convenience wrappers for lookup_reference_type().
9599 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
9600 reference kind parameter.
9601 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
9602 wrappers for lookup_reference_type().
9603 * guile/scm-type.c (gdbscm_type_reference): Use
9604 lookup_lvalue_reference_type() instead of lookup_reference_type().
9605 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
9606 * parse.c (follow_types): Likewise.
9607 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
9608 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
9609 Likewise.
9610 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9611 (gdbpy_invoke_xmethod): Likewise.
9612 * stabsread.c: Provide extra argument to make_reference_type()
9613 call.
9614 * valops.c (value_ref, value_rtti_indirect_type): Use
9615 lookup_lvalue_reference_type() instead of lookup_reference_type().
9616
9617 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9618
9619 PR gdb/14441
9620 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
9621 (TYPE_IS_REFERENCE): New macro.
9622 (struct type): Add rvalue_reference_type field.
9623 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
9624
9625 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9626
9627 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
9628 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
9629 New function definition.
9630 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
9631 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
9632 New function declaration.
9633 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
9634 * mi/mi-interp.h: New file.
9635 * solib.c (info_sharedlibrary_command): Replace for loop with
9636 ALL_SO_LIBS macro
9637 * solib.h (update_solib_list): New function declaration.
9638 (so_list_head): Move macro.
9639 * solist.h (ALL_SO_LIBS): New macro.
9640
9641 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9642
9643 * infcmd.c (post_create_inferior): Remove unused argument in
9644 call to solib_add.
9645 * remote.c (remote_start_remote): Likewise.
9646 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
9647 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
9648 (enable_break): Likewise.
9649 * solib.c (update_solib_list): Remove unused target argument
9650 and its documentation.
9651 (solib_add): Remove unused target argument. Remove unused
9652 argument in call to update_solib_list.
9653 (info_sharedlibrary_command): Remove unused argument in call
9654 to update_solib_list.
9655 (sharedlibrary_command): Remove unused argument in call to
9656 solib_add.
9657 (handle_solib_event): Likewise.
9658 (reload_shared_libraries): Likewise.
9659 * solib.h (solib_add): Remove unused target argument.
9660
9661 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
9662
9663 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
9664 (s390_displaced_step_fixup): Cover relative branches with the
9665 default fixup handling. This fixes lack of support for some
9666 relative branch instructions.
9667
9668 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9669
9670 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
9671 ptid from regcache.
9672
9673 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9674
9675 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
9676 i386_darwin_store_inferior_registers): Use ptid from regcache.
9677
9678 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9679
9680 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
9681 i386bsd_store_inferior_registers): Use ptid from regcache.
9682
9683 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9684
9685 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
9686 hppaobsd_store_registers): Use ptid from regcache.
9687
9688 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9689
9690 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
9691 hppanbsd_store_registers): Use ptid from regcache.
9692
9693 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9694
9695 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
9696 from regcache. Use get_ptrace_pid.
9697
9698 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9699
9700 * corelow.c (get_core_register_section): Use ptid from regcache,
9701 update doc.
9702
9703 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9704
9705 * bsd-uthread.c (bsd_uthread_fetch_registers,
9706 bsd_uthread_store_registers): Use ptid from regcache, set and
9707 restore inferior_ptid.
9708
9709 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9710
9711 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
9712 fetch_fp_regs, store_register, store_regs, store_fp_register,
9713 store_fp_regs): Use ptid from regcache.
9714
9715 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9716
9717 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
9718 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
9719 store_vfp_regs): Use ptid from regcache.
9720
9721 2017-03-17 Pedro Alves <palves@redhat.com>
9722
9723 PR remote/21188
9724 * ser-base.c (ser_base_wait_for): Add comment.
9725 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
9726 version.
9727 * ser-unix.c (hardwire_raw): Remove reference to
9728 scb->current_timeout.
9729 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
9730 (hardwire_ops): Install ser_base_readchar instead of
9731 hardwire_readchar.
9732 * serial.h (struct serial) <current_timeout, timeout_remaining>:
9733 Remove fields.
9734
9735 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
9736
9737 PR gdb/19637
9738 * python/lib/gdb/printer/bound_registers.py: Add support for
9739 Python 3.
9740
9741 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
9742
9743 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
9744 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
9745 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
9746 byte_offset to subobj_byte_offset. Fix the handling of
9747 DWARF_VALUE_STACK on big-endian targets when coming via an
9748 implicit pointer.
9749 (dwarf2_evaluate_loc_desc): Adjust call to
9750 dwarf2_evaluate_loc_desc_full.
9751 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
9752 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
9753
9754 2017-03-16 Yao Qi <yao.qi@linaro.org>
9755
9756 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
9757 and REVSH instructions.
9758
9759 2017-03-16 Yao Qi <yao.qi@linaro.org>
9760
9761 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
9762 (arm_record_test): Declare.
9763 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
9764 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
9765 align with the manual.
9766 (thumb_record_misc): Adjust the code order to align with the
9767 manual.
9768 (thumb2_record_decode_insn_handler): Fix instruction matching.
9769 (instruction_reader_thumb): New class.
9770 (arm_record_test): New function.
9771
9772 2017-03-16 Yao Qi <yao.qi@linaro.org>
9773
9774 * arm-tdep.c (abstract_memory_reader): New class.
9775 (instruction_reader): New class.
9776 (extract_arm_insn): Add argument 'reader'. Callers updated.
9777 (decode_insn): Likewise.
9778
9779 2017-03-16 Doug Evans <dje@google.com>
9780
9781 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
9782 member. Change type of TYPE member to SCM. All uses updated.
9783 (lsscm_make_lazy_string_smob): Add assert.
9784 (lsscm_make_lazy_string): Flag bad length values.
9785 (lsscm_elt_type): New function.
9786 (gdbscm_lazy_string_to_value): Rewrite to use
9787 lsscm_safe_lazy_string_to_value.
9788 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
9789 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
9790 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
9791 in incoming type.
9792 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9793 * guile/scm-type.c (tyscm_scm_to_type): New function.
9794
9795 2017-03-15 Doug Evans <dje@google.com>
9796
9797 PR python/17728, python/18439, python/18779
9798 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
9799 member. Change type of TYPE member to PyObject *. All uses updated.
9800 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
9801 (gdbpy_create_lazy_string_object): Flag bad length values.
9802 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
9803 Handle typedefs in incoming type.
9804 (stpy_lazy_string_elt_type): New function.
9805 (gdbpy_extract_lazy_string): Call it.
9806 * python/py-value.c (valpy_lazy_string): Flag bad length values.
9807 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
9808 typedefs in incoming type.
9809
9810 2017-03-16 Doug Evans <dje@google.com>
9811
9812 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9813 * guile/scm-type.c (tyscm_scm_to_type): New function.
9814
9815 2017-03-16 Jiong Wang <jiong.wang@arm.com>
9816
9817 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
9818 "ULONGEST" for "skip".
9819
9820 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9821
9822 PR gdb/21220
9823 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
9824 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
9825 (inf_ptrace_peek_poke): ...here. New function. Now also loop
9826 over ptrace peek/poke until end of buffer or error.
9827
9828 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
9829
9830 * parse.c (length_of_subexp): Make static.
9831 * parser-defs.h (length_of_subexp): Remove.
9832
9833 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9834
9835 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9836 as well.
9837
9838 2017-03-14 Pedro Alves <palves@redhat.com>
9839
9840 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9841 (main): Use std::unique_ptr. Remove calls to
9842 cp_demangled_name_parse_free.
9843
9844 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9845
9846 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9847 alphabsd_store_inferior_registers): Use regcache->ptid instead
9848 of inferior_ptid.
9849
9850 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9851
9852 * aix-thread.c (aix_thread_fetch_registers,
9853 aix_thread_store_registers): Use regcache->ptid instead of
9854 inferior_ptid.
9855
9856 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9857
9858 * aarch64-linux-nat.c (fetch_gregs_from_thread,
9859 store_gregs_to_thread, fetch_fpregs_from_thread,
9860 store_fpregs_to_thread): Use regcache->ptid instead of
9861 inferior_ptid.
9862
9863 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9864
9865 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9866 amd64_linux_fetch_inferior_registers): Use regcache->ptid
9867 instead of inferior_ptid.
9868
9869 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9870
9871 * target.c (target_fetch_registers, target_store_registers): Add
9872 assert.
9873
9874 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9875
9876 * regcache.h (regcache_get_ptid): New function.
9877 * regcache.c (regcache_get_ptid): New function.
9878
9879 2017-03-13 Mark Wielaard <mark@klomp.org>
9880
9881 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9882
9883 2017-03-10 Keith Seitz <keiths@redhat.com>
9884
9885 PR c++/8218
9886 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9887
9888 2017-03-08 Pedro Alves <palves@redhat.com>
9889
9890 PR gdb/18360
9891 * infrun.c (start_step_over, do_target_resume, resume)
9892 (restart_threads): Assert we're not resuming a thread that is
9893 meant to be stopped.
9894 (infrun_thread_stop_requested_callback): Delete.
9895 (infrun_thread_stop_requested): If the thread is internally
9896 stopped, queue a pending stop event and clear the thread's
9897 inline-frame state.
9898 (handle_stop_requested): New function.
9899 (handle_syscall_event, handle_inferior_event_1): Use
9900 handle_stop_requested.
9901 (handle_stop_requested): New function.
9902 (handle_signal_stop): Set the thread's stop_signal here instead of
9903 at caller.
9904 (finish_step_over): Clear step over info unconditionally.
9905 (handle_signal_stop): If the user had interrupted the event
9906 thread, consider the stop a random signal.
9907 (handle_signal_stop) <signal arrived while stepping over
9908 breakpoint>: Don't restart threads here.
9909 (stop_waiting): Don't clear step-over info here.
9910
9911 2017-03-08 Pedro Alves <palves@redhat.com>
9912
9913 PR 21206
9914 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
9915 goes to argument 2, not 1.
9916
9917 2017-03-08 Pedro Alves <palves@redhat.com>
9918
9919 PR cli/21218
9920 * top.c (gdb_readline_wrapper): Avoid passing NULL to
9921 display_gdb_prompt.
9922 (command_line_input): Add comment.
9923
9924 2017-03-08 Pedro Alves <palves@redhat.com>
9925
9926 PR tui/21216
9927 * tui/tui-file.c (tui_file::write): New.
9928 * tui/tui-file.h (tui_file): Override "write".
9929 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
9930 factored out from ...
9931 (tui_puts): ... here.
9932 (tui_putc): Use them.
9933 (tui_write): New function.
9934 * tui/tui-io.h (tui_write): Declare.
9935
9936 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
9937
9938 * Makefile.in (SFILES): Replace "environ.c" with
9939 "common/environ.c".
9940 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
9941 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
9942 to...
9943 * common/environ.c: ... here.
9944 * environ.h: Moved to...
9945 * common/environ.h: ... here.
9946
9947 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9948
9949 * gdbarch.sh (pstring_ptr): New static function.
9950 (gdbarch_disassembler_options): Use it.
9951 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
9952 not valid_disassembler_option->name.
9953 * gdbarch.c: Regenerate.
9954
9955 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9956
9957 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
9958
9959 2017-03-07 Pedro Alves <palves@redhat.com>
9960
9961 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
9962
9963 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
9964
9965 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
9966 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
9967 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
9968 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
9969
9970 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
9971
9972 * xtensa-linux-nat.c (fetch_gregs): Remove const.
9973
9974 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
9975
9976 * remote.c (remote_add_target_side_commands): Use range-based
9977 for loop.
9978
9979 2017-03-03 Yao Qi <yao.qi@linaro.org>
9980
9981 PR gdb/21165
9982 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
9983 value is lazy.
9984 * valprint.c (common_val_print): Likewise.
9985
9986 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
9987
9988 * NEWS: Mention new set/show disassembler-options commands.
9989 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
9990 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
9991 (prospective_options): New static variable.
9992 (gdb_disassembler::gdb_disassembler): Initialize
9993 m_di.disassembler_options.
9994 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
9995 (get_disassembler_options): New function.
9996 (set_disassembler_options): Likewise.
9997 (set_disassembler_options_sfunc): Likewise.
9998 (show_disassembler_options_sfunc): Likewise.
9999 (disassembler_options_completer): Likewise.
10000 (_initialize_disasm): Likewise.
10001 * disasm.h (get_disassembler_options): New prototype.
10002 (set_disassembler_options): Likewise.
10003 * gdbarch.sh (gdbarch_disassembler_options): New variable.
10004 (gdbarch_verify_disassembler_options): Likewise.
10005 * gdbarch.c: Regenerate.
10006 * gdbarch.h: Likewise.
10007 * arm-tdep.c (num_disassembly_options): Delete.
10008 (set_disassembly_style): Likewise.
10009 (arm_disassembler_options): New static variable.
10010 (set_disassembly_style_sfunc): Convert short style name into long
10011 option name. Call set_disassembler_options.
10012 (show_disassembly_style_sfunc): New function.
10013 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
10014 set_gdbarch_verify_disassembler_options.
10015 (_initialize_arm_tdep): Delete regnames variable and update callers.
10016 (arm_disassembler_options): Initialize.
10017 (disasm_options): New variable.
10018 (num_disassembly_options): Rename from this...
10019 (num_disassembly_styles): ...to this. Compute by scanning through
10020 disasm_options.
10021 (valid_disassembly_styles): Initialize using disasm_options.
10022 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
10023 set_arm_regname_option.
10024 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
10025 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
10026 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
10027 set_gdbarch_verify_disassembler_options.
10028 * s390-tdep.c (s390_disassembler_options): New static variable.
10029 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
10030 set_gdbarch_verify_disassembler_options.
10031
10032 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
10033
10034 * remote.c (remote_add_target_side_condition): Remove "struct"
10035 keyword from range-based for loop.
10036
10037 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
10038
10039 * remote.c (remote_add_target_side_condition): Use range-based
10040 for loop. Update comment.
10041
10042 2017-02-27 Yao Qi <yao.qi@linaro.org>
10043
10044 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
10045
10046 2017-02-26 Alan Hayward <alan.hayward@arm.com>
10047
10048 * regcache.c (regcache_raw_update): New function.
10049 (regcache_raw_read): Move code to regcache_raw_update.
10050 * regcache.h (regcache_raw_update): New declaration.
10051 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
10052
10053 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
10054
10055 * dwarf2read.c (create_debug_type_hash_table): Initialize
10056 header.signature and header.type_offset_in_tu.
10057
10058 2017-02-24 Pedro Alves <palves@redhat.com>
10059
10060 * symtab.c (make_file_symbol_completion_list_1): Use
10061 add_symtab_completions.
10062
10063 2017-02-24 Alan Hayward <alan.hayward@arm.com>
10064
10065 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
10066
10067 2017-02-24 Alan Hayward <alan.hayward@arm.com>
10068
10069 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
10070 I386_MAX_REGISTER_SIZE.
10071 (i386_pseudo_register_write): Likewise.
10072 (i386_process_record): Likewise.
10073 * i387-tdep.c (i387_supply_xsave): Likewise.
10074 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
10075 (store_register): Likewise.
10076
10077 2017-02-23 Pedro Alves <palves@redhat.com>
10078
10079 * ada-lang.c: Include "common/function-view.h".
10080 (ada_iterate_over_symbols): Adjust to use function_view as
10081 callback type.
10082 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
10083 (ada_make_symbol_completion_list): Use a lambda.
10084 (ada_exc_search_name_matches): Delete.
10085 (name_matches_regex): New.
10086 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
10087 * compile/compile-c-support.c: Include "common/function-view.h".
10088 (print_one_macro): Change prototype to accept a ui_file pointer.
10089 (write_macro_definitions): Use a lambda.
10090 * dwarf2read.c: Include "common/function-view.h".
10091 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
10092 (dw2_expand_symtabs_matching): Adjust to use function_view as
10093 callback type.
10094 * language.h: Include "common/function-view.h".
10095 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
10096 function_view as callback type.
10097 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
10098 * linespec.c: Include "common/function-view.h".
10099 (collect_info::add_symbol): New method.
10100 (struct symbol_and_data_callback, iterate_inline_only, struct
10101 symbol_matcher_data, iterate_name_matcher): Delete.
10102 (iterate_over_all_matching_symtabs): Adjust to use function_view
10103 as callback type and lambdas.
10104 (iterate_over_file_blocks): Adjust to use function_view as
10105 callback type.
10106 (decode_compound_collector): Now a class with private fields.
10107 (decode_compound_collector::release_symbols): New method.
10108 (collect_one_symbol): Rename to...
10109 (decode_compound_collector::operator()): ... this and adjust.
10110 (lookup_prefix_sym): decode_compound_collector construction bits
10111 move to decode_compound_collector ctor. Pass the
10112 decode_compound_collector object directly as callback. Remove
10113 cleanups and use decode_compound_collector::release_symbols
10114 instead.
10115 (symtab_collector): Now a class with private fields.
10116 (symtab_collector::release_symtabs): New method.
10117 (add_symtabs_to_list): Rename to...
10118 (symtab_collector::operator()): ... this and adjust.
10119 (collect_symtabs_from_filename): symtab_collector construction
10120 bits move to symtab_collector ctor. Pass the symtab_collector
10121 object directly as callback. Remove cleanups and use
10122 symtab_collector::release_symtabs instead.
10123 (collect_symbols): Delete.
10124 (add_matching_symbols_to_info): Use lambdas.
10125 * macrocmd.c (print_macro_callback): Delete.
10126 (info_macro_command): Use a lambda.
10127 (info_macros_command): Pass print_macro_definition as callable
10128 directly.
10129 (print_one_macro): Remove 'ignore' parameter.
10130 (macro_list_command): Adjust.
10131 * macrotab.c (macro_for_each_data::fn): Now a function_view.
10132 (macro_for_each_data::user_data): Delete field.
10133 (foreach_macro): Adjust to call the function_view.
10134 (macro_for_each): Adjust to use function_view as callback type.
10135 (foreach_macro_in_scope): Adjust to call the function_view.
10136 (macro_for_each_in_scope): Adjust to use function_view as callback
10137 type.
10138 * macrotab.h: Include "common/function-view.h".
10139 (macro_callback_fn): Declare a prototype instead of a pointer.
10140 Remove "user_data" parameter.
10141 (macro_for_each, macro_for_each_in_scope): Adjust to use
10142 function_view as callback type.
10143 * psymtab.c (partial_map_expand_apply)
10144 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
10145 Adjust to use function_view as callback type and to return bool.
10146 (psym_expand_symtabs_matching): Adjust to use function_view as
10147 callback types.
10148 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
10149 to use function_view as callback type and to return bool.
10150 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
10151 callback types.
10152 * symfile.c (expand_symtabs_matching): Adjust to use function_view
10153 as callback types.
10154 * symfile.h: Include "common/function-view.h".
10155 (expand_symtabs_file_matcher_ftype)
10156 (expand_symtabs_symbol_matcher_ftype)
10157 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
10158 return bool.
10159 (quick_symbol_functions::map_symtabs_matching_filename)
10160 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
10161 function_view as callback type and return bool.
10162 (expand_symtabs_matching): Adjust to use function_view as callback
10163 type.
10164 (maintenance_expand_name_matcher)
10165 (maintenance_expand_file_matcher): Delete.
10166 (maintenance_expand_symtabs): Use lambdas.
10167 * symtab.c (iterate_over_some_symtabs): Adjust to use
10168 function_view as callback types and return bool.
10169 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
10170 of a cleanup.
10171 (lookup_symtab_callback): Delete.
10172 (lookup_symtab): Use a lambda.
10173 (iterate_over_symbols): Adjust to use function_view as callback
10174 type.
10175 (struct search_symbols_data, search_symbols_file_matches)
10176 (search_symbols_name_matches): Delete.
10177 (search_symbols): Use a pair of lambdas.
10178 (struct add_name_data, add_macro_name, symbol_completion_matcher)
10179 (symtab_expansion_callback): Delete.
10180 (default_make_symbol_completion_list_break_on_1): Use lambdas.
10181 * symtab.h: Include "common/function-view.h".
10182 (iterate_over_some_symtabs): Adjust to use function_view as
10183 callback type and return bool.
10184 (iterate_over_symtabs): Adjust to use function_view as callback
10185 type.
10186 (symbol_found_callback_ftype): Remove 'data' parameter and return
10187 bool.
10188 (iterate_over_symbols): Adjust to use function_view as callback
10189 type.
10190
10191 2017-02-23 Pedro Alves <palves@redhat.com>
10192
10193 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10194 (%.o) <unittests/%.c>: New pattern.
10195 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10196 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10197 * common/function-view.h: New file.
10198 * unittests/function-view-selftests.c: New file.
10199 * configure: Regenerate.
10200
10201 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
10202
10203 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10204 inferior_ptid.
10205 * go32-nat.c (go32_thread_alive): Likewise.
10206
10207 2017-02-23 Yao Qi <yao.qi@linaro.org>
10208
10209 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10210 delete.
10211
10212 2017-02-23 Yao Qi <yao.qi@linaro.org>
10213
10214 * varobj.c (varobj_clear_saved_item): Use delete instead of
10215 xfree.
10216 (update_dynamic_varobj_children): Likewise.
10217
10218 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10219
10220 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10221
10222 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
10223
10224 * common/enum-flags.h (enum_flags::enum_flags): Initialize
10225 m_enum_value to 0 in default constructor.
10226
10227 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
10228
10229 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10230 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10231 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10232 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10233 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10234 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10235 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10236 IS_STORE_CONDITIONAL_INSN.
10237
10238 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10239
10240 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10241
10242 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10243
10244 * NEWS (Changes since GDB 7.12): Add DWARF-5.
10245
10246 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10247
10248 * dwarf2read.c (skip_one_die, read_attribute_value)
10249 (dwarf2_const_value_attr, dump_die_shallow)
10250 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10251 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10252
10253 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10254
10255 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10256 (dwarf_parse_macro_header): Accept DWARF version 5.
10257 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10258
10259 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10260
10261 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10262 DW_AT_GNU_*.
10263 * common/common-exceptions.h (enum errors): Likewise.
10264 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10265 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10266 (dwarf_expr_context::execute_stack_op): Likewise.
10267 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10268 Likewise.
10269 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10270 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10271 (show_entry_values_debug, call_site_to_target_addr)
10272 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10273 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10274 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10275 (value_of_dwarf_block_entry, indirect_pieced_value)
10276 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
10277 (disassemble_dwarf_expression): Likewise.
10278 * dwarf2read.c (process_die, inherit_abstract_dies)
10279 (read_call_site_scope): Likewise.
10280 * gdbtypes.h (struct func_type, struct call_site_parameter)
10281 (struct call_site): Likewise.
10282 * stack.c (read_frame_arg): Likewise.
10283 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
10284
10285 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10286
10287 * defs.h (read_unsigned_leb128): New declaration.
10288 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
10289 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
10290 (dwarf2_find_location_expression): Call also
10291 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
10292 * dwarf2loc.h (dwarf2_version): New declaration.
10293 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
10294 rnglists.
10295 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
10296 .debug_rnglists.
10297 (struct dwop_section_names): Add loclists_dwo.
10298 (dwop_section_names): Add .debug_loclists.dwo.
10299 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
10300 (struct dwarf2_per_cu_data): Add dwarf_version.
10301 (struct dwo_sections): Add loclists.
10302 (struct attr_abbrev): Add implicit_const.
10303 (read_indirect_line_string): New declaration.
10304 (read_unsigned_leb128): Delete declaration.
10305 (rcuh_kind): New definition.
10306 (read_and_check_comp_unit_head): Change parameter
10307 is_debug_types_section to section_kind.
10308 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
10309 (read_comp_unit_head): Change parameter abfd to section, add parameter
10310 section_kind. Handle DWARF-5.
10311 (error_check_comp_unit_head): Accept also DWARF version 5.
10312 (read_and_check_comp_unit_head): Change parameter
10313 is_debug_types_section to section_kind.
10314 (read_and_check_type_unit_head): Delete function.
10315 (read_abbrev_offset): Handle DWARF-5.
10316 (create_debug_type_hash_table): Add parameter section_kind. Process
10317 only DW_UT_type. Use signature and type_offset_in_tu from struct
10318 comp_unit_head.
10319 (create_debug_types_hash_table): Update create_debug_type_hash_table
10320 caller.
10321 (create_all_type_units): Call create_debug_type_hash_table.
10322 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10323 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10324 caller.
10325 (skip_one_die): Handle DW_FORM_implicit_const.
10326 (dwarf2_rnglists_process): New function.
10327 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10328 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10329 (read_attribute_value): Handle DW_FORM_implicit_const,
10330 DW_FORM_line_strp.
10331 (read_attribute): Handle DW_FORM_implicit_const.
10332 (read_indirect_string_at_offset_from): New function from
10333 read_indirect_string_at_offset.
10334 (read_indirect_string_at_offset): Call
10335 read_indirect_string_at_offset_from.
10336 (read_indirect_line_string_at_offset): New function.
10337 (read_indirect_string): New function comment.
10338 (read_indirect_line_string): New function.
10339 (read_unsigned_leb128): Make it global.
10340 (dwarf2_string_attr): Handle DWARF-5.
10341 (add_include_dir_stub, read_formatted_entries): New functions.
10342 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10343 Handle DWARF-5.
10344 (per_cu_header_read_in): Update read_comp_unit_head caller.
10345 (dwarf2_version): New function.
10346 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10347 rnglists.
10348 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10349 fields.
10350
10351 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10352
10353 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10354
10355 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10356
10357 * dwarf2read.c (dwarf2_ranges_process): New function from
10358 dwarf2_ranges_read.
10359 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10360 dwarf2_ranges_process.
10361
10362 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10363
10364 * dwarf2read.c (create_debug_type_hash_table): New function from
10365 create_debug_types_hash_table.
10366 (create_debug_types_hash_table): Call create_debug_type_hash_table.
10367 (create_all_type_units, open_and_init_dwo_file): Update
10368 create_debug_types_hash_table callers.
10369
10370 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10371
10372 PR gdb/16188
10373 * fork-child.c (trace_start_error): Fix thinko. va_end should
10374 refer to 'ap', not 'args'.
10375
10376 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10377 Pedro Alves <palves@redhat.com>
10378
10379 PR gdb/16188
10380 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
10381 calls succeeded.
10382 * fork-child.c (trace_start_error): New function.
10383 (trace_start_error_with_name): Likewise.
10384 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
10385 * inf-ptrace.c (inf_ptrace_me): Likewise.
10386 * inferior.h (trace_start_error): New prototype.
10387 (trace_start_error_with_name): Likewise.
10388
10389 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
10390
10391 PR gdb/21164
10392 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
10393 NULL before using it.
10394 * symmisc.c (maintenance_print_symbols): Likewise.
10395 (maintenance_print_msymbols): Likewise.
10396
10397 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10398
10399 * NEWS: Add record Python bindings entry.
10400
10401 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10402
10403 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
10404 py-record-full.o.
10405 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
10406 * python/py-record-btrace.c, python/py-record-btrace.h,
10407 python/py-record-full.c, python/py-record-full.h: New file.
10408 * python/py-record.c: Add include for py-record-btrace.h and
10409 py-record-full.h.
10410 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
10411 recpy_instruction_history, recpy_function_call_history, recpy_begin,
10412 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
10413 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
10414 New definition.
10415 (gdbpy_initialize_btrace): New export.
10416 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
10417
10418 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10419
10420 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
10421 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
10422 * python/py-record.c: New file.
10423 * python/python-internal.h (gdbpy_start_recording,
10424 gdbpy_current_recording, gdpy_stop_recording,
10425 gdbpy_initialize_record): New export.
10426 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
10427 (python_GdbMethods): Add gdbpy_start_recording,
10428 gdbpy_current_recording and gdbpy_stop_recording.
10429
10430 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10431
10432 * record-btrace.c (record_btrace_record_method): New function.
10433 (init_record_btrace_ops): Initialize to_record_method.
10434 * record-full.c (record_full_record_method): New function.
10435 (init_record_full_ops, init_record_full_core_ops): Add
10436 record_full_record_method.
10437 * record.h (enum record_method): New enum.
10438 * target-debug.h (target_debug_print_enum_record_method: New define.
10439 * target-delegates.c: Regenerate.
10440 * target.c (target_record_method): New function.
10441 * target.h: Include record.h.
10442 (struct target_ops) <to_record_method>: New field.
10443 (target_record_method): New export.
10444
10445 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10446
10447 * record.h (record_start, record_stop): New export.
10448 * record.c (record_start, record_stop): New function.
10449
10450 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10451
10452 * btrace.c (btrace_fetch): Copy function call segments pointer
10453 into a vector.
10454 (btrace_clear): Clear the vector.
10455 (btrace_find_insn_by_number): Use binary search to find the correct
10456 function call segment.
10457 * btrace.h (brace_fun_p): New typedef.
10458 (struct btrace_thread_info) <functions>: New field.
10459
10460 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10461
10462 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
10463 * btrace.c (btrace_decode_error): ... here. New function.
10464 * btrace.h (btrace_decode_error): New export.
10465
10466 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10467
10468 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
10469 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
10470 btrace_find_insn_by_number): Remove special case for gaps.
10471 * btrace.h (btrace_insn_get_error): New export.
10472 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
10473 * record-btrace.c (btrace_insn_history): Print number for gaps.
10474 (record_btrace_info, record_btrace_goto): Handle gaps.
10475
10476 2017-02-14 Tom Tromey <tom@tromey.com>
10477
10478 PR python/13598:
10479 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
10480 event.
10481 * python/py-evts.c (gdbpy_initialize_py_events): Add
10482 before_prompt registry.
10483 * python/py-events.h (events_object) <before_prompt>: New field.
10484
10485 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
10486
10487 * btrace.c (ftrace_new_switch): Preserve up link and flags.
10488
10489 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
10490
10491 * symfile (_initialize_symfile): Add usage text to the load command's
10492 help text.
10493
10494 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
10495
10496 * utils.c (defaulted_query): Don't query on secondary UIs.
10497
10498 2017-02-10 Tom Tromey <tom@tromey.com>
10499
10500 * rust-lang.c (rust_get_disr_info): Remove unused variable.
10501
10502 2017-02-10 Tom Tromey <tom@tromey.com>
10503
10504 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
10505 "cleanup" local.
10506 * python/py-type.c (typy_legacy_template_argument): Remove
10507 unnecessary "cleanup" local.
10508
10509 2017-02-10 Tom Tromey <tom@tromey.com>
10510
10511 * python/python.c (do_start_initialization): New function, from
10512 _initialize_python.
10513 (_initialize_python): Call do_start_initialization.
10514 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
10515 goto.
10516
10517 2017-02-10 Tom Tromey <tom@tromey.com>
10518
10519 * python/py-prettyprint.c (pretty_print_one_value): Use
10520 gdbpy_ref.
10521
10522 2017-02-10 Tom Tromey <tom@tromey.com>
10523
10524 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
10525 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
10526 gdbpy_ref.
10527 * python/py-type.c (field_new): Use gdbpy_ref.
10528 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
10529 gdbpy_ref.
10530 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
10531 (py_free_pspace): Likewise.
10532 (pspace_to_pspace_object): Likewise.
10533 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
10534 (py_free_objfile): Likewise.
10535 (objfile_to_objfile_object): Likewise.
10536 * python/py-inferior.c (delete_thread_object): Use
10537 gdbpy_ref.
10538 (infpy_read_memory): Likewise.
10539 (py_free_inferior): Likewise.
10540 * python/py-evtregistry.c (create_eventregistry_object): Use
10541 gdbpy_ref.
10542 * python/py-event.c (create_event_object): Use gdbpy_ref.
10543
10544 2017-02-10 Tom Tromey <tom@tromey.com>
10545
10546 * python/py-ref.h (gdbpy_ref_policy): Now a template.
10547 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
10548 used.
10549 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
10550 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
10551 python/py-exitedevent.c, python/py-finishbreakpoint.c,
10552 python/py-framefilter.c, python/py-function.c,
10553 python/py-inferior.c, python/py-infevents.c,
10554 python/py-linetable.c, python/py-newobjfileevent.c,
10555 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
10556 python/py-signalevent.c, python/py-stopevent.c,
10557 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
10558 python/py-unwind.c, python/py-utils.c, python/py-value.c,
10559 python/py-varobj.c, python/py-xmethods.c, python/python.c,
10560 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
10561
10562 2017-02-10 Tom Tromey <tom@tromey.com>
10563
10564 * ui-out.h (ui_out_emit_type): New class.
10565 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
10566 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
10567 and ui_out_emit_tuple.
10568 (enumerate_locals): Likewise.
10569 (py_mi_print_variables, py_print_locals, py_print_args): Use
10570 ui_out_emit_list.
10571 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
10572 ui_out_emit_list.
10573 * common/gdb_optional.h: New file.
10574
10575 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
10576
10577 * MAINTAINERS (Write After Approval): Update my e-mail address.
10578
10579 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
10580
10581 PR gdb/21122
10582 * breakpoint.c (_initialize_breakpoint): Update the help description
10583 of the 'commands' command to indicate that it takes a list argument.
10584
10585 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
10586
10587 * interps.c (current_interp_set_logging): Remove "return".
10588
10589 2017-02-09 Gary Benson <gbenson@redhat.com>
10590
10591 * symtab.c (add_symtab_completions): Prevent NULL pointer
10592 dereference.
10593
10594 2017-02-08 Pedro Alves <palves@redhat.com>
10595
10596 * interps.c (interp::interp): Remove reference to quiet_p.
10597 (interp_set): Make static. Remove dead "Switching to" output
10598 code.
10599 (interp_quiet_p, interp_set_quiet): Delete.
10600 (interpreter_exec_cmd): Don't set the interpreter quiet.
10601 * interps.h (interp_quiet_p): Make static.
10602 (class interp) <quiet_p>: Remove field
10603
10604 2017-02-08 Jerome Guitton <guitton@adacore.com>
10605
10606 * cli/cli-decode.c (find_command_name_length): Make it extern.
10607 * cli/cli-decode.h (find_command_name_length): Declare.
10608 * cli/cli-script.c (command_name_equals, line_first_arg):
10609 New functions.
10610 (process_next_line): Use cli-decode to parse command names.
10611 (build_command_line): Make args a constant pointer.
10612
10613 2017-02-08 Jerome Guitton <guitton@adacore.com>
10614
10615 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
10616 Remove case-insensitive search.
10617
10618 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
10619
10620 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
10621 at the end of the line. Avoids an ARI warning.
10622
10623 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
10624
10625 * NEWS: Mention support for record/replay of Intel 64 rdrand and
10626 rdseed instructions.
10627 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
10628
10629 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
10630
10631 PR tdep/20936
10632 Provide and use sparc32 and sparc64 target description XML files.
10633 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
10634 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
10635 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
10636 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
10637 * features/sparc/sparc32-solaris.xml: New file.
10638 * features/sparc/sparc64-solaris.xml: New file.
10639 * features/sparc/sparc32-solaris.c: Generated.
10640 * features/sparc/sparc64-solaris.c: Generated.
10641 * sparc-tdep.h: Account for differences in target descriptions.
10642 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
10643 (sparc32_register_type): Use target provided registers.
10644 (validate_tdesc_registers): New function.
10645 (sparc32_gdbarch_init): Use tdesc_has_registers.
10646 Set pseudoregister functions.
10647 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
10648 (sparc64_register_type): Use target provided registers.
10649 (sparc64_init_abi): Set pseudoregister functions.
10650
10651 2017-02-03 Tom Tromey <tom@tromey.com>
10652
10653 PR rust/21097:
10654 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
10655 with a single member.
10656
10657 2017-02-03 Pedro Alves <palves@redhat.com>
10658
10659 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
10660 (cli_interp_base::~cli_interp_base): New.
10661 (cli_interp): New struct.
10662 (as_cli_interp): Cast the interp itself to cli_interp.
10663 (cli_interpreter_pre_command_loop): Rename to ...
10664 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
10665 parameter.
10666 (cli_interpreter_init): Rename to ...
10667 (cli_interp::init): ... this. Remove 'self' parameter. Use
10668 boolean. Make extern.
10669 (cli_interpreter_resume): Rename to ...
10670 (cli_interp::resume): ... this. Remove 'data' parameter. Make
10671 extern.
10672 (cli_interpreter_suspend): Rename to ...
10673 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
10674 extern.
10675 (cli_interpreter_exec): Rename to ...
10676 (cli_interp::exec): ... this. Remove 'data' parameter. Make
10677 extern.
10678 (cli_interpreter_supports_command_editing): Rename to ...
10679 (cli_interp_base::supports_command_editing): ... this. Remove
10680 'interp' parameter. Make extern.
10681 (cli_ui_out): Rename to ...
10682 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
10683 Make extern.
10684 (cli_set_logging): Rename to ...
10685 (cli_interp_base::set_logging): ... this. Remove 'interp'
10686 parameter. Make extern.
10687 (cli_interp_procs): Delete.
10688 (cli_interp_factory): Adjust to use "new".
10689 * cli/cli-interp.h: Include "interps.h".
10690 (struct cli_interp_base): New struct.
10691 * interps.c (struct interp): Delete. Fields moved to interps.h.
10692 (interp_new): Delete.
10693 (interp::interp, interp::~interp): New.
10694 (interp_set): Use bool, and return void. Assume the interpreter
10695 has suspend, init and resume methods, and that the all return
10696 void.
10697 (set_top_level_interpreter): interp_set returns void.
10698 (interp_ui_out): Adapt.
10699 (current_interp_set_logging): Adapt.
10700 (interp_data): Delete.
10701 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
10702 (interp_exec): Adapt.
10703 (top_level_interpreter_data): Delete.
10704 * interps.h (interp_init_ftype, interp_resume_ftype)
10705 (interp_suspend_ftype, interp_exec_ftype)
10706 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
10707 (class interp): New.
10708 (interp_new): Delete.
10709 (interp_set): Now returns void. Use bool.
10710 (interp_data, top_level_interpreter_data): Delete.
10711 * mi/mi-common.h: Include interps.h.
10712 (class mi_interp): Inherit from interp. Define a ctor. Declare
10713 init, resume, suspect, exec, interp_ui_out, set_logging and
10714 pre_command_loop methods.
10715 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
10716 (mi_interpreter_init): Rename to ...
10717 (mi_interp::init): ... this. Remove the 'interp' parameter, use
10718 bool, return void and make extern. Adjust.
10719 (mi_interpreter_resume): ... Rename to ...
10720 (mi_interp::resume): ... this. Remove the 'data' parameter,
10721 return void and make extern. Adjust.
10722 (mi_interpreter_suspend): ... Rename to ...
10723 (mi_interp::suspend): ... this. Remove the 'data' parameter,
10724 return void and make extern. Adjust.
10725 (mi_interpreter_exec): ... Rename to ...
10726 (mi_interp::exec): ... this. Remove the 'data' parameter and make
10727 extern. Adjust.
10728 (mi_interpreter_pre_command_loop): ... Rename to ...
10729 (mi_interp::pre_command_loop): ... this. Remove the 'self'
10730 parameter and make extern.
10731 (mi_on_normal_stop_1): Adjust.
10732 (mi_ui_out): Rename to ...
10733 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
10734 parameter and make extern. Adjust.
10735 (mi_set_logging): Rename to ...
10736 (mi_interp::set_logging): ... this. Remove the 'interp'
10737 parameter and make extern. Adjust.
10738 (mi_interp_procs): Delete.
10739 (mi_interp_factory): Adjust to use 'new'.
10740 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
10741 (mi_print_exception, mi_execute_command, mi_load_progress):
10742 Adjust.
10743 * tui/tui-interp.c (tui_interp): New class.
10744 (as_tui_interp): Return a tui_interp pointer.
10745 (tui_on_normal_stop, tui_on_signal_received)
10746 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
10747 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
10748 to use interp::interp_ui_out.
10749 (tui_init): Rename to ...
10750 (tui_interp::init): ... this. Remove the 'self' parameter, use
10751 bool, return void and make extern. Adjust.
10752 (tui_resume): Rename to ...
10753 (tui_interp::resume): ... this. Remove the 'data' parameter,
10754 return void and make extern. Adjust.
10755 (tui_suspend): Rename to ...
10756 (tui_interp::suspend): ... this. Remove the 'data' parameter,
10757 return void and make extern. Adjust.
10758 (tui_ui_out): Rename to ...
10759 (tui_interp::interp_ui_out): ... this. Remove the 'self'
10760 parameter, and make extern. Adjust.
10761 (tui_exec): Rename to ...
10762 (tui_interp::exec): ... this. Remove the 'data' parameter and
10763 make extern.
10764 (tui_interp_procs): Delete.
10765 (tui_interp_factory): Use "new".
10766
10767 2017-02-02 Tom Tromey <tom@tromey.com>
10768
10769 * rust-exp.y (ends_raw_string, space_then_number)
10770 (rust_identifier_start_p): Return bool.
10771 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
10772 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
10773 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
10774 (rust_chartype_p): Return bool.
10775 (val_print_struct, rust_print_struct_def, rust_print_type):
10776 Update.
10777 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
10778 Return bool.
10779
10780 2017-02-02 Tom Tromey <tom@tromey.com>
10781
10782 * rust-lang.c: Reindent.
10783
10784 2017-02-02 Tom Tromey <tom@tromey.com>
10785
10786 * rust-lang.h (rust_crate_for_block): Update.
10787 * rust-lang.c (rust_crate_for_block): Return std::string.
10788 (rust_get_disr_info): Use std:;string, not
10789 gdb::unique_xmalloc_ptr.
10790 * rust-exp.y (crate_name): Update.
10791
10792 2017-02-02 Pedro Alves <palves@redhat.com>
10793
10794 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
10795 field out of gdb_disassembler_test and make it static.
10796
10797 2017-02-02 Pedro Alves <palves@redhat.com>
10798
10799 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
10800 mi1_interp and mi_interp fields.
10801
10802 2017-02-02 Pedro Alves <palves@redhat.com>
10803
10804 * cli/cli-interp.c (struct saved_output_files, saved_output):
10805 Moved from cli/cli-logging.c.
10806 (cli_set_logging): New function.
10807 (cli_interp_procs): Install cli_set_logging.
10808 * cli/cli-interp.h (make_logging_output, cli_set_logging):
10809 Declare.
10810 * cli/cli-logging.c (struct saved_output_files, saved_output):
10811 Moved to cli/cli-interp.c.
10812 (pop_output_files): Don't save outputs here.
10813 (make_logging_output): New function.
10814 (handle_redirections): Don't build tee nor save previous outputs
10815 here.
10816 * interps.c (current_interp_set_logging): Change prototype.
10817 Assume there's always a set_logging_proc method installed.
10818 * interps.h (interp_set_logging_ftype): Change prototype.
10819 (current_interp_set_logging): Change prototype and adjust comment.
10820 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
10821 use make_logging_output.
10822 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
10823 2017-02-02 Pedro Alves <palves@redhat.com>
10824
10825 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10826 from ...
10827 (set_logging_overwrite): ... here.
10828 (logging_no_redirect_file): Delete.
10829 (set_logging_redirect): Don't handle redirection on the fly.
10830 Instead warn that "logging off" / "logging on" is necessary.
10831 (pop_output_files): Delete references to logging_no_redirect_file.
10832 (show_logging_command): Always speak in terms of what will happen
10833 once logging is reenabled.
10834
10835 2017-02-02 Pedro Alves <palves@redhat.com>
10836
10837 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10838
10839 2017-02-02 Pedro Alves <palves@redhat.com>
10840
10841 * disasm.c (gdb_pretty_print_insn): Rename to ...
10842 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10843 Remove gdbarch parameter. Adapt to clear the object's buffers
10844 instead of allocating new buffers, and to print using the object's
10845 gdb_disassembler instead of calling gdb_print_insn.
10846 (dump_insns): Use gdb_pretty_print_disassembler.
10847 * disasm.h (gdb_pretty_print_insn): Delete declaration.
10848 (gdb_pretty_print_disassembler): New class.
10849 * record-btrace.c (btrace_insn_history): Use
10850 gdb_pretty_print_disassembler.
10851
10852 2017-02-02 Pedro Alves <palves@redhat.com>
10853
10854 * ada-lang.c (type_as_string): Use string_file.
10855 * ada-valprint.c (ada_print_floating): Use string_file.
10856 * ada-varobj.c (ada_varobj_scalar_image)
10857 (ada_varobj_get_value_image): Use string_file.
10858 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10859 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10860 * breakpoint.c (update_inserted_breakpoint_locations)
10861 (insert_breakpoint_locations, reattach_breakpoints)
10862 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10863 (print_it_watchpoint): Use string_file.
10864 (save_breakpoints): Use stdio_file.
10865 * c-exp.y (oper): Use string_file.
10866 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10867 tee_file.
10868 (pop_output_files): Use delete.
10869 (handle_redirections): Use stdio_file and tee_file.
10870 * cli/cli-setshow.c (do_show_command): Use string_file.
10871 * compile/compile-c-support.c (c_compute_program): Use
10872 string_file.
10873 * compile/compile-c-symbols.c (generate_vla_size): Take a
10874 'string_file &' instead of a 'ui_file *'.
10875 (generate_c_for_for_one_variable): Take a 'string_file &' instead
10876 of a 'ui_file *'. Use string_file.
10877 (generate_c_for_variable_locations): Take a 'string_file &'
10878 instead of a 'ui_file *'.
10879 * compile/compile-internal.h (generate_c_for_for_one_variable):
10880 Take a 'string_file &' instead of a 'ui_file *'.
10881 * compile/compile-loc2c.c (push, pushf, unary, binary)
10882 (print_label, pushf_register_address, pushf_register)
10883 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10884 'ui_file *'. Adjust.
10885 * compile/compile.c (compile_to_object): Use string_file.
10886 * compile/compile.h (compile_dwarf_expr_to_c)
10887 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10888 'ui_file *'.
10889 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10890 (replace_typedefs_qualified_name): Use string_file and
10891 obstack_copy0.
10892 * disasm.c (gdb_pretty_print_insn): Use string_file.
10893 (gdb_disassembly): Adjust reference the null_stream global.
10894 (do_ui_file_delete): Delete.
10895 (gdb_insn_length): Use null_stream.
10896 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10897 * dwarf2loc.c (dwarf2_compile_property_to_c)
10898 (locexpr_generate_c_location, loclist_generate_c_location): Take a
10899 'string_file &' instead of a 'ui_file *'.
10900 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10901 * dwarf2read.c (do_ui_file_peek_last): Delete.
10902 (dwarf2_compute_name): Use string_file.
10903 * event-top.c (gdb_setup_readline): Use stdio_file.
10904 * gdbarch.sh (verify_gdbarch): Use string_file.
10905 * gdbtypes.c (safe_parse_type): Use null_stream.
10906 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10907 string_file.
10908 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10909 'string_file *' instead of a 'ui_file *'.
10910 (gdbscm_arch_disassemble): Use string_file.
10911 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
10912 * guile/scm-ports.c (class ioscm_file_port): Now a class that
10913 inherits from ui_file.
10914 (ioscm_file_port_delete, ioscm_file_port_rewind)
10915 (ioscm_file_port_put): Delete.
10916 (ioscm_file_port_write): Rename to ...
10917 (ioscm_file_port::write): ... this. Remove file_port_magic
10918 checks.
10919 (ioscm_file_port_new): Delete.
10920 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
10921 ui_file_up.
10922 * guile/scm-type.c (tyscm_type_name): Use string_file.
10923 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
10924 Use string_file.
10925 * infcmd.c (print_return_value_1): Use string_file.
10926 * infrun.c (print_target_wait_results): Use string_file.
10927 * language.c (add_language): Use string_file.
10928 * location.c (explicit_to_string_internal): Use string_file.
10929 * main.c (captured_main_1): Use null_file.
10930 * maint.c (maintenance_print_architecture): Use stdio_file.
10931 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
10932 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
10933 event_channel>: Change type to mi_console_file pointer.
10934 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
10935 (mi_console_file_delete): Delete.
10936 (struct mi_console_file): Delete.
10937 (mi_console_file_magic): Delete.
10938 (mi_console_file_new): Delete.
10939 (mi_console_file::mi_console_file): New.
10940 (mi_console_file_delete): Delete.
10941 (mi_console_file_fputs): Delete.
10942 (mi_console_file::write): New.
10943 (mi_console_raw_packet): Delete.
10944 (mi_console_file::flush): New.
10945 (mi_console_file_flush): Delete.
10946 (mi_console_set_raw): Rename to ...
10947 (mi_console_file::set_raw): ... this.
10948 * mi/mi-console.h (class mi_console_file): New class.
10949 (mi_console_file_new, mi_console_set_raw): Delete.
10950 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
10951 (mi_set_logging): Use delete and tee_file. Adjust.
10952 * mi/mi-main.c (output_register): Use string_file.
10953 (mi_cmd_data_evaluate_expression): Use string_file.
10954 (mi_cmd_data_read_memory): Use string_file.
10955 (mi_cmd_execute, print_variable_or_computed): Use string_file.
10956 * mi/mi-out.c (mi_ui_out::main_stream): New.
10957 (mi_ui_out::rewind): Use main_stream and
10958 string_file.
10959 (mi_ui_out::put): Use main_stream and string_file.
10960 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10961 Allocate a 'string_file' instead.
10962 (mi_out_new): Don't allocate a mem_fileopen stream here.
10963 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10964 (mi_ui_out::main_stream): Declare method.
10965 * printcmd.c (eval_command): Use string_file.
10966 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
10967 * python/py-arch.c (archpy_disassemble): Use string_file.
10968 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
10969 * python/py-frame.c (frapy_str): Use string_file.
10970 * python/py-framefilter.c (py_print_type, py_print_single_arg):
10971 Use string_file.
10972 * python/py-type.c (typy_str): Use string_file.
10973 * python/py-unwind.c (unwind_infopy_str): Use string_file.
10974 * python/py-value.c (valpy_str): Use string_file.
10975 * record-btrace.c (btrace_insn_history): Use string_file.
10976 * regcache.c (regcache_print): Use stdio_file.
10977 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
10978 * remote.c (escape_buffer): Use string_file.
10979 * rust-lang.c (rust_get_disr_info): Use string_file.
10980 * serial.c (serial_open_ops_1): Use stdio_file.
10981 (do_serial_close): Use delete.
10982 * stack.c (print_frame_arg): Use string_file.
10983 (print_frame_args): Remove local mem_fileopen stream, not used.
10984 (print_frame): Use string_file.
10985 * symmisc.c (maintenance_print_symbols): Use stdio_file.
10986 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
10987 Take a 'string_file *' instead of a 'ui_file *'.
10988 * top.c (new_ui): Use stdio_file and stderr_file.
10989 (free_ui): Use delete.
10990 (execute_command_to_string): Use string_file.
10991 (quit_confirm): Use string_file.
10992 * tracepoint.c (collection_list::append_exp): Use string_file.
10993 * tui/tui-disasm.c (tui_disassemble): Use string_file.
10994 * tui/tui-file.c: Don't include "ui-file.h".
10995 (enum streamtype, struct tui_stream): Delete.
10996 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
10997 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
10998 (tui_file::tui_file): New method.
10999 (tui_file_fputs): Delete.
11000 (tui_file_get_strbuf): Delete.
11001 (tui_file::puts): New method.
11002 (tui_file_adjust_strbuf): Delete.
11003 (tui_file_flush): Delete.
11004 (tui_file::flush): New method.
11005 * tui/tui-file.h: Tweak intro comment.
11006 Include ui-file.h.
11007 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
11008 (tui_file_adjust_strbuf): Delete declarations.
11009 (class tui_file): New class.
11010 * tui/tui-io.c (tui_initialize_io): Use tui_file.
11011 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
11012 (tui_register_format): Use string_stream.
11013 * tui/tui-stack.c (tui_make_status_line): Use string_file.
11014 (tui_get_function_from_frame): Use string_file.
11015 * typeprint.c (type_to_string): Use string_file.
11016 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
11017 (null_stream): New global.
11018 (ui_file_delete): Delete.
11019 (ui_file::ui_file): New.
11020 (null_file_isatty): Delete.
11021 (ui_file::~ui_file): New.
11022 (null_file_rewind): Delete.
11023 (ui_file::printf): New.
11024 (null_file_put): Delete.
11025 (null_file_flush): Delete.
11026 (ui_file::putstr): New.
11027 (null_file_write): Delete.
11028 (ui_file::putstrn): New.
11029 (null_file_read): Delete.
11030 (ui_file::putc): New.
11031 (null_file_fputs): Delete.
11032 (null_file_write_async_safe): Delete.
11033 (ui_file::vprintf): New.
11034 (null_file_delete): Delete.
11035 (null_file::write): New.
11036 (null_file_fseek): Delete.
11037 (null_file::puts): New.
11038 (ui_file_data): Delete.
11039 (null_file::write_async_safe): New.
11040 (gdb_flush, ui_file_isatty): Adjust.
11041 (ui_file_put, ui_file_rewind): Delete.
11042 (ui_file_write): Adjust.
11043 (ui_file_write_for_put): Delete.
11044 (ui_file_write_async_safe, ui_file_read): Adjust.
11045 (ui_file_fseek): Delete.
11046 (fputs_unfiltered): Adjust.
11047 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
11048 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
11049 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
11050 (set_ui_file_data): Delete.
11051 (string_file::~string_file, string_file::write)
11052 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
11053 (do_ui_file_as_string, ui_file_as_string): Delete.
11054 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
11055 (struct mem_file): Delete.
11056 (mem_file_new): Delete.
11057 (stdio_file::stdio_file): New.
11058 (mem_file_delete): Delete.
11059 (stdio_file::stdio_file): New.
11060 (mem_fileopen): Delete.
11061 (stdio_file::~stdio_file): New.
11062 (mem_file_rewind): Delete.
11063 (stdio_file::set_stream): New.
11064 (mem_file_put): Delete.
11065 (stdio_file::open): New.
11066 (mem_file_write): Delete.
11067 (stdio_file_magic, struct stdio_file): Delete.
11068 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
11069 (stdio_file::flush): New.
11070 (stdio_file_read): Rename to ...
11071 (stdio_file::read): ... this. Adjust.
11072 (stdio_file_write): Rename to ...
11073 (stdio_file::write): ... this. Adjust.
11074 (stdio_file_write_async_safe): Rename to ...
11075 (stdio_file::write_async_safe) ... this. Adjust.
11076 (stdio_file_fputs): Rename to ...
11077 (stdio_file::puts) ... this. Adjust.
11078 (stdio_file_isatty): Delete.
11079 (stdio_file_fseek): Delete.
11080 (stdio_file::isatty): New.
11081 (stderr_file_write): Rename to ...
11082 (stderr_file::write) ... this. Adjust.
11083 (stderr_file_fputs): Rename to ...
11084 (stderr_file::puts) ... this. Adjust.
11085 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
11086 (stderr_file::stderr_file): New.
11087 (tee_file_magic): Delete.
11088 (struct tee_file): Delete.
11089 (tee_file::tee_file): New.
11090 (tee_file_new): Delete.
11091 (tee_file::~tee_file): New.
11092 (tee_file_delete): Delete.
11093 (tee_file_flush): Rename to ...
11094 (tee_file::flush): ... this. Adjust.
11095 (tee_file_write): Rename to ...
11096 (tee_file::write): ... this. Adjust.
11097 (tee_file::write_async_safe): New.
11098 (tee_file_fputs): Rename to ...
11099 (tee_file::puts): ... this. Adjust.
11100 (tee_file_isatty): Rename to ...
11101 (tee_file::isatty): ... this. Adjust.
11102 * ui-file.h (struct obstack, struct ui_file): Don't
11103 forward-declare.
11104 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
11105 (ui_file_write_ftype)
11106 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
11107 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
11108 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
11109 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
11110 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
11111 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
11112 (set_ui_file_fseek): Delete.
11113 (ui_file_data, ui_file_delete, ui_file_rewind)
11114 (struct ui_file): New.
11115 (ui_file_up): New.
11116 (class null_file): New.
11117 (null_stream): Declare.
11118 (ui_file_write_for_put, ui_file_put): Delete.
11119 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
11120 Delete.
11121 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
11122 (gdb_fopen, tee_file_new): Delete.
11123 (struct string_file): New.
11124 (struct stdio_file): New.
11125 (stdio_file_up): New.
11126 (struct stderr_file): New.
11127 (class tee_file): New.
11128 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
11129 of a 'ui_file *'. Adjust.
11130 * ui-out.h (class ui_out) <field_stream>: Likewise.
11131 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
11132 (null_stream): Delete.
11133 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
11134 Adjust.
11135 * utils.h (struct ui_file): Delete forward declaration..
11136 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
11137 (error_stream): Take a 'string_file &' instead of a
11138 'ui_file *'.
11139 * varobj.c (varobj_value_get_print_value): Use string_file.
11140 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
11141 * gdbarch.c: Regenerate.
11142
11143 2017-02-02 Pedro Alves <palves@redhat.com>
11144
11145 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
11146 (gdb_pretty_print_insn): ... this. Now a free function. Add back
11147 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
11148 Adjust to call gdb_print_insn instead of
11149 gdb_disassembler::print_insn.
11150 (dump_insns, do_mixed_source_and_assembly_deprecated)
11151 (do_mixed_source_and_assembly, do_assembly_only): Add back a
11152 'gdbarch' parameter. Remove gdb_disassembler parameter.
11153 (gdb_disassembly): Don't allocate a gdb_disassembler here.
11154 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
11155 declaration.
11156 (gdb_pretty_print_insn): Re-add declaration.
11157 * record-btrace.c (btrace_insn_history): Don't allocate a
11158 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
11159
11160 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
11161
11162 * disasm.h (gdb_disassembly): Remove file_string parameter.
11163 * disasm.c (gdb_disassembly): Likewise.
11164 * cli/cli-cmds.c (print_disassembly): Adapt.
11165 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
11166 * stack.c (do_gdb_disassembly): Likewise.
11167
11168 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
11169
11170 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
11171 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
11172 targets. And if the implicit value is longer than needed, extract
11173 the first bytes instead of the "least significant" ones.
11174
11175 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
11176
11177 * btrace.c (btrace_enable): Do not call btrace_add_pc for
11178 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
11179 (btrace_fetch): Assert can_access_registers_ptid.
11180 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
11181 validate_registers_access.
11182
11183 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
11184
11185 * gdbthread.h (can_access_registers_ptid): New.
11186 * thread.c (can_access_registers_ptid): New.
11187
11188 2017-02-01 Pedro Alves <palves@redhat.com>
11189
11190 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
11191
11192 2017-01-31 Pedro Alves <palves@redhat.com>
11193
11194 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11195 Fix typos.
11196
11197 2017-01-31 Pedro Alves <palves@redhat.com>
11198
11199 * stack.c (print_frame_args): Remove local mem_fileopen stream,
11200 not used.
11201
11202 2017-01-31 Pedro Alves <palves@redhat.com>
11203
11204 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11205
11206 2017-01-31 Pedro Alves <palves@redhat.com>
11207
11208 * common/scoped_restore.h
11209 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11210 change the value's parameter type to T2.
11211 (make_scoped_restore): Likewise.
11212
11213 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11214 Richard Henderson <rth@redhat.com>
11215
11216 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11217 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11218 GS_BASE for older kernels.
11219 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11220 GS_BASE for older kernels.
11221 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11222 and GS_BASE to the offset table.
11223 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11224 system register group.
11225 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11226 for older kernels.
11227 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11228 amd64 ABI.
11229 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11230 AMD64_GSBASE_REGNUM.
11231 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11232 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11233 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11234 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11235 i386/64bit-segments.xml in those rules.
11236 * features/i386/64bit-segments.xml: New file.
11237 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11238 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11239 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11240 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11241 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11242 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11243 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11244 * features/i386/amd64-avx-linux.c: Regenerated.
11245 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11246 * features/i386/amd64-avx-mpx.c: Regenerated.
11247 * features/i386/amd64-avx512-linux.c: Regenerated.
11248 * features/i386/amd64-linux.c: Regenerated.
11249 * features/i386/amd64-mpx-linux.c: Regenerated.
11250 * features/i386/i386-avx-mpx-linux.c: Regenerated.
11251 * features/i386/i386-avx-mpx.c: Regenerated.
11252 * features/i386/x32-avx-linux.c: Regenerated.
11253 * features/i386/x32-avx512-linux.c: Regenerated.
11254 * regformats/i386/amd64-avx-linux.dat: Regenerated.
11255 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11256 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11257 * regformats/i386/amd64-linux.dat: Regenerated.
11258 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11259 * regformats/i386/x32-avx-linux.dat: Regenerated.
11260 * regformats/i386/x32-avx512-linux.dat: Regenerated.
11261 * regformats/i386/x32-linux.dat: Regenerated.
11262
11263 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11264
11265 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11266 Set to AMD64_NUM_REGS.
11267
11268 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11269
11270 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11271 that checks validity of a register number.
11272
11273 2017-01-27 Kees Cook <keescook@google.com>
11274
11275 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
11276 fetch_fpregs if target has fpa registers.
11277 (arm_linux_store_inferior_registers): Call store_fpregs if target
11278 has fpa registers.
11279
11280 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
11281
11282 * cris-tdep.c (cris_gdbarch_init): Remove check for
11283 info.byte_order and force it to BFD_ENDIAN_LITTLE.
11284
11285 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
11286
11287 * corelow.c (get_core_register_section): Check for regset
11288 existence before checking for REGSET_VARIABLE_SIZE.
11289
11290 2017-01-26 Yao Qi <yao.qi@linaro.org>
11291 Pedro Alves <palves@redhat.com>
11292
11293 PR gdb/20939
11294 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
11295 call memory_error, save memaddr instead.
11296 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
11297 negative, cal memory_error.
11298 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
11299
11300 2017-01-26 Yao Qi <yao.qi@linaro.org>
11301
11302 * disasm-selftests.c (memory_error_test): New function.
11303 (_initialize_disasm_selftests): Register memory_error_test.
11304
11305 2017-01-26 Yao Qi <yao.qi@linaro.org>
11306
11307 * Makefile.in (SFILES): Add disasm-selftests.c and
11308 selftest-arch.c.
11309 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
11310 * disasm-selftests.c: New file.
11311 * selftest-arch.c: New file.
11312 * selftest-arch.h: New file.
11313
11314 2017-01-26 Yao Qi <yao.qi@linaro.org>
11315
11316 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
11317 to bfd_arch_mep. Don't return 0 if section is not
11318 found. Call print_insn_mep.
11319
11320 2017-01-26 Pedro Alves <palves@redhat.com>
11321 Yao Qi <yao.qi@linaro.org>
11322
11323 * arm-tdep.c: Include "disasm.h".
11324 (gdb_print_insn_arm): Update code to get gdbarch.
11325 * disasm.c (dis_asm_read_memory): Change it to
11326 gdb_disassembler::dis_asm_read_memory.
11327 (dis_asm_memory_error): Likewise.
11328 (dis_asm_print_address): Likewise.
11329 (gdb_pretty_print_insn): Change it to
11330 gdb_disassembler::pretty_print_insn.
11331 (dump_insns): Add one argument gdb_disassemlber. All
11332 callers updated.
11333 (do_mixed_source_and_assembly_deprecated): Likewise.
11334 (do_mixed_source_and_assembly): Likewise.
11335 (do_assembly_only): Likewise.
11336 (gdb_disassembler::gdb_disassembler): New.
11337 (gdb_disassembler::print_insn): New.
11338 * disasm.h (class gdb_disassembler): New.
11339 (gdb_pretty_print_insn): Remove declaration.
11340 (gdb_disassemble_info): Likewise.
11341 * guile/scm-disasm.c (class gdbscm_disassembler): New.
11342 (gdbscm_disasm_read_memory_worker): Update.
11343 (gdbscm_disasm_read_memory): Update.
11344 (gdbscm_disasm_memory_error): Remove.
11345 (gdbscm_disasm_print_address): Remove.
11346 (gdbscm_disassembler::gdbscm_disassembler): New.
11347 (gdbscm_print_insn_from_port): Update.
11348 * mips-tdep.c: Include disasm.h.
11349 (gdb_print_insn_mips): Update code to get gdbarch.
11350 * record-btrace.c (btrace_insn_history): Update.
11351 * spu-tdep.c: Include disasm.h.
11352 (struct spu_dis_asm_data): Remove.
11353 (struct spu_dis_asm_info): New.
11354 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11355 SPU id.
11356 (gdb_print_insn_spu): Cast disassemble_info to
11357 spu_dis_asm_info.
11358
11359 2017-01-26 Yao Qi <yao.qi@linaro.org>
11360
11361 * disasm.c (do_ui_file_delete): Delete.
11362 (gdb_insn_length): Move code creating stream to ...
11363 * utils.c (null_stream): ... here. New function.
11364 * utils.h (null_stream): Declare.
11365
11366 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
11367
11368 * python/py-inferior.c (find_thread_object): Return directly
11369 from the loop. Remove "found" variable.
11370
11371 2017-01-21 Joel Brobecker <brobecker@adacore.com>
11372
11373 GDB 7.12.1 released.
11374
11375 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11376
11377 * python/py-function.c (fnpy_call): Reorder declarations to have
11378 the gdbpy_enter object declared first.
11379 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11380
11381 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11382
11383 PR python/21068
11384 * python/python-internal.h (PyMem_RawMalloc): Define for
11385 Python < 3.4.
11386 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
11387 PyMem_RawMalloc instead of PyMem_Malloc.
11388
11389 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
11390 Luis Machado <lgustavo@codesourcery.com>
11391
11392 * NEWS (New commands): Mention flash-erase.
11393 (New MI commands): Mention target-flash-erase.
11394 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
11395 command.
11396 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
11397 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
11398 * target.c (flash_erase_command): New function.
11399 (initialize_targets): Add new flash-erase command.
11400 * target.h (flash_erase_command): New declaration.
11401
11402 2017-01-20 Joel Brobecker <brobecker@adacore.com>
11403
11404 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
11405 HAVE_SYS_PROCFS_H is defined.
11406
11407 2017-01-18 Alan Hayward <alan.hayward@arm.com>
11408
11409 * remote.c (struct cached_reg): Change data into a pointer.
11410 * (stop_reply_dtr): Free data pointers before deleting vector.
11411 (process_stop_reply): Likewise.
11412 (remote_parse_stop_reply): Allocate space for data
11413
11414 2017-01-18 Alan Hayward <alan.hayward@arm.com>
11415
11416 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
11417 MAX_REGISTER_SIZE.
11418 (amd64_pseudo_register_read_value): Likewise.
11419 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
11420 (store_register_using_P): Likewise.
11421 * regcache.c (regcache_xfer_part): Likewise.
11422
11423 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
11424
11425 Split real and pseudo registers.
11426 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
11427 (sparc32_pseudo_regnum): New enum.
11428 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
11429 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
11430 (SPARC32_CP0_REGISTERS): New macro.
11431 (sparc32_pseudo_register_name): New function.
11432 (sparc32_register_name): Use sparc32_pseudo_register_name.
11433 (sparc32_pseudo_register_type): New function.
11434 (sparc32_register_type): Use sparc32_pseudo_register_type.
11435 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
11436 pseudo register numbers.
11437 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
11438 (SPARC64_CP0_REGISTERS): New macro.
11439 (sparc64_pseudo_register_name): New function.
11440 (sparc64_register_name): Use sparc64_pseudo_register_name.
11441 (sparc64_pseudo_register_type): New function.
11442 (sparc64_register_type): Use sparc64_pseudo_register_type.
11443 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
11444 pseudo register numbers.
11445 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
11446 sparc64_store_arguments): Handle pseudo register numbers.
11447
11448 2017-01-13 Yao Qi <yao.qi@linaro.org>
11449
11450 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
11451 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
11452 output.
11453 (getpkt_or_notif_sane_1): Likewise.
11454
11455 2017-01-13 Yao Qi <yao.qi@linaro.org>
11456
11457 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
11458 of CC. Pass "-x c++-header" instead of "-x c".
11459
11460 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11461
11462 * remote.c (remote_can_async_p): Update comment.
11463
11464 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11465
11466 * linux-nat.c (linux_nat_can_async_p): Update comment.
11467
11468 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11469
11470 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
11471
11472 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
11473
11474 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
11475
11476 2017-01-10 Tom Tromey <tom@tromey.com>
11477
11478 * python/py-type.c (typy_legacy_template_argument): Update.
11479 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
11480 ~demangle_parse_info): Declare new members.
11481 (cp_demangled_name_to_comp): Return unique_ptr.
11482 (cp_demangled_name_parse_free)
11483 (make_cleanup_cp_demangled_name_parse_free)
11484 (cp_new_demangle_parse_info): Remove.
11485 * cp-support.c (do_demangled_name_parse_free_cleanup)
11486 (make_cleanup_cp_demangled_name_parse_free): Remove.
11487 (inspect_type, cp_canonicalize_string_full)
11488 (cp_canonicalize_string): Update.
11489 (mangled_name_to_comp): Change return type.
11490 (cp_class_name_from_physname, method_name_from_physname)
11491 (cp_func_name, cp_remove_params): Update.
11492 * cp-name-parser.y (demangle_parse_info): New constructor, from
11493 cp_new_demangle_parse_info.
11494 (~demangle_parse_info): New destructor, from
11495 cp_demangled_name_parse_free.
11496 (cp_merge_demangle_parse_infos): Update.
11497 (cp_demangled_name_to_comp): Change return type.
11498
11499 2017-01-10 Tom Tromey <tom@tromey.com>
11500
11501 * top.c (prevent_dont_repeat): Change return type.
11502 * python/python.c (execute_gdb_command): Use std::string.
11503 Update.
11504 * guile/guile.c (gdbscm_execute_gdb_command): Update.
11505 * command.h (prevent_dont_repeat): Change return type.
11506 * breakpoint.c (bpstat_do_actions_1): Update.
11507
11508 2017-01-10 Tom Tromey <tom@tromey.com>
11509
11510 * value.h (scoped_value_mark::~scoped_value_mark): Call
11511 free_to_mark.
11512 (scoped_value_mark::free_to_mark): New method.
11513 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
11514 scoped_value_mark.
11515
11516 2017-01-10 Tom Tromey <tom@tromey.com>
11517
11518 * python/py-value.c (valpy_dereference, valpy_referenced_value)
11519 (valpy_reference_value, valpy_const_value, valpy_get_address)
11520 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
11521 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
11522 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
11523 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
11524 scoped_value_mark.
11525 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
11526 * value.h (scoped_value_mark): New class.
11527
11528 2017-01-10 Tom Tromey <tom@tromey.com>
11529
11530 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
11531 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
11532 * psymtab.c (discard_psymtabs_upto): Remove.
11533 (make_cleanup_discard_psymtabs): Remove.
11534 (struct psymtab_state): Remove.
11535
11536 2017-01-10 Tom Tromey <tom@tromey.com>
11537
11538 * record-full.c (record_full_save_cleanups): Remove.
11539 (record_full_save): Use gdb::unlinker.
11540 * gcore.c (do_bfd_delete_cleanup): Remove.
11541 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
11542 cleanups.
11543 * dwarf2read.c (unlink_if_set): Remove.
11544 (write_psymtabs_to_index): Use gdb::unlinker.
11545 * common/gdb_unlinker.h: New file.
11546
11547 2017-01-10 Tom Tromey <tom@tromey.com>
11548
11549 * windows-tdep.c (windows_xfer_shared_library): Update.
11550 * windows-nat.c (windows_make_so): Update.
11551 * utils.h (make_cleanup_bfd_unref): Remove.
11552 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
11553 * symfile.h (symfile_bfd_open)
11554 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
11555 * symfile.c (read_symbols, symbol_file_add)
11556 (separate_debug_file_exists): Update.
11557 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
11558 (generic_load, reread_symbols): Update.
11559 * symfile-mem.c (symbol_file_add_from_memory): Update.
11560 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
11561 (spu_symbol_file_add_from_memory): Update.
11562 * solist.h (struct target_so_ops) <bfd_open>: Return
11563 gdb_bfd_ref_ptr.
11564 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
11565 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
11566 gdb_bfd_ref_ptr.
11567 (solib_map_sections, reload_shared_libraries_1): Update.
11568 * solib-svr4.c (enable_break): Update.
11569 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
11570 * solib-frv.c (enable_break2): Update.
11571 * solib-dsbt.c (enable_break): Update.
11572 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
11573 gdb_bfd_ref_ptr.
11574 (darwin_solib_get_all_image_info_addr_at_init): Update.
11575 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
11576 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
11577 * record-full.c (record_full_save): Update.
11578 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
11579 * procfs.c (insert_dbx_link_bpt_in_file): Update.
11580 * minidebug.c (find_separate_debug_file_in_section): Return
11581 gdb_bfd_ref_ptr.
11582 * machoread.c (macho_add_oso_symfile): Change abfd to
11583 gdb_bfd_ref_ptr.
11584 (macho_symfile_read_all_oso): Update.
11585 (macho_check_dsym): Return gdb_bfd_ref_ptr.
11586 (macho_symfile_read): Update.
11587 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
11588 (jit_bfd_try_read_symtab): Update.
11589 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11590 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11591 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11592 gdb_bfd_ref_ptr.
11593 (gdb_bfd_ref_policy): New struct.
11594 (gdb_bfd_ref_ptr): New typedef.
11595 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11596 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11597 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11598 gdb_bfd_ref_ptr.
11599 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11600 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11601 (gcore_command): Update.
11602 * exec.c (exec_file_attach): Update.
11603 * elfread.c (elf_symfile_read): Update.
11604 * dwarf2read.c (dwarf2_get_dwz_file): Update.
11605 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
11606 (open_and_init_dwo_file): Update.
11607 (open_dwp_file): Return gdb_bfd_ref_ptr.
11608 (open_and_init_dwp_file): Update.
11609 * corelow.c (core_open): Update.
11610 * compile/compile-object-load.c (compile_object_load): Update.
11611 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
11612 * coffread.c (coff_symfile_read): Update.
11613 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
11614 gdb_bfd_ref_ptr. Rename.
11615 (dump_bfd_file, restore_command): Update.
11616 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11617 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11618 (find_separate_debug_file_by_buildid): Update.
11619
11620 2017-01-10 Tom Tromey <tom@tromey.com>
11621
11622 * common/gdb_ref_ptr.h: New file.
11623 * python/py-ref.h (struct gdbpy_ref_policy): New.
11624 (gdbpy_ref): Now a typedef.
11625
11626 2017-01-10 Tom Tromey <tom@tromey.com>
11627
11628 * utils.h (make_cleanup_htab_delete): Don't declare.
11629 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
11630 Remove.
11631 * linespec.c (decode_compound_collector): Add constructor,
11632 destructor.
11633 (lookup_prefix_sym): Remove cleanup.
11634 (symtab_collector): Add constructor, destructor.
11635 (collect_symtabs_from_filename): Remove cleanup.
11636 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
11637 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
11638 Use htab_up.
11639 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
11640 * dwarf2read.c (dw2_expand_symtabs_matching)
11641 (dw2_map_symbol_filenames, dwarf_decode_macros)
11642 (write_psymtabs_to_index): Use htab_up.
11643 * dwarf2loc.c (func_verify_no_selftailcall)
11644 (call_site_find_chain_1, func_verify_no_selftailcall)
11645 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
11646 std::vector, gdb::unique_xmalloc_ptr.
11647 (call_sitep): Remove typedef.
11648 (dwarf2_locexpr_baton_eval): Remove unused variable.
11649
11650 2017-01-10 Tom Tromey <tom@tromey.com>
11651
11652 * python/python-internal.h (make_cleanup_py_decref)
11653 (make_cleanup_py_xdecref): Don't declare.
11654 * python/py-utils.c (py_decref, make_cleanup_py_decref)
11655 (py_xdecref, make_cleanup_py_xdecref): Remove.
11656
11657 2017-01-10 Tom Tromey <tom@tromey.com>
11658
11659 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
11660 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
11661
11662 2017-01-10 Tom Tromey <tom@tromey.com>
11663
11664 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
11665
11666 2017-01-10 Tom Tromey <tom@tromey.com>
11667
11668 * python/py-utils.c (unicode_to_encoded_string)
11669 (python_string_to_target_string)
11670 (python_string_to_target_python_string)
11671 (python_string_to_host_string, gdbpy_obj_to_string)
11672 (get_addr_from_python): Use gdbpy_ref.
11673
11674 2017-01-10 Tom Tromey <tom@tromey.com>
11675
11676 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
11677 gdbpy_ref.
11678
11679 2017-01-10 Tom Tromey <tom@tromey.com>
11680
11681 * python/python.c (eval_python_command, gdbpy_decode_line)
11682 (gdbpy_run_events, gdbpy_start_type_printers)
11683 (gdbpy_apply_type_printers): Use gdbpy_ref.
11684
11685 2017-01-10 Tom Tromey <tom@tromey.com>
11686
11687 * python/py-param.c (get_doc_string, compute_enum_values): Use
11688 gdbpy_ref.
11689
11690 2017-01-10 Tom Tromey <tom@tromey.com>
11691
11692 * python/py-inferior.c (find_thread_object, build_inferior_list):
11693 Use gdbpy_ref.
11694
11695 2017-01-10 Tom Tromey <tom@tromey.com>
11696
11697 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11698
11699 2017-01-10 Tom Tromey <tom@tromey.com>
11700
11701 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
11702 gdbpy_ref.
11703
11704 2017-01-10 Tom Tromey <tom@tromey.com>
11705
11706 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
11707 extra incref.
11708 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
11709 Use gdbpy_ref.
11710
11711 2017-01-10 Tom Tromey <tom@tromey.com>
11712
11713 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11714 gdbpy_ref.
11715
11716 2017-01-10 Tom Tromey <tom@tromey.com>
11717
11718 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
11719 decref results of PyArg_ParseTupleAndKeywords.
11720
11721 2017-01-10 Tom Tromey <tom@tromey.com>
11722
11723 * python/python.c (python_run_simple_file): Use
11724 unique_xmalloc_ptr, gdbpy_ref.
11725
11726 2017-01-10 Tom Tromey <tom@tromey.com>
11727
11728 * python/py-prettyprint.c (print_stack_unless_memory_error)
11729 (print_string_repr, print_children): Use gdbpy_ref.
11730 (dummy_python_frame): New class.
11731 (dummy_python_frame::dummy_python_frame): Rename from
11732 push_dummy_python_frame.
11733 (py_restore_tstate): Remove.
11734
11735 2017-01-10 Tom Tromey <tom@tromey.com>
11736
11737 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11738
11739 2017-01-10 Tom Tromey <tom@tromey.com>
11740
11741 * python/python.c (ensure_python_env, restore_python_env):
11742 Remove.
11743 * python/python-internal.h (ensure_python_env): Don't declare.
11744 * varobj.h (varobj_ensure_python_env): Don't declare.
11745 * varobj.c (varobj_ensure_python_env): Remove.
11746
11747 2017-01-10 Tom Tromey <tom@tromey.com>
11748
11749 * varobj.c (varobj_value_get_print_value): Use
11750 gdbpy_enter_varobj.
11751
11752 2017-01-10 Tom Tromey <tom@tromey.com>
11753
11754 * python/py-prettyprint.c (print_string_repr, print_children):
11755 Update.
11756 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
11757 of "encoding".
11758 * varobj.c (varobj_value_get_print_value): Update.
11759 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
11760
11761 2017-01-10 Tom Tromey <tom@tromey.com>
11762
11763 * varobj.c (varobj_get_display_hint)
11764 (dynamic_varobj_has_child_method, install_new_value_visualizer)
11765 (varobj_set_visualizer, free_variable): Use
11766 gdbpy_enter_varobj.
11767
11768 2017-01-10 Tom Tromey <tom@tromey.com>
11769
11770 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
11771 (do_finish_initialization): New function. Use gdbpy_ref.
11772 (gdbpy_finish_initialization): Use gdbpy_enter. Call
11773 do_finish_initialization.
11774
11775 2017-01-10 Tom Tromey <tom@tromey.com>
11776
11777 * python/py-param.c (get_set_value, get_show_value): Use
11778 gdbpy_enter, gdbpy_ref.
11779
11780 2017-01-10 Tom Tromey <tom@tromey.com>
11781
11782 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
11783
11784 2017-01-10 Tom Tromey <tom@tromey.com>
11785
11786 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
11787
11788 2017-01-10 Tom Tromey <tom@tromey.com>
11789
11790 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
11791 Use gdbpy_enter_varobj.
11792
11793 2017-01-10 Tom Tromey <tom@tromey.com>
11794
11795 * varobj.c (gdbpy_enter_varobj): New constructor.
11796 * python/python-internal.h (gdbpy_enter_varobj): New class.
11797 * python/py-varobj.c (py_varobj_get_iterator): Use
11798 gdbpy_enter_varobj.
11799
11800 2017-01-10 Tom Tromey <tom@tromey.com>
11801
11802 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
11803 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11804 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
11805 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
11806 unique_xmalloc_ptr.
11807 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
11808
11809 2017-01-10 Tom Tromey <tom@tromey.com>
11810
11811 * python/py-xmethods.c (invoke_match_method): Use
11812 gdbpy_ref.
11813
11814 2017-01-10 Tom Tromey <tom@tromey.com>
11815
11816 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
11817 gdbpy_enter, gdbpy_ref.
11818
11819 2017-01-10 Tom Tromey <tom@tromey.com>
11820
11821 * python/python.c (python_interactive_command): Use gdbpy_enter.
11822
11823 2017-01-10 Tom Tromey <tom@tromey.com>
11824
11825 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11826 gdbpy_ref.
11827
11828 2017-01-10 Tom Tromey <tom@tromey.com>
11829
11830 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11831 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11832
11833 2017-01-10 Tom Tromey <tom@tromey.com>
11834
11835 * utils.h (htab_deleter): New struct.
11836 (htab_up): New typedef.
11837 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11838 gdbpy_enter, gdbpy_ref, htab_up.
11839
11840 2017-01-10 Tom Tromey <tom@tromey.com>
11841
11842 * python/py-unwind.c (pending_frame_invalidate): Remove.
11843 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11844
11845 2017-01-10 Tom Tromey <tom@tromey.com>
11846
11847 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11848 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11849
11850 2017-01-10 Tom Tromey <tom@tromey.com>
11851
11852 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11853
11854 2017-01-10 Tom Tromey <tom@tromey.com>
11855
11856 * python/python.c (gdbpy_eval_from_control_command)
11857 (gdbpy_source_script, gdbpy_run_events)
11858 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11859 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11860 gdbpy_enter.
11861
11862 2017-01-10 Tom Tromey <tom@tromey.com>
11863
11864 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11865
11866 2017-01-10 Tom Tromey <tom@tromey.com>
11867
11868 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11869
11870 2017-01-10 Tom Tromey <tom@tromey.com>
11871
11872 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11873 (python_on_inferior_call_pre, python_on_inferior_call_post)
11874 (python_on_memory_change, python_on_register_change)
11875 (python_inferior_exit, python_new_objfile, add_thread_object)
11876 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11877
11878 2017-01-10 Tom Tromey <tom@tromey.com>
11879
11880 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11881 (bpfinishpy_handle_exit): Use gdbpy_enter.
11882
11883 2017-01-10 Tom Tromey <tom@tromey.com>
11884
11885 * python/py-cmd.c (cmdpy_destroyer)
11886 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11887 gdbpy_enter.
11888
11889 2017-01-10 Tom Tromey <tom@tromey.com>
11890
11891 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11892 gdbpy_enter.
11893 (gdbpy_breakpoint_has_cond): Likewise.
11894
11895 2017-01-10 Tom Tromey <tom@tromey.com>
11896
11897 * python/python.c (gdbpy_enter): New constructor.
11898 (~gdbpy_enter): New destructor.
11899 (restore_python_env, ensure_python_env): Rewrite.
11900 * python/python-internal.h (gdbpy_enter): New class.
11901
11902 2017-01-10 Tom Tromey <tom@tromey.com>
11903
11904 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11905
11906 2017-01-10 Tom Tromey <tom@tromey.com>
11907
11908 * python/py-value.c (value_has_field, get_field_flag)
11909 (get_field_type, valpy_getitem, convert_value_from_python): Use
11910 gdbpy_ref.
11911
11912 2017-01-10 Tom Tromey <tom@tromey.com>
11913
11914 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
11915 gdbpy_ref.
11916
11917 2017-01-10 Tom Tromey <tom@tromey.com>
11918
11919 * python/py-prettyprint.c (search_pp_list)
11920 (find_pretty_printer_from_objfiles)
11921 (find_pretty_printer_from_progspace)
11922 (find_pretty_printer_from_gdb, find_pretty_printer)
11923 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
11924 gdbpy_ref.
11925
11926 2017-01-10 Tom Tromey <tom@tromey.com>
11927
11928 * python/py-param.c (call_doc_function): Use gdbpy_ref.
11929
11930 2017-01-10 Tom Tromey <tom@tromey.com>
11931
11932 * python/py-linetable.c (build_line_table_tuple_from_pcs)
11933 (ltpy_get_all_source_lines): Use gdbpy_ref.
11934
11935 2017-01-10 Tom Tromey <tom@tromey.com>
11936
11937 * python/py-framefilter.c (extract_sym, extract_value)
11938 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
11939 gdbpy_ref.
11940
11941 2017-01-10 Tom Tromey <tom@tromey.com>
11942
11943 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
11944
11945 2017-01-10 Tom Tromey <tom@tromey.com>
11946
11947 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
11948
11949 2017-01-10 Tom Tromey <tom@tromey.com>
11950
11951 * python/py-function.c (convert_values_to_python, fnpy_init): Use
11952 gdbpy_ref.
11953
11954 2017-01-10 Tom Tromey <tom@tromey.com>
11955
11956 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
11957
11958 2017-01-10 Tom Tromey <tom@tromey.com>
11959
11960 * python/py-type.c (convert_field, make_fielditem, typy_fields)
11961 (typy_range): Use gdbpy_ref.
11962
11963 2017-01-10 Tom Tromey <tom@tromey.com>
11964
11965 * python/py-threadevent.c (create_thread_event_object): Use
11966 gdbpy_ref.
11967 * python/py-stopevent.c (create_stop_event_object): Simplify.
11968 (emit_stop_event): Use gdbpy_ref.
11969 * python/py-signalevent.c (create_signal_event_object): Use
11970 gdbpy_ref.
11971 * python/py-newobjfileevent.c (create_new_objfile_event_object)
11972 (emit_new_objfile_event, create_clear_objfiles_event_object)
11973 (emit_clear_objfiles_event): Use gdbpy_ref.
11974 * python/py-infevents.c (create_inferior_call_event_object)
11975 (create_register_changed_event_object)
11976 (create_memory_changed_event_object, emit_inferior_call_event)
11977 (emit_memory_changed_event, emit_register_changed_event): Use
11978 gdbpy_ref.
11979 * python/py-exitedevent.c (create_exited_event_object)
11980 (emit_exited_event): Use gdbpy_ref.
11981 * python/py-event.h (evpy_emit_event): Remove
11982 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
11983 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
11984 * python/py-continueevent.c (emit_continue_event): Use
11985 gdbpy_ref.
11986 * python/py-breakpoint.c (gdbpy_breakpoint_created)
11987 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
11988 gdbpy_ref.
11989 * python/py-bpevent.c (create_breakpoint_event_object): Use
11990 gdbpy_ref.
11991
11992 2017-01-10 Tom Tromey <tom@tromey.com>
11993
11994 * python/py-ref.h: New file.
11995
11996 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11997
11998 * cli-out.c (cli_ui_out::do_redirect): Change return type to
11999 void.
12000 * cli-out.h (cli_ui_out::do_redirect): Likewise.
12001 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
12002 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
12003 * ui-out.c (ui_out::redirect): Likewise.
12004 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
12005 * cli/cli-logging.c (set_logging_redirect): Update call site of
12006 ui_out::redirect.
12007 (handle_redirections): Likewise.
12008 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
12009 * top.c (execute_command_to_string): Likewise.
12010 * utils.c (do_ui_out_redirect_pop): Likewise.
12011
12012 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
12013
12014 * stack.c (_initialize_stack): Update "frame" command help message.
12015
12016 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
12017
12018 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
12019
12020 2017-01-06 Yao Qi <yao.qi@linaro.org>
12021
12022 * x86-linux-nat.h: Include gdb_proc_service.h.
12023
12024 2017-01-06 Yao Qi <yao.qi@linaro.org>
12025
12026 * ser-base.h: Include serial.h.
12027
12028 2017-01-06 Yao Qi <yao.qi@linaro.org>
12029
12030 * ppc-linux-tdep.h: Include ppc-tdep.h.
12031
12032 2017-01-06 Yao Qi <yao.qi@linaro.org>
12033
12034 * nat/amd64-linux-siginfo.h: Include signal.h.
12035
12036 2017-01-06 Yao Qi <yao.qi@linaro.org>
12037
12038 * nat/aarch64-linux-hw-point.h: Include break-common.h.
12039
12040 2017-01-06 Yao Qi <yao.qi@linaro.org>
12041
12042 * mi/mi-parse.h: Include mi-cmds.h.
12043
12044 2017-01-06 Yao Qi <yao.qi@linaro.org>
12045
12046 * inf-loop.c: Don't include "target.h".
12047 * inf-loop.h: Include it here.
12048
12049 2017-01-06 Yao Qi <yao.qi@linaro.org>
12050
12051 * dfp.h: Include "dboulest.h" and "expression.h".
12052
12053 2017-01-06 Yao Qi <yao.qi@linaro.org>
12054
12055 * ax-gdb.h: Include "ax.h".
12056
12057 2017-01-06 Yao Qi <yao.qi@linaro.org>
12058
12059 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
12060 with nat/gdb_ptrace.h.
12061
12062 2017-01-05 Yao Qi <yao.qi@linaro.org>
12063
12064 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
12065 new line.
12066 (mips64_fbsd_sigframe_init): Likewise.
12067
12068 2017-01-04 John Baldwin <jhb@FreeBSD.org>
12069
12070 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
12071 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
12072
12073 2017-01-04 John Baldwin <jhb@FreeBSD.org>
12074
12075 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
12076 * NEWS: Mention new FreeBSD/mips native configuration.
12077 * config/mips/fbsd.mh: New file.
12078 * configure.host: Add mips*-*-freebsd*.
12079 * mips-fbsd-nat.c: New file.
12080
12081 2017-01-04 John Baldwin <jhb@FreeBSD.org>
12082
12083 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
12084 (ALLDEPFILES): Add mips-fbsd-tdep.c.
12085 * NEWS: Mention new FreeBSD/mips target.
12086 * configure.tgt: Add mips*-*-freebsd*.
12087 * mips-fbsd-tdep.c: New file.
12088 * mips-fbsd-tdep.h: New file.
12089
12090 2017-01-04 Yao Qi <yao.qi@linaro.org>
12091
12092 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
12093 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
12094
12095 2017-01-01 Joel Brobecker <brobecker@adacore.com>
12096
12097 Update copyright year range in all GDB files.
12098
12099 2017-01-01 Joel Brobecker <brobecker@adacore.com>
12100
12101 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
12102
12103 For older changes see ChangeLog-2016.
12104 \f
12105 Local Variables:
12106 mode: change-log
12107 left-margin: 8
12108 fill-column: 74
12109 version-control: never
12110 coding: utf-8
12111 End:
This page took 0.394457 seconds and 4 git commands to generate.