Remove some cleanups from stack.c
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-09-29 Tom Tromey <tom@tromey.com>
2
3 * stack.c (parse_frame_specification): Use std::string
4 (info_frame_command): Use gdb::unique_xmalloc_ptr.
5
6 2017-09-29 Tom Tromey <tom@tromey.com>
7
8 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
9
10 2017-09-29 Tom Tromey <tom@tromey.com>
11
12 * utils.c (vfprintf_maybe_filtered): Use std::string.
13 (vfprintf_unfiltered): Likewise.
14
15 2017-09-29 Tom Tromey <tom@tromey.com>
16
17 * event-top.c (top_level_prompt): Return std::string.
18 (display_gdb_prompt): Update.
19
20 2017-09-29 Tom Tromey <tom@tromey.com>
21
22 * unittests/common-utils-selftests.c (format): New function.
23 (string_vprintf_tests): New function.
24 (_initialize_common_utils_selftests): Register new tests.
25 * common/common-utils.c (string_vprintf): New function.
26 * common/common-utils.h (string_vprintf): Declare.
27
28 2017-09-29 Pedro Alves <palves@redhat.com>
29
30 * common/rsp-low.c (unpack_varlen_hex): Constify.
31 * common/rsp-low.h (unpack_varlen_hex): Constify.
32 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
33 Constify.
34 * remote.c (remote_set_permissions, read_ptid)
35 (remote_current_thread, remote_get_threads_with_qthreadinfo)
36 (remote_static_tracepoint_marker_at)
37 (remote_static_tracepoint_markers_by_strid)
38 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
39 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
40 (parse_tracepoint_definition, parse_tsv_definition)
41 (parse_static_tracepoint_marker_definition): Constify.
42 * tracepoint.h (parse_static_tracepoint_marker_definition)
43 (parse_trace_status, parse_tracepoint_status)
44 (parse_tracepoint_definition, parse_tsv_definition): Constify.
45
46 2017-09-29 Pedro Alves <palves@redhat.com>
47
48 * remote.c (target_buf, target_buf_size): Delete.
49 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
50 Use the connection's packet buffer instead.
51 All callers adjusted.
52 (_initialize_remote): Remove references to target_buf and
53 target_buf_size.
54
55 2017-09-28 Pedro Alves <palves@redhat.com>
56
57 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
58 unittests/common-utils-selftests.c.
59 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
60 (COMMON_OBS): Remove utils-selftests.o.
61 * utils-selftests.c: Move to ...
62 * unittests/common-utils-selftests.c: ... here and rename self
63 test to "string_printf".
64
65 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
66
67 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
68 having NULL cus or tus.
69
70 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
71
72 * arm-tdep.c: (convert_from_extended): Remove.
73 (convert_to_extended): Likewise.
74 (arm_extract_return_value): Use convert_typed_floating.
75 (arm_store_return_value): Likewise.
76
77 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
78 * sh-tdep.c: Do not include "floatformat.h".
79 (sh_littlebyte_bigword_type): New function.
80 (sh_register_convert_to_virtual): Use convert_typed_floating.
81 (sh_register_convert_to_raw): Likewise.
82 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
83 (sh64_littlebyte_bigword_type): New function.
84 (sh64_extract_return_value): Use convert_typed_floating.
85 (sh64_register_convert_to_virtual): Likewise.
86 (sh64_register_convert_to_raw): Likewise.
87
88 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
89
90 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
91 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
92
93 * gdbtypes.h (union type_specific): Make field floatformat hold
94 just a single struct floatformat, not an array.
95 (floatformat_from_type): Move here.
96 * gdbtypes.c (floatformat_from_type): Move here. Update to
97 changed TYPE_FLOATFORMAT definition.
98 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
99 (recursive_dump_type): Likewise.
100 (init_float_type): Install correct floatformat for byte order.
101 (arch_float_type): Likewise.
102
103 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
104
105 * gdbtypes.c (init_type): Change incoming argument from
106 length-in-bytes to length-in-bits. Assert length is a
107 multiple of TARGET_CHAR_BITS.
108 (arch_type, arch_flags_type): Likewise.
109 (init_integer_type): Update call to init_type.
110 (init_character_type): Likewise.
111 (init_boolean_type): Likewise.
112 (init_float_type): Likewise.
113 (init_decfloat_type): Likewise.
114 (init_complex_type): Likewise.
115 (init_pointer_type): Likewise.
116 (objfile_type): Likewise.
117 (arch_integer_type): Update call to arch_type.
118 (arch_character_type): Likewise.
119 (arch_boolean_type): Likewise.
120 (arch_float_type): Likewise.
121 (arch_decfloat_type): Likewise.
122 (arch_complex_type): Likewise.
123 (arch_pointer_type): Likewise.
124 (gdbtypes_post_init): Likewise.
125
126 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
127 (read_base_type): Likewise.
128 * mdebugread.c (basic_type): Likewise.
129 * stabsread.c (dbx_init_float_type): Likewise.
130 (rs6000_builtin_type): Likewise.
131 (read_range_type): Likewise. Also, fix call to init_integer_type
132 with erroneous length argument.
133
134 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
135 * d-lang.c (build_d_types): Likewise.
136 * f-lang.c (build_fortran_types): Likewise.
137 * go-lang.c (build_go_types): Likewise.
138 * opencl-lang.c (build_opencl_types): Likewise.
139 * jit.c (finalize_symtab): Likewise.
140 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
141 (build_std_type_info_type): Likewise.
142 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
143 update call to arch_flags_type.
144
145 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
146 arch_type.
147 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
148 * windows-tdep.c (windows_get_tlb_type): Likewise.
149
150 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
151 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
152 * m32c-tdep.c (make_types): Likewise.
153 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
154 (rl78_psw_type): Update call to arch_flags_type.
155 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
156 * rx-tdep.c (rx_psw_type): Likewise.
157 (rx_fpsw_type): Likewise.
158 * sparc-tdep.c (sparc_psr_type): Likewise.
159 (sparc_fsr_type): Likewise.
160 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
161 (sparc64_ccr_type): Likewise.
162 (sparc64_fsr_type): Likewise.
163 (sparc64_fprs_type): Likewise.
164
165 2017-09-27 Tom Tromey <tom@tromey.com>
166
167 * findcmd.c (find_command): Constify.
168
169 2017-09-27 Tom Tromey <tom@tromey.com>
170
171 * ada-tasks.c (task_command_1, task_command): Constify.
172
173 2017-09-27 Tom Tromey <tom@tromey.com>
174
175 * symtab.c (maintenance_print_symbol_cache)
176 (maintenance_flush_symbol_cache)
177 (maintenance_print_symbol_cache_statistics): Constify.
178
179 2017-09-27 Tom Tromey <tom@tromey.com>
180
181 * inferior.c (detach_inferior_command, kill_inferior_command)
182 (inferior_command): Constify.
183
184 2017-09-27 Tom Tromey <tom@tromey.com>
185
186 * regcache.c (regcache_print, maintenance_print_registers)
187 (maintenance_print_raw_registers)
188 (maintenance_print_cooked_registers)
189 (maintenance_print_register_groups)
190 (maintenance_print_remote_registers): Constify.
191
192 2017-09-27 Tom Tromey <tom@tromey.com>
193
194 * printcmd.c (map_display_numbers, undisplay_command)
195 (enable_disable_display_command, enable_display_command)
196 (disable_display_command): Constify.
197
198 2017-09-27 Tom Tromey <tom@tromey.com>
199
200 * breakpoint.h (delete_command): Don't declare.
201 * breakpoint.c (delete_command, enable_once_command)
202 (enable_count_command, enable_delete_command, breakpoint_1)
203 (maintenance_info_breakpoints, stopin_command, stopat_command)
204 (delete_command, delete_trace_command, save_breakpoints)
205 (save_breakpoints_command, save_tracepoints_command): Constify.
206
207 2017-09-27 Tom Tromey <tom@tromey.com>
208
209 * macrocmd.c (macro_expand_command, macro_expand_once_command)
210 (skip_ws, extract_identifier, macro_define_command)
211 (macro_undef_command, macro_list_command): Constify.
212
213 2017-09-27 Tom Tromey <tom@tromey.com>
214
215 * infcmd.c (environment_info, set_environment_command)
216 (unset_environment_command, path_info, info_proc_cmd_1)
217 (info_proc_cmd_mappings, info_proc_cmd_stat)
218 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
219 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
220
221 2017-09-27 Tom Tromey <tom@tromey.com>
222
223 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
224 Constify.
225
226 2017-09-27 Tom Tromey <tom@tromey.com>
227
228 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
229
230 2017-09-27 Tom Tromey <tom@tromey.com>
231
232 * demangle.c (demangle_command): Constify.
233
234 2017-09-27 Tom Tromey <tom@tromey.com>
235
236 * progspace.c (maintenance_info_program_spaces_command):
237 Constify.
238
239 2017-09-27 Tom Tromey <tom@tromey.com>
240
241 * compile/compile.c (check_raw_argument, compile_file_command)
242 (compile_code_command, compile_print_command): Constify.
243
244 2017-09-27 Tom Tromey <tom@tromey.com>
245
246 * reggroups.c (maintenance_print_reggroups): Constify.
247
248 2017-09-27 Tom Tromey <tom@tromey.com>
249
250 * dwarf2read.c (save_gdb_index_command): Constify.
251
252 2017-09-27 Tom Tromey <tom@tromey.com>
253
254 * stap-probe.c (info_probes_stap_command): Constify.
255
256 2017-09-27 Tom Tromey <tom@tromey.com>
257
258 * fork-child.c (unset_exec_wrapper_command): Constify.
259
260 2017-09-27 Tom Tromey <tom@tromey.com>
261
262 * btrace.c (get_uint, get_context_size, no_chunk)
263 (maint_btrace_packet_history_cmd)
264 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
265 (maint_info_btrace_cmd): Constify.
266
267 2017-09-27 Tom Tromey <tom@tromey.com>
268
269 * reverse.c (delete_bookmark_command): Constify.
270
271 2017-09-27 Tom Tromey <tom@tromey.com>
272
273 * remote.c (set_memory_packet_size)
274 (set_memory_write_packet_size, show_memory_write_packet_size)
275 (set_memory_read_packet_size, show_memory_read_packet_size)
276 (compare_sections_command, packet_command, remote_put_command)
277 (remote_get_command, remote_delete_command): Constify.
278
279 2017-09-27 Tom Tromey <tom@tromey.com>
280
281 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
282 (set_mipsfpu_double_command, set_mipsfpu_none_command)
283 (set_mipsfpu_auto_command): Constify.
284
285 2017-09-27 Tom Tromey <tom@tromey.com>
286
287 * cli/cli-cmds.h (cd_command): Constify.
288 * cli/cli-cmds.c (cd_command): Constify.
289
290 2017-09-27 Tom Tromey <tom@tromey.com>
291
292 * thread.c (thread_name_command, thread_find_command): Constify.
293
294 2017-09-27 Tom Tromey <tom@tromey.com>
295
296 * probe.c (enable_probes_command, disable_probes_command):
297 Constify.
298
299 2017-09-27 Tom Tromey <tom@tromey.com>
300
301 * symfile.c (symbol_file_command): Constify.
302 * gdbcore.h (deprecated_file_changed_hook): Constify.
303 * exec.c (deprecated_file_changed_hook, exec_file_command)
304 (file_command): Constify.
305 * defs.h (symbol_file_command): Constify.
306
307 2017-09-27 Tom Tromey <tom@tromey.com>
308
309 * remote-fileio.c (set_system_call_allowed)
310 (show_system_call_allowed): Constify.
311
312 2017-09-27 Tom Tromey <tom@tromey.com>
313
314 * tracepoint.c (delete_trace_variable_command)
315 (tfind_end_command, tfind_start_command, tfind_pc_command)
316 (tfind_tracepoint_command, tfind_line_command)
317 (tfind_range_command, tfind_outside_command): Constify.
318
319 2017-09-27 Tom Tromey <tom@tromey.com>
320
321 * ax-gdb.c (maint_agent_printf_command, agent_command)
322 (agent_eval_command): Constify.
323
324 2017-09-27 Tom Tromey <tom@tromey.com>
325
326 * tracepoint.c (info_scope_command): Constify.
327 * python/python.c (gdbpy_decode_line): Constify.
328 * python/py-breakpoint.c (bppy_init): Constify.
329 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
330 * location.h: (new_linespec_location)
331 (string_to_event_location_basic, string_to_event_location):
332 Constify.
333 * location.c (new_linespec_location)
334 (string_to_event_location_basic, string_to_event_location):
335 Constify.
336 * linespec.h (decode_line_with_current_source)
337 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
338 * linespec.c (linespec_lex_to_end)
339 (decode_line_with_current_source)
340 (decode_line_with_last_displayed): Constify.
341 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
342 Constify.
343 * cli/cli-cmds.c (edit_command, list_command): Constify.
344 * breakpoint.h (until_break_command, watch_command_wrapper)
345 (awatch_command_wrapper, rwatch_command_wrapper)
346 (init_ada_exception_breakpoint): Constify.
347 * breakpoint.c (break_command_1, dprintf_command)
348 (break_range_command, watch_command_wrapper)
349 (rwatch_command_wrapper, awatch_command_wrapper)
350 (until_break_command, init_ada_exception_breakpoint)
351 (strace_marker_create_sals_from_location, trace_command)
352 (ftrace_command, strace_command, struct tracepoint): Constify.
353 * ax-gdb.c (agent_command_1): Constify.
354 * ada-lang.c (ada_exception_sal): Constify.
355
356 2017-09-27 Tom Tromey <tom@tromey.com>
357
358 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
359 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
360 (get_context_size, no_chunk, get_insn_history_modifiers)
361 (cmd_record_insn_history, get_call_history_modifiers)
362 (cmd_record_call_history): Constify.
363
364 2017-09-27 Tom Tromey <tom@tromey.com>
365
366 * source.c (show_substitute_path_command)
367 (unset_substitute_path_command, set_substitute_path_command):
368 Constify.
369
370 2017-09-27 Tom Tromey <tom@tromey.com>
371
372 * typeprint.c (maintenance_print_type): Constify.
373 * maint.c (maintenance_dump_me, maintenance_demangle)
374 (maintenance_time_display, maintenance_info_sections)
375 (maintenance_print_statistics, maintenance_deprecate)
376 (maintenance_undeprecate): Constify.
377 (maintenance_do_deprecate): Constify. Use std::string.
378 (maintenance_selftest): Constify.
379 * gdbtypes.h (maintenance_print_type): Constify.
380
381 2017-09-27 Tom Tromey <tom@tromey.com>
382
383 * hppa-tdep.c (unwind_command): Constify.
384
385 2017-09-27 Tom Tromey <tom@tromey.com>
386
387 * target-descriptions.c (unset_tdesc_filename_cmd)
388 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
389 Constify.
390
391 2017-09-27 Tom Tromey <tom@tromey.com>
392
393 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
394
395 2017-09-27 Tom Tromey <tom@tromey.com>
396
397 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
398
399 2017-09-27 Tom Tromey <tom@tromey.com>
400
401 * tui/tui-regs.c (tui_reg_command): Constify.
402
403 2017-09-27 Tom Tromey <tom@tromey.com>
404
405 * skip.c (skip_file_command, skip_function_command)
406 (skip_enable_command, skip_disable_command, skip_delete_command):
407 Constify.
408
409 2017-09-27 Tom Tromey <tom@tromey.com>
410
411 * record-btrace.c (cmd_record_btrace_bts_start)
412 (cmd_record_btrace_pt_start): Constify.
413
414 2017-09-27 Tom Tromey <tom@tromey.com>
415
416 * symmisc.c (maintenance_print_symbols)
417 (maintenance_print_msymbols, maintenance_print_objfiles)
418 (maintenance_info_symtabs, maintenance_check_symtabs)
419 (maintenance_expand_symtabs, maintenance_info_line_tables):
420 Constify.
421
422 2017-09-27 Tom Tromey <tom@tromey.com>
423
424 * top.c (new_ui_command): Constify.
425
426 2017-09-27 Tom Tromey <tom@tromey.com>
427
428 * symfile.c (add_symbol_file_command)
429 (remove_symbol_file_command, list_overlays_command)
430 (map_overlay_command, unmap_overlay_command)
431 (overlay_auto_command, overlay_manual_command)
432 (overlay_off_command, overlay_load_command): Constify.
433
434 2017-09-27 Tom Tromey <tom@tromey.com>
435
436 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
437 (info_spu_mailbox_command, info_spu_dma_command)
438 (info_spu_proxydma_command): Constify.
439
440 2017-09-27 Tom Tromey <tom@tromey.com>
441
442 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
443
444 2017-09-27 Tom Tromey <tom@tromey.com>
445
446 * cli/cli-script.c (user_defined_command): Constify.
447
448 2017-09-27 Tom Tromey <tom@tromey.com>
449
450 * cli/cli-dump.c (dump_memory_command, dump_value_command)
451 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
452 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
453 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
454 (dump_binary_value, append_binary_memory, append_binary_value):
455 Constify.
456 (struct dump_context) <func>: Constify.
457 (add_dump_command): Update.
458
459 2017-09-27 Tom Tromey <tom@tromey.com>
460
461 * cli/cli-cmds.c (show_version, show_configuration)
462 (source_command, show_user): Constify.
463
464 2017-09-27 Tom Tromey <tom@tromey.com>
465
466 * target.c (maintenance_print_target_stack): Constify.
467
468 2017-09-27 Tom Tromey <tom@tromey.com>
469
470 * interps.c (interpreter_exec_cmd): Constify.
471
472 2017-09-27 Tom Tromey <tom@tromey.com>
473
474 * record-full.c (cmd_record_full_restore): Constify.
475
476 2017-09-27 Tom Tromey <tom@tromey.com>
477
478 * memattr.c (enable_mem_command, disable_mem_command)
479 (delete_mem_command): Constify.
480
481 2017-09-27 Tom Tromey <tom@tromey.com>
482
483 * value.c (show_convenience): Constify.
484
485 2017-09-27 Tom Tromey <tom@tromey.com>
486
487 * gdbcore.h (core_file_command): Update.
488 * corefile.c (core_file_command): Constify.
489
490 2017-09-27 Tom Tromey <tom@tromey.com>
491
492 * user-regs.c (maintenance_print_user_registers): Constify.
493
494 2017-09-27 Tom Tromey <tom@tromey.com>
495
496 * cp-namespace.c (maintenance_cplus_namespace): Constify.
497
498 2017-09-27 Tom Tromey <tom@tromey.com>
499
500 * cp-support.c (first_component_command): Constify.
501
502 2017-09-27 Tom Tromey <tom@tromey.com>
503
504 * psymtab.c (maintenance_print_psymbols)
505 (maintenance_info_psymtabs, maintenance_check_psymtabs):
506 Constify.
507
508 2017-09-27 Tom Tromey <tom@tromey.com>
509
510 * windows-tdep.c (display_tib): Constify.
511
512 2017-09-27 Tom Tromey <tom@tromey.com>
513
514 * linux-fork.c (delete_checkpoint_command)
515 (detach_checkpoint_command): Constify.
516
517 2017-09-27 Tom Tromey <tom@tromey.com>
518
519 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
520
521 2017-09-27 Tom Tromey <tom@tromey.com>
522
523 * arc-tdep.c (dump_arc_instruction_command): Constify.
524
525 2017-09-27 Tom Tromey <tom@tromey.com>
526
527 * valprint.c (set_radix, show_radix): Constify.
528
529 2017-09-27 Tom Tromey <tom@tromey.com>
530
531 * dtrace-probe.c (info_probes_dtrace_command): Constify.
532
533 2017-09-27 Tom Tromey <tom@tromey.com>
534
535 * command.h (not_just_help_class_command): Update.
536 * cli/cli-decode.h (not_just_help_class_command): Update.
537 * cli/cli-decode.c (not_just_help_class_command): Constify.
538
539 2017-09-27 Tom Tromey <tom@tromey.com>
540
541 * gdb_bfd.c (maintenance_info_bfds): Constify.
542
543 2017-09-27 Tom Tromey <tom@tromey.com>
544
545 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
546 overloads.
547 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
548 (do_const_cfunc): New function.
549 (cmd_cfunc_eq): New overload.
550 (cli_user_command_p): Check do_const_cfunc.
551 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
552 const_cfunc.
553 * command.h (add_cmd): Add const overload and no-function
554 overload.
555 (set_cmd_cfunc): Add const overload.
556 (cmd_const_cfunc_ftype): Declare.
557 (cmd_cfunc_eq): Add const overload.
558 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
559 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
560 overload.
561
562 2017-09-27 Tom Tromey <tom@tromey.com>
563
564 * macroexp.c (get_next_token_for_substitution): New function.
565 (substitute_args): Call it. Check for __VA_OPT__.
566
567 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
568 Pedro Alves <palves@redhat.com>
569
570 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
571 producer_is_icc_lt_14.
572 (producer_is_icc_lt_14): New function.
573 (check_producer): Add code for checking version of ICC.
574 (producer_is_icc): Move to producer.c.
575 (read_structure_type): Restrict ICC workaround to ICC<14.
576 * producer.c: Include selftest.h.
577 (producer_is_icc, producer_parsing_tests, _initialize_producer):
578 New functions.
579 * producer.h (producer_is_icc): New declaration.
580
581 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
582
583 * Makefile.in (SFILES): Add producer.c.
584 (COMMON_OBS): Add producer.o
585 * amd64-tdep.c (producer.h): Add new include.
586 * dwarf2read.c (producer.h): Add new include.
587 * producer.c: New file.
588 * producer.h: New file.
589 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
590 producer.c.
591 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
592 producer.h.
593
594 2017-09-26 Matthias Klose <doko@ubuntu.com>
595
596 * configure.ac: Search ncursesw before ncurses.
597 Check ncursesw/ncurses.h before ncurses/ncurses.h.
598 * gdb_curses.h: Include <ncursesw/ncurses.h>
599 * config.in, configure: Regenerate.
600
601 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
602
603 PR gdb/22185
604 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
605 obsolete.
606 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
607 Remove i386sol2 support.
608 * configure.nat <i386sol2>: Remove.
609 <sol2-64>: Fold into ...
610 <sol2>: ... this.
611 Move common settings to default section.
612 Add sol-thread.o.
613 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
614 x86_64-*-solaris2.1[0-9]*>: Rename to ...
615 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
616 <i[34567]86-*-solaris*>: Remove.
617 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
618
619 * configure.ac: Remove wctype in libw check.
620 (_MSE_INT_H): Don't define on Solaris 7-9.
621 <solaris*>: Remove libthread_db.so.1 check.
622 * configure: Regenerate.
623 * config.in: Regenerate.
624
625 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
626 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
627 (gdb_ps_size_t): Remove.
628 Use base types in users.
629 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
630
631 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
632
633 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
634
635 PR build/22206
636 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
637 (adi_is_addr_mapped): Likewise.
638 (PSR_ICC): Don't redefine.
639 (PSR_IMPL): Likewise.
640
641 2017-09-25 Tom Tromey <tom@tromey.com>
642
643 * regcache.c (regcache::dump): Use string_printf.
644
645 2017-09-25 Tom Tromey <tom@tromey.com>
646
647 * regcache.c (class regcache_invalidator): New.
648 (struct register_to_invalidate): Remove.
649 (make_cleanup_regcache_invalidate): Remove.
650 (regcache::raw_write): Use regcache_invalidator.
651
652 2017-09-25 Tom Tromey <tom@tromey.com>
653
654 * spu-tdep.c (spu2ppu_sniffer): Update.
655 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
656 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
657 Remove.
658 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
659 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
660 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
661 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
662 (frame_pop): Update.
663
664 2017-09-25 Tom Tromey <tom@tromey.com>
665
666 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
667 * regcache.h (regcache_xfree): Don't declare.
668 * regcache.c (regcache_xfree): Remove.
669 (do_regcache_xfree): Use delete.
670 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
671 * linux-fork.c (free_fork): Use delete.
672 (fork_save_infrun_state): Likewise.
673 * jit.c (jit_dealloc_cache): Use delete.
674 * infrun.c (discard_infcall_suspend_state): Use delete.
675
676 2017-09-25 Tom Tromey <tom@tromey.com>
677
678 * regcache.h (regcache_xmalloc): Don't declare.
679 (regcache_raw_set_cached_value): Update comment.
680 * regcache.c (regcache_xmalloc): Remove.
681 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
682 * jit.c (jit_frame_sniffer): Use new.
683 * frame.c (frame_save_as_regcache): Use new.
684
685 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
686
687 * NEWS: Advertise support for guarded-storage registers on IBM z.
688
689 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
690
691 * s390-linux-nat.c (have_regset_gs): New static variable.
692 (s390_linux_fetch_inferior_registers): Handle guarded-storage
693 control block and guarded-storage broadcast control regsets.
694 (s390_read_description): Detect whether the target has
695 guarded-storage support, return appropriate tdesc.
696 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
697 (features/s390x-gs-linux64.c): Likewise.
698 (struct gdbarch_tdep) <have_gs>: New field.
699 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
700 (s390_gsbc_regset): New variables.
701 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
702 and s390_gsbc_regset, if applicable.
703 (s390_core_read_description): Check whether core file was from a
704 target with guarded-storage support; include appropriate regsets.
705 (s390_gdbarch_init): Add registers for guarded-storage support.
706 (_initialize_s390_tdep): Initialize new target descriptions that
707 include registers for guarded-storage support.
708 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
709 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
710 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
711 (S390_NUM_REGS): Adjust macro definition.
712 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
713 (tdesc_s390x_gs_linux64): New declarations.
714
715 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
716
717 * features/s390-gs-linux64.xml: New file.
718 * features/s390-gs.xml: New file.
719 * features/s390-gsbc.xml: New file.
720 * features/s390x-gs-linux64.xml: New file.
721 * features/Makefile (WHICH): Add s390-gs-linux64 and
722 s390x-gs-linux64.
723 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
724 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
725 * features/s390-gs-linux64.c: New generated file.
726 * features/s390x-gs-linux64.c: New file.
727 * regformats/s390-gs-linux64.dat: New file.
728 * regformats/s390x-gs-linux64.dat: New file.
729
730 2017-09-23 Tom Tromey <tom@tromey.com>
731
732 * defs.h (make_cleanup_override_quit_handler): Don't declare.
733
734 2017-09-22 Tom Tromey <tom@tromey.com>
735
736 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
737 type to scoped_restore_tmpl.
738 <scoped_input_handler>: Initialize m_quit_handler directly.
739
740 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
741
742 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
743 (cd_command): Likewise. Free "current_directory" before
744 assigning to it.
745 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
746 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
747 * top.c (gdb_dirbuf): Remove global declaration.
748 * top.h (gdb_dirbuf): Likewise.
749
750 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
751
752 * gnulib/aclocal.m4: Regenerate.
753 * gnulib/config.in: Regenerate.
754 * gnulib/configure: Regenerate.
755 * gnulib/import/Makefile.am: Regenerate.
756 * gnulib/import/Makefile.in: Regenerate.
757 * gnulib/import/assure.h: New file.
758 * gnulib/import/at-func.c: Likewise
759 * gnulib/import/chdir-long.c: New file.
760 * gnulib/import/chdir-long.h: New file.
761 * gnulib/import/cloexec.c: New file.
762 * gnulib/import/cloexec.h: New file.
763 * gnulib/import/close.c: New file.
764 * gnulib/import/closedir.c: New file.
765 * gnulib/import/dirent-private.h: New file.
766 * gnulib/import/dup-safer.c: New file.
767 * gnulib/import/dup.c: New file.
768 * gnulib/import/dup2.c: New file.
769 * gnulib/import/error.c: New file.
770 * gnulib/import/error.h: New file.
771 * gnulib/import/exitfail.c: New file.
772 * gnulib/import/exitfail.h: New file.
773 * gnulib/import/fchdir.c: New file.
774 * gnulib/import/fcntl.c: New file.
775 * gnulib/import/fcntl.in.h: New file.
776 * gnulib/import/fd-hook.c: New file.
777 * gnulib/import/fd-hook.h: New file.
778 * gnulib/import/fd-safer.c: New file.
779 * gnulib/import/fdopendir.c: New file.
780 * gnulib/import/filename.h: New file.
781 * gnulib/import/filenamecat-lgpl.c: New file.
782 * gnulib/import/filenamecat.h: New file.
783 * gnulib/import/fstat.c: New file.
784 * gnulib/import/fstatat.c: New file.
785 * gnulib/import/getcwd-lgpl.c: New file.
786 * gnulib/import/getcwd.c: New file.
787 * gnulib/import/getdtablesize.c: New file.
788 * gnulib/import/getlogin_r.c: New file.
789 * gnulib/import/getprogname.c: New file.
790 * gnulib/import/getprogname.h: New file.
791 * gnulib/import/gettext.h: New file.
792 * gnulib/import/glob-libc.h: New file.
793 * gnulib/import/glob.c: New file.
794 * gnulib/import/glob.in.h: New file.
795 * gnulib/import/intprops.h: New file.
796 * gnulib/import/m4/chdir-long.m4: New file.
797 * gnulib/import/m4/close.m4: New file.
798 * gnulib/import/m4/closedir.m4: New file.
799 * gnulib/import/m4/d-ino.m4: New file.
800 * gnulib/import/m4/d-type.m4: New file.
801 * gnulib/import/m4/dup.m4: New file.
802 * gnulib/import/m4/dup2.m4: New file.
803 * gnulib/import/m4/error.m4: New file.
804 * gnulib/import/m4/fchdir.m4: New file.
805 * gnulib/import/m4/fcntl.m4: New file.
806 * gnulib/import/m4/fcntl_h.m4: New file.
807 * gnulib/import/m4/fdopendir.m4: New file.
808 * gnulib/import/m4/filenamecat.m4: New file.
809 * gnulib/import/m4/fstat.m4: New file.
810 * gnulib/import/m4/fstatat.m4: New file.
811 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
812 * gnulib/import/m4/getcwd-path-max.m4: New file.
813 * gnulib/import/m4/getcwd.m4: New file.
814 * gnulib/import/m4/getdtablesize.m4: New file.
815 * gnulib/import/m4/getlogin_r.m4: New file.
816 * gnulib/import/m4/getprogname.m4: New file.
817 * gnulib/import/m4/glob.m4: New file.
818 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
819 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
820 * gnulib/import/m4/mempcpy.m4: New file.
821 * gnulib/import/m4/memrchr.m4: New file.
822 * gnulib/import/m4/mode_t.m4: New file.
823 * gnulib/import/m4/msvc-inval.m4: New file.
824 * gnulib/import/m4/msvc-nothrow.m4: New file.
825 * gnulib/import/m4/open.m4: New file.
826 * gnulib/import/m4/openat.m4: New file.
827 * gnulib/import/m4/opendir.m4: New file.
828 * gnulib/import/m4/readdir.m4: New file.
829 * gnulib/import/m4/realloc.m4: New file.
830 * gnulib/import/m4/rewinddir.m4: New file.
831 * gnulib/import/m4/save-cwd.m4: New file.
832 * gnulib/import/m4/strdup.m4: New file.
833 * gnulib/import/m4/strerror.m4: New file.
834 * gnulib/import/m4/unistd-safer.m4: New file.
835 * gnulib/import/mempcpy.c: New file.
836 * gnulib/import/memrchr.c: New file.
837 * gnulib/import/msvc-inval.c: New file.
838 * gnulib/import/msvc-inval.h: New file.
839 * gnulib/import/msvc-nothrow.c: New file.
840 * gnulib/import/msvc-nothrow.h: New file.
841 * gnulib/import/open.c: New file.
842 * gnulib/import/openat-die.c: New file.
843 * gnulib/import/openat-priv.h: New file.
844 * gnulib/import/openat-proc.c: New file.
845 * gnulib/import/openat.c: New file.
846 * gnulib/import/openat.h: New file.
847 * gnulib/import/opendir.c: New file.
848 * gnulib/import/pipe-safer.c: New file.
849 * gnulib/import/readdir.c: New file.
850 * gnulib/import/realloc.c: New file.
851 * gnulib/import/rewinddir.c: New file.
852 * gnulib/import/save-cwd.c: New file.
853 * gnulib/import/save-cwd.h: New file.
854 * gnulib/import/strdup.c: New file.
855 * gnulib/import/strerror-override.c: New file.
856 * gnulib/import/strerror-override.h: New file.
857 * gnulib/import/strerror.c: New file.
858 * gnulib/import/unistd--.h: New file.
859 * gnulib/import/unistd-safer.h: New file.
860 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
861 "getcwd" and "glob".
862 * ser-tcp.c: Undefine "close" before redefining it.
863
864 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
865
866 * guile/scm-value.c (gdbscm_value_address): Initialize address,
867 get rid of res_val.
868
869 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
870
871 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
872 <sol2,sparc>: Likewise.
873 <sol2-64,i386>: Likewise.
874
875 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
876 -Wdeprecated-declarations on *-*-solaris*.
877 * configure: Regenerate.
878
879 * procfs.c: Include "nat/inferior.h".
880 (procfs_info_proc): Fix typo.
881
882 2017-09-21 Kevin Buettner <kevinb@redhat.com>
883
884 * remote.c (vector): Include.
885 (struct private_thread_info): Add field, thread_handle.
886 (free_private_thread_info): Deallocate storage associated with
887 thread handle.
888 (get_private_info_thread): Initialize `thread_handle' field.
889 (struct thread_item): Add field, thread_handle.
890 (clear_threads_listing_context): Deallocate storage associated
891 with thread handle.
892 (start_thread): Add support for "handle" attribute.
893 (thread_attributes): Add "handle".
894 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
895 field.
896 (remote_update_thread_list): Update thread_handle.
897 (remote_thread_handle_to_thread_info): New function.
898 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
899
900 2017-09-21 Kevin Buettner <kevinb@redhat.com>
901
902 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
903 function.
904 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
905 * python/python-internal.h (thread_object_type): Declare.
906
907 2017-09-21 Kevin Buettner <kevinb@redhat.com>
908
909 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
910 (target_thread_handle_to_thread_info): Declare.
911 * target.c (target_thread_handle_to_thread_info): New function.
912 * target-delegates.c: Regenerate.
913 * gdbthread.h (find_thread_by_handle): Declare.
914 * thread.c (find_thread_by_handle): New function.
915 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
916 function.
917 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
918
919 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
920
921 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
922
923 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
924
925 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
926
927 2017-09-21 Yao Qi <yao.qi@linaro.org>
928
929 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
930 to gdb_target_obs.
931
932 2017-09-20 Tom Tromey <tom@tromey.com>
933
934 * breakpoint.c (struct counted_command_line): Remove.
935 (breakpoint_commands): Update.
936 (alloc_counted_command_line, incref_counted_command_line)
937 (decref_counted_command_line, do_cleanup_counted_command_line)
938 (make_cleanup_decref_counted_command_line): Remove.
939 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
940 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
941 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
942 (save_breakpoints): Update.
943 * breakpoint.h (counted_command_line): Now a typedef to
944 shared_ptr.
945 (struct breakpoint) <commands>: Now a counted_command_line.
946 (struct bpstats) <command>: Likewise.
947
948 2017-09-20 Tom Tromey <tom@tromey.com>
949
950 * breakpoint.c (struct commands_info, do_map_commands_command):
951 Remove.
952 (commands_command_1): Update.
953 (iterate_over_related_breakpoints): Take a function_view.
954 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
955 (delete_command): Update.
956 (map_breakpoint_numbers): Take a function_view.
957 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
958 (disable_command): Update.
959 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
960 (enable_command): Update.
961 (struct disp_data, do_enable_breakpoint_disp)
962 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
963 (do_map_enable_delete_breakpoint): Remove.
964 (enable_once_command, enable_count_command, enable_delete_command)
965 (delete_trace_variable_command): Update.
966
967 2017-09-20 Tom Tromey <tom@tromey.com>
968
969 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
970 (bpstat_clear): Use delete.
971 (bpstats): New constructors.
972 (bpstat_copy, bpstat_stop_status): Use new.
973 (dprintf_after_condition_true): Update.
974 * breakpoint.h (bpstats::bpstats): Add constructors.
975 (bpstats::~bpstats): Add destructor.
976
977 2017-09-20 Pedro Alves <palves@redhat.com>
978
979 * eval.c (make_params): Delete, refactored as ...
980 (class fake_method): ... this new type's ctor.
981 (fake_method::~fake_method): New.
982 (evaluate_subexp_standard): Use 'fake_method'.
983
984 2017-09-20 Tom Tromey <tom@tromey.com>
985
986 * windows-nat.c (get_windows_debug_event, windows_wait)
987 (do_initial_windows_stuff, windows_attach): Update.
988 * utils.c (vwarning, internal_vproblem): Update.
989 (ui_unregister_input_event_handler_cleanup)
990 (prepare_to_handle_input): Remove.
991 (class scoped_input_handler): New.
992 (defaulted_query, prompt_for_continue): Update.
993 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
994 Update.
995 * top.c (undo_terminal_modifications_before_exit): Update.
996 * target/target.h (target_terminal_init, target_terminal_inferior)
997 (target_terminal_ours): Don't declare.
998 (class target_terminal): New.
999 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
1000 (target_terminal_ours_for_output)
1001 (make_cleanup_restore_target_terminal): Don't declare.
1002 (target_terminal_info): Remove.
1003 * target.c (enum terminal_state, terminal_state): Remove.
1004 (target_terminal::terminal_state): Define.
1005 (target_terminal::init): Rename from target_terminal_init.
1006 (target_terminal::inferior): Rename from
1007 target_terminal_inferior.
1008 (target_terminal::ours): Rename from target_terminal_ours.
1009 (target_terminal::ours_for_output): Rename from
1010 target_terminal_ours_for_output.
1011 (target_terminal::info): New method.
1012 (cleanup_restore_target_terminal)
1013 (make_cleanup_restore_target_terminal): Remove.
1014 * solib.c (handle_solib_event): Update.
1015 * remote.c (remote_serial_quit_handler): Update.
1016 (remote_terminal_inferior, remote_wait_as): Update.
1017 * record-full.c (record_full_wait_1): Update.
1018 * nto-procfs.c (procfs_create_inferior): Update.
1019 * nat/fork-inferior.c (startup_inferior): Update.
1020 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
1021 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
1022 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
1023 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
1024 (mi_breakpoint_created, mi_breakpoint_deleted)
1025 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
1026 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1027 (mi_user_selected_context_changed, report_initial_inferior):
1028 Update.
1029 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
1030 (linux_nat_terminal_inferior): Update.
1031 * infrun.c (follow_fork_inferior)
1032 (handle_vfork_child_exec_or_exit, do_target_resume)
1033 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
1034 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
1035 Update.
1036 * inflow.c (child_terminal_init, info_terminal_command): Update.
1037 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
1038 (attach_command): Update.
1039 * infcall.c (call_thread_fsm_should_stop): Update.
1040 * gnu-nat.c (gnu_attach): Update.
1041 * extension.c (struct active_ext_lang_state)
1042 (restore_active_ext_lang): Update.
1043 * exceptions.c (print_flush): Update.
1044 * event-top.c (async_enable_stdin, default_quit_handler): Update.
1045 (struct quit_handler_cleanup_data, restore_quit_handler)
1046 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
1047 Remove.
1048 * cp-support.c (gdb_demangle): Update.
1049 * breakpoint.c (update_inserted_breakpoint_locations)
1050 (insert_breakpoint_locations, handle_jit_event)
1051 (disable_breakpoints_in_unloaded_shlib): Update.
1052 * annotate.c (annotate_breakpoints_invalid)
1053 (annotate_frames_invalid): Update.
1054
1055 2017-09-20 Tom Tromey <tom@tromey.com>
1056
1057 * main.c (catch_command_errors): Rename from
1058 catch_command_errors_const.
1059 (captured_main_1): Update.
1060
1061 2017-09-20 Pedro Alves <palves@redhat.com>
1062
1063 * cli/cli-cmds.c (list_command): Use print_sal_location.
1064 (print_sal_location): New function.
1065 (ambiguous_line_spec): Use print_sal_location.
1066 * linespec.c (symbol_to_sal): Record the symbol in the sal.
1067 * symtab.c (find_function_start_sal): Likewise.
1068 * symtab.h (symtab_and_line::symbol): New field.
1069
1070 2017-09-20 Pedro Alves <palves@redhat.com>
1071
1072 * linespec.c (minsym_found): Handle non-text minsyms.
1073 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1074
1075 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1076
1077 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1078 backslash.
1079
1080 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1081
1082 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1083 vmovups instead vmovaps.
1084 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1085
1086 2017-09-19 John Baldwin <jhb@FreeBSD.org>
1087
1088 * NEWS (Changes since GDB 8.0): Add starti.
1089 * infcmd.c (enum run_break): New.
1090 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1091 case.
1092 (run_command): Use enum run_how.
1093 (start_command): Likewise.
1094 (starti_command): New function.
1095 (RUN_ARGS_HELP): New macro.
1096 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1097 commands. Add starti command.
1098
1099 2017-09-19 Yao Qi <yao.qi@linaro.org>
1100
1101 * Makefile.in (monitor.o): Remove the rule.
1102
1103 2017-09-19 Yao Qi <yao.qi@linaro.org>
1104
1105 * annotate.h (struct annotate_arg_emitter): Use
1106 DISABLE_COPY_AND_ASSIGN.
1107 * common/refcounted-object.h (refcounted_object): Likewise.
1108 * completer.h (struct completion_result): Likewise.
1109 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1110 * filename-seen-cache.h (filename_seen_cache): Likewise.
1111 * gdbcore.h (thread_section_name): Likewise.
1112 * gdb_regex.h (compiled_regex): Likewise.
1113 * gdbthread.h (scoped_restore_current_thread): Likewise.
1114 * inferior.h (scoped_restore_current_inferior): Likewise.
1115 * jit.c (jit_reader): Likewise.
1116 * linespec.h (struct linespec_result): Likewise.
1117 * mi/mi-parse.h (struct mi_parse): Likewise.
1118 * nat/fork-inferior.c (execv_argv): Likewise.
1119 * progspace.h (scoped_restore_current_program_space): Likewise.
1120 * python/python-internal.h (class gdbpy_enter): Likewise.
1121 * regcache.h (regcache): Likewise.
1122 * target-descriptions.c (struct tdesc_reg): Likewise.
1123 (struct tdesc_type): Likewise.
1124 (struct tdesc_feature): Likewise.
1125 * ui-out.h (ui_out_emit_type): Likewise.
1126
1127 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
1128
1129 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1130 label abort_expression.
1131
1132 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1133
1134 * common/buffer.c (buffer_xml_printf): Adjust.
1135 * common/xml-utils.c (xml_escape_text): Change return type to
1136 std::string, update code accordingly.
1137 * common/xml-utils.h (xml_escape_text): Change return type to
1138 std::string.
1139 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
1140 * windows-tdep.c (windows_xfer_shared_library): Adjust.
1141 * unittests/xml-utils-selftests.c (test_xml_escape_text):
1142 Adjust.
1143
1144 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1145
1146 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
1147 (SUBDIR_UNITTESTS_OBS): Add new object file.
1148 * unittests/xml-utils-selftests.c: New file.
1149
1150 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1151
1152 * common/selftest.h (selftest): New struct/interface.
1153 (register_test): Add name parameter, add new overload.
1154 (run_tests): Add filter parameter.
1155 (for_each_selftest_ftype): New typedef.
1156 (for_each_selftest): New declaration.
1157 * common/selftest.c (tests): Change type to
1158 map<string, unique_ptr<selftest>>.
1159 (simple_selftest): New struct.
1160 (register_test): New function.
1161 (register_test): Add name parameter and use it.
1162 (run_tests): Add filter parameter and use it. Add prints.
1163 Adjust to vector -> map change.
1164 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
1165 registering selftests.
1166 * arm-tdep.c (_initialize_arm_tdep): Likewise.
1167 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
1168 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
1169 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
1170 * findvar.c (_initialize_findvar): Likewise.
1171 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
1172 * maint.c (maintenance_selftest): Update call to run_tests.
1173 (maintenance_info_selftests): New function.
1174 (_initialize_maint_cmds): Register "maintenance info selftests"
1175 command. Update "maintenance selftest" doc.
1176 * regcache.c (_initialize_regcache): Add names when registering
1177 selftests.
1178 * rust-exp.y (_initialize_rust_exp): Likewise.
1179 * selftest-arch.c (gdbarch_selftest): New struct.
1180 (gdbarch_tests): Remove.
1181 (register_test_foreach_arch): Add name parameter. Call
1182 register_test.
1183 (tests_with_arch): Remove, move most content to
1184 gdbarch_selftest::operator().
1185 (_initialize_selftests_foreach_arch): Remove.
1186 * selftest-arch.h (register_test_foreach_arch): Add name
1187 parameter.
1188 (run_tests_with_arch): New declaration.
1189 * utils-selftests.c (_initialize_utils_selftests): Add names
1190 when registering selftests.
1191 * utils.c (_initialize_utils): Likewise.
1192 * unittests/array-view-selftests.c
1193 (_initialize_array_view_selftests): Likewise.
1194 * unittests/environ-selftests.c (_initialize_environ_selftests):
1195 Likewise.
1196 * unittests/function-view-selftests.c
1197 (_initialize_function_view_selftests): Likewise.
1198 * unittests/offset-type-selftests.c
1199 (_initialize_offset_type_selftests): Likewise.
1200 * unittests/optional-selftests.c
1201 (_initialize_optional_selftests): Likewise.
1202 * unittests/scoped_restore-selftests.c
1203 (_initialize_scoped_restore_selftests): Likewise.
1204 * NEWS: Document "maintenance selftest" and "maint info
1205 selftests".
1206
1207 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1208
1209 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1210 scoped_restore.
1211
1212 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1213
1214 * mi/mi-main.c (mi_load_progress): Make uiout variable
1215 a unique_ptr.
1216
1217 2017-09-15 Pedro Alves <palves@redhat.com>
1218
1219 * compile/compile-c-types.c (convert_enum, convert_int)
1220 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1221
1222 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1223
1224 * dwarf2read.c (copy_string): Remove.
1225 (parse_macro_definition): Replace copy_string with savestring.
1226
1227 2017-09-15 Yao Qi <yao.qi@linaro.org>
1228
1229 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1230 gdb_target_obs.
1231 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1232 Likewise.
1233 (i[34567]86-*-linux*): Likewise.
1234
1235 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1236
1237 * dwarf2expr.h (dwarf_stack_value): Add constructor.
1238 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1239 <stack>: Change type to std::vector.
1240 <stack_len, stack_allocated>: Remove.
1241 <grow_stack>: Remove.
1242 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1243 (dwarf_expr_context::~dwarf_expr_context): Remove.
1244 (dwarf_expr_context::grow_stack): Remove.
1245 (dwarf_expr_context::push): Adjust.
1246 (dwarf_expr_context::pop): Adjust.
1247 (dwarf_expr_context::fetch): Adjust.
1248 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
1249 (dwarf_expr_context::stack_empty_p): Adjust.
1250 (dwarf_expr_context::execute_stack_op): Adjust.
1251
1252 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1253
1254 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
1255 return type to bool.
1256 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
1257
1258 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1259
1260 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
1261 Change type to bool.
1262 (dwarf_stack_value) <in_stack_memory>: Likewise.
1263 (dwarf_expr_context) <push_address>: Change parameter type to
1264 bool.
1265 <fetch_in_stack_memory>: Change return type to bool.
1266 <push>: Change parameter type to bool.
1267 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
1268 to bool.
1269 (dwarf_expr_context::push_address): Likewise.
1270 (dwarf_expr_context::fetch_in_stack_memory): Change return type
1271 to bool.
1272 (dwarf_expr_context::execute_stack_op): Adjust.
1273 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
1274
1275 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1276
1277 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
1278 (struct dwarf_expr_context) <n_pieces>: Remove.
1279 <pieces>: Change type to std::vector.
1280 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1281 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
1282 pieces.
1283 (dwarf_expr_context::add_piece): Adjust.
1284 * dwarf2loc.c (struct piece_closure): Initialize fields.
1285 <n_pieces>: Remove.
1286 <pieces>: Change type to std::vector.
1287 (allocate_piece_closure): Adjust, change parameter to
1288 std::vector rvalue and std::move it to piece_closure.
1289 (rw_pieced_value): Adjust.
1290 (check_pieced_synthetic_pointer): Adjust.
1291 (indirect_synthetic_pointer): Adjust.
1292 (coerce_pieced_ref): Adjust.
1293 (free_pieced_value_closure): Adjust. Use delete to free
1294 piece_closure.
1295 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
1296 to allocate_piece_closure.
1297 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
1298
1299 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1300
1301 * probe.h (probe_ops_cp): Remove typedef.
1302 (DEF_VEC_P (probe_ops_cp)): Remove.
1303 (all_probe_ops): Change type to std::vector.
1304 * probe.c (info_probes_for_ops): Adjust to vector change.
1305 (probe_linespec_to_ops): Likewise.
1306 (all_probe_ops): Change type to std::vector.
1307 (_initialize_probe): Adjust to vector change.
1308 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
1309 * elfread.c (elf_get_probes): Likewise.
1310 * stap-probe.c (_initialize_stap_probe): Likewise.
1311
1312 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1313
1314 * probe.h (struct bound_probe): Define constructors.
1315 * probe.c (bound_probe_s): Remove typedef.
1316 (DEF_VEC_O (bound_probe_s)): Remove VEC.
1317 (collect_probes): Change return type to std::vector, remove
1318 cleanup.
1319 (compare_probes): Return bool, change parameter type. Change
1320 semantic to "less than".
1321 (gen_ui_out_table_header_info): Change parameter to std::vector
1322 and update.
1323 (exists_probe_with_pops): Likewise.
1324 (info_probes_for_ops): Update to std::vector change.
1325 (enable_probes_command): Likewise.
1326 (disable_probes_command): Likewise.
1327
1328 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1329
1330 * probe.h (struct probe_ops) <get_probes>: Change parameter from
1331 vec to std::vector.
1332 * probe.c (parse_probes_in_pspace): Update.
1333 (find_probes_in_objfile): Update.
1334 (find_probe_by_pc): Update.
1335 (collect_probes): Update.
1336 (probe_any_get_probes): Update.
1337 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
1338 return type to reference to std::vector.
1339 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
1340 std::vector and update.
1341 (dtrace_process_dof): Likewise.
1342 (dtrace_get_probes): Likewise.
1343 * elfread.c (elf_get_probes): Change return type to std::vector,
1344 store an std::vector in bfd_data.
1345 (probe_key_free): Update to std::vector.
1346 * stap-probe.c (handle_stap_probe): Change parameter to
1347 std::vector and update.
1348 (stap_get_probes): Likewise.
1349 * symfile-debug.c (debug_sym_get_probes): Change return type to
1350 std::vector and update.
1351
1352 2017-09-11 Tom Tromey <tom@tromey.com>
1353
1354 * breakpoint.c (program_breakpoint_here_p): Update.
1355 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
1356 from make_show_memory_breakpoints_cleanup. Return a
1357 scoped_restore_tmpl<int>.
1358 (restore_show_memory_breakpoints): Remove.
1359 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
1360 * mem-break.c (memory_validate_breakpoint): Update.
1361 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
1362 (ia64_memory_remove_breakpoint): Update.
1363 (ia64_breakpoint_from_pc): Update.
1364 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
1365 from make_show_memory_breakpoints_cleanup.
1366
1367 2017-09-11 Tom Tromey <tom@tromey.com>
1368
1369 * d-namespace.c (d_lookup_symbol): Use std::string.
1370 (find_symbol_in_baseclass): Likewise.
1371
1372 2017-09-11 Tom Tromey <tom@tromey.com>
1373
1374 * ctf.c (ctf_start): Use std::string.
1375
1376 2017-09-11 Tom Tromey <tom@tromey.com>
1377
1378 * ada-lang.c (is_known_support_routine): Update.
1379 (ada_unhandled_exception_name_addr_from_raise): Update.
1380 * guile/scm-frame.c (gdbscm_frame_name): Update.
1381 * python/py-frame.c (frapy_name): Update.
1382 (frapy_function): Update.
1383 * stack.h (find_frame_funname): Update.
1384 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
1385 (print_frame): Update.
1386
1387 2017-09-11 Tom Tromey <tom@tromey.com>
1388
1389 * findcmd.c (put_bits): Take a gdb::byte_vector.
1390 (parse_find_args): Return gdb::byte_vector. "args" now const.
1391 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
1392 cleanups.
1393 (find_command): Update.
1394
1395 2017-09-11 Tom Tromey <tom@tromey.com>
1396
1397 * cli/cli-script.c (class scoped_restore_hook_in): New.
1398 (clear_hook_in_cleanup): Remove.
1399 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
1400 scoped_restore_hook_in.
1401
1402 2017-09-11 Tom Tromey <tom@tromey.com>
1403
1404 * cli/cli-script.c (restore_interp): Remove.
1405 (read_command_lines): Use scoped_restore_interp.
1406 * interps.c (scoped_restore_interp::set_temp): Rename from
1407 interp_set_temp.
1408 * interps.h (class scoped_restore_interp): New.
1409 (interp_set_temp): Remove.
1410
1411 2017-09-11 Tom Tromey <tom@tromey.com>
1412
1413 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1414 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
1415 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
1416 scoped_restore.
1417 (mi_cmd_break_insert_1): Update.
1418 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
1419 scoped_restore.
1420
1421 2017-09-11 Tom Tromey <tom@tromey.com>
1422
1423 * demangle.c (demangle_command): Update.
1424 * breakpoint.c (disable_command): Update.
1425 (enable_command): Update.
1426 (find_location_by_number): Make "number" const. Use
1427 get_number_trailer.
1428 * cli/cli-utils.c (extract_arg): Return std::string.
1429 * probe.c (parse_probe_linespec): Update. Change types.
1430 (collect_probes): Take string arguments.
1431 (parse_probe_linespec): Likewise.
1432 (info_probes_for_ops): Update.
1433 (enable_probes_command): Update.
1434 (disable_probes_command): Update.
1435 * break-catch-sig.c (catch_signal_split_args): Update.
1436 * mi/mi-parse.c (mi_parse): Update.
1437
1438 2017-09-11 Tom Tromey <tom@tromey.com>
1439
1440 * language.h (language_enum): Make argument const.
1441 * language.c (language_enum): Make argument const.
1442
1443 2017-09-11 Tom Tromey <tom@tromey.com>
1444
1445 * common/common-utils.h (skip_to_space): Remove macro, redeclare
1446 as function.
1447 (skip_to_space): Rename from skip_to_space_const.
1448 * common/common-utils.c (skip_to_space): New function.
1449 (skip_to_space): Rename from skip_to_space_const.
1450 * cli/cli-utils.h (get_number): Rename from get_number_const.
1451 (extract_arg): Rename from extract_arg_const.
1452 * cli/cli-utils.c (get_number): Rename from get_number_const.
1453 (extract_arg): Rename from extract_arg_const.
1454 (number_or_range_parser::get_number): Use ::get_number.
1455 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
1456 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
1457 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
1458 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
1459 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
1460 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
1461 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
1462 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
1463
1464 2017-09-11 Tom Tromey <tom@tromey.com>
1465
1466 * python/python.c (do_start_initialization): Use
1467 py-event-types.def to initialize types.
1468 Define all object type structures.
1469 * python/python-internal.h: Don't declare event initialization
1470 functions.
1471 * python/py-threadevent.c (thread_event_object_type): Don't
1472 define.
1473 * python/py-stopevent.c (stop_event_object_type): Don't define.
1474 * python/py-signalevent.c (signal_event_object_type): Don't
1475 declare or define.
1476 * python/py-newobjfileevent.c (new_objfile_event_object_type)
1477 (clear_objfiles_event_object_type): Don't declare or define.
1478 * python/py-infevents.c (inferior_call_pre_event_object_type)
1479 (inferior_call_post_event_object_type)
1480 (register_changed_event_object_type)
1481 (memory_changed_event_object_type): Don't declare or define.
1482 * python/py-inferior.c (new_thread_event_object_type)
1483 (new_inferior_event_object_type)
1484 (inferior_deleted_event_object_type): Don't declare or define.
1485 * python/py-exitedevent.c (exited_event_object_type): Don't
1486 declare or define.
1487 * python/py-evts.c (gdbpy_initialize_py_events): Use
1488 py-all-events.def.
1489 * python/py-events.h (thread_event_object_type): Don't declare.
1490 (events_object): Use py-all-events.def.
1491 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
1492 py-event-types.def.
1493 * python/py-event-types.def: New file.
1494 * python/py-continueevent.c (create_continue_event_object): Don't
1495 declare or define.
1496 * python/py-bpevent.c (breakpoint_event_object_type): Don't
1497 declare or define.
1498 * python/py-all-events.def: New file.
1499
1500 2017-09-11 Tom Tromey <tom@tromey.com>
1501
1502 * python/py-threadevent.c (create_thread_event_object): Return
1503 gdbpy_ref.
1504 * python/py-stopevent.h (create_stop_event_object)
1505 (create_breakpoint_event_object, create_signal_event_object):
1506 Update.
1507 * python/py-stopevent.c (create_stop_event_object): Return
1508 gdbpy_ref.
1509 (emit_stop_event): Update.
1510 * python/py-signalevent.c (create_signal_event_object): Return
1511 gdbpy_ref.
1512 * python/py-infevents.c (create_inferior_call_event_object):
1513 Update.
1514 * python/py-event.h (create_event_object)
1515 (create_thread_event_object): Update.
1516 * python/py-event.c (create_event_object): Return gdbpy_ref.
1517 * python/py-continueevent.c: Return gdbpy_ref.
1518 * python/py-bpevent.c (create_breakpoint_event_object): Return
1519 gdbpy_ref.
1520
1521 2017-09-11 Tom Tromey <tom@tromey.com>
1522
1523 PR python/15622:
1524 * NEWS: Add entry.
1525 * python/python.c (do_start_initialization): Initialize new event
1526 types.
1527 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
1528 (gdbpy_initialize_inferior_deleted_event)
1529 (gdbpy_initialize_new_thread_event): Declare.
1530 * python/py-threadevent.c (create_thread_event_object): Add option
1531 "thread" parameter.
1532 * python/py-inferior.c (new_thread_event_object_type)
1533 (new_inferior_event_object_type)
1534 (inferior_deleted_event_object_type): Declare.
1535 (python_new_inferior, python_inferior_deleted): New functions.
1536 (add_thread_object): Emit new_thread event.
1537 (gdbpy_initialize_inferior): Attach new functions to corresponding
1538 observers.
1539 (new_thread, new_inferior, inferior_deleted): Define new event
1540 types.
1541 * python/py-evts.c (gdbpy_initialize_py_events): Add new
1542 registries.
1543 * python/py-events.h (events_object) <new_inferior,
1544 inferior_deleted, new_thread>: New fields.
1545 * python/py-event.h (create_thread_event_breakpoint): Add optional
1546 "thread" parameter.
1547
1548 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1549
1550 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
1551 check current_ui instead.
1552 (internal_vproblem): Likewise.
1553
1554 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
1555
1556 * thread.c (print_thread_info_1): Remove unnecessary calls to
1557 uiout->is_mi_like_p.
1558
1559 2017-09-09 Tom Tromey <tom@tromey.com>
1560
1561 * namespace.h (add_using_directive): Update.
1562 * namespace.c (add_using_directive): Change type of excludes to
1563 std::vector.
1564 * dwarf2read.c (read_import_statement): Use std::vector.
1565 (read_namespace): Update.
1566 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1567
1568 2017-09-09 Tom Tromey <tom@tromey.com>
1569
1570 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
1571
1572 2017-09-09 Tom Tromey <tom@tromey.com>
1573
1574 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
1575
1576 2017-09-09 Tom Tromey <tom@tromey.com>
1577
1578 * stack.c (func_command): Use gdb::def_vector.
1579
1580 2017-09-09 Tom Tromey <tom@tromey.com>
1581
1582 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
1583 ui_out_emit_list, ui_out_emit_tuple.
1584 (mi_cmd_var_update): Likewise.
1585
1586 2017-09-09 Tom Tromey <tom@tromey.com>
1587
1588 * mi/mi-interp.c (mi_user_selected_context_changed): Use
1589 ui_out_redirect_pop.
1590 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1591 ui_out_redirect_pop.
1592 * utils.c (do_ui_out_redirect_pop)
1593 (make_cleanup_ui_out_redirect_pop): Remove.
1594 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
1595 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
1596 * ui-out.h (ui_out_redirect_pop): New class.
1597
1598 2017-09-09 Tom Tromey <tom@tromey.com>
1599
1600 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
1601 (list_available_thread_groups, mi_cmd_list_thread_groups)
1602 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
1603 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
1604 Likewise.
1605
1606 2017-09-09 Tom Tromey <tom@tromey.com>
1607
1608 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
1609 ui_out_emit_tuple.
1610
1611 2017-09-09 Tom Tromey <tom@tromey.com>
1612
1613 * target.c (flash_erase_command): Use ui_out_emit_tuple.
1614 * stack.c (print_frame): Use ui_out_emit_tuple.
1615 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
1616 (info_spu_mailbox_command, info_spu_dma_command)
1617 (info_spu_proxydma_command): Likewise.
1618 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
1619 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
1620 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
1621 ui_out_emit_tuple.
1622 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
1623
1624 2017-09-09 Tom Tromey <tom@tromey.com>
1625
1626 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
1627 (class ui_out_emit_table): Update comment.
1628 * ui-out.c (do_cleanup_table_end)
1629 (make_cleanup_ui_out_table_begin_end): Remove.
1630 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
1631 (info_spu_dma_cmdlist): Likewise.
1632 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
1633 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
1634 ui_out_emit_table.
1635
1636 2017-09-09 Tom Tromey <tom@tromey.com>
1637
1638 * thread.c (print_thread_info_1): Use ui_out_emit_table,
1639 ui_out_emit_list, gdb::optional.
1640
1641 2017-09-09 John Baldwin <jhb@FreeBSD.org>
1642
1643 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
1644 prototype.
1645 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
1646 prototype.
1647 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
1648 prototype.
1649 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
1650 * ada-exp.y: Remove _initialize_ada_exp prototype.
1651 * ada-lang.c: Remove _initialize_ada_language prototype.
1652 * ada-tasks.c: Remove _initialize_tasks prototype.
1653 * addrmap.c: Remove _initialize_addrmap prototype.
1654 * agent.c: Remove _initialize_agent prototype.
1655 * aix-thread.c: Remove _initialize_aix_thread prototype.
1656 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
1657 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
1658 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
1659 prototype.
1660 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
1661 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
1662 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
1663 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
1664 prototype.
1665 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
1666 prototype.
1667 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
1668 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
1669 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
1670 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
1671 prototype.
1672 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
1673 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
1674 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
1675 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
1676 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1677 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
1678 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
1679 prototype.
1680 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
1681 prototype.
1682 * annotate.c: Remove _initialize_annotate prototype.
1683 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
1684 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
1685 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
1686 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
1687 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1688 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1689 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1690 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1691 prototype.
1692 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1693 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1694 * auto-load.c: Remove _initialize_auto_load prototype.
1695 * auxv.c: Remove _initialize_auxv prototype.
1696 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1697 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1698 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1699 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1700 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1701 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1702 prototype.
1703 * break-catch-throw.c: Remove _initialize_break_catch_throw
1704 prototype.
1705 * breakpoint.c: Remove _initialize_breakpoint prototype.
1706 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1707 * btrace.c: Remove _initialize_btrace prototype.
1708 * charset.c: Remove _initialize_charset prototype.
1709 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1710 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1711 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1712 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1713 * cli/cli-script.c: Remove _initialize_cli_script prototype.
1714 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1715 * coffread.c: Remove _initialize_coffread prototype.
1716 * compile/compile.c: Remove _initialize_compile prototype.
1717 * complaints.c: Remove _initialize_complaints prototype.
1718 * completer.c: Remove _initialize_completer prototype.
1719 * copying.awk: Remove _initialize_copying prototype.
1720 * copying.c: Regenerate.
1721 * core-regset.c: Remove _initialize_core_regset prototype.
1722 * corefile.c: Remove _initialize_core prototype.
1723 * corelow.c: Remove _initialize_corelow prototype.
1724 * cp-abi.c: Remove _initialize_cp_abi prototype.
1725 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1726 * cp-support.c: Remove _initialize_cp_support prototype.
1727 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1728 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1729 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1730 * ctf.c: Remove _initialize_ctf prototype.
1731 * d-lang.c: Remove _initialize_d_language prototype.
1732 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1733 prototype.
1734 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1735 * dbxread.c: Remove _initialize_dbxread prototype.
1736 * dcache.c: Remove _initialize_dcache prototype.
1737 * demangle.c: Remove _initialize_demangler prototype.
1738 * disasm-selftests.c: Remove _initialize_disasm_selftests
1739 prototype.
1740 * disasm.c: Remove _initialize_disasm prototype.
1741 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1742 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1743 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1744 prototype.
1745 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1746 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1747 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1748 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1749 * elfread.c: Remove _initialize_elfread prototype.
1750 * exec.c: Remove _initialize_exec prototype.
1751 * extension.c: Remove _initialize_extension prototype.
1752 * f-lang.c: Remove _initialize_f_language prototype.
1753 * f-valprint.c: Remove _initialize_f_valprint prototype.
1754 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1755 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1756 * filesystem.c: Remove _initialize_filesystem prototype.
1757 * findcmd.c: Remove _initialize_mem_search prototype.
1758 * fork-child.c: Remove _initialize_fork_child prototype.
1759 * frame-base.c: Remove _initialize_frame_base prototype.
1760 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1761 * frame.c: Remove _initialize_frame prototype.
1762 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1763 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1764 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1765 * gcore.c: Remove _initialize_gcore prototype.
1766 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1767 * gdbarch.c: Regenerate.
1768 * gdbarch.sh: Remove _initialize_gdbarch prototype.
1769 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1770 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1771 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1772 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1773 * go-lang.c: Remove _initialize_go_language prototype.
1774 * go32-nat.c: Remove _initialize_go32_nat prototype.
1775 * guile/guile.c: Remove _initialize_guile prototype.
1776 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
1777 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
1778 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
1779 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
1780 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
1781 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
1782 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
1783 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
1784 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
1785 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
1786 prototype.
1787 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
1788 prototype.
1789 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
1790 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
1791 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
1792 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
1793 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
1794 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
1795 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
1796 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
1797 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
1798 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
1799 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
1800 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
1801 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
1802 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1803 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
1804 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
1805 prototype.
1806 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
1807 prototype.
1808 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
1809 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
1810 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
1811 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
1812 * infcall.c: Remove _initialize_infcall prototype.
1813 * infcmd.c: Remove _initialize_infcmd prototype.
1814 * inferior.c: Remove _initialize_inferiors prototype.
1815 * inflow.c: Remove _initialize_inflow prototype.
1816 * infrun.c: Remove _initialize_infrun prototype.
1817 * interps.c: Remove _initialize_interpreter prototype.
1818 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
1819 * jit.c: Remove _initialize_jit prototype.
1820 * language.c: Remove _initialize_language prototype.
1821 * linux-fork.c: Remove _initialize_linux_fork prototype.
1822 * linux-nat.c: Remove _initialize_linux_nat prototype.
1823 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
1824 * linux-thread-db.c: Remove _initialize_thread_db prototype.
1825 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
1826 * m2-lang.c: Remove _initialize_m2_language prototype.
1827 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
1828 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
1829 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
1830 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
1831 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
1832 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1833 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1834 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
1835 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
1836 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
1837 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1838 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1839 * machoread.c: Remove _initialize_machoread prototype.
1840 * macrocmd.c: Remove _initialize_macrocmd prototype.
1841 * macroscope.c: Remove _initialize_macroscope prototype.
1842 * maint.c: Remove _initialize_maint_cmds prototype.
1843 * mdebugread.c: Remove _initialize_mdebugread prototype.
1844 * memattr.c: Remove _initialize_mem prototype.
1845 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
1846 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
1847 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
1848 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
1849 * mi/mi-main.c: Remove _initialize_mi_main prototype.
1850 * microblaze-linux-tdep.c: Remove
1851 _initialize_microblaze_linux_tdep prototype.
1852 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
1853 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
1854 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
1855 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
1856 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
1857 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
1858 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
1859 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
1860 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
1861 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
1862 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
1863 prototype.
1864 * mipsread.c: Remove _initialize_mipsread prototype.
1865 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
1866 prototype.
1867 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
1868 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
1869 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
1870 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
1871 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
1872 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
1873 prototype.
1874 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
1875 * nto-procfs.c: Remove _initialize_procfs prototype.
1876 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
1877 * objc-lang.c: Remove _initialize_objc_language prototype.
1878 * objfiles.c: Remove _initialize_objfiles prototype.
1879 * observer.c: Remove observer_test_first_notification_function,
1880 observer_test_second_notification_function,
1881 observer_test_third_notification_function, and
1882 _initialize_observer prototypes.
1883 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
1884 * osabi.c: Remove _initialize_gdb_osabi prototype.
1885 * osdata.c: Remove _initialize_osdata prototype.
1886 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
1887 * parse.c: Remove _initialize_parse prototype.
1888 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
1889 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
1890 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
1891 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
1892 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
1893 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
1894 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
1895 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
1896 * printcmd.c: Remove _initialize_printcmd prototype.
1897 * probe.c: Remove _initialize_probe prototype.
1898 * proc-api.c: Remove _initialize_proc_api prototype.
1899 * proc-events.c: Remove _initialize_proc_events prototype.
1900 * proc-service.c: Remove _initialize_proc_service prototype.
1901 * procfs.c: Remove _initialize_procfs prototype.
1902 * psymtab.c: Remove _initialize_psymtab prototype.
1903 * python/python.c: Remove _initialize_python prototype.
1904 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
1905 * record-btrace.c: Remove _initialize_record_btrace prototype.
1906 * record-full.c: Remove _initialize_record_full prototype.
1907 * record.c: Remove _initialize_record prototype.
1908 * regcache.c: Remove _initialize_regcache prototype.
1909 * reggroups.c: Remove _initialize_reggroup prototype.
1910 * remote-notif.c: Remove _initialize_notif prototype.
1911 * remote-sim.c: Remove _initialize_remote_sim prototype.
1912 * remote.c: Remove _initialize_remote prototype.
1913 * reverse.c: Remove _initialize_reverse prototype.
1914 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
1915 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
1916 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
1917 prototype.
1918 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
1919 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
1920 * rust-exp.y: Remove _initialize_rust_exp prototype.
1921 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
1922 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
1923 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
1924 * score-tdep.c: Remove _initialize_score_tdep prototype.
1925 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
1926 prototype.
1927 * ser-go32.c: Remove _initialize_ser_dos prototype.
1928 * ser-mingw.c: Remove _initialize_ser_windows prototype.
1929 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
1930 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
1931 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
1932 * serial.c: Remove _initialize_serial prototype.
1933 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
1934 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
1935 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
1936 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
1937 * skip.c: Remove _initialize_step_skip prototype.
1938 * sol-thread.c: Remove _initialize_sol_thread prototype.
1939 * solib-aix.c: Remove _initialize_solib_aix prototype.
1940 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
1941 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
1942 * solib-frv.c: Remove _initialize_frv_solib prototype.
1943 * solib-spu.c: Remove _initialize_spu_solib prototype.
1944 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
1945 * solib-target.c: Remove _initialize_solib_target prototype.
1946 * solib.c: Remove _initialize_solib prototype.
1947 * source.c: Remove _initialize_source prototype.
1948 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
1949 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
1950 prototype.
1951 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
1952 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
1953 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
1954 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
1955 prototype.
1956 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
1957 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
1958 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
1959 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
1960 prototype.
1961 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
1962 prototype.
1963 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
1964 prototype.
1965 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
1966 prototype.
1967 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
1968 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
1969 prototype.
1970 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
1971 prototype.
1972 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
1973 prototype.
1974 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
1975 prototype.
1976 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
1977 prototype.
1978 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
1979 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
1980 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
1981 * stabsread.c: Remove _initialize_stabsread prototype.
1982 * stack.c: Remove _initialize_stack prototype.
1983 * stap-probe.c: Remove _initialize_stap_probe prototype.
1984 * std-regs.c: Remove _initialize_frame_reg prototype.
1985 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
1986 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
1987 * symfile.c: Remove _initialize_symfile prototype.
1988 * symmisc.c: Remove _initialize_symmisc prototype.
1989 * symtab.c: Remove _initialize_symtab prototype.
1990 * target-dcache.c: Remove _initialize_target_dcache prototype.
1991 * target-descriptions.c: Remove _initialize_target_descriptions
1992 prototype.
1993 * thread.c: Remove _initialize_thread prototype.
1994 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
1995 prototype.
1996 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
1997 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
1998 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
1999 prototype.
2000 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
2001 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
2002 * tracefile.c: Remove _initialize_tracefile prototype.
2003 * tracepoint.c: Remove _initialize_tracepoint prototype.
2004 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
2005 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
2006 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
2007 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
2008 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
2009 * tui/tui-win.c: Remove _initialize_tui_win prototype.
2010 * tui/tui.c: Remove _initialize_tui prototype.
2011 * typeprint.c: Remove _initialize_typeprint prototype.
2012 * user-regs.c: Remove _initialize_user_regs prototype.
2013 * utils.c: Remove _initialize_utils prototype.
2014 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
2015 * valarith.c: Remove _initialize_valarith prototype.
2016 * valops.c: Remove _initialize_valops prototype.
2017 * valprint.c: Remove _initialize_valprint prototype.
2018 * value.c: Remove _initialize_values prototype.
2019 * varobj.c: Remove _initialize_varobj prototype.
2020 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
2021 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
2022 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
2023 * windows-nat.c: Remove _initialize_windows_nat,
2024 _initialize_check_for_gdb_ini, and _initialize_loadable
2025 prototypes.
2026 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
2027 * xcoffread.c: Remove _initialize_xcoffread prototype.
2028 * xml-support.c: Remove _initialize_xml_support prototype.
2029 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
2030 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
2031 prototype.
2032 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
2033 prototype.
2034 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2035
2036 2017-09-08 Keith Seitz <keiths@redhat.com>
2037
2038 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
2039 field.
2040
2041 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
2042
2043 * f-valprint.c (f_val_print): Remove check for one byte
2044 sized integers. Remove printing of character type.
2045
2046 2017-09-08 Frank Penczek <frank.penczek@intel.com>
2047 Christoph Weinmann <christoph.t.weinmann@intel.com>
2048 Bernhard Heckel <bernhard.heckel@intel.com>
2049
2050 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
2051 to maintain proper indentation when printing pointers/refs.
2052
2053 2017-09-07 Joel Brobecker <brobecker@adacore.com>
2054
2055 GDB 8.0.1 released.
2056
2057 2017-09-07 Joel Brobecker <brobecker@adacore.com>
2058
2059 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2060
2061 2017-09-05 Tom Tromey <tom@tromey.com>
2062
2063 * parse.c (funcall_chain): Now a std::vector.
2064 (start_arglist, end_arglist): Simplify.
2065 (free_funcalls): Remove.
2066 (parse_exp_in_context_1): Remove cleanup.
2067
2068 2017-09-05 Tom Tromey <tom@tromey.com>
2069
2070 * go-exp.y (go_parse): Don't create a cleanup.
2071
2072 2017-09-05 Tom Tromey <tom@tromey.com>
2073
2074 * d-exp.y (PrimaryExpression): Use std::string.
2075 (d_parse): Don't create a cleanup.
2076
2077 2017-09-05 Tom Tromey <tom@tromey.com>
2078
2079 * utils.c (do_clear_parser_state): Remove.
2080 (make_cleanup_clear_parser_state): Remove.
2081 * p-exp.y (pascal_parse): Use scoped_restore.
2082 * m2-exp.y (m2_parse): Use scoped_restore.
2083 * f-exp.y (f_parse): Use scoped_restore.
2084 * d-exp.y (d_parse): Use scoped_restore.
2085 * c-exp.y (c_parse): Use scoped_restore.
2086 * ada-exp.y (ada_parse): Use scoped_restore.
2087 * utils.h (make_cleanup_clear_parser_state): Remove.
2088
2089 2017-09-06 Keith Seitz <keiths@redhat.com>
2090
2091 * dwarf2read.c (dw2_linkage_name_attr): New function.
2092 (dw2_linkage_name): New function.
2093 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2094 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2095 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2096
2097 2017-09-06 Kamil Rytarowski <n54@gmx.com>
2098
2099 * config/djgpp/djconfig.sh: Correct shell portability issue.
2100
2101 2017-09-06 Kamil Rytarowski <n54@gmx.com>
2102
2103 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2104
2105 2017-09-06 John Baldwin <jhb@FreeBSD.org>
2106
2107 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2108 * NEWS: Mention new FreeBSD/mips native configuration.
2109 * configure.host: Add aarch64*-*-freebsd*.
2110 * configure.nat: Likewise.
2111 * aarch64-fbsd-nat.c: New file.
2112
2113 2017-09-06 John Baldwin <jhb@FreeBSD.org>
2114
2115 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2116 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2117 * NEWS: Mention new FreeBSD/aarch64 target.
2118 * configure.tgt: Add aarch64*-*-freebsd*.
2119 * aarch64-fbsd-tdep.c: New file.
2120 * aarch64-fbsd-tdep.h: New file.
2121
2122 2017-09-06 Kamil Rytarowski <n54@gmx.com>
2123
2124 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2125
2126 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2127
2128 * parse.c (find_minsym_type_and_address): Don't relocate addresses
2129 of TLS symbols.
2130
2131 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2132
2133 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2134 call.
2135
2136 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2137
2138 * infrun.c (follow_exec): Call add_thread after
2139 target_find_description.
2140
2141 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2142
2143 * infrun.c (handle_inferior_event_1): When exec'ing, read
2144 stop_pc after follow_exec.
2145
2146 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2147
2148 * remote.c (process_g_packet): Update error message.
2149
2150 2017-09-05 Yao Qi <yao.qi@linaro.org>
2151
2152 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
2153 targets.
2154
2155 2017-09-05 Pedro Alves <palves@redhat.com>
2156
2157 * eval.c (eval_call, evaluate_funcall): New functions, factored
2158 out from ...
2159 (evaluate_subexp_standard): ... this.
2160
2161 2017-09-05 Yao Qi <yao.qi@linaro.org>
2162
2163 * amd64-tdep.c (amd64_target_description): Create target
2164 descriptions.
2165 (_initialize_amd64_tdep): Don't call functions
2166 initialize_tdesc_amd64_*. Add self tests.
2167 * arch/amd64.c (amd64_create_target_description): Add parameter
2168 is_linux. Call set_tdesc_osabi if is_linux is true.
2169 * arch/amd64.h (amd64_create_target_description): Update the
2170 declaration.
2171 * arch/i386.c (i386_create_target_description): Add parameter
2172 is_linux. Call set_tdesc_osabi if is_linux is true.
2173 * arch/i386.h (i386_create_target_description): Update
2174 declaration.
2175 * configure.tgt: Add i386.o to gdb_target_obs.
2176 * features/Makefile (XMLTOC): Remove i386/*.xml.
2177 * features/i386/amd64-avx-avx512.c: Remove.
2178 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
2179 * features/i386/amd64-avx-mpx.c: Remove.
2180 * features/i386/amd64-avx.c: Remove.
2181 * features/i386/amd64-mpx.c: Remove.
2182 * features/i386/amd64.c: Remove.
2183 * features/i386/i386-avx-avx512.c: Remove.
2184 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2185 * features/i386/i386-avx-mpx.c: Remove.
2186 * features/i386/i386-avx.c: Remove.
2187 * features/i386/i386-mmx.c: Remove.
2188 * features/i386/i386-mpx.c: Remove.
2189 * features/i386/i386.c: Remove.
2190 * i386-tdep.c: Don't include features/i386/i386*.c., include
2191 target-descriptions.h and arch/i386.h.
2192 (i386_target_description): Create target descriptions.
2193 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2194 functions. Do self tests.
2195
2196 2017-09-05 Yao Qi <yao.qi@linaro.org>
2197
2198 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2199 * features/i386/amd64-avx-avx512-linux.c: Removed.
2200 * features/i386/amd64-avx-linux.c: Removed.
2201 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2202 * features/i386/amd64-avx-mpx-linux.c: Removed.
2203 * features/i386/amd64-linux.c: Removed.
2204 * features/i386/amd64-mpx-linux.c: Removed.
2205 * features/i386/x32-avx-avx512-linux.c: Removed.
2206 * features/i386/x32-avx-linux.c: Removed.
2207 * features/i386/x32-linux.c: Removed.
2208
2209 2017-09-05 Yao Qi <yao.qi@linaro.org>
2210
2211 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
2212 features/i386/*.c.
2213 (amd64_linux_read_description): Call
2214 amd64_create_target_description.
2215 * arch/amd64.c: New file.
2216 * arch/amd64.h: New file.
2217 * configure.tgt (x86_64-*-linux*): Append amd64.o.
2218 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2219
2220 2017-09-05 Yao Qi <yao.qi@linaro.org>
2221
2222 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2223 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
2224 (amd64_linux_read_description): Create target descriptions.
2225 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2226 functions. Add unit tests.
2227 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2228 x32-core.xml.
2229 * features/i386/64bit-avx.c: Generated.
2230 * features/i386/64bit-avx512.c: Generated.
2231 * features/i386/64bit-core.c: Generated.
2232 * features/i386/64bit-linux.c: Generated.
2233 * features/i386/64bit-mpx.c: Generated.
2234 * features/i386/64bit-pkeys.c: Generated.
2235 * features/i386/64bit-segments.c: Generated.
2236 * features/i386/64bit-sse.c: Generated.
2237 * features/i386/x32-core.c: Generated.
2238 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2239 c files for amd64-linux and x32-linux.
2240
2241 2017-09-05 Yao Qi <yao.qi@linaro.org>
2242
2243 * amd64-linux-tdep.c (amd64_linux_read_description): New
2244 function.
2245 (amd64_linux_core_read_description): Call
2246 amd64_linux_read_description.
2247 (amd64_linux_init_abi): Likewise.
2248 (amd64_x32_linux_init_abi): Likewise.
2249 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
2250 * x86-linux-nat.c (x86_linux_read_description): Call
2251 amd64_linux_read_description.
2252
2253 2017-09-05 Yao Qi <yao.qi@linaro.org>
2254
2255 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
2256 comments.
2257
2258 2017-09-05 Yao Qi <yao.qi@linaro.org>
2259
2260 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
2261 * features/i386/i386-avx-avx512-linux.c: Remove.
2262 * features/i386/i386-avx-linux.c: Remove.
2263 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
2264 * features/i386/i386-avx-mpx-linux.c: Remove.
2265 * features/i386/i386-linux.c: Remove.
2266 * features/i386/i386-mmx-linux.c: Remove.
2267 * features/i386/i386-mpx-linux.c: Remove.
2268
2269 2017-09-05 Yao Qi <yao.qi@linaro.org>
2270
2271 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
2272 (SFILES): Add arch/i386.c.
2273 (HFILES_NO_SRCDIR): Add arch/i386.h.
2274 * arch/i386.c: New file.
2275 * arch/i386.h: New file.
2276 * arch/tdesc.h (allocate_target_description): Declare.
2277 (set_tdesc_architecture): Declare.
2278 (set_tdesc_osabi): Declare.
2279 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
2280 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
2281 include arch/i386.h.
2282 (i386_linux_read_description): Remove code and call
2283 i386_create_target_description.
2284 (set_tdesc_architecture): New function.
2285 (set_tdesc_osabi): New function.
2286 * target-descriptions.h (allocate_target_description): Remove.
2287
2288 2017-09-05 Yao Qi <yao.qi@linaro.org>
2289
2290 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
2291 * target-descriptions.c (tdesc_create_feature): Likewise, and
2292 adjust code.
2293 * features/i386/32bit-avx.c: Re-generated.
2294 * features/i386/32bit-avx512.c: Re-generated.
2295 * features/i386/32bit-core.c: Re-generated.
2296 * features/i386/32bit-linux.c: Re-generated.
2297 * features/i386/32bit-mpx.c: Re-generated.
2298 * features/i386/32bit-pkeys.c: Re-generated.
2299 * features/i386/32bit-sse.c: Re-generated.
2300
2301 2017-09-05 Yao Qi <yao.qi@linaro.org>
2302
2303 * regformats/regdef.h (struct reg): Override operator == and !=.
2304
2305 2017-09-05 Yao Qi <yao.qi@linaro.org>
2306
2307 * arch/tdesc.h: New file.
2308 * regformats/regdat.sh: Generate code using tdesc_create_reg.
2309 * target-descriptions.c: Update comments.
2310 * target-descriptions.h: Include "arch/tdesc.h". Remove the
2311 declarations.
2312 * features/i386/32bit-avx.c: Re-generated.
2313 * features/i386/32bit-avx512.c: Re-generated.
2314 * features/i386/32bit-core.c: Re-generated.
2315 * features/i386/32bit-linux.c: Re-generated.
2316 * features/i386/32bit-mpx.c: Re-generated.
2317 * features/i386/32bit-pkeys.c: Re-generated.
2318 * features/i386/32bit-sse.c: Re-generated.
2319
2320 2017-09-05 Yao Qi <yao.qi@linaro.org>
2321
2322 * regformats/regdat.sh: Update generated code.
2323
2324 2017-09-05 Yao Qi <yao.qi@linaro.org>
2325
2326 * regformats/regdat.sh: Adjust code order.
2327
2328 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2329
2330 * expprint.c (dump_subexp_body_standard): Use constant format
2331 string in fprintf_filtered call.
2332
2333 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2334
2335 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
2336 NetBSD/i386.
2337 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
2338
2339 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2340
2341 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
2342
2343 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2344
2345 * bsd-kvm.o: Define _KMEMUSER.
2346 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
2347 * configure: Regenerate.
2348
2349 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2350
2351 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
2352 * i386-fbsd-nat.c: Likewise.
2353
2354 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2355
2356 * unittests/array-view-selftests.c: Add include of <array>.
2357
2358 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2359
2360 * spu-tdep.c (flush_ea_cache): Add missing argument to
2361 call_function_by_hand.
2362
2363 2017-09-04 Pedro Alves <palves@redhat.com>
2364
2365 * NEWS (Safer support for debugging with no debug info): New.
2366
2367 2017-09-04 Pedro Alves <palves@redhat.com>
2368
2369 * c-exp.y (function_method, function_method_void): Add current
2370 instance flags to TYPE_INSTANCE.
2371 * dwarf2read.c (check_modifier): New.
2372 (compute_delayed_physnames): Assert that only C++ adds delayed
2373 physnames. Mark fn_fields as const/volatile depending on
2374 physname.
2375 * eval.c (make_params): New type_instance_flags parameter. Use
2376 it as the new type's instance flags.
2377 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
2378 flags element and pass it to make_params.
2379 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
2380 instance flags element.
2381 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
2382 * gdbtypes.h: Include "enum-flags.h".
2383 (type_instance_flags): New enum-flags type.
2384 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
2385 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
2386 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
2387 (follow_type_instance_flags): New function.
2388 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
2389 * parser-defs.h (follow_type_instance_flags): Declare.
2390 * valops.c (value_struct_elt_for_reference): const/volatile must
2391 match too.
2392
2393 2017-09-04 Pedro Alves <palves@redhat.com>
2394
2395 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
2396 function/method scopes; lookup the nested name as a function local
2397 static variable.
2398
2399 2017-09-04 Pedro Alves <palves@redhat.com>
2400
2401 (%type <voidval>): Add function_method.
2402 * c-exp.y (exp): New production for calls with no arguments.
2403 (function_method, function_method_void_or_typelist): New
2404 productions.
2405 (exp): New production for "method()::static_var".
2406 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
2407 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2408 Handle OP_FUNC_STATIC_VAR.
2409 * parse.c (operator_length_standard):
2410 Handle OP_FUNC_STATIC_VAR.
2411
2412 2017-09-04 Pedro Alves <palves@redhat.com>
2413
2414 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
2415 handling.
2416 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2417 Ditto.
2418 * parse.c (operator_length_standard, operator_check_standard):
2419 Ditto.
2420 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
2421
2422 2017-09-04 Pedro Alves <palves@redhat.com>
2423
2424 * ax-gdb.c: Include "typeprint.h".
2425 (gen_expr_for_cast): New function.
2426 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
2427 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
2428 type is unknown.
2429 * dwarf2read.c (new_symbol_full): Fallback to int instead of
2430 nodebug_data_symbol.
2431 * eval.c: Include "typeprint.h".
2432 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
2433 Error out if symbol has unknown type.
2434 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
2435 evaluate_subexp_for_cast.
2436 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
2437 OP_VAR_MSYM_VALUE.
2438 (evaluate_subexp_for_cast): New function.
2439 * gdbtypes.c (init_nodebug_var_type): New function.
2440 (objfile_type): Use it to initialize types of variables with no
2441 debug info.
2442 * typeprint.c (error_unknown_type): New.
2443 * typeprint.h (error_unknown_type): New declaration.
2444 * compile/compile-c-types.c (convert_type_basic): Handle
2445 TYPE_CODE_ERROR; warn and fallback to int for variables with
2446 unknown type.
2447
2448 2017-09-04 Pedro Alves <palves@redhat.com>
2449
2450 * eval.c (evaluate_var_value): New function, factored out from ...
2451 (evaluate_subexp_standard): ... here.
2452
2453 2017-09-04 Pedro Alves <palves@redhat.com>
2454
2455 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
2456 Remove useless assignments to 'op'.
2457
2458 2017-09-04 Pedro Alves <palves@redhat.com>
2459
2460 * eval.c (eval_skip_value): New function.
2461 (evaluate_subexp_standard): Use it.
2462
2463 2017-09-04 Pedro Alves <palves@redhat.com>
2464
2465 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
2466 function name from symbol/minsym and pass it to
2467 error_call_unknown_return_type.
2468
2469 2017-09-04 Pedro Alves <palves@redhat.com>
2470
2471 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
2472 * ax-gdb.c (gen_msym_var_ref): New function.
2473 (gen_expr): Handle OP_VAR_MSYM_VALUE.
2474 * eval.c (evaluate_var_msym_value): New function.
2475 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
2476 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
2477 to call_function_by_hand.
2478 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2479 Handle OP_VAR_MSYM_VALUE.
2480 (union exp_element) <msymbol>: New field.
2481 * minsyms.h (struct type): Forward declare.
2482 (find_minsym_type_and_address): Declare.
2483 * parse.c (write_exp_elt_msym): New function.
2484 (write_exp_msymbol): Delete, refactored as ...
2485 (find_minsym_type_and_address): ... this new function.
2486 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
2487 (operator_length_standard, operator_check_standard): Handle
2488 OP_VAR_MSYM_VALUE.
2489 * std-operator.def (OP_VAR_MSYM_VALUE): New.
2490
2491 2017-09-04 Pedro Alves <palves@redhat.com>
2492
2493 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
2494 TYPE_GNU_IFUNC specially here. Throw error if return type is
2495 unknown.
2496 * ada-typeprint.c (print_func_type): Handle functions with unknown
2497 return type.
2498 * c-typeprint.c (c_type_print_base): Handle functions and methods
2499 with unknown return type.
2500 * compile/compile-c-symbols.c (convert_symbol_bmsym)
2501 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
2502 * compile/compile-c-types.c: Include "objfiles.h".
2503 (convert_func): For functions with unknown return type, warn and
2504 default to int.
2505 * compile/compile-object-run.c (compile_object_run): Adjust call
2506 to call_function_by_hand_dummy.
2507 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
2508 call_function_by_hand.
2509 * eval.c (evaluate_subexp_standard): Adjust calls to
2510 call_function_by_hand. Handle functions and methods with unknown
2511 return type. Pass expect_type to call_function_by_hand.
2512 * f-typeprint.c (f_type_print_base): Handle functions with unknown
2513 return type.
2514 * gcore.c (call_target_sbrk): Adjust call to
2515 call_function_by_hand.
2516 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
2517 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
2518 an integer address type instead of nodebug.
2519 * guile/scm-value.c (gdbscm_value_call): Adjust call to
2520 call_function_by_hand.
2521 * infcall.c (error_call_unknown_return_type): New function.
2522 (call_function_by_hand): New "default_return_type" parameter.
2523 Pass it down.
2524 (call_function_by_hand_dummy): New "default_return_type"
2525 parameter. Use it instead of defaulting to int. If there's no
2526 default and the return type is unknown, throw an error. If
2527 there's a default return type, and the called function has no
2528 debug info, then assume the function is prototyped.
2529 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
2530 New "default_return_type" parameter.
2531 (error_call_unknown_return_type): New declaration.
2532 * linux-fork.c (call_lseek): Cast return type of lseek.
2533 (inferior_call_waitpid, checkpoint_command): Adjust calls to
2534 call_function_by_hand.
2535 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
2536 calls to call_function_by_hand.
2537 * m2-typeprint.c (m2_procedure): Handle functions with unknown
2538 return type.
2539 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2540 (value_nsstring, print_object_command): Adjust calls to
2541 call_function_by_hand.
2542 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
2543 functions with unknown return type.
2544 (pascal_type_print_func_varspec_suffix): New function.
2545 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
2546 TYPE_CODE_METHOD>: Use it.
2547 * python/py-value.c (valpy_call): Adjust call to
2548 call_function_by_hand.
2549 * rust-lang.c (rust_evaluate_funcall): Adjust call to
2550 call_function_by_hand.
2551 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
2552 call_function_by_hand.
2553 * valops.c (value_allocate_space_in_inferior): Adjust call to
2554 call_function_by_hand.
2555 * typeprint.c (type_print_unknown_return_type): New function.
2556 * typeprint.h (type_print_unknown_return_type): New declaration.
2557
2558 2017-09-04 Pedro Alves <palves@redhat.com>
2559
2560 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
2561 types with more than one parameter as prototyped.
2562
2563 2017-09-04 Pedro Alves <palves@redhat.com>
2564
2565 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
2566 (disassemble_command): Use gdb_disassembly_flags instead of bare
2567 int.
2568 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
2569 (dump_insns, do_mixed_source_and_assembly_deprecated)
2570 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
2571 Use gdb_disassembly_flags instead of bare int.
2572 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
2573 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
2574 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
2575 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
2576 (enum gdb_disassembly_flag): ... values of this new enumeration.
2577 (gdb_disassembly_flags): Define.
2578 (gdb_disassembly)
2579 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
2580 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
2581 gdb_disassembly_flags instead of bare int.
2582 * record-btrace.c (btrace_insn_history)
2583 (record_btrace_insn_history, record_btrace_insn_history_range)
2584 (record_btrace_insn_history_from): Use gdb_disassembly_flags
2585 instead of bare int.
2586 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
2587 Use gdb_disassembly_flags instead of bare int.
2588 * target-debug.h (target_debug_print_gdb_disassembly_flags):
2589 Define.
2590 * target-delegates.c: Regenerate.
2591 * target.c (target_insn_history, target_insn_history_from)
2592 (target_insn_history_range): Use gdb_disassembly_flags instead of
2593 bare int.
2594 * target.h: Include "disasm.h".
2595 (struct target_ops) <to_insn_history, to_insn_history_from,
2596 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
2597 int.
2598 (target_insn_history, target_insn_history_from)
2599 (target_insn_history_range): Use gdb_disassembly_flags instead of
2600 bare int.
2601
2602 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2603
2604 * cli/cli-script.c (build_command_line): For if/while commands,
2605 check whether args is empty.
2606
2607 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2608
2609 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
2610 (enum command_control_type): Likewise.
2611 (struct command_line): Likewise.
2612 (free_command_lines): Likewise.
2613 (struct command_lines_deleter): Likewise.
2614 (command_line_up): Likewise.
2615 (read_command_lines): Likewise.
2616 (read_command_lines_1): Likewise.
2617 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
2618 (enum command_control_type): Likewise.
2619 (struct command_line): Likewise.
2620 (free_command_lines): Likewise.
2621 (struct command_lines_deleter): Likewise.
2622 (command_line_up): Likewise.
2623 (read_command_lines): Likewise.
2624 (read_command_lines_1): Likewise.
2625 * breakpoint.h: Include cli/cli-script.h.
2626 * extension-priv.h: Likewise.
2627 * gdbcmd.h: Likewise.
2628
2629 2017-09-04 Pedro Alves <palves@redhat.com>
2630
2631 * ada-lang.c (is_known_support_routine): Move sal declaration to
2632 where it is initialized.
2633 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
2634 (parse_breakpoint_sals, decode_static_tracepoint_spec)
2635 (clear_command, update_static_tracepoint): Remove init_sal
2636 references. Move declarations closer to initializations.
2637 * cli/cli-cmds.c (list_command): Move sal declarations closer to
2638 initializations.
2639 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
2640 references. Move sal declarations closer to initializations.
2641 * frame.c (find_frame_sal): Return a symtab_and_line via function
2642 return instead of output parameter. Remove init_sal references.
2643 * frame.h (find_frame_sal): Return a symtab_and_line via function
2644 return instead of output parameter.
2645 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
2646 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
2647 instead of memset.
2648 (gdbscm_find_pc_line): Remove init_sal reference.
2649 * infcall.c (call_function_by_hand_dummy): Remove init_sal
2650 references. Move declarations closer to initializations.
2651 * infcmd.c (set_step_frame): Update. Move declarations closer to
2652 initializations.
2653 (finish_backward): Remove init_sal references. Move declarations
2654 closer to initializations.
2655 * infrun.c (process_event_stop_test, handle_step_into_function)
2656 (insert_hp_step_resume_breakpoint_at_frame)
2657 (insert_step_resume_breakpoint_at_caller): Likewise.
2658 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
2659 (symbol_to_sal): Likewise.
2660 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
2661 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
2662 to its initialization.
2663 * reverse.c (save_bookmark_command): Use new/delete. Remove
2664 init_sal references. Move declarations closer to initializations.
2665 * source.c (get_current_source_symtab_and_line): Remove brace
2666 initialization.
2667 (set_current_source_symtab_and_line): Now takes the sal by const
2668 reference. Remove brace initialization.
2669 (line_info): Remove init_sal reference.
2670 * source.h (set_current_source_symtab_and_line): Now takes a
2671 symtab_and_line via const reference.
2672 * stack.c (set_current_sal_from_frame): Adjust.
2673 (print_frame_info): Adjust.
2674 (get_last_displayed_sal): Return the sal via function return
2675 instead of via output parameter. Simplify.
2676 (frame_info): Adjust.
2677 * stack.h (get_last_displayed_sal): Return the sal via function
2678 return instead of via output parameter.
2679 * symtab.c (init_sal): Delete.
2680 (find_pc_sect_line): Remove init_sal references. Move
2681 declarations closer to initializations.
2682 (find_function_start_sal): Remove init_sal references. Move
2683 declarations closer to initializations.
2684 * symtab.h (struct symtab_and_line): In-class initialize all
2685 fields.
2686 * tracepoint.c (set_traceframe_context)
2687 (print_one_static_tracepoint_marker): Remove init_sal references.
2688 Move declarations closer to initializations.
2689 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2690 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
2691 declarations closer to initializations.
2692 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2693 init_sal references. Adjust.
2694
2695 2017-09-04 Pedro Alves <palves@redhat.com>
2696
2697 * ax-gdb.c (agent_command_1): Use range-for.
2698 * break-catch-throw.c (re_set_exception_catchpoint): Update.
2699 * breakpoint.c: Include "common/array-view.h".
2700 (init_breakpoint_sal, create_breakpoint_sal): Change sals
2701 parameter from struct symtabs_and_lines to
2702 array_view<symtab_and_line>. Adjust. Use range-for. Update.
2703 (breakpoint_sals_to_pc): Change sals parameter from struct
2704 symtabs_and_lines to std::vector reference.
2705 (check_fast_tracepoint_sals): Change sals parameter from struct
2706 symtabs_and_lines to std::array_view. Use range-for.
2707 (decode_static_tracepoint_spec): Return a std::vector instead of
2708 symtabs_and_lines. Update.
2709 (create_breakpoint): Update.
2710 (break_range_command, until_break_command, clear_command): Update.
2711 (base_breakpoint_decode_location, bkpt_decode_location)
2712 (bkpt_probe_create_sals_from_location)
2713 (bkpt_probe_decode_location, tracepoint_decode_location)
2714 (tracepoint_probe_decode_location)
2715 (strace_marker_create_sals_from_location): Return a std::vector
2716 instead of symtabs_and_lines.
2717 (strace_marker_create_breakpoints_sal): Update.
2718 (strace_marker_decode_location): Return a std::vector instead of
2719 symtabs_and_lines. Update.
2720 (update_breakpoint_locations): Change struct symtabs_and_lines
2721 parameters to gdb::array_view. Adjust.
2722 (location_to_sals): Return a std::vector instead of
2723 symtabs_and_lines. Update.
2724 (breakpoint_re_set_default): Use std::vector instead of struct
2725 symtabs_and_lines.
2726 (decode_location_default): Return a std::vector instead of
2727 symtabs_and_lines. Update.
2728 * breakpoint.h: Include "common/array-view.h".
2729 (struct breakpoint_ops) <decode_location>: Now returns a
2730 std::vector instead of returning a symtabs_and_lines via output
2731 parameter.
2732 (update_breakpoint_locations): Change sals parameters to use
2733 gdb::array_view.
2734 * cli/cli-cmds.c (edit_command, list_command): Update to use
2735 std::vector and gdb::array_view.
2736 (ambiguous_line_spec): Adjust to use gdb::array_view and
2737 range-for.
2738 (compare_symtabs): Rename to ...
2739 (cmp_symtabs): ... this. Change parameters to symtab_and_line
2740 const reference and adjust.
2741 (filter_sals): Rewrite using std::vector and standard algorithms.
2742 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2743 (jump_command): Update to use std::vector.
2744 * linespec.c (struct linespec_state) <canonical_names>: Update
2745 comment.
2746 (add_sal_to_sals_basic): Delete.
2747 (add_sal_to_sals, filter_results, convert_results_to_lsals)
2748 (decode_line_2, create_sals_line_offset)
2749 (convert_address_location_to_sals, convert_linespec_to_sals)
2750 (convert_explicit_location_to_sals, parse_linespec)
2751 (event_location_to_sals, decode_line_full, decode_line_1)
2752 (decode_line_with_current_source)
2753 (decode_line_with_last_displayed, decode_objc)
2754 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2755 (linespec_result::~linespec_result): Adjust to use std::vector
2756 instead of symtabs_and_lines.
2757 * linespec.h (linespec_sals::sals): Now a std::vector.
2758 (struct linespec_result): Use std::vector, bool, and in-class
2759 initialization.
2760 (decode_line_1, decode_line_with_current_source)
2761 (decode_line_with_last_displayed): Return std::vector.
2762 * macrocmd.c (info_macros_command): Use std::vector.
2763 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2764 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2765 std::vector.
2766 * probe.h (parse_probes): Return a std::vector.
2767 * python/python.c (gdbpy_decode_line): Use std::vector and
2768 gdb::array_view.
2769 * source.c (select_source_symtab, line_info): Use std::vector.
2770 * stack.c (func_command): Use std::vector.
2771 * symtab.h (struct symtabs_and_lines): Delete.
2772 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2773
2774 2017-09-04 Pedro Alves <palves@redhat.com>
2775
2776 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2777 unittests/array-view-selftests.c.
2778 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
2779 * common/array-view.h: New file.
2780 * unittests/array-view-selftests.c: New file.
2781
2782 2017-09-04 Pedro Alves <palves@redhat.com>
2783
2784 * cli/cli-cmds.c (edit_command): Pass message to
2785 ambiguous_line_spec.
2786 (list_command): Pass message to ambiguous_line_spec. Say
2787 "first"/"last" instead of "start" and "end" to be consistent with
2788 the manual.
2789 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
2790 them to print formatted message.
2791
2792 2017-09-04 Pedro Alves <palves@redhat.com>
2793
2794 * btrace.c (ftrace_add_pt): Pass btrace_insn to
2795 ftrace_update_insns by reference instead of pointer.
2796
2797 2017-09-04 Yao Qi <yao.qi@linaro.org>
2798
2799 * i386-go32-tdep.c: Include x86-xstate.h.
2800 (i386_go32_init_abi): Call i386_target_description.
2801 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
2802 if xcr0 is X86_XSTATE_X87_MASK.
2803 * i386-tdep.h (tdesc_i386): Remove the declaration.
2804 (tdesc_i386_mmx): Likewise.
2805
2806 2017-09-04 Yao Qi <yao.qi@linaro.org>
2807
2808 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
2809 X86_XSTATE_SSE_MASK instead of 0.
2810
2811 2017-09-04 Yao Qi <yao.qi@linaro.org>
2812
2813 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
2814 i386_target_description.
2815 * i386-fbsd-nat.c (i386fbsd_read_description): Call
2816 i386_target_description.
2817 * i386-tdep.c (i386_gdbarch_init): Likewise.
2818
2819 2017-09-04 Yao Qi <yao.qi@linaro.org>
2820
2821 * amd64-darwin-tdep.c: Include "x86-xstate.h".
2822 (x86_darwin_init_abi_64): Call amd64_target_description.
2823 * amd64-dicos-tdep.c: Likewise.
2824 * amd64-fbsd-nat.c: Likewise.
2825 * amd64-fbsd-tdep.c: Likewise.
2826 * amd64-nbsd-tdep.c: Likewise.
2827 * amd64-obsd-tdep.c: Likewise.
2828 * amd64-sol2-tdep.c: Likewise.
2829 * amd64-windows-tdep.c: Likewise.
2830 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
2831
2832 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2833
2834 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
2835 (btrace_function) <insn>: Change type to use std::vector.
2836 * btrace.c (ftrace_debug, ftrace_call_num_insn,
2837 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
2838 ftrace_update_insns, ftrace_compute_global_level_offset,
2839 btrace_stitch_bts, btrace_clear, btrace_insn_get,
2840 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
2841 change to std::vector.
2842 (ftrace_update_insns): Adjust to change to std::vector, change
2843 type of INSN parameter.
2844 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
2845 * record-btrace.c (btrace_call_history_insn_range,
2846 btrace_compute_src_line_range,
2847 record_btrace_frame_prev_register): Adjust to change to
2848 std::vector.
2849 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
2850 to change to std::vector.
2851
2852 2017-09-03 Tom Tromey <tom@tromey.com>
2853
2854 * corefile.c (reopen_exec_file): Use std::string.
2855
2856 2017-09-03 Tom Tromey <tom@tromey.com>
2857
2858 * compile/compile.c (compile_register_name_mangled): Return
2859 std::string.
2860 * compile/compile-loc2c.c (pushf_register_address): Update.
2861 (pushf_register): Update.
2862 * compile/compile-c-types.c (convert_array): Update.
2863 * compile/compile-c-symbols.c (generate_vla_size): Update.
2864 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
2865 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
2866 (convert_one_symbol): Update.
2867 (generate_c_for_for_one_variable): Update.
2868 * compile/compile-c-support.c (c_get_range_decl_name): Return a
2869 std::string.
2870 (generate_register_struct): Update.
2871 * compile/compile-internal.h (c_get_range_decl_name): Return a
2872 std::string.
2873 (compile_register_name_mangled): Return std::string.
2874
2875 2017-09-03 Tom Tromey <tom@tromey.com>
2876
2877 * utils.c (perror_string): Return a std::string.
2878 (throw_perror_with_name, perror_warning_with_name): Update.
2879
2880 2017-09-03 Tom Tromey <tom@tromey.com>
2881
2882 * demangle.c (demangle_command): Use std::string,
2883 unique_xmalloc_ptr.
2884
2885 2017-09-03 Tom Tromey <tom@tromey.com>
2886
2887 * cli/cli-setshow.c (do_set_command): Use std::string.
2888
2889 2017-09-03 Tom Tromey <tom@tromey.com>
2890
2891 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
2892
2893 2017-09-03 Tom Tromey <tom@tromey.com>
2894
2895 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
2896
2897 2017-09-03 Tom Tromey <tom@tromey.com>
2898
2899 * mi/mi-cmd-env.c (env_execute_cli_command): Use
2900 gdb::unique_xmalloc_ptr.
2901
2902 2017-09-03 Tom Tromey <tom@tromey.com>
2903
2904 * thread.c (print_thread_info_1): Use string_printf.
2905 (thread_apply_command, thread_apply_all_command): Use
2906 std::string.
2907
2908 2017-09-03 Tom Tromey <tom@tromey.com>
2909
2910 * valprint.c (val_print_string): Update.
2911 * gdbcore.h (memory_error_message): Return std::string.
2912 * corefile.c (memory_error_message): Return std::string.
2913 (memory_error): Update.
2914 * breakpoint.c (insert_bp_location): Update.
2915
2916 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2917
2918 * target/waitstatus.h (target_waitstatus_to_string): Change
2919 return type to std::string.
2920 * target/waitstatus.c (target_waitstatus_to_string): Return
2921 std::string.
2922 * target.h (target_waitstatus_to_string): Remove declaration.
2923 * infrun.c (resume, clear_proceed_status_thread,
2924 print_target_wait_results, do_target_wait, save_waitstatus,
2925 stop_all_threads): Adjust.
2926 * record-btrace.c (record_btrace_wait): Adjust.
2927 * target-debug.h
2928 (target_debug_print_struct_target_waitstatus_p): Adjust.
2929
2930 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2931
2932 PR gdb/22046
2933 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
2934 detection.
2935
2936 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2937
2938 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
2939 for setting/unsetting environment variables on the remote target.
2940 (New remote packets): Add entries for QEnvironmentHexEncoded,
2941 QEnvironmentUnset and QEnvironmentReset.
2942 * common/environ.c (gdb_environ::operator=): Extend method to
2943 handle m_user_set_env_list and m_user_unset_env_list.
2944 (gdb_environ::clear): Likewise.
2945 (match_var_in_string): Change type of first parameter from 'char
2946 *' to 'const char *'.
2947 (gdb_environ::set): Extend method to handle
2948 m_user_set_env_list and m_user_unset_env_list.
2949 (gdb_environ::unset): Likewise.
2950 (gdb_environ::clear_user_set_env): New method.
2951 (gdb_environ::user_set_envp): Likewise.
2952 (gdb_environ::user_unset_envp): Likewise.
2953 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
2954 m_user_unset_env_list on move constructor/assignment.
2955 (unset): Add new default parameter 'update_unset_list = true'.
2956 (clear_user_set_env): New method.
2957 (user_set_envp): Likewise.
2958 (user_unset_envp): Likewise.
2959 (m_user_set_env_list): New std::set.
2960 (m_user_unset_env_list): Likewise.
2961 * common/rsp-low.c (hex2str): New function.
2962 (bin2hex): New overload for bin2hex function.
2963 * common/rsp-low.c (hex2str): New prototype.
2964 (str2hex): New overload prototype.
2965 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
2966 QEnvironmentUnset and QEnvironmentReset.
2967 (remote_protocol_features): Add QEnvironmentHexEncoded,
2968 QEnvironmentUnset and QEnvironmentReset packets.
2969 (send_environment_packet): New function.
2970 (extended_remote_environment_support): Likewise.
2971 (extended_remote_create_inferior): Call
2972 extended_remote_environment_support.
2973 (_initialize_remote): Add QEnvironmentHexEncoded,
2974 QEnvironmentUnset and QEnvironmentReset packet configs.
2975 * unittests/environ-selftests.c (gdb_selftest_env_var):
2976 New variable.
2977 (test_vector_initialization): New function.
2978 (test_init_from_host_environ): Likewise.
2979 (test_reinit_from_host_environ): Likewise.
2980 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
2981 Likewise.
2982 (test_unset_set_empty_vector): Likewise.
2983 (test_vector_clear): Likewise.
2984 (test_std_move): Likewise.
2985 (test_move_constructor):
2986 (test_self_move): Likewise.
2987 (test_set_unset_reset): Likewise.
2988 (run_tests): Rewrite in terms of the functions above.
2989
2990 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
2991
2992 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
2993 (adi_available): Use a temp variable of type CORE_ADDR as argument
2994 3 when calling target_auxv_search.
2995 (adi_normalize_address): Use masks and xor operators to calculate
2996 normalized address.
2997 (adi_read_versions, adi_write_versions, adi_print_versions)
2998 (do_examine, do_assign): Use paddress.
2999
3000 2017-08-29 John Baldwin <jhb@FreeBSD.org>
3001
3002 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
3003 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
3004 out of loop and add supply of FIR.
3005 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
3006 add collect of FIR.
3007
3008 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
3009
3010 PR gdb/21827
3011 * cli/cli-script.c (define_command): Don't convert command name
3012 to lower case.
3013
3014 2017-08-25 Joel Brobecker <brobecker@adacore.com>
3015
3016 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
3017 Update all callers accordingly. Remove all code blocks handling
3018 the case where DISPP is not NULL.
3019
3020 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3021
3022 PR symtab/22003
3023 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
3024 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3025 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
3026
3027 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3028
3029 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
3030 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
3031 (read_comp_units_from_section): New parameter abbrev_section, use
3032 read_and_check_comp_unit_head, allocate signatured_type if needed.
3033 (create_all_comp_units): Update read_comp_units_from_section caller.
3034
3035 2017-08-23 Pedro Alves <palves@redhat.com>
3036
3037 PR remote/21852
3038 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
3039 to null_ptid and switch to thread without reading the registers
3040 after adding the inferior.
3041
3042 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3043
3044 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
3045 compile-gcc.
3046 * compile/compile.c (compile_gcc, show_compile_gcc): New.
3047 (compile_to_object): Implement compile_gcc.
3048 (_initialize_compile): Install "set compile-gcc". Initialize
3049 compile_gcc.
3050
3051 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3052
3053 * compile/compile.c (compile_to_object): Conditionally call
3054 set_verbose. Conditionally call compile or compile_v0.
3055
3056 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
3057
3058 * sparc64-tdep.h: (adi_normalize_address): New export.
3059 * sparc-nat.h: (open_adi_tag_fd): New export.
3060 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3061 * sparc64-linux-tdep.c:
3062 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3063 (sparc64_linux_handle_segmentation_fault): New function.
3064 (sparc64_linux_init_abi): Register
3065 sparc64_linux_handle_segmentation_fault
3066 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3067 (sparc64_addr_bits_remove): New function.
3068 (sparc64_init_abi): Register sparc64_addr_bits_remove.
3069 (MAX_PROC_NAME_SIZE): New macro.
3070 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3071 (sparc64adilist): New variable.
3072 (adi_proc_list): New variable.
3073 (find_adi_info): New function.
3074 (add_adi_info): New function.
3075 (get_adi_info_proc): New function.
3076 (get_adi_info): New function.
3077 (info_adi_command): New function.
3078 (read_maps_entry): New function.
3079 (adi_available): New function.
3080 (adi_normalize_address): New function.
3081 (adi_align_address): New function.
3082 (adi_convert_byte_count): New function.
3083 (adi_tag_fd): New function.
3084 (adi_is_addr_mapped): New function.
3085 (adi_read_versions): New function.
3086 (adi_write_versions): New function.
3087 (adi_print_versions): New function.
3088 (do_examine): New function.
3089 (do_assign): New function.
3090 (adi_examine_command): New function.
3091 (adi_assign_command): New function.
3092 (_initialize_sparc64_adi_tdep): New function.
3093
3094 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
3095
3096 * breakpoint.c (breakpoints_info): Rename to ...
3097 (info_breakpoints_command): ... this.
3098 (watchpoints_info): Rename to ...
3099 (info_watchpoints_command): ... this.
3100 (tracepoints_info): Rename to ...
3101 (info_tracepoints_command): ... this.
3102 (_initialize_breakpoint): Adjust.
3103 * dcache.c (dcache_info): Rename to ...
3104 (info_display_command): ... this.
3105 (_initialize_dcache): Adjust.
3106 * frame.h (args_info): Rename to ...
3107 (info_args_command): ... this.
3108 (locals_info): Rename to ...
3109 (info_locals_command): ... this.
3110 * infcmd.c (nofp_registers_info): Rename to ...
3111 (info_registers_command): ... this.
3112 (float_info): Rename to ...
3113 (info_float_command): ... this.
3114 (program_info): Rename to ...
3115 (info_program_command): ... this.
3116 (all_registers_info): Rename to ...
3117 (info_all_registers_command): ... this.
3118 (vector_info): Rename to ...
3119 (info_vector_command): ... this.
3120 (float_info): Rename to ...
3121 (info_float_command): ... this.
3122 (_initialize_infcmd): Adjust.
3123 * inferior.h (term_info): Rename to ...
3124 (info_terminal_command): ... this.
3125 * inflow.c (term_info): Rename to ...
3126 (info_terminal_command): ... this.
3127 (_initialize_inflow): Adjust.
3128 * infrun.c (signals_info): Rename to ...
3129 (info_signals_command): ... this.
3130 (_initialize_infrun): Adjust.
3131 * objc-lang.c (classes_info): Rename to ...
3132 (info_classes_command): ... this.
3133 (selectors_info): Rename to ...
3134 (info_selectors_command): ... this.
3135 (_initialize_objc_language): Adjust.
3136 * printcmd.c (sym_info): Rename to ...
3137 (info_symbol_command): ... this.
3138 (address_info): Rename to ...
3139 (info_address_command): ... this.
3140 (display_info): Rename to ...
3141 (info_display_command): ... this.
3142 (_initialize_printcmd): Adjust.
3143 * reverse.c (bookmarks_info): Rename to ...
3144 (info_breakpoints_command): ... this.
3145 (_initialize_reverse): Adjust.
3146 * ser-go32.c (dos_info): Rename to ...
3147 (info_serial_command): ... this.
3148 (_initialize_ser_dos): Adjust.
3149 * skip.c (skip_info): Rename to ...
3150 (info_skip_command): ... this.
3151 (_initialize_step_skip): Adjust.
3152 * source.c (line_info): Rename to ...
3153 (info_line_command): ... this.
3154 (source_info): Rename to ...
3155 (info_source_command)
3156 * stack.c (frame_info): Rename to ...
3157 (info_frame_command): ... this.
3158 (locals_info): Rename to ...
3159 (info_locals_command): ... this.
3160 (args_info): Rename to ...
3161 (info_args_command): ... this.
3162 (_initialize_stack): Adjust.
3163 * symtab.c (sources_info): Rename to ...
3164 (info_sources_command): ... this.
3165 (variables_info): Rename to ...
3166 (info_variables_command): ... this.
3167 (functions_info): Rename to ...
3168 (info_functions_command): ... this.
3169 (types_info): Rename to ...
3170 (info_types_command): ... this.
3171 (_initialize_symtab): Adjust.
3172 * target.c (target_info): Rename to ...
3173 (info_target_command): ... this.
3174 (initialize_targets): Adjust.
3175 * tracepoint.c (tvariables_info): Rename to ...
3176 (info_tvariables_command): ... this.
3177 (scope_info): Rename to ...
3178 (info_scope_command): ... this.
3179 (trace_dump_actions): Adjust.
3180 (_initialize_tracepoint): Adjust.
3181
3182 2017-08-22 Tom Tromey <tom@tromey.com>
3183
3184 * breakpoint.h (install_breakpoint): Update.
3185 * breakpoint.c (add_solib_catchpoint): Update.
3186 (install_breakpoint): Change argument to a std::unique_ptr.
3187 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3188 (create_breakpoint_sal, create_breakpoint): Update.
3189 (watch_command_1, catch_exec_command_1)
3190 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3191 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3192 Return the breakpoint.
3193 (set_raw_breakpoint_without_location, set_raw_breakpoint)
3194 (new_single_step_breakpoint): Update.
3195 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3196 std::unique_ptr.
3197 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3198 std::unique_ptr.
3199 * break-catch-sig.c (create_signal_catchpoint): Use
3200 std::unique_ptr.
3201 * ada-lang.c (create_ada_exception_catchpoint): Use
3202 std::unique_ptr.
3203
3204 2017-08-22 Tom Tromey <tom@tromey.com>
3205
3206 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3207
3208 2017-08-22 Tom Tromey <tom@tromey.com>
3209
3210 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3211 (lookup_partial_symbol): Update.
3212
3213 2017-08-22 Tom Tromey <tom@tromey.com>
3214
3215 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3216 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3217 (find_and_open_source, symtab_to_fullname): Update.
3218 * psymtab.c (psymtab_to_fullname): Update.
3219
3220 2017-08-22 Tom Tromey <tom@tromey.com>
3221
3222 * exec.c (exec_file_attach): Update.
3223 * linux-thread-db.c (try_thread_db_load): Update.
3224 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3225 * utils.c (gdb_realpath): Change return type.
3226 (gdb_realpath_keepfile): Update.
3227 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3228 (_initialize_utils): Register the new self test.
3229 * source.c (openp): Update.
3230 (find_and_open_source): Update.
3231 * nto-tdep.c (nto_find_and_open_solib): Update.
3232 * main.c (set_gdb_data_directory): Update.
3233 (captured_main_1): Update.
3234 * dwarf2read.c (dwarf2_get_dwz_file): Update
3235 (dw2_map_symbol_filenames): Update.
3236 * auto-load.c (auto_load_safe_path_vec_update): Update.
3237 (filename_is_in_auto_load_safe_path_vec): Change type of
3238 "filename_realp".
3239 (auto_load_objfile_script): Update.
3240 (file_is_auto_load_safe): Update. Use std::string.
3241 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3242
3243 2017-08-22 Tom Tromey <tom@tromey.com>
3244
3245 * utils.c (gdb_realpath_keepfile): Return a
3246 gdb::unique_xmalloc_ptr.
3247 * exec.c (exec_file_attach): Update.
3248 * utils.h (gdb_realpath_keepfile): Return a
3249 gdb::unique_xmalloc_ptr.
3250
3251 2017-08-22 Tom Tromey <tom@tromey.com>
3252
3253 * compile/compile.c (compile_file_command): Use
3254 gdb::unique_xmalloc_ptr, std::string.
3255 * utils.c (gdb_abspath): Change return type.
3256 * source.c (openp): Update.
3257 * objfiles.c (allocate_objfile): Update.
3258 * main.c (set_gdb_data_directory): Update.
3259 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
3260
3261 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
3262
3263 * cli-cmds.c (list_commands): List actual code around more than
3264 one location.
3265
3266 2017-08-21 John Baldwin <jhb@FreeBSD.org>
3267
3268 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
3269
3270 2017-08-21 Pedro Alves <palves@redhat.com>
3271
3272 PR gdb/19487
3273 * c-exp.y (variable production): Handle function aliases.
3274 * minsyms.c (msymbol_is_text): New function.
3275 * minsyms.h (msymbol_is_text): Declare.
3276 * symtab.c (find_function_alias_target): New function.
3277 * symtab.h (find_function_alias_target): Declare.
3278
3279 2017-08-21 Pedro Alves <palves@redhat.com>
3280
3281 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
3282 typedefs.
3283 * typeprint.c (whatis_exp): If handling "whatis", and expression
3284 is OP_TYPE, strip one typedef level. Otherwise don't strip
3285 typedefs here.
3286 * valops.c (value_cast): Save "to" type before resolving
3287 stubs/typedefs. Use that type as resulting value's type.
3288
3289 2017-08-18 Tom Tromey <tom@tromey.com>
3290 Pedro Alves <palves@redhat.com>
3291
3292 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
3293 * sol-thread.c (sol_thread_resume, sol_thread_wait)
3294 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
3295 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
3296 * proc-service.c (ps_xfer_memory): Use scoped_restore.
3297 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
3298 (linux_get_siginfo_data): Add "thread" argument. Use
3299 scoped_restore.
3300 * linux-nat.c (linux_child_follow_fork)
3301 (check_stopped_by_watchpoint): Use scoped_restore.
3302 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
3303 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
3304 (restore_inferior_ptid, save_inferior_ptid): Remove.
3305 * btrace.c (btrace_fetch): Use scoped_restore.
3306 * bsd-uthread.c (bsd_uthread_fetch_registers)
3307 (bsd_uthread_store_registers): Use scoped_restore.
3308 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
3309 scoped_restore.
3310 * aix-thread.c (aix_thread_resume, aix_thread_wait)
3311 (aix_thread_xfer_partial): Use scoped_restore.
3312 * inferior.h (save_inferior_ptid): Remove.
3313
3314 2017-08-18 Yao Qi <yao.qi@linaro.org>
3315
3316 PR tdep/21818
3317 * arm-tdep.c (gdb_print_insn_arm): Mark
3318 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
3319
3320 2017-08-18 Yao Qi <yao.qi@linaro.org>
3321
3322 * NEWS: Mention GDBserver's new option "--selftest".
3323 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
3324 * selftest.c: Move it to common/selftest.c.
3325 * selftest.h: Move it to common/selftest.h.
3326 * selftest-arch.c (reset): New function.
3327 (tests_with_arch): Call reset.
3328
3329 2017-08-18 Yao Qi <yao.qi@linaro.org>
3330
3331 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
3332 instead of exception_fprintf and printf_filtered.
3333
3334 2017-08-18 Yao Qi <yao.qi@linaro.org>
3335
3336 * selftest.c (register_self_test): Rename it to
3337 selftests::register_test.
3338 (run_self_tests): selftest::run_tests.
3339 * selftest.h: Update declarations.
3340 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
3341 selftests::register_test_foreach_arch.
3342 * selftest-arch.h: Update declaration.
3343 * aarch64-tdep.c: Update.
3344 * arm-tdep.c: Likewise.
3345 * disasm-selftests.c: Likewise.
3346 * dwarf2loc.c: Likewise.
3347 * dwarf2-frame.c: Likewise.
3348 * findvar.c: Likewise.
3349 * gdbarch-selftests.c: Likewise.
3350 * maint.c (maintenance_selftest): Likewise.
3351 * regcache.c: Likewise.
3352 * rust-exp.y: Likewise.
3353 * selftest-arch.c: Likewise.
3354 * unittests/environ-selftests.c: Likewise.
3355 * unittests/function-view-selftests.c: Likewise.
3356 * unittests/offset-type-selftests.c: Likewise.
3357 * unittests/optional-selftests.c: Likewise.
3358 * unittests/scoped_restore-selftests.c: Likewise.
3359 * utils-selftests.c: Likewise.
3360
3361 2017-08-17 Pedro Alves <palves@redhat.com>
3362
3363 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
3364 local.
3365
3366 2017-08-17 Pedro Alves <palves@redhat.com>
3367
3368 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
3369 field.
3370 (reset_die_in_process): Delete, replaced by ...
3371 (process_die_scope): ... this new class. Make it responsible for
3372 freeing cu->line_header too.
3373 (process_die): Use process_die_scope.
3374 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
3375 cu->line_header_die_owner. Don't release the line header if it's
3376 owned by the CU.
3377 (setup_type_unit_groups): Make the CU/DIE own the line header.
3378 Don't release the line header here.
3379
3380 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
3381
3382 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
3383
3384 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
3385
3386 * NEWS: Mention new shortcuts for nexti and stepi in TUI
3387 Single-Key mode
3388
3389 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
3390
3391 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
3392 mode command list.
3393
3394 2017-08-15 Stafford Horne <shorne@gmail.com>
3395
3396 * MAINTAINERS (Write After Approval): Add Stafford Horne.
3397
3398 2017-08-15 Stafford Horne <shorne@gmail.com>
3399
3400 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
3401
3402 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
3403
3404 PR gdb/21954
3405 * infcmd.c (unset_environment_command): Use the 'clear' method on
3406 the environment instead of resetting it.
3407
3408 2017-08-15 John Baldwin <jhb@FreeBSD.org>
3409
3410 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
3411 platforms.
3412
3413 2017-08-14 Tom Tromey <tom@tromey.com>
3414
3415 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
3416 (print_binary_chars): Likewise.
3417 (BITS_IN_BYTES): Remove.
3418
3419 2017-08-14 Tom Tromey <tom@tromey.com>
3420
3421 PR gdb/21675
3422 * valprint.c (LOW_ZERO): Change value to 034.
3423 (print_octal_chars): Add static_asserts for octal constants.
3424 * printcmd.c (print_scalar_formatted): Add 'd' case.
3425
3426 2017-08-11 Tom Tromey <tom@tromey.com>
3427
3428 * symfile.c (add_symbol_file_command): Use std::vector.
3429
3430 2017-08-14 Tom Tromey <tom@tromey.com>
3431
3432 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
3433 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3434 std::move.
3435 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
3436
3437 2017-08-11 Pedro Alves <palves@redhat.com>
3438
3439 * infrun.c (process_event_stop_test): Adjust
3440 function_name_is_marked_for_skip call.
3441 * skip.c: Include <list>.
3442 (skiplist_entry): Make it a class with private fields, and
3443 getters/setters.
3444 (skiplist_entry_chain): Delete.
3445 (skiplist_entries): New.
3446 (skiplist_entry_count): Delete.
3447 (highest_skiplist_entry_num): New.
3448 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
3449 (add_skiplist_entry): Delete.
3450 (skiplist_entry::skiplist_entry): New.
3451 (skiplist_entry::add_entry): New.
3452 (skip_file_command, skip_function): Adjust.
3453 (compile_skip_regexp): Delete.
3454 (skip_command): Don't compile regexp here. Adjust to use
3455 skiplist_entry::add_entry.
3456 (skip_info): Adjust to use range-for and getters.
3457 (skip_enable_command, skip_disable_command): Adjust to use
3458 range-for and setters.
3459 (skip_delete_command): Adjust to use std::list.
3460 (add_skiplist_entry): Delete.
3461 (skip_file_p): Delete, refactored as ...
3462 (skiplist_entry::do_skip_file_p): ... this new method.
3463 (skip_gfile_p): Delete, refactored as ...
3464 (skiplist_entry::do_gskip_file_p): ... this new method.
3465 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
3466 (skiplist_entry::skip_function_p): ... this new method.
3467 (function_name_is_marked_for_skip): Now returns bool, and takes
3468 the function sal by const reference. Adjust to use range-for and
3469 skiplist_entry methods.
3470 (_initialize_step_skip): Remove references to
3471 skiplist_entry_chain, skiplist_entry_count.
3472 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
3473 takes the function sal by const reference.
3474
3475 2017-08-11 Yao Qi <yao.qi@linaro.org>
3476
3477 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
3478 (dwarf2_frame_cache): Remove reset_cache_cleanup.
3479 (dwarf2_frame_cache):
3480 * frame-unwind.c (frame_unwind_try_unwinder): Catch
3481 RETURN_MASK_ALL and set *this_case to NULL.
3482 * frame-unwind.h: Update comments.
3483
3484 2017-08-11 Yao Qi <yao.qi@linaro.org>
3485
3486 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
3487 (dwarf2_frame_state_copy_regs): Remove.
3488 (dwarf2_frame_state_free_regs): Remove.
3489 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
3490 (dwarf2_restore_rule): Call method .alloc_regs instead of
3491 dwarf2_frame_state_alloc_regs.
3492 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
3493 constructor. Call std::move.
3494 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
3495 (dwarf2_frame_cache): Likewise.
3496
3497 [GDB_SELF_TEST]: Include selftest.h and
3498 selftest-arch.h.
3499 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
3500 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
3501 execute_cfa_program_test.
3502
3503 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
3504 copy ctor, assignment operator, move assignment.
3505 <alloc_regs>: New method.
3506 <swap>: New method.
3507 (struct dwarf2_frame_state): Delete dtor.
3508 (dwarf2_frame_state_alloc_regs): Remove declaration.
3509 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
3510 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
3511
3512 2017-08-11 Yao Qi <yao.qi@linaro.org>
3513
3514 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
3515 (dwarf2_frame_state::dwarf2_frame_state): New.
3516 (dwarf2_frame_state::~dwarf2_frame_state): New.
3517 (dwarf2_fetch_cfa_info): Update.
3518 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
3519 rather than a pointer. Update code.
3520 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
3521 dtor.
3522 <data_align, code_align, retaddr_column>: Change them to const.
3523 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
3524 to bool.
3525
3526 2017-08-11 Yao Qi <yao.qi@linaro.org>
3527
3528 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
3529 <loc.exp>: New field.
3530 * dwarf2-frame.c (execute_cfa_program): Update.
3531 (dwarf2_frame_prev_register): Update.
3532
3533 2017-08-10 Pedro Alves <palves@redhat.com>
3534
3535 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
3536
3537 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3538
3539 * fbsd-nat.c (struct fbsd_fork_info): Remove.
3540 (fbsd_pending_children): Use std::list.
3541 (fbsd_remember_child): Likewise.
3542 (fbsd_is_child_pending): Likewise.
3543 (fbsd_pending_vfork_done): Use std::forward_list.
3544 (fbsd_add_vfork_done): Likewise.
3545 (fbsd_is_vfork_done_pending): Likewise.
3546 (fbsd_next_vfork_done): Likewise.
3547
3548 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3549
3550 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
3551 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
3552 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
3553 for `mapfilename'.
3554 (fbsd_xfer_partial): Use gdb::byte_vector.
3555 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
3556
3557 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3558
3559 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
3560 "filestuff.h".
3561 (fbsd_find_memory_regions): Fix `mapfile' initialization.
3562
3563 2017-08-09 Tom Tromey <tom@tromey.com>
3564
3565 * skip.c (skiplist_entry): New constructor.
3566 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
3567 (skiplist_entry::file_is_glob): Now bool.
3568 (skiplist_entry::file, skiplist_entry::function): Now
3569 std::string.
3570 (make_skip_entry): Return a unique_ptr. Use new.
3571 (free_skiplist_entry, free_skiplist_entry_cleanup)
3572 (make_free_skiplist_entry_cleanup): Remove.
3573 (skip_command, skip_disable_command, add_skiplist_entry)
3574 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
3575 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
3576 (function_name_is_marked_for_skip): Update.
3577 (skip_delete_command): Update. Use delete.
3578
3579 2017-08-09 Jiong Wang <jiong.wang@arm.com>
3580
3581 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
3582 (aarch64_linux_core_read_description): New function.
3583 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
3584
3585 2017-08-09 Pedro Alves <palves@redhat.com>
3586
3587 * cp-name-parser.y (cp_comp_to_string): Return a
3588 gdb::unique_xmalloc_ptr<char>.
3589 * cp-support.c (replace_typedefs_qualified_name)
3590 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
3591 (cp_canonicalize_string_full): Use op= instead of explicit
3592 convertion.
3593 (cp_class_name_from_physname, method_name_from_physname)
3594 (cp_func_name, cp_remove_params): Adjust to use
3595 gdb::unique_xmalloc_ptr<char>.
3596 * cp-support.h (cp_comp_to_string): Return a
3597 gdb::unique_xmalloc_ptr<char>.
3598 * python/py-type.c (typy_lookup_type): Adjust to use
3599 gdb::unique_xmalloc_ptr<char>.
3600
3601 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
3602
3603 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
3604
3605 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
3606 Yao Qi <yao.qi@linaro.org>
3607
3608 * cp-support.c (cp_canonicalize_string_full): Use
3609 gdb::unique_xmalloc_ptr<char>.
3610 (cp_canonicalize_string): Likewise.
3611
3612 2017-08-09 Yao Qi <yao.qi@linaro.org>
3613
3614 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
3615 * regformats/i386/amd64-avx-avx512.dat: Remove.
3616 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
3617 * regformats/i386/amd64-avx-mpx.dat:Remove.
3618 * regformats/i386/amd64-avx.dat: Remove.
3619 * regformats/i386/amd64-mpx.dat: Remove.
3620 * regformats/i386/i386-avx-avx512.dat: Remove.
3621 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
3622 * regformats/i386/i386-avx-mpx.dat: Remove.
3623 * regformats/i386/i386-mmx.dat: Remove.
3624 * regformats/i386/i386-mpx.dat: Remove.
3625
3626 2017-08-09 Yao Qi <yao.qi@linaro.org>
3627
3628 * amd64-tdep.h (tdesc_x32): Remove the declaration.
3629 * amd64-tdep.c: Don't include features/i386/x32*.c.
3630 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
3631 functions.
3632 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
3633 and i386/x32-avx-avx512.
3634 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
3635 and i386/x32.xml.
3636 * features/i386/x32-avx-avx512.c: Removed.
3637 * features/i386/x32-avx-avx512.xml: Removed.
3638 * features/i386/x32-avx.c: Removed.
3639 * features/i386/x32-avx.xml: Removed.
3640 * features/i386/x32.c: Removed.
3641 * features/i386/x32.xml: Removed.
3642 * regformats/i386/x32-avx-avx512.dat: Removed.
3643 * regformats/i386/x32-avx.dat: Removed.
3644 * regformats/i386/x32.dat: Removed.
3645
3646 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3647
3648 PR breakpoints/21886
3649 * mem-break.c (default_memory_insert_breakpoint): Use
3650 `->placed_address' rather than `->reqstd_address' for the
3651 breakpoint location.
3652
3653 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3654
3655 * arch-utils.c (default_print_insn): Remove arch/mach/endian
3656 assertions.
3657
3658 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3659
3660 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
3661 a union of `tdep_info', `tdesc_data' and `id'.
3662 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
3663 rather than `info.tdep_info'.
3664 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
3665 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3666 * i386-tdep.c (i386_gdbarch_init): Likewise.
3667 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
3668 * mips-tdep.c (mips_gdbarch_init): Likewise.
3669 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3670 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3671 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
3672 `info.tdep_info'.
3673 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
3674 `info.tdep_info'.
3675 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3676 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
3677 `info.tdep_info'.
3678 * spu-tdep.c (spu_gdbarch_init): Likewise.
3679 * gdbarch.h: Regenerate.
3680
3681 2017-08-07 Leszek Swirski <leszeks@google.com>
3682
3683 PR symtab/20899
3684 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
3685
3686 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
3687
3688 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3689 (gdbsim_open): Rename gdb_argv args object to argv.
3690
3691 2017-08-05 Tom Tromey <tom@tromey.com>
3692
3693 * compile/compile-object-load.c (compile_object_load): Use
3694 gdb::unique_xmalloc_ptr.
3695 * cli/cli-dump.c (scan_filename): Rename from
3696 scan_filename_with_cleanup. Change return type.
3697 (scan_expression): Rename from scan_expression_with_cleanup.
3698 Change return type.
3699 (dump_memory_to_file, dump_value_to_file, restore_command):
3700 Use gdb::unique_xmalloc_ptr. Update.
3701 * cli/cli-cmds.c (find_and_open_script): Use
3702 gdb::unique_xmalloc_ptr.
3703 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3704 * symmisc.c (maintenance_print_symbols)
3705 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3706 * symfile.c (symfile_bfd_open, generic_load)
3707 (add_symbol_file_command, remove_symbol_file_command): Use
3708 gdb::unique_xmalloc_ptr.
3709 * source.c (openp): Use gdb::unique_xmalloc_ptr.
3710 * psymtab.c (maintenance_print_psymbols): Use
3711 gdb::unique_xmalloc_ptr.
3712 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3713 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3714 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3715 (reload_shared_libraries_1): Likewise.
3716
3717 2017-08-05 Tom Tromey <tom@tromey.com>
3718
3719 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3720 (rust_op_vector, rust_set_vector): New typedefs.
3721 (current_parser): New global.
3722 (work_obstack): Change to pointer type. Update all users.
3723 (rust_ast, pstate): Remove globals.
3724 (struct rust_parser): New.
3725 (%union) <params, field_inits>: Change type.
3726 (start, tuple_expr, unit_expr, struct_expr_list, literal)
3727 (field_expr, expr_list, maybe_expr_list, type_list): Update.
3728 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3729 (convert_params_to_types, convert_params_to_expression): Change
3730 type of "params".
3731 (ast_string): Change type of "fields".
3732 (rust_parse): Make a rust_parser. Remove cleanups.
3733 (rust_lex_tests): Make and install an auto_obstack.
3734
3735 2017-08-04 Yao Qi <yao.qi@linaro.org>
3736
3737 * configure.srv (ipa_x32_linux_regobj): New.
3738 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3739 instead of X86_TDESC_AVX512.
3740 (initialize_low_tracepoint): Call
3741 init_registers_x32_avx_avx512_linux.
3742
3743 2017-08-04 Yao Qi <yao.qi@linaro.org>
3744
3745 * utils.h (gdb_argv): Add namespace std for nullptr_t.
3746
3747 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
3748
3749 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3750
3751 2017-08-03 Tom Tromey <tom@tromey.com>
3752
3753 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3754 Remove.
3755 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3756
3757 2017-08-03 Tom Tromey <tom@tromey.com>
3758
3759 * python/py-param.c (compute_enum_values): Use gdb_argv.
3760
3761 2017-08-03 Tom Tromey <tom@tromey.com>
3762
3763 * utils.h (struct gdb_argv_deleter): New.
3764 (gdb_argv): New class.
3765 * utils.c (gdb_argv::reset): New method.
3766 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3767 * tracefile.c (tsave_command): Use gdb_argv.
3768 * top.c (new_ui_command): Use gdb_argv.
3769 * symmisc.c (maintenance_print_symbols)
3770 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3771 * symfile.c (symbol_file_command, generic_load)
3772 (remove_symbol_file_command): Use gdb_argv.
3773 * stack.c (backtrace_command): Use gdb_argv.
3774 * source.c (add_path, show_substitute_path_command)
3775 (unset_substitute_path_command, set_substitute_path_command):
3776 Use gdb_argv.
3777 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
3778 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
3779 * remote.c (extended_remote_run, remote_put_command)
3780 (remote_get_command, remote_delete_command): Use gdb_argv.
3781 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
3782 (gdbsim_open): Use gdb_argv.
3783 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
3784 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
3785 * procfs.c (procfs_info_proc): Use gdb_argv.
3786 * interps.c (interpreter_exec_cmd): Use gdb_argv.
3787 * infrun.c (handle_command): Use gdb_argv.
3788 * inferior.c (add_inferior_command, clone_inferior_command):
3789 Use gdb_argv.
3790 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
3791 * exec.c (exec_file_command): Use gdb_argv.
3792 * cli/cli-cmds.c (alias_command): Use gdb_argv.
3793 * compile/compile.c (build_argc_argv): Use gdb_argv.
3794
3795 2017-08-03 Tom Tromey <tom@tromey.com>
3796
3797 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
3798
3799 2017-08-03 Tom Tromey <tom@tromey.com>
3800
3801 * python/python.c (compute_python_string): Return std::string.
3802 (gdbpy_eval_from_control_command): Update.
3803 (do_start_initialization): Use std::string.
3804 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
3805 xstrprintf.
3806 * python/py-breakpoint.c (local_setattro): Use string_printf, not
3807 xstrprintf.
3808
3809 2017-08-03 Tom Tromey <tom@tromey.com>
3810
3811 * top.h (do_restore_instream_cleanup): Remove.
3812 * top.c (do_restore_instream_cleanup): Remove.
3813 (read_command_file): Use scoped_restore.
3814 * cli/cli-script.c (execute_user_command): Use scoped_restore.
3815
3816 2017-08-03 Tom Tromey <tom@tromey.com>
3817
3818 * cli/cli-script.c (execute_user_command)
3819 (execute_control_command): Use scoped_restore.
3820
3821 2017-08-03 Tom Tromey <tom@tromey.com>
3822
3823 * cli/cli-script.c (do_restore_user_call_depth): Remove.
3824 (execute_user_command): Remove user_call_depth; use
3825 user_args_stack's size instead.
3826
3827 2017-08-03 Tom Tromey <tom@tromey.com>
3828
3829 * top.h (in_user_command): Remove.
3830 * top.c (in_user_command): Remove.
3831 * cli/cli-script.c (do_restore_user_call_depth)
3832 (execute_user_command): Update.
3833
3834 2017-08-03 Tom Tromey <tom@tromey.com>
3835
3836 * valops.c (search_struct_method): Use gdb::byte_vector.
3837 * valarith.c (value_concat): Use std::vector.
3838 * target.c (memory_xfer_partial): Use gdb::byte_vector.
3839 (simple_search_memory): Likewise.
3840 * printcmd.c (find_string_backward): Use gdb::byte_vector.
3841 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
3842 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
3843 * elfread.c (elf_rel_plt_read): Use std::string.
3844 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
3845 * cli/cli-dump.c (restore_section_callback): Use
3846 gdb::byte_vector.
3847
3848 2017-08-03 Tom Tromey <tom@tromey.com>
3849
3850 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
3851
3852 2017-08-03 Tom Tromey <tom@tromey.com>
3853
3854 * tui/tui-regs.c (tui_restore_gdbout): Remove.
3855 (tui_register_format): Use scoped_restore.
3856
3857 2017-08-03 Tom Tromey <tom@tromey.com>
3858
3859 * reverse.c (exec_direction_default): Remove.
3860 (exec_reverse_once): Use scoped_restore.
3861 * remote.c (restore_remote_timeout): Remove.
3862 (remote_flash_erase, remote_flash_write, remote_flash_done)
3863 (readchar, remote_serial_write): Use scoped_restore.
3864 * cli/cli-script.c (struct source_cleanup_lines_args)
3865 (source_cleanup_lines): Remove.
3866 (script_from_file): Use scoped_restore.
3867 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
3868 (source_command): Use scoped_restore.
3869
3870 2017-08-03 Tom Tromey <tom@tromey.com>
3871
3872 * utils.h (make_cleanup_free_so): Remove.
3873 * utils.c (do_free_so, make_cleanup_free_so): Remove.
3874 * solist.h (struct so_deleter): New.
3875 (so_list_up): New typedef.
3876 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
3877
3878 2017-08-03 Tom Tromey <tom@tromey.com>
3879
3880 * utils.h (make_cleanup_restore_current_language): Remove.
3881 * utils.c (do_restore_current_language)
3882 (make_cleanup_restore_current_language): Remove.
3883 * parse.c (parse_exp_in_context_1)
3884 (parse_expression_with_language): Use
3885 scoped_restore_current_language.
3886 * mi/mi-main.c (mi_cmd_execute): Use
3887 scoped_restore_current_language.
3888 * language.h (scoped_restore_current_language): New class.
3889
3890 2017-08-03 Tom Tromey <tom@tromey.com>
3891
3892 * compile/compile.c (cleanup_unlink_file): Remove.
3893 (compile_to_object): Use gdb::unlinker.
3894 (eval_compile_command): Likewise.
3895
3896 2017-08-03 Tom Tromey <tom@tromey.com>
3897
3898 * utils.h (make_cleanup_fclose): Remove.
3899 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
3900
3901 2017-08-03 Tom Tromey <tom@tromey.com>
3902
3903 * top.c (open_terminal_stream): Return gdb_file_up.
3904 (new_ui_command): Update.
3905
3906 2017-08-03 Tom Tromey <tom@tromey.com>
3907
3908 * source.c (print_source_lines_base, forward_search_command)
3909 (reverse_search_command): Use gdb_file_up.
3910
3911 2017-08-03 Tom Tromey <tom@tromey.com>
3912
3913 * fbsd-nat.c (fbsd_find_memory_regions): Update.
3914
3915 2017-08-03 Tom Tromey <tom@tromey.com>
3916
3917 * cli/cli-cmds.c (find_and_open_script): Change return type.
3918 Remove "streamp" and "full_path" parameters.
3919 (source_script_with_search): Update.
3920 * auto-load.c (source_script_file): Update.
3921 * cli/cli-cmds.h (find_and_open_script): Change type.
3922 (open_script): New struct.
3923
3924 2017-08-03 Tom Tromey <tom@tromey.com>
3925
3926 * xml-support.c (xml_fetch_content_from_file): Update.
3927 * ui-file.c (stdio_file::open): Update.
3928 * tracefile-tfile.c (tfile_start): Update.
3929 * remote.c (remote_file_put, remote_file_get): Update.
3930 * nat/linux-procfs.c (linux_proc_get_int)
3931 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
3932 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
3933 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
3934 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
3935 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
3936 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
3937 * linux-nat.c (linux_proc_pending_signals): Update.
3938 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
3939 (file_closer): Remove.
3940 * compile/compile.c (compile_to_object): Update.
3941 * common/filestuff.h (struct gdb_file_deleter): New.
3942 (gdb_file_up): New typedef.
3943 (gdb_fopen_cloexec): Change return type.
3944 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
3945 * cli/cli-dump.c (fopen_with_cleanup): Remove.
3946 (dump_binary_file, restore_binary_file): Update.
3947 * auto-load.c (auto_load_objfile_script_1): Update.
3948
3949 2017-08-03 Tom Tromey <tom@tromey.com>
3950
3951 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
3952 (info_static_tracepoint_markers_command): Likewise.
3953 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
3954 * skip.c (skip_info): Use ui_out_emit_table.
3955 * progspace.c (print_program_space): Use ui_out_emit_table.
3956 * osdata.c (info_osdata): Use ui_out_emit_table.
3957 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
3958 ui_out_emit_table.
3959 * linux-thread-db.c (info_auto_load_libthread_db): Use
3960 ui_out_emit_table.
3961 * inferior.c (print_inferior): Use ui_out_emit_table.
3962 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
3963 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
3964 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
3965 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
3966 * ui-out.h (class ui_out_emit_table): New.
3967
3968 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
3969
3970 * mips-tdep.c (mips_fpu_type_str): New function.
3971 (mips_dump_tdep): Call it.
3972
3973 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
3974
3975 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
3976 `->mips_fpu_type'.
3977
3978 2017-07-31 Xavier Roirand <roirand@adacore.com>
3979
3980 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
3981
3982 2017-07-27 Xavier Roirand <roirand@adacore.com>
3983
3984 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
3985
3986 2017-07-26 Yao Qi <yao.qi@linaro.org>
3987
3988 * cli/cli-cmds.c (maintenancechecklist): New variable.
3989 * gdbcmd.h (maintenancechecklist): Declare it.
3990 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
3991 Call i386_linux_read_description with different masks.
3992 * maint.c (maintenance_check_command): New function.
3993 (_initialize_maint_cmds): Call add_prefix_cmd.
3994 * target-descriptions.c (tdesc_reg): override operator != and ==.
3995 (tdesc_type): Likewise.
3996 (tdesc_feature): Likewise.
3997 (target_desc): Likewise.
3998 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
3999 (maintenance_check_xml_descriptions): New function.
4000 (_initialize_target_descriptions) Add command "xml-descriptions".
4001 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
4002
4003 2017-07-26 Yao Qi <yao.qi@linaro.org>
4004
4005 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
4006 Include features/i386/32bit-*.c.
4007 (i386_linux_read_description): Generate target description if it
4008 doesn't exist.
4009 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
4010 functions.
4011 * features/i386/32bit-linux.c: Re-generated.
4012 * features/i386/32bit-sse.c: Likewise.
4013 * target-descriptions.c (print_c_feature::visit): Print code to
4014 set register number if needed.
4015 (print_c_feature) <m_next_regnum>: New field.
4016
4017 2017-07-26 Yao Qi <yao.qi@linaro.org>
4018
4019 * features/Makefile (CFILES): Rename with TDESC_CFILES.
4020 (FEATURE_XMLFILES): New.
4021 (FEATURE_CFILES): New.
4022 New rules.
4023 (clean-cfiles): Remove generated c files.
4024 * features/i386/32bit-avx.c: Generated.
4025 * features/i386/32bit-avx512.c: Generated.
4026 * features/i386/32bit-core.c: Generated.
4027 * features/i386/32bit-linux.c: Generated.
4028 * features/i386/32bit-mpx.c: Generated.
4029 * features/i386/32bit-pkeys.c: Generated.
4030 * features/i386/32bit-sse.c: Generated.
4031 * target-descriptions.c: Include algorithm.
4032 (tdesc_element_visitor): Add method visit_end.
4033 (print_c_tdesc): Implement visit_end.
4034 (print_c_tdesc:: m_filename_after_features): Move it to
4035 protected.
4036 (print_c_feature): New class.
4037 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
4038 name starts with "i386/32bit-".
4039
4040 2017-07-26 Yao Qi <yao.qi@linaro.org>
4041
4042 * target-descriptions.c (tdesc_element_visitor): New class.
4043 (tdesc_element): New class.
4044 (tdesc_reg): Inherit from tdesc_element.
4045 (tdesc_reg::accept): New function.
4046 (tdesc_type): Inherit from tdesc_element.
4047 (tdesc_type::accept): New function.
4048 (tdesc_feature): Inherit from tdesc_element.
4049 (tdesc_feature::accept): New function.
4050 (target_desc): Inherit from tdesc_element.
4051 (target_desc::target_desc): New.
4052 (target_desc::~target_desc): New.
4053 (target_desc::accept): New.
4054 (allocate_target_description): Use new.
4055 (free_target_description): Use delete.
4056 (print_c_tdesc): New class.
4057 (maint_print_c_tdesc_cmd): Adjust.
4058
4059 * features/aarch64.c: Re-generated.
4060 * features/arc-arcompact.c: Re-generated.
4061 * features/arc-v2.c: Re-generated.
4062 * features/arm/arm-with-iwmmxt.c: Re-generated.
4063 * features/arm/arm-with-m.c: Re-generated.
4064 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4065 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4066 * features/arm/arm-with-neon.c: Re-generated.
4067 * features/arm/arm-with-vfpv2.c: Re-generated.
4068 * features/arm/arm-with-vfpv3.c: Re-generated.
4069 * features/i386/amd64-avx-avx512.c: Re-generated.
4070 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4071 * features/i386/amd64-avx.c: Re-generated.
4072 * features/i386/amd64-avx-linux.c: Re-generated.
4073 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4074 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4075 * features/i386/amd64-avx-mpx.c: Re-generated.
4076 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4077 * features/i386/amd64.c: Re-generated.
4078 * features/i386/amd64-linux.c: Re-generated.
4079 * features/i386/amd64-mpx.c: Re-generated.
4080 * features/i386/amd64-mpx-linux.c: Re-generated.
4081 * features/i386/i386-avx-avx512.c: Re-generated.
4082 * features/i386/i386-avx-avx512-linux.c: Re-generated.
4083 * features/i386/i386-avx.c: Re-generated.
4084 * features/i386/i386-avx-linux.c: Re-generated.
4085 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4086 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4087 * features/i386/i386-avx-mpx.c: Re-generated.
4088 * features/i386/i386-avx-mpx-linux.c: Re-generated.
4089 * features/i386/i386.c: Re-generated.
4090 * features/i386/i386-linux.c: Re-generated.
4091 * features/i386/i386-mmx.c: Re-generated.
4092 * features/i386/i386-mmx-linux.c: Re-generated.
4093 * features/i386/i386-mpx.c: Re-generated.
4094 * features/i386/i386-mpx-linux.c: Re-generated.
4095 * features/i386/x32-avx-avx512.c: Re-generated.
4096 * features/i386/x32-avx-avx512-linux.c: Re-generated.
4097 * features/i386/x32-avx.c: Re-generated.
4098 * features/i386/x32-avx-linux.c: Re-generated.
4099 * features/i386/x32.c: Re-generated.
4100 * features/i386/x32-linux.c: Re-generated.
4101 * features/microblaze.c: Re-generated.
4102 * features/microblaze-with-stack-protect.c: Re-generated.
4103 * features/mips64-dsp-linux.c: Re-generated.
4104 * features/mips64-linux.c: Re-generated.
4105 * features/mips-dsp-linux.c: Re-generated.
4106 * features/mips-linux.c: Re-generated.
4107 * features/nds32.c: Re-generated.
4108 * features/nios2.c: Re-generated.
4109 * features/nios2-linux.c: Re-generated.
4110 * features/rs6000/powerpc-32.c: Re-generated.
4111 * features/rs6000/powerpc-32l.c: Re-generated.
4112 * features/rs6000/powerpc-403.c: Re-generated.
4113 * features/rs6000/powerpc-403gc.c : Re-generated.
4114 * features/rs6000/powerpc-405.c: Re-generated.
4115 * features/rs6000/powerpc-505.c: Re-generated.
4116 * features/rs6000/powerpc-601.c: Re-generated.
4117 * features/rs6000/powerpc-602.c: Re-generated.
4118 * features/rs6000/powerpc-603.c: Re-generated.
4119 * features/rs6000/powerpc-604.c: Re-generated.
4120 * features/rs6000/powerpc-64.c: Re-generated.
4121 * features/rs6000/powerpc-64l.c: Re-generated.
4122 * features/rs6000/powerpc-7400.c: Re-generated.
4123 * features/rs6000/powerpc-750.c: Re-generated.
4124 * features/rs6000/powerpc-860.c: Re-generated.
4125 * features/rs6000/powerpc-altivec32.c: Re-generated.
4126 * features/rs6000/powerpc-altivec32l.c: Re-generated.
4127 * features/rs6000/powerpc-altivec64.c: Re-generated.
4128 * features/rs6000/powerpc-altivec64l.c: Re-generated.
4129 * features/rs6000/powerpc-cell32l.c: Re-generated.
4130 * features/rs6000/powerpc-cell64l.c: Re-generated.
4131 * features/rs6000/powerpc-e500.c: Re-generated.
4132 * features/rs6000/powerpc-e500l.c: Re-generated.
4133 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4134 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4135 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4136 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4137 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
4138 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
4139 * features/rs6000/powerpc-vsx32.c: Re-generated.
4140 * features/rs6000/powerpc-vsx32l.c: Re-generated.
4141 * features/rs6000/powerpc-vsx64.c: Re-generated.
4142 * features/rs6000/powerpc-vsx64l.c: Re-generated.
4143 * features/rs6000/rs6000.c: Re-generated.
4144 * features/s390-linux32.c: Re-generated.
4145 * features/s390-linux32v1.c: Re-generated.
4146 * features/s390-linux32v2.c: Re-generated.
4147 * features/s390-linux64.c: Re-generated.
4148 * features/s390-linux64v1.c: Re-generated.
4149 * features/s390-linux64v2.c: Re-generated.
4150 * features/s390-te-linux64.c: Re-generated.
4151 * features/s390-tevx-linux64.c: Re-generated.
4152 * features/s390-vx-linux64.c: Re-generated.
4153 * features/s390x-linux64.c: Re-generated.
4154 * features/s390x-linux64v1.c: Re-generated.
4155 * features/s390x-linux64v2.c: Re-generated.
4156 * features/s390x-te-linux64.c: Re-generated.
4157 * features/s390x-tevx-linux64.c: Re-generated.
4158 * features/s390x-vx-linux64.c: Re-generated.
4159 * features/sparc/sparc32-solaris.c: Re-generated.
4160 * features/sparc/sparc64-solaris.c: Re-generated.
4161 * features/tic6x-c62x.c: Re-generated.
4162 * features/tic6x-c62x-linux.c: Re-generated.
4163 * features/tic6x-c64x.c: Re-generated.
4164 * features/tic6x-c64x-linux.c: Re-generated.
4165 * features/tic6x-c64xp.c: Re-generated.
4166 * features/tic6x-c64xp-linux.c: Re-generated.
4167
4168 2017-07-26 Yao Qi <yao.qi@linaro.org>
4169
4170 * i386-linux-tdep.c (i386_linux_read_description): New function.
4171 (i386_linux_core_read_description): Call
4172 i386_linux_read_description.
4173 * i386-linux-tdep.h (i386_linux_read_description): Declare.
4174 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
4175 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
4176 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
4177 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
4178 * x86-linux-nat.c (x86_linux_read_description): Call
4179 i386_linux_read_description.
4180
4181 2017-07-26 Yao Qi <yao.qi@linaro.org>
4182
4183 * NEWS: Mention it.
4184 * features/Makefile (%.c: %.xml): Pass the xml file name to
4185 command "maint print c-tdesc".
4186 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4187 name from 'arg'.
4188
4189 2017-07-26 Yao Qi <yao.qi@linaro.org>
4190
4191 * target-descriptions.c (target_desc): Add ctor and dtor. Do
4192 in-class initialization.
4193 (tdesc_create_feature): Call new instead of XCNEW.
4194 (free_target_description): Ue delete.
4195
4196 2017-07-25 John Baldwin <jhb@FreeBSD.org>
4197
4198 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4199
4200 2017-07-25 Yao Qi <yao.qi@linaro.org>
4201
4202 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4203 constant.
4204 (amd64_x32_init_abi): Likewise.
4205 * amd64-tdep.h (amd64_init_abi): Update declaration.
4206 (amd64_x32_init_abi): Likewise.
4207
4208 2017-07-25 Yao Qi <yao.qi@linaro.org>
4209
4210 PR tdep/21717
4211 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4212 condition for FPSCR.
4213 (arm_linux_store_inferior_registers): Likewise.
4214
4215 2017-07-22 Tom Tromey <tom@tromey.com>
4216
4217 * break-catch-syscall.c (struct catch_syscall_inferior_data)
4218 <syscalls_counts>: Now a std::vector.
4219 (get_catch_syscall_inferior_data): Use "new".
4220 (catch_syscall_inferior_data_cleanup): Use "delete".
4221 (insert_catch_syscall, remove_catch_syscall)
4222 (clear_syscall_counts): Update.
4223
4224 2017-07-22 Tom Tromey <tom@tromey.com>
4225
4226 * break-catch-syscall.c (syscall_catchpoint)
4227 <syscalls_to_be_caught>: Now a std::vector<int>
4228 (~syscall_catchpoint): Remove.
4229 (insert_catch_syscall, remove_catch_syscall)
4230 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4231 (print_mention_catch_syscall, print_recreate_catch_syscall):
4232 Update.
4233 (create_syscall_event_catchpoint): Change type of "filter"
4234 parameter.
4235 (catch_syscall_split_args): Return a std::vector.
4236 (catch_syscall_command_1, catching_syscall_number_1): Update.
4237
4238 2017-07-22 Tom Tromey <tom@tromey.com>
4239
4240 * break-catch-throw.c (struct exception_catchpoint)
4241 <exception_rx>: Now a std::string.
4242 (~exception_catchpoint): Remove.
4243 (print_one_detail_exception_catchpoint): Update.
4244 (handle_gnu_v3_exceptions): Change type of except_rx.
4245 (extract_exception_regexp): Return a std::string.
4246 (catch_exception_command_1): Update.
4247
4248 2017-07-22 Tom Tromey <tom@tromey.com>
4249
4250 * break-catch-sig.c (gdb_signal_type): Remove typedef.
4251 (struct signal_catchpoint) <signals_to_be_caught>: Now a
4252 std::vector.
4253 <catch_all>: Now a bool.
4254 (~signal_catchpoint): Remove.
4255 (signal_catchpoint_insert_location)
4256 (signal_catchpoint_remove_location)
4257 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
4258 (signal_catchpoint_print_mention)
4259 (signal_catchpoint_print_recreate)
4260 (signal_catchpoint_explains_signal): Update.
4261 (create_signal_catchpoint): Change type of "filter" and
4262 "catch_all".
4263 (catch_signal_split_args): Return a std::vector. Change type of
4264 "catch_all".
4265 (catch_signal_command): Update.
4266
4267 2017-07-20 Pedro Alves <palves@redhat.com>
4268
4269 * ada-lang.c (ada_language_defn): Make extern.
4270 (_initialize_ada_language): Remove add_language call.
4271 * c-lang.c (c_language_defn, cplus_language_defn)
4272 (asm_language_defn, minimal_language_defn): Make extern.
4273 (_initialize_c_language): Delete.
4274 * completer.c (compare_cstrings): Delete, moved to utils.h.
4275 * d-lang.c (d_language_defn): Make extern.
4276 (_initialize_d_language): Remove add_language calls.
4277 * defs.h (enum language): Add comment.
4278 * f-lang.c (f_language_defn): Make extern.
4279 (_initialize_f_language): Remove add_language call.
4280 * go-lang.c (go_language_defn): Make extern.
4281 (_initialize_go_language): Remove add_language call.
4282 * language.c: Include <algorithm>.
4283 (languages): Redefine as const array.
4284 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
4285 (set_language_command): Handle "local". Use for-range loop.
4286 (set_language): Remove loop.
4287 (language_enum): Rewrite.
4288 (language_def, language_str): Remove loops.
4289 (add_language): Delete.
4290 (add_set_language_command): New, based on add_languages.
4291 (skip_language_trampoline): Adjust.
4292 (local_language_defn): Delete.
4293 (language_gdbarch_post_init): Adjust.
4294 (_initialize_language): Remove add_language calls. Call
4295 add_set_language_command.
4296 * language.h (add_language): Delete.
4297 (auto_language_defn)
4298 (unknown_language_defn, minimal_language_defn, ada_language_defn)
4299 (asm_language_defn, c_language_defn, cplus_language_defn)
4300 (d_language_defn, f_language_defn, go_language_defn)
4301 (m2_language_defn, objc_language_defn, opencl_language_defn)
4302 (pascal_language_defn, rust_language_defn): Declare.
4303 * m2-lang.c (m2_language_defn): Make extern.
4304 (_initialize_m2_language): Remove add_language call.
4305 * objc-lang.c (objc_language_defn): Make extern.
4306 (_initialize_objc_language): Remove add_language call.
4307 * opencl-lang.c (opencl_language_defn): Make extern.
4308 (_initialize_opencl_language): Remove add_language call.
4309 * p-lang.c (pascal_language_defn): Make extern.
4310 (_initialize_pascal_language): Delete.
4311 * rust-lang.c (rust_language_defn): Make extern.
4312 (_initialize_rust_language): Delete.
4313 * utils.h (compare_cstrings): New static inline function.
4314
4315 2017-07-20 Pedro Alves <palves@redhat.com>
4316
4317 * ada-lang.c (ada_to_fixed_type_1): Adjust.
4318 (get_var_value): Constify parameters.
4319 (get_int_var_value): Change prototype.
4320 (to_fixed_range_type): Adjust.
4321 * ada-lang.h (get_int_var_value): Change prototype.
4322
4323 2017-07-20 Pedro Alves <palves@redhat.com>
4324
4325 * dwarf2read.c (dw2_lookup_symbol): Use
4326 SYMBOL_MATCHES_SEARCH_NAME.
4327 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
4328
4329 2017-07-20 Pedro Alves <palves@redhat.com>
4330
4331 * block.c (block_iter_name_step, block_iter_name_first)
4332 (block_iter_name_next): Delete.
4333 (block_lookup_symbol_primary): Adjust to use
4334 dict_iter_match_first/dict_iter_match_next.
4335 * block.h (block_iter_name_first, block_iter_name_next): Delete
4336 declarations.
4337 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
4338 dict_iter_match_first/dict_iter_match_next.
4339
4340 2017-07-20 Pedro Alves <palves@redhat.com>
4341
4342 * cp-support.c (cp_find_first_component_aux): Add missing case for
4343 end of string.
4344
4345 2017-07-18 David Blaikie <dblaikie@gmail.com>
4346
4347 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
4348 of dwo_cu's dwo_file.
4349
4350 2017-07-18 Yao Qi <yao.qi@linaro.org>
4351
4352 * remote.c (store_registers_using_G): Remove one line comment.
4353
4354 2017-07-18 Yao Qi <yao.qi@linaro.org>
4355
4356 * regcache.c (regcache_cpy): Simplify it.
4357 (regcache::cpy_no_passthrough): Remove it.
4358 * regcache.h (cpy_no_passthrough): Remove it.
4359 (regcache_dup, regcache_cpy): Update comments.
4360
4361 2017-07-18 Pedro Alves <palves@redhat.com>
4362
4363 * remote-sim.c (sim_command_completer): Adjust to work with a
4364 completion_tracker instead of a VEC.
4365
4366 2017-07-17 Pedro Alves <palves@redhat.com>
4367
4368 * completer.c (complete_source_filenames): New function.
4369 (complete_address_and_linespec_locations): New function.
4370 (location_completer): Use complete_address_and_linespec_locations.
4371 (completion_tracker::build_completion_result): Honor the tracker's
4372 request to suppress append.
4373 * completer.h (completion_tracker::suppress_append_ws)
4374 (completion_tracker::set_suppress_append_ws): New methods.
4375 (completion_tracker::m_suppress_append_ws): New field.
4376 (complete_source_filenames): New declaration.
4377 * linespec.c (linespec_complete_what): New.
4378 (struct ls_parser) <complete_what, completion_word,
4379 completion_quote_char, completion_quote_end, completion_tracker>:
4380 New fields.
4381 (string_find_incomplete_keyword_at_end): New.
4382 (linespec_lexer_lex_string): Record quote char. If in completion
4383 mode, don't throw.
4384 (linespec_lexer_consume_token): Advance the completion word point.
4385 (linespec_lexer_peek_token): Save/restore completion info.
4386 (save_stream_and_consume_token): New.
4387 (set_completion_after_number): New.
4388 (linespec_parse_basic): Set what to complete next depending on
4389 token. Handle function and label completions specially.
4390 (parse_linespec): Disable objc shortcut in completion mode. Set
4391 what to complete next depending on token type. Skip keyword if in
4392 completion mode.
4393 (complete_linespec_component, linespec_complete): New.
4394 * linespec.h (linespec_complete): Declare.
4395
4396 2017-07-17 Pedro Alves <palves@redhat.com>
4397
4398 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
4399 Handle 'operator<' / 'operator<<'.
4400
4401 2017-07-17 Pedro Alves <palves@redhat.com>
4402
4403 * completer.c (collect_explicit_location_matches): Handle
4404 MATCH_LABEL.
4405 (convert_explicit_location_to_linespec): New, factored out from
4406 ...
4407 (convert_explicit_location_to_sals): ... this.
4408 (complete_label): New.
4409 (linespec_complete_label, find_label_symbols_in_block): New.
4410 (find_label_symbols): Add completion_mode parameter and adjust to
4411 call find_label_symbols_in_block.
4412 * linespec.h (linespec_complete_label): Declare.
4413
4414 2017-07-17 Pedro Alves <palves@redhat.com>
4415
4416 * ada-lang.c (ada_collect_symbol_completion_matches): Add
4417 complete_symbol_mode parameter.
4418 * cli/cli-cmds.c (complete_command): Get the completion result out
4419 of the handle_brkchars tracker if used a custom word point.
4420 * completer.c: Include "linespec.h".
4421 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
4422 (advance_to_expression_complete_word_point): New.
4423 (completion_tracker::completes_to_completion_word): New.
4424 (complete_files_symbols): Pass down
4425 complete_symbol_mode::EXPRESSION.
4426 (explicit_options, probe_options): New.
4427 (collect_explicit_location_matches): Complete on the
4428 explictit_loc->foo instead of word. Use
4429 linespec_complete_function. Handle MATCH_LINE. Handle offering
4430 keyword and options completions.
4431 (backup_text_ptr): Delete.
4432 (skip_keyword): New.
4433 (complete_explicit_location): Remove 'word' parameter. Add
4434 language, quoted_arg_start and quoted_arg_end parameters.
4435 Rewrite, parsing left to right.
4436 (location_completer): Rewrite.
4437 (location_completer_handle_brkchars): New function.
4438 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
4439 (enum complete_line_internal_reason): Adjust comments.
4440 (completion_tracker::discard_completions): New.
4441 (completer_handle_brkchars_func_for_completer): Handle
4442 location_completer.
4443 (gdb_custom_word_point_brkchars)
4444 (gdb_org_rl_basic_quote_characters): New.
4445 (gdb_completion_word_break_characters_throw)
4446 (completion_find_completion_word): Handle trackers that use a
4447 custom word point.
4448 (completion_tracker::advance_custom_word_point_by): New.
4449 (completion_tracker::build_completion_result): Don't rely on
4450 readline appending the quote char.
4451 (gdb_rl_attempted_completion_function_throw): Handle trackers that
4452 use a custom word point.
4453 (gdb_rl_attempted_completion_function): Restore
4454 rl_basic_quote_characters.
4455 * completer.h (class completion_tracker): Extend intro comment.
4456 (completion_tracker::set_quote_char)
4457 (completion_tracker::quote_char)
4458 (completion_tracker::set_use_custom_word_point)
4459 (completion_tracker::use_custom_word_point)
4460 (completion_tracker::custom_word_point)
4461 (completion_tracker::set_custom_word_point)
4462 (completion_tracker::advance_custom_word_point_by)
4463 (completion_tracker::completes_to_completion_word)
4464 (completion_tracker::discard_completions): New methods.
4465 (completion_tracker::m_quote_char)
4466 (completion_tracker::m_use_custom_word_point)
4467 (completion_tracker::m_custom_word_point): New fields.
4468 (advance_to_expression_complete_word_point): Declare.
4469 * f-lang.c (f_collect_symbol_completion_matches): Add
4470 complete_symbol_mode parameter.
4471 * language.h (struct language_defn)
4472 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
4473 parameter.
4474 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
4475 (linespec_complete_function): New function.
4476 (linespec_lexer_lex_keyword): Adjust.
4477 * linespec.h (linespec_keywords, linespec_complete_function): New
4478 declarations.
4479 * location.c (find_end_quote): New function.
4480 (explicit_location_lex_one): Add explicit_completion_info
4481 parameter. Save quoting info. Don't throw if being called for
4482 completion. Don't handle Ada operators here.
4483 (is_cp_operator, skip_op_false_positives, first_of)
4484 (explicit_location_lex_one_function): New function.
4485 (string_to_explicit_location): Replace 'dont_throw' parameter with
4486 an explicit_completion_info pointer parameter. Handle it. Don't
4487 use explicit_location_lex_one to lex function names. Use
4488 explicit_location_lex_one_function instead.
4489 * location.h (struct explicit_completion_info): New.
4490 (string_to_explicit_location): Replace 'dont_throw' parameter with
4491 an explicit_completion_info pointer parameter.
4492 * symtab.c (default_collect_symbol_completion_matches_break_on):
4493 Add complete_symbol_mode parameter. Handle LINESPEC mode.
4494 (default_collect_symbol_completion_matches)
4495 (collect_symbol_completion_matches): Add complete_symbol_mode
4496 parameter.
4497 (collect_symbol_completion_matches_type): Pass down
4498 complete_symbol_mode::EXPRESSION.
4499 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4500 parameter. Handle LINESPEC mode.
4501 * symtab.h (complete_symbol_mode): New.
4502 (default_collect_symbol_completion_matches_break_on)
4503 (default_collect_symbol_completion_matches)
4504 (collect_symbol_completion_matches)
4505 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4506 parameter.
4507
4508 2017-07-17 Pedro Alves <palves@redhat.com>
4509
4510 * utils.c (enum class strncmp_iw_mode): New.
4511 (strcmp_iw): Rename to ...
4512 (strncmp_iw_with_mode): ... this. Add string2_len and mode
4513 parameters. Handle them.
4514 (strncmp_iw): New.
4515 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
4516 * utils.h (strncmp_iw): Declare.
4517 (strcmp_iw): Move describing comments here.
4518
4519 2017-07-17 Pedro Alves <palves@redhat.com>
4520
4521 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
4522 CP_OPERATOR_STR.
4523 * c-typeprint.c (is_type_conversion_operator): Use
4524 CP_OPERATOR_STR.
4525 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
4526 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
4527 CP_OPERATOR_LEN.
4528 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
4529 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
4530 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
4531 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
4532 CP_OPERATOR_STR.
4533 * location.c: Include "cp-support.h".
4534 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
4535 CP_OPERATOR_STR.
4536 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
4537 CP_OPERATOR_LEN.
4538
4539 2017-07-17 Pedro Alves <palves@redhat.com>
4540
4541 * cli/cli-cmds.c (complete_command): Use a completion tracker
4542 along with completion_find_completion_word for handle_brkchars
4543 phase.
4544 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
4545 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
4546 (struct gdb_rl_completion_word_info): New.
4547 (gdb_rl_find_completion_word): New.
4548 (completion_find_completion_word): New.
4549 * completer.h (completion_find_completion_word): Declare.
4550
4551 2017-07-17 Pedro Alves <palves@redhat.com>
4552
4553 * ada-lang.c (symbol_completion_match): Adjust comments.
4554 (symbol_completion_add): Replace vector parameter with
4555 completion_tracker parameter. Use it.
4556 (ada_make_symbol_completion_list): Rename to...
4557 (ada_collect_symbol_completion_matches): ... this. Add
4558 completion_tracker parameter and use it.
4559 (ada_language_defn): Adjust.
4560 * break-catch-syscall.c (catch_syscall_completer): Adjust
4561 prototype and work with completion_tracker instead of VEC.
4562 * breakpoint.c (condition_completer): Adjust prototype and work
4563 with completion_tracker instead of VEC.
4564 * c-lang.c (c_language_defn, cplus_language_defn)
4565 (asm_language_defn, minimal_language_defn): Adjust to renames.
4566 * cli/cli-cmds.c (complete_command): Rework using
4567 completion_tracker. Catch exceptions when completing.
4568 * cli/cli-decode.c (integer_unlimited_completer)
4569 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
4570 with completion_tracker instead of VEC.
4571 * command.h (struct completion_tracker): Forward declare.
4572 (completer_ftype, completer_handle_brkchars_ftype): Change
4573 types.
4574 (complete_on_cmdlist, complete_on_enum): Adjust.
4575 * completer.c: Include <algorithm>.
4576 (struct gdb_completer_state): New.
4577 (current_completion): New global.
4578 (readline_line_completion_function): Delete.
4579 (noop_completer, filename_completer)
4580 (filename_completer_handle_brkchars, complete_files_symbols)
4581 (linespec_location_completer): Adjust to work with a
4582 completion_tracker instead of a VEC.
4583 (string_or_empty): New.
4584 (collect_explicit_location_matches): Adjust to work with a
4585 completion_tracker instead of a VEC.
4586 (explicit_location_completer): Rename to ...
4587 (complete_explicit_location): ... this and adjust to work with a
4588 completion_tracker instead of a VEC.
4589 (location_completer): Adjust to work with a completion_tracker
4590 instead of a VEC.
4591 (add_struct_fields): Adjust to work with a completion_list instead
4592 of VEC.
4593 (expression_completer): Rename to ...
4594 (complete_expression): ... this and adjust to work with a
4595 completion_tracker instead of a VEC. Use complete_files_symbols.
4596 (expression_completer): Reimplement on top of complete_expression.
4597 (symbol_completer): Adjust to work with a completion_tracker
4598 instead of a VEC.
4599 (enum complete_line_internal_reason): Add describing comments.
4600 (complete_line_internal_normal_command): Adjust to work with a
4601 completion_tracker instead of a VEC.
4602 (complete_line_internal): Rename to ...
4603 (complete_line_internal_1): ... this and adjust to work with a
4604 completion_tracker instead of a VEC. Assert TEXT is NULL in the
4605 handle_brkchars phase.
4606 (new_completion_tracker): Delete.
4607 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
4608 complete_line_internal_1.
4609 (free_completion_tracker): Delete.
4610 (INITIAL_COMPLETION_HTAB_SIZE): New.
4611 (completion_tracker::completion_tracker)
4612 (completion_tracker::~completion_tracker): New.
4613 (maybe_add_completion): Delete.
4614 (completion_tracker::maybe_add_completion)
4615 (completion_tracker::add_completion)
4616 (completion_tracker::add_completions): New.
4617 (throw_max_completions_reached_error): Delete.
4618 (complete_line): Adjust to work with a completion_tracker instead
4619 of a VEC. Don't create a completion_tracker_t or check for max
4620 completions here.
4621 (command_completer, command_completer_handle_brkchars)
4622 (signal_completer, reg_or_group_completer_1)
4623 (reg_or_group_completer, default_completer_handle_brkchars):
4624 Adjust to work with a completion_tracker.
4625 (gdb_completion_word_break_characters_throw): New.
4626 (gdb_completion_word_break_characters): Reimplement.
4627 (line_completion_function): Delete.
4628 (completion_tracker::recompute_lowest_common_denominator)
4629 (expand_preserving_ws)
4630 (completion_tracker::build_completion_result)
4631 (completion_result::completion_result)
4632 (completion_result::completion_result)
4633 (completion_result::~completion_result)
4634 (completion_result::completion_result)
4635 (completion_result::release_match_list, compare_cstrings)
4636 (completion_result::sort_match_list)
4637 (completion_result::reset_match_list)
4638 (gdb_rl_attempted_completion_function_throw)
4639 (gdb_rl_attempted_completion_function): New.
4640 * completer.h (completion_list, struct completion_result)
4641 (class completion_tracker): New.
4642 (complete_line): Add completion_tracker parameter.
4643 (readline_line_completion_function): Delete.
4644 (gdb_rl_attempted_completion_function): New.
4645 (noop_completer, filename_completer, expression_completer)
4646 (location_completer, symbol_completer, command_completer)
4647 (signal_completer, reg_or_group_completer): Update prototypes.
4648 (completion_tracker_t, new_completion_tracker)
4649 (make_cleanup_free_completion_tracker): Delete.
4650 (enum maybe_add_completion_enum): Delete.
4651 (maybe_add_completion): Delete.
4652 (throw_max_completions_reached_error): Delete.
4653 * corefile.c (complete_set_gnutarget): Adjust to work with a
4654 completion_tracker instead of a VEC.
4655 * cp-abi.c (cp_abi_completer): Adjust to work with a
4656 completion_tracker instead of a VEC.
4657 * d-lang.c (d_language_defn): Adjust.
4658 * disasm.c (disassembler_options_completer): Adjust to work with a
4659 completion_tracker instead of a VEC.
4660 * f-lang.c (f_make_symbol_completion_list): Rename to ...
4661 (f_collect_symbol_completion_matches): ... this. Adjust to work
4662 with a completion_tracker instead of a VEC.
4663 (f_language_defn): Adjust.
4664 * go-lang.c (go_language_defn): Adjust.
4665 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
4666 Adjust to work with a completion_tracker instead of a VEC.
4667 * infrun.c (handle_completer): Likewise.
4668 * interps.c (interpreter_completer): Likewise.
4669 * interps.h (interpreter_completer): Likewise.
4670 * language.c (unknown_language_defn, auto_language_defn)
4671 (local_language_defn): Adjust.
4672 * language.h (language_defn::la_make_symbol_completion_list):
4673 Rename to ...
4674 (language_defn::la_collect_symbol_completion_matches): ... this
4675 and adjust to work with a completion_tracker instead of a VEC.
4676 * m2-lang.c (m2_language_defn): Adjust.
4677 * objc-lang.c (objc_language_defn): Adjust.
4678 * opencl-lang.c (opencl_language_defn): Adjust.
4679 * p-lang.c (pascal_language_defn): Adjust.
4680 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
4681 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
4682 with a completion_tracker.
4683 * rust-lang.c (rust_language_defn): Adjust.
4684 * symtab.c (free_completion_list, do_free_completion_list)
4685 (return_val, completion_tracker): Delete.
4686 (completion_list_add_name, completion_list_add_symbol)
4687 (completion_list_add_msymbol, completion_list_objc_symbol)
4688 (completion_list_add_fields, add_symtab_completions): Add
4689 completion_tracker parameter and use it.
4690 (default_make_symbol_completion_list_break_on_1): Rename to...
4691 (default_collect_symbol_completion_matches_break_on): ... this.
4692 Add completion_tracker parameter and use it instead of allocating
4693 a completion tracker here.
4694 (default_make_symbol_completion_list_break_on): Delete old
4695 implementation.
4696 (default_make_symbol_completion_list): Delete.
4697 (default_collect_symbol_completion_matches): New.
4698 (make_symbol_completion_list): Delete.
4699 (collect_symbol_completion_matches): New.
4700 (make_symbol_completion_type): Rename to ...
4701 (collect_symbol_completion_matches_type): ... this. Add
4702 completion_tracker parameter and use it instead of VEC.
4703 (make_file_symbol_completion_list_1): Rename to...
4704 (collect_file_symbol_completion_matches): ... this. Add
4705 completion_tracker parameter and use it instead of VEC.
4706 (make_file_symbol_completion_list): Delete.
4707 (add_filename_to_list): Use completion_list instead of a VEC.
4708 (add_partial_filename_data::list): Now a completion_list.
4709 (make_source_files_completion_list): Work with a completion_list
4710 instead of a VEC.
4711 * symtab.h: Include "completer.h".
4712 (default_make_symbol_completion_list_break_on)
4713 (default_make_symbol_completion_list, make_symbol_completion_list)
4714 (make_symbol_completion_type, make_file_symbol_completion_list)
4715 (make_source_files_completion_list): Delete.
4716 (default_collect_symbol_completion_matches_break_on)
4717 (default_collect_symbol_completion_matches)
4718 (collect_symbol_completion_matches)
4719 (collect_symbol_completion_matches_type)
4720 (collect_file_symbol_completion_matches)
4721 (make_source_files_completion_list): New.
4722 * top.c (init_main): Don't install a rl_completion_entry_function
4723 hook. Install a rl_attempted_completion_function hook instead.
4724 * tui/tui-layout.c (layout_completer): Adjust to work with a
4725 completion_tracker.
4726 * tui/tui-regs.c (tui_reggroup_completer):
4727 * tui/tui-win.c (window_name_completer, focus_completer)
4728 (winheight_completer): Adjust to work with a completion_tracker.
4729 * value.c: Include "completer.h".
4730 (complete_internalvar): Adjust to work with a completion_tracker.
4731 * value.h (complete_internalvar): Likewise.
4732
4733 2017-07-17 Pedro Alves <palves@redhat.com>
4734
4735 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4736 renames.
4737 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4738 comments to completer_ftype's declaration.
4739 <completer_handle_brkchars>: Change type to
4740 completer_handle_brkchars_ftype.
4741 * command.h (completer_ftype): Add describing comment and give
4742 names to parameters.
4743 (completer_ftype_void): Rename to ...
4744 (completer_handle_brkchars_ftype) ... this. Add describing comment.
4745 (set_cmd_completer_handle_brkchars): Adjust.
4746 * completer.c (filename_completer_handle_brkchars): New function.
4747 (complete_line_internal_normal_command): New function, factored
4748 out from ...
4749 (complete_line_internal): ... here.
4750 (command_completer_handle_brkchars)
4751 (default_completer_handle_brkchars)
4752 (completer_handle_brkchars_func_for_completer): New functions.
4753 * completer.h (set_gdb_completion_word_break_characters): Delete
4754 declaration.
4755 (completer_handle_brkchars_func_for_completer): New declaration.
4756 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4757 completer_handle_brkchars_func_for_completer.
4758
4759 2017-07-17 Pedro Alves <palves@redhat.com>
4760
4761 * completer.c (symbol_completer): New function, based on
4762 make_symbol_completion_list_fn.
4763 * completer.h (symbol_completer): New declaration.
4764 * guile/scm-cmd.c (cmdscm_completers): Adjust.
4765 * python/py-cmd.c (completers): Adjust.
4766 * symtab.c (make_symbol_completion_list_fn): Delete.
4767 * symtab.h (make_symbol_completion_list_fn): Delete.
4768 * cli/cli-decode.c (add_cmd): Adjust.
4769
4770 2017-07-17 Pedro Alves <palves@redhat.com>
4771
4772 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4773 * dwarf2read.c: Include "filename-seen-cache.h".
4774 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
4775 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
4776 * filename-seen-cache.c: New file.
4777 * filename-seen-cache.h: New file.
4778 * symtab.c: Include "filename-seen-cache.h".
4779 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
4780 (create_filename_seen_cache, clear_filename_seen_cache)
4781 (delete_filename_seen_cache, filename_seen): Delete, parts moved
4782 to filename-seen-cache.h/filename-seen-cache.c.
4783 (output_source_filename, sources_info)
4784 (maybe_add_partial_symtab_filename)
4785 (make_source_files_completion_list): Adjust to use
4786 filename_seen_cache.
4787
4788 2017-07-17 Pedro Alves <palves@redhat.com>
4789
4790 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
4791 fields.
4792 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
4793 dwarf2_debug_sections*)): New.
4794 (dwarf2_per_objfile::dwarf2_per_objfile(const
4795 dwarf2_per_objfile&)): Declare as deleted.
4796 (dwarf2_per_objfile::operator=): Declare as deleted.
4797 (dwarf2_per_objfile::dwarf2_per_objfile)
4798 (dwarf2_per_objfile::~dwarf2_per_objfile)
4799 (dwarf2_per_objfile::free_cached_comp_units): New.
4800 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
4801 ctor. Call dwarf2_per_objfile's ctor manually.
4802 (dwarf2_locate_sections): Deleted/refactored as ...
4803 (dwarf2_per_objfile::locate_sections): ... this new method.
4804 (free_cached_comp_units): Defer to
4805 dwarf2_per_objfile::free_cached_comp_units.
4806 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
4807
4808 2017-07-14 Tom Tromey <tom@tromey.com>
4809
4810 PR rust/21764:
4811 * rust-exp.y (convert_ast_to_expression): Add "want_type"
4812 parameter.
4813 <UNOP_SIZEOF>: Split into separate case.
4814 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
4815
4816 2017-07-14 Tom Tromey <tom@tromey.com>
4817
4818 PR rust/21763:
4819 * symtab.c (symbol_matches_domain): Add language_rust to special
4820 case.
4821 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
4822 treat LOC_TYPEDEF symbols as variables.
4823
4824 2017-07-14 Pedro Alves <palves@redhat.com>
4825
4826 * symtab.c (make_file_symbol_completion_list_1): Iterate over
4827 symtabs matching all symtabs with SRCFILE as file name instead of
4828 only considering the first hit, with lookup_symtab.
4829
4830 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4831
4832 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
4833 operator_name parameters.
4834 (gen_expr): Update function call.
4835
4836 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4837
4838 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
4839 parameter.
4840 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
4841 Likewise.
4842 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
4843 parameter, use agent_expr::gdbarch instead, update function
4844 calls.
4845 (locexpr_tracepoint_var_ref): Likewise.
4846 (loclist_tracepoint_var_ref): Likewise.
4847 * ax-gdb.c (gen_trace_static_fields): Likewise.
4848 (gen_traced_pop): Likewise.
4849 (gen_frame_args_address): Likewise.
4850 (gen_frame_locals_address): Likewise.
4851 (gen_var_ref): Likewise.
4852 (gen_struct_ref_recursive): Likewise.
4853 (gen_static_field): Likewise.
4854 (gen_maybe_namespace_elt): Likewise.
4855 (gen_expr): Likewise.
4856 (gen_trace_for_var): Likewise.
4857 (gen_trace_for_expr): Likewise.
4858 (gen_trace_for_return_address): Likewise.
4859
4860 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4861
4862 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
4863 parameter.
4864 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
4865
4866 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4867
4868 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
4869 from ax, update calls.
4870 (gen_usual_arithmetic): Likewise.
4871 (gen_integral_promotions): Likewise.
4872 (gen_bitfield_ref): Likewise.
4873 (gen_primitive_field): Likewise.
4874 (gen_struct_ref_recursive): Likewise.
4875 (gen_struct_ref): Likewise.
4876 (gen_maybe_namespace_elt): Likewise.
4877 (gen_struct_elt_for_reference): Likewise.
4878 (gen_namespace_elt): Likewise.
4879 (gen_aggregate_elt_ref): Likewise.
4880 (gen_expr): Get gdbarch from ax, update calls.
4881 (gen_expr_binop_rest): Likewise.
4882
4883 2017-07-13 Pedro Alves <palves@redhat.com>
4884
4885 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
4886 as default tdesc.
4887 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
4888 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
4889 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
4890 tdesc_amd64_linux as default tdesc. Get final tdesc from the
4891 tdep.
4892 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
4893 Get final tdesc from the tdep.
4894 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
4895 default tdesc.
4896 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4897 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4898 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
4899 Use it as default tdesc.
4900 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
4901 down to amd_init_abi. No longer handle fallback tdesc here.
4902 * amd64-tdep.h (tdesc_x32): Declare.
4903 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
4904 parameter.
4905 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
4906 as default tdesc.
4907
4908 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4909
4910 * s390-linux-tdep.c (s390_process_record): Add support for
4911 instructions new in arch12.
4912
4913 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4914
4915 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
4916 PT_GETFSBASE and PT_GETGSBASE.
4917 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
4918 PT_SETGSBASE.
4919
4920 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4921
4922 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
4923 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
4924 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
4925 those rules.
4926 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
4927 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
4928 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
4929 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
4930 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
4931 * features/i386/amd64.xml: Add 64bit-segments.xml.
4932 * features/i386/amd64-avx-avx512.c: Regenerated.
4933 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
4934 * features/i386/amd64-avx-mpx.c: Regenerated.
4935 * features/i386/amd64-avx.c: Regenerated.
4936 * features/i386/amd64-mpx.c: Regenerated.
4937 * features/i386/amd64.c: Regenerated.
4938 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
4939 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4940 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
4941 * regformats/i386/amd64-avx.dat: Regenerated.
4942 * regformats/i386/amd64-mpx.dat: Regenerated.
4943 * regformats/i386/amd64.dat: Regenerated.
4944
4945 2017-07-10 Yao Qi <yao.qi@linaro.org>
4946
4947 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4948 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4949
4950 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
4951
4952 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
4953 unsetenv.
4954 * gnulib/aclocal.m4: Regenerate.
4955 * gnulib/config.in: Regenerate.
4956 * gnulib/configure: Regenerate.
4957 * gnulib/import/Makefile.am: Regenerate.
4958 * gnulib/import/Makefile.in: Regenerate.
4959 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4960 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4961 * gnulib/import/m4/environ.m4: New file.
4962 * gnulib/import/m4/setenv.m4: New file.
4963 * gnulib/import/setenv.c: New file.
4964 * gnulib/import/unsetenv.c: New file.
4965
4966 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
4967
4968 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
4969 address when op is DW_OP_addr.
4970
4971 2017-07-09 Tom Tromey <tom@tromey.com>
4972
4973 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
4974 check and apply to outer type.
4975
4976 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4977
4978 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
4979 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
4980 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
4981 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
4982
4983 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4984
4985 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
4986
4987 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4988
4989 * corelow.c (get_core_siginfo): Remove.
4990 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
4991 instead of get_core_siginfo.
4992 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
4993 * gdbarch.h: Re-generate.
4994 * gdbarch.c: Re-generate.
4995 * linux-tdep.c (linux_core_xfer_siginfo): New.
4996 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
4997
4998 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4999
5000 * corelow.c (thread_section_name): Move to ...
5001 * gdbcore.h (thread_section_name): ... here.
5002
5003 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5004
5005 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
5006 (struct siginfo32): New.
5007 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
5008 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
5009 via ptrace(PT_LWPINFO).
5010
5011 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5012
5013 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
5014 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
5015 (fbsd_get_siginfo_type): New.
5016 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
5017 (_initialize_fbsd_tdep): New.
5018
5019 2017-07-06 David Blaikie <dblaikie@gmail.com>
5020
5021 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
5022 a singular dwo_unit*) to support multiple CUs in the same way that
5023 multiple TUs are supported.
5024 (create_cus_hash_table): Replace create_dwo_cu with a function for
5025 parsing multiple CUs from a DWO file.
5026 (open_and_init_dwo_file): Use create_cus_hash_table rather than
5027 create_dwo_cu.
5028 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
5029 htab_find, rather than comparing the signature to a singleton CU in
5030 the dwo_file.
5031
5032 2017-07-06 Pedro Alves <palves@redhat.com>
5033
5034 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
5035
5036 2017-07-04 Pedro Alves <palves@redhat.com>
5037
5038 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
5039 * gdbtypes.h (TYPE_STATIC): Delete.
5040 (struct fn_field) <is_public, is_abstract, is_static, is_final,
5041 is_synchronized, is_native>: Delete.
5042 <dummy>: Bump.
5043 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
5044 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
5045 (TYPE_FN_FIELD_ABSTRACT): Delete.
5046
5047 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
5048
5049 * buffer.h (buffer_finish): Fix spelling mistakes.
5050
5051 2017-07-01 Eli Zaretskii <eliz@gnu.org>
5052
5053 * .dir-locals.el: Automatically switch to C-style comments in
5054 versions of Emacs that support the feature.
5055
5056 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5057 Pedro Alves <palves@redhat.com>
5058
5059 PR cli/21688
5060 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5061 (process_next_line): New variable 'inline_cmd'.
5062 Adjust 'if' clauses for "python", "compile" and "guile" to use
5063 'command_name_equals' and check for '!inline_cmd'.
5064
5065 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5066
5067 PR cli/21688
5068 * cli/cli-script.c (command_name_equals_not_inline): New function.
5069 (process_next_line): Adjust 'if' clauses for "python", "compile"
5070 and "guile" to use command_name_equals_not_inline.
5071
5072 2017-06-29 Pedro Alves <palves@redhat.com>
5073
5074 * completer.c (expression_completer): Call
5075 linespec_location_completer instead of location_completer.
5076
5077 2017-06-29 Pedro Alves <palves@redhat.com>
5078
5079 * completer.c (expression_completer): Remove code that recomputes
5080 'text' from 'word'.
5081
5082 2017-06-29 Yao Qi <yao.qi@linaro.org>
5083
5084 * regformats/regdat.sh: Generate code with
5085 "ifndef IN_PROCESS_AGENT".
5086
5087 2017-06-28 Pedro Alves <palves@redhat.com>
5088
5089 * command.h: Include "common/scoped_restore.h".
5090
5091 2017-06-28 Yao Qi <yao.qi@linaro.org>
5092
5093 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5094 instead of obstack_grow.
5095
5096 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
5097
5098 PR gdb/21337
5099 * symfile.c (reread_symbols): Call objfiles_changed just before
5100 read_symbols.
5101
5102 2017-06-27 Pedro Alves <palves@redhat.com>
5103
5104 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5105 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5106 (completion_list_add_symbol, completion_list_add_msymbol):
5107 ... these new functions.
5108 (add_symtab_completions)
5109 (default_make_symbol_completion_list_break_on_1): Adjust.
5110
5111 2017-06-27 Pedro Alves <palves@redhat.com>
5112
5113 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5114 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
5115 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5116 dtor.
5117 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
5118 'storage_obstack' field an auto_obstack. In-class initialize all
5119 non-bitfield fields. Make minsyms_read bool.
5120 * symfile.c (read_symbols): Adjust.
5121
5122 2017-06-27 Alan Hayward <alan.hayward@arm.com>
5123
5124 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5125 (gdbsim_store_register): Likewise.
5126
5127 2017-06-27 Pedro Alves <palves@redhat.com>
5128
5129 * c-exp.y (name_obstack): Now an auto_obstack.
5130 (yylex): Use auto_obstack::clear.
5131 (c_parse): Use auto_obstack::clear instead of reinitializing and
5132 freeing the obstack.
5133 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5134 * d-exp.y (name_obstack): Now an auto_obstack.
5135 (yylex): Use auto_obstack::clear.
5136 (d_parse): Use auto_obstack::clear instead of reinitializing and
5137 freeing the obstack.
5138 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
5139 auto_obstack.
5140 * dwarf2read.c (create_addrmap_from_index)
5141 (dwarf2_build_psymtabs_hard)
5142 (update_enumeration_type_from_children): Likewise.
5143 * gdb_obstack.h (auto_obstack): New type.
5144 * go-exp.y (name_obstack): Now an auto_obstack.
5145 (build_packaged_name): Use auto_obstack::clear.
5146 (go_parse): Use auto_obstack::clear instead of reinitializing and
5147 freeing the obstack.
5148 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
5149 auto_obstack.
5150 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
5151 * rust-exp.y (work_obstack): Now an auto_obstack.
5152 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
5153 reinitializing and freeing the obstack.
5154 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
5155 (host_char_to_target): Use auto_obstack.
5156 * utils.h (make_cleanup_obstack_free): Delete declaration.
5157 * valprint.c (generic_emit_char, generic_printstr): Use
5158 auto_obstack.
5159
5160 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
5161
5162 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
5163 thread.
5164 (darwin_init_thread_list): Don't update dummy thread.
5165 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
5166
5167 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5168
5169 * record-full.c (netorder16): Remove.
5170
5171 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5172
5173 * common/diagnostics.h: Define macros for GCC.
5174 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
5175 * common/vec.h: Include diagnostics.h.
5176 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
5177 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
5178 warning.
5179
5180 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5181
5182 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5183 New macro.
5184 * ada-lex.l: Ignore deprecated register warnings.
5185
5186 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5187
5188 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5189 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5190
5191 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5192
5193 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5194 its own line.
5195
5196 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5197
5198 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5199
5200 2017-06-23 Alan Hayward <alan.hayward@arm.com>
5201
5202 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5203 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5204 (xtensa_register_read_masked): Likewise.
5205
5206 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
5207
5208 * common/environ.c (gdb_environ::unset): Update comment.
5209
5210 2017-06-22 Alan Hayward <alan.hayward@arm.com>
5211
5212 * python/py-unwind.c (pyuw_sniffer): Allocate space for
5213 registers.
5214
5215 2017-06-22 Alan Hayward <alan.hayward@arm.com>
5216
5217 * record-full.c (record_full_exec_insn): Use byte_vector.
5218
5219 2017-06-22 Yao Qi <yao.qi@linaro.org>
5220
5221 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5222 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5223
5224 2017-06-22 Alan Hayward <alan.hayward@arm.com>
5225
5226 * remote.c (cached_reg): Move from here...
5227 * regcache.h (cached_reg): ...to here.
5228 * python/py-unwind.c (struct reg_info): Remove.
5229 (cached_frame_info): Use cached_reg_t.
5230 (pyuw_prev_register): Likewise.
5231 (pyuw_sniffer): Use cached_reg_t and allocate registers.
5232 (pyuw_dealloc_cache): Free all registers.
5233
5234 2017-06-22 Pedro Alves <palves@redhat.com>
5235 Simon Marchi <simon.marchi@ericsson.com>
5236
5237 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5238 warning.
5239 * common/diagnostics.h: New file.
5240
5241 2017-06-22 Pedro Alves <palves@redhat.com>
5242
5243 * common/agent.h: Add include guards.
5244
5245 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
5246
5247 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
5248 talk about addressable units instead of bytes.
5249
5250 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5251
5252 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
5253 of '::const_iterator'.
5254
5255 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5256
5257 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5258 'unittests/environ-selftests.c'.
5259 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
5260 * charset.c (find_charset_names): Declare object 'iconv_env'.
5261 Update code to use 'iconv_env' object. Remove call to
5262 'free_environ'.
5263 * common/environ.c: Include <utility>.
5264 (make_environ): Delete function.
5265 (free_environ): Delete function.
5266 (gdb_environ::clear): New function.
5267 (gdb_environ::operator=): New function.
5268 (gdb_environ::get): Likewise.
5269 (environ_vector): Delete function.
5270 (set_in_environ): Delete function.
5271 (gdb_environ::set): New function.
5272 (unset_in_environ): Delete function.
5273 (gdb_environ::unset): New function.
5274 (gdb_environ::envp): Likewise.
5275 * common/environ.h: Include <vector>.
5276 (struct gdb_environ): Delete; transform into...
5277 (class gdb_environ): ... this class.
5278 (free_environ): Delete prototype.
5279 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
5280 environ_vector): Likewise.
5281 * infcmd.c (run_command_1): Update code to call
5282 'envp' from 'gdb_environ' class.
5283 (environment_info): Update code to call methods from 'gdb_environ'
5284 class.
5285 (unset_environment_command): Likewise.
5286 (path_info): Likewise.
5287 (path_command): Likewise.
5288 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
5289 (inferior::inferior): Initialize 'environment' using the host's
5290 information.
5291 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
5292 Include "environ.h".
5293 (class inferior) <environment>: Change type from 'struct
5294 gdb_environ' to 'gdb_environ'.
5295 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
5296 methods from 'gdb_environ' class.
5297 * solib.c (solib_find_1): Likewise
5298 * unittests/environ-selftests.c: New file.
5299
5300 2017-06-20 Yao Qi <yao.qi@linaro.org>
5301
5302 * features/i386/i386-linux.xml: Exchange the order of including
5303 32bit-linux.xml and 32bit-sse.xml.
5304 * features/i386/i386-linux.c: Regenerated.
5305
5306 2017-06-20 Yao Qi <yao.qi@linaro.org>
5307
5308 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
5309 Delete copy ctor and assignment operator.
5310 (tdesc_type): Likewise.
5311 (tdesc_feature): Likewise.
5312 (tdesc_free_reg): Remove.
5313 (tdesc_create_reg): Use new.
5314 (tdesc_free_type): Remove.
5315 (tdesc_create_vector): Use new.
5316 (tdesc_create_union): Likewise.
5317 (tdesc_create_flags): Likewise.
5318 (tdesc_create_enum): Likewise.
5319 (tdesc_free_feature): Delete.
5320 (free_target_description): Use delete.
5321
5322 2017-06-19 John Baldwin <jhb@FreeBSD.org>
5323
5324 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
5325 registers.
5326
5327 2017-06-19 Pedro Alves <palves@redhat.com>
5328
5329 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
5330 after gdb::unlinker.
5331
5332 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
5333
5334 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
5335 gdb_environ to access an environment variable.
5336
5337 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
5338
5339 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
5340 gdb_byte*.
5341
5342 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5343
5344 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
5345
5346 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5347
5348 * configure: Re-generate.
5349 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
5350
5351 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5352
5353 * configure: Re-generate.
5354 * warning.m4: Pass -Werror to compiler when checking for
5355 supported warning flags.
5356
5357 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5358
5359 * Makefile.in (COMPILE.pre): Add "-x c++".
5360
5361 2017-06-16 Alan Hayward <alan.hayward@arm.com>
5362 Pedro Alves <palves@redhat.com>
5363 Yao Qi <yao.qi@linaro.org>
5364
5365 * defs.h (RequireLongest): New.
5366 (extract_integer): Declare function template.
5367 (extract_signed_integer): Remove the declaration, but define it
5368 static inline.
5369 (extract_unsigned_integer): Likewise.
5370 (store_integer): Declare function template.
5371 (store_signed_integer): Remove the declaration, but define it
5372 static inline.
5373 (store_unsigned_integer): Likewise.
5374 * findvar.c (extract_integer): New function template.
5375 (extract_signed_integer): Remove.
5376 (extract_unsigned_integer): Remove.
5377 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
5378 instantiations.
5379 (store_integer): New function template.
5380 (store_signed_integer): Remove.
5381 (store_unsigned_integer): Remove.
5382 (store_integer): Explicit instantiations.
5383 * regcache.c (regcache_raw_read_signed): Update.
5384 (regcache::raw_read): New function.
5385 (regcache::raw_read_signed): Remove.
5386 (regcache::raw_read_unsigned): Remove.
5387 (regcache_raw_read_unsigned): Update.
5388 (regcache_raw_write_unsigned): Update.
5389 (regcache::raw_write_signed): Remove.
5390 (regcache::raw_write): New function.
5391 (regcache_cooked_read_signed): Update.
5392 (regcache::raw_write_unsigned): Remove.
5393 (regcache::cooked_read_signed): Remove.
5394 (regcache_cooked_read_unsigned): Update.
5395 (regcache::cooked_read_unsigned): Remove.
5396 (regcache_cooked_write_signed): Update.
5397 (regcache_cooked_write_unsigned): Update.
5398 * regcache.h (regcache) <raw_read_signed>: Remove.
5399 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
5400 <raw_read, raw_write>: New.
5401 <cooked_read_signed, cooked_write_signed>: Remove.
5402 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
5403 <cooked_read, cooked_write>: New.
5404 * sh64-tdep.c (sh64_pseudo_register_read): Update.
5405 (sh64_pseudo_register_write): Update.
5406
5407 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
5408
5409 * arc-tdep.c (arc_disassembler_options): New variable.
5410 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
5411 of default_print_insn.
5412 (arc_delayed_print_insn): Set info->section when needed,
5413 use default_print_insn to retrieve a disassembler.
5414
5415 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
5416
5417 PR gdb/21574
5418 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
5419 to mention $SHELL and startup-with-shell.
5420
5421 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
5422
5423 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
5424
5425 2017-06-14 Yao Qi <yao.qi@linaro.org>
5426
5427 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
5428 default_print_insn instead of print_insn_aarch64.
5429 * arm-tdep.c (gdb_print_insn_arm): Call
5430 default_print_insn instead of print_insn_big_arm
5431 and print_insn_little_arm.
5432 * i386-tdep.c (i386_print_insn): Call default_print_insn
5433 instead of print_insn_i386.
5434 * ia64-tdep.c (ia64_print_insn): Call
5435 default_print_insn instead of print_insn_ia64.
5436 * mips-tdep.c (gdb_print_insn_mips): Call
5437 default_print_insn instead of print_insn_big_mips
5438 and print_insn_little_mips.
5439 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
5440 instead of print_insn_spu.
5441
5442 2017-06-14 Pedro Alves <palves@redhat.com>
5443
5444 * ada-lang.c: Include "common/byte-vector.h".
5445 (ada_value_primitive_packed_val): Use gdb::byte_vector.
5446 * charset.c (wchar_iterator::iterate): Resize the vector instead
5447 of reserving it.
5448 * common/byte-vector.h: Include "common/def-vector.h".
5449 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
5450 * cli/cli-dump.c: Include "common/byte-vector.h".
5451 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
5452 * common/byte-vector.h: New file.
5453 * common/def-vector.h: New file.
5454 * common/default-init-alloc.h: New file.
5455 * dwarf2loc.c: Include "common/byte-vector.h".
5456 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
5457 instead of reserving it.
5458 * dwarf2read.c: Include "common/byte-vector.h".
5459 (data_buf::m_vec): Now a gdb::byte_vector.
5460 * gdb_regex.c: Include "common/def-vector.h".
5461 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
5462 * mi/mi-main.c: Include "common/byte-vector.h".
5463 (mi_cmd_data_read_memory): Use gdb::byte_vector.
5464 * printcmd.c: Include "common/byte-vector.h".
5465 (print_scalar_formatted): Use gdb::byte_vector.
5466 * valprint.c: Include "common/byte-vector.h".
5467 (maybe_negate_by_bytes, print_decimal_chars): Use
5468 gdb::byte_vector.
5469
5470 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5471
5472 * darwin-nat.c: Include "nat/fork-inferior.h".
5473
5474 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5475
5476 * configure.nat: Factor out Darwin bits that are not
5477 architecture-specific. Add fork-inferior.o.
5478
5479 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5480
5481 * configure.nat: Factor out AIX bits that are not
5482 architecture-specific. Add fork-inferior.o.
5483
5484 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5485
5486 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
5487 (read_pieced_value, write_pieced_value): ...here. Reduce to
5488 wrappers that just call rw_pieced_value.
5489
5490 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5491
5492 * dwarf2loc.c (write_pieced_value): When writing the data for a
5493 memory piece, use write_memory_with_notification instead of
5494 write_memory.
5495
5496 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5497
5498 * valops.c (read_value_memory): Change embedded_offset to
5499 represent a bit offset instead of a byte offset.
5500 * value.h (read_value_memory): Adjust comment.
5501
5502 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5503
5504 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
5505 dest_offset_bits and source_offset_bits.
5506 (write_pieced_value): Likewise.
5507
5508 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5509
5510 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
5511 given by DW_OP_bit_piece.
5512 (write_pieced_value): Likewise.
5513
5514 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5515
5516 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
5517 some other preparations to the places where sufficient information
5518 is available.
5519 (write_pieced_value): Likewise.
5520
5521 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5522
5523 * dwarf2loc.c (bits_to_bytes): New function.
5524 (read_pieced_value): Fix offset calculations for register pieces
5525 on big-endian targets.
5526 (write_pieced_value): Likewise.
5527
5528 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5529
5530 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
5531 (write_pieced_value): Likewise.
5532
5533 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5534
5535 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
5536 transfer the source value's least significant bits, instead of its
5537 lowest-addressed ones. Rename type_len to max_offset.
5538 (read_pieced_value): Mirror above changes to write_pieced_value as
5539 applicable.
5540
5541 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5542
5543 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
5544 truncate full bytes from dest_offset_bits before using it as an
5545 offset into the buffer.
5546
5547 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5548
5549 * dwarf2loc.c (write_pieced_value): Include transfer size in
5550 byte-wise check.
5551
5552 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5553
5554 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
5555 calculation of this_size.
5556
5557 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5558
5559 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
5560 when targeting a bit-field.
5561 (write_pieced_value): Likewise.
5562
5563 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5564
5565 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
5566 (allocate_piece_closure): Drop addr_size parameter.
5567 (dwarf2_evaluate_loc_desc_full): Adjust call to
5568 allocate_piece_closure.
5569
5570 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5571
5572 PR gdb/21226
5573 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
5574 the LSB end, independent of endianness.
5575
5576 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5577
5578 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
5579 size capping.
5580
5581 2017-06-13 Yao Qi <yao.qi@linaro.org>
5582
5583 * mips-linux-nat.c: Move include features/mips*-linux.c to
5584 mips-linux-tdep.c.
5585 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
5586 to mips-linux-tdep.c.
5587 * mips-linux-tdep.c: Include features/mips*-linux.c
5588 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
5589 functions.
5590 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
5591 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
5592 (tdesc_mips64_dsp_linux): Declare.
5593
5594 2017-06-12 Tom Tromey <tom@tromey.com>
5595
5596 * valprint.h (val_print_type_code_int): Remove.
5597 * valprint.c (generic_val_print_int): Always call
5598 val_print_scalar_formatted.
5599 (val_print_type_code_int): Remove.
5600 * printcmd.c (print_scalar_formatted): Handle options->format==0.
5601 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
5602 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
5603 * ada-valprint.c (ada_val_print_num): Use
5604 val_print_scalar_formatted.
5605
5606 2017-06-12 Tom Tromey <tom@tromey.com>
5607
5608 * printcmd.c (print_scalar_formatted): Unify the two switches.
5609 Don't convert scalars to LONGEST.
5610
5611 2017-06-12 Tom Tromey <tom@tromey.com>
5612
5613 PR exp/16225:
5614 * valprint.h (print_decimal_chars): Update.
5615 * valprint.c (maybe_negate_by_bytes): New function.
5616 (print_decimal_chars): Add "is_signed" argument.
5617 * printcmd.c (print_scalar_formatted): Update.
5618
5619 2017-06-12 Tom Tromey <tom@tromey.com>
5620
5621 PR exp/16225:
5622 * valprint.h (print_binary_chars, print_hex_chars): Update.
5623 * valprint.c (val_print_type_code_int): Update.
5624 (print_binary_chars): Add "zero_pad" argument.
5625 (emit_octal_digit): New function.
5626 (print_octal_chars): Don't zero-pad.
5627 (print_decimal_chars): Likewise.
5628 (print_hex_chars): Add "zero_pad" argument.
5629 * sh64-tdep.c (sh64_do_fp_register): Update.
5630 * regcache.c (regcache::dump): Update.
5631 * printcmd.c (print_scalar_formatted): Update.
5632 * infcmd.c (default_print_one_register_info): Update.
5633
5634 2017-06-12 Pedro Alves <palves@redhat.com>
5635 Alan Hayward <alan.hayward@arm.com>
5636
5637 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
5638 (mips_eabi_push_dummy_call): Rename local 'regsize' to
5639 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
5640 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
5641 Assert that abi_regsize bytes fit in 'ref_valbuf'.
5642
5643 2017-06-12 Pedro Alves <palves@redhat.com>
5644
5645 * dwarf2read.c (mapped_symtab::data): Now a vector of
5646 symtab_index_entry instead of vector of
5647 std::unique_ptr<symtab_index_entry>. All users adjusted to check
5648 whether an element's name is NULL instead of checking whether the
5649 element itself is NULL.
5650 (find_slot): Change return type. Adjust.
5651 (hash_expand, , add_index_entry, uniquify_cu_indices)
5652 (write_hash_table): Adjust.
5653
5654 2017-06-12 Pedro Alves <palves@redhat.com>
5655
5656 * dwarf2read.c (recursively_count_psymbols): New function.
5657 (write_psymtabs_to_index): Call it to compute number of psyms and
5658 pass estimate size of psyms_seen to unordered_set's ctor.
5659
5660 2017-06-12 Pedro Alves <palves@redhat.com>
5661
5662 * dwarf2read.c (write_hash_table): Check if key already exists
5663 before emplacing.
5664
5665 2017-06-12 Pedro Alves <palves@redhat.com>
5666
5667 * dwarf2read.c (data_buf::append_space): Rename to...
5668 (data_buf::grow): ... this, and make private. Adjust all callers.
5669 (data_buf::append_uint): New method.
5670 (add_address_entry, write_one_signatured_type)
5671 (write_psymtabs_to_index): Use it.
5672
5673 2017-06-12 Pedro Alves <palves@redhat.com>
5674
5675 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
5676 (file_write (FILE *, const std::vector<Elem>&)): Delete.
5677 (data_buf::file_write): Call ::fwrite directly.
5678
5679 2017-06-12 Pedro Alves <palves@redhat.com>
5680
5681 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
5682 std::vector::erase.
5683
5684 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5685
5686 Code cleanup: C++ify .gdb_index producer.
5687 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5688 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5689 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5690 (create_strtab, add_string): Remove.
5691 (file_write, data_buf): New.
5692 (struct symtab_index_entry): Use std::vector for cu_indices.
5693 (struct mapped_symtab): Use std::vector for data.
5694 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5695 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5696 Remove.
5697 (find_slot): Change return type. Update it to the new data structures.
5698 (hash_expand, add_index_entry): Update it to the new data structures.
5699 (offset_type_compare): Remove.
5700 (uniquify_cu_indices): Update it to the new data structures.
5701 (c_str_view, c_str_view_hasher, vector_hasher): New.
5702 (add_indices_to_cpool): Remove.
5703 (write_hash_table): Update it to the new data structures.
5704 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5705 (eq_psymtab_cu_index): Remove.
5706 (psym_index_map): New typedef.
5707 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5708 reference and std::unordered_map for cu_index_htab.
5709 (add_address_entry, add_address_entry_worker, write_address_map)
5710 (write_psymbols): Update it to the new data structures.
5711 (write_obstack): Remove.
5712 (struct signatured_type_index_data): Change types_list to a data_buf
5713 reference and psyms_seen to a std::unordered_set reference.
5714 (write_one_signatured_type, recursively_write_psymbols)
5715 (write_psymtabs_to_index): Update it to the new data structures.
5716
5717 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
5718
5719 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5720 separate-debug-file commands.
5721 * symfile.h (separate_debug_file_debug): New global.
5722 * symfile.c (separate_debug_file_debug): New global.
5723 (separate_debug_file_exists, find_separate_debug_file): Add
5724 debug output.
5725 (_initialize_symfile): Add "set debug separate-debug-file"
5726 command.
5727 * build-id.c (build_id_to_debug_bfd,
5728 find_separate_debug_file_by_buildid): Add debug output.
5729
5730 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5731
5732 * gdbarch.sh (displaced_step_free_closure): Remove.
5733 * gdbarch.h, gdbarch.c: Re-generate.
5734 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5735 displaced_step_free_closure.
5736 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5737 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5738 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5739 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5740 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5741 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5742 * arch-utils.h (simple_displaced_step_free_closure): Remove.
5743 * arch-utils.c (simple_displaced_step_free_closure): Remove.
5744 * infrun.c (displaced_step_clear): Call xfree instead of
5745 gdbarch_displaced_step_free_closure.
5746
5747 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
5748
5749 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5750 NULL".
5751
5752 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5753
5754 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5755 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5756 (mn10300_push_dummy_call): Likewise.
5757
5758 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5759
5760 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5761
5762 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5763
5764 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5765
5766 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5767
5768 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5769 able to start inferiors using a shell.
5770 (New remote packets): Announce new packet "QStartupWithShell".
5771 * remote.c: Add PACKET_QStartupWithShell.
5772 (extended_remote_create_inferior): Handle new
5773 PACKET_QStartupWithShell.
5774 (remote_protocol_features) <QStartupWithShell>: New entry for
5775 PACKET_QStartupWithShell.
5776 (_initialize_remote): Call "add_packet_config_cmd" for
5777 QStartupShell.
5778
5779 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5780 Pedro Alves <palves@redhat.com>
5781
5782 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
5783 and "nat/fork-inferior.h".
5784 * common/common-inferior.h: New file, with contents from
5785 "gdb/inferior.h".
5786 * commom/common-utils.c: Include "common-utils.h".
5787 (stringify_argv): New function.
5788 * common/common-utils.h (stringify_argv): New prototype.
5789 * configure.nat: Add "fork-inferior.o" as a dependency for
5790 "*linux*", "fbsd*" and "nbsd*" hosts.
5791 * corefile.c (get_exec_file): Update comment.
5792 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
5793 instead of "startup_inferior".
5794 (darwin_create_inferior): Call "add_thread_silent" after
5795 "fork_inferior".
5796 * fork-child.c: Cleanup unnecessary includes.
5797 (SHELL_FILE): Move to "common/common-fork-child.c".
5798 (environ): Likewise.
5799 (exec_wrapper): Initialize.
5800 (get_exec_wrapper): New function.
5801 (breakup_args): Move to "common/common-fork-child.c"; rename to
5802 "breakup_args_for_exec".
5803 (escape_bang_in_quoted_argument): Move to
5804 "common/common-fork-child.c".
5805 (saved_ui): New variable.
5806 (prefork_hook): New function.
5807 (postfork_hook): Likewise.
5808 (postfork_child_hook): Likewise.
5809 (gdb_startup_inferior): Likewise.
5810 (fork_inferior): Move to "common/common-fork-child.c". Update
5811 function to support gdbserver.
5812 (startup_inferior): Likewise.
5813 * gdbcore.h (get_exec_file): Remove declaration.
5814 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
5815 instead of "startup_inferior". Call "add_thread_silent" after
5816 "fork_inferior".
5817 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
5818 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
5819 instead of "startup_inferior". Call "add_thread_silent" after
5820 "fork_inferior".
5821 * inferior.h: Include "common-inferior.h".
5822 (trace_start_error): Move to "common/common-utils.h".
5823 (trace_start_error_with_name): Likewise.
5824 (fork_inferior): Move prototype to "nat/fork-inferior.h".
5825 (startup_inferior): Likewise.
5826 (gdb_startup_inferior): New prototype.
5827 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
5828 * nat/fork-inferior.h: New file.
5829 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
5830 instead of "startup_inferior". Call "add_thread_silent" after
5831 "fork_inferior".
5832 * target.h (target_terminal_init): Move prototype to
5833 "target/target.h".
5834 (target_terminal_inferior): Likewise.
5835 (target_terminal_ours): Likewise.
5836 * target/target.h (target_terminal_init): New prototype, moved
5837 from "target.h".
5838 (target_terminal_inferior): Likewise.
5839 (target_terminal_ours): Likewise.
5840 * utils.c (gdb_flush_out_err): New function.
5841
5842 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5843
5844 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
5845 * common/common-gdbthread.h: New file, with parts from
5846 "gdb/gdbthread.h".
5847 * gdbthread.h: Include "common-gdbthread.h".
5848 (switch_to_thread): Moved to "common/common-gdbthread.h".
5849
5850 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5851
5852 * Makefile.in (SFILES): Add "common/job-control.c".
5853 (HFILES_NO_SRCDIR): Add "common/job-control.h".
5854 (COMMON_OBS): Add "job-control.o".
5855 * common/job-control.c: New file, with contents from
5856 "gdb/inflow.c".
5857 * common/job-control.h: New file, with contents from "terminal.h".
5858 * fork-child.c: Include "job-control.h".
5859 * inflow.c: Include "job-control.h".
5860 (gdb_setpgid): Move to "common/common-inflow.c".
5861 (_initialize_inflow): Move setting of "job_control" to
5862 "handle_job_control".
5863 * terminal.h (job_control): Moved to "common/common-terminal.h".
5864 (gdb_setpgid): Likewise.
5865 * top.c: Include "job_control.h".
5866 * utils.c: Likewise.
5867 (job_control): Moved to "job-control.c".
5868
5869 2017-06-07 Pedro Alves <palves@redhat.com>
5870
5871 * Makefile.in (SFILES): Add gdb_regex.c.
5872 (COMMON_OBS): Add gdb_regex.o.
5873 * ada-lang.c (ada_add_standard_exceptions)
5874 (ada_add_exceptions_from_frame, name_matches_regex)
5875 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
5876 parameter type to compiled_regex. Adjust.
5877 (ada_exceptions_list): Use compiled_regex.
5878 * break-catch-throw.c (exception_catchpoint::pattern): Now a
5879 std::unique_ptr<compiled_regex>.
5880 (exception_catchpoint::~exception_catchpoint): Remove regfree
5881 call.
5882 (check_status_exception_catchpoint): Adjust to use compiled_regex.
5883 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
5884 * breakpoint.c (solib_catchpoint::compiled): Now a
5885 std::unique_ptr<compiled_regex>.
5886 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
5887 (check_status_catch_solib): Adjust to use compiled_regex.
5888 (add_solib_catchpoint): Adjust to use compiled_regex.
5889 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
5890 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
5891 compiled_regex reference. Adjust to use it.
5892 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
5893 declaration. Include "gdb_regex.h".
5894 (apropos_cmd): Change regex parameter to compiled_regex reference.
5895 * gdb_regex.c: New file.
5896 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
5897 declarations.
5898 (class compiled_regex): New.
5899 * linux-tdep.c: Include "common/gdb_optional.h".
5900 (struct mapping_regexes): New, factored out from
5901 mapping_is_anonymous_p, and adjusted to use compiled_regex.
5902 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
5903 gdb::optional and remove cleanups. Adjust to compiled_regex.
5904 * probe.c: Include "common/gdb_optional.h".
5905 (collect_probes): Use compiled_regex and gdb::optional and remove
5906 cleanups.
5907 * skip.c: Include "common/gdb_optional.h".
5908 (skiplist_entry::compiled_function_regexp): Now a
5909 gdb::optional<compiled_regex>.
5910 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
5911 (free_skiplist_entry): Remove regfree call.
5912 (compile_skip_regexp, skip_rfunction_p): Adjust to use
5913 compiled_regex and gdb::optional.
5914 * symtab.c: Include "common/gdb_optional.h".
5915 (search_symbols): Use compiled_regex and gdb::optional.
5916 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
5917 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
5918 to gdb_regex.c.
5919
5920 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5921
5922 * regcache.c (regcache::save): Avoid buffer use.
5923 (regcache::dump): Likewise.
5924
5925 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5926
5927 * sh-tdep.c (sh_pseudo_register_read): Remove
5928 MAX_REGISTER_SIZE.
5929 (sh_pseudo_register_write): Likewise.
5930 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
5931 (sh64_pseudo_register_write): Likewise
5932
5933 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5934
5935 * aarch64-tdep.c (aarch64_store_return_value): Use
5936 V_REGISTER_SIZE.
5937 (aarch64_pseudo_read_value): Likewise.
5938 (aarch64_pseudo_write): Likewise.
5939
5940 2017-06-06 Yao Qi <yao.qi@linaro.org>
5941
5942 * regformats/regdef.h (set_register_cache): Remove the
5943 declaration.
5944
5945 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5946
5947 * frame.c (frame_unwind_register_signed): Use
5948 frame_unwind_register_value.
5949
5950 2017-06-06 Pedro Alves <palves@redhat.com>
5951
5952 PR breakpoints/21553
5953 * breakpoint.c (create_breakpoints_sal_default)
5954 (init_breakpoint_sal, create_breakpoint_sal): Use
5955 gdb::unique_xmalloc_ptr for string parameters.
5956 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5957 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
5958 (base_breakpoint_create_breakpoints_sal)
5959 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
5960 (strace_marker_create_breakpoints_sal)
5961 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
5962 string parameters.
5963 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
5964 gdb::unique_xmalloc_ptr for string parameters.
5965 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5966 parameters.
5967
5968 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5969
5970 * alpha-tdep.c (alpha_register_to_value): Use
5971 get_frame_register_value.
5972 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
5973
5974 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5975
5976 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
5977 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
5978 (ia64_value_to_register): Likewise.
5979 (ia64_extract_return_value): Likewise.
5980 (ia64_store_return_value): Likewise.
5981 (ia64_push_dummy_call): Likewise.
5982
5983 2017-06-04 Joel Brobecker <brobecker@adacore.com>
5984
5985 GDB 8.0 released.
5986
5987 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
5988
5989 * x86-linux-nat.c (struct arch_lwp_info): Remove.
5990
5991 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
5992
5993 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
5994 parameter.
5995 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
5996
5997 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
5998
5999 * event-loop.c (poll_timers): Unallocate timer using delete
6000 instead of xfree.
6001
6002 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6003
6004 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
6005 (struct breakpoint) <~breakpoint>: New.
6006 (struct watchpoint): Inherit from breakpoint.
6007 <~watchpoint>: New.
6008 <base>: Remove.
6009 (struct tracepoint): Inherit from breakpoint.
6010 <base>: Remove.
6011 * breakpoint.c (longjmp_breakpoint_ops): Remove.
6012 (struct longjmp_breakpoint): Inherit from breakpoint.
6013 <~longjmp_breakpoint>: New.
6014 <base>: Remove.
6015 (new_breakpoint_from_type): Remove casts.
6016 (watchpoint_in_thread_scope): Remove reference to base field.
6017 (watchpoint_del_at_next_stop): Likewise.
6018 (update_watchpoint): Likewise.
6019 (watchpoint_check): Likewise.
6020 (bpstat_check_watchpoint): Likewise.
6021 (set_longjmp_breakpoint): Likewise.
6022 (struct fork_catchpoint): Inherit from breakpoint.
6023 <base>: Remove.
6024 (struct solib_catchpoint): Inherit from breakpoint.
6025 <~solib_catchpoint>: New.
6026 <base>: Remove.
6027 (dtor_catch_solib): Change to ...
6028 (solib_catchpoint::~solib_catchpoint): ... this.
6029 (breakpoint_hit_catch_solib): Remove reference to base field.
6030 (add_solib_catchpoint): Likewise.
6031 (create_fork_vfork_event_catchpoint): Likewise.
6032 (struct exec_catchpoint): Inherit from breakpoint.
6033 <~exec_catchpoint>: New.
6034 <base>: Remove.
6035 (dtor_catch_exec): Change to ...
6036 (exec_catchpoint::~exec_catchpoint): ... this.
6037 (dtor_watchpoint): Change to ...
6038 (watchpoint::~watchpoint): ... this.
6039 (watch_command_1): Remove reference to base field.
6040 (catch_exec_command_1): Likewise.
6041 (base_breakpoint_dtor): Change to ...
6042 (breakpoint::~breakpoint): ... this.
6043 (base_breakpoint_ops): Remove dtor field value.
6044 (longjmp_bkpt_dtor): Change to ...
6045 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
6046 (strace_marker_create_breakpoints_sal): Remove reference to base
6047 field.
6048 (delete_breakpoint): Don't manually call breakpoint destructor.
6049 (create_tracepoint_from_upload): Remove reference to base field.
6050 (trace_pass_set_count): Likewise.
6051 (initialize_breakpoint_ops): Don't initialize
6052 momentary_breakpoint_ops, don't set dtors.
6053 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6054 <~ada_catchpoint>: New.
6055 <base>: Remove.
6056 (create_excep_cond_exprs): Remove reference to base field.
6057 (dtor_exception): Change to ...
6058 (ada_catchpoint::~ada_catchpoint): ... this.
6059 (dtor_catch_exception): Remove.
6060 (dtor_catch_exception_unhandled): Remove.
6061 (dtor_catch_assert): Remove.
6062 (create_ada_exception_catchpoint): Remove reference to base
6063 field.
6064 (initialize_ada_catchpoint_ops): Don't set dtors.
6065 * break-catch-sig.c (struct signal_catchpoint): Inherit from
6066 breakpoint.
6067 <~signal_catchpoint>: New.
6068 <base>: Remove.
6069 (signal_catchpoint_dtor): Change to ...
6070 (signal_catchpoint::~signal_catchpoint): ... this.
6071 (create_signal_catchpoint): Remove reference to base field.
6072 (initialize_signal_catchpoint_ops): Don't set dtor.
6073 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6074 from breakpoint.
6075 <~syscall_catchpoint>: New.
6076 <base>: Remove.
6077 (dtor_catch_syscall): Change to ...
6078 (syscall_catchpoint::~syscall_catchpoint): ... this.
6079 (create_syscall_event_catchpoint): Remove reference to base
6080 field.
6081 (initialize_syscall_catchpoint_ops): Don't set dtor.
6082 * break-catch-throw.c (struct exception_catchpoint): Inherit
6083 from breakpoint.
6084 <~exception_catchpoint>: New.
6085 <base>: Remove.
6086 (dtor_exception_catchpoint): Change to ...
6087 (exception_catchpoint::~exception_catchpoint): ... this.
6088 (handle_gnu_v3_exceptions): Remove reference to base field.
6089 (initialize_throw_catchpoint_ops): Don't set dtor.
6090 * ctf.c (ctf_get_traceframe_address): Remove reference to base
6091 field.
6092 * remote.c (remote_get_tracepoint_status): Likewise.
6093 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6094 * tracefile.c (tracefile_fetch_registers): Likewise.
6095 * tracepoint.c (actions_command): Likewise.
6096 (validate_actionline): Likewise.
6097 (tfind_1): Likewise.
6098 (get_traceframe_location): Likewise.
6099 (find_matching_tracepoint_location): Likewise.
6100 (parse_tracepoint_status): Likewise.
6101 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6102
6103 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6104
6105 * breakpoint.c (struct longjmp_breakpoint): New struct.
6106 (is_tracepoint_type): Change return type to bool.
6107 (is_longjmp_type): New function.
6108 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6109 (set_raw_breakpoint_without_location): Use
6110 new_breakpoint_from_type.
6111 (set_raw_breakpoint): Likewise.
6112
6113 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6114
6115 * breakpoint.c (new_breakpoint_from_type): New function.
6116 (create_breakpoint_sal): Use new_breakpoint_from_type and
6117 unique_ptr.
6118 (create_breakpoint): Likewise.
6119
6120 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
6121
6122 * memattr.c (mem_info_command): Rename to ...
6123 (info_mem_command): ... this.
6124 (mem_enable_command): Rename to ...
6125 (enable_mem_command): ... this.
6126 (mem_disable_command): Rename to ...
6127 (disable_mem_command): ... this.
6128 (mem_delete_command): Rename to ...
6129 (delete_mem_command): ... this.
6130 (_initialize_mem): Adjust function names.
6131
6132 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6133
6134 * btrace.c (handle_pt_insn_events): New.
6135 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
6136 STATUS. Split into this and ...
6137 (handle_pt_insn_event_flags): ... this.
6138
6139 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6140
6141 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
6142 and struct pt_insn.resynced.
6143 * configure: Regenerated.
6144 * config.in: Regenerated.
6145
6146 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6147
6148 * btrace.c (ftrace_find_call_by_number): New function.
6149 (ftrace_new_function): Store objects, not pointers.
6150 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
6151 ftrace_new_gap, ftrace_update_function,
6152 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
6153 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
6154 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
6155 btrace_ends_with_single_insn, btrace_call_get): Account for
6156 btrace_thread_info::functions now storing objects.
6157 * btrace.h (struct btrace_thread_info): Add constructor.
6158 (struct btrace_thread_info) <functions>: Make std::vector.
6159 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
6160 Initialize with default values.
6161 * record-btrace.c (record_btrace_frame_sniffer): Account for
6162 btrace_thread_info::functions now storing objects.
6163
6164 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6165
6166 * btrace.c: Remove typedef bfun_s.
6167 (ftrace_new_gap): Directly add gaps to the list of gaps.
6168 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
6169 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
6170 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
6171 instead of gdb VEC.
6172
6173 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6174
6175 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
6176 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
6177 with btrace_thread_info::next_segment and
6178 btrace_thread_info::prev_segment.
6179 * btrace.h: Remove struct btrace_func_link.
6180 (struct btrace_function): Replace pair of function segment pointers
6181 with pair of indices.
6182 * python/py-record-btrace.c (btpy_call_prev_sibling,
6183 btpy_call_next_sibling): Replace references to
6184 btrace_thread_info::segment with btrace_thread_info::next_segment and
6185 btrace_thread_info::prev_segment.
6186 * record-btrace.c (record_btrace_frame_this_id): Use
6187 btrace_find_call_by_number.
6188
6189 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6190
6191 * btrace.c (ftrace_new_function, ftrace_fixup_level,
6192 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6193 btrace_insn_next, btrace_insn_prev): Remove references to
6194 btrace_thread_info::flow.
6195 * btrace.h (struct btrace_function): Remove FLOW.
6196
6197 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6198
6199 * btrace.c (ftrace_find_call_by_number): New function.
6200 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6201 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6202 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6203 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6204 index.
6205 * btrace.h (struct btrace_function): Turn UP into an index.
6206 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6207 as an index.
6208 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6209 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6210 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6211
6212 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6213
6214 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6215 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6216 ftrace_update_function, ftrace_compute_global_level_offset,
6217 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6218 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6219 btrace_insn_end, btrace_is_empty): Remove references to
6220 btrace_thread_info::begin and btrace_thread_info::end.
6221 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6222 (struct btrace_thread_info) <functions>: Adjust comment.
6223 * record-btrace.c (record_btrace_start_replaying): Remove reference to
6224 btrace_thread_info::begin.
6225
6226 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6227
6228 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6229 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6230 ftrace_update_function): Remove arguments that implicitly were always
6231 BTINFO->END.
6232 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6233 Don't pass BTINFO->END.
6234
6235 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6236
6237 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6238 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6239 btrace_find_insn_by_number): Replace function segment pointer with
6240 index.
6241 (btrace_insn_cmp): Simplify.
6242 * btrace.h: (struct btrace_insn_iterator) Rename index to
6243 insn_index. Replace function segment pointer with index into function
6244 segment vector.
6245 * record-btrace.c (record_btrace_call_history): Replace function
6246 segment pointer use with index.
6247 (record_btrace_frame_sniffer): Retrieve function call segment through
6248 vector.
6249 (record_btrace_set_replay): Remove defunc't safety check.
6250
6251 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6252
6253 * btrace.c (btrace_ends_with_single_insn): New function.
6254 (btrace_call_get, btrace_call_number, btrace_call_begin,
6255 btrace_call_end, btrace_call_next, btrace_call_prev,
6256 btrace_find_call_by_number): Use index into call segment vector
6257 instead of pointer.
6258 (btrace_call_cmp): Simplify.
6259 * btrace.h (struct btrace_call_iterator): Replace function call segment
6260 pointer with index into vector.
6261 * record-btrace.c (record_btrace_call_history): Use index instead of
6262 pointer.
6263
6264 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6265
6266 * btrace.c (btrace_insn_begin, btrace_insn_end,
6267 btrace_find_insn_by_number): Add btinfo to iterator.
6268 * btrace.h (struct btrace_insn_iterator): Add btinfo.
6269
6270 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6271
6272 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
6273 and save pointers directly.
6274 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
6275 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
6276 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
6277 changed signature of functions.
6278 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
6279 (btrace_fetch): Remove code that adds btrace_function pointers to
6280 vector of btrace_functions.
6281 (btrace_clear): Simplify freeing vector of btrace_functions.
6282
6283 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6284
6285 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
6286 Replace VEC_* with std::vector functions.
6287 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
6288 (struct btrace_thread_info)<functions>: Change type to std::vector.
6289
6290 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
6291
6292 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
6293 "Removed targets and native configurations" up. Merge duplicate
6294 "New commands" sub-sections. Add "New options" sub-sections.
6295
6296 2017-05-26 Alan Hayward <alan.hayward@arm.com>
6297
6298 * defs.h (copy_integer_to_size): New declaration.
6299 * findvar.c (copy_integer_to_size): New function.
6300 (do_cint_test): New selftest function.
6301 (copy_integer_to_size_test): Likewise.
6302 (_initialize_findvar): Likewise.
6303 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
6304 (mips_fbsd_collect_reg): Use raw_collect_integer.
6305 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
6306 (mips64_fill_gregset): Use raw_collect_integer
6307 (mips64_fill_fpregset): Use raw_supply_integer.
6308 * regcache.c (regcache::raw_supply_integer): New function.
6309 (regcache::raw_collect_integer): Likewise.
6310 * regcache.h: (regcache::raw_supply_integer): New declaration.
6311 (regcache::raw_collect_integer): Likewise.
6312
6313 2017-05-24 Yao Qi <yao.qi@linaro.org>
6314
6315 * Makefile.in (SFILES): Add gdbarch-selftests.c.
6316 (COMMON_OBS): Add gdbarch-selftests.o.
6317 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
6318 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
6319 * gdbarch-selftests.c: New file.
6320 * regcache.h (regcache) <~regcache>: Mark it virtual if
6321 GDB_SELF_TEST.
6322 <raw_write>: Likewise.
6323
6324 2017-05-24 Yao Qi <yao.qi@linaro.org>
6325
6326 * regcache.c (current_regcache): Change it to
6327 regcache::current_regcache.
6328 (regcache_observer_target_changed): Update.
6329 (regcache_thread_ptid_changed): Make it a regcache static
6330 method.
6331 (regcache_thread_ptid_changed): Update.
6332 (class regcache_access): New.
6333 (current_regcache_test): Update.
6334 (_initialize_regcache): Update.
6335 * regcache.h: Include forward_list.
6336 (regcache): Declare regcache_thread_ptid_changed and declare
6337 registers_changed_ptid as friend.
6338
6339 2017-05-24 Yao Qi <yao.qi@linaro.org>
6340
6341 * i387-tdep.c (i387_register_to_value): Use register_size
6342 instead of TYPE_LENGTH.
6343 * m68k-tdep.c (m68k_register_to_value): Likewise.
6344
6345 2017-05-24 Yao Qi <yao.qi@linaro.org>
6346
6347 * i387-tdep.c (i387_convert_register_p): Return false if type
6348 code isn't TYPE_CODE_FLT.
6349
6350 2017-05-24 Yao Qi <yao.qi@linaro.org>
6351
6352 * alpha-tdep.c (alpha_convert_register_p): Return true if type
6353 length is 4.
6354 (alpha_register_to_value): Remove type length check.
6355 (alpha_value_to_register): Likewise.
6356
6357 2017-05-24 Yao Qi <yao.qi@linaro.org>
6358
6359 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
6360 TYPE_CODE_FLT.
6361
6362 2017-05-24 Yao Qi <yao.qi@linaro.org>
6363
6364 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
6365 TYPE_CODE_FLT or not.
6366
6367 2017-05-24 Yao Qi <yao.qi@linaro.org>
6368
6369 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
6370 * avr-tdep.c (avr_gdbarch_init): Likewise.
6371 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6372 * cris-tdep.c (cris_gdbarch_init): Likewise.
6373 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6374 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6375 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6376 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
6377 * mep-tdep.c (mep_gdbarch_init): Likewise.
6378 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6379 * mips-tdep.c (mips_gdbarch_init): Likewise.
6380 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6381 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6382 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6383 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6384 * v850-tdep.c (v850_gdbarch_init): Likewise.
6385
6386 2017-05-24 Yao Qi <yao.qi@linaro.org>
6387
6388 * selftest-arch.c (tests_with_arch): Call registers_changed
6389 and reinit_frame_cache.
6390 * selftest.c (run_self_tests): Likewise.
6391
6392 2017-05-24 Yao Qi <yao.qi@linaro.org>
6393
6394 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
6395 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
6396
6397 2017-05-24 Yao Qi <yao.qi@linaro.org>
6398
6399 * rl78-tdep.c (rl78_gdbarch_init): Don't call
6400 set_gdbarch_print_insn.
6401
6402 2017-05-24 Yao Qi <yao.qi@linaro.org>
6403
6404 * h8300-tdep.c (h8300_gdbarch_init): Don't call
6405 set_gdbarch_print_insn.
6406
6407 2017-05-24 Yao Qi <yao.qi@linaro.org>
6408
6409 * alpha-tdep.c (alpha_gdbarch_init): Don't call
6410 set_gdbarch_print_insn.
6411 * arc-tdep.c (arc_gdbarch_init): Likewise.
6412 * arch-utils.c: include dis-asm.h.
6413 (default_print_insn): New function.
6414 * arch-utils.h (default_print_insn): Declare.
6415 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
6416 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6417 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
6418 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
6419 * frv-tdep.c (frv_gdbarch_init): Likewise.
6420 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6421 * gdbarch.sh (print_insn): Use default_print_insn.
6422 * gdbarch.c: Regenerated.
6423 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
6424 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
6425 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6426 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
6427 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6428 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
6429 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
6430 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
6431 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
6432 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6433 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6434 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6435 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6436 * mt-tdep.c (mt_gdbarch_init): Likewise.
6437 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6438 * nios2-tdep.c (nios2_print_insn): Remove.
6439 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
6440 * rx-tdep.c (rx_gdbarch_init): Likewise.
6441 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6442 * score-tdep.c (score_print_insn): Remove.
6443 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
6444 * sh-tdep.c (sh_gdbarch_init): Likewise.
6445 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6446 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6447 * tic6x-tdep.c (tic6x_print_insn): Remove.
6448 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
6449 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
6450 * v850-tdep.c (v850_gdbarch_init): Likewise.
6451 * vax-tdep.c (vax_gdbarch_init): Likewise.
6452 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6453 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
6454
6455 2017-05-23 John Baldwin <jhb@FreeBSD.org>
6456
6457 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
6458 (MIPS_FP0_REGNUM): Remove.
6459 (MIPS_FSR_REGNUM): Remove.
6460 (mips_fbsd_supply_fpregs): Use mips_regnum.
6461 (mips_fbsd_supply_gregs): Likewise.
6462 (mips_fbsd_collect_fpregs): Likewise.
6463 (mips_fbsd_collect_gregs): Likewise.
6464
6465 2017-05-23 John Baldwin <jhb@FreeBSD.org>
6466
6467 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
6468 (getpfpregs_supplies): New function.
6469 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
6470 getfpregs_supplies.
6471 (mips_fbsd_store_inferior_registers): Likewise.
6472
6473 2017-05-22 Pedro Alves <palves@redhat.com>
6474
6475 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
6476 maintainer.
6477
6478 2017-05-22 Alan Hayward <alan.hayward@arm.com>
6479
6480 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
6481 (store_register): Likewise.
6482 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
6483 (get_decimal_float_return_value): Likewise.
6484 (do_ppc_sysv_return_value): Likewise.
6485 (ppc64_sysv_abi_push_integer): Likewise.
6486 (ppc64_sysv_abi_push_freg): Likewise.
6487 (ppc64_sysv_abi_return_value_base): Likewise.
6488 (ppc64_sysv_abi_return_value): Likewise.
6489 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
6490 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
6491 * rs6000-nat.c: Likewise.
6492 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
6493 (rs6000_value_to_register): Likewise.
6494 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
6495
6496 2017-05-21 Tom Tromey <tom@tromey.com>
6497
6498 PR rust/21466:
6499 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
6500 arrays as "[T]", not "[T; ]".
6501
6502 2017-05-19 Tom Tromey <tom@tromey.com>
6503
6504 PR rust/21484:
6505 * rust-lang.c (exp_descriptor_rust): New function.
6506 (rust_language_defn): Use it.
6507 * p-lang.c (pascal_language_defn): Update.
6508 * opencl-lang.c (opencl_language_defn): Update.
6509 * objc-lang.c (objc_language_defn): Update.
6510 * m2-lang.c (m2_language_defn): Update.
6511 * language.h (struct language_defn)
6512 <la_watch_location_expression>: New member.
6513 * language.c (unknown_language_defn, auto_language_defn)
6514 (local_language_defn): Update.
6515 * go-lang.c (go_language_defn): Update.
6516 * f-lang.c (f_language_defn): Update.
6517 * d-lang.c (d_language_defn): Update.
6518 * c-lang.h (c_watch_location_expression): Declare.
6519 * c-lang.c (c_watch_location_expression): New function.
6520 (c_language_defn, cplus_language_defn, asm_language_defn)
6521 (minimal_language_defn): Use it.
6522 * breakpoint.c (watch_command_1): Call
6523 la_watch_location_expression.
6524 * ada-lang.c (ada_language_defn): Update.
6525
6526 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6527
6528 PR tui/21482
6529 * gdb_curses.h (NOMACROS): Define.
6530 (NCURSES_NOMACROS): Define.
6531
6532 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6533
6534 PR tui/21482
6535 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
6536 arg to char *.
6537 * tui/tui-wingeneral.c (box_win): Likewise.
6538 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
6539 (tui_show_source_line): Likewise.
6540 (tui_show_exec_info_content): Likewise.
6541
6542 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6543
6544 * sparc-tdep.c (sparc_structure_return_p)
6545 (sparc_arg_on_registers_p): New functions.
6546 (sparc32_store_arguments): Use them.
6547 * sparc64-tdep.c (sparc64_16_byte_align_p)
6548 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
6549 Handle TYPE_CODE_ARRAY.
6550
6551 2017-05-17 Yao Qi <yao.qi@linaro.org>
6552
6553 * cli/cli-decode.c (add_alias_cmd): New function.
6554 * command.h (add_alias_cmd): Declare.
6555 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
6556 instead call add_alias_cmd.
6557
6558 2017-05-17 Pedro Alves <palves@redhat.com>
6559
6560 * Makefile.in (nat_extra_makefile_frag): Rename to ...
6561 (nat_makefile_frag): ... this. All references updated.
6562 * configure.ac: Likewise.
6563 * configure.nat: Likewise. Enhance comments.
6564 * configure: Regenerate.
6565
6566 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6567
6568 * procfs.c (procfs_create_inferior): Change prototype to match
6569 definition.
6570
6571 2017-05-13 Eli Zaretskii <eliz@gnu.org>
6572
6573 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
6574 C++ compiler warning.
6575
6576 2017-05-12 Tom Tromey <tom@tromey.com>
6577
6578 PR rust/21483:
6579 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
6580 recurse, just call value_struct_elt directly.
6581
6582 2017-05-12 Tom Tromey <tom@tromey.com>
6583
6584 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
6585 OP_RUST_ARRAY>: Fix.
6586
6587 2017-05-12 Tom Tromey <tom@tromey.com>
6588
6589 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
6590
6591 2017-05-09 Yao Qi <yao.qi@linaro.org>
6592
6593 * regcache.c: Include <forward_list>.
6594 (struct regcache_list): Remove.
6595 (current_regcache): Update.
6596 (get_thread_arch_aspace_regcache): Update for std::forward_list.
6597 (regcache_thread_ptid_changed): Likewise.
6598 (registers_changed_ptid): Likewise.
6599 (current_regcache_size): Likewise.
6600
6601 2017-05-09 Yao Qi <yao.qi@linaro.org>
6602
6603 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
6604 (current_regcache_size): New function.
6605 (current_regcache_test): New function.
6606 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
6607
6608 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6609
6610 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
6611 (print_gp_register_row): Use get_frame_register_value.
6612
6613 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6614
6615 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
6616 (mips_supply_fpregset): Likewise.
6617 (mips64_supply_gregset): Likewise.
6618
6619 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6620
6621 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
6622 regcache->raw_supply_zeroed.
6623
6624 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6625
6626 * configure.nat: Rearrange 'case' statements to match
6627 host before cpu.
6628
6629 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6630
6631 * Makefile.in: Remove "@host_makefile_frag@". Add variables
6632 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
6633 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
6634 "@nat_extra_makefile_frag@".
6635 (Makefile): Remove dependency on "@frags@".
6636 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
6637 (data-directory/Makefile): Likewise.
6638 * config/aarch64/linux.mh: Deleted; moved contents to
6639 "gdb/configure.nat".
6640 * config/alpha/alpha-linux.mh: Likewise.
6641 * config/alpha/nbsd.mh: Likewise.
6642 * config/arm/linux.mh: Likewise.
6643 * config/arm/nbsdelf.mh: Likewise.
6644 * config/i386/cygwin.mh: Likewise.
6645 * config/i386/cygwin64.mh: Likewise.
6646 * config/i386/darwin.mh: Likewise.
6647 * config/i386/fbsd.mh: Likewise.
6648 * config/i386/fbsd64.mh: Likewise.
6649 * config/i386/go32.mh: Likewise.
6650 * config/i386/i386gnu.mh: Likewise.
6651 * config/i386/i386sol2.mh: Likewise.
6652 * config/i386/linux.mh: Likewise.
6653 * config/i386/linux64.mh: Likewise.
6654 * config/i386/mingw.mh: Likewise.
6655 * config/i386/mingw64.mh: Likewise.
6656 * config/i386/nbsd64.mh: Likewise.
6657 * config/i386/nbsdelf.mh: Likewise.
6658 * config/i386/nto.mh: Likewise.
6659 * config/i386/obsd.mh: Likewise.
6660 * config/i386/obsd64.mh: Likewise.
6661 * config/i386/sol2-64.mh: Likewise.
6662 * config/ia64/linux.mh: Likewise.
6663 * config/m32r/linux.mh: Likewise.
6664 * config/m68k/linux.mh: Likewise.
6665 * config/m68k/nbsdelf.mh: Likewise.
6666 * config/m68k/obsd.mh: Likewise.
6667 * config/m88k/obsd.mh: Likewise.
6668 * config/mips/fbsd.mh: Likewise.
6669 * config/mips/linux.mh: Likewise.
6670 * config/mips/nbsd.mh: Likewise.
6671 * config/mips/obsd64.mh: Likewise.
6672 * config/pa/linux.mh: Likewise.
6673 * config/pa/nbsd.mh: Likewise.
6674 * config/pa/obsd.mh: Likewise.
6675 * config/powerpc/aix.mh: Likewise.
6676 * config/powerpc/fbsd.mh: Likewise.
6677 * config/powerpc/linux.mh: Likewise.
6678 * config/powerpc/nbsd.mh: Likewise.
6679 * config/powerpc/obsd.mh: Likewise.
6680 * config/powerpc/ppc64-linux.mh: Likewise.
6681 * config/powerpc/spu-linux.mh: Likewise.
6682 * config/s390/linux.mh: Likewise.
6683 * config/sh/nbsd.mh: Likewise.
6684 * config/sparc/fbsd.mh: Likewise.
6685 * config/sparc/linux.mh: Likewise.
6686 * config/sparc/linux64.mh: Likewise.
6687 * config/sparc/nbsd64.mh: Likewise.
6688 * config/sparc/nbsdelf.mh: Likewise.
6689 * config/sparc/obsd64.mh: Likewise.
6690 * config/sparc/sol2.mh: Likewise.
6691 * config/tilegx/linux.mh: Likewise.
6692 * config/vax/nbsdelf.mh: Likewise.
6693 * config/vax/obsd.mh: Likewise.
6694 * config/xtensa/linux.mh: Likewise.
6695 * config/i386/i386gnu.mn: New file, with excerpts from
6696 "config/i386/i386gnu.mh".
6697 * configure: Regenerate.
6698 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6699 *.mh files under "gdb/config".
6700 * configure.nat: New file, with contents from the
6701 "gdb/config/*/*.mh" files.
6702
6703 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
6704
6705 * btrace.c (btrace_clear): Free insn vector.
6706
6707 2017-05-05 Pedro Alves <palves@redhat.com>
6708
6709 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6710 * configure: Regenerate.
6711
6712 2017-05-04 Pedro Alves <palves@redhat.com>
6713
6714 * Makefile.in (SFILES): Add progspace-and-thread.c.
6715 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6716 (COMMON_OBS): Add progspace-and-thread.o.
6717 * breakpoint.c: Include "progspace-and-thread.h".
6718 (update_inserted_breakpoint_locations)
6719 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6720 Use scoped_restore_current_pspace_and_thread.
6721 (create_std_terminate_master_breakpoint): Use
6722 scoped_restore_current_program_space.
6723 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6724 (print_breakpoint_location): Use
6725 scoped_restore_current_program_space.
6726 (bp_loc_is_permanent): Use
6727 scoped_restore_current_pspace_and_thread.
6728 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6729 (download_tracepoint_locations): Use
6730 scoped_restore_current_pspace_and_thread.
6731 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6732 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6733 (enum step_over_calls_kind): Moved from inferior.h.
6734 (class scoped_restore_current_thread): New class.
6735 * gdbthread.h (make_cleanup_restore_current_thread): Delete
6736 declaration.
6737 (scoped_restore_current_thread): New class.
6738 * infcmd.c: Include "common/gdb_optional.h".
6739 (continue_1, proceed_after_attach): Use
6740 scoped_restore_current_thread.
6741 (notice_new_inferior): Use scoped_restore_current_thread.
6742 * inferior.c: Include "progspace-and-thread.h".
6743 (restore_inferior, save_current_inferior): Delete.
6744 (add_inferior_command, clone_inferior_command): Use
6745 scoped_restore_current_pspace_and_thread.
6746 * inferior.h (scoped_restore_current_inferior): New class.
6747 * infrun.c: Include "progspace-and-thread.h" and
6748 "common/gdb_optional.h".
6749 (follow_fork_inferior): Use
6750 scoped_restore_current_pspace_and_thread.
6751 (scoped_restore_exited_inferior): New class.
6752 (handle_vfork_child_exec_or_exit): Use
6753 scoped_restore_exited_inferior,
6754 scoped_restore_current_pspace_and_thread,
6755 scoped_restore_current_thread and scoped_restore.
6756 (fetch_inferior_event): Use scoped_restore_current_thread.
6757 * linespec.c (decode_line_full, decode_line_1): Use
6758 scoped_restore_current_program_space.
6759 * mi/mi-main.c: Include "progspace-and-thread.h".
6760 (exec_continue): Use scoped_restore_current_thread.
6761 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6762 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6763 * proc-service.c (ps_pglobal_lookup): Use
6764 scoped_restore_current_program_space.
6765 * progspace-and-thread.c: New file.
6766 * progspace-and-thread.h: New file.
6767 * progspace.c (release_program_space, clone_program_space): Use
6768 scoped_restore_current_program_space.
6769 (restore_program_space, save_current_program_space)
6770 (save_current_space_and_thread): Delete.
6771 (switch_to_program_space_and_thread): Moved to
6772 progspace-and-thread.c.
6773 * progspace.h (save_current_program_space)
6774 (save_current_space_and_thread): Delete declarations.
6775 (scoped_restore_current_program_space): New class.
6776 * remote.c (remote_btrace_maybe_reopen): Use
6777 scoped_restore_current_thread.
6778 * symtab.c: Include "progspace-and-thread.h".
6779 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
6780 * thread.c (print_thread_info_1): Use
6781 scoped_restore_current_thread.
6782 (struct current_thread_cleanup): Delete.
6783 (do_restore_current_thread_cleanup)
6784 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
6785 (scoped_restore_current_thread::~scoped_restore_current_thread):
6786 ... this new dtor.
6787 (make_cleanup_restore_current_thread): Rename/convert to ...
6788 (scoped_restore_current_thread::scoped_restore_current_thread):
6789 ... this new ctor.
6790 (thread_apply_all_command): Use scoped_restore_current_thread.
6791 (thread_apply_command): Use scoped_restore_current_thread.
6792 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
6793 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
6794
6795 2017-05-04 Pedro Alves <palves@redhat.com>
6796
6797 * thread.c (make_cleanup_restore_current_thread): Move
6798 find_thread_ptid call before the is_stopped call. Assert that the
6799 thread is found. Replace is_stopped call by checking the thread's
6800 state directly. Remove unnecessary NULL-thread check.
6801
6802 2017-05-04 Pedro Alves <palves@redhat.com>
6803
6804 * corelow.c (thread_section_name): New class.
6805 (get_core_register_section, get_core_siginfo): Use it.
6806
6807 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
6808
6809 * corelow.c (sniff_core_bfd): Remove extra semicolon.
6810 (get_core_register_section): Remove xfree of NULL pointer.
6811
6812 2017-05-03 Alan Hayward <alan.hayward@arm.com>
6813
6814 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
6815 * regcache.c (regcache::raw_supply_zeroed): New function.
6816 * regcache.h (regcache::raw_supply_zeroed): New declaration.
6817
6818 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
6819
6820 * gdbarch.sh: Remove commented out definition of
6821 TARGET_CHAR_BIT.
6822 * gdbarch.h: Re-generate.
6823
6824 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6825
6826 * configure: Regenerate.
6827
6828 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
6829
6830 * solib-target.c (solib_target_relocate_section_addresses):
6831 Remove num_section_bases, num_bases, segment_bases variables.
6832
6833 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6834
6835 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
6836
6837 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6838
6839 * solib-target.c: Include <vector>
6840 (struct lm_info_target) <~lm_info_target>: Remove.
6841 <segment_bases, section_bases>: Change type to
6842 std::vector<CORE_ADDR>.
6843 (library_list_start_segment, library_list_start_section,
6844 library_list_end_library,
6845 solib_target_relocate_section_addresses): Adjust.
6846
6847 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6848
6849 * gdbarch.sh (software_single_step): Change return type to
6850 std::vector<CORE_ADDR>.
6851 * gdbarch.c, gdbarch.h: Re-generate.
6852 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
6853 Adjust.
6854 (arm_deal_with_atomic_sequence_raw): Adjust.
6855 (thumb_get_next_pcs_raw): Adjust.
6856 (arm_get_next_pcs_raw): Adjust.
6857 (arm_get_next_pcs): Adjust.
6858 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
6859 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
6860 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
6861 (alpha_software_single_step): Adjust.
6862 * alpha-tdep.h (alpha_software_single_step): Adjust.
6863 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
6864 * arm-tdep.c (arm_software_single_step): Adjust.
6865 (arm_breakpoint_kind_from_current_state): Adjust.
6866 * arm-tdep.h (arm_software_single_step): Adjust.
6867 * breakpoint.c (insert_single_step_breakpoint): Adjust.
6868 * cris-tdep.c (cris_software_single_step): Adjust.
6869 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
6870 (micromips_deal_with_atomic_sequence): Adjust.
6871 (deal_with_atomic_sequence): Adjust.
6872 (mips_software_single_step): Adjust.
6873 * mips-tdep.h (mips_software_single_step): Adjust.
6874 * moxie-tdep.c (moxie_software_single_step): Adjust.
6875 * nios2-tdep.c (nios2_software_single_step): Adjust.
6876 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
6877 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
6878 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
6879 * s390-linux-tdep.c (s390_software_single_step): Adjust.
6880 * sparc-tdep.c (sparc_software_single_step): Adjust.
6881 * spu-tdep.c (spu_software_single_step): Adjust.
6882 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
6883
6884 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6885
6886 * gdbarch.sh: Use semi-colon as field separator instead of colon.
6887 * gdbarch.h: Re-generate.
6888
6889 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6890
6891 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
6892 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
6893 * python/py-instruction.c, python/py-instruction.h: New file.
6894 * python/py-record.c: Add py-instruction.h include.
6895 (gdbpy_initialize_record): Make gdb.Instruction a super class of
6896 gdb.RecordInstruction.
6897 * python/python-internal.h: Add gdbpy_initialize_instruction
6898 declaration.
6899 * python/python.c (do_start_initialization): Add
6900 gdbpy_initialize_instruction.
6901
6902 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6903
6904 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
6905 Remove.
6906 (btrace_func_from_recpy_func): New function.
6907 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
6908 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
6909 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
6910 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
6911 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
6912 Also, use new helper functions.
6913 (btpy_list_item): Use new helper functions.
6914 (recpy_bt_function_call_history): Use new type name.
6915 (btpy_call_getset): Remove.
6916 (gdbpy_initialize_btrace): Remove code to initialize
6917 gdb.BtraceFunctionCall.
6918 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
6919 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
6920 recpy_bt_func_prev, recpy_bt_func_next): New export.
6921 * python/py-record.c (recpy_func_type): New static object.
6922 (recpy_func_new, recpy_func_level, recpy_func_symbol,
6923 recpy_func_instructions, recpy_func_up, recpy_func_prev,
6924 recpy_func_next): New function.
6925 (recpy_element_hash, recpy_element_richcompare): Updated comment.
6926 (recpy_func_getset): New static object.
6927 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
6928 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
6929
6930 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6931
6932 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
6933 (btpy_object, btpy_insn_type, btpy_new): Remove.
6934 (btpy_list_object): Use gdb.RecordInstruction type instead of
6935 gdb.BtraceInstruction type.
6936 (btrace_insn_from_recpy_insn): New function.
6937 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
6938 btpy_new.
6939 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
6940 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
6941 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
6942 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
6943 instead of btpy_object.
6944 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6945 btpy_insn_data, btpy_insn_decode): Rename to ...
6946 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
6947 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
6948 recpy_bt_insn_decode): This. Also, use new helper functions.
6949 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
6950 recpy_insn_type.
6951 (btpy_insn_getset): Remove.
6952 (gdbpy_initialize_btrace): Remove code to initialize
6953 gdb.BtraceInstruction. Use recpy_element_object.
6954 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
6955 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
6956 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
6957 * python/py-record.c (recpy_insn_type): New static object.
6958 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
6959 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
6960 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
6961 New function.
6962 (recpy_insn_getset): New static object.
6963 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
6964 * python/py-record.h (recpy_element_object): New typedef.
6965 (recpy_insn_type, recpy_insn_new): New export.
6966
6967 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6968
6969 * py-record-btrace.c (btpy_insn_new): Removed.
6970 (btpy_insn_or_gap_new): New function.
6971 (btpy_insn_error): Removed.
6972 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6973 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
6974 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
6975 btpy_insn_or_gap_new instead of btpy_insn_new.
6976 (btpy_insn_getset): Remove btpy_insn_error.
6977 * py-record.c (recpy_gap_type): New static object.
6978 (recpy_gap_object): New typedef.
6979 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
6980 recpy_gap_reason_string): New function.
6981 (recpy_gap_getset): New static object.
6982 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
6983 * py-record.h (recpy_gap_new): New export.
6984
6985 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6986
6987 * python/py-record.c (recpy_ptid): Remove.
6988 (recpy_record_getset): Remove recpy_ptid.
6989
6990 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6991
6992 * btrace.c (btrace_fetch): Set inferior_ptid.
6993 * python/py-record-btrace.c: Add "py-record.h" include.
6994 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
6995 recpy_bt_end, recpy_bt_instruction_history,
6996 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
6997 in gdb.Record object instead of current ptid.
6998 * python/py-record.c: Include new "py-record.h" file.
6999 (recpy_record_object): Moved to py-record.h.
7000 * python/py-record.h: New file.
7001
7002 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7003
7004 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
7005 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
7006 indentation.
7007
7008 2017-05-01 Joel Brobecker <brobecker@adacore.com>
7009
7010 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
7011 the past maintainers section.
7012
7013 2017-04-28 Yao Qi <yao.qi@linaro.org>
7014
7015 * infcmd.c (get_return_value): Use regcache ctor, and remove
7016 cleanup.
7017
7018 2017-04-28 Yao Qi <yao.qi@linaro.org>
7019 Pedro Alves <palves@redhat.com>
7020
7021 * regcache.c (regcache::regcache): New tag dispatch ctor.
7022 (do_cooked_read): Moved above.
7023 (regcache_dup): Use the tag dispatch ctor..
7024 * regcache.h (regcache): Declare ctor, delete copy ctor and
7025 assignment operator, remove friend regcache_dup.
7026
7027 2017-04-28 Yao Qi <yao.qi@linaro.org>
7028
7029 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
7030 call method save instead of regcache_cpy.
7031 * regcache.h (struct regcache): Make regcache_dup a friend.
7032
7033 2017-04-28 Yao Qi <yao.qi@linaro.org>
7034
7035 * regcache.c (struct regcache): Move to regcache.h
7036 (regcache::arch): New method.
7037 (regcache_get_ptid): Update.
7038 (get_regcache_arch): Call arch method.
7039 (get_regcache_aspace): Call method aspace.
7040 (register_buffer): Change it to method.
7041 (regcache_save): Change it to regcache::save.
7042 (regcache_restore): Likewise.
7043 (regcache_cpy_no_passthrough): Remove the declaration.
7044 (regcache_cpy): Call methods restore and cpy_no_passthrough.
7045 (regcache_cpy_no_passthrough): Change it to method
7046 cpy_no_passthrough.
7047 (regcache_register_status): Change it to method
7048 get_register_status.
7049 (regcache_invalidate): Change it to method invalidate.
7050 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
7051 (regcache_raw_update): Change it to method raw_update.
7052 (regcache_raw_read): Likewise.
7053 (regcache_raw_read_signed): Likewise.
7054 (regcache_raw_read_unsigned): Likewise.
7055 (regcache_raw_write_signed): Likewise.
7056 (regcache_raw_write_unsigned): Likewise.
7057 (regcache_cooked_read): Likewise.
7058 (regcache_cooked_read_value): Likewise.
7059 (regcache_cooked_read_signed): Likewise.
7060 (regcache_cooked_read_unsigned): Likewise.
7061 (regcache_cooked_write_signed): Likewise.
7062 (regcache_cooked_write_unsigned): Likewise.
7063 (regcache_raw_set_cached_value): Likewise.
7064 (regcache_raw_write): Likewise.
7065 (regcache_cooked_write): Likewise.
7066 (regcache_xfer_part): Likewise.
7067 (regcache_raw_read_part): Likewise.
7068 (regcache_raw_write_part): Likewise.
7069 (regcache_cooked_read_part): Likewise.
7070 (regcache_cooked_write_part): Likewise.
7071 (regcache_raw_supply): Likewise.
7072 (regcache_raw_collect): Likewise.
7073 (regcache_transfer_regset): Likewise.
7074 (regcache_supply_regset): Likewise.
7075 (regcache_collect_regset): Likewise.
7076 (regcache_debug_print_register): Likewise.
7077 (enum regcache_dump_what): Move it to regcache.h.
7078 (regcache_dump): Change it to method dump.
7079 * regcache.h (enum regcache_dump_what): New.
7080 (class regcache): New.
7081 * target.c (target_fetch_registers): Call method
7082 debug_print_register.
7083 (target_store_registers): Likewise.
7084
7085 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7086
7087 * windows-nat.c (struct lm_info_windows): Initialize field.
7088 (windows_make_so): Allocate lm_info_windows with new.
7089 (windows_free_so): Free lm_info_windows with delete.
7090
7091 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7092
7093 * solib-darwin.c (struct lm_info_darwin): Initialize field.
7094 (darwin_current_sos): Allocate lm_info_darwin with new, remove
7095 cleanup.
7096 (darwin_free_so): Free lm_info_darwin with delete.
7097
7098 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7099
7100 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7101 <l_addr_p>: Change type to bool.
7102 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7103 (svr4_free_so): Free lm_info_svr4 with delete.
7104 (svr4_copy_library_list): Replace memcpy with call to copy
7105 constructor.
7106 (library_list_start_library, svr4_default_sos): Allocate
7107 lm_info_svr4 with new.
7108
7109 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7110
7111 * solib-target.c (struct lm_info_target): Add destructor,
7112 initialize fields.
7113 <name>: Change type to std::string.
7114 (library_list_start_library): Allocate lm_info_target with new.
7115 (solib_target_free_library_list): Free lm_info_target with
7116 delete.
7117 (solib_target_current_sos): Adapt to std::string.
7118 (solib_target_free_so): Free lm_info_target with delete.
7119
7120 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7121
7122 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7123 fields.
7124 (frv_current_sos): Allocate lm_info_frv with new.
7125 (frv_relocate_main_executable): Free lm_info_frv with delete,
7126 allocate with new.
7127 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7128
7129 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7130
7131 * solib-frv.c (struct lm_info_frv): Fix indentation.
7132
7133 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7134
7135 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7136 map field.
7137 (dsbt_current_sos): Allocate lm_info_dsbt with new.
7138 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
7139 and allocate with new.
7140 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
7141
7142 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7143
7144 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
7145 <filename, member_name>: Change type to std::string.
7146 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
7147 (library_list_start_library): Allocate lm_info_aix with new.
7148 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
7149 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
7150 with copy constructor.
7151
7152 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7153
7154 * solist.h (struct lm_info): Remove.
7155 (struct lm_info_base): New class.
7156 (struct so_list) <lm_info>: Change type to lm_info_base *.
7157 * nto-tdep.c (struct lm_info): Remove.
7158 (lm_addr): Adjust.
7159 * solib-aix.c (struct lm_info): Rename to ...
7160 (struct lm_info_aix): ... this. Extend lm_info_base.
7161 (lm_info_p): Rename to ...
7162 (lm_info_aix_p): ... this, and adjust.
7163 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
7164 solib_aix_parse_libraries, library_list_start_library,
7165 solib_aix_free_library_list, solib_aix_parse_libraries,
7166 solib_aix_get_library_list,
7167 solib_aix_relocate_section_addresses, solib_aix_free_so,
7168 solib_aix_get_section_offsets,
7169 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
7170 Adjust.
7171 (struct solib_aix_inferior_data) <library_list>: Adjust.
7172 * solib-darwin.c (struct lm_info): Rename to ...
7173 (struct lm_info_darwin): ... this. Extend lm_info_base.
7174 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
7175 * solib-dsbt.c (struct lm_info): Rename to ...
7176 (struct lm_info_dsbt): ... this. Extend lm_info_base.
7177 (struct dsbt_info) <main_executable_lm_info): Adjust.
7178 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
7179 dsbt_relocate_section_addresses): Adjust.
7180 * solib-frv.c (struct lm_info): Rename to ...
7181 (struct lm_info_frv): ... this. Extend lm_info_base.
7182 (main_executable_lm_info): Adjust.
7183 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7184 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7185 find_canonical_descriptor_in_load_object,
7186 frv_fdpic_find_canonical_descriptor): Adjust.
7187 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7188 to lm_info_svr4.
7189 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7190 svr4_clear_so, svr4_copy_library_list,
7191 library_list_start_library, svr4_default_sos, svr4_read_so_list,
7192 svr4_current_sos, svr4_fetch_objfile_link_map,
7193 solist_update_incremental): Adjust.
7194 * solib-svr4.h (struct lm_info_svr4): Move here from
7195 solib-svr4.c.
7196 * solib-target.c (struct lm_info): Rename to ...
7197 (struct lm_info_target): ... this. Extend lm_info_base.
7198 (lm_info_p): Rename to ...
7199 (lm_info_target_p): ... this.
7200 (solib_target_parse_libraries, library_list_start_segment,
7201 library_list_start_section, library_list_start_library,
7202 library_list_end_library, solib_target_free_library_list,
7203 solib_target_current_sos, solib_target_free_so,
7204 solib_target_relocate_section_addresses): Adjust.
7205 * windows-nat.c (struct lm_info): Rename to ...
7206 (struct lm_info_windows): ... this. Extend lm_info_base.
7207 (windows_make_so, handle_load_dll, handle_unload_dll,
7208 windows_xfer_shared_libraries): Adjust.
7209
7210 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7211
7212 * solib-darwin.c (struct darwin_so_list): Remove.
7213 (darwin_current_sos): Allocate an so_list object instead of a
7214 darwin_so_list, separately allocate an lm_info object.
7215 (darwin_free_so): Free lm_info.
7216
7217 2017-04-28 John Baldwin <jhb@FreeBSD.org>
7218
7219 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7220 with fprintf_filtered.
7221
7222 2017-04-28 Yao Qi <yao.qi@linaro.org>
7223
7224 * regcache.c (regcache::regcache): New function.
7225 (regcache::~regcache): New function.
7226 (regcache_xmalloc_1): Remove.
7227 (regcache_xmalloc): Call new regcache.
7228 (regcache_xfree): Call delete regcache.
7229 (get_thread_arch_aspace_regcache): Call new regcache.
7230
7231 2017-04-28 Yao Qi <yao.qi@linaro.org>
7232
7233 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7234 lwp instead of ptid_get_lwp.
7235
7236 2017-04-28 Yao Qi <yao.qi@linaro.org>
7237
7238 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7239 lwp_info instead of getting from inferior_ptid.
7240
7241 2017-04-27 Keith Seitz <keiths@redhat.com>
7242
7243 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
7244 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
7245 (CV_CONVERSION_BADNESS): Define.
7246 (rank_one_type): Remove overly restrictive rvalue reference
7247 rank checks.
7248 Add cv-qualifier checks and subranks for type equality.
7249 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
7250 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
7251 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
7252
7253 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
7254
7255 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
7256 count when creating the object.
7257
7258 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
7259 Ulrich Weigand <uweigand@de.ibm.com>
7260
7261 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
7262 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
7263 is used in AIX.
7264 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
7265 (process_xcoff_symbol): Likewise.
7266 (scan_xcoff_symtab): Likewise.
7267
7268 2017-04-26 Alan Hayward <alan.hayward@arm.com>
7269
7270 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
7271 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
7272 (ia64_access_reg): Use get_frame_register_unsigned.
7273 (ia64_access_rse_reg): Likewise.
7274 (ia64_libunwind_frame_prev_register): Likewise.
7275
7276 2017-04-26 Jiong Wang <jiong.wang@arm.com>
7277
7278 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
7279 * gdbarch.c: Regenerated.
7280 * gdbarch.h: Regenerated.
7281 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
7282 visibility external.
7283 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
7284 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
7285 (enum cfa_how_kind): Move to ...
7286 (struct dwarf2_frame_state_reg_info): Likewise.
7287 (struct dwarf2_frame_state): Likewise.
7288 * dwarf2-frame.h: ... here.
7289 (dwarf2_frame_state_alloc_regs): New declaration.
7290 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
7291 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
7292
7293 2017-04-26 Alan Hayward <alan.hayward@arm.com>
7294
7295 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
7296 regcache_raw_read_unsigned.
7297 (xtensa_pseudo_register_write): Likewise.
7298
7299 2017-04-26 Alan Hayward <alan.hayward@arm.com>
7300
7301 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
7302 (nds32_pseudo_register_write): Likewise.
7303
7304 2017-04-25 Yao Qi <yao.qi@linaro.org>
7305
7306 * regcache.c (struct regcache) <readonly_p>: Change its type
7307 to bool.
7308 (regcache_xmalloc_1): Update parameter type and callers update.
7309
7310 2017-04-25 Yao Qi <yao.qi@linaro.org>
7311
7312 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
7313 set_gdbarch_wchar_bit.
7314 * arm-tdep.c (arm_gdbarch_init): Likewise.
7315
7316 2017-04-25 Pedro Alves <palves@redhat.com>
7317
7318 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
7319 (BothAreRelocatable, memcopy, memmove): Don't define.
7320 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
7321 macros.
7322
7323 2017-04-25 Pedro Alves <palves@redhat.com>
7324
7325 * common/common-defs.h: Include "common/poison.h".
7326 * common/function-view.h: (Not, Or, Requires): Move to traits.h
7327 and adjust.
7328 * common/poison.h: New file.
7329 * common/traits.h: Include <type_traits>.
7330 (Not, Or, Requires): New, moved from common/function-view.h.
7331
7332 2017-04-25 Pedro Alves <palves@redhat.com>
7333
7334 * breakpoint.h (struct breakpoint): In-class initialize all
7335 fields. Make boolean fields "bool".
7336 * breakpoint.c (init_raw_breakpoint_without_location): Remove
7337 memset call and initializations no longer necessary.
7338
7339 2017-04-25 Pedro Alves <palves@redhat.com>
7340
7341 * btrace.c (pt_btrace_insn_flags): Change parameter type to
7342 reference.
7343 (pt_btrace_insn): New function.
7344 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
7345
7346 2017-04-25 Pedro Alves <palves@redhat.com>
7347
7348 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
7349 "base" field and inherit from "bp_location" instead. Add
7350 non-default ctor.
7351 (allocate_location_exception): Use new non-default ctor.
7352 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
7353 (init_bp_location): Convert to ...
7354 (bp_location::bp_location): ... this new ctor, and remove memset
7355 call.
7356 (base_breakpoint_allocate_location): Use the new non-default ctor.
7357 * breakpoint.h (bp_location): Now a class. Declare default and
7358 non-default ctors. In-class initialize all members.
7359 (init_bp_location): Remove declaration.
7360
7361 2017-04-25 Pedro Alves <palves@redhat.com>
7362
7363 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
7364 assignment operator.
7365
7366 2017-04-24 Yao Qi <yao.qi@linaro.org>
7367
7368 * doublest.c (convert_doublest_to_floatformat): Call
7369 floatformat_totalsize_bytes.
7370
7371 2017-04-22 Tom Tromey <tom@tromey.com>
7372
7373 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7374 ui_out_emit_list.
7375 * stack.c (print_frame): Use ui_out_emit_list.
7376 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7377 ui_out_emit_list.
7378 * mi/mi-main.c (print_one_inferior)
7379 (mi_cmd_data_list_register_names)
7380 (mi_cmd_data_list_register_values, mi_cmd_list_features)
7381 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
7382 ui_out_emit_list.
7383 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
7384 (mi_output_solib_attribs): Use ui_out_emit_list,
7385 ui_out_emit_tuple.
7386 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
7387 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
7388 (mi_cmd_stack_list_args, list_args_or_locals): Use
7389 ui_out_emit_list.
7390 * disasm.c (do_assembly_only): Use ui_out_emit_list.
7391 * breakpoint.c (print_solib_event, output_thread_groups): Use
7392 ui_out_emit_list.
7393
7394 2017-04-22 Tom Tromey <tom@tromey.com>
7395
7396 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
7397 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
7398 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
7399
7400 2017-04-22 Tom Tromey <tom@tromey.com>
7401
7402 * tracepoint.c (tvariables_info_1)
7403 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
7404
7405 2017-04-22 Tom Tromey <tom@tromey.com>
7406
7407 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
7408 annotate_arg_emitter.
7409 * breakpoint.c (print_mention_watchpoint)
7410 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
7411 * annotate.h (struct annotate_arg_emitter): New.
7412
7413 2017-04-22 Tom Tromey <tom@tromey.com>
7414
7415 * record-btrace.c (record_btrace_insn_history)
7416 (record_btrace_insn_history_range, record_btrace_call_history)
7417 (record_btrace_call_history_range): Use ui_out_emit_tuple.
7418 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
7419 ui_out_emit_tuple.
7420 * stack.c (print_frame_info): Use ui_out_emit_tuple.
7421 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
7422 * skip.c (skip_info): Use ui_out_emit_tuple.
7423 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
7424 * progspace.c (print_program_space): Use ui_out_emit_tuple.
7425 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
7426 * osdata.c (info_osdata): Use ui_out_emit_tuple.
7427 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7428 ui_out_emit_tuple.
7429 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
7430 (output_register, mi_cmd_data_read_memory)
7431 (mi_cmd_data_read_memory_bytes, mi_load_progress)
7432 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
7433 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
7434 Use ui_out_emit_tuple.
7435 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
7436 ui_out_emit_tuple.
7437 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7438 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
7439 * linux-thread-db.c (info_auto_load_libthread_db): Use
7440 ui_out_emit_tuple.
7441 * inferior.c (print_inferior): Use ui_out_emit_tuple.
7442 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
7443 * disasm.c (do_mixed_source_and_assembly_deprecated)
7444 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
7445 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
7446 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
7447 * breakpoint.c (print_one_breakpoint_location)
7448 (print_one_breakpoint): Use ui_out_emit_tuple.
7449 * auto-load.c (print_script, info_auto_load_cmd): Use
7450 ui_out_emit_tuple.
7451 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
7452
7453 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
7454
7455 * thread.c (print_thread_info_1): Remove dead code.
7456
7457 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7458
7459 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
7460 GDB_SELF_TEST.
7461 * arm-tdep.c (selftests::arm_record_test): Likewise.
7462
7463 2017-04-21 Yao Qi <yao.qi@linaro.org>
7464
7465 * regcache.c (regcache_restore): Remove argument 2. Replace
7466 argument 3 with regcache. Get register status from
7467 src->register_status and get register contents from
7468 register_buffer (src, regnum).
7469 (regcache_cpy): Update.
7470
7471 2017-04-19 Pedro Alves <palves@redhat.com>
7472
7473 * gdbthread.h (thread): Add missing closing parenthesis in
7474 comment.
7475
7476 2017-04-19 Pedro Alves <palves@redhat.com>
7477
7478 * common/refcounted-object.h: New file.
7479 * gdbthread.h: Include "common/refcounted-object.h".
7480 (thread_info): Inherit from refcounted_object and add comments.
7481 (thread_info::incref, thread_info::decref)
7482 (thread_info::m_refcount): Delete.
7483 (thread_info::deletable): Use the refcounted_object::refcount()
7484 method.
7485 * inferior.c (current_inferior_): Add comment.
7486 (set_current_inferior): Increment/decrement refcounts.
7487 (prune_inferiors, remove_inferior_command): Skip inferiors marked
7488 not-deletable instead of comparing with the current inferior.
7489 (initialize_inferiors): Increment the initial inferior's refcount.
7490 * inferior.h (struct inferior): Forward declare.
7491 Include "common/refcounted-object.h".
7492 (current_inferior, set_current_inferior): Move declaration to
7493 before struct inferior's definition, and fix comment.
7494 (inferior): Inherit from refcounted_object. Add comments.
7495 * thread.c (switch_to_thread_no_regs): Reference the thread's
7496 inferior pointer directly instead of doing a ptid lookup.
7497 (switch_to_no_thread): New function.
7498 (switch_to_thread(thread_info *)): New function, factored out
7499 from ...
7500 (switch_to_thread(ptid_t)): ... this.
7501 (restore_current_thread): Delete.
7502 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
7503 fields, and add 'inf' field.
7504 (do_restore_current_thread_cleanup): Check whether old->inf is
7505 alive instead of looking up an inferior by ptid. Use
7506 switch_to_thread and switch_to_no_thread.
7507 (restore_current_thread_cleanup_dtor): Use old->inf directly
7508 instead of lookup up an inferior by id. Decref the inferior.
7509 Don't restore 'removable'.
7510 (make_cleanup_restore_current_thread): Same the inferior pointer
7511 in old, instead of the inferior number. Incref the inferior.
7512 Don't save/clear 'removable'.
7513
7514 2017-04-19 Pedro Alves <palves@redhat.com>
7515
7516 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7517 unittests/scoped_restore-selftests.c.
7518 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
7519 * common/scoped_restore.h (scoped_restore_base): Make "class".
7520 (scoped_restore_base::release): New public method.
7521 (scoped_restore_base::scoped_restore_base): New protected ctor.
7522 (scoped_restore_base::m_saved_var): New protected field.
7523 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
7524 scoped_restore_base base class instead of m_saved_var directly.
7525 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
7526 (scoped_restore_tmpl::scoped_restore_tmpl(const
7527 scoped_restore_tmpl<T>&)): Likewise.
7528 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
7529 method.
7530 (scoped_restore_tmpl::saved_var): New method.
7531 (scoped_restore_tmpl::m_saved_var): Delete.
7532 * inferior.h (inferior::detaching): Now a bool.
7533 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
7534 cleanup.
7535 * unittests/scoped_restore-selftests.c: New file.
7536
7537 2017-04-19 Pedro Alves <palves@redhat.com>
7538
7539 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
7540 Re-sort in alphabetic order.
7541
7542 2017-04-18 Pedro Alves <palves@redhat.com>
7543
7544 * xml-support.c (obstack_xml_printf): Delete.
7545 * xml-support.h (obstack_xml_printf): Delete.
7546
7547 2017-04-18 Pedro Alves <palves@redhat.com>
7548
7549 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
7550 vdebug, verror, body_text, start_element, end_element, name,
7551 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
7552 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
7553 is_xinclude>: Make private and add m_ prefix.
7554 (gdb_xml_parser::body_text): New method, based on ...
7555 (gdb_xml_body_text): ... this. Adjust.
7556 (gdb_xml_parser::vdebug): New method, based on ...
7557 (gdb_xml_debug): ... this. Adjust.
7558 (gdb_xml_parser::verror): New method, based on ...
7559 (gdb_xml_error): ... this. Adjust.
7560 (gdb_xml_parser::start_element): New method, based on ...
7561 (gdb_xml_start_element): ... this. Adjust.
7562 (gdb_xml_start_element_wrapper): Defer to
7563 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
7564 (gdb_xml_parser::end_element): New method, based on ...
7565 (gdb_xml_end_element_wrapper): ... this. Adjust.
7566 (gdb_xml_parser::~gdb_xml_parser): Adjust.
7567 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
7568 (gdb_xml_parser::use_dtd): New method, based on ...
7569 (gdb_xml_use_dtd): ... this. Adjust.
7570 (gdb_xml_parser::parse): New method, based on ...
7571 (gdb_xml_parse): ... this. Adjust.
7572 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
7573 (xinclude_start_include): Adjust to call the parser's name method.
7574 (xml_xinclude_default, xml_xinclude_start_doctype)
7575 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
7576 method.
7577 (xml_process_xincludes): Adjust to call parser methods.
7578 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
7579 declarations.
7580
7581 2017-04-18 Pedro Alves <palves@redhat.com>
7582
7583 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
7584 gdb::optional<std::string>.
7585 * xml-support.c: Include <string>.
7586 (scope_level::scope_level(scope_level &&))
7587 (scope_level::~scope_level): Delete.
7588 (scope_level::body): Now a std::string.
7589 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
7590 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
7591 parameter.
7592 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
7593 (xinclude_parsing_data::output): Now a std::string reference.
7594 (xinclude_start_include): Adjust.
7595 (xml_xinclude_default): Adjust.
7596 (xml_process_xincludes): Add 'output' parameter, and return bool.
7597 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
7598 and return bool.
7599 * xml-tdesc.c: Include <unordered_map> and <string>.
7600 (tdesc_xml_cache): Delete.
7601 (tdesc_xml_cache_s): Delete.
7602 (xml_cache): Now an std::unordered_map.
7603 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
7604 (target_fetch_description_xml): Change return type to
7605 gdb::optional<std::string>, and adjust.
7606 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
7607 (target_fetch_description_xml): Change return type to
7608 gdb::optional<std::string>.
7609
7610 2017-04-18 Pedro Alves <palves@redhat.com>
7611
7612 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7613 unittests/optional-selftests.c.
7614 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
7615 * unittests/optional-selftests.c: New file.
7616 * unittests/optional/assignment/1.cc: New file.
7617 * unittests/optional/assignment/2.cc: New file.
7618 * unittests/optional/assignment/3.cc: New file.
7619 * unittests/optional/assignment/4.cc: New file.
7620 * unittests/optional/assignment/5.cc: New file.
7621 * unittests/optional/assignment/6.cc: New file.
7622 * unittests/optional/assignment/7.cc: New file.
7623 * unittests/optional/cons/copy.cc: New file.
7624 * unittests/optional/cons/default.cc: New file.
7625 * unittests/optional/cons/move.cc: New file.
7626 * unittests/optional/cons/value.cc: New file.
7627 * unittests/optional/in_place.cc: New file.
7628 * unittests/optional/observers/1.cc: New file.
7629 * unittests/optional/observers/2.cc: New file.
7630
7631 2017-04-18 Pedro Alves <palves@redhat.com>
7632
7633 * common/gdb_optional.h: Include common/traits.h.
7634 (in_place_t): New type.
7635 (in_place): New constexpr variable.
7636 (optional::optional): Remove member initialization of
7637 m_instantiated.
7638 (optional::optional(in_place_t...)): New constructor.
7639 (optional::~optional): Use reset.
7640 (optional::optional(const optional&)): New.
7641 (optional::optional(const optional&&)): New.
7642 (optional::optional(T &)): New.
7643 (optional::optional(T &&)): New.
7644 (operator::operator=(const optional &)): New.
7645 (operator::operator=(optional &&)): New.
7646 (operator::operator= (const T &))
7647 (operator::operator= (T &&))
7648 (operator::emplace (Args &&... args)): Return a T&. Use reset.
7649 (operator::reset): New.
7650 (operator::m_instantiated):: Add in-class initializer.
7651 * common/traits.h: Include <type_traits>.
7652 (struct And): New types.
7653
7654 2017-04-18 Pedro Alves <palves@redhat.com>
7655
7656 * xml-support.c: Include <vector>.
7657 (scope_level::scope_level(const gdb_xml_element *))
7658 (scope_level::scope_level(scope_level&&)): New.
7659 (scope_level::~scope_level): New.
7660 (scope_level_s): Delete.
7661 (gdb_xml_parser::scopes): Now a std::vector.
7662 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
7663 Use std::vector.
7664 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
7665 scope cleanup code.
7666 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
7667 of the scopes member. Use std::vector::emplace_back.
7668
7669 2017-04-18 Pedro Alves <palves@redhat.com>
7670
7671 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
7672 a bool.
7673 (gdb_xml_end_element): Change type of first parameter.
7674 (gdb_xml_cleanup): Rename to ...
7675 (gdb_xml_parser::~gdb_xml_parser): ... this.
7676 (gdb_xml_create_parser_and_cleanup): Delete with ...
7677 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
7678 to this new ctor.
7679 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
7680 using gdb_xml_create_parser_and_cleanup.
7681 (xinclude_parsing_data): Add ctor/dtor.
7682 (xml_xinclude_cleanup): Delete.
7683 (xml_process_xincludes): Create a local xinclude_parsing_data
7684 instead of heap-allocating one. Create a local gdb_xml_parser
7685 instead of heap-allocating one with
7686 gdb_xml_create_parser_and_cleanup.
7687
7688 2017-04-18 John Baldwin <jhb@FreeBSD.org>
7689
7690 PR threads/20743
7691 * fbsd-nat.c (resume_one_thread_cb): Remove.
7692 (resume_all_threads_cb): Remove.
7693 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7694 iterate_over_threads.
7695
7696 2017-04-17 Joel Brobecker <brobecker@adacore.com>
7697
7698 * NEWS: Create a new section for the next release branch.
7699 Rename the section of the current branch, now that it has
7700 been cut.
7701
7702 2017-04-17 Joel Brobecker <brobecker@adacore.com>
7703
7704 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7705 * version.in: Bump version to 8.0.50.DATE-git.
7706
7707 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
7708
7709 PR gdb/21385
7710 * windows-nat.c (windows_create_inferior): Declare 'allargs'
7711 independently of the host, and fix build breakage on Cygwin.
7712
7713 2017-04-13 Pedro Alves <palves@redhat.com>
7714
7715 * inferior.c (free_inferior): Convert to ...
7716 (inferior::~inferior): ... this dtor.
7717 (inferior::inferior): New ctor, factored out from ...
7718 (add_inferior_silent): ... here. Allocate the inferior with a new
7719 expression.
7720 (delete_inferior): Call delete instead of free_inferior.
7721 * inferior.h (gdb_environ, continuation): Forward declare.
7722 (inferior): Now a class. Add in-class initialization to all
7723 members. Make boolean fields bool, except 'detaching'.
7724 (inferior::inferior): New explicit ctor.
7725 (inferior::~inferior): New.
7726
7727 2017-04-13 Pedro Alves <palves@redhat.com>
7728
7729 * inferior.c (init_inferior_list): Delete.
7730 * inferior.h (init_inferior_list): Delete.
7731
7732 2017-04-13 Pedro Alves <palves@redhat.com>
7733
7734 PR threads/13217
7735 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7736 (top level): Call it twice, with different thread sets.
7737
7738 2017-04-13 Pedro Alves <palves@redhat.com>
7739
7740 * thread.c: Include <algorithm>.
7741 (thread_array_cleanup): Delete.
7742 (scoped_inc_dec_ref): New class.
7743 (live_threads_count): New function.
7744 (set_thread_refcount): Delete.
7745 (tp_array_compar_ascending): Now a bool.
7746 (tp_array_compar): Convert to a std::sort comparison function.
7747 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7748 and live_threads_count.
7749
7750 2017-04-13 Pedro Alves <palves@redhat.com>
7751
7752 * infrun.c (follow_fork_inferior): Also switch the current
7753 inferior.
7754
7755 2017-04-13 Pedro Alves <palves@redhat.com>
7756
7757 * breakpoint.c (watch_command_1): Save watchpoint-frame info
7758 before calling create_internal_breakpoint.
7759
7760 2017-04-13 Pedro Alves <palves@redhat.com>
7761
7762 * fork-child.c (execv_argv): New class.
7763 (breakup_args): Refactored as ...
7764 (execv_argv::init_for_no_shell): .. this method of execv_argv.
7765 Copy arguments to storage and replace separators with NULL
7766 terminators in place.
7767 (escape_bang_in_quoted_argument): Adjust to return bool.
7768 (execv_argv::execv_argv): New ctor.
7769 (execv_argv::init_for_shell): New method, factored out from
7770 fork_inferior. Don't strdup strings into the vector.
7771 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
7772 Remove free_vector_argv call.
7773
7774 2017-04-13 Yao Qi <yao.qi@linaro.org>
7775
7776 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
7777 tdep->rx_psw_type.
7778
7779 2017-04-13 Yao Qi <yao.qi@linaro.org>
7780
7781 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
7782 * rx-tdep.c (rx_gdbarch_init): Likewise.
7783
7784 2017-04-13 Pedro Alves <palves@redhat.com>
7785
7786 * breakpoint.h (struct breakpoint): Reindent.
7787
7788 2017-04-13 Pedro Alves <palves@redhat.com>
7789
7790 * breakpoint.c (bp_location): Rename to ...
7791 (bp_locations): ... this. All references updated.
7792 (bp_location_count): Rename to ...
7793 (bp_locations_count): ... this. All references updated.
7794 (bp_location_placed_address_before_address_max): Rename to ...
7795 (bp_locations_placed_address_before_address_max): ... this. All
7796 references updated.
7797 (bp_location_shadow_len_after_address_max): Rename to ...
7798 (bp_locations_shadow_len_after_address_max): ... this. All
7799 references updated.
7800 (bp_location_compare_addrs): Rename to ...
7801 (bp_locations_compare_addrs): ... this. All references updated.
7802 (bp_location_compare):Rename to ...
7803 (bp_locations_compare): ... this. All references updated.
7804 (bp_location_target_extensions_update): Rename to ...
7805 (bp_locations_target_extensions_update): ... this. All references
7806 updated.
7807
7808 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7809
7810 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
7811 * common/common.m4: Check headers 'termios.h', 'termio.h' and
7812 'sgtty.h'.
7813 * common/gdb_termios.h: New file, with parts of "terminal.h".
7814 * inflow.c: Include "gdb_termios.h".
7815 * ser-unix.c: Include "gdb_termios.h".
7816 * terminal.h: Move terminal-related defines to
7817 "common/gdb_termios.h".
7818
7819 2017-04-12 Tom Tromey <tom@tromey.com>
7820
7821 * probe.c (parse_probes): Update.
7822 * location.h (delete_event_location): Don't declare.
7823 (event_location_deleter::operator()): Update.
7824 * location.c (event_location_deleter::operator()): Rename from
7825 delete_event_location.
7826 * linespec.h (linespec_result) <location>: Change type to
7827 event_location_up.
7828 * linespec.c (canonicalize_linespec, event_location_to_sals)
7829 (decode_objc): Update.
7830 (linespec_result): Don't call delete_event_location.
7831 * breakpoint.c (create_breakpoints_sal)
7832 (bkpt_probe_create_sals_from_location)
7833 (strace_marker_create_sals_from_location): Update.
7834
7835 2017-04-12 Tom Tromey <tom@tromey.com>
7836
7837 * linespec.h (struct linespec_result): Add constructor and
7838 destructor.
7839 (init_linespec_result, destroy_linespec_result)
7840 (make_cleanup_destroy_linespec_result): Don't declare.
7841 * linespec.c (init_linespec_result): Remove.
7842 (linespec_result::~linespec_result): Rename from
7843 destroy_linespec_result. Update.
7844 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
7845 Remove.
7846 * breakpoint.c (create_breakpoint, break_range_command)
7847 (decode_location_default): Update.
7848 * ax-gdb.c (agent_command_1): Update.
7849
7850 2017-04-12 Tom Tromey <tom@tromey.com>
7851
7852 * remote.c (remote_download_tracepoint): Update.
7853 * python/py-breakpoint.c (bppy_get_location): Update.
7854 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
7855 (gdbscm_breakpoint_location): Update.
7856 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
7857 * breakpoint.h (struct breakpoint) <location, location_range_end>:
7858 Change type to event_location_up.
7859 * breakpoint.c (create_overlay_event_breakpoint)
7860 (create_longjmp_master_breakpoint)
7861 (create_std_terminate_master_breakpoint)
7862 (create_exception_master_breakpoint)
7863 (breakpoint_event_location_empty_p, print_breakpoint_location)
7864 (print_one_breakpoint_location, create_thread_event_breakpoint)
7865 (init_breakpoint_sal, create_breakpoint)
7866 (print_recreate_ranged_breakpoint, break_range_command)
7867 (init_ada_exception_breakpoint, say_where): Update.
7868 (base_breakpoint_dtor): Don't call delete_event_location.
7869 (bkpt_print_recreate, tracepoint_print_recreate)
7870 (dprintf_print_recreate, update_static_tracepoint)
7871 (breakpoint_re_set_default): Update.
7872
7873 2017-04-12 Tom Tromey <tom@tromey.com>
7874
7875 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
7876 type of "to_do". Update.
7877 (compute_stack_depth): Use std::vector.
7878
7879 2017-04-12 Tom Tromey <tom@tromey.com>
7880
7881 * printcmd.c (find_instruction_backward): Use std::vector.
7882
7883 2017-04-12 Tom Tromey <tom@tromey.com>
7884
7885 * symfile.c (objfilep): Remove typedef.
7886 (reread_symbols): Use a std::vector.
7887
7888 2017-04-12 Tom Tromey <tom@tromey.com>
7889
7890 * mi/mi-main.c (exec_direction_forward): Remove.
7891 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
7892 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7893 scoped_restore.
7894 * guile/guile.c (guile_repl_command, guile_command)
7895 (gdbscm_execute_gdb_command): Use scoped_restore.
7896 * go-exp.y (go_parse): Use scoped_restore.
7897 * d-exp.y (d_parse): Use scoped_restore.
7898 * cli/cli-decode.c (cmd_func): Use scoped_restore.
7899 * c-exp.y (c_parse): Use scoped_restore.
7900
7901 2017-04-12 Tom Tromey <tom@tromey.com>
7902
7903 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
7904 (mi_parse): Update return type.
7905 (mi_parse_free): Remove.
7906 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
7907 (mi_parse::~mi_parse): Rename from mi_parse_free.
7908 (mi_parse_cleanup): Remove.
7909 (mi_parse): Return a unique_ptr. Use new.
7910 * mi/mi-main.c (mi_execute_command): Update.
7911
7912 2017-04-12 Tom Tromey <tom@tromey.com>
7913
7914 * location.c (explicit_location_lex_one): Return a
7915 unique_xmalloc_ptr.
7916 (string_to_explicit_location): Update. Remove cleanups.
7917
7918 2017-04-12 Tom Tromey <tom@tromey.com>
7919
7920 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
7921 (compare_value_and_voffset): Change type. Update.
7922 (compute_vtable_size): Change type of "offset_vec".
7923 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
7924 (gnuv3_get_typeid): Remove extraneous declaration.
7925
7926 2017-04-12 Tom Tromey <tom@tromey.com>
7927
7928 * charset.h (wchar_iterator): Fix comment.
7929
7930 2017-04-12 Tom Tromey <tom@tromey.com>
7931
7932 * charset.c (iconv_wrapper): New class.
7933 (cleanup_iconv): Remove.
7934 (convert_between_encodings): Use it.
7935
7936 2017-04-12 Tom Tromey <tom@tromey.com>
7937
7938 * symfile.h (increment_reading_symtab): Update type.
7939 * symfile.c (decrement_reading_symtab): Remove.
7940 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
7941 * psymtab.c (psymtab_to_symtab): Update.
7942 * dwarf2read.c (dw2_instantiate_symtab): Update.
7943
7944 2017-04-12 Tom Tromey <tom@tromey.com>
7945
7946 * jit.c (struct jit_reader): Declare separately. Add constructor
7947 and destructor. Change type of "handle".
7948 (loaded_jit_reader): Define separately.
7949 (jit_reader_load): Update. New "new".
7950 (jit_reader_unload_command): Use "delete".
7951 * gdb-dlfcn.h (struct dlclose_deleter): New.
7952 (gdb_dlhandle_up): New typedef.
7953 (gdb_dlopen, gdb_dlsym): Update types.
7954 (gdb_dlclose): Remove.
7955 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
7956 (gdb_dlsym): Change type of "handle".
7957 (make_cleanup_dlclose): Remove.
7958 (dlclose_deleter::operator()): Rename from gdb_dlclose.
7959 * compile/compile-c-support.c (load_libcc): Update.
7960
7961 2017-04-12 Tom Tromey <tom@tromey.com>
7962
7963 * symtab.h (find_pcs_for_symtab_line): Change return type.
7964 * symtab.c (find_pcs_for_symtab_line): Change return type.
7965 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
7966 type of "vec". Update.
7967 (ltpy_get_pcs_for_line): Update.
7968 * linespec.c (decode_digits_ordinary): Update.
7969
7970 2017-04-12 Tom Tromey <tom@tromey.com>
7971
7972 * tracepoint.c (actions_command): Update.
7973 * python/python.c (python_command, python_interactive_command):
7974 Update.
7975 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7976 * guile/guile.c (guile_command): Update.
7977 * defs.h (read_command_lines, read_command_lines_1): Return
7978 command_line_up.
7979 (command_lines_deleter): New struct.
7980 (command_line_up): New typedef.
7981 * compile/compile.c (compile_code_command)
7982 (compile_print_command): Update.
7983 * cli/cli-script.h (get_command_line, copy_command_lines): Return
7984 command_line_up.
7985 (make_cleanup_free_command_lines): Remove.
7986 * cli/cli-script.c (get_command_line, read_command_lines_1)
7987 (copy_command_lines): Return command_line_up.
7988 (while_command, if_command, read_command_lines, define_command)
7989 (document_command): Update.
7990 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
7991 Remove.
7992 * breakpoint.h (breakpoint_set_commands): Change type of
7993 "commands".
7994 * breakpoint.c (breakpoint_set_commands): Change type of
7995 "commands". Update.
7996 (do_map_commands_command, update_dprintf_command_list)
7997 (create_tracepoint_from_upload): Update.
7998
7999 2017-04-12 Tom Tromey <tom@tromey.com>
8000
8001 * tracepoint.c (scope_info): Update.
8002 * spu-tdep.c (spu_catch_start): Update.
8003 * python/python.c (gdbpy_decode_line): Update.
8004 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
8005 * python/py-breakpoint.c (bppy_init): Update.
8006 * probe.c (parse_probes): Update.
8007 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
8008 * location.h (event_location_deleter): New struct.
8009 (event_location_up): New typedef.
8010 (new_linespec_location, new_address_location, new_probe_location)
8011 (new_explicit_location, copy_event_location)
8012 (string_to_event_location, string_to_event_location_basic)
8013 (string_to_explicit_location): Update return type.
8014 (make_cleanup_delete_event_location): Remove.
8015 * location.c (new_linespec_location, new_address_location)
8016 (new_probe_location, new_explicit_location, copy_event_location):
8017 Return event_location_up.
8018 (delete_event_location_cleanup)
8019 (make_cleanup_delete_event_location): Remove.
8020 (string_to_explicit_location, string_to_event_location_basic)
8021 (string_to_event_location): Return event_location_up.
8022 * linespec.c (canonicalize_linespec, event_location_to_sals)
8023 (decode_line_with_current_source)
8024 (decode_line_with_last_displayed, decode_objc): Update.
8025 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
8026 * completer.c (location_completer): Update.
8027 * cli/cli-cmds.c (edit_command, list_command): Update.
8028 * breakpoint.c (create_overlay_event_breakpoint)
8029 (create_longjmp_master_breakpoint)
8030 (create_std_terminate_master_breakpoint)
8031 (create_exception_master_breakpoint)
8032 (create_thread_event_breakpoint): Update.
8033 (init_breakpoint_sal): Update. Remove some dead code.
8034 (create_breakpoint_sal): Change type of "location". Update.
8035 (create_breakpoints_sal, create_breakpoint, break_command_1)
8036 (dprintf_command, break_range_command, until_break_command)
8037 (init_ada_exception_breakpoint)
8038 (strace_marker_create_sals_from_location)
8039 (update_static_tracepoint, trace_command, ftrace_command)
8040 (strace_command, create_tracepoint_from_upload): Update.
8041 * break-catch-throw.c (re_set_exception_catchpoint): Update.
8042 * ax-gdb.c (agent_command_1): Update.
8043
8044 2017-04-12 Pedro Alves <palves@redhat.com>
8045
8046 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
8047 * configure.tgt: Handle i[34567]86-*-go32* and
8048 i[34567]86-*-msdosdjgpp*.
8049 * i386-tdep.c (i386_svr4_reg_to_regnum):
8050 Make extern.
8051 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
8052 i386-go32-tdep.c.
8053 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8054 * i386-go32-tdep.c: New file.
8055 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8056 declarations.
8057
8058 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
8059
8060 * aix-thread.c (pd_status2str): Change return type to const char *.
8061
8062 2017-04-12 Pedro Alves <palves@redhat.com>
8063
8064 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8065 calls to set_gdbarch_gnu_triplet_regexp.
8066
8067 2017-04-12 Pedro Alves <palves@redhat.com>
8068
8069 PR gdb/21323
8070 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8071 New enum value.
8072 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8073 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8074 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8075 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8076 * gdbarch.h, gdbarch.c: Regenerate.
8077 * aarch64-tdep.c (aarch64_gdbarch_init): Override
8078 gdbarch_wchar_bit and gdbarch_wchar_signed.
8079 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8080 * arm-tdep.c (arm_gdbarch_init): Likewise.
8081 * avr-tdep.c (avr_gdbarch_init): Likewise.
8082 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8083 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8084 * i386-tdep.c (i386_go32_init_abi): Likewise.
8085 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8086 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8087 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8088 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8089 * sh-tdep.c (sh_gdbarch_init): Likewise.
8090 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8091 * sparc64-tdep.c (sparc64_init_abi): Likewise.
8092 * windows-tdep.c (windows_init_abi): Likewise.
8093 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8094
8095 2017-04-12 Pedro Alves <palves@redhat.com>
8096
8097 PR c++/21323
8098 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8099 cplus_primitive_type_char32_t>: New enum values.
8100 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8101 and cplus_primitive_type_char32_t.
8102 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8103 32, use the archtecture's built-in type for char16_t and char32_t,
8104 respectively. Otherwise, fallback to init_integer_type as before,
8105 but make the type unsigned, and issue a complaint.
8106 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8107
8108 2017-04-12 Alan Hayward <alan.hayward@arm.com>
8109
8110 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
8111 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8112
8113 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8114
8115 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8116 'const char *'.
8117
8118 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8119
8120 * common/common-utils.c (free_vector_argv): New function.
8121 * common/common-utils.h: Include <vector>.
8122 (free_vector_argv): New prototype.
8123 * darwin-nat.c (darwin_create_inferior): Rewrite function
8124 prototype in order to constify "exec_file" and accept a
8125 "std::string" for "allargs".
8126 * fork-child.c: Include <vector>.
8127 (breakup_args): Rewrite function, using C++.
8128 (fork_inferior): Rewrite function header, constify "exec_file_arg"
8129 and accept "std::string" for "allargs". Update the code to
8130 calculate "argv" based on "allargs". Update calls to "exec_fun"
8131 and "execvp".
8132 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8133 order to constify "exec_file" and accept a "std::string" for
8134 "allargs".
8135 * go32-nat.c (go32_create_inferior): Likewise.
8136 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8137 * infcmd.c (run_command_1): Constify "exec_file". Use
8138 "std::string" for inferior arguments.
8139 * inferior.h (fork_inferior): Update prototype.
8140 * linux-nat.c (linux_nat_create_inferior): Rewrite function
8141 prototype in order to constify "exec_file" and accept a
8142 "std::string" for "allargs".
8143 * nto-procfs.c (procfs_create_inferior): Likewise.
8144 * procfs.c (procfs_create_inferior): Likewise.
8145 * remote-sim.c (gdbsim_create_inferior): Likewise.
8146 * remote.c (extended_remote_run): Update code to accept
8147 "std::string" as argument.
8148 (extended_remote_create_inferior): Rewrite function prototype in
8149 order to constify "exec_file" and accept a "std::string" for
8150 "allargs".
8151 * rs6000-nat.c (super_create_inferior): Likewise.
8152 (rs6000_create_inferior): Likewise.
8153 * target.h (struct target_ops) <to_create_inferior>: Likewise.
8154 * windows-nat.c (windows_create_inferior): Likewise.
8155
8156 2017-04-11 Pedro Alves <palves@redhat.com>
8157
8158 * thread.c: Fix whitespace throughout.
8159
8160 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
8161
8162 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
8163
8164 2017-04-11 Alan Hayward <alan.hayward@arm.com>
8165
8166 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
8167
8168 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
8169
8170 PR gdb/21364
8171 * osdata.c (info_osdata): Check if 'type' is an empty string
8172 instead of NULL.
8173
8174 2017-04-10 Pedro Alves <palves@redhat.com>
8175
8176 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
8177 (ptid_to_global_thread_id, in_thread_list)
8178 (do_captured_list_thread_ids, set_resumed, set_running)
8179 (set_executing, set_stop_requested, finish_thread_state)
8180 (validate_registers_access, can_access_registers_ptid)
8181 (print_thread_info_1, switch_to_thread)
8182 (do_restore_current_thread_cleanup)
8183 (make_cleanup_restore_current_thread, thread_command)
8184 (thread_name_command): Use operator== instead of ptid_equal.
8185
8186 2017-04-10 Pedro Alves <palves@redhat.com>
8187
8188 * thread.c (struct current_thread_cleanup) <next>: Delete field.
8189 (current_thread_cleanup_chain): Delete.
8190 (restore_current_thread_cleanup_dtor)
8191 (make_cleanup_restore_current_thread): Remove references to
8192 current_thread_cleanup_chain.
8193
8194 2017-04-10 Alan Hayward <alan.hayward@arm.com>
8195
8196 * msp430-tdep.c (msp430_pseudo_register_read): Never return
8197 REG_UNKNOWN.
8198
8199 2017-04-10 Yao Qi <yao.qi@linaro.org>
8200
8201 PR gdb/19942
8202 * gdbthread.h (thread_info::deletable): New method.
8203 (thread_info::incref): New method.
8204 (thread_info::decref): New method.
8205 (thread_info::refcount): Move it to private.
8206 * infrun.c (save_stop_context): Call inc_refcount.
8207 (release_stop_context_cleanup): Likewise.
8208 * thread.c (set_thread_exited): New function.
8209 (init_thread_list): Delete "tp" only it is deletable, otherwise
8210 call set_thread_exited.
8211 (delete_thread_1): Call set_thread_exited.
8212 (current_thread_cleanup) <inferior_pid>: Remove.
8213 <thread>: New field.
8214 (restore_current_thread_ptid_changed): Removed.
8215 (do_restore_current_thread_cleanup): Adjust.
8216 (restore_current_thread_cleanup_dtor): Don't call
8217 find_thread_ptid.
8218 (set_thread_refcount): Use dec_refcount.
8219 (make_cleanup_restore_current_thread): Adjust.
8220 (thread_apply_all_command): Call inc_refcount.
8221 (_initialize_thread): Don't call
8222 observer_attach_thread_ptid_changed.
8223
8224 2017-04-10 Yao Qi <yao.qi@linaro.org>
8225
8226 * thread.c (delete_thread_1): Hoist code on marking thread as
8227 exited.
8228
8229 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8230
8231 * windows-nat.c (windows_detach): Initialize ptid with
8232 minus_one_ptid.
8233
8234 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
8235
8236 * unittests/ptid-selftests.c: Fix erroneous assert messages.
8237
8238 2017-04-07 Alan Hayward <alan.hayward@arm.com>
8239
8240 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8241 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8242 (bfin_pseudo_register_write): Likewise
8243
8244 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
8245
8246 * common/ptid.h (struct ptid): Change to...
8247 (class ptid_t): ... this.
8248 <ptid_t>: New constructors.
8249 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
8250 matches>: New methods.
8251 <make_null, make_minus_one>: New static methods.
8252 <pid>: Rename to...
8253 <m_pid>: ...this.
8254 <lwp>: Rename to...
8255 <m_lwp>: ...this.
8256 <tid>: Rename to...
8257 <m_tid>: ...this.
8258 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
8259 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
8260 as references, move comment to class ptid_t.
8261 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
8262 ptid_t static methods.
8263 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
8264 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
8265 Take ptid arguments as references, implement using ptid_t methods.
8266 * unittests/ptid-selftests.c: New file.
8267 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8268 unittests/ptid-selftests.c.
8269 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
8270
8271 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
8272
8273 * python/python.c (python_run_simple_file): Cast mode literal to
8274 non-const char pointer as expected by PyFile_FromString.
8275
8276 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
8277
8278 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
8279 minus_one_ptid and null_ptid.
8280
8281 2017-04-05 Pedro Alves <palves@redhat.com>
8282
8283 * warning.m4 (build_warnings): Remove -Wno-write-strings.
8284 * configure: Regenerate.
8285
8286 2017-04-05 Pedro Alves <palves@redhat.com>
8287
8288 * ada-exp.y (yyerror): Constify.
8289 * ada-lang.c (bound_name, get_selections)
8290 (ada_variant_discrim_type)
8291 (ada_variant_discrim_name, ada_value_struct_elt)
8292 (ada_lookup_struct_elt_type, is_unchecked_variant)
8293 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
8294 (catch_ada_exception_command_split)
8295 (catch_ada_assert_command_split, catch_assert_command)
8296 (ada_op_name): Constify.
8297 * ada-lang.h (ada_yyerror, get_selections)
8298 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
8299 * arc-tdep.c (arc_print_frame_cache): Constify.
8300 * arm-tdep.c (arm_skip_stub): Constify.
8301 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
8302 (gen_aggregate_elt_ref): Constify.
8303 * bcache.c (print_bcache_statistics): Constify.
8304 * bcache.h (print_bcache_statistics): Constify.
8305 * break-catch-throw.c (catch_exception_command_1):
8306 * breakpoint.c (struct ep_type_description::description):
8307 Constify.
8308 (add_solib_catchpoint): Constify.
8309 (catch_fork_command_1): Add cast.
8310 (add_catch_command): Constify.
8311 * breakpoint.h (add_catch_command, add_solib_catchpoint):
8312 Constify.
8313 * bsd-uthread.c (bsd_uthread_state): Constify.
8314 * buildsym.c (patch_subfile_names): Constify.
8315 * buildsym.h (next_symbol_text_func, patch_subfile_names):
8316 Constify.
8317 * c-exp.y (yyerror): Constify.
8318 (token::oper): Constify.
8319 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
8320 * c-varobj.c (cplus_describe_child): Constify.
8321 * charset.c (find_charset_names): Add cast.
8322 (find_charset_names): Constify array and add const_cast.
8323 * cli/cli-cmds.c (complete_command, cd_command): Constify.
8324 (edit_command): Constify.
8325 * cli/cli-decode.c (lookup_cmd): Constify.
8326 * cli/cli-dump.c (dump_memory_command, dump_value_command):
8327 Constify.
8328 (struct dump_context): Constify.
8329 (add_dump_command, restore_command): Constify.
8330 * cli/cli-script.c (get_command_line): Constify.
8331 * cli/cli-script.h (get_command_line): Constify.
8332 * cli/cli-utils.c (check_for_argument): Constify.
8333 * cli/cli-utils.h (check_for_argument): Constify.
8334 * coff-pe-read.c (struct read_pe_section_data): Constify.
8335 * command.h (lookup_cmd): Constify.
8336 * common/print-utils.c (decimal2str): Constify.
8337 * completer.c (gdb_print_filename): Constify.
8338 * corefile.c (set_gnutarget): Constify.
8339 * cp-name-parser.y (yyerror): Constify.
8340 * cp-valprint.c (cp_print_class_member): Constify.
8341 * cris-tdep.c (cris_register_name, crisv32_register_name):
8342 Constify.
8343 * d-exp.y (yyerror): Constify.
8344 (struct token::oper): Constify.
8345 * d-lang.h (d_yyerror): Constify.
8346 * dbxread.c (struct header_file_location::name): Constify.
8347 (add_old_header_file, add_new_header_file, last_function_name)
8348 (dbx_next_symbol_text, add_bincl_to_list)
8349 (find_corresponding_bincl_psymtab, set_namestring)
8350 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
8351 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
8352 * defs.h (command_line_input, print_address_symbolic)
8353 (deprecated_readline_begin_hook): Constify.
8354 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
8355 Constify.
8356 * event-top.c (handle_line_of_input): Constify and add cast.
8357 * exceptions.c (catch_errors): Constify.
8358 * exceptions.h (catch_errors): Constify.
8359 * expprint.c (print_subexp_standard, op_string, op_name)
8360 (op_name_standard, dump_raw_expression, dump_raw_expression):
8361 * expression.h (op_name, op_string, dump_raw_expression):
8362 Constify.
8363 * f-exp.y (yyerror): Constify.
8364 (struct token::oper): Constify.
8365 (struct f77_boolean_val::name): Constify.
8366 * f-lang.c (f_word_break_characters): Constify.
8367 * f-lang.h (f_yyerror): Constify.
8368 * fork-child.c (fork_inferior): Add cast.
8369 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
8370 (new_variant): Constify.
8371 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
8372 * gdbarch.c: Regenerate.
8373 * gdbcore.h (set_gnutarget): Constify.
8374 * go-exp.y (yyerror): Constify.
8375 (token::oper): Constify.
8376 * go-lang.h (go_yyerror): Constify.
8377 * go32-nat.c (go32_sysinfo): Constify.
8378 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
8379 * guile/scm-cmd.c (cmdscm_function): Constify.
8380 * guile/scm-param.c (pascm_param_value): Constify.
8381 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
8382 (h8300sx_register_name): Constify.
8383 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
8384 Constify.
8385 * ia64-tdep.c (ia64_register_names): Constify.
8386 * infcmd.c (construct_inferior_arguments): Constify.
8387 (path_command, attach_post_wait): Constify.
8388 * language.c (show_range_command, show_case_command)
8389 (unk_lang_error): Constify.
8390 * language.h (language_defn::la_error)
8391 (language_defn::la_name_of_this): Constify.
8392 * linespec.c (decode_line_2): Constify.
8393 * linux-thread-db.c (thread_db_err_str): Constify.
8394 * lm32-tdep.c (lm32_register_name): Constify.
8395 * m2-exp.y (yyerror): Constify.
8396 * m2-lang.h (m2_yyerror): Constify.
8397 * m32r-tdep.c (m32r_register_names): Constify and make static.
8398 * m68hc11-tdep.c (m68hc11_register_names): Constify.
8399 * m88k-tdep.c (m88k_register_name): Constify.
8400 * macroexp.c (appendmem): Constify.
8401 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
8402 (upgrade_type, parse_external, parse_partial_symbols)
8403 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
8404 (new_symbol): Constify.
8405 * memattr.c (mem_info_command): Constify.
8406 * mep-tdep.c (register_name_from_keyword): Constify.
8407 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
8408 Constify.
8409 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
8410 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
8411 * mi/mi-main.c (captured_mi_execute_command): Constify and add
8412 cast.
8413 (mi_execute_async_cli_command): Constify.
8414 * mips-tdep.c (mips_register_name): Constify.
8415 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
8416 (am33_register_name, am33_2_register_name)
8417 * moxie-tdep.c (moxie_register_names): Constify.
8418 * nat/linux-osdata.c (osdata_type): Constify fields.
8419 * nto-tdep.c (nto_parse_redirection): Constify.
8420 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
8421 (lookup_child_selector): Constify.
8422 (objc_methcall::name): Constify.
8423 * objc-lang.h (lookup_objc_class, lookup_child_selector)
8424 (lookup_struct_typedef): Constify.
8425 * objfiles.c (pc_in_section): Constify.
8426 * objfiles.h (pc_in_section): Constify.
8427 * p-exp.y (struct token::oper): Constify.
8428 (yyerror): Constify.
8429 * p-lang.h (pascal_yyerror): Constify.
8430 * parser-defs.h (op_name_standard): Constify.
8431 (op_print::string): Constify.
8432 (exp_descriptor::op_name): Constify.
8433 * printcmd.c (print_address_symbolic): Constify.
8434 * psymtab.c (print_partial_symbols): Constify.
8435 * python/py-breakpoint.c (stop_func): Constify.
8436 (bppy_get_expression): Constify.
8437 * python/py-cmd.c (cmdpy_completer::name): Constify.
8438 (cmdpy_function): Constify.
8439 * python/py-event.c (evpy_add_attribute)
8440 (gdbpy_initialize_event_generic): Constify.
8441 * python/py-event.h (evpy_add_attribute)
8442 (gdbpy_initialize_event_generic): Constify.
8443 * python/py-evts.c (add_new_registry): Constify.
8444 * python/py-finishbreakpoint.c (outofscope_func): Constify.
8445 * python/py-framefilter.c (get_py_iter_from_func): Constify.
8446 * python/py-inferior.c (get_buffer): Add cast.
8447 * python/py-param.c (parm_constant::name): Constify.
8448 * python/py-unwind.c (fprint_frame_id): Constify.
8449 * python/python.c (gdbpy_parameter_value): Constify.
8450 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
8451 * remote.c (memory_packet_config::name): Constify.
8452 (show_packet_config_cmd, remote_write_bytes)
8453 (remote_buffer_add_string):
8454 * reverse.c (exec_reverse_once): Constify.
8455 * rs6000-tdep.c (variant::name, variant::description): Constify.
8456 * rust-exp.y (rustyyerror): Constify.
8457 * rust-lang.c (rust_op_name): Constify.
8458 * rust-lang.h (rustyyerror): Constify.
8459 * serial.h (serial_ops::name): Constify.
8460 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
8461 (sh_sh3e_register_name, sh_sh2e_register_name)
8462 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
8463 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
8464 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
8465 (sh_sh4al_dsp_register_name): Constify.
8466 * sh64-tdep.c (sh64_register_name): Constify.
8467 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
8468 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
8469 * stabsread.c (patch_block_stabs, read_type_number)
8470 (ref_map::stabs, ref_add, process_reference)
8471 (symbol_reference_defined, define_symbol, define_symbol)
8472 (error_type, read_type, read_member_functions, read_cpp_abbrev)
8473 (read_one_struct_field, read_struct_fields, read_baseclasses)
8474 (read_tilde_fields, read_struct_type, read_array_type)
8475 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
8476 (read_huge_number, read_range_type, read_args, common_block_start)
8477 (find_name_end): Constify.
8478 * stabsread.h (common_block_start, define_symbol)
8479 (process_one_symbol, symbol_reference_defined, ref_add):
8480 * symfile.c (get_section_index, add_symbol_file_command):
8481 * symfile.h (get_section_index): Constify.
8482 * target-descriptions.c (tdesc_type::name): Constify.
8483 (tdesc_free_type): Add cast.
8484 * target.c (find_default_run_target):
8485 (add_deprecated_target_alias, find_default_run_target)
8486 (target_announce_detach): Constify.
8487 (do_option): Constify.
8488 * target.h (add_deprecated_target_alias): Constify.
8489 * thread.c (print_thread_info_1): Constify.
8490 * top.c (deprecated_readline_begin_hook, command_line_input):
8491 Constify.
8492 (init_main): Add casts.
8493 * top.h (handle_line_of_input): Constify.
8494 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
8495 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
8496 (tfind_command): Rename to ...
8497 (tfind_command_1): ... this and constify.
8498 (tfind_command): New function.
8499 (tfind_end_command, tfind_start_command): Adjust.
8500 (encode_source_string): Constify.
8501 * tracepoint.h (encode_source_string): Constify.
8502 * tui/tui-data.c (tui_partial_win_by_name): Constify.
8503 * tui/tui-data.h (tui_partial_win_by_name): Constify.
8504 * tui/tui-source.c (tui_set_source_content_nil): Constify.
8505 * tui/tui-source.h (tui_set_source_content_nil): Constify.
8506 * tui/tui-win.c (parse_scrolling_args): Constify.
8507 * tui/tui-windata.c (tui_erase_data_content): Constify.
8508 * tui/tui-windata.h (tui_erase_data_content): Constify.
8509 * tui/tui-winsource.c (tui_erase_source_content): Constify.
8510 * tui/tui.c (tui_enable): Add cast.
8511 * utils.c (defaulted_query): Constify.
8512 (init_page_info): Add cast.
8513 (puts_debug, subset_compare): Constify.
8514 * utils.h (subset_compare): Constify.
8515 * varobj.c (varobj_format_string): Constify.
8516 * varobj.h (varobj_format_string): Constify.
8517 * vax-tdep.c (vax_register_name): Constify.
8518 * windows-nat.c (windows_detach): Constify.
8519 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
8520 * xml-support.c (gdb_xml_end_element): Constify.
8521 * xml-tdesc.c (tdesc_start_reg): Constify.
8522 * xstormy16-tdep.c (xstormy16_register_name): Constify.
8523 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
8524 * xtensa-tdep.h (xtensa_register_t::name): Constify.
8525
8526 2017-04-05 Pedro Alves <palves@redhat.com>
8527
8528 * proc-api.c (struct trans): Constify.
8529 (procfs_note): Constify.
8530 * proc-events.c (struct trans, syscall_table):
8531 * proc-flags.c (struct trans): Constify.
8532 * proc-utils.h (procfs_note): Constify.
8533 * proc-why.c (struct trans): Constify.
8534 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
8535 (procfs_detach): Constify.
8536 * sol-thread.c (struct string_map): Constify.
8537 (td_err_string, td_state_string): Constify.
8538
8539 2017-04-05 Pedro Alves <palves@redhat.com>
8540
8541 * proc-api.c (procfs_filename): Don't initialize
8542 procfs_filename.
8543 (prepare_to_trace): Assume procfs_filename is non-NULL.
8544 (_initialize_proc_api): Give procfs_filename a default value here.
8545
8546 2017-04-05 Pedro Alves <palves@redhat.com>
8547
8548 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
8549 'cond_string' parameter.
8550 (extract_exception_regexp): Constify 'string' parameter.
8551 (catch_exception_command_1): Constify.
8552 * breakpoint.c (init_catchpoint)
8553 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
8554 parameter.
8555 (ep_parse_optional_if_clause, catch_fork_command_1)
8556 (catch_exec_command_1): Constify.
8557 * breakpoint.h (init_catchpoint): Constify 'cond_string'
8558 parameter.
8559 (ep_parse_optional_if_clause): Constify.
8560 * cli/cli-utils.c (remove_trailing_whitespace)
8561 (check_for_argument): Constify.
8562 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
8563 non-const overload.
8564 (check_for_argument): Likewise.
8565
8566 2017-04-05 Pedro Alves <palves@redhat.com>
8567
8568 * event-top.c (command_line_handler): Add cast to execute_command
8569 call.
8570 * record-btrace.c (cmd_record_btrace_bts_start)
8571 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
8572 (cmd_record_btrace_start): Add cast to execute_command call.
8573 * record-full.c (record_full_goto_insn):
8574 * record.c (record_start, record_stop): Add cast to
8575 execute_command_to_string calls.
8576 (cmd_record_start): Add cast to execute_command calls.
8577
8578 2017-04-05 Pedro Alves <palves@redhat.com>
8579
8580 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
8581 static inline function.
8582 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
8583 array and use gdb_PyArg_ParseTupleAndKeywords.
8584 * python/py-cmd.c (cmdpy_init): Likewise.
8585 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
8586 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
8587 (infpy_search_memory): Likewise.
8588 * python/py-objfile.c (objfpy_add_separate_debug_file)
8589 (gdbpy_lookup_objfile): Likewise.
8590 * python/py-symbol.c (gdbpy_lookup_symbol)
8591 (gdbpy_lookup_global_symbol): Likewise.
8592 * python/py-type.c (gdbpy_lookup_type): Likewise.
8593 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
8594 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
8595 Likewise.
8596
8597 2017-04-05 Pedro Alves <palves@redhat.com>
8598
8599 * python/python-internal.h (gdb_PyGetSetDef): New type.
8600 * python/py-block.c (block_object_getset)
8601 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
8602 * python/py-event.c (event_object_getset)
8603 (finish_breakpoint_object_getset): Likewise.
8604 * python/py-inferior.c (inferior_object_getset): Likewise.
8605 * python/py-infthread.c (thread_object_getset): Likewise.
8606 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
8607 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
8608 * python/py-objfile.c (objfile_getset): Likewise.
8609 * python/py-progspace.c (pspace_getset): Likewise.
8610 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
8611 Likewise.
8612 * python/py-record.c (recpy_record_getset): Likewise.
8613 * python/py-symbol.c (symbol_object_getset): Likewise.
8614 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
8615 Likewise.
8616 * python/py-type.c (type_object_getset, field_object_getset):
8617 Likewise.
8618 * python/py-value.c (value_object_getset): Likewise.
8619
8620 2017-04-05 Pedro Alves <palves@redhat.com>
8621
8622 * python/python-internal.h (gdb_PyObject_CallMethod)
8623 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
8624 New functions.
8625 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
8626 (PySys_GetObject, PySys_SetPath): New macros.
8627
8628 2017-04-05 Pedro Alves <palves@redhat.com>
8629
8630 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
8631 info_osdata_command.
8632 * osdata.c (info_osdata_command): Rename to ...
8633 (info_osdata): ... this. Constify 'type' parameter, and remove
8634 the 'from_tty' parameter. Accept NULL TYPE.
8635 (info_osdata_command): New function.
8636 * osdata.h (info_osdata_command): Remove declaration.
8637 (info_osdata): New declaration.
8638
8639 2017-04-05 Pedro Alves <palves@redhat.com>
8640
8641 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
8642 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
8643 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
8644 parameter.
8645 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
8646 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
8647 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
8648 parameter.
8649 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
8650 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
8651 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
8652 (mi_cmd_file_list_exec_source_files)
8653 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
8654 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8655 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
8656 parameter.
8657 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
8658 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
8659 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
8660 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
8661 (mi_cmd_stack_info_frame): Constify 'command' parameter.
8662 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
8663 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
8664 'command' parameter.
8665 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
8666 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
8667 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
8668 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
8669 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
8670 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
8671 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
8672 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
8673 (mi_cmd_var_set_update_range): Constify 'command' parameter.
8674 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
8675 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
8676 parameter.
8677 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
8678 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
8679 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
8680 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
8681 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
8682 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
8683 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
8684 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
8685 (mi_cmd_data_list_changed_registers)
8686 (mi_cmd_data_write_register_values)
8687 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8688 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8689 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8690 (mi_cmd_list_features, mi_cmd_list_target_features)
8691 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8692 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8693 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8694 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8695 (mi_cmd_trace_frame_collected): Constify 'command'
8696 parameter.
8697 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8698 'command' parameter.
8699
8700 2017-04-05 Pedro Alves <palves@redhat.com>
8701
8702 * ada-lang.c (ada_completer_word_break_characters): Now a const
8703 array.
8704 (ada_get_gdb_completer_word_break_characters): Constify.
8705 * completer.c (gdb_completer_command_word_break_characters)
8706 (gdb_completer_file_name_break_characters)
8707 (gdb_completer_quote_characters): Now const arrays.
8708 (get_gdb_completer_quote_characters): Constify.
8709 (set_rl_completer_word_break_characters): New function.
8710 (set_gdb_completion_word_break_characters)
8711 (complete_line_internal): Use it.
8712 * completer.h (get_gdb_completer_quote_characters): Constify.
8713 (set_rl_completer_word_break_characters): Declare.
8714 * f-lang.c (f_word_break_characters): Constify.
8715 * language.c (default_word_break_characters): Constify.
8716 * language.h (language_defn::la_word_break_characters): Constify.
8717 (default_word_break_characters): Constify.
8718 * top.c (init_main): Use set_rl_completer_word_break_characters.
8719
8720 2017-04-05 Pedro Alves <palves@redhat.com>
8721
8722 * aix-thread.c (aix_thread_pid_to_str)
8723 (aix_thread_extra_thread_info): Constify.
8724 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8725 * bsd-uthread.c (bsd_uthread_extra_thread_info)
8726 (bsd_uthread_pid_to_str): Constify.
8727 * corelow.c (core_pid_to_str): Constify.
8728 * darwin-nat.c (darwin_pid_to_str): Constify.
8729 * fbsd-nat.c (fbsd_pid_to_str): Constify.
8730 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8731 Constify.
8732 * gnu-nat.c (gnu_pid_to_str): Constify.
8733 * go32-nat.c (go32_pid_to_str): Constify.
8734 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8735 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8736 * inferior.c (inferior_pid_to_str): Constify.
8737 * linux-nat.c (linux_nat_pid_to_str): Constify.
8738 * linux-tdep.c (linux_core_pid_to_str): Constify.
8739 * linux-thread-db.c (thread_db_pid_to_str)
8740 (thread_db_extra_thread_info): Constify.
8741 * nto-tdep.c (nto_extra_thread_info): Constify.
8742 * nto-tdep.h (nto_extra_thread_info): Constify.
8743 * obsd-nat.c (obsd_pid_to_str): Constify.
8744 * procfs.c (procfs_pid_to_str): Constify.
8745 * ravenscar-thread.c (ravenscar_extra_thread_info)
8746 (ravenscar_pid_to_str): Constify.
8747 * remote-sim.c (gdbsim_pid_to_str): Constify.
8748 * remote.c (remote_threads_extra_info, remote_pid_to_str):
8749 Constify.
8750 * sol-thread.c (solaris_pid_to_str): Constify.
8751 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8752 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8753 * target.c (default_pid_to_str, target_pid_to_str)
8754 (normal_pid_to_str, default_pid_to_str): Constify.
8755 * target.h (target_ops::to_pid_to_str)
8756 (target_ops::to_extra_thread_info): Constify.
8757 (target_pid_to_str, normal_pid_to_str): Constify.
8758 * windows-nat.c (windows_pid_to_str): Constify.
8759 * gdbarch.sh (core_pid_to_str): Constify.
8760 * target-delegates.c: Regenerate.
8761 * gdbarch.h, gdbarch.c: Regenerate.
8762
8763 2017-04-05 Pedro Alves <palves@redhat.com>
8764
8765 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8766 the memory of the temporary warning_pre_print override.
8767 * utils.c (warning_pre_print): Constify.
8768 * utils.h (warning_pre_print): Constify.
8769
8770 2017-04-05 Pedro Alves <palves@redhat.com>
8771
8772 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8773 (shell_command): New function.
8774 (make_command): Use std::string.
8775 (init_cli_cmds): Register shell_command instead of shell_escape.
8776
8777 2017-04-05 Pedro Alves <palves@redhat.com>
8778
8779 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
8780 * tracepoint.c (default_collect): Don't initialize.
8781
8782 2017-04-05 Pedro Alves <palves@redhat.com>
8783
8784 * macroexp.c (macro_buffer::shared): Now a bool.
8785 (init_buffer): Update.
8786 (init_shared_buffer): Constify 'addr' parameter.
8787 (substitute_args, expand, macro_expand, macro_expand_next): Remove
8788 casts.
8789
8790 2017-04-05 Pedro Alves <palves@redhat.com>
8791
8792 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
8793 * disasm.c (set_disassembler_options): Constify local.
8794 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
8795
8796 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
8797
8798 PR gdb/21352
8799 * tracefile.c (tsave_command): Fix argument parsing for '-r'
8800 option.
8801
8802 2017-04-05 Yao Qi <yao.qi@linaro.org>
8803
8804 * frame.c (frame_unwind_register_unsigned): Call
8805 frame_unwind_register_value.
8806
8807 2017-04-05 Yao Qi <yao.qi@linaro.org>
8808
8809 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
8810 Use gdb_test_multiple, and don't match anchor.
8811
8812 2017-04-05 Pedro Alves <palves@redhat.com>
8813
8814 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
8815 (Write After Approval): Remove Simon Marchi.
8816
8817 2017-04-05 Pedro Alves <palves@redhat.com>
8818
8819 * common/gdb_optional.h (optional::optional): Make constexpr and
8820 initialize m_dummy.
8821
8822 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8823
8824 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8825 (amd64fbsd_jmp_buf_reg_offset): Remove.
8826 (amd64fbsd_supply_uthread): Remove function.
8827 (amd64fbsd_collect_uthread): Remove function.
8828 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
8829 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
8830 (x86_64-*-freebsd*): Remove bsd-uthread.o.
8831 (fbsd-nat.c): Update comment.
8832 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8833 (i386fbsd_jmp_buf_reg_offset): Remove.
8834 (i386fbsd_supply_uthread): Remove function.
8835 (i386fbsd_collect_uthread): Remove function.
8836 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
8837
8838 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8839
8840 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
8841 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
8842 * NEWS: Mention that support for FreeBSD/alpha was removed.
8843 * alpha-fbsd-tdep.c: Delete file.
8844 * config/alpha/fbsd.mh: Delete file.
8845 * configure.host: Delete alpha*-*-freebsd* and
8846 alpha*-*-kfreebsd*-gnu.
8847 * configure.tgt: Delete alpha*-*-freebsd* and
8848 alpha*-*-kfreebsd*-gnu.
8849
8850 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8851
8852 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
8853 amd64bsd_store_inferior_registers): Use ptid from regcache.
8854
8855 2017-04-04 Pedro Alves <palves@redhat.com>
8856
8857 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
8858 data fields, make them private and add "m_" prefixes.
8859 (lnp_state_machine::lnp_state_machine): New ctor.
8860 (record_line, check_line_address, handle_set_discriminator)
8861 (handle_set_address, handle_advance_pc, handle_special_opcode)
8862 (handle_advance_line, handle_set_file, handle_negate_stmt)
8863 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
8864 (end_sequence, advance_line): New methods.
8865 (m_gdbarch, m_record_lines_p): New fields.
8866 (lnp_reader_state): Delete.
8867 (dwarf_record_line): Rename to ...
8868 (lnp_state_machine::record_line): ... adjust.
8869 (init_lnp_state_machine): Delete.
8870 (lnp_state_machine::lnp_state_machine): New.
8871 (check_line_address): Rename to ...
8872 (lnp_state_machine::check_line_address): This.
8873 (dwarf_decode_lines_1): Remove reference to "reader_state".
8874 Adjust lnp_state_machine having a non-default ctor. Use bool.
8875 State machine internal state manipulation moved to
8876 lnp_state_machine methods.
8877
8878 2017-04-04 Pedro Alves <palves@redhat.com>
8879
8880 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8881 unittests/offset-type-selftests.c.
8882 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
8883 * common/offset-type.h: New file.
8884 * common/preprocessor.h: New file.
8885 * common/traits.h: New file.
8886 * common/valid-expr.h: New file.
8887 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
8888 sect_offset and cu_offset strong typedefs throughout.
8889 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
8890 typedefs throughout.
8891 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
8892 sect_offset and cu_offset strong typedefs throughout.
8893 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
8894 typedefs throughout.
8895 * gdbtypes.h: Include "common/offset-type.h".
8896 (cu_offset): Now an offset type (strong typedef) instead of a
8897 struct.
8898 (sect_offset): Likewise.
8899 (union call_site_parameter_u): Rename "param_offset" field to
8900 "param_cu_off".
8901 * unittests/offset-type-selftests.c: New file.
8902
8903 2017-04-04 Pedro Alves <palves@redhat.com>
8904
8905 * common/underlying.h: New file.
8906 * dwarf2read.c: Include "common/gdb_optional.h" and
8907 "common/underlying.h".
8908 (dir_index, file_name_index): New types.
8909 (file_entry): Use them.
8910 (file_entry::include): Use to_underlying.
8911 (line_header::add_file_name): Use dir_index.
8912 (read_formatted_entries): Use gdb::optional. Read form before
8913 writting to file_entry.
8914 (dwarf_decode_line_header): Use dir_index.
8915 (lnp_state_machine::current_file): Use to_underlying.
8916 (lnp_state_machine::file): Change type to file_name_index.
8917 (dwarf_record_line): Use to_underlying.
8918 (init_lnp_state_machine): Use file_name_index.
8919 (dwarf_decode_lines_1): Use dir_index and file_name_index.
8920
8921 2017-04-04 Pedro Alves <palves@redhat.com>
8922
8923 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
8924 operator bool, has_value and get methods.
8925
8926 2017-04-04 Pedro Alves <palves@redhat.com>
8927
8928 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
8929 fields.
8930 (line_header): Initialize all data fields. Change type of
8931 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
8932 Change type of include_dirs to std::vector<const char *>. Remove
8933 num_include_dirs, include_dirs_size. Change type of file_names to
8934 std::vector<file_entry>. Remove num_file_names, file_names_size.
8935 (line_header::line_header): New.
8936 (line_header::add_include_dir, line_header::add_file_name): New
8937 methods.
8938 (line_header::include_dir_at): Remove NULL check.
8939 (line_header::file_name_at): Add const overload.
8940 (line_header_up): New unique_ptr typedef.
8941 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
8942 std::vector. Remove free_line_header call.
8943 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
8944 free_line_header call.
8945 (free_cu_line_header): Delete.
8946 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
8947 (setup_type_unit_groups): Use line_header_up instead of cleanups.
8948 Adjust to use std::vector.
8949 (free_line_header): Delete.
8950 (free_line_header_voidp): Use delete.
8951 (add_include_dir): Replace with ...
8952 (line_header::add_include_dir): ... this method. Use std::vector.
8953 (add_file_name): Replace with ...
8954 (line_header::add_file_name): ... this method. Use std::vector.
8955 (add_include_dir_stub): Delete.
8956 (read_formatted_entries): Remove memset.
8957 (dwarf_decode_line_header): Return a line_header_up instead of a
8958 raw pointer. Remove cleanup handling. Pass lambdas to
8959 read_formatted_entries. Adjust to use line_header methods.
8960 (dwarf_decode_lines_1): Adjust to use line_header methods.
8961 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
8962 use std::vector.
8963
8964 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
8965
8966 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
8967 instead of struct ptid.
8968
8969 2017-05-04 Alan Hayward <alan.hayward@arm.com>
8970
8971 * frame.c (get_frame_register_bytes): Unwind using value.
8972 (put_frame_register_bytes): Likewise.
8973
8974 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
8975
8976 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
8977 aggregate-like.
8978
8979 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
8980
8981 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
8982
8983 2017-03-29 Yao Qi <yao.qi@linaro.org>
8984
8985 * gdbthread.h (struct thread_info): Declare constructor and
8986 destructor. Add some in-class member initializers.
8987 * thread.c (free_thread): Remove.
8988 (init_thread_list): Call delete instead of free_thread.
8989 (new_thread): Call thread_info constructor.
8990 (thread_info::thread_info): New function.
8991 (thread_info::~thread_info): New function.
8992 (delete_thread_1): Call delete instead of free_thread.
8993 (make_cleanup_restore_current_thread): Move tp and frame to
8994 inner block.
8995
8996 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8997
8998 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
8999 (arc_skip_prologue): Likewise.
9000 (arc_make_frame_cache): Likewise.
9001 (arc_pv_get_operand): New function.
9002 (arc_is_in_prologue): Likewise.
9003 (arc_analyze_prologue): Likewise.
9004 (arc_print_frame_cache): Likewise.
9005 (MAX_PROLOGUE_LENGTH): New constant.
9006
9007 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9008
9009 * configure.tgt: Add arc-insn.o.
9010 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
9011 (dump_arc_instruction_command): New function.
9012 (arc_fprintf_disasm): Likewise.
9013 (arc_disassemble_info): Likewise.
9014 (arc_insn_get_operand_value): Likewise.
9015 (arc_insn_get_operand_value_signed): Likewise.
9016 (arc_insn_get_memory_base_reg): Likewise.
9017 (arc_insn_get_memory_offset): Likewise.
9018 (arc_insn_get_branch_target): Likewise.
9019 (arc_insn_dump): Likewise.
9020 (arc_insn_get_linear_next_pc): Likewise.
9021 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
9022 (arc_disassemble_info): Likewise.
9023 (arc_insn_get_branch_target): Likewise.
9024 (arc_insn_get_linear_next_pc): Likewise.
9025 * NEWS: Mention new "maint print arc arc-instruction".
9026
9027 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9028
9029 * arc-tdep (maintenance_print_arc_list): New variable.
9030 (maintenance_print_arc_command): New function.
9031
9032 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9033
9034 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
9035 Add "limm" and "reserved".
9036 (arc_cannot_fetch_register, arc_cannot_store_register): Add
9037 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
9038 * arc-tdep.h (arc_regnum): Likewise.
9039
9040 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9041
9042 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9043 for THREADPTR register.
9044 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
9045 register.
9046 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
9047 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
9048 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
9049
9050 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9051
9052 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
9053 registers above gdbarch_num_regs (gdbarch) as privileged in
9054 call0 ABI.
9055
9056 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9057
9058 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9059 for a single specified register or for all registers in
9060 a0_base..a0_base + C0_NREGS range.
9061 (supply_gregset_reg): Call regcache_raw_supply for a single
9062 specified register or for all registers in a0_base..a0_base +
9063 C0_NREGS range.
9064
9065 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9066
9067 * arch/xtensa.h (C0_NREGS): Add definition.
9068 * xtensa-tdep.c (C0_NREGS): Remove definition.
9069
9070 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9071
9072 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9073 Drop xtensa_default_isa initialization.
9074 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9075
9076 2017-03-27 Pedro Alves <palves@redhat.com>
9077
9078 * dwarf2read.c (file_entry) <dir_index>: Add comment.
9079 (file_entry::include_dir): New method.
9080 (line_header::include_dir_at, line_header::file_name_at): New
9081 methods.
9082 (setup_type_unit_groups, setup_type_unit_groups)
9083 (psymtab_include_file_name): Simplify using the new methods.
9084 (lnp_state_machine) <the_line_header>: New field.
9085 <file>: Add comment.
9086 (lnp_state_machine::current_file): New method.
9087 (dwarf_record_line): Simplify using the new methods.
9088 (init_lnp_state_machine): Initialize the "the_line_header" field.
9089 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9090 Simplify using the new methods.
9091
9092 2017-03-27 Pedro Alves <palves@redhat.com>
9093
9094 * cp-name-parser.y (make_empty): Delete.
9095 (demangler_special, nested_name, ptr_operator, array_indicator)
9096 (direct_declarator, declarator_1): Use fill_comp instead of
9097 make_empty.
9098
9099 2017-03-27 Pedro Alves <palves@redhat.com>
9100
9101 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9102 to ATTRIBUTE_PRINTF.
9103 * solib-target.c (library_list_start_list): Print "string" not
9104 "version".
9105 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9106 gdb_xml_error call.
9107
9108 2017-03-27 Pedro Alves <palves@redhat.com>
9109
9110 * dwarf2read.c (struct file_and_directory): New.
9111 (dwarf2_get_dwz_file): Adjust to use std::string.
9112 (dw2_get_file_names_reader): Adjust to use file_and_directory.
9113 (find_file_and_directory): Adjust to return a file_and_directory
9114 object.
9115 (read_file_scope): Adjust to use file_and_directory. Remove
9116 make_cleanup/do_cleanups calls.
9117 (open_and_init_dwp_file): Adjust to use std::string. Remove
9118 make_cleanup/do_cleanups calls.
9119 * python/python.c (do_start_initialization): Adjust to ldirname
9120 returning a std::string.
9121 * utils.c (ldirname): Now returns a std::string.
9122 * utils.h (ldirname): Change return type to std::string.
9123 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9124 returning a std::string.
9125 * xml-tdesc.c (file_read_description_xml): Likewise.
9126
9127 2017-03-24 Alan Hayward <alan.hayward@arm.com>
9128
9129 * regcache.c (regcache_debug_print_register): New function.
9130 * regcache.h (regcache_debug_print_register): New declaration.
9131 * target.c (debug_print_register): Remove.
9132 (target_fetch_registers): Call regcache_debug_print_register.
9133 (target_store_registers): Likewise.
9134
9135 2017-03-24 Pádraig Brady <pbrady@fb.com>
9136
9137 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
9138 reference beyond the 'lh->include_dirs' array before accessing to
9139 it.
9140 (psymtab_include_file_name): Likewise.
9141 (dwarf_decode_lines_1): Likewise.
9142 (dwarf_decode_lines): Likewise.
9143 (file_file_name): Likewise.
9144
9145 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
9146
9147 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
9148 inferior_ptid.
9149 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9150 ps_lsetfpregs): Likewise.
9151 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
9152 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9153 ps_lsetfpregs): Likewise.
9154 * target.c (target_fetch_registers, target_store_registers):
9155 Remove asserts.
9156
9157 2017-03-23 Alan Hayward <alan.hayward@arm.com>
9158
9159 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
9160
9161 2017-03-23 Yao Qi <yao.qi@linaro.org>
9162
9163 * aarch64-tdep.c (aarch64_process_record_test): Declare.
9164 (_initialize_aarch64_tdep): Register it.
9165 (aarch64_record_load_store): Handle PRFM instruction.
9166 (aarch64_process_record_test): New function.
9167
9168 2017-03-23 Yao Qi <yao.qi@linaro.org>
9169
9170 * aarch64-tdep.c (aarch64_record_load_store): Fix code
9171 indentation.
9172
9173 2017-03-23 Yao Qi <yao.qi@linaro.org>
9174
9175 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
9176
9177 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9178
9179 python/python.c (do_start_initialization): Fix memory leak.
9180
9181 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9182
9183 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9184 using get_ptrace_pid.
9185 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9186 inferior_ptid.
9187 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9188 inferior_ptid instead of pid.
9189
9190 2017-03-22 Yao Qi <yao.qi@linaro.org>
9191
9192 * aarch64-tdep.c: Wrap locally used classes in anonymous
9193 namespace.
9194 * arm-tdep.c: Likewise.
9195 * linespec.c: Likewise.
9196 * ui-out.c: Likewise.
9197
9198 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
9199
9200 PR gdb/19637
9201 * python/lib/gdb/printer/bound_registers.py: Import sys.
9202
9203 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9204
9205 * windows-nat.c (do_windows_fetch_inferior_registers): Add
9206 windows_thread_info parameter and use it instead of
9207 current_thread.
9208 (windows_fetch_inferior_registers): Don't set current_thread,
9209 pass the thread to do_windows_fetch_inferior_registers. Use
9210 ptid from regcache instead of inferior_ptid.
9211 (do_windows_store_inferior_registers): Add windows_thread_info
9212 parameter and use it instead of current_thread.
9213 (windows_store_inferior_registers): Don't set current_thread,
9214 pass the thread to do_windows_store_inferior_registers. Use
9215 ptid from regcache instead of inferior_ptid.
9216
9217 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9218
9219 * ser-mingw.c (ser_windows_raw): Remove reference to
9220 struct serial::current_timeout.
9221
9222 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
9223
9224 PR tdep/20928
9225 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9226 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9227 (sparc64_fsr_type): Fix %fsr decoding.
9228
9229 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
9230
9231 * python/py-record-btrace.c (btpy_insn_data): Change return type
9232 for Python 2.
9233
9234 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9235
9236 * spu-linux-nat.c (spu_fetch_inferior_registers,
9237 spu_store_inferior_registers): Use ptid from regcache, set and
9238 restore inferior_ptid.
9239 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9240 Likewise.
9241
9242 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9243
9244 * i386-linux-nat.c (fetch_register, store_register,
9245 i386_linux_fetch_inferior_registers,
9246 i386_linux_store_inferior_registers): Use ptid from regcache.
9247 * ia64-linux-nat.c (ia64_linux_fetch_register,
9248 ia64_linux_store_register): Likewise.
9249 * inf-ptrace.c (inf_ptrace_fetch_register,
9250 inf_ptrace_store_register): Likewise.
9251 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
9252 m32r_linux_store_inferior_registers): Likewise.
9253 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
9254 m68kbsd_store_inferior_registers): Likewise.
9255 * m68k-linux-nat.c (fetch_register, store_register,
9256 m68k_linux_fetch_inferior_registers,
9257 m68k_linux_store_inferior_registers): Likewise.
9258 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
9259 m88kbsd_store_inferior_registers): Likewise.
9260 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
9261 mips_fbsd_store_inferior_registers): Likewise.
9262 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
9263 mips64_linux_regsets_store_registers): Likewise.
9264 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
9265 mipsnbsd_store_inferior_registers): Likewise.
9266 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
9267 mips64obsd_store_inferior_registers): Likewise.
9268 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
9269 Likewise.
9270 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
9271 ppcfbsd_store_inferior_registers): Likewise.
9272 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
9273 ppc_linux_store_inferior_registers): Likewise.
9274 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
9275 ppcnbsd_store_inferior_registers): Likewise.
9276 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
9277 ppcobsd_store_registers): Likewise.
9278 * procfs.c (procfs_fetch_registers, procfs_store_registers):
9279 Likewise.
9280 * ravenscar-thread.c (ravenscar_fetch_registers,
9281 ravenscar_store_registers, ravenscar_prepare_to_store):
9282 Likewise.
9283 * record-btrace.c (record_btrace_fetch_registers,
9284 record_btrace_store_registers, record_btrace_prepare_to_store):
9285 Likewise.
9286 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
9287 Lookup inferior using ptid from regcache, instead of
9288 current_inferior.
9289 * remote.c (remote_fetch_registers, remote_store_registers): Use
9290 ptid from regcache.
9291 * rs6000-nat.c (fetch_register, store_register): Likewise.
9292 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
9293 s390_linux_store_inferior_registers): Likewise.
9294 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
9295 shnbsd_store_inferior_registers): Likewise.
9296 * sol-thread.c (sol_thread_fetch_registers,
9297 sol_thread_store_registers): Likewise.
9298 * sparc-nat.c (sparc_fetch_inferior_registers,
9299 sparc_store_inferior_registers): Likewise.
9300 * tilegx-linux-nat.c (fetch_inferior_registers,
9301 store_inferior_registers): Likewise.
9302 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
9303 vaxbsd_store_inferior_registers): Likewise.
9304 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
9305 store_xtregs): Likewise.
9306
9307 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9308
9309 PR gdb/14441
9310 * NEWS: Mention support for rvalue references in GDB and python.
9311 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
9312 supports both lvalue and rvalue references.
9313
9314 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9315
9316 PR gdb/14441
9317 * gdbtypes.c (rank_one_type): Implement overloading
9318 resolution rules regarding rvalue references.
9319
9320 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9321
9322 PR gdb/14441
9323 * aarch64-tdep.c (aarch64_type_align)
9324 (aarch64_extract_return_value, aarch64_store_return_value): Change
9325 lvalue reference type checks to general reference type checks.
9326 * amd64-tdep.c (amd64_classify): Likewise.
9327 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
9328 Likewise.
9329 * arm-tdep.c (arm_type_align, arm_extract_return_value)
9330 (arm_store_return_value): Likewise.
9331 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
9332 * c-typeprint.c (c_print_type): Likewise.
9333 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
9334 (cplus_number_of_children, cplus_describe_child): Likewise.
9335 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
9336 * completer.c (expression_completer): Likewise.
9337 * cp-support.c (make_symbol_overload_list_adl_namespace):
9338 Likewise.
9339 * darwin-nat-info.c (info_mach_region_command): Likewise.
9340 * dwarf2loc.c (entry_data_value_coerce_ref)
9341 (value_of_dwarf_reg_entry): Likewise.
9342 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
9343 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
9344 Likewise.
9345 * findvar.c (extract_typed_address, store_typed_address):
9346 Likewise.
9347 * gdbtypes.c (rank_one_type): Likewise.
9348 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
9349 * infcall.c (value_arg_coerce): Likewise.
9350 * language.c (pointer_type): Likewise.
9351 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
9352 Likewise.
9353 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
9354 * mn10300-tdep.c (mn10300_type_align): Likewise.
9355 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
9356 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
9357 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
9358 Likewise.
9359 * printcmd.c (print_formatted, x_command): Likewise.
9360 * python/py-type.c (typy_get_composite, typy_template_argument):
9361 Likewise.
9362 * python/py-value.c (valpy_referenced_value)
9363 (valpy_get_dynamic_type, value_has_field): Likewise.
9364 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
9365 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
9366 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
9367 * spu-tdep.c (spu_scalar_value_p): Likewise.
9368 * symtab.c (lookup_symbol_aux): Likewise.
9369 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
9370 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
9371 Likewise.
9372 * valops.c (value_cast_pointers, value_cast)
9373 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
9374 (value_struct_elt, value_struct_elt_bitpos)
9375 (value_find_oload_method_list, find_overload_match)
9376 (value_rtti_indirect_type): Likewise.
9377 * valprint.c (val_print_scalar_type_p, generic_val_print):
9378 Likewise.
9379 * value.c (value_actual_type, value_as_address, unpack_long)
9380 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
9381 (coerce_ref): Likewise.
9382 * varobj.c (varobj_get_value_type): Likewise.
9383
9384 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9385
9386 PR gdb/14441
9387 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
9388 table of constants.
9389 * python/lib/gdb/command/explore.py: Support exploring values
9390 of rvalue reference types.
9391 * python/lib/gdb/types.py: Implement get_basic_type() for
9392 rvalue reference types.
9393 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
9394 constant.
9395 * python/py-value.c (valpy_getitem): Add an rvalue reference
9396 check.
9397 (valpy_reference_value): Add new parameter "refcode".
9398 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
9399 New wrappers for valpy_reference_value().
9400 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9401 (gdbpy_invoke_xmethod): Likewise.
9402
9403 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9404
9405 PR gdb/14441
9406 * dwarf2read.c (process_die, read_type_die_1): Handle the
9407 DW_TAG_rvalue_reference_type DIE.
9408 (read_tag_reference_type): Add new parameter "refcode".
9409
9410 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9411
9412 PR gdb/14441
9413 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
9414 (c_type_print_modifier, c_type_print_varspec_suffix)
9415 (c_type_print_base): Support printing rvalue reference types.
9416 * c-valprint.c (c_val_print, c_value_print): Support printing
9417 rvalue reference values.
9418
9419 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9420
9421 PR gdb/14441
9422 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
9423 typename.
9424 * cp-support.c (replace_typedefs): Handle
9425 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
9426 * python/py-type.c (typy_lookup_type): Likewise.
9427
9428 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9429
9430 PR gdb/14441
9431 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
9432 * parse.c (insert_type): Change assert statement.
9433 (follow_types): Handle rvalue reference types.
9434 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
9435 constant.
9436
9437 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9438
9439 PR gdb/14441
9440 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
9441 value_ref() interface.
9442 * c-valprint.c (c_value_print): Likewise.
9443 * infcall.c (value_arg_coerce): Likewise.
9444 * python/py-value.c (valpy_reference_value): Likewise.
9445 * valops.c (value_cast, value_reinterpret_cast)
9446 (value_dynamic_cast, typecmp): Likewise.
9447 (value_ref): Parameterize by kind of return value reference type.
9448 * value.h (value_ref): Add new parameter "refcode".
9449
9450 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9451
9452 PR gdb/14441
9453 * dwarf2read.c (read_tag_reference_type): Use
9454 lookup_lvalue_reference_type() instead of lookup_reference_type().
9455 * eval.c (evaluate_subexp_standard): Likewise.
9456 * f-exp.y: Likewise.
9457 * gdbtypes.c (make_reference_type, lookup_reference_type):
9458 Generalize with rvalue reference types.
9459 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
9460 convenience wrappers for lookup_reference_type().
9461 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
9462 reference kind parameter.
9463 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
9464 wrappers for lookup_reference_type().
9465 * guile/scm-type.c (gdbscm_type_reference): Use
9466 lookup_lvalue_reference_type() instead of lookup_reference_type().
9467 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
9468 * parse.c (follow_types): Likewise.
9469 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
9470 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
9471 Likewise.
9472 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9473 (gdbpy_invoke_xmethod): Likewise.
9474 * stabsread.c: Provide extra argument to make_reference_type()
9475 call.
9476 * valops.c (value_ref, value_rtti_indirect_type): Use
9477 lookup_lvalue_reference_type() instead of lookup_reference_type().
9478
9479 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9480
9481 PR gdb/14441
9482 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
9483 (TYPE_IS_REFERENCE): New macro.
9484 (struct type): Add rvalue_reference_type field.
9485 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
9486
9487 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9488
9489 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
9490 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
9491 New function definition.
9492 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
9493 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
9494 New function declaration.
9495 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
9496 * mi/mi-interp.h: New file.
9497 * solib.c (info_sharedlibrary_command): Replace for loop with
9498 ALL_SO_LIBS macro
9499 * solib.h (update_solib_list): New function declaration.
9500 (so_list_head): Move macro.
9501 * solist.h (ALL_SO_LIBS): New macro.
9502
9503 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9504
9505 * infcmd.c (post_create_inferior): Remove unused argument in
9506 call to solib_add.
9507 * remote.c (remote_start_remote): Likewise.
9508 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
9509 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
9510 (enable_break): Likewise.
9511 * solib.c (update_solib_list): Remove unused target argument
9512 and its documentation.
9513 (solib_add): Remove unused target argument. Remove unused
9514 argument in call to update_solib_list.
9515 (info_sharedlibrary_command): Remove unused argument in call
9516 to update_solib_list.
9517 (sharedlibrary_command): Remove unused argument in call to
9518 solib_add.
9519 (handle_solib_event): Likewise.
9520 (reload_shared_libraries): Likewise.
9521 * solib.h (solib_add): Remove unused target argument.
9522
9523 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
9524
9525 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
9526 (s390_displaced_step_fixup): Cover relative branches with the
9527 default fixup handling. This fixes lack of support for some
9528 relative branch instructions.
9529
9530 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9531
9532 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
9533 ptid from regcache.
9534
9535 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9536
9537 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
9538 i386_darwin_store_inferior_registers): Use ptid from regcache.
9539
9540 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9541
9542 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
9543 i386bsd_store_inferior_registers): Use ptid from regcache.
9544
9545 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9546
9547 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
9548 hppaobsd_store_registers): Use ptid from regcache.
9549
9550 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9551
9552 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
9553 hppanbsd_store_registers): Use ptid from regcache.
9554
9555 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9556
9557 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
9558 from regcache. Use get_ptrace_pid.
9559
9560 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9561
9562 * corelow.c (get_core_register_section): Use ptid from regcache,
9563 update doc.
9564
9565 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9566
9567 * bsd-uthread.c (bsd_uthread_fetch_registers,
9568 bsd_uthread_store_registers): Use ptid from regcache, set and
9569 restore inferior_ptid.
9570
9571 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9572
9573 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
9574 fetch_fp_regs, store_register, store_regs, store_fp_register,
9575 store_fp_regs): Use ptid from regcache.
9576
9577 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9578
9579 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
9580 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
9581 store_vfp_regs): Use ptid from regcache.
9582
9583 2017-03-17 Pedro Alves <palves@redhat.com>
9584
9585 PR remote/21188
9586 * ser-base.c (ser_base_wait_for): Add comment.
9587 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
9588 version.
9589 * ser-unix.c (hardwire_raw): Remove reference to
9590 scb->current_timeout.
9591 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
9592 (hardwire_ops): Install ser_base_readchar instead of
9593 hardwire_readchar.
9594 * serial.h (struct serial) <current_timeout, timeout_remaining>:
9595 Remove fields.
9596
9597 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
9598
9599 PR gdb/19637
9600 * python/lib/gdb/printer/bound_registers.py: Add support for
9601 Python 3.
9602
9603 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
9604
9605 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
9606 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
9607 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
9608 byte_offset to subobj_byte_offset. Fix the handling of
9609 DWARF_VALUE_STACK on big-endian targets when coming via an
9610 implicit pointer.
9611 (dwarf2_evaluate_loc_desc): Adjust call to
9612 dwarf2_evaluate_loc_desc_full.
9613 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
9614 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
9615
9616 2017-03-16 Yao Qi <yao.qi@linaro.org>
9617
9618 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
9619 and REVSH instructions.
9620
9621 2017-03-16 Yao Qi <yao.qi@linaro.org>
9622
9623 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
9624 (arm_record_test): Declare.
9625 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
9626 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
9627 align with the manual.
9628 (thumb_record_misc): Adjust the code order to align with the
9629 manual.
9630 (thumb2_record_decode_insn_handler): Fix instruction matching.
9631 (instruction_reader_thumb): New class.
9632 (arm_record_test): New function.
9633
9634 2017-03-16 Yao Qi <yao.qi@linaro.org>
9635
9636 * arm-tdep.c (abstract_memory_reader): New class.
9637 (instruction_reader): New class.
9638 (extract_arm_insn): Add argument 'reader'. Callers updated.
9639 (decode_insn): Likewise.
9640
9641 2017-03-16 Doug Evans <dje@google.com>
9642
9643 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
9644 member. Change type of TYPE member to SCM. All uses updated.
9645 (lsscm_make_lazy_string_smob): Add assert.
9646 (lsscm_make_lazy_string): Flag bad length values.
9647 (lsscm_elt_type): New function.
9648 (gdbscm_lazy_string_to_value): Rewrite to use
9649 lsscm_safe_lazy_string_to_value.
9650 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
9651 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
9652 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
9653 in incoming type.
9654 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9655 * guile/scm-type.c (tyscm_scm_to_type): New function.
9656
9657 2017-03-15 Doug Evans <dje@google.com>
9658
9659 PR python/17728, python/18439, python/18779
9660 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
9661 member. Change type of TYPE member to PyObject *. All uses updated.
9662 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
9663 (gdbpy_create_lazy_string_object): Flag bad length values.
9664 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
9665 Handle typedefs in incoming type.
9666 (stpy_lazy_string_elt_type): New function.
9667 (gdbpy_extract_lazy_string): Call it.
9668 * python/py-value.c (valpy_lazy_string): Flag bad length values.
9669 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
9670 typedefs in incoming type.
9671
9672 2017-03-16 Doug Evans <dje@google.com>
9673
9674 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9675 * guile/scm-type.c (tyscm_scm_to_type): New function.
9676
9677 2017-03-16 Jiong Wang <jiong.wang@arm.com>
9678
9679 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
9680 "ULONGEST" for "skip".
9681
9682 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9683
9684 PR gdb/21220
9685 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
9686 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
9687 (inf_ptrace_peek_poke): ...here. New function. Now also loop
9688 over ptrace peek/poke until end of buffer or error.
9689
9690 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
9691
9692 * parse.c (length_of_subexp): Make static.
9693 * parser-defs.h (length_of_subexp): Remove.
9694
9695 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9696
9697 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9698 as well.
9699
9700 2017-03-14 Pedro Alves <palves@redhat.com>
9701
9702 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9703 (main): Use std::unique_ptr. Remove calls to
9704 cp_demangled_name_parse_free.
9705
9706 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9707
9708 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9709 alphabsd_store_inferior_registers): Use regcache->ptid instead
9710 of inferior_ptid.
9711
9712 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9713
9714 * aix-thread.c (aix_thread_fetch_registers,
9715 aix_thread_store_registers): Use regcache->ptid instead of
9716 inferior_ptid.
9717
9718 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9719
9720 * aarch64-linux-nat.c (fetch_gregs_from_thread,
9721 store_gregs_to_thread, fetch_fpregs_from_thread,
9722 store_fpregs_to_thread): Use regcache->ptid instead of
9723 inferior_ptid.
9724
9725 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9726
9727 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9728 amd64_linux_fetch_inferior_registers): Use regcache->ptid
9729 instead of inferior_ptid.
9730
9731 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9732
9733 * target.c (target_fetch_registers, target_store_registers): Add
9734 assert.
9735
9736 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9737
9738 * regcache.h (regcache_get_ptid): New function.
9739 * regcache.c (regcache_get_ptid): New function.
9740
9741 2017-03-13 Mark Wielaard <mark@klomp.org>
9742
9743 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9744
9745 2017-03-10 Keith Seitz <keiths@redhat.com>
9746
9747 PR c++/8218
9748 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9749
9750 2017-03-08 Pedro Alves <palves@redhat.com>
9751
9752 PR gdb/18360
9753 * infrun.c (start_step_over, do_target_resume, resume)
9754 (restart_threads): Assert we're not resuming a thread that is
9755 meant to be stopped.
9756 (infrun_thread_stop_requested_callback): Delete.
9757 (infrun_thread_stop_requested): If the thread is internally
9758 stopped, queue a pending stop event and clear the thread's
9759 inline-frame state.
9760 (handle_stop_requested): New function.
9761 (handle_syscall_event, handle_inferior_event_1): Use
9762 handle_stop_requested.
9763 (handle_stop_requested): New function.
9764 (handle_signal_stop): Set the thread's stop_signal here instead of
9765 at caller.
9766 (finish_step_over): Clear step over info unconditionally.
9767 (handle_signal_stop): If the user had interrupted the event
9768 thread, consider the stop a random signal.
9769 (handle_signal_stop) <signal arrived while stepping over
9770 breakpoint>: Don't restart threads here.
9771 (stop_waiting): Don't clear step-over info here.
9772
9773 2017-03-08 Pedro Alves <palves@redhat.com>
9774
9775 PR 21206
9776 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
9777 goes to argument 2, not 1.
9778
9779 2017-03-08 Pedro Alves <palves@redhat.com>
9780
9781 PR cli/21218
9782 * top.c (gdb_readline_wrapper): Avoid passing NULL to
9783 display_gdb_prompt.
9784 (command_line_input): Add comment.
9785
9786 2017-03-08 Pedro Alves <palves@redhat.com>
9787
9788 PR tui/21216
9789 * tui/tui-file.c (tui_file::write): New.
9790 * tui/tui-file.h (tui_file): Override "write".
9791 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
9792 factored out from ...
9793 (tui_puts): ... here.
9794 (tui_putc): Use them.
9795 (tui_write): New function.
9796 * tui/tui-io.h (tui_write): Declare.
9797
9798 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
9799
9800 * Makefile.in (SFILES): Replace "environ.c" with
9801 "common/environ.c".
9802 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
9803 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
9804 to...
9805 * common/environ.c: ... here.
9806 * environ.h: Moved to...
9807 * common/environ.h: ... here.
9808
9809 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9810
9811 * gdbarch.sh (pstring_ptr): New static function.
9812 (gdbarch_disassembler_options): Use it.
9813 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
9814 not valid_disassembler_option->name.
9815 * gdbarch.c: Regenerate.
9816
9817 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9818
9819 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
9820
9821 2017-03-07 Pedro Alves <palves@redhat.com>
9822
9823 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
9824
9825 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
9826
9827 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
9828 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
9829 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
9830 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
9831
9832 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
9833
9834 * xtensa-linux-nat.c (fetch_gregs): Remove const.
9835
9836 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
9837
9838 * remote.c (remote_add_target_side_commands): Use range-based
9839 for loop.
9840
9841 2017-03-03 Yao Qi <yao.qi@linaro.org>
9842
9843 PR gdb/21165
9844 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
9845 value is lazy.
9846 * valprint.c (common_val_print): Likewise.
9847
9848 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
9849
9850 * NEWS: Mention new set/show disassembler-options commands.
9851 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
9852 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
9853 (prospective_options): New static variable.
9854 (gdb_disassembler::gdb_disassembler): Initialize
9855 m_di.disassembler_options.
9856 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
9857 (get_disassembler_options): New function.
9858 (set_disassembler_options): Likewise.
9859 (set_disassembler_options_sfunc): Likewise.
9860 (show_disassembler_options_sfunc): Likewise.
9861 (disassembler_options_completer): Likewise.
9862 (_initialize_disasm): Likewise.
9863 * disasm.h (get_disassembler_options): New prototype.
9864 (set_disassembler_options): Likewise.
9865 * gdbarch.sh (gdbarch_disassembler_options): New variable.
9866 (gdbarch_verify_disassembler_options): Likewise.
9867 * gdbarch.c: Regenerate.
9868 * gdbarch.h: Likewise.
9869 * arm-tdep.c (num_disassembly_options): Delete.
9870 (set_disassembly_style): Likewise.
9871 (arm_disassembler_options): New static variable.
9872 (set_disassembly_style_sfunc): Convert short style name into long
9873 option name. Call set_disassembler_options.
9874 (show_disassembly_style_sfunc): New function.
9875 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
9876 set_gdbarch_verify_disassembler_options.
9877 (_initialize_arm_tdep): Delete regnames variable and update callers.
9878 (arm_disassembler_options): Initialize.
9879 (disasm_options): New variable.
9880 (num_disassembly_options): Rename from this...
9881 (num_disassembly_styles): ...to this. Compute by scanning through
9882 disasm_options.
9883 (valid_disassembly_styles): Initialize using disasm_options.
9884 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
9885 set_arm_regname_option.
9886 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
9887 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
9888 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
9889 set_gdbarch_verify_disassembler_options.
9890 * s390-tdep.c (s390_disassembler_options): New static variable.
9891 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
9892 set_gdbarch_verify_disassembler_options.
9893
9894 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9895
9896 * remote.c (remote_add_target_side_condition): Remove "struct"
9897 keyword from range-based for loop.
9898
9899 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9900
9901 * remote.c (remote_add_target_side_condition): Use range-based
9902 for loop. Update comment.
9903
9904 2017-02-27 Yao Qi <yao.qi@linaro.org>
9905
9906 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
9907
9908 2017-02-26 Alan Hayward <alan.hayward@arm.com>
9909
9910 * regcache.c (regcache_raw_update): New function.
9911 (regcache_raw_read): Move code to regcache_raw_update.
9912 * regcache.h (regcache_raw_update): New declaration.
9913 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
9914
9915 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
9916
9917 * dwarf2read.c (create_debug_type_hash_table): Initialize
9918 header.signature and header.type_offset_in_tu.
9919
9920 2017-02-24 Pedro Alves <palves@redhat.com>
9921
9922 * symtab.c (make_file_symbol_completion_list_1): Use
9923 add_symtab_completions.
9924
9925 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9926
9927 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
9928
9929 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9930
9931 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
9932 I386_MAX_REGISTER_SIZE.
9933 (i386_pseudo_register_write): Likewise.
9934 (i386_process_record): Likewise.
9935 * i387-tdep.c (i387_supply_xsave): Likewise.
9936 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
9937 (store_register): Likewise.
9938
9939 2017-02-23 Pedro Alves <palves@redhat.com>
9940
9941 * ada-lang.c: Include "common/function-view.h".
9942 (ada_iterate_over_symbols): Adjust to use function_view as
9943 callback type.
9944 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
9945 (ada_make_symbol_completion_list): Use a lambda.
9946 (ada_exc_search_name_matches): Delete.
9947 (name_matches_regex): New.
9948 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
9949 * compile/compile-c-support.c: Include "common/function-view.h".
9950 (print_one_macro): Change prototype to accept a ui_file pointer.
9951 (write_macro_definitions): Use a lambda.
9952 * dwarf2read.c: Include "common/function-view.h".
9953 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
9954 (dw2_expand_symtabs_matching): Adjust to use function_view as
9955 callback type.
9956 * language.h: Include "common/function-view.h".
9957 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
9958 function_view as callback type.
9959 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
9960 * linespec.c: Include "common/function-view.h".
9961 (collect_info::add_symbol): New method.
9962 (struct symbol_and_data_callback, iterate_inline_only, struct
9963 symbol_matcher_data, iterate_name_matcher): Delete.
9964 (iterate_over_all_matching_symtabs): Adjust to use function_view
9965 as callback type and lambdas.
9966 (iterate_over_file_blocks): Adjust to use function_view as
9967 callback type.
9968 (decode_compound_collector): Now a class with private fields.
9969 (decode_compound_collector::release_symbols): New method.
9970 (collect_one_symbol): Rename to...
9971 (decode_compound_collector::operator()): ... this and adjust.
9972 (lookup_prefix_sym): decode_compound_collector construction bits
9973 move to decode_compound_collector ctor. Pass the
9974 decode_compound_collector object directly as callback. Remove
9975 cleanups and use decode_compound_collector::release_symbols
9976 instead.
9977 (symtab_collector): Now a class with private fields.
9978 (symtab_collector::release_symtabs): New method.
9979 (add_symtabs_to_list): Rename to...
9980 (symtab_collector::operator()): ... this and adjust.
9981 (collect_symtabs_from_filename): symtab_collector construction
9982 bits move to symtab_collector ctor. Pass the symtab_collector
9983 object directly as callback. Remove cleanups and use
9984 symtab_collector::release_symtabs instead.
9985 (collect_symbols): Delete.
9986 (add_matching_symbols_to_info): Use lambdas.
9987 * macrocmd.c (print_macro_callback): Delete.
9988 (info_macro_command): Use a lambda.
9989 (info_macros_command): Pass print_macro_definition as callable
9990 directly.
9991 (print_one_macro): Remove 'ignore' parameter.
9992 (macro_list_command): Adjust.
9993 * macrotab.c (macro_for_each_data::fn): Now a function_view.
9994 (macro_for_each_data::user_data): Delete field.
9995 (foreach_macro): Adjust to call the function_view.
9996 (macro_for_each): Adjust to use function_view as callback type.
9997 (foreach_macro_in_scope): Adjust to call the function_view.
9998 (macro_for_each_in_scope): Adjust to use function_view as callback
9999 type.
10000 * macrotab.h: Include "common/function-view.h".
10001 (macro_callback_fn): Declare a prototype instead of a pointer.
10002 Remove "user_data" parameter.
10003 (macro_for_each, macro_for_each_in_scope): Adjust to use
10004 function_view as callback type.
10005 * psymtab.c (partial_map_expand_apply)
10006 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
10007 Adjust to use function_view as callback type and to return bool.
10008 (psym_expand_symtabs_matching): Adjust to use function_view as
10009 callback types.
10010 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
10011 to use function_view as callback type and to return bool.
10012 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
10013 callback types.
10014 * symfile.c (expand_symtabs_matching): Adjust to use function_view
10015 as callback types.
10016 * symfile.h: Include "common/function-view.h".
10017 (expand_symtabs_file_matcher_ftype)
10018 (expand_symtabs_symbol_matcher_ftype)
10019 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
10020 return bool.
10021 (quick_symbol_functions::map_symtabs_matching_filename)
10022 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
10023 function_view as callback type and return bool.
10024 (expand_symtabs_matching): Adjust to use function_view as callback
10025 type.
10026 (maintenance_expand_name_matcher)
10027 (maintenance_expand_file_matcher): Delete.
10028 (maintenance_expand_symtabs): Use lambdas.
10029 * symtab.c (iterate_over_some_symtabs): Adjust to use
10030 function_view as callback types and return bool.
10031 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
10032 of a cleanup.
10033 (lookup_symtab_callback): Delete.
10034 (lookup_symtab): Use a lambda.
10035 (iterate_over_symbols): Adjust to use function_view as callback
10036 type.
10037 (struct search_symbols_data, search_symbols_file_matches)
10038 (search_symbols_name_matches): Delete.
10039 (search_symbols): Use a pair of lambdas.
10040 (struct add_name_data, add_macro_name, symbol_completion_matcher)
10041 (symtab_expansion_callback): Delete.
10042 (default_make_symbol_completion_list_break_on_1): Use lambdas.
10043 * symtab.h: Include "common/function-view.h".
10044 (iterate_over_some_symtabs): Adjust to use function_view as
10045 callback type and return bool.
10046 (iterate_over_symtabs): Adjust to use function_view as callback
10047 type.
10048 (symbol_found_callback_ftype): Remove 'data' parameter and return
10049 bool.
10050 (iterate_over_symbols): Adjust to use function_view as callback
10051 type.
10052
10053 2017-02-23 Pedro Alves <palves@redhat.com>
10054
10055 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10056 (%.o) <unittests/%.c>: New pattern.
10057 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10058 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10059 * common/function-view.h: New file.
10060 * unittests/function-view-selftests.c: New file.
10061 * configure: Regenerate.
10062
10063 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
10064
10065 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10066 inferior_ptid.
10067 * go32-nat.c (go32_thread_alive): Likewise.
10068
10069 2017-02-23 Yao Qi <yao.qi@linaro.org>
10070
10071 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10072 delete.
10073
10074 2017-02-23 Yao Qi <yao.qi@linaro.org>
10075
10076 * varobj.c (varobj_clear_saved_item): Use delete instead of
10077 xfree.
10078 (update_dynamic_varobj_children): Likewise.
10079
10080 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10081
10082 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10083
10084 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
10085
10086 * common/enum-flags.h (enum_flags::enum_flags): Initialize
10087 m_enum_value to 0 in default constructor.
10088
10089 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
10090
10091 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10092 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10093 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10094 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10095 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10096 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10097 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10098 IS_STORE_CONDITIONAL_INSN.
10099
10100 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10101
10102 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10103
10104 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10105
10106 * NEWS (Changes since GDB 7.12): Add DWARF-5.
10107
10108 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10109
10110 * dwarf2read.c (skip_one_die, read_attribute_value)
10111 (dwarf2_const_value_attr, dump_die_shallow)
10112 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10113 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10114
10115 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10116
10117 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10118 (dwarf_parse_macro_header): Accept DWARF version 5.
10119 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10120
10121 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10122
10123 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10124 DW_AT_GNU_*.
10125 * common/common-exceptions.h (enum errors): Likewise.
10126 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10127 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10128 (dwarf_expr_context::execute_stack_op): Likewise.
10129 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10130 Likewise.
10131 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10132 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10133 (show_entry_values_debug, call_site_to_target_addr)
10134 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10135 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10136 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10137 (value_of_dwarf_block_entry, indirect_pieced_value)
10138 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
10139 (disassemble_dwarf_expression): Likewise.
10140 * dwarf2read.c (process_die, inherit_abstract_dies)
10141 (read_call_site_scope): Likewise.
10142 * gdbtypes.h (struct func_type, struct call_site_parameter)
10143 (struct call_site): Likewise.
10144 * stack.c (read_frame_arg): Likewise.
10145 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
10146
10147 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10148
10149 * defs.h (read_unsigned_leb128): New declaration.
10150 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
10151 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
10152 (dwarf2_find_location_expression): Call also
10153 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
10154 * dwarf2loc.h (dwarf2_version): New declaration.
10155 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
10156 rnglists.
10157 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
10158 .debug_rnglists.
10159 (struct dwop_section_names): Add loclists_dwo.
10160 (dwop_section_names): Add .debug_loclists.dwo.
10161 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
10162 (struct dwarf2_per_cu_data): Add dwarf_version.
10163 (struct dwo_sections): Add loclists.
10164 (struct attr_abbrev): Add implicit_const.
10165 (read_indirect_line_string): New declaration.
10166 (read_unsigned_leb128): Delete declaration.
10167 (rcuh_kind): New definition.
10168 (read_and_check_comp_unit_head): Change parameter
10169 is_debug_types_section to section_kind.
10170 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
10171 (read_comp_unit_head): Change parameter abfd to section, add parameter
10172 section_kind. Handle DWARF-5.
10173 (error_check_comp_unit_head): Accept also DWARF version 5.
10174 (read_and_check_comp_unit_head): Change parameter
10175 is_debug_types_section to section_kind.
10176 (read_and_check_type_unit_head): Delete function.
10177 (read_abbrev_offset): Handle DWARF-5.
10178 (create_debug_type_hash_table): Add parameter section_kind. Process
10179 only DW_UT_type. Use signature and type_offset_in_tu from struct
10180 comp_unit_head.
10181 (create_debug_types_hash_table): Update create_debug_type_hash_table
10182 caller.
10183 (create_all_type_units): Call create_debug_type_hash_table.
10184 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10185 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10186 caller.
10187 (skip_one_die): Handle DW_FORM_implicit_const.
10188 (dwarf2_rnglists_process): New function.
10189 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10190 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10191 (read_attribute_value): Handle DW_FORM_implicit_const,
10192 DW_FORM_line_strp.
10193 (read_attribute): Handle DW_FORM_implicit_const.
10194 (read_indirect_string_at_offset_from): New function from
10195 read_indirect_string_at_offset.
10196 (read_indirect_string_at_offset): Call
10197 read_indirect_string_at_offset_from.
10198 (read_indirect_line_string_at_offset): New function.
10199 (read_indirect_string): New function comment.
10200 (read_indirect_line_string): New function.
10201 (read_unsigned_leb128): Make it global.
10202 (dwarf2_string_attr): Handle DWARF-5.
10203 (add_include_dir_stub, read_formatted_entries): New functions.
10204 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10205 Handle DWARF-5.
10206 (per_cu_header_read_in): Update read_comp_unit_head caller.
10207 (dwarf2_version): New function.
10208 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10209 rnglists.
10210 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10211 fields.
10212
10213 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10214
10215 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10216
10217 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10218
10219 * dwarf2read.c (dwarf2_ranges_process): New function from
10220 dwarf2_ranges_read.
10221 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10222 dwarf2_ranges_process.
10223
10224 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10225
10226 * dwarf2read.c (create_debug_type_hash_table): New function from
10227 create_debug_types_hash_table.
10228 (create_debug_types_hash_table): Call create_debug_type_hash_table.
10229 (create_all_type_units, open_and_init_dwo_file): Update
10230 create_debug_types_hash_table callers.
10231
10232 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10233
10234 PR gdb/16188
10235 * fork-child.c (trace_start_error): Fix thinko. va_end should
10236 refer to 'ap', not 'args'.
10237
10238 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10239 Pedro Alves <palves@redhat.com>
10240
10241 PR gdb/16188
10242 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
10243 calls succeeded.
10244 * fork-child.c (trace_start_error): New function.
10245 (trace_start_error_with_name): Likewise.
10246 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
10247 * inf-ptrace.c (inf_ptrace_me): Likewise.
10248 * inferior.h (trace_start_error): New prototype.
10249 (trace_start_error_with_name): Likewise.
10250
10251 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
10252
10253 PR gdb/21164
10254 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
10255 NULL before using it.
10256 * symmisc.c (maintenance_print_symbols): Likewise.
10257 (maintenance_print_msymbols): Likewise.
10258
10259 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10260
10261 * NEWS: Add record Python bindings entry.
10262
10263 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10264
10265 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
10266 py-record-full.o.
10267 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
10268 * python/py-record-btrace.c, python/py-record-btrace.h,
10269 python/py-record-full.c, python/py-record-full.h: New file.
10270 * python/py-record.c: Add include for py-record-btrace.h and
10271 py-record-full.h.
10272 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
10273 recpy_instruction_history, recpy_function_call_history, recpy_begin,
10274 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
10275 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
10276 New definition.
10277 (gdbpy_initialize_btrace): New export.
10278 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
10279
10280 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10281
10282 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
10283 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
10284 * python/py-record.c: New file.
10285 * python/python-internal.h (gdbpy_start_recording,
10286 gdbpy_current_recording, gdpy_stop_recording,
10287 gdbpy_initialize_record): New export.
10288 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
10289 (python_GdbMethods): Add gdbpy_start_recording,
10290 gdbpy_current_recording and gdbpy_stop_recording.
10291
10292 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10293
10294 * record-btrace.c (record_btrace_record_method): New function.
10295 (init_record_btrace_ops): Initialize to_record_method.
10296 * record-full.c (record_full_record_method): New function.
10297 (init_record_full_ops, init_record_full_core_ops): Add
10298 record_full_record_method.
10299 * record.h (enum record_method): New enum.
10300 * target-debug.h (target_debug_print_enum_record_method: New define.
10301 * target-delegates.c: Regenerate.
10302 * target.c (target_record_method): New function.
10303 * target.h: Include record.h.
10304 (struct target_ops) <to_record_method>: New field.
10305 (target_record_method): New export.
10306
10307 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10308
10309 * record.h (record_start, record_stop): New export.
10310 * record.c (record_start, record_stop): New function.
10311
10312 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10313
10314 * btrace.c (btrace_fetch): Copy function call segments pointer
10315 into a vector.
10316 (btrace_clear): Clear the vector.
10317 (btrace_find_insn_by_number): Use binary search to find the correct
10318 function call segment.
10319 * btrace.h (brace_fun_p): New typedef.
10320 (struct btrace_thread_info) <functions>: New field.
10321
10322 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10323
10324 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
10325 * btrace.c (btrace_decode_error): ... here. New function.
10326 * btrace.h (btrace_decode_error): New export.
10327
10328 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10329
10330 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
10331 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
10332 btrace_find_insn_by_number): Remove special case for gaps.
10333 * btrace.h (btrace_insn_get_error): New export.
10334 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
10335 * record-btrace.c (btrace_insn_history): Print number for gaps.
10336 (record_btrace_info, record_btrace_goto): Handle gaps.
10337
10338 2017-02-14 Tom Tromey <tom@tromey.com>
10339
10340 PR python/13598:
10341 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
10342 event.
10343 * python/py-evts.c (gdbpy_initialize_py_events): Add
10344 before_prompt registry.
10345 * python/py-events.h (events_object) <before_prompt>: New field.
10346
10347 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
10348
10349 * btrace.c (ftrace_new_switch): Preserve up link and flags.
10350
10351 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
10352
10353 * symfile (_initialize_symfile): Add usage text to the load command's
10354 help text.
10355
10356 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
10357
10358 * utils.c (defaulted_query): Don't query on secondary UIs.
10359
10360 2017-02-10 Tom Tromey <tom@tromey.com>
10361
10362 * rust-lang.c (rust_get_disr_info): Remove unused variable.
10363
10364 2017-02-10 Tom Tromey <tom@tromey.com>
10365
10366 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
10367 "cleanup" local.
10368 * python/py-type.c (typy_legacy_template_argument): Remove
10369 unnecessary "cleanup" local.
10370
10371 2017-02-10 Tom Tromey <tom@tromey.com>
10372
10373 * python/python.c (do_start_initialization): New function, from
10374 _initialize_python.
10375 (_initialize_python): Call do_start_initialization.
10376 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
10377 goto.
10378
10379 2017-02-10 Tom Tromey <tom@tromey.com>
10380
10381 * python/py-prettyprint.c (pretty_print_one_value): Use
10382 gdbpy_ref.
10383
10384 2017-02-10 Tom Tromey <tom@tromey.com>
10385
10386 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
10387 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
10388 gdbpy_ref.
10389 * python/py-type.c (field_new): Use gdbpy_ref.
10390 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
10391 gdbpy_ref.
10392 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
10393 (py_free_pspace): Likewise.
10394 (pspace_to_pspace_object): Likewise.
10395 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
10396 (py_free_objfile): Likewise.
10397 (objfile_to_objfile_object): Likewise.
10398 * python/py-inferior.c (delete_thread_object): Use
10399 gdbpy_ref.
10400 (infpy_read_memory): Likewise.
10401 (py_free_inferior): Likewise.
10402 * python/py-evtregistry.c (create_eventregistry_object): Use
10403 gdbpy_ref.
10404 * python/py-event.c (create_event_object): Use gdbpy_ref.
10405
10406 2017-02-10 Tom Tromey <tom@tromey.com>
10407
10408 * python/py-ref.h (gdbpy_ref_policy): Now a template.
10409 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
10410 used.
10411 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
10412 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
10413 python/py-exitedevent.c, python/py-finishbreakpoint.c,
10414 python/py-framefilter.c, python/py-function.c,
10415 python/py-inferior.c, python/py-infevents.c,
10416 python/py-linetable.c, python/py-newobjfileevent.c,
10417 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
10418 python/py-signalevent.c, python/py-stopevent.c,
10419 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
10420 python/py-unwind.c, python/py-utils.c, python/py-value.c,
10421 python/py-varobj.c, python/py-xmethods.c, python/python.c,
10422 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
10423
10424 2017-02-10 Tom Tromey <tom@tromey.com>
10425
10426 * ui-out.h (ui_out_emit_type): New class.
10427 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
10428 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
10429 and ui_out_emit_tuple.
10430 (enumerate_locals): Likewise.
10431 (py_mi_print_variables, py_print_locals, py_print_args): Use
10432 ui_out_emit_list.
10433 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
10434 ui_out_emit_list.
10435 * common/gdb_optional.h: New file.
10436
10437 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
10438
10439 * MAINTAINERS (Write After Approval): Update my e-mail address.
10440
10441 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
10442
10443 PR gdb/21122
10444 * breakpoint.c (_initialize_breakpoint): Update the help description
10445 of the 'commands' command to indicate that it takes a list argument.
10446
10447 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
10448
10449 * interps.c (current_interp_set_logging): Remove "return".
10450
10451 2017-02-09 Gary Benson <gbenson@redhat.com>
10452
10453 * symtab.c (add_symtab_completions): Prevent NULL pointer
10454 dereference.
10455
10456 2017-02-08 Pedro Alves <palves@redhat.com>
10457
10458 * interps.c (interp::interp): Remove reference to quiet_p.
10459 (interp_set): Make static. Remove dead "Switching to" output
10460 code.
10461 (interp_quiet_p, interp_set_quiet): Delete.
10462 (interpreter_exec_cmd): Don't set the interpreter quiet.
10463 * interps.h (interp_quiet_p): Make static.
10464 (class interp) <quiet_p>: Remove field
10465
10466 2017-02-08 Jerome Guitton <guitton@adacore.com>
10467
10468 * cli/cli-decode.c (find_command_name_length): Make it extern.
10469 * cli/cli-decode.h (find_command_name_length): Declare.
10470 * cli/cli-script.c (command_name_equals, line_first_arg):
10471 New functions.
10472 (process_next_line): Use cli-decode to parse command names.
10473 (build_command_line): Make args a constant pointer.
10474
10475 2017-02-08 Jerome Guitton <guitton@adacore.com>
10476
10477 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
10478 Remove case-insensitive search.
10479
10480 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
10481
10482 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
10483 at the end of the line. Avoids an ARI warning.
10484
10485 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
10486
10487 * NEWS: Mention support for record/replay of Intel 64 rdrand and
10488 rdseed instructions.
10489 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
10490
10491 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
10492
10493 PR tdep/20936
10494 Provide and use sparc32 and sparc64 target description XML files.
10495 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
10496 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
10497 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
10498 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
10499 * features/sparc/sparc32-solaris.xml: New file.
10500 * features/sparc/sparc64-solaris.xml: New file.
10501 * features/sparc/sparc32-solaris.c: Generated.
10502 * features/sparc/sparc64-solaris.c: Generated.
10503 * sparc-tdep.h: Account for differences in target descriptions.
10504 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
10505 (sparc32_register_type): Use target provided registers.
10506 (validate_tdesc_registers): New function.
10507 (sparc32_gdbarch_init): Use tdesc_has_registers.
10508 Set pseudoregister functions.
10509 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
10510 (sparc64_register_type): Use target provided registers.
10511 (sparc64_init_abi): Set pseudoregister functions.
10512
10513 2017-02-03 Tom Tromey <tom@tromey.com>
10514
10515 PR rust/21097:
10516 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
10517 with a single member.
10518
10519 2017-02-03 Pedro Alves <palves@redhat.com>
10520
10521 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
10522 (cli_interp_base::~cli_interp_base): New.
10523 (cli_interp): New struct.
10524 (as_cli_interp): Cast the interp itself to cli_interp.
10525 (cli_interpreter_pre_command_loop): Rename to ...
10526 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
10527 parameter.
10528 (cli_interpreter_init): Rename to ...
10529 (cli_interp::init): ... this. Remove 'self' parameter. Use
10530 boolean. Make extern.
10531 (cli_interpreter_resume): Rename to ...
10532 (cli_interp::resume): ... this. Remove 'data' parameter. Make
10533 extern.
10534 (cli_interpreter_suspend): Rename to ...
10535 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
10536 extern.
10537 (cli_interpreter_exec): Rename to ...
10538 (cli_interp::exec): ... this. Remove 'data' parameter. Make
10539 extern.
10540 (cli_interpreter_supports_command_editing): Rename to ...
10541 (cli_interp_base::supports_command_editing): ... this. Remove
10542 'interp' parameter. Make extern.
10543 (cli_ui_out): Rename to ...
10544 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
10545 Make extern.
10546 (cli_set_logging): Rename to ...
10547 (cli_interp_base::set_logging): ... this. Remove 'interp'
10548 parameter. Make extern.
10549 (cli_interp_procs): Delete.
10550 (cli_interp_factory): Adjust to use "new".
10551 * cli/cli-interp.h: Include "interps.h".
10552 (struct cli_interp_base): New struct.
10553 * interps.c (struct interp): Delete. Fields moved to interps.h.
10554 (interp_new): Delete.
10555 (interp::interp, interp::~interp): New.
10556 (interp_set): Use bool, and return void. Assume the interpreter
10557 has suspend, init and resume methods, and that the all return
10558 void.
10559 (set_top_level_interpreter): interp_set returns void.
10560 (interp_ui_out): Adapt.
10561 (current_interp_set_logging): Adapt.
10562 (interp_data): Delete.
10563 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
10564 (interp_exec): Adapt.
10565 (top_level_interpreter_data): Delete.
10566 * interps.h (interp_init_ftype, interp_resume_ftype)
10567 (interp_suspend_ftype, interp_exec_ftype)
10568 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
10569 (class interp): New.
10570 (interp_new): Delete.
10571 (interp_set): Now returns void. Use bool.
10572 (interp_data, top_level_interpreter_data): Delete.
10573 * mi/mi-common.h: Include interps.h.
10574 (class mi_interp): Inherit from interp. Define a ctor. Declare
10575 init, resume, suspect, exec, interp_ui_out, set_logging and
10576 pre_command_loop methods.
10577 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
10578 (mi_interpreter_init): Rename to ...
10579 (mi_interp::init): ... this. Remove the 'interp' parameter, use
10580 bool, return void and make extern. Adjust.
10581 (mi_interpreter_resume): ... Rename to ...
10582 (mi_interp::resume): ... this. Remove the 'data' parameter,
10583 return void and make extern. Adjust.
10584 (mi_interpreter_suspend): ... Rename to ...
10585 (mi_interp::suspend): ... this. Remove the 'data' parameter,
10586 return void and make extern. Adjust.
10587 (mi_interpreter_exec): ... Rename to ...
10588 (mi_interp::exec): ... this. Remove the 'data' parameter and make
10589 extern. Adjust.
10590 (mi_interpreter_pre_command_loop): ... Rename to ...
10591 (mi_interp::pre_command_loop): ... this. Remove the 'self'
10592 parameter and make extern.
10593 (mi_on_normal_stop_1): Adjust.
10594 (mi_ui_out): Rename to ...
10595 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
10596 parameter and make extern. Adjust.
10597 (mi_set_logging): Rename to ...
10598 (mi_interp::set_logging): ... this. Remove the 'interp'
10599 parameter and make extern. Adjust.
10600 (mi_interp_procs): Delete.
10601 (mi_interp_factory): Adjust to use 'new'.
10602 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
10603 (mi_print_exception, mi_execute_command, mi_load_progress):
10604 Adjust.
10605 * tui/tui-interp.c (tui_interp): New class.
10606 (as_tui_interp): Return a tui_interp pointer.
10607 (tui_on_normal_stop, tui_on_signal_received)
10608 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
10609 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
10610 to use interp::interp_ui_out.
10611 (tui_init): Rename to ...
10612 (tui_interp::init): ... this. Remove the 'self' parameter, use
10613 bool, return void and make extern. Adjust.
10614 (tui_resume): Rename to ...
10615 (tui_interp::resume): ... this. Remove the 'data' parameter,
10616 return void and make extern. Adjust.
10617 (tui_suspend): Rename to ...
10618 (tui_interp::suspend): ... this. Remove the 'data' parameter,
10619 return void and make extern. Adjust.
10620 (tui_ui_out): Rename to ...
10621 (tui_interp::interp_ui_out): ... this. Remove the 'self'
10622 parameter, and make extern. Adjust.
10623 (tui_exec): Rename to ...
10624 (tui_interp::exec): ... this. Remove the 'data' parameter and
10625 make extern.
10626 (tui_interp_procs): Delete.
10627 (tui_interp_factory): Use "new".
10628
10629 2017-02-02 Tom Tromey <tom@tromey.com>
10630
10631 * rust-exp.y (ends_raw_string, space_then_number)
10632 (rust_identifier_start_p): Return bool.
10633 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
10634 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
10635 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
10636 (rust_chartype_p): Return bool.
10637 (val_print_struct, rust_print_struct_def, rust_print_type):
10638 Update.
10639 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
10640 Return bool.
10641
10642 2017-02-02 Tom Tromey <tom@tromey.com>
10643
10644 * rust-lang.c: Reindent.
10645
10646 2017-02-02 Tom Tromey <tom@tromey.com>
10647
10648 * rust-lang.h (rust_crate_for_block): Update.
10649 * rust-lang.c (rust_crate_for_block): Return std::string.
10650 (rust_get_disr_info): Use std:;string, not
10651 gdb::unique_xmalloc_ptr.
10652 * rust-exp.y (crate_name): Update.
10653
10654 2017-02-02 Pedro Alves <palves@redhat.com>
10655
10656 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
10657 field out of gdb_disassembler_test and make it static.
10658
10659 2017-02-02 Pedro Alves <palves@redhat.com>
10660
10661 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
10662 mi1_interp and mi_interp fields.
10663
10664 2017-02-02 Pedro Alves <palves@redhat.com>
10665
10666 * cli/cli-interp.c (struct saved_output_files, saved_output):
10667 Moved from cli/cli-logging.c.
10668 (cli_set_logging): New function.
10669 (cli_interp_procs): Install cli_set_logging.
10670 * cli/cli-interp.h (make_logging_output, cli_set_logging):
10671 Declare.
10672 * cli/cli-logging.c (struct saved_output_files, saved_output):
10673 Moved to cli/cli-interp.c.
10674 (pop_output_files): Don't save outputs here.
10675 (make_logging_output): New function.
10676 (handle_redirections): Don't build tee nor save previous outputs
10677 here.
10678 * interps.c (current_interp_set_logging): Change prototype.
10679 Assume there's always a set_logging_proc method installed.
10680 * interps.h (interp_set_logging_ftype): Change prototype.
10681 (current_interp_set_logging): Change prototype and adjust comment.
10682 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
10683 use make_logging_output.
10684 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
10685 2017-02-02 Pedro Alves <palves@redhat.com>
10686
10687 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10688 from ...
10689 (set_logging_overwrite): ... here.
10690 (logging_no_redirect_file): Delete.
10691 (set_logging_redirect): Don't handle redirection on the fly.
10692 Instead warn that "logging off" / "logging on" is necessary.
10693 (pop_output_files): Delete references to logging_no_redirect_file.
10694 (show_logging_command): Always speak in terms of what will happen
10695 once logging is reenabled.
10696
10697 2017-02-02 Pedro Alves <palves@redhat.com>
10698
10699 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10700
10701 2017-02-02 Pedro Alves <palves@redhat.com>
10702
10703 * disasm.c (gdb_pretty_print_insn): Rename to ...
10704 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10705 Remove gdbarch parameter. Adapt to clear the object's buffers
10706 instead of allocating new buffers, and to print using the object's
10707 gdb_disassembler instead of calling gdb_print_insn.
10708 (dump_insns): Use gdb_pretty_print_disassembler.
10709 * disasm.h (gdb_pretty_print_insn): Delete declaration.
10710 (gdb_pretty_print_disassembler): New class.
10711 * record-btrace.c (btrace_insn_history): Use
10712 gdb_pretty_print_disassembler.
10713
10714 2017-02-02 Pedro Alves <palves@redhat.com>
10715
10716 * ada-lang.c (type_as_string): Use string_file.
10717 * ada-valprint.c (ada_print_floating): Use string_file.
10718 * ada-varobj.c (ada_varobj_scalar_image)
10719 (ada_varobj_get_value_image): Use string_file.
10720 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10721 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10722 * breakpoint.c (update_inserted_breakpoint_locations)
10723 (insert_breakpoint_locations, reattach_breakpoints)
10724 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10725 (print_it_watchpoint): Use string_file.
10726 (save_breakpoints): Use stdio_file.
10727 * c-exp.y (oper): Use string_file.
10728 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10729 tee_file.
10730 (pop_output_files): Use delete.
10731 (handle_redirections): Use stdio_file and tee_file.
10732 * cli/cli-setshow.c (do_show_command): Use string_file.
10733 * compile/compile-c-support.c (c_compute_program): Use
10734 string_file.
10735 * compile/compile-c-symbols.c (generate_vla_size): Take a
10736 'string_file &' instead of a 'ui_file *'.
10737 (generate_c_for_for_one_variable): Take a 'string_file &' instead
10738 of a 'ui_file *'. Use string_file.
10739 (generate_c_for_variable_locations): Take a 'string_file &'
10740 instead of a 'ui_file *'.
10741 * compile/compile-internal.h (generate_c_for_for_one_variable):
10742 Take a 'string_file &' instead of a 'ui_file *'.
10743 * compile/compile-loc2c.c (push, pushf, unary, binary)
10744 (print_label, pushf_register_address, pushf_register)
10745 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10746 'ui_file *'. Adjust.
10747 * compile/compile.c (compile_to_object): Use string_file.
10748 * compile/compile.h (compile_dwarf_expr_to_c)
10749 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10750 'ui_file *'.
10751 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10752 (replace_typedefs_qualified_name): Use string_file and
10753 obstack_copy0.
10754 * disasm.c (gdb_pretty_print_insn): Use string_file.
10755 (gdb_disassembly): Adjust reference the null_stream global.
10756 (do_ui_file_delete): Delete.
10757 (gdb_insn_length): Use null_stream.
10758 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10759 * dwarf2loc.c (dwarf2_compile_property_to_c)
10760 (locexpr_generate_c_location, loclist_generate_c_location): Take a
10761 'string_file &' instead of a 'ui_file *'.
10762 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10763 * dwarf2read.c (do_ui_file_peek_last): Delete.
10764 (dwarf2_compute_name): Use string_file.
10765 * event-top.c (gdb_setup_readline): Use stdio_file.
10766 * gdbarch.sh (verify_gdbarch): Use string_file.
10767 * gdbtypes.c (safe_parse_type): Use null_stream.
10768 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10769 string_file.
10770 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10771 'string_file *' instead of a 'ui_file *'.
10772 (gdbscm_arch_disassemble): Use string_file.
10773 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
10774 * guile/scm-ports.c (class ioscm_file_port): Now a class that
10775 inherits from ui_file.
10776 (ioscm_file_port_delete, ioscm_file_port_rewind)
10777 (ioscm_file_port_put): Delete.
10778 (ioscm_file_port_write): Rename to ...
10779 (ioscm_file_port::write): ... this. Remove file_port_magic
10780 checks.
10781 (ioscm_file_port_new): Delete.
10782 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
10783 ui_file_up.
10784 * guile/scm-type.c (tyscm_type_name): Use string_file.
10785 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
10786 Use string_file.
10787 * infcmd.c (print_return_value_1): Use string_file.
10788 * infrun.c (print_target_wait_results): Use string_file.
10789 * language.c (add_language): Use string_file.
10790 * location.c (explicit_to_string_internal): Use string_file.
10791 * main.c (captured_main_1): Use null_file.
10792 * maint.c (maintenance_print_architecture): Use stdio_file.
10793 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
10794 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
10795 event_channel>: Change type to mi_console_file pointer.
10796 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
10797 (mi_console_file_delete): Delete.
10798 (struct mi_console_file): Delete.
10799 (mi_console_file_magic): Delete.
10800 (mi_console_file_new): Delete.
10801 (mi_console_file::mi_console_file): New.
10802 (mi_console_file_delete): Delete.
10803 (mi_console_file_fputs): Delete.
10804 (mi_console_file::write): New.
10805 (mi_console_raw_packet): Delete.
10806 (mi_console_file::flush): New.
10807 (mi_console_file_flush): Delete.
10808 (mi_console_set_raw): Rename to ...
10809 (mi_console_file::set_raw): ... this.
10810 * mi/mi-console.h (class mi_console_file): New class.
10811 (mi_console_file_new, mi_console_set_raw): Delete.
10812 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
10813 (mi_set_logging): Use delete and tee_file. Adjust.
10814 * mi/mi-main.c (output_register): Use string_file.
10815 (mi_cmd_data_evaluate_expression): Use string_file.
10816 (mi_cmd_data_read_memory): Use string_file.
10817 (mi_cmd_execute, print_variable_or_computed): Use string_file.
10818 * mi/mi-out.c (mi_ui_out::main_stream): New.
10819 (mi_ui_out::rewind): Use main_stream and
10820 string_file.
10821 (mi_ui_out::put): Use main_stream and string_file.
10822 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10823 Allocate a 'string_file' instead.
10824 (mi_out_new): Don't allocate a mem_fileopen stream here.
10825 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10826 (mi_ui_out::main_stream): Declare method.
10827 * printcmd.c (eval_command): Use string_file.
10828 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
10829 * python/py-arch.c (archpy_disassemble): Use string_file.
10830 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
10831 * python/py-frame.c (frapy_str): Use string_file.
10832 * python/py-framefilter.c (py_print_type, py_print_single_arg):
10833 Use string_file.
10834 * python/py-type.c (typy_str): Use string_file.
10835 * python/py-unwind.c (unwind_infopy_str): Use string_file.
10836 * python/py-value.c (valpy_str): Use string_file.
10837 * record-btrace.c (btrace_insn_history): Use string_file.
10838 * regcache.c (regcache_print): Use stdio_file.
10839 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
10840 * remote.c (escape_buffer): Use string_file.
10841 * rust-lang.c (rust_get_disr_info): Use string_file.
10842 * serial.c (serial_open_ops_1): Use stdio_file.
10843 (do_serial_close): Use delete.
10844 * stack.c (print_frame_arg): Use string_file.
10845 (print_frame_args): Remove local mem_fileopen stream, not used.
10846 (print_frame): Use string_file.
10847 * symmisc.c (maintenance_print_symbols): Use stdio_file.
10848 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
10849 Take a 'string_file *' instead of a 'ui_file *'.
10850 * top.c (new_ui): Use stdio_file and stderr_file.
10851 (free_ui): Use delete.
10852 (execute_command_to_string): Use string_file.
10853 (quit_confirm): Use string_file.
10854 * tracepoint.c (collection_list::append_exp): Use string_file.
10855 * tui/tui-disasm.c (tui_disassemble): Use string_file.
10856 * tui/tui-file.c: Don't include "ui-file.h".
10857 (enum streamtype, struct tui_stream): Delete.
10858 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
10859 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
10860 (tui_file::tui_file): New method.
10861 (tui_file_fputs): Delete.
10862 (tui_file_get_strbuf): Delete.
10863 (tui_file::puts): New method.
10864 (tui_file_adjust_strbuf): Delete.
10865 (tui_file_flush): Delete.
10866 (tui_file::flush): New method.
10867 * tui/tui-file.h: Tweak intro comment.
10868 Include ui-file.h.
10869 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
10870 (tui_file_adjust_strbuf): Delete declarations.
10871 (class tui_file): New class.
10872 * tui/tui-io.c (tui_initialize_io): Use tui_file.
10873 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
10874 (tui_register_format): Use string_stream.
10875 * tui/tui-stack.c (tui_make_status_line): Use string_file.
10876 (tui_get_function_from_frame): Use string_file.
10877 * typeprint.c (type_to_string): Use string_file.
10878 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
10879 (null_stream): New global.
10880 (ui_file_delete): Delete.
10881 (ui_file::ui_file): New.
10882 (null_file_isatty): Delete.
10883 (ui_file::~ui_file): New.
10884 (null_file_rewind): Delete.
10885 (ui_file::printf): New.
10886 (null_file_put): Delete.
10887 (null_file_flush): Delete.
10888 (ui_file::putstr): New.
10889 (null_file_write): Delete.
10890 (ui_file::putstrn): New.
10891 (null_file_read): Delete.
10892 (ui_file::putc): New.
10893 (null_file_fputs): Delete.
10894 (null_file_write_async_safe): Delete.
10895 (ui_file::vprintf): New.
10896 (null_file_delete): Delete.
10897 (null_file::write): New.
10898 (null_file_fseek): Delete.
10899 (null_file::puts): New.
10900 (ui_file_data): Delete.
10901 (null_file::write_async_safe): New.
10902 (gdb_flush, ui_file_isatty): Adjust.
10903 (ui_file_put, ui_file_rewind): Delete.
10904 (ui_file_write): Adjust.
10905 (ui_file_write_for_put): Delete.
10906 (ui_file_write_async_safe, ui_file_read): Adjust.
10907 (ui_file_fseek): Delete.
10908 (fputs_unfiltered): Adjust.
10909 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
10910 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
10911 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
10912 (set_ui_file_data): Delete.
10913 (string_file::~string_file, string_file::write)
10914 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
10915 (do_ui_file_as_string, ui_file_as_string): Delete.
10916 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
10917 (struct mem_file): Delete.
10918 (mem_file_new): Delete.
10919 (stdio_file::stdio_file): New.
10920 (mem_file_delete): Delete.
10921 (stdio_file::stdio_file): New.
10922 (mem_fileopen): Delete.
10923 (stdio_file::~stdio_file): New.
10924 (mem_file_rewind): Delete.
10925 (stdio_file::set_stream): New.
10926 (mem_file_put): Delete.
10927 (stdio_file::open): New.
10928 (mem_file_write): Delete.
10929 (stdio_file_magic, struct stdio_file): Delete.
10930 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
10931 (stdio_file::flush): New.
10932 (stdio_file_read): Rename to ...
10933 (stdio_file::read): ... this. Adjust.
10934 (stdio_file_write): Rename to ...
10935 (stdio_file::write): ... this. Adjust.
10936 (stdio_file_write_async_safe): Rename to ...
10937 (stdio_file::write_async_safe) ... this. Adjust.
10938 (stdio_file_fputs): Rename to ...
10939 (stdio_file::puts) ... this. Adjust.
10940 (stdio_file_isatty): Delete.
10941 (stdio_file_fseek): Delete.
10942 (stdio_file::isatty): New.
10943 (stderr_file_write): Rename to ...
10944 (stderr_file::write) ... this. Adjust.
10945 (stderr_file_fputs): Rename to ...
10946 (stderr_file::puts) ... this. Adjust.
10947 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
10948 (stderr_file::stderr_file): New.
10949 (tee_file_magic): Delete.
10950 (struct tee_file): Delete.
10951 (tee_file::tee_file): New.
10952 (tee_file_new): Delete.
10953 (tee_file::~tee_file): New.
10954 (tee_file_delete): Delete.
10955 (tee_file_flush): Rename to ...
10956 (tee_file::flush): ... this. Adjust.
10957 (tee_file_write): Rename to ...
10958 (tee_file::write): ... this. Adjust.
10959 (tee_file::write_async_safe): New.
10960 (tee_file_fputs): Rename to ...
10961 (tee_file::puts): ... this. Adjust.
10962 (tee_file_isatty): Rename to ...
10963 (tee_file::isatty): ... this. Adjust.
10964 * ui-file.h (struct obstack, struct ui_file): Don't
10965 forward-declare.
10966 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
10967 (ui_file_write_ftype)
10968 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
10969 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
10970 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
10971 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
10972 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
10973 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
10974 (set_ui_file_fseek): Delete.
10975 (ui_file_data, ui_file_delete, ui_file_rewind)
10976 (struct ui_file): New.
10977 (ui_file_up): New.
10978 (class null_file): New.
10979 (null_stream): Declare.
10980 (ui_file_write_for_put, ui_file_put): Delete.
10981 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
10982 Delete.
10983 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
10984 (gdb_fopen, tee_file_new): Delete.
10985 (struct string_file): New.
10986 (struct stdio_file): New.
10987 (stdio_file_up): New.
10988 (struct stderr_file): New.
10989 (class tee_file): New.
10990 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
10991 of a 'ui_file *'. Adjust.
10992 * ui-out.h (class ui_out) <field_stream>: Likewise.
10993 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
10994 (null_stream): Delete.
10995 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
10996 Adjust.
10997 * utils.h (struct ui_file): Delete forward declaration..
10998 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
10999 (error_stream): Take a 'string_file &' instead of a
11000 'ui_file *'.
11001 * varobj.c (varobj_value_get_print_value): Use string_file.
11002 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
11003 * gdbarch.c: Regenerate.
11004
11005 2017-02-02 Pedro Alves <palves@redhat.com>
11006
11007 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
11008 (gdb_pretty_print_insn): ... this. Now a free function. Add back
11009 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
11010 Adjust to call gdb_print_insn instead of
11011 gdb_disassembler::print_insn.
11012 (dump_insns, do_mixed_source_and_assembly_deprecated)
11013 (do_mixed_source_and_assembly, do_assembly_only): Add back a
11014 'gdbarch' parameter. Remove gdb_disassembler parameter.
11015 (gdb_disassembly): Don't allocate a gdb_disassembler here.
11016 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
11017 declaration.
11018 (gdb_pretty_print_insn): Re-add declaration.
11019 * record-btrace.c (btrace_insn_history): Don't allocate a
11020 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
11021
11022 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
11023
11024 * disasm.h (gdb_disassembly): Remove file_string parameter.
11025 * disasm.c (gdb_disassembly): Likewise.
11026 * cli/cli-cmds.c (print_disassembly): Adapt.
11027 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
11028 * stack.c (do_gdb_disassembly): Likewise.
11029
11030 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
11031
11032 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
11033 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
11034 targets. And if the implicit value is longer than needed, extract
11035 the first bytes instead of the "least significant" ones.
11036
11037 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
11038
11039 * btrace.c (btrace_enable): Do not call btrace_add_pc for
11040 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
11041 (btrace_fetch): Assert can_access_registers_ptid.
11042 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
11043 validate_registers_access.
11044
11045 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
11046
11047 * gdbthread.h (can_access_registers_ptid): New.
11048 * thread.c (can_access_registers_ptid): New.
11049
11050 2017-02-01 Pedro Alves <palves@redhat.com>
11051
11052 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
11053
11054 2017-01-31 Pedro Alves <palves@redhat.com>
11055
11056 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11057 Fix typos.
11058
11059 2017-01-31 Pedro Alves <palves@redhat.com>
11060
11061 * stack.c (print_frame_args): Remove local mem_fileopen stream,
11062 not used.
11063
11064 2017-01-31 Pedro Alves <palves@redhat.com>
11065
11066 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11067
11068 2017-01-31 Pedro Alves <palves@redhat.com>
11069
11070 * common/scoped_restore.h
11071 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11072 change the value's parameter type to T2.
11073 (make_scoped_restore): Likewise.
11074
11075 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11076 Richard Henderson <rth@redhat.com>
11077
11078 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11079 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11080 GS_BASE for older kernels.
11081 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11082 GS_BASE for older kernels.
11083 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11084 and GS_BASE to the offset table.
11085 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11086 system register group.
11087 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11088 for older kernels.
11089 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11090 amd64 ABI.
11091 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11092 AMD64_GSBASE_REGNUM.
11093 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11094 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11095 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11096 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11097 i386/64bit-segments.xml in those rules.
11098 * features/i386/64bit-segments.xml: New file.
11099 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11100 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11101 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11102 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11103 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11104 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11105 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11106 * features/i386/amd64-avx-linux.c: Regenerated.
11107 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11108 * features/i386/amd64-avx-mpx.c: Regenerated.
11109 * features/i386/amd64-avx512-linux.c: Regenerated.
11110 * features/i386/amd64-linux.c: Regenerated.
11111 * features/i386/amd64-mpx-linux.c: Regenerated.
11112 * features/i386/i386-avx-mpx-linux.c: Regenerated.
11113 * features/i386/i386-avx-mpx.c: Regenerated.
11114 * features/i386/x32-avx-linux.c: Regenerated.
11115 * features/i386/x32-avx512-linux.c: Regenerated.
11116 * regformats/i386/amd64-avx-linux.dat: Regenerated.
11117 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11118 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11119 * regformats/i386/amd64-linux.dat: Regenerated.
11120 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11121 * regformats/i386/x32-avx-linux.dat: Regenerated.
11122 * regformats/i386/x32-avx512-linux.dat: Regenerated.
11123 * regformats/i386/x32-linux.dat: Regenerated.
11124
11125 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11126
11127 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11128 Set to AMD64_NUM_REGS.
11129
11130 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11131
11132 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11133 that checks validity of a register number.
11134
11135 2017-01-27 Kees Cook <keescook@google.com>
11136
11137 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
11138 fetch_fpregs if target has fpa registers.
11139 (arm_linux_store_inferior_registers): Call store_fpregs if target
11140 has fpa registers.
11141
11142 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
11143
11144 * cris-tdep.c (cris_gdbarch_init): Remove check for
11145 info.byte_order and force it to BFD_ENDIAN_LITTLE.
11146
11147 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
11148
11149 * corelow.c (get_core_register_section): Check for regset
11150 existence before checking for REGSET_VARIABLE_SIZE.
11151
11152 2017-01-26 Yao Qi <yao.qi@linaro.org>
11153 Pedro Alves <palves@redhat.com>
11154
11155 PR gdb/20939
11156 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
11157 call memory_error, save memaddr instead.
11158 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
11159 negative, cal memory_error.
11160 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
11161
11162 2017-01-26 Yao Qi <yao.qi@linaro.org>
11163
11164 * disasm-selftests.c (memory_error_test): New function.
11165 (_initialize_disasm_selftests): Register memory_error_test.
11166
11167 2017-01-26 Yao Qi <yao.qi@linaro.org>
11168
11169 * Makefile.in (SFILES): Add disasm-selftests.c and
11170 selftest-arch.c.
11171 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
11172 * disasm-selftests.c: New file.
11173 * selftest-arch.c: New file.
11174 * selftest-arch.h: New file.
11175
11176 2017-01-26 Yao Qi <yao.qi@linaro.org>
11177
11178 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
11179 to bfd_arch_mep. Don't return 0 if section is not
11180 found. Call print_insn_mep.
11181
11182 2017-01-26 Pedro Alves <palves@redhat.com>
11183 Yao Qi <yao.qi@linaro.org>
11184
11185 * arm-tdep.c: Include "disasm.h".
11186 (gdb_print_insn_arm): Update code to get gdbarch.
11187 * disasm.c (dis_asm_read_memory): Change it to
11188 gdb_disassembler::dis_asm_read_memory.
11189 (dis_asm_memory_error): Likewise.
11190 (dis_asm_print_address): Likewise.
11191 (gdb_pretty_print_insn): Change it to
11192 gdb_disassembler::pretty_print_insn.
11193 (dump_insns): Add one argument gdb_disassemlber. All
11194 callers updated.
11195 (do_mixed_source_and_assembly_deprecated): Likewise.
11196 (do_mixed_source_and_assembly): Likewise.
11197 (do_assembly_only): Likewise.
11198 (gdb_disassembler::gdb_disassembler): New.
11199 (gdb_disassembler::print_insn): New.
11200 * disasm.h (class gdb_disassembler): New.
11201 (gdb_pretty_print_insn): Remove declaration.
11202 (gdb_disassemble_info): Likewise.
11203 * guile/scm-disasm.c (class gdbscm_disassembler): New.
11204 (gdbscm_disasm_read_memory_worker): Update.
11205 (gdbscm_disasm_read_memory): Update.
11206 (gdbscm_disasm_memory_error): Remove.
11207 (gdbscm_disasm_print_address): Remove.
11208 (gdbscm_disassembler::gdbscm_disassembler): New.
11209 (gdbscm_print_insn_from_port): Update.
11210 * mips-tdep.c: Include disasm.h.
11211 (gdb_print_insn_mips): Update code to get gdbarch.
11212 * record-btrace.c (btrace_insn_history): Update.
11213 * spu-tdep.c: Include disasm.h.
11214 (struct spu_dis_asm_data): Remove.
11215 (struct spu_dis_asm_info): New.
11216 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11217 SPU id.
11218 (gdb_print_insn_spu): Cast disassemble_info to
11219 spu_dis_asm_info.
11220
11221 2017-01-26 Yao Qi <yao.qi@linaro.org>
11222
11223 * disasm.c (do_ui_file_delete): Delete.
11224 (gdb_insn_length): Move code creating stream to ...
11225 * utils.c (null_stream): ... here. New function.
11226 * utils.h (null_stream): Declare.
11227
11228 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
11229
11230 * python/py-inferior.c (find_thread_object): Return directly
11231 from the loop. Remove "found" variable.
11232
11233 2017-01-21 Joel Brobecker <brobecker@adacore.com>
11234
11235 GDB 7.12.1 released.
11236
11237 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11238
11239 * python/py-function.c (fnpy_call): Reorder declarations to have
11240 the gdbpy_enter object declared first.
11241 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11242
11243 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11244
11245 PR python/21068
11246 * python/python-internal.h (PyMem_RawMalloc): Define for
11247 Python < 3.4.
11248 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
11249 PyMem_RawMalloc instead of PyMem_Malloc.
11250
11251 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
11252 Luis Machado <lgustavo@codesourcery.com>
11253
11254 * NEWS (New commands): Mention flash-erase.
11255 (New MI commands): Mention target-flash-erase.
11256 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
11257 command.
11258 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
11259 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
11260 * target.c (flash_erase_command): New function.
11261 (initialize_targets): Add new flash-erase command.
11262 * target.h (flash_erase_command): New declaration.
11263
11264 2017-01-20 Joel Brobecker <brobecker@adacore.com>
11265
11266 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
11267 HAVE_SYS_PROCFS_H is defined.
11268
11269 2017-01-18 Alan Hayward <alan.hayward@arm.com>
11270
11271 * remote.c (struct cached_reg): Change data into a pointer.
11272 * (stop_reply_dtr): Free data pointers before deleting vector.
11273 (process_stop_reply): Likewise.
11274 (remote_parse_stop_reply): Allocate space for data
11275
11276 2017-01-18 Alan Hayward <alan.hayward@arm.com>
11277
11278 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
11279 MAX_REGISTER_SIZE.
11280 (amd64_pseudo_register_read_value): Likewise.
11281 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
11282 (store_register_using_P): Likewise.
11283 * regcache.c (regcache_xfer_part): Likewise.
11284
11285 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
11286
11287 Split real and pseudo registers.
11288 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
11289 (sparc32_pseudo_regnum): New enum.
11290 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
11291 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
11292 (SPARC32_CP0_REGISTERS): New macro.
11293 (sparc32_pseudo_register_name): New function.
11294 (sparc32_register_name): Use sparc32_pseudo_register_name.
11295 (sparc32_pseudo_register_type): New function.
11296 (sparc32_register_type): Use sparc32_pseudo_register_type.
11297 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
11298 pseudo register numbers.
11299 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
11300 (SPARC64_CP0_REGISTERS): New macro.
11301 (sparc64_pseudo_register_name): New function.
11302 (sparc64_register_name): Use sparc64_pseudo_register_name.
11303 (sparc64_pseudo_register_type): New function.
11304 (sparc64_register_type): Use sparc64_pseudo_register_type.
11305 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
11306 pseudo register numbers.
11307 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
11308 sparc64_store_arguments): Handle pseudo register numbers.
11309
11310 2017-01-13 Yao Qi <yao.qi@linaro.org>
11311
11312 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
11313 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
11314 output.
11315 (getpkt_or_notif_sane_1): Likewise.
11316
11317 2017-01-13 Yao Qi <yao.qi@linaro.org>
11318
11319 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
11320 of CC. Pass "-x c++-header" instead of "-x c".
11321
11322 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11323
11324 * remote.c (remote_can_async_p): Update comment.
11325
11326 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11327
11328 * linux-nat.c (linux_nat_can_async_p): Update comment.
11329
11330 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11331
11332 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
11333
11334 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
11335
11336 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
11337
11338 2017-01-10 Tom Tromey <tom@tromey.com>
11339
11340 * python/py-type.c (typy_legacy_template_argument): Update.
11341 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
11342 ~demangle_parse_info): Declare new members.
11343 (cp_demangled_name_to_comp): Return unique_ptr.
11344 (cp_demangled_name_parse_free)
11345 (make_cleanup_cp_demangled_name_parse_free)
11346 (cp_new_demangle_parse_info): Remove.
11347 * cp-support.c (do_demangled_name_parse_free_cleanup)
11348 (make_cleanup_cp_demangled_name_parse_free): Remove.
11349 (inspect_type, cp_canonicalize_string_full)
11350 (cp_canonicalize_string): Update.
11351 (mangled_name_to_comp): Change return type.
11352 (cp_class_name_from_physname, method_name_from_physname)
11353 (cp_func_name, cp_remove_params): Update.
11354 * cp-name-parser.y (demangle_parse_info): New constructor, from
11355 cp_new_demangle_parse_info.
11356 (~demangle_parse_info): New destructor, from
11357 cp_demangled_name_parse_free.
11358 (cp_merge_demangle_parse_infos): Update.
11359 (cp_demangled_name_to_comp): Change return type.
11360
11361 2017-01-10 Tom Tromey <tom@tromey.com>
11362
11363 * top.c (prevent_dont_repeat): Change return type.
11364 * python/python.c (execute_gdb_command): Use std::string.
11365 Update.
11366 * guile/guile.c (gdbscm_execute_gdb_command): Update.
11367 * command.h (prevent_dont_repeat): Change return type.
11368 * breakpoint.c (bpstat_do_actions_1): Update.
11369
11370 2017-01-10 Tom Tromey <tom@tromey.com>
11371
11372 * value.h (scoped_value_mark::~scoped_value_mark): Call
11373 free_to_mark.
11374 (scoped_value_mark::free_to_mark): New method.
11375 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
11376 scoped_value_mark.
11377
11378 2017-01-10 Tom Tromey <tom@tromey.com>
11379
11380 * python/py-value.c (valpy_dereference, valpy_referenced_value)
11381 (valpy_reference_value, valpy_const_value, valpy_get_address)
11382 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
11383 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
11384 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
11385 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
11386 scoped_value_mark.
11387 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
11388 * value.h (scoped_value_mark): New class.
11389
11390 2017-01-10 Tom Tromey <tom@tromey.com>
11391
11392 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
11393 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
11394 * psymtab.c (discard_psymtabs_upto): Remove.
11395 (make_cleanup_discard_psymtabs): Remove.
11396 (struct psymtab_state): Remove.
11397
11398 2017-01-10 Tom Tromey <tom@tromey.com>
11399
11400 * record-full.c (record_full_save_cleanups): Remove.
11401 (record_full_save): Use gdb::unlinker.
11402 * gcore.c (do_bfd_delete_cleanup): Remove.
11403 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
11404 cleanups.
11405 * dwarf2read.c (unlink_if_set): Remove.
11406 (write_psymtabs_to_index): Use gdb::unlinker.
11407 * common/gdb_unlinker.h: New file.
11408
11409 2017-01-10 Tom Tromey <tom@tromey.com>
11410
11411 * windows-tdep.c (windows_xfer_shared_library): Update.
11412 * windows-nat.c (windows_make_so): Update.
11413 * utils.h (make_cleanup_bfd_unref): Remove.
11414 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
11415 * symfile.h (symfile_bfd_open)
11416 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
11417 * symfile.c (read_symbols, symbol_file_add)
11418 (separate_debug_file_exists): Update.
11419 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
11420 (generic_load, reread_symbols): Update.
11421 * symfile-mem.c (symbol_file_add_from_memory): Update.
11422 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
11423 (spu_symbol_file_add_from_memory): Update.
11424 * solist.h (struct target_so_ops) <bfd_open>: Return
11425 gdb_bfd_ref_ptr.
11426 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
11427 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
11428 gdb_bfd_ref_ptr.
11429 (solib_map_sections, reload_shared_libraries_1): Update.
11430 * solib-svr4.c (enable_break): Update.
11431 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
11432 * solib-frv.c (enable_break2): Update.
11433 * solib-dsbt.c (enable_break): Update.
11434 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
11435 gdb_bfd_ref_ptr.
11436 (darwin_solib_get_all_image_info_addr_at_init): Update.
11437 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
11438 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
11439 * record-full.c (record_full_save): Update.
11440 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
11441 * procfs.c (insert_dbx_link_bpt_in_file): Update.
11442 * minidebug.c (find_separate_debug_file_in_section): Return
11443 gdb_bfd_ref_ptr.
11444 * machoread.c (macho_add_oso_symfile): Change abfd to
11445 gdb_bfd_ref_ptr.
11446 (macho_symfile_read_all_oso): Update.
11447 (macho_check_dsym): Return gdb_bfd_ref_ptr.
11448 (macho_symfile_read): Update.
11449 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
11450 (jit_bfd_try_read_symtab): Update.
11451 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11452 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11453 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11454 gdb_bfd_ref_ptr.
11455 (gdb_bfd_ref_policy): New struct.
11456 (gdb_bfd_ref_ptr): New typedef.
11457 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11458 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11459 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11460 gdb_bfd_ref_ptr.
11461 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11462 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11463 (gcore_command): Update.
11464 * exec.c (exec_file_attach): Update.
11465 * elfread.c (elf_symfile_read): Update.
11466 * dwarf2read.c (dwarf2_get_dwz_file): Update.
11467 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
11468 (open_and_init_dwo_file): Update.
11469 (open_dwp_file): Return gdb_bfd_ref_ptr.
11470 (open_and_init_dwp_file): Update.
11471 * corelow.c (core_open): Update.
11472 * compile/compile-object-load.c (compile_object_load): Update.
11473 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
11474 * coffread.c (coff_symfile_read): Update.
11475 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
11476 gdb_bfd_ref_ptr. Rename.
11477 (dump_bfd_file, restore_command): Update.
11478 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11479 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11480 (find_separate_debug_file_by_buildid): Update.
11481
11482 2017-01-10 Tom Tromey <tom@tromey.com>
11483
11484 * common/gdb_ref_ptr.h: New file.
11485 * python/py-ref.h (struct gdbpy_ref_policy): New.
11486 (gdbpy_ref): Now a typedef.
11487
11488 2017-01-10 Tom Tromey <tom@tromey.com>
11489
11490 * utils.h (make_cleanup_htab_delete): Don't declare.
11491 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
11492 Remove.
11493 * linespec.c (decode_compound_collector): Add constructor,
11494 destructor.
11495 (lookup_prefix_sym): Remove cleanup.
11496 (symtab_collector): Add constructor, destructor.
11497 (collect_symtabs_from_filename): Remove cleanup.
11498 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
11499 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
11500 Use htab_up.
11501 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
11502 * dwarf2read.c (dw2_expand_symtabs_matching)
11503 (dw2_map_symbol_filenames, dwarf_decode_macros)
11504 (write_psymtabs_to_index): Use htab_up.
11505 * dwarf2loc.c (func_verify_no_selftailcall)
11506 (call_site_find_chain_1, func_verify_no_selftailcall)
11507 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
11508 std::vector, gdb::unique_xmalloc_ptr.
11509 (call_sitep): Remove typedef.
11510 (dwarf2_locexpr_baton_eval): Remove unused variable.
11511
11512 2017-01-10 Tom Tromey <tom@tromey.com>
11513
11514 * python/python-internal.h (make_cleanup_py_decref)
11515 (make_cleanup_py_xdecref): Don't declare.
11516 * python/py-utils.c (py_decref, make_cleanup_py_decref)
11517 (py_xdecref, make_cleanup_py_xdecref): Remove.
11518
11519 2017-01-10 Tom Tromey <tom@tromey.com>
11520
11521 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
11522 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
11523
11524 2017-01-10 Tom Tromey <tom@tromey.com>
11525
11526 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
11527
11528 2017-01-10 Tom Tromey <tom@tromey.com>
11529
11530 * python/py-utils.c (unicode_to_encoded_string)
11531 (python_string_to_target_string)
11532 (python_string_to_target_python_string)
11533 (python_string_to_host_string, gdbpy_obj_to_string)
11534 (get_addr_from_python): Use gdbpy_ref.
11535
11536 2017-01-10 Tom Tromey <tom@tromey.com>
11537
11538 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
11539 gdbpy_ref.
11540
11541 2017-01-10 Tom Tromey <tom@tromey.com>
11542
11543 * python/python.c (eval_python_command, gdbpy_decode_line)
11544 (gdbpy_run_events, gdbpy_start_type_printers)
11545 (gdbpy_apply_type_printers): Use gdbpy_ref.
11546
11547 2017-01-10 Tom Tromey <tom@tromey.com>
11548
11549 * python/py-param.c (get_doc_string, compute_enum_values): Use
11550 gdbpy_ref.
11551
11552 2017-01-10 Tom Tromey <tom@tromey.com>
11553
11554 * python/py-inferior.c (find_thread_object, build_inferior_list):
11555 Use gdbpy_ref.
11556
11557 2017-01-10 Tom Tromey <tom@tromey.com>
11558
11559 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11560
11561 2017-01-10 Tom Tromey <tom@tromey.com>
11562
11563 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
11564 gdbpy_ref.
11565
11566 2017-01-10 Tom Tromey <tom@tromey.com>
11567
11568 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
11569 extra incref.
11570 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
11571 Use gdbpy_ref.
11572
11573 2017-01-10 Tom Tromey <tom@tromey.com>
11574
11575 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11576 gdbpy_ref.
11577
11578 2017-01-10 Tom Tromey <tom@tromey.com>
11579
11580 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
11581 decref results of PyArg_ParseTupleAndKeywords.
11582
11583 2017-01-10 Tom Tromey <tom@tromey.com>
11584
11585 * python/python.c (python_run_simple_file): Use
11586 unique_xmalloc_ptr, gdbpy_ref.
11587
11588 2017-01-10 Tom Tromey <tom@tromey.com>
11589
11590 * python/py-prettyprint.c (print_stack_unless_memory_error)
11591 (print_string_repr, print_children): Use gdbpy_ref.
11592 (dummy_python_frame): New class.
11593 (dummy_python_frame::dummy_python_frame): Rename from
11594 push_dummy_python_frame.
11595 (py_restore_tstate): Remove.
11596
11597 2017-01-10 Tom Tromey <tom@tromey.com>
11598
11599 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11600
11601 2017-01-10 Tom Tromey <tom@tromey.com>
11602
11603 * python/python.c (ensure_python_env, restore_python_env):
11604 Remove.
11605 * python/python-internal.h (ensure_python_env): Don't declare.
11606 * varobj.h (varobj_ensure_python_env): Don't declare.
11607 * varobj.c (varobj_ensure_python_env): Remove.
11608
11609 2017-01-10 Tom Tromey <tom@tromey.com>
11610
11611 * varobj.c (varobj_value_get_print_value): Use
11612 gdbpy_enter_varobj.
11613
11614 2017-01-10 Tom Tromey <tom@tromey.com>
11615
11616 * python/py-prettyprint.c (print_string_repr, print_children):
11617 Update.
11618 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
11619 of "encoding".
11620 * varobj.c (varobj_value_get_print_value): Update.
11621 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
11622
11623 2017-01-10 Tom Tromey <tom@tromey.com>
11624
11625 * varobj.c (varobj_get_display_hint)
11626 (dynamic_varobj_has_child_method, install_new_value_visualizer)
11627 (varobj_set_visualizer, free_variable): Use
11628 gdbpy_enter_varobj.
11629
11630 2017-01-10 Tom Tromey <tom@tromey.com>
11631
11632 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
11633 (do_finish_initialization): New function. Use gdbpy_ref.
11634 (gdbpy_finish_initialization): Use gdbpy_enter. Call
11635 do_finish_initialization.
11636
11637 2017-01-10 Tom Tromey <tom@tromey.com>
11638
11639 * python/py-param.c (get_set_value, get_show_value): Use
11640 gdbpy_enter, gdbpy_ref.
11641
11642 2017-01-10 Tom Tromey <tom@tromey.com>
11643
11644 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
11645
11646 2017-01-10 Tom Tromey <tom@tromey.com>
11647
11648 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
11649
11650 2017-01-10 Tom Tromey <tom@tromey.com>
11651
11652 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
11653 Use gdbpy_enter_varobj.
11654
11655 2017-01-10 Tom Tromey <tom@tromey.com>
11656
11657 * varobj.c (gdbpy_enter_varobj): New constructor.
11658 * python/python-internal.h (gdbpy_enter_varobj): New class.
11659 * python/py-varobj.c (py_varobj_get_iterator): Use
11660 gdbpy_enter_varobj.
11661
11662 2017-01-10 Tom Tromey <tom@tromey.com>
11663
11664 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
11665 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11666 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
11667 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
11668 unique_xmalloc_ptr.
11669 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
11670
11671 2017-01-10 Tom Tromey <tom@tromey.com>
11672
11673 * python/py-xmethods.c (invoke_match_method): Use
11674 gdbpy_ref.
11675
11676 2017-01-10 Tom Tromey <tom@tromey.com>
11677
11678 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
11679 gdbpy_enter, gdbpy_ref.
11680
11681 2017-01-10 Tom Tromey <tom@tromey.com>
11682
11683 * python/python.c (python_interactive_command): Use gdbpy_enter.
11684
11685 2017-01-10 Tom Tromey <tom@tromey.com>
11686
11687 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11688 gdbpy_ref.
11689
11690 2017-01-10 Tom Tromey <tom@tromey.com>
11691
11692 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11693 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11694
11695 2017-01-10 Tom Tromey <tom@tromey.com>
11696
11697 * utils.h (htab_deleter): New struct.
11698 (htab_up): New typedef.
11699 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11700 gdbpy_enter, gdbpy_ref, htab_up.
11701
11702 2017-01-10 Tom Tromey <tom@tromey.com>
11703
11704 * python/py-unwind.c (pending_frame_invalidate): Remove.
11705 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11706
11707 2017-01-10 Tom Tromey <tom@tromey.com>
11708
11709 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11710 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11711
11712 2017-01-10 Tom Tromey <tom@tromey.com>
11713
11714 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11715
11716 2017-01-10 Tom Tromey <tom@tromey.com>
11717
11718 * python/python.c (gdbpy_eval_from_control_command)
11719 (gdbpy_source_script, gdbpy_run_events)
11720 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11721 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11722 gdbpy_enter.
11723
11724 2017-01-10 Tom Tromey <tom@tromey.com>
11725
11726 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11727
11728 2017-01-10 Tom Tromey <tom@tromey.com>
11729
11730 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11731
11732 2017-01-10 Tom Tromey <tom@tromey.com>
11733
11734 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11735 (python_on_inferior_call_pre, python_on_inferior_call_post)
11736 (python_on_memory_change, python_on_register_change)
11737 (python_inferior_exit, python_new_objfile, add_thread_object)
11738 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11739
11740 2017-01-10 Tom Tromey <tom@tromey.com>
11741
11742 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11743 (bpfinishpy_handle_exit): Use gdbpy_enter.
11744
11745 2017-01-10 Tom Tromey <tom@tromey.com>
11746
11747 * python/py-cmd.c (cmdpy_destroyer)
11748 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11749 gdbpy_enter.
11750
11751 2017-01-10 Tom Tromey <tom@tromey.com>
11752
11753 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11754 gdbpy_enter.
11755 (gdbpy_breakpoint_has_cond): Likewise.
11756
11757 2017-01-10 Tom Tromey <tom@tromey.com>
11758
11759 * python/python.c (gdbpy_enter): New constructor.
11760 (~gdbpy_enter): New destructor.
11761 (restore_python_env, ensure_python_env): Rewrite.
11762 * python/python-internal.h (gdbpy_enter): New class.
11763
11764 2017-01-10 Tom Tromey <tom@tromey.com>
11765
11766 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11767
11768 2017-01-10 Tom Tromey <tom@tromey.com>
11769
11770 * python/py-value.c (value_has_field, get_field_flag)
11771 (get_field_type, valpy_getitem, convert_value_from_python): Use
11772 gdbpy_ref.
11773
11774 2017-01-10 Tom Tromey <tom@tromey.com>
11775
11776 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
11777 gdbpy_ref.
11778
11779 2017-01-10 Tom Tromey <tom@tromey.com>
11780
11781 * python/py-prettyprint.c (search_pp_list)
11782 (find_pretty_printer_from_objfiles)
11783 (find_pretty_printer_from_progspace)
11784 (find_pretty_printer_from_gdb, find_pretty_printer)
11785 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
11786 gdbpy_ref.
11787
11788 2017-01-10 Tom Tromey <tom@tromey.com>
11789
11790 * python/py-param.c (call_doc_function): Use gdbpy_ref.
11791
11792 2017-01-10 Tom Tromey <tom@tromey.com>
11793
11794 * python/py-linetable.c (build_line_table_tuple_from_pcs)
11795 (ltpy_get_all_source_lines): Use gdbpy_ref.
11796
11797 2017-01-10 Tom Tromey <tom@tromey.com>
11798
11799 * python/py-framefilter.c (extract_sym, extract_value)
11800 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
11801 gdbpy_ref.
11802
11803 2017-01-10 Tom Tromey <tom@tromey.com>
11804
11805 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
11806
11807 2017-01-10 Tom Tromey <tom@tromey.com>
11808
11809 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
11810
11811 2017-01-10 Tom Tromey <tom@tromey.com>
11812
11813 * python/py-function.c (convert_values_to_python, fnpy_init): Use
11814 gdbpy_ref.
11815
11816 2017-01-10 Tom Tromey <tom@tromey.com>
11817
11818 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
11819
11820 2017-01-10 Tom Tromey <tom@tromey.com>
11821
11822 * python/py-type.c (convert_field, make_fielditem, typy_fields)
11823 (typy_range): Use gdbpy_ref.
11824
11825 2017-01-10 Tom Tromey <tom@tromey.com>
11826
11827 * python/py-threadevent.c (create_thread_event_object): Use
11828 gdbpy_ref.
11829 * python/py-stopevent.c (create_stop_event_object): Simplify.
11830 (emit_stop_event): Use gdbpy_ref.
11831 * python/py-signalevent.c (create_signal_event_object): Use
11832 gdbpy_ref.
11833 * python/py-newobjfileevent.c (create_new_objfile_event_object)
11834 (emit_new_objfile_event, create_clear_objfiles_event_object)
11835 (emit_clear_objfiles_event): Use gdbpy_ref.
11836 * python/py-infevents.c (create_inferior_call_event_object)
11837 (create_register_changed_event_object)
11838 (create_memory_changed_event_object, emit_inferior_call_event)
11839 (emit_memory_changed_event, emit_register_changed_event): Use
11840 gdbpy_ref.
11841 * python/py-exitedevent.c (create_exited_event_object)
11842 (emit_exited_event): Use gdbpy_ref.
11843 * python/py-event.h (evpy_emit_event): Remove
11844 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
11845 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
11846 * python/py-continueevent.c (emit_continue_event): Use
11847 gdbpy_ref.
11848 * python/py-breakpoint.c (gdbpy_breakpoint_created)
11849 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
11850 gdbpy_ref.
11851 * python/py-bpevent.c (create_breakpoint_event_object): Use
11852 gdbpy_ref.
11853
11854 2017-01-10 Tom Tromey <tom@tromey.com>
11855
11856 * python/py-ref.h: New file.
11857
11858 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11859
11860 * cli-out.c (cli_ui_out::do_redirect): Change return type to
11861 void.
11862 * cli-out.h (cli_ui_out::do_redirect): Likewise.
11863 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
11864 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
11865 * ui-out.c (ui_out::redirect): Likewise.
11866 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
11867 * cli/cli-logging.c (set_logging_redirect): Update call site of
11868 ui_out::redirect.
11869 (handle_redirections): Likewise.
11870 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
11871 * top.c (execute_command_to_string): Likewise.
11872 * utils.c (do_ui_out_redirect_pop): Likewise.
11873
11874 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11875
11876 * stack.c (_initialize_stack): Update "frame" command help message.
11877
11878 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
11879
11880 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
11881
11882 2017-01-06 Yao Qi <yao.qi@linaro.org>
11883
11884 * x86-linux-nat.h: Include gdb_proc_service.h.
11885
11886 2017-01-06 Yao Qi <yao.qi@linaro.org>
11887
11888 * ser-base.h: Include serial.h.
11889
11890 2017-01-06 Yao Qi <yao.qi@linaro.org>
11891
11892 * ppc-linux-tdep.h: Include ppc-tdep.h.
11893
11894 2017-01-06 Yao Qi <yao.qi@linaro.org>
11895
11896 * nat/amd64-linux-siginfo.h: Include signal.h.
11897
11898 2017-01-06 Yao Qi <yao.qi@linaro.org>
11899
11900 * nat/aarch64-linux-hw-point.h: Include break-common.h.
11901
11902 2017-01-06 Yao Qi <yao.qi@linaro.org>
11903
11904 * mi/mi-parse.h: Include mi-cmds.h.
11905
11906 2017-01-06 Yao Qi <yao.qi@linaro.org>
11907
11908 * inf-loop.c: Don't include "target.h".
11909 * inf-loop.h: Include it here.
11910
11911 2017-01-06 Yao Qi <yao.qi@linaro.org>
11912
11913 * dfp.h: Include "dboulest.h" and "expression.h".
11914
11915 2017-01-06 Yao Qi <yao.qi@linaro.org>
11916
11917 * ax-gdb.h: Include "ax.h".
11918
11919 2017-01-06 Yao Qi <yao.qi@linaro.org>
11920
11921 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
11922 with nat/gdb_ptrace.h.
11923
11924 2017-01-05 Yao Qi <yao.qi@linaro.org>
11925
11926 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
11927 new line.
11928 (mips64_fbsd_sigframe_init): Likewise.
11929
11930 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11931
11932 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
11933 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
11934
11935 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11936
11937 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
11938 * NEWS: Mention new FreeBSD/mips native configuration.
11939 * config/mips/fbsd.mh: New file.
11940 * configure.host: Add mips*-*-freebsd*.
11941 * mips-fbsd-nat.c: New file.
11942
11943 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11944
11945 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
11946 (ALLDEPFILES): Add mips-fbsd-tdep.c.
11947 * NEWS: Mention new FreeBSD/mips target.
11948 * configure.tgt: Add mips*-*-freebsd*.
11949 * mips-fbsd-tdep.c: New file.
11950 * mips-fbsd-tdep.h: New file.
11951
11952 2017-01-04 Yao Qi <yao.qi@linaro.org>
11953
11954 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
11955 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
11956
11957 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11958
11959 Update copyright year range in all GDB files.
11960
11961 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11962
11963 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
11964
11965 For older changes see ChangeLog-2016.
11966 \f
11967 Local Variables:
11968 mode: change-log
11969 left-margin: 8
11970 fill-column: 74
11971 version-control: never
11972 coding: utf-8
11973 End:
This page took 0.289856 seconds and 5 git commands to generate.