df58772d34d015b8ca26111c75115a37bbea9c3f
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-09-29 Tom Tromey <tom@tromey.com>
2
3 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4 gdb::byte_vector.
5
6 2017-09-29 Tom Tromey <tom@tromey.com>
7
8 * mi/mi-parse.c (mi_parse): Remove unused declaration.
9
10 2017-09-29 Tom Tromey <tom@tromey.com>
11
12 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
13
14 2017-09-29 Tom Tromey <tom@tromey.com>
15
16 * varobj.h (varobj_gen_name): Return std::string.
17 * varobj.c (varobj_gen_name): Return std::string.
18 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
19 (mi_cmd_var_delete): Don't copy "name".
20
21 2017-09-29 Tom Tromey <tom@tromey.com>
22
23 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
24 (mi_cmd_break_insert_1): Update.
25
26 2017-09-29 Tom Tromey <tom@tromey.com>
27
28 * target.h (make_scoped_defer_target_commit_resume): Update.
29 * target.c (make_scoped_defer_target_commit_resume): Rename from
30 make_cleanup_defer_target_commit_resume. Return a
31 scoped_restore.
32 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
33
34 2017-09-29 Tom Tromey <tom@tromey.com>
35
36 * main.c (captured_main_1): Remove unused declaration.
37 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
38
39 2017-09-29 Tom Tromey <tom@tromey.com>
40
41 * symtab.c (search_symbols): Remove unused outer cleanup.
42 (make_source_files_completion_list): Remove unused declaration.
43
44 2017-09-29 Tom Tromey <tom@tromey.com>
45
46 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
47
48 2017-09-29 Tom Tromey <tom@tromey.com>
49
50 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
51 gdb::byte_vector.
52
53 2017-09-29 Tom Tromey <tom@tromey.com>
54
55 * complaints.c (vcomplaint): Use std::string.
56
57 2017-09-29 Tom Tromey <tom@tromey.com>
58
59 * tracepoint.c (trace_variable_command): Use std::string.
60 (encode_actions_1): Remove unused declarations.
61 (create_tsv_from_upload): Use std::string.
62
63 2017-09-29 Tom Tromey <tom@tromey.com>
64
65 * cp-support.c (gdb_demangle): Use std::string.
66
67 2017-09-29 Tom Tromey <tom@tromey.com>
68
69 * stack.c (parse_frame_specification): Use std::string
70 (info_frame_command): Use gdb::unique_xmalloc_ptr.
71
72 2017-09-29 Tom Tromey <tom@tromey.com>
73
74 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
75
76 2017-09-29 Tom Tromey <tom@tromey.com>
77
78 * utils.c (vfprintf_maybe_filtered): Use std::string.
79 (vfprintf_unfiltered): Likewise.
80
81 2017-09-29 Tom Tromey <tom@tromey.com>
82
83 * event-top.c (top_level_prompt): Return std::string.
84 (display_gdb_prompt): Update.
85
86 2017-09-29 Tom Tromey <tom@tromey.com>
87
88 * unittests/common-utils-selftests.c (format): New function.
89 (string_vprintf_tests): New function.
90 (_initialize_common_utils_selftests): Register new tests.
91 * common/common-utils.c (string_vprintf): New function.
92 * common/common-utils.h (string_vprintf): Declare.
93
94 2017-09-29 Pedro Alves <palves@redhat.com>
95
96 * common/rsp-low.c (unpack_varlen_hex): Constify.
97 * common/rsp-low.h (unpack_varlen_hex): Constify.
98 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
99 Constify.
100 * remote.c (remote_set_permissions, read_ptid)
101 (remote_current_thread, remote_get_threads_with_qthreadinfo)
102 (remote_static_tracepoint_marker_at)
103 (remote_static_tracepoint_markers_by_strid)
104 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
105 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
106 (parse_tracepoint_definition, parse_tsv_definition)
107 (parse_static_tracepoint_marker_definition): Constify.
108 * tracepoint.h (parse_static_tracepoint_marker_definition)
109 (parse_trace_status, parse_tracepoint_status)
110 (parse_tracepoint_definition, parse_tsv_definition): Constify.
111
112 2017-09-29 Pedro Alves <palves@redhat.com>
113
114 * remote.c (target_buf, target_buf_size): Delete.
115 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
116 Use the connection's packet buffer instead.
117 All callers adjusted.
118 (_initialize_remote): Remove references to target_buf and
119 target_buf_size.
120
121 2017-09-28 Pedro Alves <palves@redhat.com>
122
123 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
124 unittests/common-utils-selftests.c.
125 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
126 (COMMON_OBS): Remove utils-selftests.o.
127 * utils-selftests.c: Move to ...
128 * unittests/common-utils-selftests.c: ... here and rename self
129 test to "string_printf".
130
131 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
132
133 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
134 having NULL cus or tus.
135
136 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
137
138 * arm-tdep.c: (convert_from_extended): Remove.
139 (convert_to_extended): Likewise.
140 (arm_extract_return_value): Use convert_typed_floating.
141 (arm_store_return_value): Likewise.
142
143 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
144 * sh-tdep.c: Do not include "floatformat.h".
145 (sh_littlebyte_bigword_type): New function.
146 (sh_register_convert_to_virtual): Use convert_typed_floating.
147 (sh_register_convert_to_raw): Likewise.
148 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
149 (sh64_littlebyte_bigword_type): New function.
150 (sh64_extract_return_value): Use convert_typed_floating.
151 (sh64_register_convert_to_virtual): Likewise.
152 (sh64_register_convert_to_raw): Likewise.
153
154 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
155
156 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
157 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
158
159 * gdbtypes.h (union type_specific): Make field floatformat hold
160 just a single struct floatformat, not an array.
161 (floatformat_from_type): Move here.
162 * gdbtypes.c (floatformat_from_type): Move here. Update to
163 changed TYPE_FLOATFORMAT definition.
164 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
165 (recursive_dump_type): Likewise.
166 (init_float_type): Install correct floatformat for byte order.
167 (arch_float_type): Likewise.
168
169 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
170
171 * gdbtypes.c (init_type): Change incoming argument from
172 length-in-bytes to length-in-bits. Assert length is a
173 multiple of TARGET_CHAR_BITS.
174 (arch_type, arch_flags_type): Likewise.
175 (init_integer_type): Update call to init_type.
176 (init_character_type): Likewise.
177 (init_boolean_type): Likewise.
178 (init_float_type): Likewise.
179 (init_decfloat_type): Likewise.
180 (init_complex_type): Likewise.
181 (init_pointer_type): Likewise.
182 (objfile_type): Likewise.
183 (arch_integer_type): Update call to arch_type.
184 (arch_character_type): Likewise.
185 (arch_boolean_type): Likewise.
186 (arch_float_type): Likewise.
187 (arch_decfloat_type): Likewise.
188 (arch_complex_type): Likewise.
189 (arch_pointer_type): Likewise.
190 (gdbtypes_post_init): Likewise.
191
192 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
193 (read_base_type): Likewise.
194 * mdebugread.c (basic_type): Likewise.
195 * stabsread.c (dbx_init_float_type): Likewise.
196 (rs6000_builtin_type): Likewise.
197 (read_range_type): Likewise. Also, fix call to init_integer_type
198 with erroneous length argument.
199
200 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
201 * d-lang.c (build_d_types): Likewise.
202 * f-lang.c (build_fortran_types): Likewise.
203 * go-lang.c (build_go_types): Likewise.
204 * opencl-lang.c (build_opencl_types): Likewise.
205 * jit.c (finalize_symtab): Likewise.
206 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
207 (build_std_type_info_type): Likewise.
208 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
209 update call to arch_flags_type.
210
211 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
212 arch_type.
213 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
214 * windows-tdep.c (windows_get_tlb_type): Likewise.
215
216 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
217 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
218 * m32c-tdep.c (make_types): Likewise.
219 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
220 (rl78_psw_type): Update call to arch_flags_type.
221 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
222 * rx-tdep.c (rx_psw_type): Likewise.
223 (rx_fpsw_type): Likewise.
224 * sparc-tdep.c (sparc_psr_type): Likewise.
225 (sparc_fsr_type): Likewise.
226 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
227 (sparc64_ccr_type): Likewise.
228 (sparc64_fsr_type): Likewise.
229 (sparc64_fprs_type): Likewise.
230
231 2017-09-27 Tom Tromey <tom@tromey.com>
232
233 * findcmd.c (find_command): Constify.
234
235 2017-09-27 Tom Tromey <tom@tromey.com>
236
237 * ada-tasks.c (task_command_1, task_command): Constify.
238
239 2017-09-27 Tom Tromey <tom@tromey.com>
240
241 * symtab.c (maintenance_print_symbol_cache)
242 (maintenance_flush_symbol_cache)
243 (maintenance_print_symbol_cache_statistics): Constify.
244
245 2017-09-27 Tom Tromey <tom@tromey.com>
246
247 * inferior.c (detach_inferior_command, kill_inferior_command)
248 (inferior_command): Constify.
249
250 2017-09-27 Tom Tromey <tom@tromey.com>
251
252 * regcache.c (regcache_print, maintenance_print_registers)
253 (maintenance_print_raw_registers)
254 (maintenance_print_cooked_registers)
255 (maintenance_print_register_groups)
256 (maintenance_print_remote_registers): Constify.
257
258 2017-09-27 Tom Tromey <tom@tromey.com>
259
260 * printcmd.c (map_display_numbers, undisplay_command)
261 (enable_disable_display_command, enable_display_command)
262 (disable_display_command): Constify.
263
264 2017-09-27 Tom Tromey <tom@tromey.com>
265
266 * breakpoint.h (delete_command): Don't declare.
267 * breakpoint.c (delete_command, enable_once_command)
268 (enable_count_command, enable_delete_command, breakpoint_1)
269 (maintenance_info_breakpoints, stopin_command, stopat_command)
270 (delete_command, delete_trace_command, save_breakpoints)
271 (save_breakpoints_command, save_tracepoints_command): Constify.
272
273 2017-09-27 Tom Tromey <tom@tromey.com>
274
275 * macrocmd.c (macro_expand_command, macro_expand_once_command)
276 (skip_ws, extract_identifier, macro_define_command)
277 (macro_undef_command, macro_list_command): Constify.
278
279 2017-09-27 Tom Tromey <tom@tromey.com>
280
281 * infcmd.c (environment_info, set_environment_command)
282 (unset_environment_command, path_info, info_proc_cmd_1)
283 (info_proc_cmd_mappings, info_proc_cmd_stat)
284 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
285 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
286
287 2017-09-27 Tom Tromey <tom@tromey.com>
288
289 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
290 Constify.
291
292 2017-09-27 Tom Tromey <tom@tromey.com>
293
294 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
295
296 2017-09-27 Tom Tromey <tom@tromey.com>
297
298 * demangle.c (demangle_command): Constify.
299
300 2017-09-27 Tom Tromey <tom@tromey.com>
301
302 * progspace.c (maintenance_info_program_spaces_command):
303 Constify.
304
305 2017-09-27 Tom Tromey <tom@tromey.com>
306
307 * compile/compile.c (check_raw_argument, compile_file_command)
308 (compile_code_command, compile_print_command): Constify.
309
310 2017-09-27 Tom Tromey <tom@tromey.com>
311
312 * reggroups.c (maintenance_print_reggroups): Constify.
313
314 2017-09-27 Tom Tromey <tom@tromey.com>
315
316 * dwarf2read.c (save_gdb_index_command): Constify.
317
318 2017-09-27 Tom Tromey <tom@tromey.com>
319
320 * stap-probe.c (info_probes_stap_command): Constify.
321
322 2017-09-27 Tom Tromey <tom@tromey.com>
323
324 * fork-child.c (unset_exec_wrapper_command): Constify.
325
326 2017-09-27 Tom Tromey <tom@tromey.com>
327
328 * btrace.c (get_uint, get_context_size, no_chunk)
329 (maint_btrace_packet_history_cmd)
330 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
331 (maint_info_btrace_cmd): Constify.
332
333 2017-09-27 Tom Tromey <tom@tromey.com>
334
335 * reverse.c (delete_bookmark_command): Constify.
336
337 2017-09-27 Tom Tromey <tom@tromey.com>
338
339 * remote.c (set_memory_packet_size)
340 (set_memory_write_packet_size, show_memory_write_packet_size)
341 (set_memory_read_packet_size, show_memory_read_packet_size)
342 (compare_sections_command, packet_command, remote_put_command)
343 (remote_get_command, remote_delete_command): Constify.
344
345 2017-09-27 Tom Tromey <tom@tromey.com>
346
347 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
348 (set_mipsfpu_double_command, set_mipsfpu_none_command)
349 (set_mipsfpu_auto_command): Constify.
350
351 2017-09-27 Tom Tromey <tom@tromey.com>
352
353 * cli/cli-cmds.h (cd_command): Constify.
354 * cli/cli-cmds.c (cd_command): Constify.
355
356 2017-09-27 Tom Tromey <tom@tromey.com>
357
358 * thread.c (thread_name_command, thread_find_command): Constify.
359
360 2017-09-27 Tom Tromey <tom@tromey.com>
361
362 * probe.c (enable_probes_command, disable_probes_command):
363 Constify.
364
365 2017-09-27 Tom Tromey <tom@tromey.com>
366
367 * symfile.c (symbol_file_command): Constify.
368 * gdbcore.h (deprecated_file_changed_hook): Constify.
369 * exec.c (deprecated_file_changed_hook, exec_file_command)
370 (file_command): Constify.
371 * defs.h (symbol_file_command): Constify.
372
373 2017-09-27 Tom Tromey <tom@tromey.com>
374
375 * remote-fileio.c (set_system_call_allowed)
376 (show_system_call_allowed): Constify.
377
378 2017-09-27 Tom Tromey <tom@tromey.com>
379
380 * tracepoint.c (delete_trace_variable_command)
381 (tfind_end_command, tfind_start_command, tfind_pc_command)
382 (tfind_tracepoint_command, tfind_line_command)
383 (tfind_range_command, tfind_outside_command): Constify.
384
385 2017-09-27 Tom Tromey <tom@tromey.com>
386
387 * ax-gdb.c (maint_agent_printf_command, agent_command)
388 (agent_eval_command): Constify.
389
390 2017-09-27 Tom Tromey <tom@tromey.com>
391
392 * tracepoint.c (info_scope_command): Constify.
393 * python/python.c (gdbpy_decode_line): Constify.
394 * python/py-breakpoint.c (bppy_init): Constify.
395 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
396 * location.h: (new_linespec_location)
397 (string_to_event_location_basic, string_to_event_location):
398 Constify.
399 * location.c (new_linespec_location)
400 (string_to_event_location_basic, string_to_event_location):
401 Constify.
402 * linespec.h (decode_line_with_current_source)
403 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
404 * linespec.c (linespec_lex_to_end)
405 (decode_line_with_current_source)
406 (decode_line_with_last_displayed): Constify.
407 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
408 Constify.
409 * cli/cli-cmds.c (edit_command, list_command): Constify.
410 * breakpoint.h (until_break_command, watch_command_wrapper)
411 (awatch_command_wrapper, rwatch_command_wrapper)
412 (init_ada_exception_breakpoint): Constify.
413 * breakpoint.c (break_command_1, dprintf_command)
414 (break_range_command, watch_command_wrapper)
415 (rwatch_command_wrapper, awatch_command_wrapper)
416 (until_break_command, init_ada_exception_breakpoint)
417 (strace_marker_create_sals_from_location, trace_command)
418 (ftrace_command, strace_command, struct tracepoint): Constify.
419 * ax-gdb.c (agent_command_1): Constify.
420 * ada-lang.c (ada_exception_sal): Constify.
421
422 2017-09-27 Tom Tromey <tom@tromey.com>
423
424 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
425 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
426 (get_context_size, no_chunk, get_insn_history_modifiers)
427 (cmd_record_insn_history, get_call_history_modifiers)
428 (cmd_record_call_history): Constify.
429
430 2017-09-27 Tom Tromey <tom@tromey.com>
431
432 * source.c (show_substitute_path_command)
433 (unset_substitute_path_command, set_substitute_path_command):
434 Constify.
435
436 2017-09-27 Tom Tromey <tom@tromey.com>
437
438 * typeprint.c (maintenance_print_type): Constify.
439 * maint.c (maintenance_dump_me, maintenance_demangle)
440 (maintenance_time_display, maintenance_info_sections)
441 (maintenance_print_statistics, maintenance_deprecate)
442 (maintenance_undeprecate): Constify.
443 (maintenance_do_deprecate): Constify. Use std::string.
444 (maintenance_selftest): Constify.
445 * gdbtypes.h (maintenance_print_type): Constify.
446
447 2017-09-27 Tom Tromey <tom@tromey.com>
448
449 * hppa-tdep.c (unwind_command): Constify.
450
451 2017-09-27 Tom Tromey <tom@tromey.com>
452
453 * target-descriptions.c (unset_tdesc_filename_cmd)
454 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
455 Constify.
456
457 2017-09-27 Tom Tromey <tom@tromey.com>
458
459 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
460
461 2017-09-27 Tom Tromey <tom@tromey.com>
462
463 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
464
465 2017-09-27 Tom Tromey <tom@tromey.com>
466
467 * tui/tui-regs.c (tui_reg_command): Constify.
468
469 2017-09-27 Tom Tromey <tom@tromey.com>
470
471 * skip.c (skip_file_command, skip_function_command)
472 (skip_enable_command, skip_disable_command, skip_delete_command):
473 Constify.
474
475 2017-09-27 Tom Tromey <tom@tromey.com>
476
477 * record-btrace.c (cmd_record_btrace_bts_start)
478 (cmd_record_btrace_pt_start): Constify.
479
480 2017-09-27 Tom Tromey <tom@tromey.com>
481
482 * symmisc.c (maintenance_print_symbols)
483 (maintenance_print_msymbols, maintenance_print_objfiles)
484 (maintenance_info_symtabs, maintenance_check_symtabs)
485 (maintenance_expand_symtabs, maintenance_info_line_tables):
486 Constify.
487
488 2017-09-27 Tom Tromey <tom@tromey.com>
489
490 * top.c (new_ui_command): Constify.
491
492 2017-09-27 Tom Tromey <tom@tromey.com>
493
494 * symfile.c (add_symbol_file_command)
495 (remove_symbol_file_command, list_overlays_command)
496 (map_overlay_command, unmap_overlay_command)
497 (overlay_auto_command, overlay_manual_command)
498 (overlay_off_command, overlay_load_command): Constify.
499
500 2017-09-27 Tom Tromey <tom@tromey.com>
501
502 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
503 (info_spu_mailbox_command, info_spu_dma_command)
504 (info_spu_proxydma_command): Constify.
505
506 2017-09-27 Tom Tromey <tom@tromey.com>
507
508 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
509
510 2017-09-27 Tom Tromey <tom@tromey.com>
511
512 * cli/cli-script.c (user_defined_command): Constify.
513
514 2017-09-27 Tom Tromey <tom@tromey.com>
515
516 * cli/cli-dump.c (dump_memory_command, dump_value_command)
517 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
518 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
519 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
520 (dump_binary_value, append_binary_memory, append_binary_value):
521 Constify.
522 (struct dump_context) <func>: Constify.
523 (add_dump_command): Update.
524
525 2017-09-27 Tom Tromey <tom@tromey.com>
526
527 * cli/cli-cmds.c (show_version, show_configuration)
528 (source_command, show_user): Constify.
529
530 2017-09-27 Tom Tromey <tom@tromey.com>
531
532 * target.c (maintenance_print_target_stack): Constify.
533
534 2017-09-27 Tom Tromey <tom@tromey.com>
535
536 * interps.c (interpreter_exec_cmd): Constify.
537
538 2017-09-27 Tom Tromey <tom@tromey.com>
539
540 * record-full.c (cmd_record_full_restore): Constify.
541
542 2017-09-27 Tom Tromey <tom@tromey.com>
543
544 * memattr.c (enable_mem_command, disable_mem_command)
545 (delete_mem_command): Constify.
546
547 2017-09-27 Tom Tromey <tom@tromey.com>
548
549 * value.c (show_convenience): Constify.
550
551 2017-09-27 Tom Tromey <tom@tromey.com>
552
553 * gdbcore.h (core_file_command): Update.
554 * corefile.c (core_file_command): Constify.
555
556 2017-09-27 Tom Tromey <tom@tromey.com>
557
558 * user-regs.c (maintenance_print_user_registers): Constify.
559
560 2017-09-27 Tom Tromey <tom@tromey.com>
561
562 * cp-namespace.c (maintenance_cplus_namespace): Constify.
563
564 2017-09-27 Tom Tromey <tom@tromey.com>
565
566 * cp-support.c (first_component_command): Constify.
567
568 2017-09-27 Tom Tromey <tom@tromey.com>
569
570 * psymtab.c (maintenance_print_psymbols)
571 (maintenance_info_psymtabs, maintenance_check_psymtabs):
572 Constify.
573
574 2017-09-27 Tom Tromey <tom@tromey.com>
575
576 * windows-tdep.c (display_tib): Constify.
577
578 2017-09-27 Tom Tromey <tom@tromey.com>
579
580 * linux-fork.c (delete_checkpoint_command)
581 (detach_checkpoint_command): Constify.
582
583 2017-09-27 Tom Tromey <tom@tromey.com>
584
585 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
586
587 2017-09-27 Tom Tromey <tom@tromey.com>
588
589 * arc-tdep.c (dump_arc_instruction_command): Constify.
590
591 2017-09-27 Tom Tromey <tom@tromey.com>
592
593 * valprint.c (set_radix, show_radix): Constify.
594
595 2017-09-27 Tom Tromey <tom@tromey.com>
596
597 * dtrace-probe.c (info_probes_dtrace_command): Constify.
598
599 2017-09-27 Tom Tromey <tom@tromey.com>
600
601 * command.h (not_just_help_class_command): Update.
602 * cli/cli-decode.h (not_just_help_class_command): Update.
603 * cli/cli-decode.c (not_just_help_class_command): Constify.
604
605 2017-09-27 Tom Tromey <tom@tromey.com>
606
607 * gdb_bfd.c (maintenance_info_bfds): Constify.
608
609 2017-09-27 Tom Tromey <tom@tromey.com>
610
611 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
612 overloads.
613 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
614 (do_const_cfunc): New function.
615 (cmd_cfunc_eq): New overload.
616 (cli_user_command_p): Check do_const_cfunc.
617 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
618 const_cfunc.
619 * command.h (add_cmd): Add const overload and no-function
620 overload.
621 (set_cmd_cfunc): Add const overload.
622 (cmd_const_cfunc_ftype): Declare.
623 (cmd_cfunc_eq): Add const overload.
624 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
625 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
626 overload.
627
628 2017-09-27 Tom Tromey <tom@tromey.com>
629
630 * macroexp.c (get_next_token_for_substitution): New function.
631 (substitute_args): Call it. Check for __VA_OPT__.
632
633 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
634 Pedro Alves <palves@redhat.com>
635
636 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
637 producer_is_icc_lt_14.
638 (producer_is_icc_lt_14): New function.
639 (check_producer): Add code for checking version of ICC.
640 (producer_is_icc): Move to producer.c.
641 (read_structure_type): Restrict ICC workaround to ICC<14.
642 * producer.c: Include selftest.h.
643 (producer_is_icc, producer_parsing_tests, _initialize_producer):
644 New functions.
645 * producer.h (producer_is_icc): New declaration.
646
647 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
648
649 * Makefile.in (SFILES): Add producer.c.
650 (COMMON_OBS): Add producer.o
651 * amd64-tdep.c (producer.h): Add new include.
652 * dwarf2read.c (producer.h): Add new include.
653 * producer.c: New file.
654 * producer.h: New file.
655 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
656 producer.c.
657 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
658 producer.h.
659
660 2017-09-26 Matthias Klose <doko@ubuntu.com>
661
662 * configure.ac: Search ncursesw before ncurses.
663 Check ncursesw/ncurses.h before ncurses/ncurses.h.
664 * gdb_curses.h: Include <ncursesw/ncurses.h>
665 * config.in, configure: Regenerate.
666
667 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
668
669 PR gdb/22185
670 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
671 obsolete.
672 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
673 Remove i386sol2 support.
674 * configure.nat <i386sol2>: Remove.
675 <sol2-64>: Fold into ...
676 <sol2>: ... this.
677 Move common settings to default section.
678 Add sol-thread.o.
679 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
680 x86_64-*-solaris2.1[0-9]*>: Rename to ...
681 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
682 <i[34567]86-*-solaris*>: Remove.
683 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
684
685 * configure.ac: Remove wctype in libw check.
686 (_MSE_INT_H): Don't define on Solaris 7-9.
687 <solaris*>: Remove libthread_db.so.1 check.
688 * configure: Regenerate.
689 * config.in: Regenerate.
690
691 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
692 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
693 (gdb_ps_size_t): Remove.
694 Use base types in users.
695 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
696
697 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
698
699 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
700
701 PR build/22206
702 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
703 (adi_is_addr_mapped): Likewise.
704 (PSR_ICC): Don't redefine.
705 (PSR_IMPL): Likewise.
706
707 2017-09-25 Tom Tromey <tom@tromey.com>
708
709 * regcache.c (regcache::dump): Use string_printf.
710
711 2017-09-25 Tom Tromey <tom@tromey.com>
712
713 * regcache.c (class regcache_invalidator): New.
714 (struct register_to_invalidate): Remove.
715 (make_cleanup_regcache_invalidate): Remove.
716 (regcache::raw_write): Use regcache_invalidator.
717
718 2017-09-25 Tom Tromey <tom@tromey.com>
719
720 * spu-tdep.c (spu2ppu_sniffer): Update.
721 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
722 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
723 Remove.
724 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
725 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
726 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
727 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
728 (frame_pop): Update.
729
730 2017-09-25 Tom Tromey <tom@tromey.com>
731
732 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
733 * regcache.h (regcache_xfree): Don't declare.
734 * regcache.c (regcache_xfree): Remove.
735 (do_regcache_xfree): Use delete.
736 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
737 * linux-fork.c (free_fork): Use delete.
738 (fork_save_infrun_state): Likewise.
739 * jit.c (jit_dealloc_cache): Use delete.
740 * infrun.c (discard_infcall_suspend_state): Use delete.
741
742 2017-09-25 Tom Tromey <tom@tromey.com>
743
744 * regcache.h (regcache_xmalloc): Don't declare.
745 (regcache_raw_set_cached_value): Update comment.
746 * regcache.c (regcache_xmalloc): Remove.
747 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
748 * jit.c (jit_frame_sniffer): Use new.
749 * frame.c (frame_save_as_regcache): Use new.
750
751 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
752
753 * NEWS: Advertise support for guarded-storage registers on IBM z.
754
755 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
756
757 * s390-linux-nat.c (have_regset_gs): New static variable.
758 (s390_linux_fetch_inferior_registers): Handle guarded-storage
759 control block and guarded-storage broadcast control regsets.
760 (s390_read_description): Detect whether the target has
761 guarded-storage support, return appropriate tdesc.
762 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
763 (features/s390x-gs-linux64.c): Likewise.
764 (struct gdbarch_tdep) <have_gs>: New field.
765 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
766 (s390_gsbc_regset): New variables.
767 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
768 and s390_gsbc_regset, if applicable.
769 (s390_core_read_description): Check whether core file was from a
770 target with guarded-storage support; include appropriate regsets.
771 (s390_gdbarch_init): Add registers for guarded-storage support.
772 (_initialize_s390_tdep): Initialize new target descriptions that
773 include registers for guarded-storage support.
774 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
775 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
776 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
777 (S390_NUM_REGS): Adjust macro definition.
778 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
779 (tdesc_s390x_gs_linux64): New declarations.
780
781 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
782
783 * features/s390-gs-linux64.xml: New file.
784 * features/s390-gs.xml: New file.
785 * features/s390-gsbc.xml: New file.
786 * features/s390x-gs-linux64.xml: New file.
787 * features/Makefile (WHICH): Add s390-gs-linux64 and
788 s390x-gs-linux64.
789 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
790 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
791 * features/s390-gs-linux64.c: New generated file.
792 * features/s390x-gs-linux64.c: New file.
793 * regformats/s390-gs-linux64.dat: New file.
794 * regformats/s390x-gs-linux64.dat: New file.
795
796 2017-09-23 Tom Tromey <tom@tromey.com>
797
798 * defs.h (make_cleanup_override_quit_handler): Don't declare.
799
800 2017-09-22 Tom Tromey <tom@tromey.com>
801
802 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
803 type to scoped_restore_tmpl.
804 <scoped_input_handler>: Initialize m_quit_handler directly.
805
806 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
807
808 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
809 (cd_command): Likewise. Free "current_directory" before
810 assigning to it.
811 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
812 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
813 * top.c (gdb_dirbuf): Remove global declaration.
814 * top.h (gdb_dirbuf): Likewise.
815
816 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
817
818 * gnulib/aclocal.m4: Regenerate.
819 * gnulib/config.in: Regenerate.
820 * gnulib/configure: Regenerate.
821 * gnulib/import/Makefile.am: Regenerate.
822 * gnulib/import/Makefile.in: Regenerate.
823 * gnulib/import/assure.h: New file.
824 * gnulib/import/at-func.c: Likewise
825 * gnulib/import/chdir-long.c: New file.
826 * gnulib/import/chdir-long.h: New file.
827 * gnulib/import/cloexec.c: New file.
828 * gnulib/import/cloexec.h: New file.
829 * gnulib/import/close.c: New file.
830 * gnulib/import/closedir.c: New file.
831 * gnulib/import/dirent-private.h: New file.
832 * gnulib/import/dup-safer.c: New file.
833 * gnulib/import/dup.c: New file.
834 * gnulib/import/dup2.c: New file.
835 * gnulib/import/error.c: New file.
836 * gnulib/import/error.h: New file.
837 * gnulib/import/exitfail.c: New file.
838 * gnulib/import/exitfail.h: New file.
839 * gnulib/import/fchdir.c: New file.
840 * gnulib/import/fcntl.c: New file.
841 * gnulib/import/fcntl.in.h: New file.
842 * gnulib/import/fd-hook.c: New file.
843 * gnulib/import/fd-hook.h: New file.
844 * gnulib/import/fd-safer.c: New file.
845 * gnulib/import/fdopendir.c: New file.
846 * gnulib/import/filename.h: New file.
847 * gnulib/import/filenamecat-lgpl.c: New file.
848 * gnulib/import/filenamecat.h: New file.
849 * gnulib/import/fstat.c: New file.
850 * gnulib/import/fstatat.c: New file.
851 * gnulib/import/getcwd-lgpl.c: New file.
852 * gnulib/import/getcwd.c: New file.
853 * gnulib/import/getdtablesize.c: New file.
854 * gnulib/import/getlogin_r.c: New file.
855 * gnulib/import/getprogname.c: New file.
856 * gnulib/import/getprogname.h: New file.
857 * gnulib/import/gettext.h: New file.
858 * gnulib/import/glob-libc.h: New file.
859 * gnulib/import/glob.c: New file.
860 * gnulib/import/glob.in.h: New file.
861 * gnulib/import/intprops.h: New file.
862 * gnulib/import/m4/chdir-long.m4: New file.
863 * gnulib/import/m4/close.m4: New file.
864 * gnulib/import/m4/closedir.m4: New file.
865 * gnulib/import/m4/d-ino.m4: New file.
866 * gnulib/import/m4/d-type.m4: New file.
867 * gnulib/import/m4/dup.m4: New file.
868 * gnulib/import/m4/dup2.m4: New file.
869 * gnulib/import/m4/error.m4: New file.
870 * gnulib/import/m4/fchdir.m4: New file.
871 * gnulib/import/m4/fcntl.m4: New file.
872 * gnulib/import/m4/fcntl_h.m4: New file.
873 * gnulib/import/m4/fdopendir.m4: New file.
874 * gnulib/import/m4/filenamecat.m4: New file.
875 * gnulib/import/m4/fstat.m4: New file.
876 * gnulib/import/m4/fstatat.m4: New file.
877 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
878 * gnulib/import/m4/getcwd-path-max.m4: New file.
879 * gnulib/import/m4/getcwd.m4: New file.
880 * gnulib/import/m4/getdtablesize.m4: New file.
881 * gnulib/import/m4/getlogin_r.m4: New file.
882 * gnulib/import/m4/getprogname.m4: New file.
883 * gnulib/import/m4/glob.m4: New file.
884 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
885 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
886 * gnulib/import/m4/mempcpy.m4: New file.
887 * gnulib/import/m4/memrchr.m4: New file.
888 * gnulib/import/m4/mode_t.m4: New file.
889 * gnulib/import/m4/msvc-inval.m4: New file.
890 * gnulib/import/m4/msvc-nothrow.m4: New file.
891 * gnulib/import/m4/open.m4: New file.
892 * gnulib/import/m4/openat.m4: New file.
893 * gnulib/import/m4/opendir.m4: New file.
894 * gnulib/import/m4/readdir.m4: New file.
895 * gnulib/import/m4/realloc.m4: New file.
896 * gnulib/import/m4/rewinddir.m4: New file.
897 * gnulib/import/m4/save-cwd.m4: New file.
898 * gnulib/import/m4/strdup.m4: New file.
899 * gnulib/import/m4/strerror.m4: New file.
900 * gnulib/import/m4/unistd-safer.m4: New file.
901 * gnulib/import/mempcpy.c: New file.
902 * gnulib/import/memrchr.c: New file.
903 * gnulib/import/msvc-inval.c: New file.
904 * gnulib/import/msvc-inval.h: New file.
905 * gnulib/import/msvc-nothrow.c: New file.
906 * gnulib/import/msvc-nothrow.h: New file.
907 * gnulib/import/open.c: New file.
908 * gnulib/import/openat-die.c: New file.
909 * gnulib/import/openat-priv.h: New file.
910 * gnulib/import/openat-proc.c: New file.
911 * gnulib/import/openat.c: New file.
912 * gnulib/import/openat.h: New file.
913 * gnulib/import/opendir.c: New file.
914 * gnulib/import/pipe-safer.c: New file.
915 * gnulib/import/readdir.c: New file.
916 * gnulib/import/realloc.c: New file.
917 * gnulib/import/rewinddir.c: New file.
918 * gnulib/import/save-cwd.c: New file.
919 * gnulib/import/save-cwd.h: New file.
920 * gnulib/import/strdup.c: New file.
921 * gnulib/import/strerror-override.c: New file.
922 * gnulib/import/strerror-override.h: New file.
923 * gnulib/import/strerror.c: New file.
924 * gnulib/import/unistd--.h: New file.
925 * gnulib/import/unistd-safer.h: New file.
926 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
927 "getcwd" and "glob".
928 * ser-tcp.c: Undefine "close" before redefining it.
929
930 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
931
932 * guile/scm-value.c (gdbscm_value_address): Initialize address,
933 get rid of res_val.
934
935 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
936
937 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
938 <sol2,sparc>: Likewise.
939 <sol2-64,i386>: Likewise.
940
941 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
942 -Wdeprecated-declarations on *-*-solaris*.
943 * configure: Regenerate.
944
945 * procfs.c: Include "nat/inferior.h".
946 (procfs_info_proc): Fix typo.
947
948 2017-09-21 Kevin Buettner <kevinb@redhat.com>
949
950 * remote.c (vector): Include.
951 (struct private_thread_info): Add field, thread_handle.
952 (free_private_thread_info): Deallocate storage associated with
953 thread handle.
954 (get_private_info_thread): Initialize `thread_handle' field.
955 (struct thread_item): Add field, thread_handle.
956 (clear_threads_listing_context): Deallocate storage associated
957 with thread handle.
958 (start_thread): Add support for "handle" attribute.
959 (thread_attributes): Add "handle".
960 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
961 field.
962 (remote_update_thread_list): Update thread_handle.
963 (remote_thread_handle_to_thread_info): New function.
964 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
965
966 2017-09-21 Kevin Buettner <kevinb@redhat.com>
967
968 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
969 function.
970 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
971 * python/python-internal.h (thread_object_type): Declare.
972
973 2017-09-21 Kevin Buettner <kevinb@redhat.com>
974
975 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
976 (target_thread_handle_to_thread_info): Declare.
977 * target.c (target_thread_handle_to_thread_info): New function.
978 * target-delegates.c: Regenerate.
979 * gdbthread.h (find_thread_by_handle): Declare.
980 * thread.c (find_thread_by_handle): New function.
981 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
982 function.
983 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
984
985 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
986
987 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
988
989 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
990
991 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
992
993 2017-09-21 Yao Qi <yao.qi@linaro.org>
994
995 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
996 to gdb_target_obs.
997
998 2017-09-20 Tom Tromey <tom@tromey.com>
999
1000 * breakpoint.c (struct counted_command_line): Remove.
1001 (breakpoint_commands): Update.
1002 (alloc_counted_command_line, incref_counted_command_line)
1003 (decref_counted_command_line, do_cleanup_counted_command_line)
1004 (make_cleanup_decref_counted_command_line): Remove.
1005 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
1006 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
1007 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
1008 (save_breakpoints): Update.
1009 * breakpoint.h (counted_command_line): Now a typedef to
1010 shared_ptr.
1011 (struct breakpoint) <commands>: Now a counted_command_line.
1012 (struct bpstats) <command>: Likewise.
1013
1014 2017-09-20 Tom Tromey <tom@tromey.com>
1015
1016 * breakpoint.c (struct commands_info, do_map_commands_command):
1017 Remove.
1018 (commands_command_1): Update.
1019 (iterate_over_related_breakpoints): Take a function_view.
1020 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
1021 (delete_command): Update.
1022 (map_breakpoint_numbers): Take a function_view.
1023 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
1024 (disable_command): Update.
1025 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
1026 (enable_command): Update.
1027 (struct disp_data, do_enable_breakpoint_disp)
1028 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
1029 (do_map_enable_delete_breakpoint): Remove.
1030 (enable_once_command, enable_count_command, enable_delete_command)
1031 (delete_trace_variable_command): Update.
1032
1033 2017-09-20 Tom Tromey <tom@tromey.com>
1034
1035 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
1036 (bpstat_clear): Use delete.
1037 (bpstats): New constructors.
1038 (bpstat_copy, bpstat_stop_status): Use new.
1039 (dprintf_after_condition_true): Update.
1040 * breakpoint.h (bpstats::bpstats): Add constructors.
1041 (bpstats::~bpstats): Add destructor.
1042
1043 2017-09-20 Pedro Alves <palves@redhat.com>
1044
1045 * eval.c (make_params): Delete, refactored as ...
1046 (class fake_method): ... this new type's ctor.
1047 (fake_method::~fake_method): New.
1048 (evaluate_subexp_standard): Use 'fake_method'.
1049
1050 2017-09-20 Tom Tromey <tom@tromey.com>
1051
1052 * windows-nat.c (get_windows_debug_event, windows_wait)
1053 (do_initial_windows_stuff, windows_attach): Update.
1054 * utils.c (vwarning, internal_vproblem): Update.
1055 (ui_unregister_input_event_handler_cleanup)
1056 (prepare_to_handle_input): Remove.
1057 (class scoped_input_handler): New.
1058 (defaulted_query, prompt_for_continue): Update.
1059 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
1060 Update.
1061 * top.c (undo_terminal_modifications_before_exit): Update.
1062 * target/target.h (target_terminal_init, target_terminal_inferior)
1063 (target_terminal_ours): Don't declare.
1064 (class target_terminal): New.
1065 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
1066 (target_terminal_ours_for_output)
1067 (make_cleanup_restore_target_terminal): Don't declare.
1068 (target_terminal_info): Remove.
1069 * target.c (enum terminal_state, terminal_state): Remove.
1070 (target_terminal::terminal_state): Define.
1071 (target_terminal::init): Rename from target_terminal_init.
1072 (target_terminal::inferior): Rename from
1073 target_terminal_inferior.
1074 (target_terminal::ours): Rename from target_terminal_ours.
1075 (target_terminal::ours_for_output): Rename from
1076 target_terminal_ours_for_output.
1077 (target_terminal::info): New method.
1078 (cleanup_restore_target_terminal)
1079 (make_cleanup_restore_target_terminal): Remove.
1080 * solib.c (handle_solib_event): Update.
1081 * remote.c (remote_serial_quit_handler): Update.
1082 (remote_terminal_inferior, remote_wait_as): Update.
1083 * record-full.c (record_full_wait_1): Update.
1084 * nto-procfs.c (procfs_create_inferior): Update.
1085 * nat/fork-inferior.c (startup_inferior): Update.
1086 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
1087 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
1088 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
1089 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
1090 (mi_breakpoint_created, mi_breakpoint_deleted)
1091 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
1092 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1093 (mi_user_selected_context_changed, report_initial_inferior):
1094 Update.
1095 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
1096 (linux_nat_terminal_inferior): Update.
1097 * infrun.c (follow_fork_inferior)
1098 (handle_vfork_child_exec_or_exit, do_target_resume)
1099 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
1100 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
1101 Update.
1102 * inflow.c (child_terminal_init, info_terminal_command): Update.
1103 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
1104 (attach_command): Update.
1105 * infcall.c (call_thread_fsm_should_stop): Update.
1106 * gnu-nat.c (gnu_attach): Update.
1107 * extension.c (struct active_ext_lang_state)
1108 (restore_active_ext_lang): Update.
1109 * exceptions.c (print_flush): Update.
1110 * event-top.c (async_enable_stdin, default_quit_handler): Update.
1111 (struct quit_handler_cleanup_data, restore_quit_handler)
1112 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
1113 Remove.
1114 * cp-support.c (gdb_demangle): Update.
1115 * breakpoint.c (update_inserted_breakpoint_locations)
1116 (insert_breakpoint_locations, handle_jit_event)
1117 (disable_breakpoints_in_unloaded_shlib): Update.
1118 * annotate.c (annotate_breakpoints_invalid)
1119 (annotate_frames_invalid): Update.
1120
1121 2017-09-20 Tom Tromey <tom@tromey.com>
1122
1123 * main.c (catch_command_errors): Rename from
1124 catch_command_errors_const.
1125 (captured_main_1): Update.
1126
1127 2017-09-20 Pedro Alves <palves@redhat.com>
1128
1129 * cli/cli-cmds.c (list_command): Use print_sal_location.
1130 (print_sal_location): New function.
1131 (ambiguous_line_spec): Use print_sal_location.
1132 * linespec.c (symbol_to_sal): Record the symbol in the sal.
1133 * symtab.c (find_function_start_sal): Likewise.
1134 * symtab.h (symtab_and_line::symbol): New field.
1135
1136 2017-09-20 Pedro Alves <palves@redhat.com>
1137
1138 * linespec.c (minsym_found): Handle non-text minsyms.
1139 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1140
1141 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1142
1143 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1144 backslash.
1145
1146 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1147
1148 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1149 vmovups instead vmovaps.
1150 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1151
1152 2017-09-19 John Baldwin <jhb@FreeBSD.org>
1153
1154 * NEWS (Changes since GDB 8.0): Add starti.
1155 * infcmd.c (enum run_break): New.
1156 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1157 case.
1158 (run_command): Use enum run_how.
1159 (start_command): Likewise.
1160 (starti_command): New function.
1161 (RUN_ARGS_HELP): New macro.
1162 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1163 commands. Add starti command.
1164
1165 2017-09-19 Yao Qi <yao.qi@linaro.org>
1166
1167 * Makefile.in (monitor.o): Remove the rule.
1168
1169 2017-09-19 Yao Qi <yao.qi@linaro.org>
1170
1171 * annotate.h (struct annotate_arg_emitter): Use
1172 DISABLE_COPY_AND_ASSIGN.
1173 * common/refcounted-object.h (refcounted_object): Likewise.
1174 * completer.h (struct completion_result): Likewise.
1175 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1176 * filename-seen-cache.h (filename_seen_cache): Likewise.
1177 * gdbcore.h (thread_section_name): Likewise.
1178 * gdb_regex.h (compiled_regex): Likewise.
1179 * gdbthread.h (scoped_restore_current_thread): Likewise.
1180 * inferior.h (scoped_restore_current_inferior): Likewise.
1181 * jit.c (jit_reader): Likewise.
1182 * linespec.h (struct linespec_result): Likewise.
1183 * mi/mi-parse.h (struct mi_parse): Likewise.
1184 * nat/fork-inferior.c (execv_argv): Likewise.
1185 * progspace.h (scoped_restore_current_program_space): Likewise.
1186 * python/python-internal.h (class gdbpy_enter): Likewise.
1187 * regcache.h (regcache): Likewise.
1188 * target-descriptions.c (struct tdesc_reg): Likewise.
1189 (struct tdesc_type): Likewise.
1190 (struct tdesc_feature): Likewise.
1191 * ui-out.h (ui_out_emit_type): Likewise.
1192
1193 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
1194
1195 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1196 label abort_expression.
1197
1198 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1199
1200 * common/buffer.c (buffer_xml_printf): Adjust.
1201 * common/xml-utils.c (xml_escape_text): Change return type to
1202 std::string, update code accordingly.
1203 * common/xml-utils.h (xml_escape_text): Change return type to
1204 std::string.
1205 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
1206 * windows-tdep.c (windows_xfer_shared_library): Adjust.
1207 * unittests/xml-utils-selftests.c (test_xml_escape_text):
1208 Adjust.
1209
1210 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1211
1212 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
1213 (SUBDIR_UNITTESTS_OBS): Add new object file.
1214 * unittests/xml-utils-selftests.c: New file.
1215
1216 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1217
1218 * common/selftest.h (selftest): New struct/interface.
1219 (register_test): Add name parameter, add new overload.
1220 (run_tests): Add filter parameter.
1221 (for_each_selftest_ftype): New typedef.
1222 (for_each_selftest): New declaration.
1223 * common/selftest.c (tests): Change type to
1224 map<string, unique_ptr<selftest>>.
1225 (simple_selftest): New struct.
1226 (register_test): New function.
1227 (register_test): Add name parameter and use it.
1228 (run_tests): Add filter parameter and use it. Add prints.
1229 Adjust to vector -> map change.
1230 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
1231 registering selftests.
1232 * arm-tdep.c (_initialize_arm_tdep): Likewise.
1233 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
1234 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
1235 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
1236 * findvar.c (_initialize_findvar): Likewise.
1237 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
1238 * maint.c (maintenance_selftest): Update call to run_tests.
1239 (maintenance_info_selftests): New function.
1240 (_initialize_maint_cmds): Register "maintenance info selftests"
1241 command. Update "maintenance selftest" doc.
1242 * regcache.c (_initialize_regcache): Add names when registering
1243 selftests.
1244 * rust-exp.y (_initialize_rust_exp): Likewise.
1245 * selftest-arch.c (gdbarch_selftest): New struct.
1246 (gdbarch_tests): Remove.
1247 (register_test_foreach_arch): Add name parameter. Call
1248 register_test.
1249 (tests_with_arch): Remove, move most content to
1250 gdbarch_selftest::operator().
1251 (_initialize_selftests_foreach_arch): Remove.
1252 * selftest-arch.h (register_test_foreach_arch): Add name
1253 parameter.
1254 (run_tests_with_arch): New declaration.
1255 * utils-selftests.c (_initialize_utils_selftests): Add names
1256 when registering selftests.
1257 * utils.c (_initialize_utils): Likewise.
1258 * unittests/array-view-selftests.c
1259 (_initialize_array_view_selftests): Likewise.
1260 * unittests/environ-selftests.c (_initialize_environ_selftests):
1261 Likewise.
1262 * unittests/function-view-selftests.c
1263 (_initialize_function_view_selftests): Likewise.
1264 * unittests/offset-type-selftests.c
1265 (_initialize_offset_type_selftests): Likewise.
1266 * unittests/optional-selftests.c
1267 (_initialize_optional_selftests): Likewise.
1268 * unittests/scoped_restore-selftests.c
1269 (_initialize_scoped_restore_selftests): Likewise.
1270 * NEWS: Document "maintenance selftest" and "maint info
1271 selftests".
1272
1273 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1274
1275 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1276 scoped_restore.
1277
1278 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1279
1280 * mi/mi-main.c (mi_load_progress): Make uiout variable
1281 a unique_ptr.
1282
1283 2017-09-15 Pedro Alves <palves@redhat.com>
1284
1285 * compile/compile-c-types.c (convert_enum, convert_int)
1286 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1287
1288 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1289
1290 * dwarf2read.c (copy_string): Remove.
1291 (parse_macro_definition): Replace copy_string with savestring.
1292
1293 2017-09-15 Yao Qi <yao.qi@linaro.org>
1294
1295 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1296 gdb_target_obs.
1297 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1298 Likewise.
1299 (i[34567]86-*-linux*): Likewise.
1300
1301 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1302
1303 * dwarf2expr.h (dwarf_stack_value): Add constructor.
1304 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1305 <stack>: Change type to std::vector.
1306 <stack_len, stack_allocated>: Remove.
1307 <grow_stack>: Remove.
1308 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1309 (dwarf_expr_context::~dwarf_expr_context): Remove.
1310 (dwarf_expr_context::grow_stack): Remove.
1311 (dwarf_expr_context::push): Adjust.
1312 (dwarf_expr_context::pop): Adjust.
1313 (dwarf_expr_context::fetch): Adjust.
1314 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
1315 (dwarf_expr_context::stack_empty_p): Adjust.
1316 (dwarf_expr_context::execute_stack_op): Adjust.
1317
1318 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1319
1320 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
1321 return type to bool.
1322 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
1323
1324 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1325
1326 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
1327 Change type to bool.
1328 (dwarf_stack_value) <in_stack_memory>: Likewise.
1329 (dwarf_expr_context) <push_address>: Change parameter type to
1330 bool.
1331 <fetch_in_stack_memory>: Change return type to bool.
1332 <push>: Change parameter type to bool.
1333 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
1334 to bool.
1335 (dwarf_expr_context::push_address): Likewise.
1336 (dwarf_expr_context::fetch_in_stack_memory): Change return type
1337 to bool.
1338 (dwarf_expr_context::execute_stack_op): Adjust.
1339 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
1340
1341 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1342
1343 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
1344 (struct dwarf_expr_context) <n_pieces>: Remove.
1345 <pieces>: Change type to std::vector.
1346 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1347 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
1348 pieces.
1349 (dwarf_expr_context::add_piece): Adjust.
1350 * dwarf2loc.c (struct piece_closure): Initialize fields.
1351 <n_pieces>: Remove.
1352 <pieces>: Change type to std::vector.
1353 (allocate_piece_closure): Adjust, change parameter to
1354 std::vector rvalue and std::move it to piece_closure.
1355 (rw_pieced_value): Adjust.
1356 (check_pieced_synthetic_pointer): Adjust.
1357 (indirect_synthetic_pointer): Adjust.
1358 (coerce_pieced_ref): Adjust.
1359 (free_pieced_value_closure): Adjust. Use delete to free
1360 piece_closure.
1361 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
1362 to allocate_piece_closure.
1363 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
1364
1365 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1366
1367 * probe.h (probe_ops_cp): Remove typedef.
1368 (DEF_VEC_P (probe_ops_cp)): Remove.
1369 (all_probe_ops): Change type to std::vector.
1370 * probe.c (info_probes_for_ops): Adjust to vector change.
1371 (probe_linespec_to_ops): Likewise.
1372 (all_probe_ops): Change type to std::vector.
1373 (_initialize_probe): Adjust to vector change.
1374 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
1375 * elfread.c (elf_get_probes): Likewise.
1376 * stap-probe.c (_initialize_stap_probe): Likewise.
1377
1378 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1379
1380 * probe.h (struct bound_probe): Define constructors.
1381 * probe.c (bound_probe_s): Remove typedef.
1382 (DEF_VEC_O (bound_probe_s)): Remove VEC.
1383 (collect_probes): Change return type to std::vector, remove
1384 cleanup.
1385 (compare_probes): Return bool, change parameter type. Change
1386 semantic to "less than".
1387 (gen_ui_out_table_header_info): Change parameter to std::vector
1388 and update.
1389 (exists_probe_with_pops): Likewise.
1390 (info_probes_for_ops): Update to std::vector change.
1391 (enable_probes_command): Likewise.
1392 (disable_probes_command): Likewise.
1393
1394 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1395
1396 * probe.h (struct probe_ops) <get_probes>: Change parameter from
1397 vec to std::vector.
1398 * probe.c (parse_probes_in_pspace): Update.
1399 (find_probes_in_objfile): Update.
1400 (find_probe_by_pc): Update.
1401 (collect_probes): Update.
1402 (probe_any_get_probes): Update.
1403 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
1404 return type to reference to std::vector.
1405 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
1406 std::vector and update.
1407 (dtrace_process_dof): Likewise.
1408 (dtrace_get_probes): Likewise.
1409 * elfread.c (elf_get_probes): Change return type to std::vector,
1410 store an std::vector in bfd_data.
1411 (probe_key_free): Update to std::vector.
1412 * stap-probe.c (handle_stap_probe): Change parameter to
1413 std::vector and update.
1414 (stap_get_probes): Likewise.
1415 * symfile-debug.c (debug_sym_get_probes): Change return type to
1416 std::vector and update.
1417
1418 2017-09-11 Tom Tromey <tom@tromey.com>
1419
1420 * breakpoint.c (program_breakpoint_here_p): Update.
1421 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
1422 from make_show_memory_breakpoints_cleanup. Return a
1423 scoped_restore_tmpl<int>.
1424 (restore_show_memory_breakpoints): Remove.
1425 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
1426 * mem-break.c (memory_validate_breakpoint): Update.
1427 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
1428 (ia64_memory_remove_breakpoint): Update.
1429 (ia64_breakpoint_from_pc): Update.
1430 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
1431 from make_show_memory_breakpoints_cleanup.
1432
1433 2017-09-11 Tom Tromey <tom@tromey.com>
1434
1435 * d-namespace.c (d_lookup_symbol): Use std::string.
1436 (find_symbol_in_baseclass): Likewise.
1437
1438 2017-09-11 Tom Tromey <tom@tromey.com>
1439
1440 * ctf.c (ctf_start): Use std::string.
1441
1442 2017-09-11 Tom Tromey <tom@tromey.com>
1443
1444 * ada-lang.c (is_known_support_routine): Update.
1445 (ada_unhandled_exception_name_addr_from_raise): Update.
1446 * guile/scm-frame.c (gdbscm_frame_name): Update.
1447 * python/py-frame.c (frapy_name): Update.
1448 (frapy_function): Update.
1449 * stack.h (find_frame_funname): Update.
1450 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
1451 (print_frame): Update.
1452
1453 2017-09-11 Tom Tromey <tom@tromey.com>
1454
1455 * findcmd.c (put_bits): Take a gdb::byte_vector.
1456 (parse_find_args): Return gdb::byte_vector. "args" now const.
1457 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
1458 cleanups.
1459 (find_command): Update.
1460
1461 2017-09-11 Tom Tromey <tom@tromey.com>
1462
1463 * cli/cli-script.c (class scoped_restore_hook_in): New.
1464 (clear_hook_in_cleanup): Remove.
1465 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
1466 scoped_restore_hook_in.
1467
1468 2017-09-11 Tom Tromey <tom@tromey.com>
1469
1470 * cli/cli-script.c (restore_interp): Remove.
1471 (read_command_lines): Use scoped_restore_interp.
1472 * interps.c (scoped_restore_interp::set_temp): Rename from
1473 interp_set_temp.
1474 * interps.h (class scoped_restore_interp): New.
1475 (interp_set_temp): Remove.
1476
1477 2017-09-11 Tom Tromey <tom@tromey.com>
1478
1479 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1480 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
1481 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
1482 scoped_restore.
1483 (mi_cmd_break_insert_1): Update.
1484 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
1485 scoped_restore.
1486
1487 2017-09-11 Tom Tromey <tom@tromey.com>
1488
1489 * demangle.c (demangle_command): Update.
1490 * breakpoint.c (disable_command): Update.
1491 (enable_command): Update.
1492 (find_location_by_number): Make "number" const. Use
1493 get_number_trailer.
1494 * cli/cli-utils.c (extract_arg): Return std::string.
1495 * probe.c (parse_probe_linespec): Update. Change types.
1496 (collect_probes): Take string arguments.
1497 (parse_probe_linespec): Likewise.
1498 (info_probes_for_ops): Update.
1499 (enable_probes_command): Update.
1500 (disable_probes_command): Update.
1501 * break-catch-sig.c (catch_signal_split_args): Update.
1502 * mi/mi-parse.c (mi_parse): Update.
1503
1504 2017-09-11 Tom Tromey <tom@tromey.com>
1505
1506 * language.h (language_enum): Make argument const.
1507 * language.c (language_enum): Make argument const.
1508
1509 2017-09-11 Tom Tromey <tom@tromey.com>
1510
1511 * common/common-utils.h (skip_to_space): Remove macro, redeclare
1512 as function.
1513 (skip_to_space): Rename from skip_to_space_const.
1514 * common/common-utils.c (skip_to_space): New function.
1515 (skip_to_space): Rename from skip_to_space_const.
1516 * cli/cli-utils.h (get_number): Rename from get_number_const.
1517 (extract_arg): Rename from extract_arg_const.
1518 * cli/cli-utils.c (get_number): Rename from get_number_const.
1519 (extract_arg): Rename from extract_arg_const.
1520 (number_or_range_parser::get_number): Use ::get_number.
1521 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
1522 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
1523 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
1524 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
1525 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
1526 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
1527 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
1528 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
1529
1530 2017-09-11 Tom Tromey <tom@tromey.com>
1531
1532 * python/python.c (do_start_initialization): Use
1533 py-event-types.def to initialize types.
1534 Define all object type structures.
1535 * python/python-internal.h: Don't declare event initialization
1536 functions.
1537 * python/py-threadevent.c (thread_event_object_type): Don't
1538 define.
1539 * python/py-stopevent.c (stop_event_object_type): Don't define.
1540 * python/py-signalevent.c (signal_event_object_type): Don't
1541 declare or define.
1542 * python/py-newobjfileevent.c (new_objfile_event_object_type)
1543 (clear_objfiles_event_object_type): Don't declare or define.
1544 * python/py-infevents.c (inferior_call_pre_event_object_type)
1545 (inferior_call_post_event_object_type)
1546 (register_changed_event_object_type)
1547 (memory_changed_event_object_type): Don't declare or define.
1548 * python/py-inferior.c (new_thread_event_object_type)
1549 (new_inferior_event_object_type)
1550 (inferior_deleted_event_object_type): Don't declare or define.
1551 * python/py-exitedevent.c (exited_event_object_type): Don't
1552 declare or define.
1553 * python/py-evts.c (gdbpy_initialize_py_events): Use
1554 py-all-events.def.
1555 * python/py-events.h (thread_event_object_type): Don't declare.
1556 (events_object): Use py-all-events.def.
1557 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
1558 py-event-types.def.
1559 * python/py-event-types.def: New file.
1560 * python/py-continueevent.c (create_continue_event_object): Don't
1561 declare or define.
1562 * python/py-bpevent.c (breakpoint_event_object_type): Don't
1563 declare or define.
1564 * python/py-all-events.def: New file.
1565
1566 2017-09-11 Tom Tromey <tom@tromey.com>
1567
1568 * python/py-threadevent.c (create_thread_event_object): Return
1569 gdbpy_ref.
1570 * python/py-stopevent.h (create_stop_event_object)
1571 (create_breakpoint_event_object, create_signal_event_object):
1572 Update.
1573 * python/py-stopevent.c (create_stop_event_object): Return
1574 gdbpy_ref.
1575 (emit_stop_event): Update.
1576 * python/py-signalevent.c (create_signal_event_object): Return
1577 gdbpy_ref.
1578 * python/py-infevents.c (create_inferior_call_event_object):
1579 Update.
1580 * python/py-event.h (create_event_object)
1581 (create_thread_event_object): Update.
1582 * python/py-event.c (create_event_object): Return gdbpy_ref.
1583 * python/py-continueevent.c: Return gdbpy_ref.
1584 * python/py-bpevent.c (create_breakpoint_event_object): Return
1585 gdbpy_ref.
1586
1587 2017-09-11 Tom Tromey <tom@tromey.com>
1588
1589 PR python/15622:
1590 * NEWS: Add entry.
1591 * python/python.c (do_start_initialization): Initialize new event
1592 types.
1593 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
1594 (gdbpy_initialize_inferior_deleted_event)
1595 (gdbpy_initialize_new_thread_event): Declare.
1596 * python/py-threadevent.c (create_thread_event_object): Add option
1597 "thread" parameter.
1598 * python/py-inferior.c (new_thread_event_object_type)
1599 (new_inferior_event_object_type)
1600 (inferior_deleted_event_object_type): Declare.
1601 (python_new_inferior, python_inferior_deleted): New functions.
1602 (add_thread_object): Emit new_thread event.
1603 (gdbpy_initialize_inferior): Attach new functions to corresponding
1604 observers.
1605 (new_thread, new_inferior, inferior_deleted): Define new event
1606 types.
1607 * python/py-evts.c (gdbpy_initialize_py_events): Add new
1608 registries.
1609 * python/py-events.h (events_object) <new_inferior,
1610 inferior_deleted, new_thread>: New fields.
1611 * python/py-event.h (create_thread_event_breakpoint): Add optional
1612 "thread" parameter.
1613
1614 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1615
1616 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
1617 check current_ui instead.
1618 (internal_vproblem): Likewise.
1619
1620 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
1621
1622 * thread.c (print_thread_info_1): Remove unnecessary calls to
1623 uiout->is_mi_like_p.
1624
1625 2017-09-09 Tom Tromey <tom@tromey.com>
1626
1627 * namespace.h (add_using_directive): Update.
1628 * namespace.c (add_using_directive): Change type of excludes to
1629 std::vector.
1630 * dwarf2read.c (read_import_statement): Use std::vector.
1631 (read_namespace): Update.
1632 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1633
1634 2017-09-09 Tom Tromey <tom@tromey.com>
1635
1636 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
1637
1638 2017-09-09 Tom Tromey <tom@tromey.com>
1639
1640 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
1641
1642 2017-09-09 Tom Tromey <tom@tromey.com>
1643
1644 * stack.c (func_command): Use gdb::def_vector.
1645
1646 2017-09-09 Tom Tromey <tom@tromey.com>
1647
1648 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
1649 ui_out_emit_list, ui_out_emit_tuple.
1650 (mi_cmd_var_update): Likewise.
1651
1652 2017-09-09 Tom Tromey <tom@tromey.com>
1653
1654 * mi/mi-interp.c (mi_user_selected_context_changed): Use
1655 ui_out_redirect_pop.
1656 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1657 ui_out_redirect_pop.
1658 * utils.c (do_ui_out_redirect_pop)
1659 (make_cleanup_ui_out_redirect_pop): Remove.
1660 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
1661 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
1662 * ui-out.h (ui_out_redirect_pop): New class.
1663
1664 2017-09-09 Tom Tromey <tom@tromey.com>
1665
1666 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
1667 (list_available_thread_groups, mi_cmd_list_thread_groups)
1668 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
1669 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
1670 Likewise.
1671
1672 2017-09-09 Tom Tromey <tom@tromey.com>
1673
1674 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
1675 ui_out_emit_tuple.
1676
1677 2017-09-09 Tom Tromey <tom@tromey.com>
1678
1679 * target.c (flash_erase_command): Use ui_out_emit_tuple.
1680 * stack.c (print_frame): Use ui_out_emit_tuple.
1681 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
1682 (info_spu_mailbox_command, info_spu_dma_command)
1683 (info_spu_proxydma_command): Likewise.
1684 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
1685 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
1686 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
1687 ui_out_emit_tuple.
1688 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
1689
1690 2017-09-09 Tom Tromey <tom@tromey.com>
1691
1692 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
1693 (class ui_out_emit_table): Update comment.
1694 * ui-out.c (do_cleanup_table_end)
1695 (make_cleanup_ui_out_table_begin_end): Remove.
1696 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
1697 (info_spu_dma_cmdlist): Likewise.
1698 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
1699 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
1700 ui_out_emit_table.
1701
1702 2017-09-09 Tom Tromey <tom@tromey.com>
1703
1704 * thread.c (print_thread_info_1): Use ui_out_emit_table,
1705 ui_out_emit_list, gdb::optional.
1706
1707 2017-09-09 John Baldwin <jhb@FreeBSD.org>
1708
1709 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
1710 prototype.
1711 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
1712 prototype.
1713 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
1714 prototype.
1715 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
1716 * ada-exp.y: Remove _initialize_ada_exp prototype.
1717 * ada-lang.c: Remove _initialize_ada_language prototype.
1718 * ada-tasks.c: Remove _initialize_tasks prototype.
1719 * addrmap.c: Remove _initialize_addrmap prototype.
1720 * agent.c: Remove _initialize_agent prototype.
1721 * aix-thread.c: Remove _initialize_aix_thread prototype.
1722 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
1723 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
1724 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
1725 prototype.
1726 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
1727 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
1728 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
1729 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
1730 prototype.
1731 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
1732 prototype.
1733 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
1734 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
1735 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
1736 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
1737 prototype.
1738 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
1739 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
1740 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
1741 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
1742 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1743 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
1744 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
1745 prototype.
1746 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
1747 prototype.
1748 * annotate.c: Remove _initialize_annotate prototype.
1749 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
1750 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
1751 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
1752 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
1753 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1754 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1755 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1756 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1757 prototype.
1758 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1759 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1760 * auto-load.c: Remove _initialize_auto_load prototype.
1761 * auxv.c: Remove _initialize_auxv prototype.
1762 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1763 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1764 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1765 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1766 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1767 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1768 prototype.
1769 * break-catch-throw.c: Remove _initialize_break_catch_throw
1770 prototype.
1771 * breakpoint.c: Remove _initialize_breakpoint prototype.
1772 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1773 * btrace.c: Remove _initialize_btrace prototype.
1774 * charset.c: Remove _initialize_charset prototype.
1775 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1776 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1777 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1778 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1779 * cli/cli-script.c: Remove _initialize_cli_script prototype.
1780 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1781 * coffread.c: Remove _initialize_coffread prototype.
1782 * compile/compile.c: Remove _initialize_compile prototype.
1783 * complaints.c: Remove _initialize_complaints prototype.
1784 * completer.c: Remove _initialize_completer prototype.
1785 * copying.awk: Remove _initialize_copying prototype.
1786 * copying.c: Regenerate.
1787 * core-regset.c: Remove _initialize_core_regset prototype.
1788 * corefile.c: Remove _initialize_core prototype.
1789 * corelow.c: Remove _initialize_corelow prototype.
1790 * cp-abi.c: Remove _initialize_cp_abi prototype.
1791 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1792 * cp-support.c: Remove _initialize_cp_support prototype.
1793 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1794 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1795 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1796 * ctf.c: Remove _initialize_ctf prototype.
1797 * d-lang.c: Remove _initialize_d_language prototype.
1798 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1799 prototype.
1800 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1801 * dbxread.c: Remove _initialize_dbxread prototype.
1802 * dcache.c: Remove _initialize_dcache prototype.
1803 * demangle.c: Remove _initialize_demangler prototype.
1804 * disasm-selftests.c: Remove _initialize_disasm_selftests
1805 prototype.
1806 * disasm.c: Remove _initialize_disasm prototype.
1807 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1808 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1809 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1810 prototype.
1811 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1812 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1813 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1814 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1815 * elfread.c: Remove _initialize_elfread prototype.
1816 * exec.c: Remove _initialize_exec prototype.
1817 * extension.c: Remove _initialize_extension prototype.
1818 * f-lang.c: Remove _initialize_f_language prototype.
1819 * f-valprint.c: Remove _initialize_f_valprint prototype.
1820 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1821 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1822 * filesystem.c: Remove _initialize_filesystem prototype.
1823 * findcmd.c: Remove _initialize_mem_search prototype.
1824 * fork-child.c: Remove _initialize_fork_child prototype.
1825 * frame-base.c: Remove _initialize_frame_base prototype.
1826 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1827 * frame.c: Remove _initialize_frame prototype.
1828 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1829 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1830 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1831 * gcore.c: Remove _initialize_gcore prototype.
1832 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1833 * gdbarch.c: Regenerate.
1834 * gdbarch.sh: Remove _initialize_gdbarch prototype.
1835 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1836 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1837 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1838 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1839 * go-lang.c: Remove _initialize_go_language prototype.
1840 * go32-nat.c: Remove _initialize_go32_nat prototype.
1841 * guile/guile.c: Remove _initialize_guile prototype.
1842 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
1843 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
1844 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
1845 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
1846 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
1847 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
1848 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
1849 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
1850 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
1851 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
1852 prototype.
1853 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
1854 prototype.
1855 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
1856 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
1857 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
1858 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
1859 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
1860 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
1861 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
1862 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
1863 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
1864 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
1865 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
1866 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
1867 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
1868 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1869 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
1870 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
1871 prototype.
1872 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
1873 prototype.
1874 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
1875 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
1876 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
1877 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
1878 * infcall.c: Remove _initialize_infcall prototype.
1879 * infcmd.c: Remove _initialize_infcmd prototype.
1880 * inferior.c: Remove _initialize_inferiors prototype.
1881 * inflow.c: Remove _initialize_inflow prototype.
1882 * infrun.c: Remove _initialize_infrun prototype.
1883 * interps.c: Remove _initialize_interpreter prototype.
1884 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
1885 * jit.c: Remove _initialize_jit prototype.
1886 * language.c: Remove _initialize_language prototype.
1887 * linux-fork.c: Remove _initialize_linux_fork prototype.
1888 * linux-nat.c: Remove _initialize_linux_nat prototype.
1889 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
1890 * linux-thread-db.c: Remove _initialize_thread_db prototype.
1891 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
1892 * m2-lang.c: Remove _initialize_m2_language prototype.
1893 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
1894 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
1895 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
1896 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
1897 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
1898 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1899 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1900 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
1901 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
1902 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
1903 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1904 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1905 * machoread.c: Remove _initialize_machoread prototype.
1906 * macrocmd.c: Remove _initialize_macrocmd prototype.
1907 * macroscope.c: Remove _initialize_macroscope prototype.
1908 * maint.c: Remove _initialize_maint_cmds prototype.
1909 * mdebugread.c: Remove _initialize_mdebugread prototype.
1910 * memattr.c: Remove _initialize_mem prototype.
1911 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
1912 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
1913 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
1914 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
1915 * mi/mi-main.c: Remove _initialize_mi_main prototype.
1916 * microblaze-linux-tdep.c: Remove
1917 _initialize_microblaze_linux_tdep prototype.
1918 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
1919 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
1920 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
1921 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
1922 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
1923 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
1924 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
1925 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
1926 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
1927 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
1928 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
1929 prototype.
1930 * mipsread.c: Remove _initialize_mipsread prototype.
1931 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
1932 prototype.
1933 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
1934 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
1935 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
1936 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
1937 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
1938 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
1939 prototype.
1940 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
1941 * nto-procfs.c: Remove _initialize_procfs prototype.
1942 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
1943 * objc-lang.c: Remove _initialize_objc_language prototype.
1944 * objfiles.c: Remove _initialize_objfiles prototype.
1945 * observer.c: Remove observer_test_first_notification_function,
1946 observer_test_second_notification_function,
1947 observer_test_third_notification_function, and
1948 _initialize_observer prototypes.
1949 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
1950 * osabi.c: Remove _initialize_gdb_osabi prototype.
1951 * osdata.c: Remove _initialize_osdata prototype.
1952 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
1953 * parse.c: Remove _initialize_parse prototype.
1954 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
1955 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
1956 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
1957 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
1958 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
1959 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
1960 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
1961 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
1962 * printcmd.c: Remove _initialize_printcmd prototype.
1963 * probe.c: Remove _initialize_probe prototype.
1964 * proc-api.c: Remove _initialize_proc_api prototype.
1965 * proc-events.c: Remove _initialize_proc_events prototype.
1966 * proc-service.c: Remove _initialize_proc_service prototype.
1967 * procfs.c: Remove _initialize_procfs prototype.
1968 * psymtab.c: Remove _initialize_psymtab prototype.
1969 * python/python.c: Remove _initialize_python prototype.
1970 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
1971 * record-btrace.c: Remove _initialize_record_btrace prototype.
1972 * record-full.c: Remove _initialize_record_full prototype.
1973 * record.c: Remove _initialize_record prototype.
1974 * regcache.c: Remove _initialize_regcache prototype.
1975 * reggroups.c: Remove _initialize_reggroup prototype.
1976 * remote-notif.c: Remove _initialize_notif prototype.
1977 * remote-sim.c: Remove _initialize_remote_sim prototype.
1978 * remote.c: Remove _initialize_remote prototype.
1979 * reverse.c: Remove _initialize_reverse prototype.
1980 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
1981 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
1982 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
1983 prototype.
1984 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
1985 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
1986 * rust-exp.y: Remove _initialize_rust_exp prototype.
1987 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
1988 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
1989 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
1990 * score-tdep.c: Remove _initialize_score_tdep prototype.
1991 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
1992 prototype.
1993 * ser-go32.c: Remove _initialize_ser_dos prototype.
1994 * ser-mingw.c: Remove _initialize_ser_windows prototype.
1995 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
1996 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
1997 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
1998 * serial.c: Remove _initialize_serial prototype.
1999 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
2000 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
2001 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
2002 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
2003 * skip.c: Remove _initialize_step_skip prototype.
2004 * sol-thread.c: Remove _initialize_sol_thread prototype.
2005 * solib-aix.c: Remove _initialize_solib_aix prototype.
2006 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
2007 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
2008 * solib-frv.c: Remove _initialize_frv_solib prototype.
2009 * solib-spu.c: Remove _initialize_spu_solib prototype.
2010 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
2011 * solib-target.c: Remove _initialize_solib_target prototype.
2012 * solib.c: Remove _initialize_solib prototype.
2013 * source.c: Remove _initialize_source prototype.
2014 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
2015 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
2016 prototype.
2017 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
2018 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
2019 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
2020 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
2021 prototype.
2022 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
2023 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
2024 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
2025 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
2026 prototype.
2027 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
2028 prototype.
2029 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
2030 prototype.
2031 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
2032 prototype.
2033 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
2034 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
2035 prototype.
2036 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
2037 prototype.
2038 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
2039 prototype.
2040 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
2041 prototype.
2042 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
2043 prototype.
2044 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
2045 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
2046 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
2047 * stabsread.c: Remove _initialize_stabsread prototype.
2048 * stack.c: Remove _initialize_stack prototype.
2049 * stap-probe.c: Remove _initialize_stap_probe prototype.
2050 * std-regs.c: Remove _initialize_frame_reg prototype.
2051 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
2052 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
2053 * symfile.c: Remove _initialize_symfile prototype.
2054 * symmisc.c: Remove _initialize_symmisc prototype.
2055 * symtab.c: Remove _initialize_symtab prototype.
2056 * target-dcache.c: Remove _initialize_target_dcache prototype.
2057 * target-descriptions.c: Remove _initialize_target_descriptions
2058 prototype.
2059 * thread.c: Remove _initialize_thread prototype.
2060 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
2061 prototype.
2062 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
2063 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
2064 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
2065 prototype.
2066 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
2067 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
2068 * tracefile.c: Remove _initialize_tracefile prototype.
2069 * tracepoint.c: Remove _initialize_tracepoint prototype.
2070 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
2071 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
2072 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
2073 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
2074 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
2075 * tui/tui-win.c: Remove _initialize_tui_win prototype.
2076 * tui/tui.c: Remove _initialize_tui prototype.
2077 * typeprint.c: Remove _initialize_typeprint prototype.
2078 * user-regs.c: Remove _initialize_user_regs prototype.
2079 * utils.c: Remove _initialize_utils prototype.
2080 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
2081 * valarith.c: Remove _initialize_valarith prototype.
2082 * valops.c: Remove _initialize_valops prototype.
2083 * valprint.c: Remove _initialize_valprint prototype.
2084 * value.c: Remove _initialize_values prototype.
2085 * varobj.c: Remove _initialize_varobj prototype.
2086 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
2087 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
2088 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
2089 * windows-nat.c: Remove _initialize_windows_nat,
2090 _initialize_check_for_gdb_ini, and _initialize_loadable
2091 prototypes.
2092 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
2093 * xcoffread.c: Remove _initialize_xcoffread prototype.
2094 * xml-support.c: Remove _initialize_xml_support prototype.
2095 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
2096 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
2097 prototype.
2098 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
2099 prototype.
2100 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2101
2102 2017-09-08 Keith Seitz <keiths@redhat.com>
2103
2104 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
2105 field.
2106
2107 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
2108
2109 * f-valprint.c (f_val_print): Remove check for one byte
2110 sized integers. Remove printing of character type.
2111
2112 2017-09-08 Frank Penczek <frank.penczek@intel.com>
2113 Christoph Weinmann <christoph.t.weinmann@intel.com>
2114 Bernhard Heckel <bernhard.heckel@intel.com>
2115
2116 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
2117 to maintain proper indentation when printing pointers/refs.
2118
2119 2017-09-07 Joel Brobecker <brobecker@adacore.com>
2120
2121 GDB 8.0.1 released.
2122
2123 2017-09-07 Joel Brobecker <brobecker@adacore.com>
2124
2125 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2126
2127 2017-09-05 Tom Tromey <tom@tromey.com>
2128
2129 * parse.c (funcall_chain): Now a std::vector.
2130 (start_arglist, end_arglist): Simplify.
2131 (free_funcalls): Remove.
2132 (parse_exp_in_context_1): Remove cleanup.
2133
2134 2017-09-05 Tom Tromey <tom@tromey.com>
2135
2136 * go-exp.y (go_parse): Don't create a cleanup.
2137
2138 2017-09-05 Tom Tromey <tom@tromey.com>
2139
2140 * d-exp.y (PrimaryExpression): Use std::string.
2141 (d_parse): Don't create a cleanup.
2142
2143 2017-09-05 Tom Tromey <tom@tromey.com>
2144
2145 * utils.c (do_clear_parser_state): Remove.
2146 (make_cleanup_clear_parser_state): Remove.
2147 * p-exp.y (pascal_parse): Use scoped_restore.
2148 * m2-exp.y (m2_parse): Use scoped_restore.
2149 * f-exp.y (f_parse): Use scoped_restore.
2150 * d-exp.y (d_parse): Use scoped_restore.
2151 * c-exp.y (c_parse): Use scoped_restore.
2152 * ada-exp.y (ada_parse): Use scoped_restore.
2153 * utils.h (make_cleanup_clear_parser_state): Remove.
2154
2155 2017-09-06 Keith Seitz <keiths@redhat.com>
2156
2157 * dwarf2read.c (dw2_linkage_name_attr): New function.
2158 (dw2_linkage_name): New function.
2159 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2160 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2161 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2162
2163 2017-09-06 Kamil Rytarowski <n54@gmx.com>
2164
2165 * config/djgpp/djconfig.sh: Correct shell portability issue.
2166
2167 2017-09-06 Kamil Rytarowski <n54@gmx.com>
2168
2169 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2170
2171 2017-09-06 John Baldwin <jhb@FreeBSD.org>
2172
2173 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2174 * NEWS: Mention new FreeBSD/mips native configuration.
2175 * configure.host: Add aarch64*-*-freebsd*.
2176 * configure.nat: Likewise.
2177 * aarch64-fbsd-nat.c: New file.
2178
2179 2017-09-06 John Baldwin <jhb@FreeBSD.org>
2180
2181 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2182 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2183 * NEWS: Mention new FreeBSD/aarch64 target.
2184 * configure.tgt: Add aarch64*-*-freebsd*.
2185 * aarch64-fbsd-tdep.c: New file.
2186 * aarch64-fbsd-tdep.h: New file.
2187
2188 2017-09-06 Kamil Rytarowski <n54@gmx.com>
2189
2190 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2191
2192 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2193
2194 * parse.c (find_minsym_type_and_address): Don't relocate addresses
2195 of TLS symbols.
2196
2197 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2198
2199 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2200 call.
2201
2202 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2203
2204 * infrun.c (follow_exec): Call add_thread after
2205 target_find_description.
2206
2207 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2208
2209 * infrun.c (handle_inferior_event_1): When exec'ing, read
2210 stop_pc after follow_exec.
2211
2212 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2213
2214 * remote.c (process_g_packet): Update error message.
2215
2216 2017-09-05 Yao Qi <yao.qi@linaro.org>
2217
2218 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
2219 targets.
2220
2221 2017-09-05 Pedro Alves <palves@redhat.com>
2222
2223 * eval.c (eval_call, evaluate_funcall): New functions, factored
2224 out from ...
2225 (evaluate_subexp_standard): ... this.
2226
2227 2017-09-05 Yao Qi <yao.qi@linaro.org>
2228
2229 * amd64-tdep.c (amd64_target_description): Create target
2230 descriptions.
2231 (_initialize_amd64_tdep): Don't call functions
2232 initialize_tdesc_amd64_*. Add self tests.
2233 * arch/amd64.c (amd64_create_target_description): Add parameter
2234 is_linux. Call set_tdesc_osabi if is_linux is true.
2235 * arch/amd64.h (amd64_create_target_description): Update the
2236 declaration.
2237 * arch/i386.c (i386_create_target_description): Add parameter
2238 is_linux. Call set_tdesc_osabi if is_linux is true.
2239 * arch/i386.h (i386_create_target_description): Update
2240 declaration.
2241 * configure.tgt: Add i386.o to gdb_target_obs.
2242 * features/Makefile (XMLTOC): Remove i386/*.xml.
2243 * features/i386/amd64-avx-avx512.c: Remove.
2244 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
2245 * features/i386/amd64-avx-mpx.c: Remove.
2246 * features/i386/amd64-avx.c: Remove.
2247 * features/i386/amd64-mpx.c: Remove.
2248 * features/i386/amd64.c: Remove.
2249 * features/i386/i386-avx-avx512.c: Remove.
2250 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2251 * features/i386/i386-avx-mpx.c: Remove.
2252 * features/i386/i386-avx.c: Remove.
2253 * features/i386/i386-mmx.c: Remove.
2254 * features/i386/i386-mpx.c: Remove.
2255 * features/i386/i386.c: Remove.
2256 * i386-tdep.c: Don't include features/i386/i386*.c., include
2257 target-descriptions.h and arch/i386.h.
2258 (i386_target_description): Create target descriptions.
2259 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2260 functions. Do self tests.
2261
2262 2017-09-05 Yao Qi <yao.qi@linaro.org>
2263
2264 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2265 * features/i386/amd64-avx-avx512-linux.c: Removed.
2266 * features/i386/amd64-avx-linux.c: Removed.
2267 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2268 * features/i386/amd64-avx-mpx-linux.c: Removed.
2269 * features/i386/amd64-linux.c: Removed.
2270 * features/i386/amd64-mpx-linux.c: Removed.
2271 * features/i386/x32-avx-avx512-linux.c: Removed.
2272 * features/i386/x32-avx-linux.c: Removed.
2273 * features/i386/x32-linux.c: Removed.
2274
2275 2017-09-05 Yao Qi <yao.qi@linaro.org>
2276
2277 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
2278 features/i386/*.c.
2279 (amd64_linux_read_description): Call
2280 amd64_create_target_description.
2281 * arch/amd64.c: New file.
2282 * arch/amd64.h: New file.
2283 * configure.tgt (x86_64-*-linux*): Append amd64.o.
2284 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2285
2286 2017-09-05 Yao Qi <yao.qi@linaro.org>
2287
2288 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2289 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
2290 (amd64_linux_read_description): Create target descriptions.
2291 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2292 functions. Add unit tests.
2293 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2294 x32-core.xml.
2295 * features/i386/64bit-avx.c: Generated.
2296 * features/i386/64bit-avx512.c: Generated.
2297 * features/i386/64bit-core.c: Generated.
2298 * features/i386/64bit-linux.c: Generated.
2299 * features/i386/64bit-mpx.c: Generated.
2300 * features/i386/64bit-pkeys.c: Generated.
2301 * features/i386/64bit-segments.c: Generated.
2302 * features/i386/64bit-sse.c: Generated.
2303 * features/i386/x32-core.c: Generated.
2304 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2305 c files for amd64-linux and x32-linux.
2306
2307 2017-09-05 Yao Qi <yao.qi@linaro.org>
2308
2309 * amd64-linux-tdep.c (amd64_linux_read_description): New
2310 function.
2311 (amd64_linux_core_read_description): Call
2312 amd64_linux_read_description.
2313 (amd64_linux_init_abi): Likewise.
2314 (amd64_x32_linux_init_abi): Likewise.
2315 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
2316 * x86-linux-nat.c (x86_linux_read_description): Call
2317 amd64_linux_read_description.
2318
2319 2017-09-05 Yao Qi <yao.qi@linaro.org>
2320
2321 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
2322 comments.
2323
2324 2017-09-05 Yao Qi <yao.qi@linaro.org>
2325
2326 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
2327 * features/i386/i386-avx-avx512-linux.c: Remove.
2328 * features/i386/i386-avx-linux.c: Remove.
2329 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
2330 * features/i386/i386-avx-mpx-linux.c: Remove.
2331 * features/i386/i386-linux.c: Remove.
2332 * features/i386/i386-mmx-linux.c: Remove.
2333 * features/i386/i386-mpx-linux.c: Remove.
2334
2335 2017-09-05 Yao Qi <yao.qi@linaro.org>
2336
2337 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
2338 (SFILES): Add arch/i386.c.
2339 (HFILES_NO_SRCDIR): Add arch/i386.h.
2340 * arch/i386.c: New file.
2341 * arch/i386.h: New file.
2342 * arch/tdesc.h (allocate_target_description): Declare.
2343 (set_tdesc_architecture): Declare.
2344 (set_tdesc_osabi): Declare.
2345 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
2346 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
2347 include arch/i386.h.
2348 (i386_linux_read_description): Remove code and call
2349 i386_create_target_description.
2350 (set_tdesc_architecture): New function.
2351 (set_tdesc_osabi): New function.
2352 * target-descriptions.h (allocate_target_description): Remove.
2353
2354 2017-09-05 Yao Qi <yao.qi@linaro.org>
2355
2356 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
2357 * target-descriptions.c (tdesc_create_feature): Likewise, and
2358 adjust code.
2359 * features/i386/32bit-avx.c: Re-generated.
2360 * features/i386/32bit-avx512.c: Re-generated.
2361 * features/i386/32bit-core.c: Re-generated.
2362 * features/i386/32bit-linux.c: Re-generated.
2363 * features/i386/32bit-mpx.c: Re-generated.
2364 * features/i386/32bit-pkeys.c: Re-generated.
2365 * features/i386/32bit-sse.c: Re-generated.
2366
2367 2017-09-05 Yao Qi <yao.qi@linaro.org>
2368
2369 * regformats/regdef.h (struct reg): Override operator == and !=.
2370
2371 2017-09-05 Yao Qi <yao.qi@linaro.org>
2372
2373 * arch/tdesc.h: New file.
2374 * regformats/regdat.sh: Generate code using tdesc_create_reg.
2375 * target-descriptions.c: Update comments.
2376 * target-descriptions.h: Include "arch/tdesc.h". Remove the
2377 declarations.
2378 * features/i386/32bit-avx.c: Re-generated.
2379 * features/i386/32bit-avx512.c: Re-generated.
2380 * features/i386/32bit-core.c: Re-generated.
2381 * features/i386/32bit-linux.c: Re-generated.
2382 * features/i386/32bit-mpx.c: Re-generated.
2383 * features/i386/32bit-pkeys.c: Re-generated.
2384 * features/i386/32bit-sse.c: Re-generated.
2385
2386 2017-09-05 Yao Qi <yao.qi@linaro.org>
2387
2388 * regformats/regdat.sh: Update generated code.
2389
2390 2017-09-05 Yao Qi <yao.qi@linaro.org>
2391
2392 * regformats/regdat.sh: Adjust code order.
2393
2394 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2395
2396 * expprint.c (dump_subexp_body_standard): Use constant format
2397 string in fprintf_filtered call.
2398
2399 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2400
2401 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
2402 NetBSD/i386.
2403 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
2404
2405 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2406
2407 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
2408
2409 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2410
2411 * bsd-kvm.o: Define _KMEMUSER.
2412 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
2413 * configure: Regenerate.
2414
2415 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2416
2417 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
2418 * i386-fbsd-nat.c: Likewise.
2419
2420 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2421
2422 * unittests/array-view-selftests.c: Add include of <array>.
2423
2424 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2425
2426 * spu-tdep.c (flush_ea_cache): Add missing argument to
2427 call_function_by_hand.
2428
2429 2017-09-04 Pedro Alves <palves@redhat.com>
2430
2431 * NEWS (Safer support for debugging with no debug info): New.
2432
2433 2017-09-04 Pedro Alves <palves@redhat.com>
2434
2435 * c-exp.y (function_method, function_method_void): Add current
2436 instance flags to TYPE_INSTANCE.
2437 * dwarf2read.c (check_modifier): New.
2438 (compute_delayed_physnames): Assert that only C++ adds delayed
2439 physnames. Mark fn_fields as const/volatile depending on
2440 physname.
2441 * eval.c (make_params): New type_instance_flags parameter. Use
2442 it as the new type's instance flags.
2443 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
2444 flags element and pass it to make_params.
2445 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
2446 instance flags element.
2447 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
2448 * gdbtypes.h: Include "enum-flags.h".
2449 (type_instance_flags): New enum-flags type.
2450 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
2451 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
2452 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
2453 (follow_type_instance_flags): New function.
2454 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
2455 * parser-defs.h (follow_type_instance_flags): Declare.
2456 * valops.c (value_struct_elt_for_reference): const/volatile must
2457 match too.
2458
2459 2017-09-04 Pedro Alves <palves@redhat.com>
2460
2461 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
2462 function/method scopes; lookup the nested name as a function local
2463 static variable.
2464
2465 2017-09-04 Pedro Alves <palves@redhat.com>
2466
2467 (%type <voidval>): Add function_method.
2468 * c-exp.y (exp): New production for calls with no arguments.
2469 (function_method, function_method_void_or_typelist): New
2470 productions.
2471 (exp): New production for "method()::static_var".
2472 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
2473 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2474 Handle OP_FUNC_STATIC_VAR.
2475 * parse.c (operator_length_standard):
2476 Handle OP_FUNC_STATIC_VAR.
2477
2478 2017-09-04 Pedro Alves <palves@redhat.com>
2479
2480 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
2481 handling.
2482 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2483 Ditto.
2484 * parse.c (operator_length_standard, operator_check_standard):
2485 Ditto.
2486 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
2487
2488 2017-09-04 Pedro Alves <palves@redhat.com>
2489
2490 * ax-gdb.c: Include "typeprint.h".
2491 (gen_expr_for_cast): New function.
2492 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
2493 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
2494 type is unknown.
2495 * dwarf2read.c (new_symbol_full): Fallback to int instead of
2496 nodebug_data_symbol.
2497 * eval.c: Include "typeprint.h".
2498 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
2499 Error out if symbol has unknown type.
2500 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
2501 evaluate_subexp_for_cast.
2502 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
2503 OP_VAR_MSYM_VALUE.
2504 (evaluate_subexp_for_cast): New function.
2505 * gdbtypes.c (init_nodebug_var_type): New function.
2506 (objfile_type): Use it to initialize types of variables with no
2507 debug info.
2508 * typeprint.c (error_unknown_type): New.
2509 * typeprint.h (error_unknown_type): New declaration.
2510 * compile/compile-c-types.c (convert_type_basic): Handle
2511 TYPE_CODE_ERROR; warn and fallback to int for variables with
2512 unknown type.
2513
2514 2017-09-04 Pedro Alves <palves@redhat.com>
2515
2516 * eval.c (evaluate_var_value): New function, factored out from ...
2517 (evaluate_subexp_standard): ... here.
2518
2519 2017-09-04 Pedro Alves <palves@redhat.com>
2520
2521 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
2522 Remove useless assignments to 'op'.
2523
2524 2017-09-04 Pedro Alves <palves@redhat.com>
2525
2526 * eval.c (eval_skip_value): New function.
2527 (evaluate_subexp_standard): Use it.
2528
2529 2017-09-04 Pedro Alves <palves@redhat.com>
2530
2531 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
2532 function name from symbol/minsym and pass it to
2533 error_call_unknown_return_type.
2534
2535 2017-09-04 Pedro Alves <palves@redhat.com>
2536
2537 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
2538 * ax-gdb.c (gen_msym_var_ref): New function.
2539 (gen_expr): Handle OP_VAR_MSYM_VALUE.
2540 * eval.c (evaluate_var_msym_value): New function.
2541 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
2542 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
2543 to call_function_by_hand.
2544 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2545 Handle OP_VAR_MSYM_VALUE.
2546 (union exp_element) <msymbol>: New field.
2547 * minsyms.h (struct type): Forward declare.
2548 (find_minsym_type_and_address): Declare.
2549 * parse.c (write_exp_elt_msym): New function.
2550 (write_exp_msymbol): Delete, refactored as ...
2551 (find_minsym_type_and_address): ... this new function.
2552 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
2553 (operator_length_standard, operator_check_standard): Handle
2554 OP_VAR_MSYM_VALUE.
2555 * std-operator.def (OP_VAR_MSYM_VALUE): New.
2556
2557 2017-09-04 Pedro Alves <palves@redhat.com>
2558
2559 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
2560 TYPE_GNU_IFUNC specially here. Throw error if return type is
2561 unknown.
2562 * ada-typeprint.c (print_func_type): Handle functions with unknown
2563 return type.
2564 * c-typeprint.c (c_type_print_base): Handle functions and methods
2565 with unknown return type.
2566 * compile/compile-c-symbols.c (convert_symbol_bmsym)
2567 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
2568 * compile/compile-c-types.c: Include "objfiles.h".
2569 (convert_func): For functions with unknown return type, warn and
2570 default to int.
2571 * compile/compile-object-run.c (compile_object_run): Adjust call
2572 to call_function_by_hand_dummy.
2573 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
2574 call_function_by_hand.
2575 * eval.c (evaluate_subexp_standard): Adjust calls to
2576 call_function_by_hand. Handle functions and methods with unknown
2577 return type. Pass expect_type to call_function_by_hand.
2578 * f-typeprint.c (f_type_print_base): Handle functions with unknown
2579 return type.
2580 * gcore.c (call_target_sbrk): Adjust call to
2581 call_function_by_hand.
2582 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
2583 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
2584 an integer address type instead of nodebug.
2585 * guile/scm-value.c (gdbscm_value_call): Adjust call to
2586 call_function_by_hand.
2587 * infcall.c (error_call_unknown_return_type): New function.
2588 (call_function_by_hand): New "default_return_type" parameter.
2589 Pass it down.
2590 (call_function_by_hand_dummy): New "default_return_type"
2591 parameter. Use it instead of defaulting to int. If there's no
2592 default and the return type is unknown, throw an error. If
2593 there's a default return type, and the called function has no
2594 debug info, then assume the function is prototyped.
2595 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
2596 New "default_return_type" parameter.
2597 (error_call_unknown_return_type): New declaration.
2598 * linux-fork.c (call_lseek): Cast return type of lseek.
2599 (inferior_call_waitpid, checkpoint_command): Adjust calls to
2600 call_function_by_hand.
2601 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
2602 calls to call_function_by_hand.
2603 * m2-typeprint.c (m2_procedure): Handle functions with unknown
2604 return type.
2605 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2606 (value_nsstring, print_object_command): Adjust calls to
2607 call_function_by_hand.
2608 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
2609 functions with unknown return type.
2610 (pascal_type_print_func_varspec_suffix): New function.
2611 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
2612 TYPE_CODE_METHOD>: Use it.
2613 * python/py-value.c (valpy_call): Adjust call to
2614 call_function_by_hand.
2615 * rust-lang.c (rust_evaluate_funcall): Adjust call to
2616 call_function_by_hand.
2617 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
2618 call_function_by_hand.
2619 * valops.c (value_allocate_space_in_inferior): Adjust call to
2620 call_function_by_hand.
2621 * typeprint.c (type_print_unknown_return_type): New function.
2622 * typeprint.h (type_print_unknown_return_type): New declaration.
2623
2624 2017-09-04 Pedro Alves <palves@redhat.com>
2625
2626 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
2627 types with more than one parameter as prototyped.
2628
2629 2017-09-04 Pedro Alves <palves@redhat.com>
2630
2631 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
2632 (disassemble_command): Use gdb_disassembly_flags instead of bare
2633 int.
2634 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
2635 (dump_insns, do_mixed_source_and_assembly_deprecated)
2636 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
2637 Use gdb_disassembly_flags instead of bare int.
2638 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
2639 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
2640 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
2641 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
2642 (enum gdb_disassembly_flag): ... values of this new enumeration.
2643 (gdb_disassembly_flags): Define.
2644 (gdb_disassembly)
2645 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
2646 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
2647 gdb_disassembly_flags instead of bare int.
2648 * record-btrace.c (btrace_insn_history)
2649 (record_btrace_insn_history, record_btrace_insn_history_range)
2650 (record_btrace_insn_history_from): Use gdb_disassembly_flags
2651 instead of bare int.
2652 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
2653 Use gdb_disassembly_flags instead of bare int.
2654 * target-debug.h (target_debug_print_gdb_disassembly_flags):
2655 Define.
2656 * target-delegates.c: Regenerate.
2657 * target.c (target_insn_history, target_insn_history_from)
2658 (target_insn_history_range): Use gdb_disassembly_flags instead of
2659 bare int.
2660 * target.h: Include "disasm.h".
2661 (struct target_ops) <to_insn_history, to_insn_history_from,
2662 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
2663 int.
2664 (target_insn_history, target_insn_history_from)
2665 (target_insn_history_range): Use gdb_disassembly_flags instead of
2666 bare int.
2667
2668 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2669
2670 * cli/cli-script.c (build_command_line): For if/while commands,
2671 check whether args is empty.
2672
2673 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2674
2675 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
2676 (enum command_control_type): Likewise.
2677 (struct command_line): Likewise.
2678 (free_command_lines): Likewise.
2679 (struct command_lines_deleter): Likewise.
2680 (command_line_up): Likewise.
2681 (read_command_lines): Likewise.
2682 (read_command_lines_1): Likewise.
2683 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
2684 (enum command_control_type): Likewise.
2685 (struct command_line): Likewise.
2686 (free_command_lines): Likewise.
2687 (struct command_lines_deleter): Likewise.
2688 (command_line_up): Likewise.
2689 (read_command_lines): Likewise.
2690 (read_command_lines_1): Likewise.
2691 * breakpoint.h: Include cli/cli-script.h.
2692 * extension-priv.h: Likewise.
2693 * gdbcmd.h: Likewise.
2694
2695 2017-09-04 Pedro Alves <palves@redhat.com>
2696
2697 * ada-lang.c (is_known_support_routine): Move sal declaration to
2698 where it is initialized.
2699 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
2700 (parse_breakpoint_sals, decode_static_tracepoint_spec)
2701 (clear_command, update_static_tracepoint): Remove init_sal
2702 references. Move declarations closer to initializations.
2703 * cli/cli-cmds.c (list_command): Move sal declarations closer to
2704 initializations.
2705 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
2706 references. Move sal declarations closer to initializations.
2707 * frame.c (find_frame_sal): Return a symtab_and_line via function
2708 return instead of output parameter. Remove init_sal references.
2709 * frame.h (find_frame_sal): Return a symtab_and_line via function
2710 return instead of output parameter.
2711 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
2712 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
2713 instead of memset.
2714 (gdbscm_find_pc_line): Remove init_sal reference.
2715 * infcall.c (call_function_by_hand_dummy): Remove init_sal
2716 references. Move declarations closer to initializations.
2717 * infcmd.c (set_step_frame): Update. Move declarations closer to
2718 initializations.
2719 (finish_backward): Remove init_sal references. Move declarations
2720 closer to initializations.
2721 * infrun.c (process_event_stop_test, handle_step_into_function)
2722 (insert_hp_step_resume_breakpoint_at_frame)
2723 (insert_step_resume_breakpoint_at_caller): Likewise.
2724 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
2725 (symbol_to_sal): Likewise.
2726 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
2727 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
2728 to its initialization.
2729 * reverse.c (save_bookmark_command): Use new/delete. Remove
2730 init_sal references. Move declarations closer to initializations.
2731 * source.c (get_current_source_symtab_and_line): Remove brace
2732 initialization.
2733 (set_current_source_symtab_and_line): Now takes the sal by const
2734 reference. Remove brace initialization.
2735 (line_info): Remove init_sal reference.
2736 * source.h (set_current_source_symtab_and_line): Now takes a
2737 symtab_and_line via const reference.
2738 * stack.c (set_current_sal_from_frame): Adjust.
2739 (print_frame_info): Adjust.
2740 (get_last_displayed_sal): Return the sal via function return
2741 instead of via output parameter. Simplify.
2742 (frame_info): Adjust.
2743 * stack.h (get_last_displayed_sal): Return the sal via function
2744 return instead of via output parameter.
2745 * symtab.c (init_sal): Delete.
2746 (find_pc_sect_line): Remove init_sal references. Move
2747 declarations closer to initializations.
2748 (find_function_start_sal): Remove init_sal references. Move
2749 declarations closer to initializations.
2750 * symtab.h (struct symtab_and_line): In-class initialize all
2751 fields.
2752 * tracepoint.c (set_traceframe_context)
2753 (print_one_static_tracepoint_marker): Remove init_sal references.
2754 Move declarations closer to initializations.
2755 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2756 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
2757 declarations closer to initializations.
2758 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2759 init_sal references. Adjust.
2760
2761 2017-09-04 Pedro Alves <palves@redhat.com>
2762
2763 * ax-gdb.c (agent_command_1): Use range-for.
2764 * break-catch-throw.c (re_set_exception_catchpoint): Update.
2765 * breakpoint.c: Include "common/array-view.h".
2766 (init_breakpoint_sal, create_breakpoint_sal): Change sals
2767 parameter from struct symtabs_and_lines to
2768 array_view<symtab_and_line>. Adjust. Use range-for. Update.
2769 (breakpoint_sals_to_pc): Change sals parameter from struct
2770 symtabs_and_lines to std::vector reference.
2771 (check_fast_tracepoint_sals): Change sals parameter from struct
2772 symtabs_and_lines to std::array_view. Use range-for.
2773 (decode_static_tracepoint_spec): Return a std::vector instead of
2774 symtabs_and_lines. Update.
2775 (create_breakpoint): Update.
2776 (break_range_command, until_break_command, clear_command): Update.
2777 (base_breakpoint_decode_location, bkpt_decode_location)
2778 (bkpt_probe_create_sals_from_location)
2779 (bkpt_probe_decode_location, tracepoint_decode_location)
2780 (tracepoint_probe_decode_location)
2781 (strace_marker_create_sals_from_location): Return a std::vector
2782 instead of symtabs_and_lines.
2783 (strace_marker_create_breakpoints_sal): Update.
2784 (strace_marker_decode_location): Return a std::vector instead of
2785 symtabs_and_lines. Update.
2786 (update_breakpoint_locations): Change struct symtabs_and_lines
2787 parameters to gdb::array_view. Adjust.
2788 (location_to_sals): Return a std::vector instead of
2789 symtabs_and_lines. Update.
2790 (breakpoint_re_set_default): Use std::vector instead of struct
2791 symtabs_and_lines.
2792 (decode_location_default): Return a std::vector instead of
2793 symtabs_and_lines. Update.
2794 * breakpoint.h: Include "common/array-view.h".
2795 (struct breakpoint_ops) <decode_location>: Now returns a
2796 std::vector instead of returning a symtabs_and_lines via output
2797 parameter.
2798 (update_breakpoint_locations): Change sals parameters to use
2799 gdb::array_view.
2800 * cli/cli-cmds.c (edit_command, list_command): Update to use
2801 std::vector and gdb::array_view.
2802 (ambiguous_line_spec): Adjust to use gdb::array_view and
2803 range-for.
2804 (compare_symtabs): Rename to ...
2805 (cmp_symtabs): ... this. Change parameters to symtab_and_line
2806 const reference and adjust.
2807 (filter_sals): Rewrite using std::vector and standard algorithms.
2808 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2809 (jump_command): Update to use std::vector.
2810 * linespec.c (struct linespec_state) <canonical_names>: Update
2811 comment.
2812 (add_sal_to_sals_basic): Delete.
2813 (add_sal_to_sals, filter_results, convert_results_to_lsals)
2814 (decode_line_2, create_sals_line_offset)
2815 (convert_address_location_to_sals, convert_linespec_to_sals)
2816 (convert_explicit_location_to_sals, parse_linespec)
2817 (event_location_to_sals, decode_line_full, decode_line_1)
2818 (decode_line_with_current_source)
2819 (decode_line_with_last_displayed, decode_objc)
2820 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2821 (linespec_result::~linespec_result): Adjust to use std::vector
2822 instead of symtabs_and_lines.
2823 * linespec.h (linespec_sals::sals): Now a std::vector.
2824 (struct linespec_result): Use std::vector, bool, and in-class
2825 initialization.
2826 (decode_line_1, decode_line_with_current_source)
2827 (decode_line_with_last_displayed): Return std::vector.
2828 * macrocmd.c (info_macros_command): Use std::vector.
2829 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2830 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2831 std::vector.
2832 * probe.h (parse_probes): Return a std::vector.
2833 * python/python.c (gdbpy_decode_line): Use std::vector and
2834 gdb::array_view.
2835 * source.c (select_source_symtab, line_info): Use std::vector.
2836 * stack.c (func_command): Use std::vector.
2837 * symtab.h (struct symtabs_and_lines): Delete.
2838 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2839
2840 2017-09-04 Pedro Alves <palves@redhat.com>
2841
2842 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2843 unittests/array-view-selftests.c.
2844 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
2845 * common/array-view.h: New file.
2846 * unittests/array-view-selftests.c: New file.
2847
2848 2017-09-04 Pedro Alves <palves@redhat.com>
2849
2850 * cli/cli-cmds.c (edit_command): Pass message to
2851 ambiguous_line_spec.
2852 (list_command): Pass message to ambiguous_line_spec. Say
2853 "first"/"last" instead of "start" and "end" to be consistent with
2854 the manual.
2855 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
2856 them to print formatted message.
2857
2858 2017-09-04 Pedro Alves <palves@redhat.com>
2859
2860 * btrace.c (ftrace_add_pt): Pass btrace_insn to
2861 ftrace_update_insns by reference instead of pointer.
2862
2863 2017-09-04 Yao Qi <yao.qi@linaro.org>
2864
2865 * i386-go32-tdep.c: Include x86-xstate.h.
2866 (i386_go32_init_abi): Call i386_target_description.
2867 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
2868 if xcr0 is X86_XSTATE_X87_MASK.
2869 * i386-tdep.h (tdesc_i386): Remove the declaration.
2870 (tdesc_i386_mmx): Likewise.
2871
2872 2017-09-04 Yao Qi <yao.qi@linaro.org>
2873
2874 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
2875 X86_XSTATE_SSE_MASK instead of 0.
2876
2877 2017-09-04 Yao Qi <yao.qi@linaro.org>
2878
2879 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
2880 i386_target_description.
2881 * i386-fbsd-nat.c (i386fbsd_read_description): Call
2882 i386_target_description.
2883 * i386-tdep.c (i386_gdbarch_init): Likewise.
2884
2885 2017-09-04 Yao Qi <yao.qi@linaro.org>
2886
2887 * amd64-darwin-tdep.c: Include "x86-xstate.h".
2888 (x86_darwin_init_abi_64): Call amd64_target_description.
2889 * amd64-dicos-tdep.c: Likewise.
2890 * amd64-fbsd-nat.c: Likewise.
2891 * amd64-fbsd-tdep.c: Likewise.
2892 * amd64-nbsd-tdep.c: Likewise.
2893 * amd64-obsd-tdep.c: Likewise.
2894 * amd64-sol2-tdep.c: Likewise.
2895 * amd64-windows-tdep.c: Likewise.
2896 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
2897
2898 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2899
2900 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
2901 (btrace_function) <insn>: Change type to use std::vector.
2902 * btrace.c (ftrace_debug, ftrace_call_num_insn,
2903 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
2904 ftrace_update_insns, ftrace_compute_global_level_offset,
2905 btrace_stitch_bts, btrace_clear, btrace_insn_get,
2906 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
2907 change to std::vector.
2908 (ftrace_update_insns): Adjust to change to std::vector, change
2909 type of INSN parameter.
2910 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
2911 * record-btrace.c (btrace_call_history_insn_range,
2912 btrace_compute_src_line_range,
2913 record_btrace_frame_prev_register): Adjust to change to
2914 std::vector.
2915 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
2916 to change to std::vector.
2917
2918 2017-09-03 Tom Tromey <tom@tromey.com>
2919
2920 * corefile.c (reopen_exec_file): Use std::string.
2921
2922 2017-09-03 Tom Tromey <tom@tromey.com>
2923
2924 * compile/compile.c (compile_register_name_mangled): Return
2925 std::string.
2926 * compile/compile-loc2c.c (pushf_register_address): Update.
2927 (pushf_register): Update.
2928 * compile/compile-c-types.c (convert_array): Update.
2929 * compile/compile-c-symbols.c (generate_vla_size): Update.
2930 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
2931 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
2932 (convert_one_symbol): Update.
2933 (generate_c_for_for_one_variable): Update.
2934 * compile/compile-c-support.c (c_get_range_decl_name): Return a
2935 std::string.
2936 (generate_register_struct): Update.
2937 * compile/compile-internal.h (c_get_range_decl_name): Return a
2938 std::string.
2939 (compile_register_name_mangled): Return std::string.
2940
2941 2017-09-03 Tom Tromey <tom@tromey.com>
2942
2943 * utils.c (perror_string): Return a std::string.
2944 (throw_perror_with_name, perror_warning_with_name): Update.
2945
2946 2017-09-03 Tom Tromey <tom@tromey.com>
2947
2948 * demangle.c (demangle_command): Use std::string,
2949 unique_xmalloc_ptr.
2950
2951 2017-09-03 Tom Tromey <tom@tromey.com>
2952
2953 * cli/cli-setshow.c (do_set_command): Use std::string.
2954
2955 2017-09-03 Tom Tromey <tom@tromey.com>
2956
2957 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
2958
2959 2017-09-03 Tom Tromey <tom@tromey.com>
2960
2961 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
2962
2963 2017-09-03 Tom Tromey <tom@tromey.com>
2964
2965 * mi/mi-cmd-env.c (env_execute_cli_command): Use
2966 gdb::unique_xmalloc_ptr.
2967
2968 2017-09-03 Tom Tromey <tom@tromey.com>
2969
2970 * thread.c (print_thread_info_1): Use string_printf.
2971 (thread_apply_command, thread_apply_all_command): Use
2972 std::string.
2973
2974 2017-09-03 Tom Tromey <tom@tromey.com>
2975
2976 * valprint.c (val_print_string): Update.
2977 * gdbcore.h (memory_error_message): Return std::string.
2978 * corefile.c (memory_error_message): Return std::string.
2979 (memory_error): Update.
2980 * breakpoint.c (insert_bp_location): Update.
2981
2982 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2983
2984 * target/waitstatus.h (target_waitstatus_to_string): Change
2985 return type to std::string.
2986 * target/waitstatus.c (target_waitstatus_to_string): Return
2987 std::string.
2988 * target.h (target_waitstatus_to_string): Remove declaration.
2989 * infrun.c (resume, clear_proceed_status_thread,
2990 print_target_wait_results, do_target_wait, save_waitstatus,
2991 stop_all_threads): Adjust.
2992 * record-btrace.c (record_btrace_wait): Adjust.
2993 * target-debug.h
2994 (target_debug_print_struct_target_waitstatus_p): Adjust.
2995
2996 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2997
2998 PR gdb/22046
2999 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
3000 detection.
3001
3002 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3003
3004 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
3005 for setting/unsetting environment variables on the remote target.
3006 (New remote packets): Add entries for QEnvironmentHexEncoded,
3007 QEnvironmentUnset and QEnvironmentReset.
3008 * common/environ.c (gdb_environ::operator=): Extend method to
3009 handle m_user_set_env_list and m_user_unset_env_list.
3010 (gdb_environ::clear): Likewise.
3011 (match_var_in_string): Change type of first parameter from 'char
3012 *' to 'const char *'.
3013 (gdb_environ::set): Extend method to handle
3014 m_user_set_env_list and m_user_unset_env_list.
3015 (gdb_environ::unset): Likewise.
3016 (gdb_environ::clear_user_set_env): New method.
3017 (gdb_environ::user_set_envp): Likewise.
3018 (gdb_environ::user_unset_envp): Likewise.
3019 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
3020 m_user_unset_env_list on move constructor/assignment.
3021 (unset): Add new default parameter 'update_unset_list = true'.
3022 (clear_user_set_env): New method.
3023 (user_set_envp): Likewise.
3024 (user_unset_envp): Likewise.
3025 (m_user_set_env_list): New std::set.
3026 (m_user_unset_env_list): Likewise.
3027 * common/rsp-low.c (hex2str): New function.
3028 (bin2hex): New overload for bin2hex function.
3029 * common/rsp-low.c (hex2str): New prototype.
3030 (str2hex): New overload prototype.
3031 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
3032 QEnvironmentUnset and QEnvironmentReset.
3033 (remote_protocol_features): Add QEnvironmentHexEncoded,
3034 QEnvironmentUnset and QEnvironmentReset packets.
3035 (send_environment_packet): New function.
3036 (extended_remote_environment_support): Likewise.
3037 (extended_remote_create_inferior): Call
3038 extended_remote_environment_support.
3039 (_initialize_remote): Add QEnvironmentHexEncoded,
3040 QEnvironmentUnset and QEnvironmentReset packet configs.
3041 * unittests/environ-selftests.c (gdb_selftest_env_var):
3042 New variable.
3043 (test_vector_initialization): New function.
3044 (test_init_from_host_environ): Likewise.
3045 (test_reinit_from_host_environ): Likewise.
3046 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
3047 Likewise.
3048 (test_unset_set_empty_vector): Likewise.
3049 (test_vector_clear): Likewise.
3050 (test_std_move): Likewise.
3051 (test_move_constructor):
3052 (test_self_move): Likewise.
3053 (test_set_unset_reset): Likewise.
3054 (run_tests): Rewrite in terms of the functions above.
3055
3056 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
3057
3058 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
3059 (adi_available): Use a temp variable of type CORE_ADDR as argument
3060 3 when calling target_auxv_search.
3061 (adi_normalize_address): Use masks and xor operators to calculate
3062 normalized address.
3063 (adi_read_versions, adi_write_versions, adi_print_versions)
3064 (do_examine, do_assign): Use paddress.
3065
3066 2017-08-29 John Baldwin <jhb@FreeBSD.org>
3067
3068 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
3069 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
3070 out of loop and add supply of FIR.
3071 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
3072 add collect of FIR.
3073
3074 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
3075
3076 PR gdb/21827
3077 * cli/cli-script.c (define_command): Don't convert command name
3078 to lower case.
3079
3080 2017-08-25 Joel Brobecker <brobecker@adacore.com>
3081
3082 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
3083 Update all callers accordingly. Remove all code blocks handling
3084 the case where DISPP is not NULL.
3085
3086 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3087
3088 PR symtab/22003
3089 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
3090 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3091 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
3092
3093 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3094
3095 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
3096 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
3097 (read_comp_units_from_section): New parameter abbrev_section, use
3098 read_and_check_comp_unit_head, allocate signatured_type if needed.
3099 (create_all_comp_units): Update read_comp_units_from_section caller.
3100
3101 2017-08-23 Pedro Alves <palves@redhat.com>
3102
3103 PR remote/21852
3104 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
3105 to null_ptid and switch to thread without reading the registers
3106 after adding the inferior.
3107
3108 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3109
3110 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
3111 compile-gcc.
3112 * compile/compile.c (compile_gcc, show_compile_gcc): New.
3113 (compile_to_object): Implement compile_gcc.
3114 (_initialize_compile): Install "set compile-gcc". Initialize
3115 compile_gcc.
3116
3117 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3118
3119 * compile/compile.c (compile_to_object): Conditionally call
3120 set_verbose. Conditionally call compile or compile_v0.
3121
3122 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
3123
3124 * sparc64-tdep.h: (adi_normalize_address): New export.
3125 * sparc-nat.h: (open_adi_tag_fd): New export.
3126 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3127 * sparc64-linux-tdep.c:
3128 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3129 (sparc64_linux_handle_segmentation_fault): New function.
3130 (sparc64_linux_init_abi): Register
3131 sparc64_linux_handle_segmentation_fault
3132 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3133 (sparc64_addr_bits_remove): New function.
3134 (sparc64_init_abi): Register sparc64_addr_bits_remove.
3135 (MAX_PROC_NAME_SIZE): New macro.
3136 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3137 (sparc64adilist): New variable.
3138 (adi_proc_list): New variable.
3139 (find_adi_info): New function.
3140 (add_adi_info): New function.
3141 (get_adi_info_proc): New function.
3142 (get_adi_info): New function.
3143 (info_adi_command): New function.
3144 (read_maps_entry): New function.
3145 (adi_available): New function.
3146 (adi_normalize_address): New function.
3147 (adi_align_address): New function.
3148 (adi_convert_byte_count): New function.
3149 (adi_tag_fd): New function.
3150 (adi_is_addr_mapped): New function.
3151 (adi_read_versions): New function.
3152 (adi_write_versions): New function.
3153 (adi_print_versions): New function.
3154 (do_examine): New function.
3155 (do_assign): New function.
3156 (adi_examine_command): New function.
3157 (adi_assign_command): New function.
3158 (_initialize_sparc64_adi_tdep): New function.
3159
3160 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
3161
3162 * breakpoint.c (breakpoints_info): Rename to ...
3163 (info_breakpoints_command): ... this.
3164 (watchpoints_info): Rename to ...
3165 (info_watchpoints_command): ... this.
3166 (tracepoints_info): Rename to ...
3167 (info_tracepoints_command): ... this.
3168 (_initialize_breakpoint): Adjust.
3169 * dcache.c (dcache_info): Rename to ...
3170 (info_display_command): ... this.
3171 (_initialize_dcache): Adjust.
3172 * frame.h (args_info): Rename to ...
3173 (info_args_command): ... this.
3174 (locals_info): Rename to ...
3175 (info_locals_command): ... this.
3176 * infcmd.c (nofp_registers_info): Rename to ...
3177 (info_registers_command): ... this.
3178 (float_info): Rename to ...
3179 (info_float_command): ... this.
3180 (program_info): Rename to ...
3181 (info_program_command): ... this.
3182 (all_registers_info): Rename to ...
3183 (info_all_registers_command): ... this.
3184 (vector_info): Rename to ...
3185 (info_vector_command): ... this.
3186 (float_info): Rename to ...
3187 (info_float_command): ... this.
3188 (_initialize_infcmd): Adjust.
3189 * inferior.h (term_info): Rename to ...
3190 (info_terminal_command): ... this.
3191 * inflow.c (term_info): Rename to ...
3192 (info_terminal_command): ... this.
3193 (_initialize_inflow): Adjust.
3194 * infrun.c (signals_info): Rename to ...
3195 (info_signals_command): ... this.
3196 (_initialize_infrun): Adjust.
3197 * objc-lang.c (classes_info): Rename to ...
3198 (info_classes_command): ... this.
3199 (selectors_info): Rename to ...
3200 (info_selectors_command): ... this.
3201 (_initialize_objc_language): Adjust.
3202 * printcmd.c (sym_info): Rename to ...
3203 (info_symbol_command): ... this.
3204 (address_info): Rename to ...
3205 (info_address_command): ... this.
3206 (display_info): Rename to ...
3207 (info_display_command): ... this.
3208 (_initialize_printcmd): Adjust.
3209 * reverse.c (bookmarks_info): Rename to ...
3210 (info_breakpoints_command): ... this.
3211 (_initialize_reverse): Adjust.
3212 * ser-go32.c (dos_info): Rename to ...
3213 (info_serial_command): ... this.
3214 (_initialize_ser_dos): Adjust.
3215 * skip.c (skip_info): Rename to ...
3216 (info_skip_command): ... this.
3217 (_initialize_step_skip): Adjust.
3218 * source.c (line_info): Rename to ...
3219 (info_line_command): ... this.
3220 (source_info): Rename to ...
3221 (info_source_command)
3222 * stack.c (frame_info): Rename to ...
3223 (info_frame_command): ... this.
3224 (locals_info): Rename to ...
3225 (info_locals_command): ... this.
3226 (args_info): Rename to ...
3227 (info_args_command): ... this.
3228 (_initialize_stack): Adjust.
3229 * symtab.c (sources_info): Rename to ...
3230 (info_sources_command): ... this.
3231 (variables_info): Rename to ...
3232 (info_variables_command): ... this.
3233 (functions_info): Rename to ...
3234 (info_functions_command): ... this.
3235 (types_info): Rename to ...
3236 (info_types_command): ... this.
3237 (_initialize_symtab): Adjust.
3238 * target.c (target_info): Rename to ...
3239 (info_target_command): ... this.
3240 (initialize_targets): Adjust.
3241 * tracepoint.c (tvariables_info): Rename to ...
3242 (info_tvariables_command): ... this.
3243 (scope_info): Rename to ...
3244 (info_scope_command): ... this.
3245 (trace_dump_actions): Adjust.
3246 (_initialize_tracepoint): Adjust.
3247
3248 2017-08-22 Tom Tromey <tom@tromey.com>
3249
3250 * breakpoint.h (install_breakpoint): Update.
3251 * breakpoint.c (add_solib_catchpoint): Update.
3252 (install_breakpoint): Change argument to a std::unique_ptr.
3253 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3254 (create_breakpoint_sal, create_breakpoint): Update.
3255 (watch_command_1, catch_exec_command_1)
3256 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3257 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3258 Return the breakpoint.
3259 (set_raw_breakpoint_without_location, set_raw_breakpoint)
3260 (new_single_step_breakpoint): Update.
3261 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3262 std::unique_ptr.
3263 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3264 std::unique_ptr.
3265 * break-catch-sig.c (create_signal_catchpoint): Use
3266 std::unique_ptr.
3267 * ada-lang.c (create_ada_exception_catchpoint): Use
3268 std::unique_ptr.
3269
3270 2017-08-22 Tom Tromey <tom@tromey.com>
3271
3272 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3273
3274 2017-08-22 Tom Tromey <tom@tromey.com>
3275
3276 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3277 (lookup_partial_symbol): Update.
3278
3279 2017-08-22 Tom Tromey <tom@tromey.com>
3280
3281 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3282 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3283 (find_and_open_source, symtab_to_fullname): Update.
3284 * psymtab.c (psymtab_to_fullname): Update.
3285
3286 2017-08-22 Tom Tromey <tom@tromey.com>
3287
3288 * exec.c (exec_file_attach): Update.
3289 * linux-thread-db.c (try_thread_db_load): Update.
3290 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3291 * utils.c (gdb_realpath): Change return type.
3292 (gdb_realpath_keepfile): Update.
3293 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3294 (_initialize_utils): Register the new self test.
3295 * source.c (openp): Update.
3296 (find_and_open_source): Update.
3297 * nto-tdep.c (nto_find_and_open_solib): Update.
3298 * main.c (set_gdb_data_directory): Update.
3299 (captured_main_1): Update.
3300 * dwarf2read.c (dwarf2_get_dwz_file): Update
3301 (dw2_map_symbol_filenames): Update.
3302 * auto-load.c (auto_load_safe_path_vec_update): Update.
3303 (filename_is_in_auto_load_safe_path_vec): Change type of
3304 "filename_realp".
3305 (auto_load_objfile_script): Update.
3306 (file_is_auto_load_safe): Update. Use std::string.
3307 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3308
3309 2017-08-22 Tom Tromey <tom@tromey.com>
3310
3311 * utils.c (gdb_realpath_keepfile): Return a
3312 gdb::unique_xmalloc_ptr.
3313 * exec.c (exec_file_attach): Update.
3314 * utils.h (gdb_realpath_keepfile): Return a
3315 gdb::unique_xmalloc_ptr.
3316
3317 2017-08-22 Tom Tromey <tom@tromey.com>
3318
3319 * compile/compile.c (compile_file_command): Use
3320 gdb::unique_xmalloc_ptr, std::string.
3321 * utils.c (gdb_abspath): Change return type.
3322 * source.c (openp): Update.
3323 * objfiles.c (allocate_objfile): Update.
3324 * main.c (set_gdb_data_directory): Update.
3325 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
3326
3327 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
3328
3329 * cli-cmds.c (list_commands): List actual code around more than
3330 one location.
3331
3332 2017-08-21 John Baldwin <jhb@FreeBSD.org>
3333
3334 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
3335
3336 2017-08-21 Pedro Alves <palves@redhat.com>
3337
3338 PR gdb/19487
3339 * c-exp.y (variable production): Handle function aliases.
3340 * minsyms.c (msymbol_is_text): New function.
3341 * minsyms.h (msymbol_is_text): Declare.
3342 * symtab.c (find_function_alias_target): New function.
3343 * symtab.h (find_function_alias_target): Declare.
3344
3345 2017-08-21 Pedro Alves <palves@redhat.com>
3346
3347 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
3348 typedefs.
3349 * typeprint.c (whatis_exp): If handling "whatis", and expression
3350 is OP_TYPE, strip one typedef level. Otherwise don't strip
3351 typedefs here.
3352 * valops.c (value_cast): Save "to" type before resolving
3353 stubs/typedefs. Use that type as resulting value's type.
3354
3355 2017-08-18 Tom Tromey <tom@tromey.com>
3356 Pedro Alves <palves@redhat.com>
3357
3358 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
3359 * sol-thread.c (sol_thread_resume, sol_thread_wait)
3360 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
3361 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
3362 * proc-service.c (ps_xfer_memory): Use scoped_restore.
3363 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
3364 (linux_get_siginfo_data): Add "thread" argument. Use
3365 scoped_restore.
3366 * linux-nat.c (linux_child_follow_fork)
3367 (check_stopped_by_watchpoint): Use scoped_restore.
3368 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
3369 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
3370 (restore_inferior_ptid, save_inferior_ptid): Remove.
3371 * btrace.c (btrace_fetch): Use scoped_restore.
3372 * bsd-uthread.c (bsd_uthread_fetch_registers)
3373 (bsd_uthread_store_registers): Use scoped_restore.
3374 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
3375 scoped_restore.
3376 * aix-thread.c (aix_thread_resume, aix_thread_wait)
3377 (aix_thread_xfer_partial): Use scoped_restore.
3378 * inferior.h (save_inferior_ptid): Remove.
3379
3380 2017-08-18 Yao Qi <yao.qi@linaro.org>
3381
3382 PR tdep/21818
3383 * arm-tdep.c (gdb_print_insn_arm): Mark
3384 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
3385
3386 2017-08-18 Yao Qi <yao.qi@linaro.org>
3387
3388 * NEWS: Mention GDBserver's new option "--selftest".
3389 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
3390 * selftest.c: Move it to common/selftest.c.
3391 * selftest.h: Move it to common/selftest.h.
3392 * selftest-arch.c (reset): New function.
3393 (tests_with_arch): Call reset.
3394
3395 2017-08-18 Yao Qi <yao.qi@linaro.org>
3396
3397 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
3398 instead of exception_fprintf and printf_filtered.
3399
3400 2017-08-18 Yao Qi <yao.qi@linaro.org>
3401
3402 * selftest.c (register_self_test): Rename it to
3403 selftests::register_test.
3404 (run_self_tests): selftest::run_tests.
3405 * selftest.h: Update declarations.
3406 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
3407 selftests::register_test_foreach_arch.
3408 * selftest-arch.h: Update declaration.
3409 * aarch64-tdep.c: Update.
3410 * arm-tdep.c: Likewise.
3411 * disasm-selftests.c: Likewise.
3412 * dwarf2loc.c: Likewise.
3413 * dwarf2-frame.c: Likewise.
3414 * findvar.c: Likewise.
3415 * gdbarch-selftests.c: Likewise.
3416 * maint.c (maintenance_selftest): Likewise.
3417 * regcache.c: Likewise.
3418 * rust-exp.y: Likewise.
3419 * selftest-arch.c: Likewise.
3420 * unittests/environ-selftests.c: Likewise.
3421 * unittests/function-view-selftests.c: Likewise.
3422 * unittests/offset-type-selftests.c: Likewise.
3423 * unittests/optional-selftests.c: Likewise.
3424 * unittests/scoped_restore-selftests.c: Likewise.
3425 * utils-selftests.c: Likewise.
3426
3427 2017-08-17 Pedro Alves <palves@redhat.com>
3428
3429 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
3430 local.
3431
3432 2017-08-17 Pedro Alves <palves@redhat.com>
3433
3434 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
3435 field.
3436 (reset_die_in_process): Delete, replaced by ...
3437 (process_die_scope): ... this new class. Make it responsible for
3438 freeing cu->line_header too.
3439 (process_die): Use process_die_scope.
3440 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
3441 cu->line_header_die_owner. Don't release the line header if it's
3442 owned by the CU.
3443 (setup_type_unit_groups): Make the CU/DIE own the line header.
3444 Don't release the line header here.
3445
3446 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
3447
3448 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
3449
3450 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
3451
3452 * NEWS: Mention new shortcuts for nexti and stepi in TUI
3453 Single-Key mode
3454
3455 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
3456
3457 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
3458 mode command list.
3459
3460 2017-08-15 Stafford Horne <shorne@gmail.com>
3461
3462 * MAINTAINERS (Write After Approval): Add Stafford Horne.
3463
3464 2017-08-15 Stafford Horne <shorne@gmail.com>
3465
3466 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
3467
3468 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
3469
3470 PR gdb/21954
3471 * infcmd.c (unset_environment_command): Use the 'clear' method on
3472 the environment instead of resetting it.
3473
3474 2017-08-15 John Baldwin <jhb@FreeBSD.org>
3475
3476 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
3477 platforms.
3478
3479 2017-08-14 Tom Tromey <tom@tromey.com>
3480
3481 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
3482 (print_binary_chars): Likewise.
3483 (BITS_IN_BYTES): Remove.
3484
3485 2017-08-14 Tom Tromey <tom@tromey.com>
3486
3487 PR gdb/21675
3488 * valprint.c (LOW_ZERO): Change value to 034.
3489 (print_octal_chars): Add static_asserts for octal constants.
3490 * printcmd.c (print_scalar_formatted): Add 'd' case.
3491
3492 2017-08-11 Tom Tromey <tom@tromey.com>
3493
3494 * symfile.c (add_symbol_file_command): Use std::vector.
3495
3496 2017-08-14 Tom Tromey <tom@tromey.com>
3497
3498 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
3499 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3500 std::move.
3501 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
3502
3503 2017-08-11 Pedro Alves <palves@redhat.com>
3504
3505 * infrun.c (process_event_stop_test): Adjust
3506 function_name_is_marked_for_skip call.
3507 * skip.c: Include <list>.
3508 (skiplist_entry): Make it a class with private fields, and
3509 getters/setters.
3510 (skiplist_entry_chain): Delete.
3511 (skiplist_entries): New.
3512 (skiplist_entry_count): Delete.
3513 (highest_skiplist_entry_num): New.
3514 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
3515 (add_skiplist_entry): Delete.
3516 (skiplist_entry::skiplist_entry): New.
3517 (skiplist_entry::add_entry): New.
3518 (skip_file_command, skip_function): Adjust.
3519 (compile_skip_regexp): Delete.
3520 (skip_command): Don't compile regexp here. Adjust to use
3521 skiplist_entry::add_entry.
3522 (skip_info): Adjust to use range-for and getters.
3523 (skip_enable_command, skip_disable_command): Adjust to use
3524 range-for and setters.
3525 (skip_delete_command): Adjust to use std::list.
3526 (add_skiplist_entry): Delete.
3527 (skip_file_p): Delete, refactored as ...
3528 (skiplist_entry::do_skip_file_p): ... this new method.
3529 (skip_gfile_p): Delete, refactored as ...
3530 (skiplist_entry::do_gskip_file_p): ... this new method.
3531 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
3532 (skiplist_entry::skip_function_p): ... this new method.
3533 (function_name_is_marked_for_skip): Now returns bool, and takes
3534 the function sal by const reference. Adjust to use range-for and
3535 skiplist_entry methods.
3536 (_initialize_step_skip): Remove references to
3537 skiplist_entry_chain, skiplist_entry_count.
3538 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
3539 takes the function sal by const reference.
3540
3541 2017-08-11 Yao Qi <yao.qi@linaro.org>
3542
3543 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
3544 (dwarf2_frame_cache): Remove reset_cache_cleanup.
3545 (dwarf2_frame_cache):
3546 * frame-unwind.c (frame_unwind_try_unwinder): Catch
3547 RETURN_MASK_ALL and set *this_case to NULL.
3548 * frame-unwind.h: Update comments.
3549
3550 2017-08-11 Yao Qi <yao.qi@linaro.org>
3551
3552 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
3553 (dwarf2_frame_state_copy_regs): Remove.
3554 (dwarf2_frame_state_free_regs): Remove.
3555 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
3556 (dwarf2_restore_rule): Call method .alloc_regs instead of
3557 dwarf2_frame_state_alloc_regs.
3558 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
3559 constructor. Call std::move.
3560 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
3561 (dwarf2_frame_cache): Likewise.
3562
3563 [GDB_SELF_TEST]: Include selftest.h and
3564 selftest-arch.h.
3565 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
3566 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
3567 execute_cfa_program_test.
3568
3569 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
3570 copy ctor, assignment operator, move assignment.
3571 <alloc_regs>: New method.
3572 <swap>: New method.
3573 (struct dwarf2_frame_state): Delete dtor.
3574 (dwarf2_frame_state_alloc_regs): Remove declaration.
3575 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
3576 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
3577
3578 2017-08-11 Yao Qi <yao.qi@linaro.org>
3579
3580 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
3581 (dwarf2_frame_state::dwarf2_frame_state): New.
3582 (dwarf2_frame_state::~dwarf2_frame_state): New.
3583 (dwarf2_fetch_cfa_info): Update.
3584 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
3585 rather than a pointer. Update code.
3586 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
3587 dtor.
3588 <data_align, code_align, retaddr_column>: Change them to const.
3589 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
3590 to bool.
3591
3592 2017-08-11 Yao Qi <yao.qi@linaro.org>
3593
3594 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
3595 <loc.exp>: New field.
3596 * dwarf2-frame.c (execute_cfa_program): Update.
3597 (dwarf2_frame_prev_register): Update.
3598
3599 2017-08-10 Pedro Alves <palves@redhat.com>
3600
3601 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
3602
3603 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3604
3605 * fbsd-nat.c (struct fbsd_fork_info): Remove.
3606 (fbsd_pending_children): Use std::list.
3607 (fbsd_remember_child): Likewise.
3608 (fbsd_is_child_pending): Likewise.
3609 (fbsd_pending_vfork_done): Use std::forward_list.
3610 (fbsd_add_vfork_done): Likewise.
3611 (fbsd_is_vfork_done_pending): Likewise.
3612 (fbsd_next_vfork_done): Likewise.
3613
3614 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3615
3616 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
3617 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
3618 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
3619 for `mapfilename'.
3620 (fbsd_xfer_partial): Use gdb::byte_vector.
3621 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
3622
3623 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3624
3625 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
3626 "filestuff.h".
3627 (fbsd_find_memory_regions): Fix `mapfile' initialization.
3628
3629 2017-08-09 Tom Tromey <tom@tromey.com>
3630
3631 * skip.c (skiplist_entry): New constructor.
3632 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
3633 (skiplist_entry::file_is_glob): Now bool.
3634 (skiplist_entry::file, skiplist_entry::function): Now
3635 std::string.
3636 (make_skip_entry): Return a unique_ptr. Use new.
3637 (free_skiplist_entry, free_skiplist_entry_cleanup)
3638 (make_free_skiplist_entry_cleanup): Remove.
3639 (skip_command, skip_disable_command, add_skiplist_entry)
3640 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
3641 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
3642 (function_name_is_marked_for_skip): Update.
3643 (skip_delete_command): Update. Use delete.
3644
3645 2017-08-09 Jiong Wang <jiong.wang@arm.com>
3646
3647 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
3648 (aarch64_linux_core_read_description): New function.
3649 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
3650
3651 2017-08-09 Pedro Alves <palves@redhat.com>
3652
3653 * cp-name-parser.y (cp_comp_to_string): Return a
3654 gdb::unique_xmalloc_ptr<char>.
3655 * cp-support.c (replace_typedefs_qualified_name)
3656 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
3657 (cp_canonicalize_string_full): Use op= instead of explicit
3658 convertion.
3659 (cp_class_name_from_physname, method_name_from_physname)
3660 (cp_func_name, cp_remove_params): Adjust to use
3661 gdb::unique_xmalloc_ptr<char>.
3662 * cp-support.h (cp_comp_to_string): Return a
3663 gdb::unique_xmalloc_ptr<char>.
3664 * python/py-type.c (typy_lookup_type): Adjust to use
3665 gdb::unique_xmalloc_ptr<char>.
3666
3667 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
3668
3669 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
3670
3671 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
3672 Yao Qi <yao.qi@linaro.org>
3673
3674 * cp-support.c (cp_canonicalize_string_full): Use
3675 gdb::unique_xmalloc_ptr<char>.
3676 (cp_canonicalize_string): Likewise.
3677
3678 2017-08-09 Yao Qi <yao.qi@linaro.org>
3679
3680 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
3681 * regformats/i386/amd64-avx-avx512.dat: Remove.
3682 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
3683 * regformats/i386/amd64-avx-mpx.dat:Remove.
3684 * regformats/i386/amd64-avx.dat: Remove.
3685 * regformats/i386/amd64-mpx.dat: Remove.
3686 * regformats/i386/i386-avx-avx512.dat: Remove.
3687 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
3688 * regformats/i386/i386-avx-mpx.dat: Remove.
3689 * regformats/i386/i386-mmx.dat: Remove.
3690 * regformats/i386/i386-mpx.dat: Remove.
3691
3692 2017-08-09 Yao Qi <yao.qi@linaro.org>
3693
3694 * amd64-tdep.h (tdesc_x32): Remove the declaration.
3695 * amd64-tdep.c: Don't include features/i386/x32*.c.
3696 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
3697 functions.
3698 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
3699 and i386/x32-avx-avx512.
3700 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
3701 and i386/x32.xml.
3702 * features/i386/x32-avx-avx512.c: Removed.
3703 * features/i386/x32-avx-avx512.xml: Removed.
3704 * features/i386/x32-avx.c: Removed.
3705 * features/i386/x32-avx.xml: Removed.
3706 * features/i386/x32.c: Removed.
3707 * features/i386/x32.xml: Removed.
3708 * regformats/i386/x32-avx-avx512.dat: Removed.
3709 * regformats/i386/x32-avx.dat: Removed.
3710 * regformats/i386/x32.dat: Removed.
3711
3712 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3713
3714 PR breakpoints/21886
3715 * mem-break.c (default_memory_insert_breakpoint): Use
3716 `->placed_address' rather than `->reqstd_address' for the
3717 breakpoint location.
3718
3719 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3720
3721 * arch-utils.c (default_print_insn): Remove arch/mach/endian
3722 assertions.
3723
3724 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3725
3726 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
3727 a union of `tdep_info', `tdesc_data' and `id'.
3728 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
3729 rather than `info.tdep_info'.
3730 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
3731 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3732 * i386-tdep.c (i386_gdbarch_init): Likewise.
3733 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
3734 * mips-tdep.c (mips_gdbarch_init): Likewise.
3735 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3736 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3737 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
3738 `info.tdep_info'.
3739 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
3740 `info.tdep_info'.
3741 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3742 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
3743 `info.tdep_info'.
3744 * spu-tdep.c (spu_gdbarch_init): Likewise.
3745 * gdbarch.h: Regenerate.
3746
3747 2017-08-07 Leszek Swirski <leszeks@google.com>
3748
3749 PR symtab/20899
3750 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
3751
3752 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
3753
3754 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3755 (gdbsim_open): Rename gdb_argv args object to argv.
3756
3757 2017-08-05 Tom Tromey <tom@tromey.com>
3758
3759 * compile/compile-object-load.c (compile_object_load): Use
3760 gdb::unique_xmalloc_ptr.
3761 * cli/cli-dump.c (scan_filename): Rename from
3762 scan_filename_with_cleanup. Change return type.
3763 (scan_expression): Rename from scan_expression_with_cleanup.
3764 Change return type.
3765 (dump_memory_to_file, dump_value_to_file, restore_command):
3766 Use gdb::unique_xmalloc_ptr. Update.
3767 * cli/cli-cmds.c (find_and_open_script): Use
3768 gdb::unique_xmalloc_ptr.
3769 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3770 * symmisc.c (maintenance_print_symbols)
3771 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3772 * symfile.c (symfile_bfd_open, generic_load)
3773 (add_symbol_file_command, remove_symbol_file_command): Use
3774 gdb::unique_xmalloc_ptr.
3775 * source.c (openp): Use gdb::unique_xmalloc_ptr.
3776 * psymtab.c (maintenance_print_psymbols): Use
3777 gdb::unique_xmalloc_ptr.
3778 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3779 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3780 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3781 (reload_shared_libraries_1): Likewise.
3782
3783 2017-08-05 Tom Tromey <tom@tromey.com>
3784
3785 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3786 (rust_op_vector, rust_set_vector): New typedefs.
3787 (current_parser): New global.
3788 (work_obstack): Change to pointer type. Update all users.
3789 (rust_ast, pstate): Remove globals.
3790 (struct rust_parser): New.
3791 (%union) <params, field_inits>: Change type.
3792 (start, tuple_expr, unit_expr, struct_expr_list, literal)
3793 (field_expr, expr_list, maybe_expr_list, type_list): Update.
3794 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3795 (convert_params_to_types, convert_params_to_expression): Change
3796 type of "params".
3797 (ast_string): Change type of "fields".
3798 (rust_parse): Make a rust_parser. Remove cleanups.
3799 (rust_lex_tests): Make and install an auto_obstack.
3800
3801 2017-08-04 Yao Qi <yao.qi@linaro.org>
3802
3803 * configure.srv (ipa_x32_linux_regobj): New.
3804 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3805 instead of X86_TDESC_AVX512.
3806 (initialize_low_tracepoint): Call
3807 init_registers_x32_avx_avx512_linux.
3808
3809 2017-08-04 Yao Qi <yao.qi@linaro.org>
3810
3811 * utils.h (gdb_argv): Add namespace std for nullptr_t.
3812
3813 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
3814
3815 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3816
3817 2017-08-03 Tom Tromey <tom@tromey.com>
3818
3819 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3820 Remove.
3821 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3822
3823 2017-08-03 Tom Tromey <tom@tromey.com>
3824
3825 * python/py-param.c (compute_enum_values): Use gdb_argv.
3826
3827 2017-08-03 Tom Tromey <tom@tromey.com>
3828
3829 * utils.h (struct gdb_argv_deleter): New.
3830 (gdb_argv): New class.
3831 * utils.c (gdb_argv::reset): New method.
3832 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3833 * tracefile.c (tsave_command): Use gdb_argv.
3834 * top.c (new_ui_command): Use gdb_argv.
3835 * symmisc.c (maintenance_print_symbols)
3836 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3837 * symfile.c (symbol_file_command, generic_load)
3838 (remove_symbol_file_command): Use gdb_argv.
3839 * stack.c (backtrace_command): Use gdb_argv.
3840 * source.c (add_path, show_substitute_path_command)
3841 (unset_substitute_path_command, set_substitute_path_command):
3842 Use gdb_argv.
3843 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
3844 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
3845 * remote.c (extended_remote_run, remote_put_command)
3846 (remote_get_command, remote_delete_command): Use gdb_argv.
3847 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
3848 (gdbsim_open): Use gdb_argv.
3849 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
3850 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
3851 * procfs.c (procfs_info_proc): Use gdb_argv.
3852 * interps.c (interpreter_exec_cmd): Use gdb_argv.
3853 * infrun.c (handle_command): Use gdb_argv.
3854 * inferior.c (add_inferior_command, clone_inferior_command):
3855 Use gdb_argv.
3856 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
3857 * exec.c (exec_file_command): Use gdb_argv.
3858 * cli/cli-cmds.c (alias_command): Use gdb_argv.
3859 * compile/compile.c (build_argc_argv): Use gdb_argv.
3860
3861 2017-08-03 Tom Tromey <tom@tromey.com>
3862
3863 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
3864
3865 2017-08-03 Tom Tromey <tom@tromey.com>
3866
3867 * python/python.c (compute_python_string): Return std::string.
3868 (gdbpy_eval_from_control_command): Update.
3869 (do_start_initialization): Use std::string.
3870 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
3871 xstrprintf.
3872 * python/py-breakpoint.c (local_setattro): Use string_printf, not
3873 xstrprintf.
3874
3875 2017-08-03 Tom Tromey <tom@tromey.com>
3876
3877 * top.h (do_restore_instream_cleanup): Remove.
3878 * top.c (do_restore_instream_cleanup): Remove.
3879 (read_command_file): Use scoped_restore.
3880 * cli/cli-script.c (execute_user_command): Use scoped_restore.
3881
3882 2017-08-03 Tom Tromey <tom@tromey.com>
3883
3884 * cli/cli-script.c (execute_user_command)
3885 (execute_control_command): Use scoped_restore.
3886
3887 2017-08-03 Tom Tromey <tom@tromey.com>
3888
3889 * cli/cli-script.c (do_restore_user_call_depth): Remove.
3890 (execute_user_command): Remove user_call_depth; use
3891 user_args_stack's size instead.
3892
3893 2017-08-03 Tom Tromey <tom@tromey.com>
3894
3895 * top.h (in_user_command): Remove.
3896 * top.c (in_user_command): Remove.
3897 * cli/cli-script.c (do_restore_user_call_depth)
3898 (execute_user_command): Update.
3899
3900 2017-08-03 Tom Tromey <tom@tromey.com>
3901
3902 * valops.c (search_struct_method): Use gdb::byte_vector.
3903 * valarith.c (value_concat): Use std::vector.
3904 * target.c (memory_xfer_partial): Use gdb::byte_vector.
3905 (simple_search_memory): Likewise.
3906 * printcmd.c (find_string_backward): Use gdb::byte_vector.
3907 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
3908 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
3909 * elfread.c (elf_rel_plt_read): Use std::string.
3910 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
3911 * cli/cli-dump.c (restore_section_callback): Use
3912 gdb::byte_vector.
3913
3914 2017-08-03 Tom Tromey <tom@tromey.com>
3915
3916 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
3917
3918 2017-08-03 Tom Tromey <tom@tromey.com>
3919
3920 * tui/tui-regs.c (tui_restore_gdbout): Remove.
3921 (tui_register_format): Use scoped_restore.
3922
3923 2017-08-03 Tom Tromey <tom@tromey.com>
3924
3925 * reverse.c (exec_direction_default): Remove.
3926 (exec_reverse_once): Use scoped_restore.
3927 * remote.c (restore_remote_timeout): Remove.
3928 (remote_flash_erase, remote_flash_write, remote_flash_done)
3929 (readchar, remote_serial_write): Use scoped_restore.
3930 * cli/cli-script.c (struct source_cleanup_lines_args)
3931 (source_cleanup_lines): Remove.
3932 (script_from_file): Use scoped_restore.
3933 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
3934 (source_command): Use scoped_restore.
3935
3936 2017-08-03 Tom Tromey <tom@tromey.com>
3937
3938 * utils.h (make_cleanup_free_so): Remove.
3939 * utils.c (do_free_so, make_cleanup_free_so): Remove.
3940 * solist.h (struct so_deleter): New.
3941 (so_list_up): New typedef.
3942 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
3943
3944 2017-08-03 Tom Tromey <tom@tromey.com>
3945
3946 * utils.h (make_cleanup_restore_current_language): Remove.
3947 * utils.c (do_restore_current_language)
3948 (make_cleanup_restore_current_language): Remove.
3949 * parse.c (parse_exp_in_context_1)
3950 (parse_expression_with_language): Use
3951 scoped_restore_current_language.
3952 * mi/mi-main.c (mi_cmd_execute): Use
3953 scoped_restore_current_language.
3954 * language.h (scoped_restore_current_language): New class.
3955
3956 2017-08-03 Tom Tromey <tom@tromey.com>
3957
3958 * compile/compile.c (cleanup_unlink_file): Remove.
3959 (compile_to_object): Use gdb::unlinker.
3960 (eval_compile_command): Likewise.
3961
3962 2017-08-03 Tom Tromey <tom@tromey.com>
3963
3964 * utils.h (make_cleanup_fclose): Remove.
3965 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
3966
3967 2017-08-03 Tom Tromey <tom@tromey.com>
3968
3969 * top.c (open_terminal_stream): Return gdb_file_up.
3970 (new_ui_command): Update.
3971
3972 2017-08-03 Tom Tromey <tom@tromey.com>
3973
3974 * source.c (print_source_lines_base, forward_search_command)
3975 (reverse_search_command): Use gdb_file_up.
3976
3977 2017-08-03 Tom Tromey <tom@tromey.com>
3978
3979 * fbsd-nat.c (fbsd_find_memory_regions): Update.
3980
3981 2017-08-03 Tom Tromey <tom@tromey.com>
3982
3983 * cli/cli-cmds.c (find_and_open_script): Change return type.
3984 Remove "streamp" and "full_path" parameters.
3985 (source_script_with_search): Update.
3986 * auto-load.c (source_script_file): Update.
3987 * cli/cli-cmds.h (find_and_open_script): Change type.
3988 (open_script): New struct.
3989
3990 2017-08-03 Tom Tromey <tom@tromey.com>
3991
3992 * xml-support.c (xml_fetch_content_from_file): Update.
3993 * ui-file.c (stdio_file::open): Update.
3994 * tracefile-tfile.c (tfile_start): Update.
3995 * remote.c (remote_file_put, remote_file_get): Update.
3996 * nat/linux-procfs.c (linux_proc_get_int)
3997 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
3998 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
3999 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
4000 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
4001 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
4002 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
4003 * linux-nat.c (linux_proc_pending_signals): Update.
4004 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
4005 (file_closer): Remove.
4006 * compile/compile.c (compile_to_object): Update.
4007 * common/filestuff.h (struct gdb_file_deleter): New.
4008 (gdb_file_up): New typedef.
4009 (gdb_fopen_cloexec): Change return type.
4010 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
4011 * cli/cli-dump.c (fopen_with_cleanup): Remove.
4012 (dump_binary_file, restore_binary_file): Update.
4013 * auto-load.c (auto_load_objfile_script_1): Update.
4014
4015 2017-08-03 Tom Tromey <tom@tromey.com>
4016
4017 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
4018 (info_static_tracepoint_markers_command): Likewise.
4019 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
4020 * skip.c (skip_info): Use ui_out_emit_table.
4021 * progspace.c (print_program_space): Use ui_out_emit_table.
4022 * osdata.c (info_osdata): Use ui_out_emit_table.
4023 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
4024 ui_out_emit_table.
4025 * linux-thread-db.c (info_auto_load_libthread_db): Use
4026 ui_out_emit_table.
4027 * inferior.c (print_inferior): Use ui_out_emit_table.
4028 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
4029 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
4030 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
4031 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
4032 * ui-out.h (class ui_out_emit_table): New.
4033
4034 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
4035
4036 * mips-tdep.c (mips_fpu_type_str): New function.
4037 (mips_dump_tdep): Call it.
4038
4039 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
4040
4041 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
4042 `->mips_fpu_type'.
4043
4044 2017-07-31 Xavier Roirand <roirand@adacore.com>
4045
4046 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
4047
4048 2017-07-27 Xavier Roirand <roirand@adacore.com>
4049
4050 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
4051
4052 2017-07-26 Yao Qi <yao.qi@linaro.org>
4053
4054 * cli/cli-cmds.c (maintenancechecklist): New variable.
4055 * gdbcmd.h (maintenancechecklist): Declare it.
4056 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
4057 Call i386_linux_read_description with different masks.
4058 * maint.c (maintenance_check_command): New function.
4059 (_initialize_maint_cmds): Call add_prefix_cmd.
4060 * target-descriptions.c (tdesc_reg): override operator != and ==.
4061 (tdesc_type): Likewise.
4062 (tdesc_feature): Likewise.
4063 (target_desc): Likewise.
4064 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
4065 (maintenance_check_xml_descriptions): New function.
4066 (_initialize_target_descriptions) Add command "xml-descriptions".
4067 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
4068
4069 2017-07-26 Yao Qi <yao.qi@linaro.org>
4070
4071 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
4072 Include features/i386/32bit-*.c.
4073 (i386_linux_read_description): Generate target description if it
4074 doesn't exist.
4075 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
4076 functions.
4077 * features/i386/32bit-linux.c: Re-generated.
4078 * features/i386/32bit-sse.c: Likewise.
4079 * target-descriptions.c (print_c_feature::visit): Print code to
4080 set register number if needed.
4081 (print_c_feature) <m_next_regnum>: New field.
4082
4083 2017-07-26 Yao Qi <yao.qi@linaro.org>
4084
4085 * features/Makefile (CFILES): Rename with TDESC_CFILES.
4086 (FEATURE_XMLFILES): New.
4087 (FEATURE_CFILES): New.
4088 New rules.
4089 (clean-cfiles): Remove generated c files.
4090 * features/i386/32bit-avx.c: Generated.
4091 * features/i386/32bit-avx512.c: Generated.
4092 * features/i386/32bit-core.c: Generated.
4093 * features/i386/32bit-linux.c: Generated.
4094 * features/i386/32bit-mpx.c: Generated.
4095 * features/i386/32bit-pkeys.c: Generated.
4096 * features/i386/32bit-sse.c: Generated.
4097 * target-descriptions.c: Include algorithm.
4098 (tdesc_element_visitor): Add method visit_end.
4099 (print_c_tdesc): Implement visit_end.
4100 (print_c_tdesc:: m_filename_after_features): Move it to
4101 protected.
4102 (print_c_feature): New class.
4103 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
4104 name starts with "i386/32bit-".
4105
4106 2017-07-26 Yao Qi <yao.qi@linaro.org>
4107
4108 * target-descriptions.c (tdesc_element_visitor): New class.
4109 (tdesc_element): New class.
4110 (tdesc_reg): Inherit from tdesc_element.
4111 (tdesc_reg::accept): New function.
4112 (tdesc_type): Inherit from tdesc_element.
4113 (tdesc_type::accept): New function.
4114 (tdesc_feature): Inherit from tdesc_element.
4115 (tdesc_feature::accept): New function.
4116 (target_desc): Inherit from tdesc_element.
4117 (target_desc::target_desc): New.
4118 (target_desc::~target_desc): New.
4119 (target_desc::accept): New.
4120 (allocate_target_description): Use new.
4121 (free_target_description): Use delete.
4122 (print_c_tdesc): New class.
4123 (maint_print_c_tdesc_cmd): Adjust.
4124
4125 * features/aarch64.c: Re-generated.
4126 * features/arc-arcompact.c: Re-generated.
4127 * features/arc-v2.c: Re-generated.
4128 * features/arm/arm-with-iwmmxt.c: Re-generated.
4129 * features/arm/arm-with-m.c: Re-generated.
4130 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4131 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4132 * features/arm/arm-with-neon.c: Re-generated.
4133 * features/arm/arm-with-vfpv2.c: Re-generated.
4134 * features/arm/arm-with-vfpv3.c: Re-generated.
4135 * features/i386/amd64-avx-avx512.c: Re-generated.
4136 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4137 * features/i386/amd64-avx.c: Re-generated.
4138 * features/i386/amd64-avx-linux.c: Re-generated.
4139 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4140 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4141 * features/i386/amd64-avx-mpx.c: Re-generated.
4142 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4143 * features/i386/amd64.c: Re-generated.
4144 * features/i386/amd64-linux.c: Re-generated.
4145 * features/i386/amd64-mpx.c: Re-generated.
4146 * features/i386/amd64-mpx-linux.c: Re-generated.
4147 * features/i386/i386-avx-avx512.c: Re-generated.
4148 * features/i386/i386-avx-avx512-linux.c: Re-generated.
4149 * features/i386/i386-avx.c: Re-generated.
4150 * features/i386/i386-avx-linux.c: Re-generated.
4151 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4152 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4153 * features/i386/i386-avx-mpx.c: Re-generated.
4154 * features/i386/i386-avx-mpx-linux.c: Re-generated.
4155 * features/i386/i386.c: Re-generated.
4156 * features/i386/i386-linux.c: Re-generated.
4157 * features/i386/i386-mmx.c: Re-generated.
4158 * features/i386/i386-mmx-linux.c: Re-generated.
4159 * features/i386/i386-mpx.c: Re-generated.
4160 * features/i386/i386-mpx-linux.c: Re-generated.
4161 * features/i386/x32-avx-avx512.c: Re-generated.
4162 * features/i386/x32-avx-avx512-linux.c: Re-generated.
4163 * features/i386/x32-avx.c: Re-generated.
4164 * features/i386/x32-avx-linux.c: Re-generated.
4165 * features/i386/x32.c: Re-generated.
4166 * features/i386/x32-linux.c: Re-generated.
4167 * features/microblaze.c: Re-generated.
4168 * features/microblaze-with-stack-protect.c: Re-generated.
4169 * features/mips64-dsp-linux.c: Re-generated.
4170 * features/mips64-linux.c: Re-generated.
4171 * features/mips-dsp-linux.c: Re-generated.
4172 * features/mips-linux.c: Re-generated.
4173 * features/nds32.c: Re-generated.
4174 * features/nios2.c: Re-generated.
4175 * features/nios2-linux.c: Re-generated.
4176 * features/rs6000/powerpc-32.c: Re-generated.
4177 * features/rs6000/powerpc-32l.c: Re-generated.
4178 * features/rs6000/powerpc-403.c: Re-generated.
4179 * features/rs6000/powerpc-403gc.c : Re-generated.
4180 * features/rs6000/powerpc-405.c: Re-generated.
4181 * features/rs6000/powerpc-505.c: Re-generated.
4182 * features/rs6000/powerpc-601.c: Re-generated.
4183 * features/rs6000/powerpc-602.c: Re-generated.
4184 * features/rs6000/powerpc-603.c: Re-generated.
4185 * features/rs6000/powerpc-604.c: Re-generated.
4186 * features/rs6000/powerpc-64.c: Re-generated.
4187 * features/rs6000/powerpc-64l.c: Re-generated.
4188 * features/rs6000/powerpc-7400.c: Re-generated.
4189 * features/rs6000/powerpc-750.c: Re-generated.
4190 * features/rs6000/powerpc-860.c: Re-generated.
4191 * features/rs6000/powerpc-altivec32.c: Re-generated.
4192 * features/rs6000/powerpc-altivec32l.c: Re-generated.
4193 * features/rs6000/powerpc-altivec64.c: Re-generated.
4194 * features/rs6000/powerpc-altivec64l.c: Re-generated.
4195 * features/rs6000/powerpc-cell32l.c: Re-generated.
4196 * features/rs6000/powerpc-cell64l.c: Re-generated.
4197 * features/rs6000/powerpc-e500.c: Re-generated.
4198 * features/rs6000/powerpc-e500l.c: Re-generated.
4199 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4200 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4201 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4202 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4203 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
4204 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
4205 * features/rs6000/powerpc-vsx32.c: Re-generated.
4206 * features/rs6000/powerpc-vsx32l.c: Re-generated.
4207 * features/rs6000/powerpc-vsx64.c: Re-generated.
4208 * features/rs6000/powerpc-vsx64l.c: Re-generated.
4209 * features/rs6000/rs6000.c: Re-generated.
4210 * features/s390-linux32.c: Re-generated.
4211 * features/s390-linux32v1.c: Re-generated.
4212 * features/s390-linux32v2.c: Re-generated.
4213 * features/s390-linux64.c: Re-generated.
4214 * features/s390-linux64v1.c: Re-generated.
4215 * features/s390-linux64v2.c: Re-generated.
4216 * features/s390-te-linux64.c: Re-generated.
4217 * features/s390-tevx-linux64.c: Re-generated.
4218 * features/s390-vx-linux64.c: Re-generated.
4219 * features/s390x-linux64.c: Re-generated.
4220 * features/s390x-linux64v1.c: Re-generated.
4221 * features/s390x-linux64v2.c: Re-generated.
4222 * features/s390x-te-linux64.c: Re-generated.
4223 * features/s390x-tevx-linux64.c: Re-generated.
4224 * features/s390x-vx-linux64.c: Re-generated.
4225 * features/sparc/sparc32-solaris.c: Re-generated.
4226 * features/sparc/sparc64-solaris.c: Re-generated.
4227 * features/tic6x-c62x.c: Re-generated.
4228 * features/tic6x-c62x-linux.c: Re-generated.
4229 * features/tic6x-c64x.c: Re-generated.
4230 * features/tic6x-c64x-linux.c: Re-generated.
4231 * features/tic6x-c64xp.c: Re-generated.
4232 * features/tic6x-c64xp-linux.c: Re-generated.
4233
4234 2017-07-26 Yao Qi <yao.qi@linaro.org>
4235
4236 * i386-linux-tdep.c (i386_linux_read_description): New function.
4237 (i386_linux_core_read_description): Call
4238 i386_linux_read_description.
4239 * i386-linux-tdep.h (i386_linux_read_description): Declare.
4240 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
4241 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
4242 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
4243 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
4244 * x86-linux-nat.c (x86_linux_read_description): Call
4245 i386_linux_read_description.
4246
4247 2017-07-26 Yao Qi <yao.qi@linaro.org>
4248
4249 * NEWS: Mention it.
4250 * features/Makefile (%.c: %.xml): Pass the xml file name to
4251 command "maint print c-tdesc".
4252 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4253 name from 'arg'.
4254
4255 2017-07-26 Yao Qi <yao.qi@linaro.org>
4256
4257 * target-descriptions.c (target_desc): Add ctor and dtor. Do
4258 in-class initialization.
4259 (tdesc_create_feature): Call new instead of XCNEW.
4260 (free_target_description): Ue delete.
4261
4262 2017-07-25 John Baldwin <jhb@FreeBSD.org>
4263
4264 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4265
4266 2017-07-25 Yao Qi <yao.qi@linaro.org>
4267
4268 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4269 constant.
4270 (amd64_x32_init_abi): Likewise.
4271 * amd64-tdep.h (amd64_init_abi): Update declaration.
4272 (amd64_x32_init_abi): Likewise.
4273
4274 2017-07-25 Yao Qi <yao.qi@linaro.org>
4275
4276 PR tdep/21717
4277 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4278 condition for FPSCR.
4279 (arm_linux_store_inferior_registers): Likewise.
4280
4281 2017-07-22 Tom Tromey <tom@tromey.com>
4282
4283 * break-catch-syscall.c (struct catch_syscall_inferior_data)
4284 <syscalls_counts>: Now a std::vector.
4285 (get_catch_syscall_inferior_data): Use "new".
4286 (catch_syscall_inferior_data_cleanup): Use "delete".
4287 (insert_catch_syscall, remove_catch_syscall)
4288 (clear_syscall_counts): Update.
4289
4290 2017-07-22 Tom Tromey <tom@tromey.com>
4291
4292 * break-catch-syscall.c (syscall_catchpoint)
4293 <syscalls_to_be_caught>: Now a std::vector<int>
4294 (~syscall_catchpoint): Remove.
4295 (insert_catch_syscall, remove_catch_syscall)
4296 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4297 (print_mention_catch_syscall, print_recreate_catch_syscall):
4298 Update.
4299 (create_syscall_event_catchpoint): Change type of "filter"
4300 parameter.
4301 (catch_syscall_split_args): Return a std::vector.
4302 (catch_syscall_command_1, catching_syscall_number_1): Update.
4303
4304 2017-07-22 Tom Tromey <tom@tromey.com>
4305
4306 * break-catch-throw.c (struct exception_catchpoint)
4307 <exception_rx>: Now a std::string.
4308 (~exception_catchpoint): Remove.
4309 (print_one_detail_exception_catchpoint): Update.
4310 (handle_gnu_v3_exceptions): Change type of except_rx.
4311 (extract_exception_regexp): Return a std::string.
4312 (catch_exception_command_1): Update.
4313
4314 2017-07-22 Tom Tromey <tom@tromey.com>
4315
4316 * break-catch-sig.c (gdb_signal_type): Remove typedef.
4317 (struct signal_catchpoint) <signals_to_be_caught>: Now a
4318 std::vector.
4319 <catch_all>: Now a bool.
4320 (~signal_catchpoint): Remove.
4321 (signal_catchpoint_insert_location)
4322 (signal_catchpoint_remove_location)
4323 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
4324 (signal_catchpoint_print_mention)
4325 (signal_catchpoint_print_recreate)
4326 (signal_catchpoint_explains_signal): Update.
4327 (create_signal_catchpoint): Change type of "filter" and
4328 "catch_all".
4329 (catch_signal_split_args): Return a std::vector. Change type of
4330 "catch_all".
4331 (catch_signal_command): Update.
4332
4333 2017-07-20 Pedro Alves <palves@redhat.com>
4334
4335 * ada-lang.c (ada_language_defn): Make extern.
4336 (_initialize_ada_language): Remove add_language call.
4337 * c-lang.c (c_language_defn, cplus_language_defn)
4338 (asm_language_defn, minimal_language_defn): Make extern.
4339 (_initialize_c_language): Delete.
4340 * completer.c (compare_cstrings): Delete, moved to utils.h.
4341 * d-lang.c (d_language_defn): Make extern.
4342 (_initialize_d_language): Remove add_language calls.
4343 * defs.h (enum language): Add comment.
4344 * f-lang.c (f_language_defn): Make extern.
4345 (_initialize_f_language): Remove add_language call.
4346 * go-lang.c (go_language_defn): Make extern.
4347 (_initialize_go_language): Remove add_language call.
4348 * language.c: Include <algorithm>.
4349 (languages): Redefine as const array.
4350 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
4351 (set_language_command): Handle "local". Use for-range loop.
4352 (set_language): Remove loop.
4353 (language_enum): Rewrite.
4354 (language_def, language_str): Remove loops.
4355 (add_language): Delete.
4356 (add_set_language_command): New, based on add_languages.
4357 (skip_language_trampoline): Adjust.
4358 (local_language_defn): Delete.
4359 (language_gdbarch_post_init): Adjust.
4360 (_initialize_language): Remove add_language calls. Call
4361 add_set_language_command.
4362 * language.h (add_language): Delete.
4363 (auto_language_defn)
4364 (unknown_language_defn, minimal_language_defn, ada_language_defn)
4365 (asm_language_defn, c_language_defn, cplus_language_defn)
4366 (d_language_defn, f_language_defn, go_language_defn)
4367 (m2_language_defn, objc_language_defn, opencl_language_defn)
4368 (pascal_language_defn, rust_language_defn): Declare.
4369 * m2-lang.c (m2_language_defn): Make extern.
4370 (_initialize_m2_language): Remove add_language call.
4371 * objc-lang.c (objc_language_defn): Make extern.
4372 (_initialize_objc_language): Remove add_language call.
4373 * opencl-lang.c (opencl_language_defn): Make extern.
4374 (_initialize_opencl_language): Remove add_language call.
4375 * p-lang.c (pascal_language_defn): Make extern.
4376 (_initialize_pascal_language): Delete.
4377 * rust-lang.c (rust_language_defn): Make extern.
4378 (_initialize_rust_language): Delete.
4379 * utils.h (compare_cstrings): New static inline function.
4380
4381 2017-07-20 Pedro Alves <palves@redhat.com>
4382
4383 * ada-lang.c (ada_to_fixed_type_1): Adjust.
4384 (get_var_value): Constify parameters.
4385 (get_int_var_value): Change prototype.
4386 (to_fixed_range_type): Adjust.
4387 * ada-lang.h (get_int_var_value): Change prototype.
4388
4389 2017-07-20 Pedro Alves <palves@redhat.com>
4390
4391 * dwarf2read.c (dw2_lookup_symbol): Use
4392 SYMBOL_MATCHES_SEARCH_NAME.
4393 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
4394
4395 2017-07-20 Pedro Alves <palves@redhat.com>
4396
4397 * block.c (block_iter_name_step, block_iter_name_first)
4398 (block_iter_name_next): Delete.
4399 (block_lookup_symbol_primary): Adjust to use
4400 dict_iter_match_first/dict_iter_match_next.
4401 * block.h (block_iter_name_first, block_iter_name_next): Delete
4402 declarations.
4403 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
4404 dict_iter_match_first/dict_iter_match_next.
4405
4406 2017-07-20 Pedro Alves <palves@redhat.com>
4407
4408 * cp-support.c (cp_find_first_component_aux): Add missing case for
4409 end of string.
4410
4411 2017-07-18 David Blaikie <dblaikie@gmail.com>
4412
4413 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
4414 of dwo_cu's dwo_file.
4415
4416 2017-07-18 Yao Qi <yao.qi@linaro.org>
4417
4418 * remote.c (store_registers_using_G): Remove one line comment.
4419
4420 2017-07-18 Yao Qi <yao.qi@linaro.org>
4421
4422 * regcache.c (regcache_cpy): Simplify it.
4423 (regcache::cpy_no_passthrough): Remove it.
4424 * regcache.h (cpy_no_passthrough): Remove it.
4425 (regcache_dup, regcache_cpy): Update comments.
4426
4427 2017-07-18 Pedro Alves <palves@redhat.com>
4428
4429 * remote-sim.c (sim_command_completer): Adjust to work with a
4430 completion_tracker instead of a VEC.
4431
4432 2017-07-17 Pedro Alves <palves@redhat.com>
4433
4434 * completer.c (complete_source_filenames): New function.
4435 (complete_address_and_linespec_locations): New function.
4436 (location_completer): Use complete_address_and_linespec_locations.
4437 (completion_tracker::build_completion_result): Honor the tracker's
4438 request to suppress append.
4439 * completer.h (completion_tracker::suppress_append_ws)
4440 (completion_tracker::set_suppress_append_ws): New methods.
4441 (completion_tracker::m_suppress_append_ws): New field.
4442 (complete_source_filenames): New declaration.
4443 * linespec.c (linespec_complete_what): New.
4444 (struct ls_parser) <complete_what, completion_word,
4445 completion_quote_char, completion_quote_end, completion_tracker>:
4446 New fields.
4447 (string_find_incomplete_keyword_at_end): New.
4448 (linespec_lexer_lex_string): Record quote char. If in completion
4449 mode, don't throw.
4450 (linespec_lexer_consume_token): Advance the completion word point.
4451 (linespec_lexer_peek_token): Save/restore completion info.
4452 (save_stream_and_consume_token): New.
4453 (set_completion_after_number): New.
4454 (linespec_parse_basic): Set what to complete next depending on
4455 token. Handle function and label completions specially.
4456 (parse_linespec): Disable objc shortcut in completion mode. Set
4457 what to complete next depending on token type. Skip keyword if in
4458 completion mode.
4459 (complete_linespec_component, linespec_complete): New.
4460 * linespec.h (linespec_complete): Declare.
4461
4462 2017-07-17 Pedro Alves <palves@redhat.com>
4463
4464 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
4465 Handle 'operator<' / 'operator<<'.
4466
4467 2017-07-17 Pedro Alves <palves@redhat.com>
4468
4469 * completer.c (collect_explicit_location_matches): Handle
4470 MATCH_LABEL.
4471 (convert_explicit_location_to_linespec): New, factored out from
4472 ...
4473 (convert_explicit_location_to_sals): ... this.
4474 (complete_label): New.
4475 (linespec_complete_label, find_label_symbols_in_block): New.
4476 (find_label_symbols): Add completion_mode parameter and adjust to
4477 call find_label_symbols_in_block.
4478 * linespec.h (linespec_complete_label): Declare.
4479
4480 2017-07-17 Pedro Alves <palves@redhat.com>
4481
4482 * ada-lang.c (ada_collect_symbol_completion_matches): Add
4483 complete_symbol_mode parameter.
4484 * cli/cli-cmds.c (complete_command): Get the completion result out
4485 of the handle_brkchars tracker if used a custom word point.
4486 * completer.c: Include "linespec.h".
4487 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
4488 (advance_to_expression_complete_word_point): New.
4489 (completion_tracker::completes_to_completion_word): New.
4490 (complete_files_symbols): Pass down
4491 complete_symbol_mode::EXPRESSION.
4492 (explicit_options, probe_options): New.
4493 (collect_explicit_location_matches): Complete on the
4494 explictit_loc->foo instead of word. Use
4495 linespec_complete_function. Handle MATCH_LINE. Handle offering
4496 keyword and options completions.
4497 (backup_text_ptr): Delete.
4498 (skip_keyword): New.
4499 (complete_explicit_location): Remove 'word' parameter. Add
4500 language, quoted_arg_start and quoted_arg_end parameters.
4501 Rewrite, parsing left to right.
4502 (location_completer): Rewrite.
4503 (location_completer_handle_brkchars): New function.
4504 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
4505 (enum complete_line_internal_reason): Adjust comments.
4506 (completion_tracker::discard_completions): New.
4507 (completer_handle_brkchars_func_for_completer): Handle
4508 location_completer.
4509 (gdb_custom_word_point_brkchars)
4510 (gdb_org_rl_basic_quote_characters): New.
4511 (gdb_completion_word_break_characters_throw)
4512 (completion_find_completion_word): Handle trackers that use a
4513 custom word point.
4514 (completion_tracker::advance_custom_word_point_by): New.
4515 (completion_tracker::build_completion_result): Don't rely on
4516 readline appending the quote char.
4517 (gdb_rl_attempted_completion_function_throw): Handle trackers that
4518 use a custom word point.
4519 (gdb_rl_attempted_completion_function): Restore
4520 rl_basic_quote_characters.
4521 * completer.h (class completion_tracker): Extend intro comment.
4522 (completion_tracker::set_quote_char)
4523 (completion_tracker::quote_char)
4524 (completion_tracker::set_use_custom_word_point)
4525 (completion_tracker::use_custom_word_point)
4526 (completion_tracker::custom_word_point)
4527 (completion_tracker::set_custom_word_point)
4528 (completion_tracker::advance_custom_word_point_by)
4529 (completion_tracker::completes_to_completion_word)
4530 (completion_tracker::discard_completions): New methods.
4531 (completion_tracker::m_quote_char)
4532 (completion_tracker::m_use_custom_word_point)
4533 (completion_tracker::m_custom_word_point): New fields.
4534 (advance_to_expression_complete_word_point): Declare.
4535 * f-lang.c (f_collect_symbol_completion_matches): Add
4536 complete_symbol_mode parameter.
4537 * language.h (struct language_defn)
4538 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
4539 parameter.
4540 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
4541 (linespec_complete_function): New function.
4542 (linespec_lexer_lex_keyword): Adjust.
4543 * linespec.h (linespec_keywords, linespec_complete_function): New
4544 declarations.
4545 * location.c (find_end_quote): New function.
4546 (explicit_location_lex_one): Add explicit_completion_info
4547 parameter. Save quoting info. Don't throw if being called for
4548 completion. Don't handle Ada operators here.
4549 (is_cp_operator, skip_op_false_positives, first_of)
4550 (explicit_location_lex_one_function): New function.
4551 (string_to_explicit_location): Replace 'dont_throw' parameter with
4552 an explicit_completion_info pointer parameter. Handle it. Don't
4553 use explicit_location_lex_one to lex function names. Use
4554 explicit_location_lex_one_function instead.
4555 * location.h (struct explicit_completion_info): New.
4556 (string_to_explicit_location): Replace 'dont_throw' parameter with
4557 an explicit_completion_info pointer parameter.
4558 * symtab.c (default_collect_symbol_completion_matches_break_on):
4559 Add complete_symbol_mode parameter. Handle LINESPEC mode.
4560 (default_collect_symbol_completion_matches)
4561 (collect_symbol_completion_matches): Add complete_symbol_mode
4562 parameter.
4563 (collect_symbol_completion_matches_type): Pass down
4564 complete_symbol_mode::EXPRESSION.
4565 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4566 parameter. Handle LINESPEC mode.
4567 * symtab.h (complete_symbol_mode): New.
4568 (default_collect_symbol_completion_matches_break_on)
4569 (default_collect_symbol_completion_matches)
4570 (collect_symbol_completion_matches)
4571 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4572 parameter.
4573
4574 2017-07-17 Pedro Alves <palves@redhat.com>
4575
4576 * utils.c (enum class strncmp_iw_mode): New.
4577 (strcmp_iw): Rename to ...
4578 (strncmp_iw_with_mode): ... this. Add string2_len and mode
4579 parameters. Handle them.
4580 (strncmp_iw): New.
4581 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
4582 * utils.h (strncmp_iw): Declare.
4583 (strcmp_iw): Move describing comments here.
4584
4585 2017-07-17 Pedro Alves <palves@redhat.com>
4586
4587 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
4588 CP_OPERATOR_STR.
4589 * c-typeprint.c (is_type_conversion_operator): Use
4590 CP_OPERATOR_STR.
4591 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
4592 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
4593 CP_OPERATOR_LEN.
4594 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
4595 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
4596 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
4597 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
4598 CP_OPERATOR_STR.
4599 * location.c: Include "cp-support.h".
4600 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
4601 CP_OPERATOR_STR.
4602 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
4603 CP_OPERATOR_LEN.
4604
4605 2017-07-17 Pedro Alves <palves@redhat.com>
4606
4607 * cli/cli-cmds.c (complete_command): Use a completion tracker
4608 along with completion_find_completion_word for handle_brkchars
4609 phase.
4610 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
4611 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
4612 (struct gdb_rl_completion_word_info): New.
4613 (gdb_rl_find_completion_word): New.
4614 (completion_find_completion_word): New.
4615 * completer.h (completion_find_completion_word): Declare.
4616
4617 2017-07-17 Pedro Alves <palves@redhat.com>
4618
4619 * ada-lang.c (symbol_completion_match): Adjust comments.
4620 (symbol_completion_add): Replace vector parameter with
4621 completion_tracker parameter. Use it.
4622 (ada_make_symbol_completion_list): Rename to...
4623 (ada_collect_symbol_completion_matches): ... this. Add
4624 completion_tracker parameter and use it.
4625 (ada_language_defn): Adjust.
4626 * break-catch-syscall.c (catch_syscall_completer): Adjust
4627 prototype and work with completion_tracker instead of VEC.
4628 * breakpoint.c (condition_completer): Adjust prototype and work
4629 with completion_tracker instead of VEC.
4630 * c-lang.c (c_language_defn, cplus_language_defn)
4631 (asm_language_defn, minimal_language_defn): Adjust to renames.
4632 * cli/cli-cmds.c (complete_command): Rework using
4633 completion_tracker. Catch exceptions when completing.
4634 * cli/cli-decode.c (integer_unlimited_completer)
4635 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
4636 with completion_tracker instead of VEC.
4637 * command.h (struct completion_tracker): Forward declare.
4638 (completer_ftype, completer_handle_brkchars_ftype): Change
4639 types.
4640 (complete_on_cmdlist, complete_on_enum): Adjust.
4641 * completer.c: Include <algorithm>.
4642 (struct gdb_completer_state): New.
4643 (current_completion): New global.
4644 (readline_line_completion_function): Delete.
4645 (noop_completer, filename_completer)
4646 (filename_completer_handle_brkchars, complete_files_symbols)
4647 (linespec_location_completer): Adjust to work with a
4648 completion_tracker instead of a VEC.
4649 (string_or_empty): New.
4650 (collect_explicit_location_matches): Adjust to work with a
4651 completion_tracker instead of a VEC.
4652 (explicit_location_completer): Rename to ...
4653 (complete_explicit_location): ... this and adjust to work with a
4654 completion_tracker instead of a VEC.
4655 (location_completer): Adjust to work with a completion_tracker
4656 instead of a VEC.
4657 (add_struct_fields): Adjust to work with a completion_list instead
4658 of VEC.
4659 (expression_completer): Rename to ...
4660 (complete_expression): ... this and adjust to work with a
4661 completion_tracker instead of a VEC. Use complete_files_symbols.
4662 (expression_completer): Reimplement on top of complete_expression.
4663 (symbol_completer): Adjust to work with a completion_tracker
4664 instead of a VEC.
4665 (enum complete_line_internal_reason): Add describing comments.
4666 (complete_line_internal_normal_command): Adjust to work with a
4667 completion_tracker instead of a VEC.
4668 (complete_line_internal): Rename to ...
4669 (complete_line_internal_1): ... this and adjust to work with a
4670 completion_tracker instead of a VEC. Assert TEXT is NULL in the
4671 handle_brkchars phase.
4672 (new_completion_tracker): Delete.
4673 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
4674 complete_line_internal_1.
4675 (free_completion_tracker): Delete.
4676 (INITIAL_COMPLETION_HTAB_SIZE): New.
4677 (completion_tracker::completion_tracker)
4678 (completion_tracker::~completion_tracker): New.
4679 (maybe_add_completion): Delete.
4680 (completion_tracker::maybe_add_completion)
4681 (completion_tracker::add_completion)
4682 (completion_tracker::add_completions): New.
4683 (throw_max_completions_reached_error): Delete.
4684 (complete_line): Adjust to work with a completion_tracker instead
4685 of a VEC. Don't create a completion_tracker_t or check for max
4686 completions here.
4687 (command_completer, command_completer_handle_brkchars)
4688 (signal_completer, reg_or_group_completer_1)
4689 (reg_or_group_completer, default_completer_handle_brkchars):
4690 Adjust to work with a completion_tracker.
4691 (gdb_completion_word_break_characters_throw): New.
4692 (gdb_completion_word_break_characters): Reimplement.
4693 (line_completion_function): Delete.
4694 (completion_tracker::recompute_lowest_common_denominator)
4695 (expand_preserving_ws)
4696 (completion_tracker::build_completion_result)
4697 (completion_result::completion_result)
4698 (completion_result::completion_result)
4699 (completion_result::~completion_result)
4700 (completion_result::completion_result)
4701 (completion_result::release_match_list, compare_cstrings)
4702 (completion_result::sort_match_list)
4703 (completion_result::reset_match_list)
4704 (gdb_rl_attempted_completion_function_throw)
4705 (gdb_rl_attempted_completion_function): New.
4706 * completer.h (completion_list, struct completion_result)
4707 (class completion_tracker): New.
4708 (complete_line): Add completion_tracker parameter.
4709 (readline_line_completion_function): Delete.
4710 (gdb_rl_attempted_completion_function): New.
4711 (noop_completer, filename_completer, expression_completer)
4712 (location_completer, symbol_completer, command_completer)
4713 (signal_completer, reg_or_group_completer): Update prototypes.
4714 (completion_tracker_t, new_completion_tracker)
4715 (make_cleanup_free_completion_tracker): Delete.
4716 (enum maybe_add_completion_enum): Delete.
4717 (maybe_add_completion): Delete.
4718 (throw_max_completions_reached_error): Delete.
4719 * corefile.c (complete_set_gnutarget): Adjust to work with a
4720 completion_tracker instead of a VEC.
4721 * cp-abi.c (cp_abi_completer): Adjust to work with a
4722 completion_tracker instead of a VEC.
4723 * d-lang.c (d_language_defn): Adjust.
4724 * disasm.c (disassembler_options_completer): Adjust to work with a
4725 completion_tracker instead of a VEC.
4726 * f-lang.c (f_make_symbol_completion_list): Rename to ...
4727 (f_collect_symbol_completion_matches): ... this. Adjust to work
4728 with a completion_tracker instead of a VEC.
4729 (f_language_defn): Adjust.
4730 * go-lang.c (go_language_defn): Adjust.
4731 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
4732 Adjust to work with a completion_tracker instead of a VEC.
4733 * infrun.c (handle_completer): Likewise.
4734 * interps.c (interpreter_completer): Likewise.
4735 * interps.h (interpreter_completer): Likewise.
4736 * language.c (unknown_language_defn, auto_language_defn)
4737 (local_language_defn): Adjust.
4738 * language.h (language_defn::la_make_symbol_completion_list):
4739 Rename to ...
4740 (language_defn::la_collect_symbol_completion_matches): ... this
4741 and adjust to work with a completion_tracker instead of a VEC.
4742 * m2-lang.c (m2_language_defn): Adjust.
4743 * objc-lang.c (objc_language_defn): Adjust.
4744 * opencl-lang.c (opencl_language_defn): Adjust.
4745 * p-lang.c (pascal_language_defn): Adjust.
4746 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
4747 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
4748 with a completion_tracker.
4749 * rust-lang.c (rust_language_defn): Adjust.
4750 * symtab.c (free_completion_list, do_free_completion_list)
4751 (return_val, completion_tracker): Delete.
4752 (completion_list_add_name, completion_list_add_symbol)
4753 (completion_list_add_msymbol, completion_list_objc_symbol)
4754 (completion_list_add_fields, add_symtab_completions): Add
4755 completion_tracker parameter and use it.
4756 (default_make_symbol_completion_list_break_on_1): Rename to...
4757 (default_collect_symbol_completion_matches_break_on): ... this.
4758 Add completion_tracker parameter and use it instead of allocating
4759 a completion tracker here.
4760 (default_make_symbol_completion_list_break_on): Delete old
4761 implementation.
4762 (default_make_symbol_completion_list): Delete.
4763 (default_collect_symbol_completion_matches): New.
4764 (make_symbol_completion_list): Delete.
4765 (collect_symbol_completion_matches): New.
4766 (make_symbol_completion_type): Rename to ...
4767 (collect_symbol_completion_matches_type): ... this. Add
4768 completion_tracker parameter and use it instead of VEC.
4769 (make_file_symbol_completion_list_1): Rename to...
4770 (collect_file_symbol_completion_matches): ... this. Add
4771 completion_tracker parameter and use it instead of VEC.
4772 (make_file_symbol_completion_list): Delete.
4773 (add_filename_to_list): Use completion_list instead of a VEC.
4774 (add_partial_filename_data::list): Now a completion_list.
4775 (make_source_files_completion_list): Work with a completion_list
4776 instead of a VEC.
4777 * symtab.h: Include "completer.h".
4778 (default_make_symbol_completion_list_break_on)
4779 (default_make_symbol_completion_list, make_symbol_completion_list)
4780 (make_symbol_completion_type, make_file_symbol_completion_list)
4781 (make_source_files_completion_list): Delete.
4782 (default_collect_symbol_completion_matches_break_on)
4783 (default_collect_symbol_completion_matches)
4784 (collect_symbol_completion_matches)
4785 (collect_symbol_completion_matches_type)
4786 (collect_file_symbol_completion_matches)
4787 (make_source_files_completion_list): New.
4788 * top.c (init_main): Don't install a rl_completion_entry_function
4789 hook. Install a rl_attempted_completion_function hook instead.
4790 * tui/tui-layout.c (layout_completer): Adjust to work with a
4791 completion_tracker.
4792 * tui/tui-regs.c (tui_reggroup_completer):
4793 * tui/tui-win.c (window_name_completer, focus_completer)
4794 (winheight_completer): Adjust to work with a completion_tracker.
4795 * value.c: Include "completer.h".
4796 (complete_internalvar): Adjust to work with a completion_tracker.
4797 * value.h (complete_internalvar): Likewise.
4798
4799 2017-07-17 Pedro Alves <palves@redhat.com>
4800
4801 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4802 renames.
4803 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4804 comments to completer_ftype's declaration.
4805 <completer_handle_brkchars>: Change type to
4806 completer_handle_brkchars_ftype.
4807 * command.h (completer_ftype): Add describing comment and give
4808 names to parameters.
4809 (completer_ftype_void): Rename to ...
4810 (completer_handle_brkchars_ftype) ... this. Add describing comment.
4811 (set_cmd_completer_handle_brkchars): Adjust.
4812 * completer.c (filename_completer_handle_brkchars): New function.
4813 (complete_line_internal_normal_command): New function, factored
4814 out from ...
4815 (complete_line_internal): ... here.
4816 (command_completer_handle_brkchars)
4817 (default_completer_handle_brkchars)
4818 (completer_handle_brkchars_func_for_completer): New functions.
4819 * completer.h (set_gdb_completion_word_break_characters): Delete
4820 declaration.
4821 (completer_handle_brkchars_func_for_completer): New declaration.
4822 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4823 completer_handle_brkchars_func_for_completer.
4824
4825 2017-07-17 Pedro Alves <palves@redhat.com>
4826
4827 * completer.c (symbol_completer): New function, based on
4828 make_symbol_completion_list_fn.
4829 * completer.h (symbol_completer): New declaration.
4830 * guile/scm-cmd.c (cmdscm_completers): Adjust.
4831 * python/py-cmd.c (completers): Adjust.
4832 * symtab.c (make_symbol_completion_list_fn): Delete.
4833 * symtab.h (make_symbol_completion_list_fn): Delete.
4834 * cli/cli-decode.c (add_cmd): Adjust.
4835
4836 2017-07-17 Pedro Alves <palves@redhat.com>
4837
4838 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4839 * dwarf2read.c: Include "filename-seen-cache.h".
4840 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
4841 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
4842 * filename-seen-cache.c: New file.
4843 * filename-seen-cache.h: New file.
4844 * symtab.c: Include "filename-seen-cache.h".
4845 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
4846 (create_filename_seen_cache, clear_filename_seen_cache)
4847 (delete_filename_seen_cache, filename_seen): Delete, parts moved
4848 to filename-seen-cache.h/filename-seen-cache.c.
4849 (output_source_filename, sources_info)
4850 (maybe_add_partial_symtab_filename)
4851 (make_source_files_completion_list): Adjust to use
4852 filename_seen_cache.
4853
4854 2017-07-17 Pedro Alves <palves@redhat.com>
4855
4856 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
4857 fields.
4858 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
4859 dwarf2_debug_sections*)): New.
4860 (dwarf2_per_objfile::dwarf2_per_objfile(const
4861 dwarf2_per_objfile&)): Declare as deleted.
4862 (dwarf2_per_objfile::operator=): Declare as deleted.
4863 (dwarf2_per_objfile::dwarf2_per_objfile)
4864 (dwarf2_per_objfile::~dwarf2_per_objfile)
4865 (dwarf2_per_objfile::free_cached_comp_units): New.
4866 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
4867 ctor. Call dwarf2_per_objfile's ctor manually.
4868 (dwarf2_locate_sections): Deleted/refactored as ...
4869 (dwarf2_per_objfile::locate_sections): ... this new method.
4870 (free_cached_comp_units): Defer to
4871 dwarf2_per_objfile::free_cached_comp_units.
4872 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
4873
4874 2017-07-14 Tom Tromey <tom@tromey.com>
4875
4876 PR rust/21764:
4877 * rust-exp.y (convert_ast_to_expression): Add "want_type"
4878 parameter.
4879 <UNOP_SIZEOF>: Split into separate case.
4880 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
4881
4882 2017-07-14 Tom Tromey <tom@tromey.com>
4883
4884 PR rust/21763:
4885 * symtab.c (symbol_matches_domain): Add language_rust to special
4886 case.
4887 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
4888 treat LOC_TYPEDEF symbols as variables.
4889
4890 2017-07-14 Pedro Alves <palves@redhat.com>
4891
4892 * symtab.c (make_file_symbol_completion_list_1): Iterate over
4893 symtabs matching all symtabs with SRCFILE as file name instead of
4894 only considering the first hit, with lookup_symtab.
4895
4896 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4897
4898 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
4899 operator_name parameters.
4900 (gen_expr): Update function call.
4901
4902 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4903
4904 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
4905 parameter.
4906 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
4907 Likewise.
4908 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
4909 parameter, use agent_expr::gdbarch instead, update function
4910 calls.
4911 (locexpr_tracepoint_var_ref): Likewise.
4912 (loclist_tracepoint_var_ref): Likewise.
4913 * ax-gdb.c (gen_trace_static_fields): Likewise.
4914 (gen_traced_pop): Likewise.
4915 (gen_frame_args_address): Likewise.
4916 (gen_frame_locals_address): Likewise.
4917 (gen_var_ref): Likewise.
4918 (gen_struct_ref_recursive): Likewise.
4919 (gen_static_field): Likewise.
4920 (gen_maybe_namespace_elt): Likewise.
4921 (gen_expr): Likewise.
4922 (gen_trace_for_var): Likewise.
4923 (gen_trace_for_expr): Likewise.
4924 (gen_trace_for_return_address): Likewise.
4925
4926 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4927
4928 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
4929 parameter.
4930 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
4931
4932 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4933
4934 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
4935 from ax, update calls.
4936 (gen_usual_arithmetic): Likewise.
4937 (gen_integral_promotions): Likewise.
4938 (gen_bitfield_ref): Likewise.
4939 (gen_primitive_field): Likewise.
4940 (gen_struct_ref_recursive): Likewise.
4941 (gen_struct_ref): Likewise.
4942 (gen_maybe_namespace_elt): Likewise.
4943 (gen_struct_elt_for_reference): Likewise.
4944 (gen_namespace_elt): Likewise.
4945 (gen_aggregate_elt_ref): Likewise.
4946 (gen_expr): Get gdbarch from ax, update calls.
4947 (gen_expr_binop_rest): Likewise.
4948
4949 2017-07-13 Pedro Alves <palves@redhat.com>
4950
4951 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
4952 as default tdesc.
4953 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
4954 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
4955 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
4956 tdesc_amd64_linux as default tdesc. Get final tdesc from the
4957 tdep.
4958 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
4959 Get final tdesc from the tdep.
4960 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
4961 default tdesc.
4962 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4963 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4964 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
4965 Use it as default tdesc.
4966 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
4967 down to amd_init_abi. No longer handle fallback tdesc here.
4968 * amd64-tdep.h (tdesc_x32): Declare.
4969 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
4970 parameter.
4971 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
4972 as default tdesc.
4973
4974 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4975
4976 * s390-linux-tdep.c (s390_process_record): Add support for
4977 instructions new in arch12.
4978
4979 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4980
4981 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
4982 PT_GETFSBASE and PT_GETGSBASE.
4983 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
4984 PT_SETGSBASE.
4985
4986 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4987
4988 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
4989 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
4990 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
4991 those rules.
4992 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
4993 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
4994 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
4995 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
4996 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
4997 * features/i386/amd64.xml: Add 64bit-segments.xml.
4998 * features/i386/amd64-avx-avx512.c: Regenerated.
4999 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
5000 * features/i386/amd64-avx-mpx.c: Regenerated.
5001 * features/i386/amd64-avx.c: Regenerated.
5002 * features/i386/amd64-mpx.c: Regenerated.
5003 * features/i386/amd64.c: Regenerated.
5004 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
5005 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5006 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
5007 * regformats/i386/amd64-avx.dat: Regenerated.
5008 * regformats/i386/amd64-mpx.dat: Regenerated.
5009 * regformats/i386/amd64.dat: Regenerated.
5010
5011 2017-07-10 Yao Qi <yao.qi@linaro.org>
5012
5013 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5014 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5015
5016 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
5017
5018 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
5019 unsetenv.
5020 * gnulib/aclocal.m4: Regenerate.
5021 * gnulib/config.in: Regenerate.
5022 * gnulib/configure: Regenerate.
5023 * gnulib/import/Makefile.am: Regenerate.
5024 * gnulib/import/Makefile.in: Regenerate.
5025 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5026 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5027 * gnulib/import/m4/environ.m4: New file.
5028 * gnulib/import/m4/setenv.m4: New file.
5029 * gnulib/import/setenv.c: New file.
5030 * gnulib/import/unsetenv.c: New file.
5031
5032 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
5033
5034 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
5035 address when op is DW_OP_addr.
5036
5037 2017-07-09 Tom Tromey <tom@tromey.com>
5038
5039 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
5040 check and apply to outer type.
5041
5042 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5043
5044 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
5045 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
5046 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
5047 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
5048
5049 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5050
5051 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
5052
5053 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5054
5055 * corelow.c (get_core_siginfo): Remove.
5056 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
5057 instead of get_core_siginfo.
5058 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
5059 * gdbarch.h: Re-generate.
5060 * gdbarch.c: Re-generate.
5061 * linux-tdep.c (linux_core_xfer_siginfo): New.
5062 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
5063
5064 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5065
5066 * corelow.c (thread_section_name): Move to ...
5067 * gdbcore.h (thread_section_name): ... here.
5068
5069 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5070
5071 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
5072 (struct siginfo32): New.
5073 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
5074 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
5075 via ptrace(PT_LWPINFO).
5076
5077 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5078
5079 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
5080 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
5081 (fbsd_get_siginfo_type): New.
5082 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
5083 (_initialize_fbsd_tdep): New.
5084
5085 2017-07-06 David Blaikie <dblaikie@gmail.com>
5086
5087 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
5088 a singular dwo_unit*) to support multiple CUs in the same way that
5089 multiple TUs are supported.
5090 (create_cus_hash_table): Replace create_dwo_cu with a function for
5091 parsing multiple CUs from a DWO file.
5092 (open_and_init_dwo_file): Use create_cus_hash_table rather than
5093 create_dwo_cu.
5094 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
5095 htab_find, rather than comparing the signature to a singleton CU in
5096 the dwo_file.
5097
5098 2017-07-06 Pedro Alves <palves@redhat.com>
5099
5100 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
5101
5102 2017-07-04 Pedro Alves <palves@redhat.com>
5103
5104 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
5105 * gdbtypes.h (TYPE_STATIC): Delete.
5106 (struct fn_field) <is_public, is_abstract, is_static, is_final,
5107 is_synchronized, is_native>: Delete.
5108 <dummy>: Bump.
5109 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
5110 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
5111 (TYPE_FN_FIELD_ABSTRACT): Delete.
5112
5113 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
5114
5115 * buffer.h (buffer_finish): Fix spelling mistakes.
5116
5117 2017-07-01 Eli Zaretskii <eliz@gnu.org>
5118
5119 * .dir-locals.el: Automatically switch to C-style comments in
5120 versions of Emacs that support the feature.
5121
5122 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5123 Pedro Alves <palves@redhat.com>
5124
5125 PR cli/21688
5126 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5127 (process_next_line): New variable 'inline_cmd'.
5128 Adjust 'if' clauses for "python", "compile" and "guile" to use
5129 'command_name_equals' and check for '!inline_cmd'.
5130
5131 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5132
5133 PR cli/21688
5134 * cli/cli-script.c (command_name_equals_not_inline): New function.
5135 (process_next_line): Adjust 'if' clauses for "python", "compile"
5136 and "guile" to use command_name_equals_not_inline.
5137
5138 2017-06-29 Pedro Alves <palves@redhat.com>
5139
5140 * completer.c (expression_completer): Call
5141 linespec_location_completer instead of location_completer.
5142
5143 2017-06-29 Pedro Alves <palves@redhat.com>
5144
5145 * completer.c (expression_completer): Remove code that recomputes
5146 'text' from 'word'.
5147
5148 2017-06-29 Yao Qi <yao.qi@linaro.org>
5149
5150 * regformats/regdat.sh: Generate code with
5151 "ifndef IN_PROCESS_AGENT".
5152
5153 2017-06-28 Pedro Alves <palves@redhat.com>
5154
5155 * command.h: Include "common/scoped_restore.h".
5156
5157 2017-06-28 Yao Qi <yao.qi@linaro.org>
5158
5159 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5160 instead of obstack_grow.
5161
5162 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
5163
5164 PR gdb/21337
5165 * symfile.c (reread_symbols): Call objfiles_changed just before
5166 read_symbols.
5167
5168 2017-06-27 Pedro Alves <palves@redhat.com>
5169
5170 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5171 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5172 (completion_list_add_symbol, completion_list_add_msymbol):
5173 ... these new functions.
5174 (add_symtab_completions)
5175 (default_make_symbol_completion_list_break_on_1): Adjust.
5176
5177 2017-06-27 Pedro Alves <palves@redhat.com>
5178
5179 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5180 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
5181 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5182 dtor.
5183 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
5184 'storage_obstack' field an auto_obstack. In-class initialize all
5185 non-bitfield fields. Make minsyms_read bool.
5186 * symfile.c (read_symbols): Adjust.
5187
5188 2017-06-27 Alan Hayward <alan.hayward@arm.com>
5189
5190 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5191 (gdbsim_store_register): Likewise.
5192
5193 2017-06-27 Pedro Alves <palves@redhat.com>
5194
5195 * c-exp.y (name_obstack): Now an auto_obstack.
5196 (yylex): Use auto_obstack::clear.
5197 (c_parse): Use auto_obstack::clear instead of reinitializing and
5198 freeing the obstack.
5199 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5200 * d-exp.y (name_obstack): Now an auto_obstack.
5201 (yylex): Use auto_obstack::clear.
5202 (d_parse): Use auto_obstack::clear instead of reinitializing and
5203 freeing the obstack.
5204 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
5205 auto_obstack.
5206 * dwarf2read.c (create_addrmap_from_index)
5207 (dwarf2_build_psymtabs_hard)
5208 (update_enumeration_type_from_children): Likewise.
5209 * gdb_obstack.h (auto_obstack): New type.
5210 * go-exp.y (name_obstack): Now an auto_obstack.
5211 (build_packaged_name): Use auto_obstack::clear.
5212 (go_parse): Use auto_obstack::clear instead of reinitializing and
5213 freeing the obstack.
5214 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
5215 auto_obstack.
5216 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
5217 * rust-exp.y (work_obstack): Now an auto_obstack.
5218 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
5219 reinitializing and freeing the obstack.
5220 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
5221 (host_char_to_target): Use auto_obstack.
5222 * utils.h (make_cleanup_obstack_free): Delete declaration.
5223 * valprint.c (generic_emit_char, generic_printstr): Use
5224 auto_obstack.
5225
5226 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
5227
5228 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
5229 thread.
5230 (darwin_init_thread_list): Don't update dummy thread.
5231 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
5232
5233 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5234
5235 * record-full.c (netorder16): Remove.
5236
5237 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5238
5239 * common/diagnostics.h: Define macros for GCC.
5240 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
5241 * common/vec.h: Include diagnostics.h.
5242 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
5243 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
5244 warning.
5245
5246 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5247
5248 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5249 New macro.
5250 * ada-lex.l: Ignore deprecated register warnings.
5251
5252 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5253
5254 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5255 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5256
5257 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5258
5259 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5260 its own line.
5261
5262 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5263
5264 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5265
5266 2017-06-23 Alan Hayward <alan.hayward@arm.com>
5267
5268 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5269 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5270 (xtensa_register_read_masked): Likewise.
5271
5272 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
5273
5274 * common/environ.c (gdb_environ::unset): Update comment.
5275
5276 2017-06-22 Alan Hayward <alan.hayward@arm.com>
5277
5278 * python/py-unwind.c (pyuw_sniffer): Allocate space for
5279 registers.
5280
5281 2017-06-22 Alan Hayward <alan.hayward@arm.com>
5282
5283 * record-full.c (record_full_exec_insn): Use byte_vector.
5284
5285 2017-06-22 Yao Qi <yao.qi@linaro.org>
5286
5287 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5288 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5289
5290 2017-06-22 Alan Hayward <alan.hayward@arm.com>
5291
5292 * remote.c (cached_reg): Move from here...
5293 * regcache.h (cached_reg): ...to here.
5294 * python/py-unwind.c (struct reg_info): Remove.
5295 (cached_frame_info): Use cached_reg_t.
5296 (pyuw_prev_register): Likewise.
5297 (pyuw_sniffer): Use cached_reg_t and allocate registers.
5298 (pyuw_dealloc_cache): Free all registers.
5299
5300 2017-06-22 Pedro Alves <palves@redhat.com>
5301 Simon Marchi <simon.marchi@ericsson.com>
5302
5303 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5304 warning.
5305 * common/diagnostics.h: New file.
5306
5307 2017-06-22 Pedro Alves <palves@redhat.com>
5308
5309 * common/agent.h: Add include guards.
5310
5311 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
5312
5313 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
5314 talk about addressable units instead of bytes.
5315
5316 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5317
5318 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
5319 of '::const_iterator'.
5320
5321 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5322
5323 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5324 'unittests/environ-selftests.c'.
5325 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
5326 * charset.c (find_charset_names): Declare object 'iconv_env'.
5327 Update code to use 'iconv_env' object. Remove call to
5328 'free_environ'.
5329 * common/environ.c: Include <utility>.
5330 (make_environ): Delete function.
5331 (free_environ): Delete function.
5332 (gdb_environ::clear): New function.
5333 (gdb_environ::operator=): New function.
5334 (gdb_environ::get): Likewise.
5335 (environ_vector): Delete function.
5336 (set_in_environ): Delete function.
5337 (gdb_environ::set): New function.
5338 (unset_in_environ): Delete function.
5339 (gdb_environ::unset): New function.
5340 (gdb_environ::envp): Likewise.
5341 * common/environ.h: Include <vector>.
5342 (struct gdb_environ): Delete; transform into...
5343 (class gdb_environ): ... this class.
5344 (free_environ): Delete prototype.
5345 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
5346 environ_vector): Likewise.
5347 * infcmd.c (run_command_1): Update code to call
5348 'envp' from 'gdb_environ' class.
5349 (environment_info): Update code to call methods from 'gdb_environ'
5350 class.
5351 (unset_environment_command): Likewise.
5352 (path_info): Likewise.
5353 (path_command): Likewise.
5354 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
5355 (inferior::inferior): Initialize 'environment' using the host's
5356 information.
5357 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
5358 Include "environ.h".
5359 (class inferior) <environment>: Change type from 'struct
5360 gdb_environ' to 'gdb_environ'.
5361 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
5362 methods from 'gdb_environ' class.
5363 * solib.c (solib_find_1): Likewise
5364 * unittests/environ-selftests.c: New file.
5365
5366 2017-06-20 Yao Qi <yao.qi@linaro.org>
5367
5368 * features/i386/i386-linux.xml: Exchange the order of including
5369 32bit-linux.xml and 32bit-sse.xml.
5370 * features/i386/i386-linux.c: Regenerated.
5371
5372 2017-06-20 Yao Qi <yao.qi@linaro.org>
5373
5374 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
5375 Delete copy ctor and assignment operator.
5376 (tdesc_type): Likewise.
5377 (tdesc_feature): Likewise.
5378 (tdesc_free_reg): Remove.
5379 (tdesc_create_reg): Use new.
5380 (tdesc_free_type): Remove.
5381 (tdesc_create_vector): Use new.
5382 (tdesc_create_union): Likewise.
5383 (tdesc_create_flags): Likewise.
5384 (tdesc_create_enum): Likewise.
5385 (tdesc_free_feature): Delete.
5386 (free_target_description): Use delete.
5387
5388 2017-06-19 John Baldwin <jhb@FreeBSD.org>
5389
5390 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
5391 registers.
5392
5393 2017-06-19 Pedro Alves <palves@redhat.com>
5394
5395 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
5396 after gdb::unlinker.
5397
5398 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
5399
5400 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
5401 gdb_environ to access an environment variable.
5402
5403 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
5404
5405 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
5406 gdb_byte*.
5407
5408 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5409
5410 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
5411
5412 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5413
5414 * configure: Re-generate.
5415 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
5416
5417 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5418
5419 * configure: Re-generate.
5420 * warning.m4: Pass -Werror to compiler when checking for
5421 supported warning flags.
5422
5423 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5424
5425 * Makefile.in (COMPILE.pre): Add "-x c++".
5426
5427 2017-06-16 Alan Hayward <alan.hayward@arm.com>
5428 Pedro Alves <palves@redhat.com>
5429 Yao Qi <yao.qi@linaro.org>
5430
5431 * defs.h (RequireLongest): New.
5432 (extract_integer): Declare function template.
5433 (extract_signed_integer): Remove the declaration, but define it
5434 static inline.
5435 (extract_unsigned_integer): Likewise.
5436 (store_integer): Declare function template.
5437 (store_signed_integer): Remove the declaration, but define it
5438 static inline.
5439 (store_unsigned_integer): Likewise.
5440 * findvar.c (extract_integer): New function template.
5441 (extract_signed_integer): Remove.
5442 (extract_unsigned_integer): Remove.
5443 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
5444 instantiations.
5445 (store_integer): New function template.
5446 (store_signed_integer): Remove.
5447 (store_unsigned_integer): Remove.
5448 (store_integer): Explicit instantiations.
5449 * regcache.c (regcache_raw_read_signed): Update.
5450 (regcache::raw_read): New function.
5451 (regcache::raw_read_signed): Remove.
5452 (regcache::raw_read_unsigned): Remove.
5453 (regcache_raw_read_unsigned): Update.
5454 (regcache_raw_write_unsigned): Update.
5455 (regcache::raw_write_signed): Remove.
5456 (regcache::raw_write): New function.
5457 (regcache_cooked_read_signed): Update.
5458 (regcache::raw_write_unsigned): Remove.
5459 (regcache::cooked_read_signed): Remove.
5460 (regcache_cooked_read_unsigned): Update.
5461 (regcache::cooked_read_unsigned): Remove.
5462 (regcache_cooked_write_signed): Update.
5463 (regcache_cooked_write_unsigned): Update.
5464 * regcache.h (regcache) <raw_read_signed>: Remove.
5465 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
5466 <raw_read, raw_write>: New.
5467 <cooked_read_signed, cooked_write_signed>: Remove.
5468 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
5469 <cooked_read, cooked_write>: New.
5470 * sh64-tdep.c (sh64_pseudo_register_read): Update.
5471 (sh64_pseudo_register_write): Update.
5472
5473 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
5474
5475 * arc-tdep.c (arc_disassembler_options): New variable.
5476 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
5477 of default_print_insn.
5478 (arc_delayed_print_insn): Set info->section when needed,
5479 use default_print_insn to retrieve a disassembler.
5480
5481 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
5482
5483 PR gdb/21574
5484 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
5485 to mention $SHELL and startup-with-shell.
5486
5487 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
5488
5489 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
5490
5491 2017-06-14 Yao Qi <yao.qi@linaro.org>
5492
5493 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
5494 default_print_insn instead of print_insn_aarch64.
5495 * arm-tdep.c (gdb_print_insn_arm): Call
5496 default_print_insn instead of print_insn_big_arm
5497 and print_insn_little_arm.
5498 * i386-tdep.c (i386_print_insn): Call default_print_insn
5499 instead of print_insn_i386.
5500 * ia64-tdep.c (ia64_print_insn): Call
5501 default_print_insn instead of print_insn_ia64.
5502 * mips-tdep.c (gdb_print_insn_mips): Call
5503 default_print_insn instead of print_insn_big_mips
5504 and print_insn_little_mips.
5505 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
5506 instead of print_insn_spu.
5507
5508 2017-06-14 Pedro Alves <palves@redhat.com>
5509
5510 * ada-lang.c: Include "common/byte-vector.h".
5511 (ada_value_primitive_packed_val): Use gdb::byte_vector.
5512 * charset.c (wchar_iterator::iterate): Resize the vector instead
5513 of reserving it.
5514 * common/byte-vector.h: Include "common/def-vector.h".
5515 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
5516 * cli/cli-dump.c: Include "common/byte-vector.h".
5517 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
5518 * common/byte-vector.h: New file.
5519 * common/def-vector.h: New file.
5520 * common/default-init-alloc.h: New file.
5521 * dwarf2loc.c: Include "common/byte-vector.h".
5522 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
5523 instead of reserving it.
5524 * dwarf2read.c: Include "common/byte-vector.h".
5525 (data_buf::m_vec): Now a gdb::byte_vector.
5526 * gdb_regex.c: Include "common/def-vector.h".
5527 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
5528 * mi/mi-main.c: Include "common/byte-vector.h".
5529 (mi_cmd_data_read_memory): Use gdb::byte_vector.
5530 * printcmd.c: Include "common/byte-vector.h".
5531 (print_scalar_formatted): Use gdb::byte_vector.
5532 * valprint.c: Include "common/byte-vector.h".
5533 (maybe_negate_by_bytes, print_decimal_chars): Use
5534 gdb::byte_vector.
5535
5536 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5537
5538 * darwin-nat.c: Include "nat/fork-inferior.h".
5539
5540 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5541
5542 * configure.nat: Factor out Darwin bits that are not
5543 architecture-specific. Add fork-inferior.o.
5544
5545 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5546
5547 * configure.nat: Factor out AIX bits that are not
5548 architecture-specific. Add fork-inferior.o.
5549
5550 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5551
5552 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
5553 (read_pieced_value, write_pieced_value): ...here. Reduce to
5554 wrappers that just call rw_pieced_value.
5555
5556 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5557
5558 * dwarf2loc.c (write_pieced_value): When writing the data for a
5559 memory piece, use write_memory_with_notification instead of
5560 write_memory.
5561
5562 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5563
5564 * valops.c (read_value_memory): Change embedded_offset to
5565 represent a bit offset instead of a byte offset.
5566 * value.h (read_value_memory): Adjust comment.
5567
5568 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5569
5570 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
5571 dest_offset_bits and source_offset_bits.
5572 (write_pieced_value): Likewise.
5573
5574 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5575
5576 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
5577 given by DW_OP_bit_piece.
5578 (write_pieced_value): Likewise.
5579
5580 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5581
5582 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
5583 some other preparations to the places where sufficient information
5584 is available.
5585 (write_pieced_value): Likewise.
5586
5587 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5588
5589 * dwarf2loc.c (bits_to_bytes): New function.
5590 (read_pieced_value): Fix offset calculations for register pieces
5591 on big-endian targets.
5592 (write_pieced_value): Likewise.
5593
5594 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5595
5596 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
5597 (write_pieced_value): Likewise.
5598
5599 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5600
5601 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
5602 transfer the source value's least significant bits, instead of its
5603 lowest-addressed ones. Rename type_len to max_offset.
5604 (read_pieced_value): Mirror above changes to write_pieced_value as
5605 applicable.
5606
5607 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5608
5609 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
5610 truncate full bytes from dest_offset_bits before using it as an
5611 offset into the buffer.
5612
5613 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5614
5615 * dwarf2loc.c (write_pieced_value): Include transfer size in
5616 byte-wise check.
5617
5618 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5619
5620 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
5621 calculation of this_size.
5622
5623 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5624
5625 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
5626 when targeting a bit-field.
5627 (write_pieced_value): Likewise.
5628
5629 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5630
5631 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
5632 (allocate_piece_closure): Drop addr_size parameter.
5633 (dwarf2_evaluate_loc_desc_full): Adjust call to
5634 allocate_piece_closure.
5635
5636 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5637
5638 PR gdb/21226
5639 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
5640 the LSB end, independent of endianness.
5641
5642 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5643
5644 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
5645 size capping.
5646
5647 2017-06-13 Yao Qi <yao.qi@linaro.org>
5648
5649 * mips-linux-nat.c: Move include features/mips*-linux.c to
5650 mips-linux-tdep.c.
5651 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
5652 to mips-linux-tdep.c.
5653 * mips-linux-tdep.c: Include features/mips*-linux.c
5654 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
5655 functions.
5656 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
5657 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
5658 (tdesc_mips64_dsp_linux): Declare.
5659
5660 2017-06-12 Tom Tromey <tom@tromey.com>
5661
5662 * valprint.h (val_print_type_code_int): Remove.
5663 * valprint.c (generic_val_print_int): Always call
5664 val_print_scalar_formatted.
5665 (val_print_type_code_int): Remove.
5666 * printcmd.c (print_scalar_formatted): Handle options->format==0.
5667 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
5668 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
5669 * ada-valprint.c (ada_val_print_num): Use
5670 val_print_scalar_formatted.
5671
5672 2017-06-12 Tom Tromey <tom@tromey.com>
5673
5674 * printcmd.c (print_scalar_formatted): Unify the two switches.
5675 Don't convert scalars to LONGEST.
5676
5677 2017-06-12 Tom Tromey <tom@tromey.com>
5678
5679 PR exp/16225:
5680 * valprint.h (print_decimal_chars): Update.
5681 * valprint.c (maybe_negate_by_bytes): New function.
5682 (print_decimal_chars): Add "is_signed" argument.
5683 * printcmd.c (print_scalar_formatted): Update.
5684
5685 2017-06-12 Tom Tromey <tom@tromey.com>
5686
5687 PR exp/16225:
5688 * valprint.h (print_binary_chars, print_hex_chars): Update.
5689 * valprint.c (val_print_type_code_int): Update.
5690 (print_binary_chars): Add "zero_pad" argument.
5691 (emit_octal_digit): New function.
5692 (print_octal_chars): Don't zero-pad.
5693 (print_decimal_chars): Likewise.
5694 (print_hex_chars): Add "zero_pad" argument.
5695 * sh64-tdep.c (sh64_do_fp_register): Update.
5696 * regcache.c (regcache::dump): Update.
5697 * printcmd.c (print_scalar_formatted): Update.
5698 * infcmd.c (default_print_one_register_info): Update.
5699
5700 2017-06-12 Pedro Alves <palves@redhat.com>
5701 Alan Hayward <alan.hayward@arm.com>
5702
5703 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
5704 (mips_eabi_push_dummy_call): Rename local 'regsize' to
5705 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
5706 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
5707 Assert that abi_regsize bytes fit in 'ref_valbuf'.
5708
5709 2017-06-12 Pedro Alves <palves@redhat.com>
5710
5711 * dwarf2read.c (mapped_symtab::data): Now a vector of
5712 symtab_index_entry instead of vector of
5713 std::unique_ptr<symtab_index_entry>. All users adjusted to check
5714 whether an element's name is NULL instead of checking whether the
5715 element itself is NULL.
5716 (find_slot): Change return type. Adjust.
5717 (hash_expand, , add_index_entry, uniquify_cu_indices)
5718 (write_hash_table): Adjust.
5719
5720 2017-06-12 Pedro Alves <palves@redhat.com>
5721
5722 * dwarf2read.c (recursively_count_psymbols): New function.
5723 (write_psymtabs_to_index): Call it to compute number of psyms and
5724 pass estimate size of psyms_seen to unordered_set's ctor.
5725
5726 2017-06-12 Pedro Alves <palves@redhat.com>
5727
5728 * dwarf2read.c (write_hash_table): Check if key already exists
5729 before emplacing.
5730
5731 2017-06-12 Pedro Alves <palves@redhat.com>
5732
5733 * dwarf2read.c (data_buf::append_space): Rename to...
5734 (data_buf::grow): ... this, and make private. Adjust all callers.
5735 (data_buf::append_uint): New method.
5736 (add_address_entry, write_one_signatured_type)
5737 (write_psymtabs_to_index): Use it.
5738
5739 2017-06-12 Pedro Alves <palves@redhat.com>
5740
5741 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
5742 (file_write (FILE *, const std::vector<Elem>&)): Delete.
5743 (data_buf::file_write): Call ::fwrite directly.
5744
5745 2017-06-12 Pedro Alves <palves@redhat.com>
5746
5747 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
5748 std::vector::erase.
5749
5750 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5751
5752 Code cleanup: C++ify .gdb_index producer.
5753 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5754 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5755 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5756 (create_strtab, add_string): Remove.
5757 (file_write, data_buf): New.
5758 (struct symtab_index_entry): Use std::vector for cu_indices.
5759 (struct mapped_symtab): Use std::vector for data.
5760 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5761 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5762 Remove.
5763 (find_slot): Change return type. Update it to the new data structures.
5764 (hash_expand, add_index_entry): Update it to the new data structures.
5765 (offset_type_compare): Remove.
5766 (uniquify_cu_indices): Update it to the new data structures.
5767 (c_str_view, c_str_view_hasher, vector_hasher): New.
5768 (add_indices_to_cpool): Remove.
5769 (write_hash_table): Update it to the new data structures.
5770 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5771 (eq_psymtab_cu_index): Remove.
5772 (psym_index_map): New typedef.
5773 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5774 reference and std::unordered_map for cu_index_htab.
5775 (add_address_entry, add_address_entry_worker, write_address_map)
5776 (write_psymbols): Update it to the new data structures.
5777 (write_obstack): Remove.
5778 (struct signatured_type_index_data): Change types_list to a data_buf
5779 reference and psyms_seen to a std::unordered_set reference.
5780 (write_one_signatured_type, recursively_write_psymbols)
5781 (write_psymtabs_to_index): Update it to the new data structures.
5782
5783 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
5784
5785 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5786 separate-debug-file commands.
5787 * symfile.h (separate_debug_file_debug): New global.
5788 * symfile.c (separate_debug_file_debug): New global.
5789 (separate_debug_file_exists, find_separate_debug_file): Add
5790 debug output.
5791 (_initialize_symfile): Add "set debug separate-debug-file"
5792 command.
5793 * build-id.c (build_id_to_debug_bfd,
5794 find_separate_debug_file_by_buildid): Add debug output.
5795
5796 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5797
5798 * gdbarch.sh (displaced_step_free_closure): Remove.
5799 * gdbarch.h, gdbarch.c: Re-generate.
5800 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5801 displaced_step_free_closure.
5802 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5803 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5804 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5805 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5806 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5807 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5808 * arch-utils.h (simple_displaced_step_free_closure): Remove.
5809 * arch-utils.c (simple_displaced_step_free_closure): Remove.
5810 * infrun.c (displaced_step_clear): Call xfree instead of
5811 gdbarch_displaced_step_free_closure.
5812
5813 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
5814
5815 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5816 NULL".
5817
5818 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5819
5820 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5821 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5822 (mn10300_push_dummy_call): Likewise.
5823
5824 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5825
5826 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5827
5828 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5829
5830 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5831
5832 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5833
5834 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5835 able to start inferiors using a shell.
5836 (New remote packets): Announce new packet "QStartupWithShell".
5837 * remote.c: Add PACKET_QStartupWithShell.
5838 (extended_remote_create_inferior): Handle new
5839 PACKET_QStartupWithShell.
5840 (remote_protocol_features) <QStartupWithShell>: New entry for
5841 PACKET_QStartupWithShell.
5842 (_initialize_remote): Call "add_packet_config_cmd" for
5843 QStartupShell.
5844
5845 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5846 Pedro Alves <palves@redhat.com>
5847
5848 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
5849 and "nat/fork-inferior.h".
5850 * common/common-inferior.h: New file, with contents from
5851 "gdb/inferior.h".
5852 * commom/common-utils.c: Include "common-utils.h".
5853 (stringify_argv): New function.
5854 * common/common-utils.h (stringify_argv): New prototype.
5855 * configure.nat: Add "fork-inferior.o" as a dependency for
5856 "*linux*", "fbsd*" and "nbsd*" hosts.
5857 * corefile.c (get_exec_file): Update comment.
5858 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
5859 instead of "startup_inferior".
5860 (darwin_create_inferior): Call "add_thread_silent" after
5861 "fork_inferior".
5862 * fork-child.c: Cleanup unnecessary includes.
5863 (SHELL_FILE): Move to "common/common-fork-child.c".
5864 (environ): Likewise.
5865 (exec_wrapper): Initialize.
5866 (get_exec_wrapper): New function.
5867 (breakup_args): Move to "common/common-fork-child.c"; rename to
5868 "breakup_args_for_exec".
5869 (escape_bang_in_quoted_argument): Move to
5870 "common/common-fork-child.c".
5871 (saved_ui): New variable.
5872 (prefork_hook): New function.
5873 (postfork_hook): Likewise.
5874 (postfork_child_hook): Likewise.
5875 (gdb_startup_inferior): Likewise.
5876 (fork_inferior): Move to "common/common-fork-child.c". Update
5877 function to support gdbserver.
5878 (startup_inferior): Likewise.
5879 * gdbcore.h (get_exec_file): Remove declaration.
5880 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
5881 instead of "startup_inferior". Call "add_thread_silent" after
5882 "fork_inferior".
5883 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
5884 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
5885 instead of "startup_inferior". Call "add_thread_silent" after
5886 "fork_inferior".
5887 * inferior.h: Include "common-inferior.h".
5888 (trace_start_error): Move to "common/common-utils.h".
5889 (trace_start_error_with_name): Likewise.
5890 (fork_inferior): Move prototype to "nat/fork-inferior.h".
5891 (startup_inferior): Likewise.
5892 (gdb_startup_inferior): New prototype.
5893 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
5894 * nat/fork-inferior.h: New file.
5895 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
5896 instead of "startup_inferior". Call "add_thread_silent" after
5897 "fork_inferior".
5898 * target.h (target_terminal_init): Move prototype to
5899 "target/target.h".
5900 (target_terminal_inferior): Likewise.
5901 (target_terminal_ours): Likewise.
5902 * target/target.h (target_terminal_init): New prototype, moved
5903 from "target.h".
5904 (target_terminal_inferior): Likewise.
5905 (target_terminal_ours): Likewise.
5906 * utils.c (gdb_flush_out_err): New function.
5907
5908 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5909
5910 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
5911 * common/common-gdbthread.h: New file, with parts from
5912 "gdb/gdbthread.h".
5913 * gdbthread.h: Include "common-gdbthread.h".
5914 (switch_to_thread): Moved to "common/common-gdbthread.h".
5915
5916 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5917
5918 * Makefile.in (SFILES): Add "common/job-control.c".
5919 (HFILES_NO_SRCDIR): Add "common/job-control.h".
5920 (COMMON_OBS): Add "job-control.o".
5921 * common/job-control.c: New file, with contents from
5922 "gdb/inflow.c".
5923 * common/job-control.h: New file, with contents from "terminal.h".
5924 * fork-child.c: Include "job-control.h".
5925 * inflow.c: Include "job-control.h".
5926 (gdb_setpgid): Move to "common/common-inflow.c".
5927 (_initialize_inflow): Move setting of "job_control" to
5928 "handle_job_control".
5929 * terminal.h (job_control): Moved to "common/common-terminal.h".
5930 (gdb_setpgid): Likewise.
5931 * top.c: Include "job_control.h".
5932 * utils.c: Likewise.
5933 (job_control): Moved to "job-control.c".
5934
5935 2017-06-07 Pedro Alves <palves@redhat.com>
5936
5937 * Makefile.in (SFILES): Add gdb_regex.c.
5938 (COMMON_OBS): Add gdb_regex.o.
5939 * ada-lang.c (ada_add_standard_exceptions)
5940 (ada_add_exceptions_from_frame, name_matches_regex)
5941 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
5942 parameter type to compiled_regex. Adjust.
5943 (ada_exceptions_list): Use compiled_regex.
5944 * break-catch-throw.c (exception_catchpoint::pattern): Now a
5945 std::unique_ptr<compiled_regex>.
5946 (exception_catchpoint::~exception_catchpoint): Remove regfree
5947 call.
5948 (check_status_exception_catchpoint): Adjust to use compiled_regex.
5949 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
5950 * breakpoint.c (solib_catchpoint::compiled): Now a
5951 std::unique_ptr<compiled_regex>.
5952 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
5953 (check_status_catch_solib): Adjust to use compiled_regex.
5954 (add_solib_catchpoint): Adjust to use compiled_regex.
5955 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
5956 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
5957 compiled_regex reference. Adjust to use it.
5958 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
5959 declaration. Include "gdb_regex.h".
5960 (apropos_cmd): Change regex parameter to compiled_regex reference.
5961 * gdb_regex.c: New file.
5962 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
5963 declarations.
5964 (class compiled_regex): New.
5965 * linux-tdep.c: Include "common/gdb_optional.h".
5966 (struct mapping_regexes): New, factored out from
5967 mapping_is_anonymous_p, and adjusted to use compiled_regex.
5968 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
5969 gdb::optional and remove cleanups. Adjust to compiled_regex.
5970 * probe.c: Include "common/gdb_optional.h".
5971 (collect_probes): Use compiled_regex and gdb::optional and remove
5972 cleanups.
5973 * skip.c: Include "common/gdb_optional.h".
5974 (skiplist_entry::compiled_function_regexp): Now a
5975 gdb::optional<compiled_regex>.
5976 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
5977 (free_skiplist_entry): Remove regfree call.
5978 (compile_skip_regexp, skip_rfunction_p): Adjust to use
5979 compiled_regex and gdb::optional.
5980 * symtab.c: Include "common/gdb_optional.h".
5981 (search_symbols): Use compiled_regex and gdb::optional.
5982 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
5983 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
5984 to gdb_regex.c.
5985
5986 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5987
5988 * regcache.c (regcache::save): Avoid buffer use.
5989 (regcache::dump): Likewise.
5990
5991 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5992
5993 * sh-tdep.c (sh_pseudo_register_read): Remove
5994 MAX_REGISTER_SIZE.
5995 (sh_pseudo_register_write): Likewise.
5996 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
5997 (sh64_pseudo_register_write): Likewise
5998
5999 2017-06-07 Alan Hayward <alan.hayward@arm.com>
6000
6001 * aarch64-tdep.c (aarch64_store_return_value): Use
6002 V_REGISTER_SIZE.
6003 (aarch64_pseudo_read_value): Likewise.
6004 (aarch64_pseudo_write): Likewise.
6005
6006 2017-06-06 Yao Qi <yao.qi@linaro.org>
6007
6008 * regformats/regdef.h (set_register_cache): Remove the
6009 declaration.
6010
6011 2017-06-06 Alan Hayward <alan.hayward@arm.com>
6012
6013 * frame.c (frame_unwind_register_signed): Use
6014 frame_unwind_register_value.
6015
6016 2017-06-06 Pedro Alves <palves@redhat.com>
6017
6018 PR breakpoints/21553
6019 * breakpoint.c (create_breakpoints_sal_default)
6020 (init_breakpoint_sal, create_breakpoint_sal): Use
6021 gdb::unique_xmalloc_ptr for string parameters.
6022 (create_breakpoint): Constify 'extra_string' and 'cond_string'
6023 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
6024 (base_breakpoint_create_breakpoints_sal)
6025 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
6026 (strace_marker_create_breakpoints_sal)
6027 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
6028 string parameters.
6029 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
6030 gdb::unique_xmalloc_ptr for string parameters.
6031 (create_breakpoint): Constify 'extra_string' and 'cond_string'
6032 parameters.
6033
6034 2017-06-06 Alan Hayward <alan.hayward@arm.com>
6035
6036 * alpha-tdep.c (alpha_register_to_value): Use
6037 get_frame_register_value.
6038 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
6039
6040 2017-06-06 Alan Hayward <alan.hayward@arm.com>
6041
6042 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
6043 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
6044 (ia64_value_to_register): Likewise.
6045 (ia64_extract_return_value): Likewise.
6046 (ia64_store_return_value): Likewise.
6047 (ia64_push_dummy_call): Likewise.
6048
6049 2017-06-04 Joel Brobecker <brobecker@adacore.com>
6050
6051 GDB 8.0 released.
6052
6053 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
6054
6055 * x86-linux-nat.c (struct arch_lwp_info): Remove.
6056
6057 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
6058
6059 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
6060 parameter.
6061 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
6062
6063 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
6064
6065 * event-loop.c (poll_timers): Unallocate timer using delete
6066 instead of xfree.
6067
6068 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6069
6070 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
6071 (struct breakpoint) <~breakpoint>: New.
6072 (struct watchpoint): Inherit from breakpoint.
6073 <~watchpoint>: New.
6074 <base>: Remove.
6075 (struct tracepoint): Inherit from breakpoint.
6076 <base>: Remove.
6077 * breakpoint.c (longjmp_breakpoint_ops): Remove.
6078 (struct longjmp_breakpoint): Inherit from breakpoint.
6079 <~longjmp_breakpoint>: New.
6080 <base>: Remove.
6081 (new_breakpoint_from_type): Remove casts.
6082 (watchpoint_in_thread_scope): Remove reference to base field.
6083 (watchpoint_del_at_next_stop): Likewise.
6084 (update_watchpoint): Likewise.
6085 (watchpoint_check): Likewise.
6086 (bpstat_check_watchpoint): Likewise.
6087 (set_longjmp_breakpoint): Likewise.
6088 (struct fork_catchpoint): Inherit from breakpoint.
6089 <base>: Remove.
6090 (struct solib_catchpoint): Inherit from breakpoint.
6091 <~solib_catchpoint>: New.
6092 <base>: Remove.
6093 (dtor_catch_solib): Change to ...
6094 (solib_catchpoint::~solib_catchpoint): ... this.
6095 (breakpoint_hit_catch_solib): Remove reference to base field.
6096 (add_solib_catchpoint): Likewise.
6097 (create_fork_vfork_event_catchpoint): Likewise.
6098 (struct exec_catchpoint): Inherit from breakpoint.
6099 <~exec_catchpoint>: New.
6100 <base>: Remove.
6101 (dtor_catch_exec): Change to ...
6102 (exec_catchpoint::~exec_catchpoint): ... this.
6103 (dtor_watchpoint): Change to ...
6104 (watchpoint::~watchpoint): ... this.
6105 (watch_command_1): Remove reference to base field.
6106 (catch_exec_command_1): Likewise.
6107 (base_breakpoint_dtor): Change to ...
6108 (breakpoint::~breakpoint): ... this.
6109 (base_breakpoint_ops): Remove dtor field value.
6110 (longjmp_bkpt_dtor): Change to ...
6111 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
6112 (strace_marker_create_breakpoints_sal): Remove reference to base
6113 field.
6114 (delete_breakpoint): Don't manually call breakpoint destructor.
6115 (create_tracepoint_from_upload): Remove reference to base field.
6116 (trace_pass_set_count): Likewise.
6117 (initialize_breakpoint_ops): Don't initialize
6118 momentary_breakpoint_ops, don't set dtors.
6119 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6120 <~ada_catchpoint>: New.
6121 <base>: Remove.
6122 (create_excep_cond_exprs): Remove reference to base field.
6123 (dtor_exception): Change to ...
6124 (ada_catchpoint::~ada_catchpoint): ... this.
6125 (dtor_catch_exception): Remove.
6126 (dtor_catch_exception_unhandled): Remove.
6127 (dtor_catch_assert): Remove.
6128 (create_ada_exception_catchpoint): Remove reference to base
6129 field.
6130 (initialize_ada_catchpoint_ops): Don't set dtors.
6131 * break-catch-sig.c (struct signal_catchpoint): Inherit from
6132 breakpoint.
6133 <~signal_catchpoint>: New.
6134 <base>: Remove.
6135 (signal_catchpoint_dtor): Change to ...
6136 (signal_catchpoint::~signal_catchpoint): ... this.
6137 (create_signal_catchpoint): Remove reference to base field.
6138 (initialize_signal_catchpoint_ops): Don't set dtor.
6139 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6140 from breakpoint.
6141 <~syscall_catchpoint>: New.
6142 <base>: Remove.
6143 (dtor_catch_syscall): Change to ...
6144 (syscall_catchpoint::~syscall_catchpoint): ... this.
6145 (create_syscall_event_catchpoint): Remove reference to base
6146 field.
6147 (initialize_syscall_catchpoint_ops): Don't set dtor.
6148 * break-catch-throw.c (struct exception_catchpoint): Inherit
6149 from breakpoint.
6150 <~exception_catchpoint>: New.
6151 <base>: Remove.
6152 (dtor_exception_catchpoint): Change to ...
6153 (exception_catchpoint::~exception_catchpoint): ... this.
6154 (handle_gnu_v3_exceptions): Remove reference to base field.
6155 (initialize_throw_catchpoint_ops): Don't set dtor.
6156 * ctf.c (ctf_get_traceframe_address): Remove reference to base
6157 field.
6158 * remote.c (remote_get_tracepoint_status): Likewise.
6159 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6160 * tracefile.c (tracefile_fetch_registers): Likewise.
6161 * tracepoint.c (actions_command): Likewise.
6162 (validate_actionline): Likewise.
6163 (tfind_1): Likewise.
6164 (get_traceframe_location): Likewise.
6165 (find_matching_tracepoint_location): Likewise.
6166 (parse_tracepoint_status): Likewise.
6167 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6168
6169 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6170
6171 * breakpoint.c (struct longjmp_breakpoint): New struct.
6172 (is_tracepoint_type): Change return type to bool.
6173 (is_longjmp_type): New function.
6174 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6175 (set_raw_breakpoint_without_location): Use
6176 new_breakpoint_from_type.
6177 (set_raw_breakpoint): Likewise.
6178
6179 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6180
6181 * breakpoint.c (new_breakpoint_from_type): New function.
6182 (create_breakpoint_sal): Use new_breakpoint_from_type and
6183 unique_ptr.
6184 (create_breakpoint): Likewise.
6185
6186 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
6187
6188 * memattr.c (mem_info_command): Rename to ...
6189 (info_mem_command): ... this.
6190 (mem_enable_command): Rename to ...
6191 (enable_mem_command): ... this.
6192 (mem_disable_command): Rename to ...
6193 (disable_mem_command): ... this.
6194 (mem_delete_command): Rename to ...
6195 (delete_mem_command): ... this.
6196 (_initialize_mem): Adjust function names.
6197
6198 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6199
6200 * btrace.c (handle_pt_insn_events): New.
6201 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
6202 STATUS. Split into this and ...
6203 (handle_pt_insn_event_flags): ... this.
6204
6205 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6206
6207 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
6208 and struct pt_insn.resynced.
6209 * configure: Regenerated.
6210 * config.in: Regenerated.
6211
6212 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6213
6214 * btrace.c (ftrace_find_call_by_number): New function.
6215 (ftrace_new_function): Store objects, not pointers.
6216 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
6217 ftrace_new_gap, ftrace_update_function,
6218 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
6219 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
6220 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
6221 btrace_ends_with_single_insn, btrace_call_get): Account for
6222 btrace_thread_info::functions now storing objects.
6223 * btrace.h (struct btrace_thread_info): Add constructor.
6224 (struct btrace_thread_info) <functions>: Make std::vector.
6225 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
6226 Initialize with default values.
6227 * record-btrace.c (record_btrace_frame_sniffer): Account for
6228 btrace_thread_info::functions now storing objects.
6229
6230 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6231
6232 * btrace.c: Remove typedef bfun_s.
6233 (ftrace_new_gap): Directly add gaps to the list of gaps.
6234 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
6235 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
6236 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
6237 instead of gdb VEC.
6238
6239 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6240
6241 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
6242 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
6243 with btrace_thread_info::next_segment and
6244 btrace_thread_info::prev_segment.
6245 * btrace.h: Remove struct btrace_func_link.
6246 (struct btrace_function): Replace pair of function segment pointers
6247 with pair of indices.
6248 * python/py-record-btrace.c (btpy_call_prev_sibling,
6249 btpy_call_next_sibling): Replace references to
6250 btrace_thread_info::segment with btrace_thread_info::next_segment and
6251 btrace_thread_info::prev_segment.
6252 * record-btrace.c (record_btrace_frame_this_id): Use
6253 btrace_find_call_by_number.
6254
6255 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6256
6257 * btrace.c (ftrace_new_function, ftrace_fixup_level,
6258 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6259 btrace_insn_next, btrace_insn_prev): Remove references to
6260 btrace_thread_info::flow.
6261 * btrace.h (struct btrace_function): Remove FLOW.
6262
6263 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6264
6265 * btrace.c (ftrace_find_call_by_number): New function.
6266 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6267 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6268 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6269 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6270 index.
6271 * btrace.h (struct btrace_function): Turn UP into an index.
6272 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6273 as an index.
6274 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6275 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6276 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6277
6278 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6279
6280 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6281 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6282 ftrace_update_function, ftrace_compute_global_level_offset,
6283 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6284 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6285 btrace_insn_end, btrace_is_empty): Remove references to
6286 btrace_thread_info::begin and btrace_thread_info::end.
6287 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6288 (struct btrace_thread_info) <functions>: Adjust comment.
6289 * record-btrace.c (record_btrace_start_replaying): Remove reference to
6290 btrace_thread_info::begin.
6291
6292 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6293
6294 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6295 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6296 ftrace_update_function): Remove arguments that implicitly were always
6297 BTINFO->END.
6298 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6299 Don't pass BTINFO->END.
6300
6301 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6302
6303 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6304 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6305 btrace_find_insn_by_number): Replace function segment pointer with
6306 index.
6307 (btrace_insn_cmp): Simplify.
6308 * btrace.h: (struct btrace_insn_iterator) Rename index to
6309 insn_index. Replace function segment pointer with index into function
6310 segment vector.
6311 * record-btrace.c (record_btrace_call_history): Replace function
6312 segment pointer use with index.
6313 (record_btrace_frame_sniffer): Retrieve function call segment through
6314 vector.
6315 (record_btrace_set_replay): Remove defunc't safety check.
6316
6317 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6318
6319 * btrace.c (btrace_ends_with_single_insn): New function.
6320 (btrace_call_get, btrace_call_number, btrace_call_begin,
6321 btrace_call_end, btrace_call_next, btrace_call_prev,
6322 btrace_find_call_by_number): Use index into call segment vector
6323 instead of pointer.
6324 (btrace_call_cmp): Simplify.
6325 * btrace.h (struct btrace_call_iterator): Replace function call segment
6326 pointer with index into vector.
6327 * record-btrace.c (record_btrace_call_history): Use index instead of
6328 pointer.
6329
6330 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6331
6332 * btrace.c (btrace_insn_begin, btrace_insn_end,
6333 btrace_find_insn_by_number): Add btinfo to iterator.
6334 * btrace.h (struct btrace_insn_iterator): Add btinfo.
6335
6336 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6337
6338 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
6339 and save pointers directly.
6340 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
6341 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
6342 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
6343 changed signature of functions.
6344 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
6345 (btrace_fetch): Remove code that adds btrace_function pointers to
6346 vector of btrace_functions.
6347 (btrace_clear): Simplify freeing vector of btrace_functions.
6348
6349 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6350
6351 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
6352 Replace VEC_* with std::vector functions.
6353 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
6354 (struct btrace_thread_info)<functions>: Change type to std::vector.
6355
6356 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
6357
6358 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
6359 "Removed targets and native configurations" up. Merge duplicate
6360 "New commands" sub-sections. Add "New options" sub-sections.
6361
6362 2017-05-26 Alan Hayward <alan.hayward@arm.com>
6363
6364 * defs.h (copy_integer_to_size): New declaration.
6365 * findvar.c (copy_integer_to_size): New function.
6366 (do_cint_test): New selftest function.
6367 (copy_integer_to_size_test): Likewise.
6368 (_initialize_findvar): Likewise.
6369 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
6370 (mips_fbsd_collect_reg): Use raw_collect_integer.
6371 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
6372 (mips64_fill_gregset): Use raw_collect_integer
6373 (mips64_fill_fpregset): Use raw_supply_integer.
6374 * regcache.c (regcache::raw_supply_integer): New function.
6375 (regcache::raw_collect_integer): Likewise.
6376 * regcache.h: (regcache::raw_supply_integer): New declaration.
6377 (regcache::raw_collect_integer): Likewise.
6378
6379 2017-05-24 Yao Qi <yao.qi@linaro.org>
6380
6381 * Makefile.in (SFILES): Add gdbarch-selftests.c.
6382 (COMMON_OBS): Add gdbarch-selftests.o.
6383 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
6384 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
6385 * gdbarch-selftests.c: New file.
6386 * regcache.h (regcache) <~regcache>: Mark it virtual if
6387 GDB_SELF_TEST.
6388 <raw_write>: Likewise.
6389
6390 2017-05-24 Yao Qi <yao.qi@linaro.org>
6391
6392 * regcache.c (current_regcache): Change it to
6393 regcache::current_regcache.
6394 (regcache_observer_target_changed): Update.
6395 (regcache_thread_ptid_changed): Make it a regcache static
6396 method.
6397 (regcache_thread_ptid_changed): Update.
6398 (class regcache_access): New.
6399 (current_regcache_test): Update.
6400 (_initialize_regcache): Update.
6401 * regcache.h: Include forward_list.
6402 (regcache): Declare regcache_thread_ptid_changed and declare
6403 registers_changed_ptid as friend.
6404
6405 2017-05-24 Yao Qi <yao.qi@linaro.org>
6406
6407 * i387-tdep.c (i387_register_to_value): Use register_size
6408 instead of TYPE_LENGTH.
6409 * m68k-tdep.c (m68k_register_to_value): Likewise.
6410
6411 2017-05-24 Yao Qi <yao.qi@linaro.org>
6412
6413 * i387-tdep.c (i387_convert_register_p): Return false if type
6414 code isn't TYPE_CODE_FLT.
6415
6416 2017-05-24 Yao Qi <yao.qi@linaro.org>
6417
6418 * alpha-tdep.c (alpha_convert_register_p): Return true if type
6419 length is 4.
6420 (alpha_register_to_value): Remove type length check.
6421 (alpha_value_to_register): Likewise.
6422
6423 2017-05-24 Yao Qi <yao.qi@linaro.org>
6424
6425 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
6426 TYPE_CODE_FLT.
6427
6428 2017-05-24 Yao Qi <yao.qi@linaro.org>
6429
6430 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
6431 TYPE_CODE_FLT or not.
6432
6433 2017-05-24 Yao Qi <yao.qi@linaro.org>
6434
6435 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
6436 * avr-tdep.c (avr_gdbarch_init): Likewise.
6437 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6438 * cris-tdep.c (cris_gdbarch_init): Likewise.
6439 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6440 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6441 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6442 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
6443 * mep-tdep.c (mep_gdbarch_init): Likewise.
6444 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6445 * mips-tdep.c (mips_gdbarch_init): Likewise.
6446 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6447 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6448 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6449 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6450 * v850-tdep.c (v850_gdbarch_init): Likewise.
6451
6452 2017-05-24 Yao Qi <yao.qi@linaro.org>
6453
6454 * selftest-arch.c (tests_with_arch): Call registers_changed
6455 and reinit_frame_cache.
6456 * selftest.c (run_self_tests): Likewise.
6457
6458 2017-05-24 Yao Qi <yao.qi@linaro.org>
6459
6460 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
6461 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
6462
6463 2017-05-24 Yao Qi <yao.qi@linaro.org>
6464
6465 * rl78-tdep.c (rl78_gdbarch_init): Don't call
6466 set_gdbarch_print_insn.
6467
6468 2017-05-24 Yao Qi <yao.qi@linaro.org>
6469
6470 * h8300-tdep.c (h8300_gdbarch_init): Don't call
6471 set_gdbarch_print_insn.
6472
6473 2017-05-24 Yao Qi <yao.qi@linaro.org>
6474
6475 * alpha-tdep.c (alpha_gdbarch_init): Don't call
6476 set_gdbarch_print_insn.
6477 * arc-tdep.c (arc_gdbarch_init): Likewise.
6478 * arch-utils.c: include dis-asm.h.
6479 (default_print_insn): New function.
6480 * arch-utils.h (default_print_insn): Declare.
6481 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
6482 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6483 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
6484 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
6485 * frv-tdep.c (frv_gdbarch_init): Likewise.
6486 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6487 * gdbarch.sh (print_insn): Use default_print_insn.
6488 * gdbarch.c: Regenerated.
6489 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
6490 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
6491 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6492 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
6493 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6494 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
6495 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
6496 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
6497 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
6498 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6499 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6500 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6501 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6502 * mt-tdep.c (mt_gdbarch_init): Likewise.
6503 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6504 * nios2-tdep.c (nios2_print_insn): Remove.
6505 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
6506 * rx-tdep.c (rx_gdbarch_init): Likewise.
6507 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6508 * score-tdep.c (score_print_insn): Remove.
6509 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
6510 * sh-tdep.c (sh_gdbarch_init): Likewise.
6511 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6512 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6513 * tic6x-tdep.c (tic6x_print_insn): Remove.
6514 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
6515 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
6516 * v850-tdep.c (v850_gdbarch_init): Likewise.
6517 * vax-tdep.c (vax_gdbarch_init): Likewise.
6518 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6519 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
6520
6521 2017-05-23 John Baldwin <jhb@FreeBSD.org>
6522
6523 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
6524 (MIPS_FP0_REGNUM): Remove.
6525 (MIPS_FSR_REGNUM): Remove.
6526 (mips_fbsd_supply_fpregs): Use mips_regnum.
6527 (mips_fbsd_supply_gregs): Likewise.
6528 (mips_fbsd_collect_fpregs): Likewise.
6529 (mips_fbsd_collect_gregs): Likewise.
6530
6531 2017-05-23 John Baldwin <jhb@FreeBSD.org>
6532
6533 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
6534 (getpfpregs_supplies): New function.
6535 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
6536 getfpregs_supplies.
6537 (mips_fbsd_store_inferior_registers): Likewise.
6538
6539 2017-05-22 Pedro Alves <palves@redhat.com>
6540
6541 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
6542 maintainer.
6543
6544 2017-05-22 Alan Hayward <alan.hayward@arm.com>
6545
6546 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
6547 (store_register): Likewise.
6548 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
6549 (get_decimal_float_return_value): Likewise.
6550 (do_ppc_sysv_return_value): Likewise.
6551 (ppc64_sysv_abi_push_integer): Likewise.
6552 (ppc64_sysv_abi_push_freg): Likewise.
6553 (ppc64_sysv_abi_return_value_base): Likewise.
6554 (ppc64_sysv_abi_return_value): Likewise.
6555 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
6556 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
6557 * rs6000-nat.c: Likewise.
6558 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
6559 (rs6000_value_to_register): Likewise.
6560 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
6561
6562 2017-05-21 Tom Tromey <tom@tromey.com>
6563
6564 PR rust/21466:
6565 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
6566 arrays as "[T]", not "[T; ]".
6567
6568 2017-05-19 Tom Tromey <tom@tromey.com>
6569
6570 PR rust/21484:
6571 * rust-lang.c (exp_descriptor_rust): New function.
6572 (rust_language_defn): Use it.
6573 * p-lang.c (pascal_language_defn): Update.
6574 * opencl-lang.c (opencl_language_defn): Update.
6575 * objc-lang.c (objc_language_defn): Update.
6576 * m2-lang.c (m2_language_defn): Update.
6577 * language.h (struct language_defn)
6578 <la_watch_location_expression>: New member.
6579 * language.c (unknown_language_defn, auto_language_defn)
6580 (local_language_defn): Update.
6581 * go-lang.c (go_language_defn): Update.
6582 * f-lang.c (f_language_defn): Update.
6583 * d-lang.c (d_language_defn): Update.
6584 * c-lang.h (c_watch_location_expression): Declare.
6585 * c-lang.c (c_watch_location_expression): New function.
6586 (c_language_defn, cplus_language_defn, asm_language_defn)
6587 (minimal_language_defn): Use it.
6588 * breakpoint.c (watch_command_1): Call
6589 la_watch_location_expression.
6590 * ada-lang.c (ada_language_defn): Update.
6591
6592 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6593
6594 PR tui/21482
6595 * gdb_curses.h (NOMACROS): Define.
6596 (NCURSES_NOMACROS): Define.
6597
6598 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6599
6600 PR tui/21482
6601 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
6602 arg to char *.
6603 * tui/tui-wingeneral.c (box_win): Likewise.
6604 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
6605 (tui_show_source_line): Likewise.
6606 (tui_show_exec_info_content): Likewise.
6607
6608 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6609
6610 * sparc-tdep.c (sparc_structure_return_p)
6611 (sparc_arg_on_registers_p): New functions.
6612 (sparc32_store_arguments): Use them.
6613 * sparc64-tdep.c (sparc64_16_byte_align_p)
6614 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
6615 Handle TYPE_CODE_ARRAY.
6616
6617 2017-05-17 Yao Qi <yao.qi@linaro.org>
6618
6619 * cli/cli-decode.c (add_alias_cmd): New function.
6620 * command.h (add_alias_cmd): Declare.
6621 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
6622 instead call add_alias_cmd.
6623
6624 2017-05-17 Pedro Alves <palves@redhat.com>
6625
6626 * Makefile.in (nat_extra_makefile_frag): Rename to ...
6627 (nat_makefile_frag): ... this. All references updated.
6628 * configure.ac: Likewise.
6629 * configure.nat: Likewise. Enhance comments.
6630 * configure: Regenerate.
6631
6632 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6633
6634 * procfs.c (procfs_create_inferior): Change prototype to match
6635 definition.
6636
6637 2017-05-13 Eli Zaretskii <eliz@gnu.org>
6638
6639 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
6640 C++ compiler warning.
6641
6642 2017-05-12 Tom Tromey <tom@tromey.com>
6643
6644 PR rust/21483:
6645 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
6646 recurse, just call value_struct_elt directly.
6647
6648 2017-05-12 Tom Tromey <tom@tromey.com>
6649
6650 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
6651 OP_RUST_ARRAY>: Fix.
6652
6653 2017-05-12 Tom Tromey <tom@tromey.com>
6654
6655 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
6656
6657 2017-05-09 Yao Qi <yao.qi@linaro.org>
6658
6659 * regcache.c: Include <forward_list>.
6660 (struct regcache_list): Remove.
6661 (current_regcache): Update.
6662 (get_thread_arch_aspace_regcache): Update for std::forward_list.
6663 (regcache_thread_ptid_changed): Likewise.
6664 (registers_changed_ptid): Likewise.
6665 (current_regcache_size): Likewise.
6666
6667 2017-05-09 Yao Qi <yao.qi@linaro.org>
6668
6669 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
6670 (current_regcache_size): New function.
6671 (current_regcache_test): New function.
6672 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
6673
6674 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6675
6676 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
6677 (print_gp_register_row): Use get_frame_register_value.
6678
6679 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6680
6681 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
6682 (mips_supply_fpregset): Likewise.
6683 (mips64_supply_gregset): Likewise.
6684
6685 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6686
6687 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
6688 regcache->raw_supply_zeroed.
6689
6690 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6691
6692 * configure.nat: Rearrange 'case' statements to match
6693 host before cpu.
6694
6695 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6696
6697 * Makefile.in: Remove "@host_makefile_frag@". Add variables
6698 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
6699 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
6700 "@nat_extra_makefile_frag@".
6701 (Makefile): Remove dependency on "@frags@".
6702 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
6703 (data-directory/Makefile): Likewise.
6704 * config/aarch64/linux.mh: Deleted; moved contents to
6705 "gdb/configure.nat".
6706 * config/alpha/alpha-linux.mh: Likewise.
6707 * config/alpha/nbsd.mh: Likewise.
6708 * config/arm/linux.mh: Likewise.
6709 * config/arm/nbsdelf.mh: Likewise.
6710 * config/i386/cygwin.mh: Likewise.
6711 * config/i386/cygwin64.mh: Likewise.
6712 * config/i386/darwin.mh: Likewise.
6713 * config/i386/fbsd.mh: Likewise.
6714 * config/i386/fbsd64.mh: Likewise.
6715 * config/i386/go32.mh: Likewise.
6716 * config/i386/i386gnu.mh: Likewise.
6717 * config/i386/i386sol2.mh: Likewise.
6718 * config/i386/linux.mh: Likewise.
6719 * config/i386/linux64.mh: Likewise.
6720 * config/i386/mingw.mh: Likewise.
6721 * config/i386/mingw64.mh: Likewise.
6722 * config/i386/nbsd64.mh: Likewise.
6723 * config/i386/nbsdelf.mh: Likewise.
6724 * config/i386/nto.mh: Likewise.
6725 * config/i386/obsd.mh: Likewise.
6726 * config/i386/obsd64.mh: Likewise.
6727 * config/i386/sol2-64.mh: Likewise.
6728 * config/ia64/linux.mh: Likewise.
6729 * config/m32r/linux.mh: Likewise.
6730 * config/m68k/linux.mh: Likewise.
6731 * config/m68k/nbsdelf.mh: Likewise.
6732 * config/m68k/obsd.mh: Likewise.
6733 * config/m88k/obsd.mh: Likewise.
6734 * config/mips/fbsd.mh: Likewise.
6735 * config/mips/linux.mh: Likewise.
6736 * config/mips/nbsd.mh: Likewise.
6737 * config/mips/obsd64.mh: Likewise.
6738 * config/pa/linux.mh: Likewise.
6739 * config/pa/nbsd.mh: Likewise.
6740 * config/pa/obsd.mh: Likewise.
6741 * config/powerpc/aix.mh: Likewise.
6742 * config/powerpc/fbsd.mh: Likewise.
6743 * config/powerpc/linux.mh: Likewise.
6744 * config/powerpc/nbsd.mh: Likewise.
6745 * config/powerpc/obsd.mh: Likewise.
6746 * config/powerpc/ppc64-linux.mh: Likewise.
6747 * config/powerpc/spu-linux.mh: Likewise.
6748 * config/s390/linux.mh: Likewise.
6749 * config/sh/nbsd.mh: Likewise.
6750 * config/sparc/fbsd.mh: Likewise.
6751 * config/sparc/linux.mh: Likewise.
6752 * config/sparc/linux64.mh: Likewise.
6753 * config/sparc/nbsd64.mh: Likewise.
6754 * config/sparc/nbsdelf.mh: Likewise.
6755 * config/sparc/obsd64.mh: Likewise.
6756 * config/sparc/sol2.mh: Likewise.
6757 * config/tilegx/linux.mh: Likewise.
6758 * config/vax/nbsdelf.mh: Likewise.
6759 * config/vax/obsd.mh: Likewise.
6760 * config/xtensa/linux.mh: Likewise.
6761 * config/i386/i386gnu.mn: New file, with excerpts from
6762 "config/i386/i386gnu.mh".
6763 * configure: Regenerate.
6764 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6765 *.mh files under "gdb/config".
6766 * configure.nat: New file, with contents from the
6767 "gdb/config/*/*.mh" files.
6768
6769 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
6770
6771 * btrace.c (btrace_clear): Free insn vector.
6772
6773 2017-05-05 Pedro Alves <palves@redhat.com>
6774
6775 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6776 * configure: Regenerate.
6777
6778 2017-05-04 Pedro Alves <palves@redhat.com>
6779
6780 * Makefile.in (SFILES): Add progspace-and-thread.c.
6781 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6782 (COMMON_OBS): Add progspace-and-thread.o.
6783 * breakpoint.c: Include "progspace-and-thread.h".
6784 (update_inserted_breakpoint_locations)
6785 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6786 Use scoped_restore_current_pspace_and_thread.
6787 (create_std_terminate_master_breakpoint): Use
6788 scoped_restore_current_program_space.
6789 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6790 (print_breakpoint_location): Use
6791 scoped_restore_current_program_space.
6792 (bp_loc_is_permanent): Use
6793 scoped_restore_current_pspace_and_thread.
6794 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6795 (download_tracepoint_locations): Use
6796 scoped_restore_current_pspace_and_thread.
6797 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6798 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6799 (enum step_over_calls_kind): Moved from inferior.h.
6800 (class scoped_restore_current_thread): New class.
6801 * gdbthread.h (make_cleanup_restore_current_thread): Delete
6802 declaration.
6803 (scoped_restore_current_thread): New class.
6804 * infcmd.c: Include "common/gdb_optional.h".
6805 (continue_1, proceed_after_attach): Use
6806 scoped_restore_current_thread.
6807 (notice_new_inferior): Use scoped_restore_current_thread.
6808 * inferior.c: Include "progspace-and-thread.h".
6809 (restore_inferior, save_current_inferior): Delete.
6810 (add_inferior_command, clone_inferior_command): Use
6811 scoped_restore_current_pspace_and_thread.
6812 * inferior.h (scoped_restore_current_inferior): New class.
6813 * infrun.c: Include "progspace-and-thread.h" and
6814 "common/gdb_optional.h".
6815 (follow_fork_inferior): Use
6816 scoped_restore_current_pspace_and_thread.
6817 (scoped_restore_exited_inferior): New class.
6818 (handle_vfork_child_exec_or_exit): Use
6819 scoped_restore_exited_inferior,
6820 scoped_restore_current_pspace_and_thread,
6821 scoped_restore_current_thread and scoped_restore.
6822 (fetch_inferior_event): Use scoped_restore_current_thread.
6823 * linespec.c (decode_line_full, decode_line_1): Use
6824 scoped_restore_current_program_space.
6825 * mi/mi-main.c: Include "progspace-and-thread.h".
6826 (exec_continue): Use scoped_restore_current_thread.
6827 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6828 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6829 * proc-service.c (ps_pglobal_lookup): Use
6830 scoped_restore_current_program_space.
6831 * progspace-and-thread.c: New file.
6832 * progspace-and-thread.h: New file.
6833 * progspace.c (release_program_space, clone_program_space): Use
6834 scoped_restore_current_program_space.
6835 (restore_program_space, save_current_program_space)
6836 (save_current_space_and_thread): Delete.
6837 (switch_to_program_space_and_thread): Moved to
6838 progspace-and-thread.c.
6839 * progspace.h (save_current_program_space)
6840 (save_current_space_and_thread): Delete declarations.
6841 (scoped_restore_current_program_space): New class.
6842 * remote.c (remote_btrace_maybe_reopen): Use
6843 scoped_restore_current_thread.
6844 * symtab.c: Include "progspace-and-thread.h".
6845 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
6846 * thread.c (print_thread_info_1): Use
6847 scoped_restore_current_thread.
6848 (struct current_thread_cleanup): Delete.
6849 (do_restore_current_thread_cleanup)
6850 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
6851 (scoped_restore_current_thread::~scoped_restore_current_thread):
6852 ... this new dtor.
6853 (make_cleanup_restore_current_thread): Rename/convert to ...
6854 (scoped_restore_current_thread::scoped_restore_current_thread):
6855 ... this new ctor.
6856 (thread_apply_all_command): Use scoped_restore_current_thread.
6857 (thread_apply_command): Use scoped_restore_current_thread.
6858 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
6859 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
6860
6861 2017-05-04 Pedro Alves <palves@redhat.com>
6862
6863 * thread.c (make_cleanup_restore_current_thread): Move
6864 find_thread_ptid call before the is_stopped call. Assert that the
6865 thread is found. Replace is_stopped call by checking the thread's
6866 state directly. Remove unnecessary NULL-thread check.
6867
6868 2017-05-04 Pedro Alves <palves@redhat.com>
6869
6870 * corelow.c (thread_section_name): New class.
6871 (get_core_register_section, get_core_siginfo): Use it.
6872
6873 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
6874
6875 * corelow.c (sniff_core_bfd): Remove extra semicolon.
6876 (get_core_register_section): Remove xfree of NULL pointer.
6877
6878 2017-05-03 Alan Hayward <alan.hayward@arm.com>
6879
6880 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
6881 * regcache.c (regcache::raw_supply_zeroed): New function.
6882 * regcache.h (regcache::raw_supply_zeroed): New declaration.
6883
6884 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
6885
6886 * gdbarch.sh: Remove commented out definition of
6887 TARGET_CHAR_BIT.
6888 * gdbarch.h: Re-generate.
6889
6890 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6891
6892 * configure: Regenerate.
6893
6894 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
6895
6896 * solib-target.c (solib_target_relocate_section_addresses):
6897 Remove num_section_bases, num_bases, segment_bases variables.
6898
6899 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6900
6901 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
6902
6903 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6904
6905 * solib-target.c: Include <vector>
6906 (struct lm_info_target) <~lm_info_target>: Remove.
6907 <segment_bases, section_bases>: Change type to
6908 std::vector<CORE_ADDR>.
6909 (library_list_start_segment, library_list_start_section,
6910 library_list_end_library,
6911 solib_target_relocate_section_addresses): Adjust.
6912
6913 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6914
6915 * gdbarch.sh (software_single_step): Change return type to
6916 std::vector<CORE_ADDR>.
6917 * gdbarch.c, gdbarch.h: Re-generate.
6918 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
6919 Adjust.
6920 (arm_deal_with_atomic_sequence_raw): Adjust.
6921 (thumb_get_next_pcs_raw): Adjust.
6922 (arm_get_next_pcs_raw): Adjust.
6923 (arm_get_next_pcs): Adjust.
6924 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
6925 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
6926 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
6927 (alpha_software_single_step): Adjust.
6928 * alpha-tdep.h (alpha_software_single_step): Adjust.
6929 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
6930 * arm-tdep.c (arm_software_single_step): Adjust.
6931 (arm_breakpoint_kind_from_current_state): Adjust.
6932 * arm-tdep.h (arm_software_single_step): Adjust.
6933 * breakpoint.c (insert_single_step_breakpoint): Adjust.
6934 * cris-tdep.c (cris_software_single_step): Adjust.
6935 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
6936 (micromips_deal_with_atomic_sequence): Adjust.
6937 (deal_with_atomic_sequence): Adjust.
6938 (mips_software_single_step): Adjust.
6939 * mips-tdep.h (mips_software_single_step): Adjust.
6940 * moxie-tdep.c (moxie_software_single_step): Adjust.
6941 * nios2-tdep.c (nios2_software_single_step): Adjust.
6942 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
6943 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
6944 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
6945 * s390-linux-tdep.c (s390_software_single_step): Adjust.
6946 * sparc-tdep.c (sparc_software_single_step): Adjust.
6947 * spu-tdep.c (spu_software_single_step): Adjust.
6948 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
6949
6950 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6951
6952 * gdbarch.sh: Use semi-colon as field separator instead of colon.
6953 * gdbarch.h: Re-generate.
6954
6955 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6956
6957 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
6958 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
6959 * python/py-instruction.c, python/py-instruction.h: New file.
6960 * python/py-record.c: Add py-instruction.h include.
6961 (gdbpy_initialize_record): Make gdb.Instruction a super class of
6962 gdb.RecordInstruction.
6963 * python/python-internal.h: Add gdbpy_initialize_instruction
6964 declaration.
6965 * python/python.c (do_start_initialization): Add
6966 gdbpy_initialize_instruction.
6967
6968 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6969
6970 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
6971 Remove.
6972 (btrace_func_from_recpy_func): New function.
6973 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
6974 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
6975 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
6976 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
6977 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
6978 Also, use new helper functions.
6979 (btpy_list_item): Use new helper functions.
6980 (recpy_bt_function_call_history): Use new type name.
6981 (btpy_call_getset): Remove.
6982 (gdbpy_initialize_btrace): Remove code to initialize
6983 gdb.BtraceFunctionCall.
6984 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
6985 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
6986 recpy_bt_func_prev, recpy_bt_func_next): New export.
6987 * python/py-record.c (recpy_func_type): New static object.
6988 (recpy_func_new, recpy_func_level, recpy_func_symbol,
6989 recpy_func_instructions, recpy_func_up, recpy_func_prev,
6990 recpy_func_next): New function.
6991 (recpy_element_hash, recpy_element_richcompare): Updated comment.
6992 (recpy_func_getset): New static object.
6993 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
6994 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
6995
6996 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6997
6998 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
6999 (btpy_object, btpy_insn_type, btpy_new): Remove.
7000 (btpy_list_object): Use gdb.RecordInstruction type instead of
7001 gdb.BtraceInstruction type.
7002 (btrace_insn_from_recpy_insn): New function.
7003 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
7004 btpy_new.
7005 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
7006 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
7007 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
7008 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
7009 instead of btpy_object.
7010 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7011 btpy_insn_data, btpy_insn_decode): Rename to ...
7012 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
7013 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
7014 recpy_bt_insn_decode): This. Also, use new helper functions.
7015 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
7016 recpy_insn_type.
7017 (btpy_insn_getset): Remove.
7018 (gdbpy_initialize_btrace): Remove code to initialize
7019 gdb.BtraceInstruction. Use recpy_element_object.
7020 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
7021 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
7022 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
7023 * python/py-record.c (recpy_insn_type): New static object.
7024 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
7025 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
7026 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
7027 New function.
7028 (recpy_insn_getset): New static object.
7029 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
7030 * python/py-record.h (recpy_element_object): New typedef.
7031 (recpy_insn_type, recpy_insn_new): New export.
7032
7033 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7034
7035 * py-record-btrace.c (btpy_insn_new): Removed.
7036 (btpy_insn_or_gap_new): New function.
7037 (btpy_insn_error): Removed.
7038 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7039 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
7040 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
7041 btpy_insn_or_gap_new instead of btpy_insn_new.
7042 (btpy_insn_getset): Remove btpy_insn_error.
7043 * py-record.c (recpy_gap_type): New static object.
7044 (recpy_gap_object): New typedef.
7045 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
7046 recpy_gap_reason_string): New function.
7047 (recpy_gap_getset): New static object.
7048 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
7049 * py-record.h (recpy_gap_new): New export.
7050
7051 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7052
7053 * python/py-record.c (recpy_ptid): Remove.
7054 (recpy_record_getset): Remove recpy_ptid.
7055
7056 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7057
7058 * btrace.c (btrace_fetch): Set inferior_ptid.
7059 * python/py-record-btrace.c: Add "py-record.h" include.
7060 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
7061 recpy_bt_end, recpy_bt_instruction_history,
7062 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
7063 in gdb.Record object instead of current ptid.
7064 * python/py-record.c: Include new "py-record.h" file.
7065 (recpy_record_object): Moved to py-record.h.
7066 * python/py-record.h: New file.
7067
7068 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7069
7070 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
7071 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
7072 indentation.
7073
7074 2017-05-01 Joel Brobecker <brobecker@adacore.com>
7075
7076 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
7077 the past maintainers section.
7078
7079 2017-04-28 Yao Qi <yao.qi@linaro.org>
7080
7081 * infcmd.c (get_return_value): Use regcache ctor, and remove
7082 cleanup.
7083
7084 2017-04-28 Yao Qi <yao.qi@linaro.org>
7085 Pedro Alves <palves@redhat.com>
7086
7087 * regcache.c (regcache::regcache): New tag dispatch ctor.
7088 (do_cooked_read): Moved above.
7089 (regcache_dup): Use the tag dispatch ctor..
7090 * regcache.h (regcache): Declare ctor, delete copy ctor and
7091 assignment operator, remove friend regcache_dup.
7092
7093 2017-04-28 Yao Qi <yao.qi@linaro.org>
7094
7095 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
7096 call method save instead of regcache_cpy.
7097 * regcache.h (struct regcache): Make regcache_dup a friend.
7098
7099 2017-04-28 Yao Qi <yao.qi@linaro.org>
7100
7101 * regcache.c (struct regcache): Move to regcache.h
7102 (regcache::arch): New method.
7103 (regcache_get_ptid): Update.
7104 (get_regcache_arch): Call arch method.
7105 (get_regcache_aspace): Call method aspace.
7106 (register_buffer): Change it to method.
7107 (regcache_save): Change it to regcache::save.
7108 (regcache_restore): Likewise.
7109 (regcache_cpy_no_passthrough): Remove the declaration.
7110 (regcache_cpy): Call methods restore and cpy_no_passthrough.
7111 (regcache_cpy_no_passthrough): Change it to method
7112 cpy_no_passthrough.
7113 (regcache_register_status): Change it to method
7114 get_register_status.
7115 (regcache_invalidate): Change it to method invalidate.
7116 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
7117 (regcache_raw_update): Change it to method raw_update.
7118 (regcache_raw_read): Likewise.
7119 (regcache_raw_read_signed): Likewise.
7120 (regcache_raw_read_unsigned): Likewise.
7121 (regcache_raw_write_signed): Likewise.
7122 (regcache_raw_write_unsigned): Likewise.
7123 (regcache_cooked_read): Likewise.
7124 (regcache_cooked_read_value): Likewise.
7125 (regcache_cooked_read_signed): Likewise.
7126 (regcache_cooked_read_unsigned): Likewise.
7127 (regcache_cooked_write_signed): Likewise.
7128 (regcache_cooked_write_unsigned): Likewise.
7129 (regcache_raw_set_cached_value): Likewise.
7130 (regcache_raw_write): Likewise.
7131 (regcache_cooked_write): Likewise.
7132 (regcache_xfer_part): Likewise.
7133 (regcache_raw_read_part): Likewise.
7134 (regcache_raw_write_part): Likewise.
7135 (regcache_cooked_read_part): Likewise.
7136 (regcache_cooked_write_part): Likewise.
7137 (regcache_raw_supply): Likewise.
7138 (regcache_raw_collect): Likewise.
7139 (regcache_transfer_regset): Likewise.
7140 (regcache_supply_regset): Likewise.
7141 (regcache_collect_regset): Likewise.
7142 (regcache_debug_print_register): Likewise.
7143 (enum regcache_dump_what): Move it to regcache.h.
7144 (regcache_dump): Change it to method dump.
7145 * regcache.h (enum regcache_dump_what): New.
7146 (class regcache): New.
7147 * target.c (target_fetch_registers): Call method
7148 debug_print_register.
7149 (target_store_registers): Likewise.
7150
7151 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7152
7153 * windows-nat.c (struct lm_info_windows): Initialize field.
7154 (windows_make_so): Allocate lm_info_windows with new.
7155 (windows_free_so): Free lm_info_windows with delete.
7156
7157 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7158
7159 * solib-darwin.c (struct lm_info_darwin): Initialize field.
7160 (darwin_current_sos): Allocate lm_info_darwin with new, remove
7161 cleanup.
7162 (darwin_free_so): Free lm_info_darwin with delete.
7163
7164 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7165
7166 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7167 <l_addr_p>: Change type to bool.
7168 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7169 (svr4_free_so): Free lm_info_svr4 with delete.
7170 (svr4_copy_library_list): Replace memcpy with call to copy
7171 constructor.
7172 (library_list_start_library, svr4_default_sos): Allocate
7173 lm_info_svr4 with new.
7174
7175 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7176
7177 * solib-target.c (struct lm_info_target): Add destructor,
7178 initialize fields.
7179 <name>: Change type to std::string.
7180 (library_list_start_library): Allocate lm_info_target with new.
7181 (solib_target_free_library_list): Free lm_info_target with
7182 delete.
7183 (solib_target_current_sos): Adapt to std::string.
7184 (solib_target_free_so): Free lm_info_target with delete.
7185
7186 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7187
7188 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7189 fields.
7190 (frv_current_sos): Allocate lm_info_frv with new.
7191 (frv_relocate_main_executable): Free lm_info_frv with delete,
7192 allocate with new.
7193 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7194
7195 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7196
7197 * solib-frv.c (struct lm_info_frv): Fix indentation.
7198
7199 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7200
7201 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7202 map field.
7203 (dsbt_current_sos): Allocate lm_info_dsbt with new.
7204 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
7205 and allocate with new.
7206 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
7207
7208 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7209
7210 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
7211 <filename, member_name>: Change type to std::string.
7212 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
7213 (library_list_start_library): Allocate lm_info_aix with new.
7214 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
7215 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
7216 with copy constructor.
7217
7218 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7219
7220 * solist.h (struct lm_info): Remove.
7221 (struct lm_info_base): New class.
7222 (struct so_list) <lm_info>: Change type to lm_info_base *.
7223 * nto-tdep.c (struct lm_info): Remove.
7224 (lm_addr): Adjust.
7225 * solib-aix.c (struct lm_info): Rename to ...
7226 (struct lm_info_aix): ... this. Extend lm_info_base.
7227 (lm_info_p): Rename to ...
7228 (lm_info_aix_p): ... this, and adjust.
7229 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
7230 solib_aix_parse_libraries, library_list_start_library,
7231 solib_aix_free_library_list, solib_aix_parse_libraries,
7232 solib_aix_get_library_list,
7233 solib_aix_relocate_section_addresses, solib_aix_free_so,
7234 solib_aix_get_section_offsets,
7235 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
7236 Adjust.
7237 (struct solib_aix_inferior_data) <library_list>: Adjust.
7238 * solib-darwin.c (struct lm_info): Rename to ...
7239 (struct lm_info_darwin): ... this. Extend lm_info_base.
7240 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
7241 * solib-dsbt.c (struct lm_info): Rename to ...
7242 (struct lm_info_dsbt): ... this. Extend lm_info_base.
7243 (struct dsbt_info) <main_executable_lm_info): Adjust.
7244 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
7245 dsbt_relocate_section_addresses): Adjust.
7246 * solib-frv.c (struct lm_info): Rename to ...
7247 (struct lm_info_frv): ... this. Extend lm_info_base.
7248 (main_executable_lm_info): Adjust.
7249 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7250 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7251 find_canonical_descriptor_in_load_object,
7252 frv_fdpic_find_canonical_descriptor): Adjust.
7253 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7254 to lm_info_svr4.
7255 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7256 svr4_clear_so, svr4_copy_library_list,
7257 library_list_start_library, svr4_default_sos, svr4_read_so_list,
7258 svr4_current_sos, svr4_fetch_objfile_link_map,
7259 solist_update_incremental): Adjust.
7260 * solib-svr4.h (struct lm_info_svr4): Move here from
7261 solib-svr4.c.
7262 * solib-target.c (struct lm_info): Rename to ...
7263 (struct lm_info_target): ... this. Extend lm_info_base.
7264 (lm_info_p): Rename to ...
7265 (lm_info_target_p): ... this.
7266 (solib_target_parse_libraries, library_list_start_segment,
7267 library_list_start_section, library_list_start_library,
7268 library_list_end_library, solib_target_free_library_list,
7269 solib_target_current_sos, solib_target_free_so,
7270 solib_target_relocate_section_addresses): Adjust.
7271 * windows-nat.c (struct lm_info): Rename to ...
7272 (struct lm_info_windows): ... this. Extend lm_info_base.
7273 (windows_make_so, handle_load_dll, handle_unload_dll,
7274 windows_xfer_shared_libraries): Adjust.
7275
7276 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7277
7278 * solib-darwin.c (struct darwin_so_list): Remove.
7279 (darwin_current_sos): Allocate an so_list object instead of a
7280 darwin_so_list, separately allocate an lm_info object.
7281 (darwin_free_so): Free lm_info.
7282
7283 2017-04-28 John Baldwin <jhb@FreeBSD.org>
7284
7285 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7286 with fprintf_filtered.
7287
7288 2017-04-28 Yao Qi <yao.qi@linaro.org>
7289
7290 * regcache.c (regcache::regcache): New function.
7291 (regcache::~regcache): New function.
7292 (regcache_xmalloc_1): Remove.
7293 (regcache_xmalloc): Call new regcache.
7294 (regcache_xfree): Call delete regcache.
7295 (get_thread_arch_aspace_regcache): Call new regcache.
7296
7297 2017-04-28 Yao Qi <yao.qi@linaro.org>
7298
7299 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7300 lwp instead of ptid_get_lwp.
7301
7302 2017-04-28 Yao Qi <yao.qi@linaro.org>
7303
7304 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7305 lwp_info instead of getting from inferior_ptid.
7306
7307 2017-04-27 Keith Seitz <keiths@redhat.com>
7308
7309 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
7310 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
7311 (CV_CONVERSION_BADNESS): Define.
7312 (rank_one_type): Remove overly restrictive rvalue reference
7313 rank checks.
7314 Add cv-qualifier checks and subranks for type equality.
7315 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
7316 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
7317 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
7318
7319 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
7320
7321 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
7322 count when creating the object.
7323
7324 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
7325 Ulrich Weigand <uweigand@de.ibm.com>
7326
7327 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
7328 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
7329 is used in AIX.
7330 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
7331 (process_xcoff_symbol): Likewise.
7332 (scan_xcoff_symtab): Likewise.
7333
7334 2017-04-26 Alan Hayward <alan.hayward@arm.com>
7335
7336 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
7337 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
7338 (ia64_access_reg): Use get_frame_register_unsigned.
7339 (ia64_access_rse_reg): Likewise.
7340 (ia64_libunwind_frame_prev_register): Likewise.
7341
7342 2017-04-26 Jiong Wang <jiong.wang@arm.com>
7343
7344 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
7345 * gdbarch.c: Regenerated.
7346 * gdbarch.h: Regenerated.
7347 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
7348 visibility external.
7349 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
7350 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
7351 (enum cfa_how_kind): Move to ...
7352 (struct dwarf2_frame_state_reg_info): Likewise.
7353 (struct dwarf2_frame_state): Likewise.
7354 * dwarf2-frame.h: ... here.
7355 (dwarf2_frame_state_alloc_regs): New declaration.
7356 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
7357 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
7358
7359 2017-04-26 Alan Hayward <alan.hayward@arm.com>
7360
7361 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
7362 regcache_raw_read_unsigned.
7363 (xtensa_pseudo_register_write): Likewise.
7364
7365 2017-04-26 Alan Hayward <alan.hayward@arm.com>
7366
7367 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
7368 (nds32_pseudo_register_write): Likewise.
7369
7370 2017-04-25 Yao Qi <yao.qi@linaro.org>
7371
7372 * regcache.c (struct regcache) <readonly_p>: Change its type
7373 to bool.
7374 (regcache_xmalloc_1): Update parameter type and callers update.
7375
7376 2017-04-25 Yao Qi <yao.qi@linaro.org>
7377
7378 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
7379 set_gdbarch_wchar_bit.
7380 * arm-tdep.c (arm_gdbarch_init): Likewise.
7381
7382 2017-04-25 Pedro Alves <palves@redhat.com>
7383
7384 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
7385 (BothAreRelocatable, memcopy, memmove): Don't define.
7386 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
7387 macros.
7388
7389 2017-04-25 Pedro Alves <palves@redhat.com>
7390
7391 * common/common-defs.h: Include "common/poison.h".
7392 * common/function-view.h: (Not, Or, Requires): Move to traits.h
7393 and adjust.
7394 * common/poison.h: New file.
7395 * common/traits.h: Include <type_traits>.
7396 (Not, Or, Requires): New, moved from common/function-view.h.
7397
7398 2017-04-25 Pedro Alves <palves@redhat.com>
7399
7400 * breakpoint.h (struct breakpoint): In-class initialize all
7401 fields. Make boolean fields "bool".
7402 * breakpoint.c (init_raw_breakpoint_without_location): Remove
7403 memset call and initializations no longer necessary.
7404
7405 2017-04-25 Pedro Alves <palves@redhat.com>
7406
7407 * btrace.c (pt_btrace_insn_flags): Change parameter type to
7408 reference.
7409 (pt_btrace_insn): New function.
7410 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
7411
7412 2017-04-25 Pedro Alves <palves@redhat.com>
7413
7414 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
7415 "base" field and inherit from "bp_location" instead. Add
7416 non-default ctor.
7417 (allocate_location_exception): Use new non-default ctor.
7418 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
7419 (init_bp_location): Convert to ...
7420 (bp_location::bp_location): ... this new ctor, and remove memset
7421 call.
7422 (base_breakpoint_allocate_location): Use the new non-default ctor.
7423 * breakpoint.h (bp_location): Now a class. Declare default and
7424 non-default ctors. In-class initialize all members.
7425 (init_bp_location): Remove declaration.
7426
7427 2017-04-25 Pedro Alves <palves@redhat.com>
7428
7429 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
7430 assignment operator.
7431
7432 2017-04-24 Yao Qi <yao.qi@linaro.org>
7433
7434 * doublest.c (convert_doublest_to_floatformat): Call
7435 floatformat_totalsize_bytes.
7436
7437 2017-04-22 Tom Tromey <tom@tromey.com>
7438
7439 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7440 ui_out_emit_list.
7441 * stack.c (print_frame): Use ui_out_emit_list.
7442 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7443 ui_out_emit_list.
7444 * mi/mi-main.c (print_one_inferior)
7445 (mi_cmd_data_list_register_names)
7446 (mi_cmd_data_list_register_values, mi_cmd_list_features)
7447 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
7448 ui_out_emit_list.
7449 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
7450 (mi_output_solib_attribs): Use ui_out_emit_list,
7451 ui_out_emit_tuple.
7452 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
7453 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
7454 (mi_cmd_stack_list_args, list_args_or_locals): Use
7455 ui_out_emit_list.
7456 * disasm.c (do_assembly_only): Use ui_out_emit_list.
7457 * breakpoint.c (print_solib_event, output_thread_groups): Use
7458 ui_out_emit_list.
7459
7460 2017-04-22 Tom Tromey <tom@tromey.com>
7461
7462 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
7463 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
7464 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
7465
7466 2017-04-22 Tom Tromey <tom@tromey.com>
7467
7468 * tracepoint.c (tvariables_info_1)
7469 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
7470
7471 2017-04-22 Tom Tromey <tom@tromey.com>
7472
7473 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
7474 annotate_arg_emitter.
7475 * breakpoint.c (print_mention_watchpoint)
7476 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
7477 * annotate.h (struct annotate_arg_emitter): New.
7478
7479 2017-04-22 Tom Tromey <tom@tromey.com>
7480
7481 * record-btrace.c (record_btrace_insn_history)
7482 (record_btrace_insn_history_range, record_btrace_call_history)
7483 (record_btrace_call_history_range): Use ui_out_emit_tuple.
7484 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
7485 ui_out_emit_tuple.
7486 * stack.c (print_frame_info): Use ui_out_emit_tuple.
7487 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
7488 * skip.c (skip_info): Use ui_out_emit_tuple.
7489 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
7490 * progspace.c (print_program_space): Use ui_out_emit_tuple.
7491 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
7492 * osdata.c (info_osdata): Use ui_out_emit_tuple.
7493 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7494 ui_out_emit_tuple.
7495 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
7496 (output_register, mi_cmd_data_read_memory)
7497 (mi_cmd_data_read_memory_bytes, mi_load_progress)
7498 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
7499 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
7500 Use ui_out_emit_tuple.
7501 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
7502 ui_out_emit_tuple.
7503 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7504 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
7505 * linux-thread-db.c (info_auto_load_libthread_db): Use
7506 ui_out_emit_tuple.
7507 * inferior.c (print_inferior): Use ui_out_emit_tuple.
7508 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
7509 * disasm.c (do_mixed_source_and_assembly_deprecated)
7510 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
7511 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
7512 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
7513 * breakpoint.c (print_one_breakpoint_location)
7514 (print_one_breakpoint): Use ui_out_emit_tuple.
7515 * auto-load.c (print_script, info_auto_load_cmd): Use
7516 ui_out_emit_tuple.
7517 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
7518
7519 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
7520
7521 * thread.c (print_thread_info_1): Remove dead code.
7522
7523 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7524
7525 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
7526 GDB_SELF_TEST.
7527 * arm-tdep.c (selftests::arm_record_test): Likewise.
7528
7529 2017-04-21 Yao Qi <yao.qi@linaro.org>
7530
7531 * regcache.c (regcache_restore): Remove argument 2. Replace
7532 argument 3 with regcache. Get register status from
7533 src->register_status and get register contents from
7534 register_buffer (src, regnum).
7535 (regcache_cpy): Update.
7536
7537 2017-04-19 Pedro Alves <palves@redhat.com>
7538
7539 * gdbthread.h (thread): Add missing closing parenthesis in
7540 comment.
7541
7542 2017-04-19 Pedro Alves <palves@redhat.com>
7543
7544 * common/refcounted-object.h: New file.
7545 * gdbthread.h: Include "common/refcounted-object.h".
7546 (thread_info): Inherit from refcounted_object and add comments.
7547 (thread_info::incref, thread_info::decref)
7548 (thread_info::m_refcount): Delete.
7549 (thread_info::deletable): Use the refcounted_object::refcount()
7550 method.
7551 * inferior.c (current_inferior_): Add comment.
7552 (set_current_inferior): Increment/decrement refcounts.
7553 (prune_inferiors, remove_inferior_command): Skip inferiors marked
7554 not-deletable instead of comparing with the current inferior.
7555 (initialize_inferiors): Increment the initial inferior's refcount.
7556 * inferior.h (struct inferior): Forward declare.
7557 Include "common/refcounted-object.h".
7558 (current_inferior, set_current_inferior): Move declaration to
7559 before struct inferior's definition, and fix comment.
7560 (inferior): Inherit from refcounted_object. Add comments.
7561 * thread.c (switch_to_thread_no_regs): Reference the thread's
7562 inferior pointer directly instead of doing a ptid lookup.
7563 (switch_to_no_thread): New function.
7564 (switch_to_thread(thread_info *)): New function, factored out
7565 from ...
7566 (switch_to_thread(ptid_t)): ... this.
7567 (restore_current_thread): Delete.
7568 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
7569 fields, and add 'inf' field.
7570 (do_restore_current_thread_cleanup): Check whether old->inf is
7571 alive instead of looking up an inferior by ptid. Use
7572 switch_to_thread and switch_to_no_thread.
7573 (restore_current_thread_cleanup_dtor): Use old->inf directly
7574 instead of lookup up an inferior by id. Decref the inferior.
7575 Don't restore 'removable'.
7576 (make_cleanup_restore_current_thread): Same the inferior pointer
7577 in old, instead of the inferior number. Incref the inferior.
7578 Don't save/clear 'removable'.
7579
7580 2017-04-19 Pedro Alves <palves@redhat.com>
7581
7582 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7583 unittests/scoped_restore-selftests.c.
7584 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
7585 * common/scoped_restore.h (scoped_restore_base): Make "class".
7586 (scoped_restore_base::release): New public method.
7587 (scoped_restore_base::scoped_restore_base): New protected ctor.
7588 (scoped_restore_base::m_saved_var): New protected field.
7589 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
7590 scoped_restore_base base class instead of m_saved_var directly.
7591 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
7592 (scoped_restore_tmpl::scoped_restore_tmpl(const
7593 scoped_restore_tmpl<T>&)): Likewise.
7594 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
7595 method.
7596 (scoped_restore_tmpl::saved_var): New method.
7597 (scoped_restore_tmpl::m_saved_var): Delete.
7598 * inferior.h (inferior::detaching): Now a bool.
7599 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
7600 cleanup.
7601 * unittests/scoped_restore-selftests.c: New file.
7602
7603 2017-04-19 Pedro Alves <palves@redhat.com>
7604
7605 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
7606 Re-sort in alphabetic order.
7607
7608 2017-04-18 Pedro Alves <palves@redhat.com>
7609
7610 * xml-support.c (obstack_xml_printf): Delete.
7611 * xml-support.h (obstack_xml_printf): Delete.
7612
7613 2017-04-18 Pedro Alves <palves@redhat.com>
7614
7615 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
7616 vdebug, verror, body_text, start_element, end_element, name,
7617 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
7618 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
7619 is_xinclude>: Make private and add m_ prefix.
7620 (gdb_xml_parser::body_text): New method, based on ...
7621 (gdb_xml_body_text): ... this. Adjust.
7622 (gdb_xml_parser::vdebug): New method, based on ...
7623 (gdb_xml_debug): ... this. Adjust.
7624 (gdb_xml_parser::verror): New method, based on ...
7625 (gdb_xml_error): ... this. Adjust.
7626 (gdb_xml_parser::start_element): New method, based on ...
7627 (gdb_xml_start_element): ... this. Adjust.
7628 (gdb_xml_start_element_wrapper): Defer to
7629 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
7630 (gdb_xml_parser::end_element): New method, based on ...
7631 (gdb_xml_end_element_wrapper): ... this. Adjust.
7632 (gdb_xml_parser::~gdb_xml_parser): Adjust.
7633 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
7634 (gdb_xml_parser::use_dtd): New method, based on ...
7635 (gdb_xml_use_dtd): ... this. Adjust.
7636 (gdb_xml_parser::parse): New method, based on ...
7637 (gdb_xml_parse): ... this. Adjust.
7638 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
7639 (xinclude_start_include): Adjust to call the parser's name method.
7640 (xml_xinclude_default, xml_xinclude_start_doctype)
7641 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
7642 method.
7643 (xml_process_xincludes): Adjust to call parser methods.
7644 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
7645 declarations.
7646
7647 2017-04-18 Pedro Alves <palves@redhat.com>
7648
7649 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
7650 gdb::optional<std::string>.
7651 * xml-support.c: Include <string>.
7652 (scope_level::scope_level(scope_level &&))
7653 (scope_level::~scope_level): Delete.
7654 (scope_level::body): Now a std::string.
7655 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
7656 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
7657 parameter.
7658 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
7659 (xinclude_parsing_data::output): Now a std::string reference.
7660 (xinclude_start_include): Adjust.
7661 (xml_xinclude_default): Adjust.
7662 (xml_process_xincludes): Add 'output' parameter, and return bool.
7663 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
7664 and return bool.
7665 * xml-tdesc.c: Include <unordered_map> and <string>.
7666 (tdesc_xml_cache): Delete.
7667 (tdesc_xml_cache_s): Delete.
7668 (xml_cache): Now an std::unordered_map.
7669 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
7670 (target_fetch_description_xml): Change return type to
7671 gdb::optional<std::string>, and adjust.
7672 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
7673 (target_fetch_description_xml): Change return type to
7674 gdb::optional<std::string>.
7675
7676 2017-04-18 Pedro Alves <palves@redhat.com>
7677
7678 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7679 unittests/optional-selftests.c.
7680 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
7681 * unittests/optional-selftests.c: New file.
7682 * unittests/optional/assignment/1.cc: New file.
7683 * unittests/optional/assignment/2.cc: New file.
7684 * unittests/optional/assignment/3.cc: New file.
7685 * unittests/optional/assignment/4.cc: New file.
7686 * unittests/optional/assignment/5.cc: New file.
7687 * unittests/optional/assignment/6.cc: New file.
7688 * unittests/optional/assignment/7.cc: New file.
7689 * unittests/optional/cons/copy.cc: New file.
7690 * unittests/optional/cons/default.cc: New file.
7691 * unittests/optional/cons/move.cc: New file.
7692 * unittests/optional/cons/value.cc: New file.
7693 * unittests/optional/in_place.cc: New file.
7694 * unittests/optional/observers/1.cc: New file.
7695 * unittests/optional/observers/2.cc: New file.
7696
7697 2017-04-18 Pedro Alves <palves@redhat.com>
7698
7699 * common/gdb_optional.h: Include common/traits.h.
7700 (in_place_t): New type.
7701 (in_place): New constexpr variable.
7702 (optional::optional): Remove member initialization of
7703 m_instantiated.
7704 (optional::optional(in_place_t...)): New constructor.
7705 (optional::~optional): Use reset.
7706 (optional::optional(const optional&)): New.
7707 (optional::optional(const optional&&)): New.
7708 (optional::optional(T &)): New.
7709 (optional::optional(T &&)): New.
7710 (operator::operator=(const optional &)): New.
7711 (operator::operator=(optional &&)): New.
7712 (operator::operator= (const T &))
7713 (operator::operator= (T &&))
7714 (operator::emplace (Args &&... args)): Return a T&. Use reset.
7715 (operator::reset): New.
7716 (operator::m_instantiated):: Add in-class initializer.
7717 * common/traits.h: Include <type_traits>.
7718 (struct And): New types.
7719
7720 2017-04-18 Pedro Alves <palves@redhat.com>
7721
7722 * xml-support.c: Include <vector>.
7723 (scope_level::scope_level(const gdb_xml_element *))
7724 (scope_level::scope_level(scope_level&&)): New.
7725 (scope_level::~scope_level): New.
7726 (scope_level_s): Delete.
7727 (gdb_xml_parser::scopes): Now a std::vector.
7728 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
7729 Use std::vector.
7730 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
7731 scope cleanup code.
7732 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
7733 of the scopes member. Use std::vector::emplace_back.
7734
7735 2017-04-18 Pedro Alves <palves@redhat.com>
7736
7737 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
7738 a bool.
7739 (gdb_xml_end_element): Change type of first parameter.
7740 (gdb_xml_cleanup): Rename to ...
7741 (gdb_xml_parser::~gdb_xml_parser): ... this.
7742 (gdb_xml_create_parser_and_cleanup): Delete with ...
7743 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
7744 to this new ctor.
7745 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
7746 using gdb_xml_create_parser_and_cleanup.
7747 (xinclude_parsing_data): Add ctor/dtor.
7748 (xml_xinclude_cleanup): Delete.
7749 (xml_process_xincludes): Create a local xinclude_parsing_data
7750 instead of heap-allocating one. Create a local gdb_xml_parser
7751 instead of heap-allocating one with
7752 gdb_xml_create_parser_and_cleanup.
7753
7754 2017-04-18 John Baldwin <jhb@FreeBSD.org>
7755
7756 PR threads/20743
7757 * fbsd-nat.c (resume_one_thread_cb): Remove.
7758 (resume_all_threads_cb): Remove.
7759 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7760 iterate_over_threads.
7761
7762 2017-04-17 Joel Brobecker <brobecker@adacore.com>
7763
7764 * NEWS: Create a new section for the next release branch.
7765 Rename the section of the current branch, now that it has
7766 been cut.
7767
7768 2017-04-17 Joel Brobecker <brobecker@adacore.com>
7769
7770 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7771 * version.in: Bump version to 8.0.50.DATE-git.
7772
7773 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
7774
7775 PR gdb/21385
7776 * windows-nat.c (windows_create_inferior): Declare 'allargs'
7777 independently of the host, and fix build breakage on Cygwin.
7778
7779 2017-04-13 Pedro Alves <palves@redhat.com>
7780
7781 * inferior.c (free_inferior): Convert to ...
7782 (inferior::~inferior): ... this dtor.
7783 (inferior::inferior): New ctor, factored out from ...
7784 (add_inferior_silent): ... here. Allocate the inferior with a new
7785 expression.
7786 (delete_inferior): Call delete instead of free_inferior.
7787 * inferior.h (gdb_environ, continuation): Forward declare.
7788 (inferior): Now a class. Add in-class initialization to all
7789 members. Make boolean fields bool, except 'detaching'.
7790 (inferior::inferior): New explicit ctor.
7791 (inferior::~inferior): New.
7792
7793 2017-04-13 Pedro Alves <palves@redhat.com>
7794
7795 * inferior.c (init_inferior_list): Delete.
7796 * inferior.h (init_inferior_list): Delete.
7797
7798 2017-04-13 Pedro Alves <palves@redhat.com>
7799
7800 PR threads/13217
7801 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7802 (top level): Call it twice, with different thread sets.
7803
7804 2017-04-13 Pedro Alves <palves@redhat.com>
7805
7806 * thread.c: Include <algorithm>.
7807 (thread_array_cleanup): Delete.
7808 (scoped_inc_dec_ref): New class.
7809 (live_threads_count): New function.
7810 (set_thread_refcount): Delete.
7811 (tp_array_compar_ascending): Now a bool.
7812 (tp_array_compar): Convert to a std::sort comparison function.
7813 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7814 and live_threads_count.
7815
7816 2017-04-13 Pedro Alves <palves@redhat.com>
7817
7818 * infrun.c (follow_fork_inferior): Also switch the current
7819 inferior.
7820
7821 2017-04-13 Pedro Alves <palves@redhat.com>
7822
7823 * breakpoint.c (watch_command_1): Save watchpoint-frame info
7824 before calling create_internal_breakpoint.
7825
7826 2017-04-13 Pedro Alves <palves@redhat.com>
7827
7828 * fork-child.c (execv_argv): New class.
7829 (breakup_args): Refactored as ...
7830 (execv_argv::init_for_no_shell): .. this method of execv_argv.
7831 Copy arguments to storage and replace separators with NULL
7832 terminators in place.
7833 (escape_bang_in_quoted_argument): Adjust to return bool.
7834 (execv_argv::execv_argv): New ctor.
7835 (execv_argv::init_for_shell): New method, factored out from
7836 fork_inferior. Don't strdup strings into the vector.
7837 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
7838 Remove free_vector_argv call.
7839
7840 2017-04-13 Yao Qi <yao.qi@linaro.org>
7841
7842 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
7843 tdep->rx_psw_type.
7844
7845 2017-04-13 Yao Qi <yao.qi@linaro.org>
7846
7847 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
7848 * rx-tdep.c (rx_gdbarch_init): Likewise.
7849
7850 2017-04-13 Pedro Alves <palves@redhat.com>
7851
7852 * breakpoint.h (struct breakpoint): Reindent.
7853
7854 2017-04-13 Pedro Alves <palves@redhat.com>
7855
7856 * breakpoint.c (bp_location): Rename to ...
7857 (bp_locations): ... this. All references updated.
7858 (bp_location_count): Rename to ...
7859 (bp_locations_count): ... this. All references updated.
7860 (bp_location_placed_address_before_address_max): Rename to ...
7861 (bp_locations_placed_address_before_address_max): ... this. All
7862 references updated.
7863 (bp_location_shadow_len_after_address_max): Rename to ...
7864 (bp_locations_shadow_len_after_address_max): ... this. All
7865 references updated.
7866 (bp_location_compare_addrs): Rename to ...
7867 (bp_locations_compare_addrs): ... this. All references updated.
7868 (bp_location_compare):Rename to ...
7869 (bp_locations_compare): ... this. All references updated.
7870 (bp_location_target_extensions_update): Rename to ...
7871 (bp_locations_target_extensions_update): ... this. All references
7872 updated.
7873
7874 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7875
7876 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
7877 * common/common.m4: Check headers 'termios.h', 'termio.h' and
7878 'sgtty.h'.
7879 * common/gdb_termios.h: New file, with parts of "terminal.h".
7880 * inflow.c: Include "gdb_termios.h".
7881 * ser-unix.c: Include "gdb_termios.h".
7882 * terminal.h: Move terminal-related defines to
7883 "common/gdb_termios.h".
7884
7885 2017-04-12 Tom Tromey <tom@tromey.com>
7886
7887 * probe.c (parse_probes): Update.
7888 * location.h (delete_event_location): Don't declare.
7889 (event_location_deleter::operator()): Update.
7890 * location.c (event_location_deleter::operator()): Rename from
7891 delete_event_location.
7892 * linespec.h (linespec_result) <location>: Change type to
7893 event_location_up.
7894 * linespec.c (canonicalize_linespec, event_location_to_sals)
7895 (decode_objc): Update.
7896 (linespec_result): Don't call delete_event_location.
7897 * breakpoint.c (create_breakpoints_sal)
7898 (bkpt_probe_create_sals_from_location)
7899 (strace_marker_create_sals_from_location): Update.
7900
7901 2017-04-12 Tom Tromey <tom@tromey.com>
7902
7903 * linespec.h (struct linespec_result): Add constructor and
7904 destructor.
7905 (init_linespec_result, destroy_linespec_result)
7906 (make_cleanup_destroy_linespec_result): Don't declare.
7907 * linespec.c (init_linespec_result): Remove.
7908 (linespec_result::~linespec_result): Rename from
7909 destroy_linespec_result. Update.
7910 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
7911 Remove.
7912 * breakpoint.c (create_breakpoint, break_range_command)
7913 (decode_location_default): Update.
7914 * ax-gdb.c (agent_command_1): Update.
7915
7916 2017-04-12 Tom Tromey <tom@tromey.com>
7917
7918 * remote.c (remote_download_tracepoint): Update.
7919 * python/py-breakpoint.c (bppy_get_location): Update.
7920 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
7921 (gdbscm_breakpoint_location): Update.
7922 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
7923 * breakpoint.h (struct breakpoint) <location, location_range_end>:
7924 Change type to event_location_up.
7925 * breakpoint.c (create_overlay_event_breakpoint)
7926 (create_longjmp_master_breakpoint)
7927 (create_std_terminate_master_breakpoint)
7928 (create_exception_master_breakpoint)
7929 (breakpoint_event_location_empty_p, print_breakpoint_location)
7930 (print_one_breakpoint_location, create_thread_event_breakpoint)
7931 (init_breakpoint_sal, create_breakpoint)
7932 (print_recreate_ranged_breakpoint, break_range_command)
7933 (init_ada_exception_breakpoint, say_where): Update.
7934 (base_breakpoint_dtor): Don't call delete_event_location.
7935 (bkpt_print_recreate, tracepoint_print_recreate)
7936 (dprintf_print_recreate, update_static_tracepoint)
7937 (breakpoint_re_set_default): Update.
7938
7939 2017-04-12 Tom Tromey <tom@tromey.com>
7940
7941 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
7942 type of "to_do". Update.
7943 (compute_stack_depth): Use std::vector.
7944
7945 2017-04-12 Tom Tromey <tom@tromey.com>
7946
7947 * printcmd.c (find_instruction_backward): Use std::vector.
7948
7949 2017-04-12 Tom Tromey <tom@tromey.com>
7950
7951 * symfile.c (objfilep): Remove typedef.
7952 (reread_symbols): Use a std::vector.
7953
7954 2017-04-12 Tom Tromey <tom@tromey.com>
7955
7956 * mi/mi-main.c (exec_direction_forward): Remove.
7957 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
7958 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7959 scoped_restore.
7960 * guile/guile.c (guile_repl_command, guile_command)
7961 (gdbscm_execute_gdb_command): Use scoped_restore.
7962 * go-exp.y (go_parse): Use scoped_restore.
7963 * d-exp.y (d_parse): Use scoped_restore.
7964 * cli/cli-decode.c (cmd_func): Use scoped_restore.
7965 * c-exp.y (c_parse): Use scoped_restore.
7966
7967 2017-04-12 Tom Tromey <tom@tromey.com>
7968
7969 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
7970 (mi_parse): Update return type.
7971 (mi_parse_free): Remove.
7972 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
7973 (mi_parse::~mi_parse): Rename from mi_parse_free.
7974 (mi_parse_cleanup): Remove.
7975 (mi_parse): Return a unique_ptr. Use new.
7976 * mi/mi-main.c (mi_execute_command): Update.
7977
7978 2017-04-12 Tom Tromey <tom@tromey.com>
7979
7980 * location.c (explicit_location_lex_one): Return a
7981 unique_xmalloc_ptr.
7982 (string_to_explicit_location): Update. Remove cleanups.
7983
7984 2017-04-12 Tom Tromey <tom@tromey.com>
7985
7986 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
7987 (compare_value_and_voffset): Change type. Update.
7988 (compute_vtable_size): Change type of "offset_vec".
7989 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
7990 (gnuv3_get_typeid): Remove extraneous declaration.
7991
7992 2017-04-12 Tom Tromey <tom@tromey.com>
7993
7994 * charset.h (wchar_iterator): Fix comment.
7995
7996 2017-04-12 Tom Tromey <tom@tromey.com>
7997
7998 * charset.c (iconv_wrapper): New class.
7999 (cleanup_iconv): Remove.
8000 (convert_between_encodings): Use it.
8001
8002 2017-04-12 Tom Tromey <tom@tromey.com>
8003
8004 * symfile.h (increment_reading_symtab): Update type.
8005 * symfile.c (decrement_reading_symtab): Remove.
8006 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
8007 * psymtab.c (psymtab_to_symtab): Update.
8008 * dwarf2read.c (dw2_instantiate_symtab): Update.
8009
8010 2017-04-12 Tom Tromey <tom@tromey.com>
8011
8012 * jit.c (struct jit_reader): Declare separately. Add constructor
8013 and destructor. Change type of "handle".
8014 (loaded_jit_reader): Define separately.
8015 (jit_reader_load): Update. New "new".
8016 (jit_reader_unload_command): Use "delete".
8017 * gdb-dlfcn.h (struct dlclose_deleter): New.
8018 (gdb_dlhandle_up): New typedef.
8019 (gdb_dlopen, gdb_dlsym): Update types.
8020 (gdb_dlclose): Remove.
8021 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
8022 (gdb_dlsym): Change type of "handle".
8023 (make_cleanup_dlclose): Remove.
8024 (dlclose_deleter::operator()): Rename from gdb_dlclose.
8025 * compile/compile-c-support.c (load_libcc): Update.
8026
8027 2017-04-12 Tom Tromey <tom@tromey.com>
8028
8029 * symtab.h (find_pcs_for_symtab_line): Change return type.
8030 * symtab.c (find_pcs_for_symtab_line): Change return type.
8031 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
8032 type of "vec". Update.
8033 (ltpy_get_pcs_for_line): Update.
8034 * linespec.c (decode_digits_ordinary): Update.
8035
8036 2017-04-12 Tom Tromey <tom@tromey.com>
8037
8038 * tracepoint.c (actions_command): Update.
8039 * python/python.c (python_command, python_interactive_command):
8040 Update.
8041 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8042 * guile/guile.c (guile_command): Update.
8043 * defs.h (read_command_lines, read_command_lines_1): Return
8044 command_line_up.
8045 (command_lines_deleter): New struct.
8046 (command_line_up): New typedef.
8047 * compile/compile.c (compile_code_command)
8048 (compile_print_command): Update.
8049 * cli/cli-script.h (get_command_line, copy_command_lines): Return
8050 command_line_up.
8051 (make_cleanup_free_command_lines): Remove.
8052 * cli/cli-script.c (get_command_line, read_command_lines_1)
8053 (copy_command_lines): Return command_line_up.
8054 (while_command, if_command, read_command_lines, define_command)
8055 (document_command): Update.
8056 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
8057 Remove.
8058 * breakpoint.h (breakpoint_set_commands): Change type of
8059 "commands".
8060 * breakpoint.c (breakpoint_set_commands): Change type of
8061 "commands". Update.
8062 (do_map_commands_command, update_dprintf_command_list)
8063 (create_tracepoint_from_upload): Update.
8064
8065 2017-04-12 Tom Tromey <tom@tromey.com>
8066
8067 * tracepoint.c (scope_info): Update.
8068 * spu-tdep.c (spu_catch_start): Update.
8069 * python/python.c (gdbpy_decode_line): Update.
8070 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
8071 * python/py-breakpoint.c (bppy_init): Update.
8072 * probe.c (parse_probes): Update.
8073 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
8074 * location.h (event_location_deleter): New struct.
8075 (event_location_up): New typedef.
8076 (new_linespec_location, new_address_location, new_probe_location)
8077 (new_explicit_location, copy_event_location)
8078 (string_to_event_location, string_to_event_location_basic)
8079 (string_to_explicit_location): Update return type.
8080 (make_cleanup_delete_event_location): Remove.
8081 * location.c (new_linespec_location, new_address_location)
8082 (new_probe_location, new_explicit_location, copy_event_location):
8083 Return event_location_up.
8084 (delete_event_location_cleanup)
8085 (make_cleanup_delete_event_location): Remove.
8086 (string_to_explicit_location, string_to_event_location_basic)
8087 (string_to_event_location): Return event_location_up.
8088 * linespec.c (canonicalize_linespec, event_location_to_sals)
8089 (decode_line_with_current_source)
8090 (decode_line_with_last_displayed, decode_objc): Update.
8091 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
8092 * completer.c (location_completer): Update.
8093 * cli/cli-cmds.c (edit_command, list_command): Update.
8094 * breakpoint.c (create_overlay_event_breakpoint)
8095 (create_longjmp_master_breakpoint)
8096 (create_std_terminate_master_breakpoint)
8097 (create_exception_master_breakpoint)
8098 (create_thread_event_breakpoint): Update.
8099 (init_breakpoint_sal): Update. Remove some dead code.
8100 (create_breakpoint_sal): Change type of "location". Update.
8101 (create_breakpoints_sal, create_breakpoint, break_command_1)
8102 (dprintf_command, break_range_command, until_break_command)
8103 (init_ada_exception_breakpoint)
8104 (strace_marker_create_sals_from_location)
8105 (update_static_tracepoint, trace_command, ftrace_command)
8106 (strace_command, create_tracepoint_from_upload): Update.
8107 * break-catch-throw.c (re_set_exception_catchpoint): Update.
8108 * ax-gdb.c (agent_command_1): Update.
8109
8110 2017-04-12 Pedro Alves <palves@redhat.com>
8111
8112 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
8113 * configure.tgt: Handle i[34567]86-*-go32* and
8114 i[34567]86-*-msdosdjgpp*.
8115 * i386-tdep.c (i386_svr4_reg_to_regnum):
8116 Make extern.
8117 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
8118 i386-go32-tdep.c.
8119 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8120 * i386-go32-tdep.c: New file.
8121 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8122 declarations.
8123
8124 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
8125
8126 * aix-thread.c (pd_status2str): Change return type to const char *.
8127
8128 2017-04-12 Pedro Alves <palves@redhat.com>
8129
8130 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8131 calls to set_gdbarch_gnu_triplet_regexp.
8132
8133 2017-04-12 Pedro Alves <palves@redhat.com>
8134
8135 PR gdb/21323
8136 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8137 New enum value.
8138 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8139 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8140 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8141 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8142 * gdbarch.h, gdbarch.c: Regenerate.
8143 * aarch64-tdep.c (aarch64_gdbarch_init): Override
8144 gdbarch_wchar_bit and gdbarch_wchar_signed.
8145 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8146 * arm-tdep.c (arm_gdbarch_init): Likewise.
8147 * avr-tdep.c (avr_gdbarch_init): Likewise.
8148 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8149 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8150 * i386-tdep.c (i386_go32_init_abi): Likewise.
8151 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8152 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8153 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8154 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8155 * sh-tdep.c (sh_gdbarch_init): Likewise.
8156 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8157 * sparc64-tdep.c (sparc64_init_abi): Likewise.
8158 * windows-tdep.c (windows_init_abi): Likewise.
8159 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8160
8161 2017-04-12 Pedro Alves <palves@redhat.com>
8162
8163 PR c++/21323
8164 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8165 cplus_primitive_type_char32_t>: New enum values.
8166 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8167 and cplus_primitive_type_char32_t.
8168 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8169 32, use the archtecture's built-in type for char16_t and char32_t,
8170 respectively. Otherwise, fallback to init_integer_type as before,
8171 but make the type unsigned, and issue a complaint.
8172 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8173
8174 2017-04-12 Alan Hayward <alan.hayward@arm.com>
8175
8176 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
8177 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8178
8179 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8180
8181 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8182 'const char *'.
8183
8184 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8185
8186 * common/common-utils.c (free_vector_argv): New function.
8187 * common/common-utils.h: Include <vector>.
8188 (free_vector_argv): New prototype.
8189 * darwin-nat.c (darwin_create_inferior): Rewrite function
8190 prototype in order to constify "exec_file" and accept a
8191 "std::string" for "allargs".
8192 * fork-child.c: Include <vector>.
8193 (breakup_args): Rewrite function, using C++.
8194 (fork_inferior): Rewrite function header, constify "exec_file_arg"
8195 and accept "std::string" for "allargs". Update the code to
8196 calculate "argv" based on "allargs". Update calls to "exec_fun"
8197 and "execvp".
8198 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8199 order to constify "exec_file" and accept a "std::string" for
8200 "allargs".
8201 * go32-nat.c (go32_create_inferior): Likewise.
8202 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8203 * infcmd.c (run_command_1): Constify "exec_file". Use
8204 "std::string" for inferior arguments.
8205 * inferior.h (fork_inferior): Update prototype.
8206 * linux-nat.c (linux_nat_create_inferior): Rewrite function
8207 prototype in order to constify "exec_file" and accept a
8208 "std::string" for "allargs".
8209 * nto-procfs.c (procfs_create_inferior): Likewise.
8210 * procfs.c (procfs_create_inferior): Likewise.
8211 * remote-sim.c (gdbsim_create_inferior): Likewise.
8212 * remote.c (extended_remote_run): Update code to accept
8213 "std::string" as argument.
8214 (extended_remote_create_inferior): Rewrite function prototype in
8215 order to constify "exec_file" and accept a "std::string" for
8216 "allargs".
8217 * rs6000-nat.c (super_create_inferior): Likewise.
8218 (rs6000_create_inferior): Likewise.
8219 * target.h (struct target_ops) <to_create_inferior>: Likewise.
8220 * windows-nat.c (windows_create_inferior): Likewise.
8221
8222 2017-04-11 Pedro Alves <palves@redhat.com>
8223
8224 * thread.c: Fix whitespace throughout.
8225
8226 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
8227
8228 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
8229
8230 2017-04-11 Alan Hayward <alan.hayward@arm.com>
8231
8232 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
8233
8234 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
8235
8236 PR gdb/21364
8237 * osdata.c (info_osdata): Check if 'type' is an empty string
8238 instead of NULL.
8239
8240 2017-04-10 Pedro Alves <palves@redhat.com>
8241
8242 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
8243 (ptid_to_global_thread_id, in_thread_list)
8244 (do_captured_list_thread_ids, set_resumed, set_running)
8245 (set_executing, set_stop_requested, finish_thread_state)
8246 (validate_registers_access, can_access_registers_ptid)
8247 (print_thread_info_1, switch_to_thread)
8248 (do_restore_current_thread_cleanup)
8249 (make_cleanup_restore_current_thread, thread_command)
8250 (thread_name_command): Use operator== instead of ptid_equal.
8251
8252 2017-04-10 Pedro Alves <palves@redhat.com>
8253
8254 * thread.c (struct current_thread_cleanup) <next>: Delete field.
8255 (current_thread_cleanup_chain): Delete.
8256 (restore_current_thread_cleanup_dtor)
8257 (make_cleanup_restore_current_thread): Remove references to
8258 current_thread_cleanup_chain.
8259
8260 2017-04-10 Alan Hayward <alan.hayward@arm.com>
8261
8262 * msp430-tdep.c (msp430_pseudo_register_read): Never return
8263 REG_UNKNOWN.
8264
8265 2017-04-10 Yao Qi <yao.qi@linaro.org>
8266
8267 PR gdb/19942
8268 * gdbthread.h (thread_info::deletable): New method.
8269 (thread_info::incref): New method.
8270 (thread_info::decref): New method.
8271 (thread_info::refcount): Move it to private.
8272 * infrun.c (save_stop_context): Call inc_refcount.
8273 (release_stop_context_cleanup): Likewise.
8274 * thread.c (set_thread_exited): New function.
8275 (init_thread_list): Delete "tp" only it is deletable, otherwise
8276 call set_thread_exited.
8277 (delete_thread_1): Call set_thread_exited.
8278 (current_thread_cleanup) <inferior_pid>: Remove.
8279 <thread>: New field.
8280 (restore_current_thread_ptid_changed): Removed.
8281 (do_restore_current_thread_cleanup): Adjust.
8282 (restore_current_thread_cleanup_dtor): Don't call
8283 find_thread_ptid.
8284 (set_thread_refcount): Use dec_refcount.
8285 (make_cleanup_restore_current_thread): Adjust.
8286 (thread_apply_all_command): Call inc_refcount.
8287 (_initialize_thread): Don't call
8288 observer_attach_thread_ptid_changed.
8289
8290 2017-04-10 Yao Qi <yao.qi@linaro.org>
8291
8292 * thread.c (delete_thread_1): Hoist code on marking thread as
8293 exited.
8294
8295 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8296
8297 * windows-nat.c (windows_detach): Initialize ptid with
8298 minus_one_ptid.
8299
8300 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
8301
8302 * unittests/ptid-selftests.c: Fix erroneous assert messages.
8303
8304 2017-04-07 Alan Hayward <alan.hayward@arm.com>
8305
8306 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8307 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8308 (bfin_pseudo_register_write): Likewise
8309
8310 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
8311
8312 * common/ptid.h (struct ptid): Change to...
8313 (class ptid_t): ... this.
8314 <ptid_t>: New constructors.
8315 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
8316 matches>: New methods.
8317 <make_null, make_minus_one>: New static methods.
8318 <pid>: Rename to...
8319 <m_pid>: ...this.
8320 <lwp>: Rename to...
8321 <m_lwp>: ...this.
8322 <tid>: Rename to...
8323 <m_tid>: ...this.
8324 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
8325 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
8326 as references, move comment to class ptid_t.
8327 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
8328 ptid_t static methods.
8329 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
8330 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
8331 Take ptid arguments as references, implement using ptid_t methods.
8332 * unittests/ptid-selftests.c: New file.
8333 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8334 unittests/ptid-selftests.c.
8335 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
8336
8337 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
8338
8339 * python/python.c (python_run_simple_file): Cast mode literal to
8340 non-const char pointer as expected by PyFile_FromString.
8341
8342 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
8343
8344 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
8345 minus_one_ptid and null_ptid.
8346
8347 2017-04-05 Pedro Alves <palves@redhat.com>
8348
8349 * warning.m4 (build_warnings): Remove -Wno-write-strings.
8350 * configure: Regenerate.
8351
8352 2017-04-05 Pedro Alves <palves@redhat.com>
8353
8354 * ada-exp.y (yyerror): Constify.
8355 * ada-lang.c (bound_name, get_selections)
8356 (ada_variant_discrim_type)
8357 (ada_variant_discrim_name, ada_value_struct_elt)
8358 (ada_lookup_struct_elt_type, is_unchecked_variant)
8359 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
8360 (catch_ada_exception_command_split)
8361 (catch_ada_assert_command_split, catch_assert_command)
8362 (ada_op_name): Constify.
8363 * ada-lang.h (ada_yyerror, get_selections)
8364 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
8365 * arc-tdep.c (arc_print_frame_cache): Constify.
8366 * arm-tdep.c (arm_skip_stub): Constify.
8367 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
8368 (gen_aggregate_elt_ref): Constify.
8369 * bcache.c (print_bcache_statistics): Constify.
8370 * bcache.h (print_bcache_statistics): Constify.
8371 * break-catch-throw.c (catch_exception_command_1):
8372 * breakpoint.c (struct ep_type_description::description):
8373 Constify.
8374 (add_solib_catchpoint): Constify.
8375 (catch_fork_command_1): Add cast.
8376 (add_catch_command): Constify.
8377 * breakpoint.h (add_catch_command, add_solib_catchpoint):
8378 Constify.
8379 * bsd-uthread.c (bsd_uthread_state): Constify.
8380 * buildsym.c (patch_subfile_names): Constify.
8381 * buildsym.h (next_symbol_text_func, patch_subfile_names):
8382 Constify.
8383 * c-exp.y (yyerror): Constify.
8384 (token::oper): Constify.
8385 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
8386 * c-varobj.c (cplus_describe_child): Constify.
8387 * charset.c (find_charset_names): Add cast.
8388 (find_charset_names): Constify array and add const_cast.
8389 * cli/cli-cmds.c (complete_command, cd_command): Constify.
8390 (edit_command): Constify.
8391 * cli/cli-decode.c (lookup_cmd): Constify.
8392 * cli/cli-dump.c (dump_memory_command, dump_value_command):
8393 Constify.
8394 (struct dump_context): Constify.
8395 (add_dump_command, restore_command): Constify.
8396 * cli/cli-script.c (get_command_line): Constify.
8397 * cli/cli-script.h (get_command_line): Constify.
8398 * cli/cli-utils.c (check_for_argument): Constify.
8399 * cli/cli-utils.h (check_for_argument): Constify.
8400 * coff-pe-read.c (struct read_pe_section_data): Constify.
8401 * command.h (lookup_cmd): Constify.
8402 * common/print-utils.c (decimal2str): Constify.
8403 * completer.c (gdb_print_filename): Constify.
8404 * corefile.c (set_gnutarget): Constify.
8405 * cp-name-parser.y (yyerror): Constify.
8406 * cp-valprint.c (cp_print_class_member): Constify.
8407 * cris-tdep.c (cris_register_name, crisv32_register_name):
8408 Constify.
8409 * d-exp.y (yyerror): Constify.
8410 (struct token::oper): Constify.
8411 * d-lang.h (d_yyerror): Constify.
8412 * dbxread.c (struct header_file_location::name): Constify.
8413 (add_old_header_file, add_new_header_file, last_function_name)
8414 (dbx_next_symbol_text, add_bincl_to_list)
8415 (find_corresponding_bincl_psymtab, set_namestring)
8416 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
8417 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
8418 * defs.h (command_line_input, print_address_symbolic)
8419 (deprecated_readline_begin_hook): Constify.
8420 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
8421 Constify.
8422 * event-top.c (handle_line_of_input): Constify and add cast.
8423 * exceptions.c (catch_errors): Constify.
8424 * exceptions.h (catch_errors): Constify.
8425 * expprint.c (print_subexp_standard, op_string, op_name)
8426 (op_name_standard, dump_raw_expression, dump_raw_expression):
8427 * expression.h (op_name, op_string, dump_raw_expression):
8428 Constify.
8429 * f-exp.y (yyerror): Constify.
8430 (struct token::oper): Constify.
8431 (struct f77_boolean_val::name): Constify.
8432 * f-lang.c (f_word_break_characters): Constify.
8433 * f-lang.h (f_yyerror): Constify.
8434 * fork-child.c (fork_inferior): Add cast.
8435 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
8436 (new_variant): Constify.
8437 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
8438 * gdbarch.c: Regenerate.
8439 * gdbcore.h (set_gnutarget): Constify.
8440 * go-exp.y (yyerror): Constify.
8441 (token::oper): Constify.
8442 * go-lang.h (go_yyerror): Constify.
8443 * go32-nat.c (go32_sysinfo): Constify.
8444 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
8445 * guile/scm-cmd.c (cmdscm_function): Constify.
8446 * guile/scm-param.c (pascm_param_value): Constify.
8447 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
8448 (h8300sx_register_name): Constify.
8449 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
8450 Constify.
8451 * ia64-tdep.c (ia64_register_names): Constify.
8452 * infcmd.c (construct_inferior_arguments): Constify.
8453 (path_command, attach_post_wait): Constify.
8454 * language.c (show_range_command, show_case_command)
8455 (unk_lang_error): Constify.
8456 * language.h (language_defn::la_error)
8457 (language_defn::la_name_of_this): Constify.
8458 * linespec.c (decode_line_2): Constify.
8459 * linux-thread-db.c (thread_db_err_str): Constify.
8460 * lm32-tdep.c (lm32_register_name): Constify.
8461 * m2-exp.y (yyerror): Constify.
8462 * m2-lang.h (m2_yyerror): Constify.
8463 * m32r-tdep.c (m32r_register_names): Constify and make static.
8464 * m68hc11-tdep.c (m68hc11_register_names): Constify.
8465 * m88k-tdep.c (m88k_register_name): Constify.
8466 * macroexp.c (appendmem): Constify.
8467 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
8468 (upgrade_type, parse_external, parse_partial_symbols)
8469 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
8470 (new_symbol): Constify.
8471 * memattr.c (mem_info_command): Constify.
8472 * mep-tdep.c (register_name_from_keyword): Constify.
8473 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
8474 Constify.
8475 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
8476 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
8477 * mi/mi-main.c (captured_mi_execute_command): Constify and add
8478 cast.
8479 (mi_execute_async_cli_command): Constify.
8480 * mips-tdep.c (mips_register_name): Constify.
8481 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
8482 (am33_register_name, am33_2_register_name)
8483 * moxie-tdep.c (moxie_register_names): Constify.
8484 * nat/linux-osdata.c (osdata_type): Constify fields.
8485 * nto-tdep.c (nto_parse_redirection): Constify.
8486 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
8487 (lookup_child_selector): Constify.
8488 (objc_methcall::name): Constify.
8489 * objc-lang.h (lookup_objc_class, lookup_child_selector)
8490 (lookup_struct_typedef): Constify.
8491 * objfiles.c (pc_in_section): Constify.
8492 * objfiles.h (pc_in_section): Constify.
8493 * p-exp.y (struct token::oper): Constify.
8494 (yyerror): Constify.
8495 * p-lang.h (pascal_yyerror): Constify.
8496 * parser-defs.h (op_name_standard): Constify.
8497 (op_print::string): Constify.
8498 (exp_descriptor::op_name): Constify.
8499 * printcmd.c (print_address_symbolic): Constify.
8500 * psymtab.c (print_partial_symbols): Constify.
8501 * python/py-breakpoint.c (stop_func): Constify.
8502 (bppy_get_expression): Constify.
8503 * python/py-cmd.c (cmdpy_completer::name): Constify.
8504 (cmdpy_function): Constify.
8505 * python/py-event.c (evpy_add_attribute)
8506 (gdbpy_initialize_event_generic): Constify.
8507 * python/py-event.h (evpy_add_attribute)
8508 (gdbpy_initialize_event_generic): Constify.
8509 * python/py-evts.c (add_new_registry): Constify.
8510 * python/py-finishbreakpoint.c (outofscope_func): Constify.
8511 * python/py-framefilter.c (get_py_iter_from_func): Constify.
8512 * python/py-inferior.c (get_buffer): Add cast.
8513 * python/py-param.c (parm_constant::name): Constify.
8514 * python/py-unwind.c (fprint_frame_id): Constify.
8515 * python/python.c (gdbpy_parameter_value): Constify.
8516 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
8517 * remote.c (memory_packet_config::name): Constify.
8518 (show_packet_config_cmd, remote_write_bytes)
8519 (remote_buffer_add_string):
8520 * reverse.c (exec_reverse_once): Constify.
8521 * rs6000-tdep.c (variant::name, variant::description): Constify.
8522 * rust-exp.y (rustyyerror): Constify.
8523 * rust-lang.c (rust_op_name): Constify.
8524 * rust-lang.h (rustyyerror): Constify.
8525 * serial.h (serial_ops::name): Constify.
8526 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
8527 (sh_sh3e_register_name, sh_sh2e_register_name)
8528 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
8529 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
8530 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
8531 (sh_sh4al_dsp_register_name): Constify.
8532 * sh64-tdep.c (sh64_register_name): Constify.
8533 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
8534 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
8535 * stabsread.c (patch_block_stabs, read_type_number)
8536 (ref_map::stabs, ref_add, process_reference)
8537 (symbol_reference_defined, define_symbol, define_symbol)
8538 (error_type, read_type, read_member_functions, read_cpp_abbrev)
8539 (read_one_struct_field, read_struct_fields, read_baseclasses)
8540 (read_tilde_fields, read_struct_type, read_array_type)
8541 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
8542 (read_huge_number, read_range_type, read_args, common_block_start)
8543 (find_name_end): Constify.
8544 * stabsread.h (common_block_start, define_symbol)
8545 (process_one_symbol, symbol_reference_defined, ref_add):
8546 * symfile.c (get_section_index, add_symbol_file_command):
8547 * symfile.h (get_section_index): Constify.
8548 * target-descriptions.c (tdesc_type::name): Constify.
8549 (tdesc_free_type): Add cast.
8550 * target.c (find_default_run_target):
8551 (add_deprecated_target_alias, find_default_run_target)
8552 (target_announce_detach): Constify.
8553 (do_option): Constify.
8554 * target.h (add_deprecated_target_alias): Constify.
8555 * thread.c (print_thread_info_1): Constify.
8556 * top.c (deprecated_readline_begin_hook, command_line_input):
8557 Constify.
8558 (init_main): Add casts.
8559 * top.h (handle_line_of_input): Constify.
8560 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
8561 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
8562 (tfind_command): Rename to ...
8563 (tfind_command_1): ... this and constify.
8564 (tfind_command): New function.
8565 (tfind_end_command, tfind_start_command): Adjust.
8566 (encode_source_string): Constify.
8567 * tracepoint.h (encode_source_string): Constify.
8568 * tui/tui-data.c (tui_partial_win_by_name): Constify.
8569 * tui/tui-data.h (tui_partial_win_by_name): Constify.
8570 * tui/tui-source.c (tui_set_source_content_nil): Constify.
8571 * tui/tui-source.h (tui_set_source_content_nil): Constify.
8572 * tui/tui-win.c (parse_scrolling_args): Constify.
8573 * tui/tui-windata.c (tui_erase_data_content): Constify.
8574 * tui/tui-windata.h (tui_erase_data_content): Constify.
8575 * tui/tui-winsource.c (tui_erase_source_content): Constify.
8576 * tui/tui.c (tui_enable): Add cast.
8577 * utils.c (defaulted_query): Constify.
8578 (init_page_info): Add cast.
8579 (puts_debug, subset_compare): Constify.
8580 * utils.h (subset_compare): Constify.
8581 * varobj.c (varobj_format_string): Constify.
8582 * varobj.h (varobj_format_string): Constify.
8583 * vax-tdep.c (vax_register_name): Constify.
8584 * windows-nat.c (windows_detach): Constify.
8585 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
8586 * xml-support.c (gdb_xml_end_element): Constify.
8587 * xml-tdesc.c (tdesc_start_reg): Constify.
8588 * xstormy16-tdep.c (xstormy16_register_name): Constify.
8589 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
8590 * xtensa-tdep.h (xtensa_register_t::name): Constify.
8591
8592 2017-04-05 Pedro Alves <palves@redhat.com>
8593
8594 * proc-api.c (struct trans): Constify.
8595 (procfs_note): Constify.
8596 * proc-events.c (struct trans, syscall_table):
8597 * proc-flags.c (struct trans): Constify.
8598 * proc-utils.h (procfs_note): Constify.
8599 * proc-why.c (struct trans): Constify.
8600 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
8601 (procfs_detach): Constify.
8602 * sol-thread.c (struct string_map): Constify.
8603 (td_err_string, td_state_string): Constify.
8604
8605 2017-04-05 Pedro Alves <palves@redhat.com>
8606
8607 * proc-api.c (procfs_filename): Don't initialize
8608 procfs_filename.
8609 (prepare_to_trace): Assume procfs_filename is non-NULL.
8610 (_initialize_proc_api): Give procfs_filename a default value here.
8611
8612 2017-04-05 Pedro Alves <palves@redhat.com>
8613
8614 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
8615 'cond_string' parameter.
8616 (extract_exception_regexp): Constify 'string' parameter.
8617 (catch_exception_command_1): Constify.
8618 * breakpoint.c (init_catchpoint)
8619 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
8620 parameter.
8621 (ep_parse_optional_if_clause, catch_fork_command_1)
8622 (catch_exec_command_1): Constify.
8623 * breakpoint.h (init_catchpoint): Constify 'cond_string'
8624 parameter.
8625 (ep_parse_optional_if_clause): Constify.
8626 * cli/cli-utils.c (remove_trailing_whitespace)
8627 (check_for_argument): Constify.
8628 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
8629 non-const overload.
8630 (check_for_argument): Likewise.
8631
8632 2017-04-05 Pedro Alves <palves@redhat.com>
8633
8634 * event-top.c (command_line_handler): Add cast to execute_command
8635 call.
8636 * record-btrace.c (cmd_record_btrace_bts_start)
8637 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
8638 (cmd_record_btrace_start): Add cast to execute_command call.
8639 * record-full.c (record_full_goto_insn):
8640 * record.c (record_start, record_stop): Add cast to
8641 execute_command_to_string calls.
8642 (cmd_record_start): Add cast to execute_command calls.
8643
8644 2017-04-05 Pedro Alves <palves@redhat.com>
8645
8646 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
8647 static inline function.
8648 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
8649 array and use gdb_PyArg_ParseTupleAndKeywords.
8650 * python/py-cmd.c (cmdpy_init): Likewise.
8651 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
8652 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
8653 (infpy_search_memory): Likewise.
8654 * python/py-objfile.c (objfpy_add_separate_debug_file)
8655 (gdbpy_lookup_objfile): Likewise.
8656 * python/py-symbol.c (gdbpy_lookup_symbol)
8657 (gdbpy_lookup_global_symbol): Likewise.
8658 * python/py-type.c (gdbpy_lookup_type): Likewise.
8659 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
8660 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
8661 Likewise.
8662
8663 2017-04-05 Pedro Alves <palves@redhat.com>
8664
8665 * python/python-internal.h (gdb_PyGetSetDef): New type.
8666 * python/py-block.c (block_object_getset)
8667 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
8668 * python/py-event.c (event_object_getset)
8669 (finish_breakpoint_object_getset): Likewise.
8670 * python/py-inferior.c (inferior_object_getset): Likewise.
8671 * python/py-infthread.c (thread_object_getset): Likewise.
8672 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
8673 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
8674 * python/py-objfile.c (objfile_getset): Likewise.
8675 * python/py-progspace.c (pspace_getset): Likewise.
8676 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
8677 Likewise.
8678 * python/py-record.c (recpy_record_getset): Likewise.
8679 * python/py-symbol.c (symbol_object_getset): Likewise.
8680 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
8681 Likewise.
8682 * python/py-type.c (type_object_getset, field_object_getset):
8683 Likewise.
8684 * python/py-value.c (value_object_getset): Likewise.
8685
8686 2017-04-05 Pedro Alves <palves@redhat.com>
8687
8688 * python/python-internal.h (gdb_PyObject_CallMethod)
8689 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
8690 New functions.
8691 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
8692 (PySys_GetObject, PySys_SetPath): New macros.
8693
8694 2017-04-05 Pedro Alves <palves@redhat.com>
8695
8696 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
8697 info_osdata_command.
8698 * osdata.c (info_osdata_command): Rename to ...
8699 (info_osdata): ... this. Constify 'type' parameter, and remove
8700 the 'from_tty' parameter. Accept NULL TYPE.
8701 (info_osdata_command): New function.
8702 * osdata.h (info_osdata_command): Remove declaration.
8703 (info_osdata): New declaration.
8704
8705 2017-04-05 Pedro Alves <palves@redhat.com>
8706
8707 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
8708 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
8709 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
8710 parameter.
8711 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
8712 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
8713 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
8714 parameter.
8715 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
8716 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
8717 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
8718 (mi_cmd_file_list_exec_source_files)
8719 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
8720 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8721 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
8722 parameter.
8723 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
8724 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
8725 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
8726 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
8727 (mi_cmd_stack_info_frame): Constify 'command' parameter.
8728 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
8729 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
8730 'command' parameter.
8731 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
8732 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
8733 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
8734 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
8735 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
8736 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
8737 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
8738 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
8739 (mi_cmd_var_set_update_range): Constify 'command' parameter.
8740 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
8741 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
8742 parameter.
8743 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
8744 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
8745 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
8746 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
8747 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
8748 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
8749 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
8750 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
8751 (mi_cmd_data_list_changed_registers)
8752 (mi_cmd_data_write_register_values)
8753 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8754 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8755 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8756 (mi_cmd_list_features, mi_cmd_list_target_features)
8757 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8758 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8759 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8760 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8761 (mi_cmd_trace_frame_collected): Constify 'command'
8762 parameter.
8763 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8764 'command' parameter.
8765
8766 2017-04-05 Pedro Alves <palves@redhat.com>
8767
8768 * ada-lang.c (ada_completer_word_break_characters): Now a const
8769 array.
8770 (ada_get_gdb_completer_word_break_characters): Constify.
8771 * completer.c (gdb_completer_command_word_break_characters)
8772 (gdb_completer_file_name_break_characters)
8773 (gdb_completer_quote_characters): Now const arrays.
8774 (get_gdb_completer_quote_characters): Constify.
8775 (set_rl_completer_word_break_characters): New function.
8776 (set_gdb_completion_word_break_characters)
8777 (complete_line_internal): Use it.
8778 * completer.h (get_gdb_completer_quote_characters): Constify.
8779 (set_rl_completer_word_break_characters): Declare.
8780 * f-lang.c (f_word_break_characters): Constify.
8781 * language.c (default_word_break_characters): Constify.
8782 * language.h (language_defn::la_word_break_characters): Constify.
8783 (default_word_break_characters): Constify.
8784 * top.c (init_main): Use set_rl_completer_word_break_characters.
8785
8786 2017-04-05 Pedro Alves <palves@redhat.com>
8787
8788 * aix-thread.c (aix_thread_pid_to_str)
8789 (aix_thread_extra_thread_info): Constify.
8790 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8791 * bsd-uthread.c (bsd_uthread_extra_thread_info)
8792 (bsd_uthread_pid_to_str): Constify.
8793 * corelow.c (core_pid_to_str): Constify.
8794 * darwin-nat.c (darwin_pid_to_str): Constify.
8795 * fbsd-nat.c (fbsd_pid_to_str): Constify.
8796 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8797 Constify.
8798 * gnu-nat.c (gnu_pid_to_str): Constify.
8799 * go32-nat.c (go32_pid_to_str): Constify.
8800 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8801 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8802 * inferior.c (inferior_pid_to_str): Constify.
8803 * linux-nat.c (linux_nat_pid_to_str): Constify.
8804 * linux-tdep.c (linux_core_pid_to_str): Constify.
8805 * linux-thread-db.c (thread_db_pid_to_str)
8806 (thread_db_extra_thread_info): Constify.
8807 * nto-tdep.c (nto_extra_thread_info): Constify.
8808 * nto-tdep.h (nto_extra_thread_info): Constify.
8809 * obsd-nat.c (obsd_pid_to_str): Constify.
8810 * procfs.c (procfs_pid_to_str): Constify.
8811 * ravenscar-thread.c (ravenscar_extra_thread_info)
8812 (ravenscar_pid_to_str): Constify.
8813 * remote-sim.c (gdbsim_pid_to_str): Constify.
8814 * remote.c (remote_threads_extra_info, remote_pid_to_str):
8815 Constify.
8816 * sol-thread.c (solaris_pid_to_str): Constify.
8817 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8818 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8819 * target.c (default_pid_to_str, target_pid_to_str)
8820 (normal_pid_to_str, default_pid_to_str): Constify.
8821 * target.h (target_ops::to_pid_to_str)
8822 (target_ops::to_extra_thread_info): Constify.
8823 (target_pid_to_str, normal_pid_to_str): Constify.
8824 * windows-nat.c (windows_pid_to_str): Constify.
8825 * gdbarch.sh (core_pid_to_str): Constify.
8826 * target-delegates.c: Regenerate.
8827 * gdbarch.h, gdbarch.c: Regenerate.
8828
8829 2017-04-05 Pedro Alves <palves@redhat.com>
8830
8831 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8832 the memory of the temporary warning_pre_print override.
8833 * utils.c (warning_pre_print): Constify.
8834 * utils.h (warning_pre_print): Constify.
8835
8836 2017-04-05 Pedro Alves <palves@redhat.com>
8837
8838 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8839 (shell_command): New function.
8840 (make_command): Use std::string.
8841 (init_cli_cmds): Register shell_command instead of shell_escape.
8842
8843 2017-04-05 Pedro Alves <palves@redhat.com>
8844
8845 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
8846 * tracepoint.c (default_collect): Don't initialize.
8847
8848 2017-04-05 Pedro Alves <palves@redhat.com>
8849
8850 * macroexp.c (macro_buffer::shared): Now a bool.
8851 (init_buffer): Update.
8852 (init_shared_buffer): Constify 'addr' parameter.
8853 (substitute_args, expand, macro_expand, macro_expand_next): Remove
8854 casts.
8855
8856 2017-04-05 Pedro Alves <palves@redhat.com>
8857
8858 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
8859 * disasm.c (set_disassembler_options): Constify local.
8860 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
8861
8862 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
8863
8864 PR gdb/21352
8865 * tracefile.c (tsave_command): Fix argument parsing for '-r'
8866 option.
8867
8868 2017-04-05 Yao Qi <yao.qi@linaro.org>
8869
8870 * frame.c (frame_unwind_register_unsigned): Call
8871 frame_unwind_register_value.
8872
8873 2017-04-05 Yao Qi <yao.qi@linaro.org>
8874
8875 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
8876 Use gdb_test_multiple, and don't match anchor.
8877
8878 2017-04-05 Pedro Alves <palves@redhat.com>
8879
8880 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
8881 (Write After Approval): Remove Simon Marchi.
8882
8883 2017-04-05 Pedro Alves <palves@redhat.com>
8884
8885 * common/gdb_optional.h (optional::optional): Make constexpr and
8886 initialize m_dummy.
8887
8888 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8889
8890 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8891 (amd64fbsd_jmp_buf_reg_offset): Remove.
8892 (amd64fbsd_supply_uthread): Remove function.
8893 (amd64fbsd_collect_uthread): Remove function.
8894 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
8895 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
8896 (x86_64-*-freebsd*): Remove bsd-uthread.o.
8897 (fbsd-nat.c): Update comment.
8898 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8899 (i386fbsd_jmp_buf_reg_offset): Remove.
8900 (i386fbsd_supply_uthread): Remove function.
8901 (i386fbsd_collect_uthread): Remove function.
8902 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
8903
8904 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8905
8906 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
8907 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
8908 * NEWS: Mention that support for FreeBSD/alpha was removed.
8909 * alpha-fbsd-tdep.c: Delete file.
8910 * config/alpha/fbsd.mh: Delete file.
8911 * configure.host: Delete alpha*-*-freebsd* and
8912 alpha*-*-kfreebsd*-gnu.
8913 * configure.tgt: Delete alpha*-*-freebsd* and
8914 alpha*-*-kfreebsd*-gnu.
8915
8916 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8917
8918 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
8919 amd64bsd_store_inferior_registers): Use ptid from regcache.
8920
8921 2017-04-04 Pedro Alves <palves@redhat.com>
8922
8923 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
8924 data fields, make them private and add "m_" prefixes.
8925 (lnp_state_machine::lnp_state_machine): New ctor.
8926 (record_line, check_line_address, handle_set_discriminator)
8927 (handle_set_address, handle_advance_pc, handle_special_opcode)
8928 (handle_advance_line, handle_set_file, handle_negate_stmt)
8929 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
8930 (end_sequence, advance_line): New methods.
8931 (m_gdbarch, m_record_lines_p): New fields.
8932 (lnp_reader_state): Delete.
8933 (dwarf_record_line): Rename to ...
8934 (lnp_state_machine::record_line): ... adjust.
8935 (init_lnp_state_machine): Delete.
8936 (lnp_state_machine::lnp_state_machine): New.
8937 (check_line_address): Rename to ...
8938 (lnp_state_machine::check_line_address): This.
8939 (dwarf_decode_lines_1): Remove reference to "reader_state".
8940 Adjust lnp_state_machine having a non-default ctor. Use bool.
8941 State machine internal state manipulation moved to
8942 lnp_state_machine methods.
8943
8944 2017-04-04 Pedro Alves <palves@redhat.com>
8945
8946 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8947 unittests/offset-type-selftests.c.
8948 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
8949 * common/offset-type.h: New file.
8950 * common/preprocessor.h: New file.
8951 * common/traits.h: New file.
8952 * common/valid-expr.h: New file.
8953 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
8954 sect_offset and cu_offset strong typedefs throughout.
8955 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
8956 typedefs throughout.
8957 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
8958 sect_offset and cu_offset strong typedefs throughout.
8959 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
8960 typedefs throughout.
8961 * gdbtypes.h: Include "common/offset-type.h".
8962 (cu_offset): Now an offset type (strong typedef) instead of a
8963 struct.
8964 (sect_offset): Likewise.
8965 (union call_site_parameter_u): Rename "param_offset" field to
8966 "param_cu_off".
8967 * unittests/offset-type-selftests.c: New file.
8968
8969 2017-04-04 Pedro Alves <palves@redhat.com>
8970
8971 * common/underlying.h: New file.
8972 * dwarf2read.c: Include "common/gdb_optional.h" and
8973 "common/underlying.h".
8974 (dir_index, file_name_index): New types.
8975 (file_entry): Use them.
8976 (file_entry::include): Use to_underlying.
8977 (line_header::add_file_name): Use dir_index.
8978 (read_formatted_entries): Use gdb::optional. Read form before
8979 writting to file_entry.
8980 (dwarf_decode_line_header): Use dir_index.
8981 (lnp_state_machine::current_file): Use to_underlying.
8982 (lnp_state_machine::file): Change type to file_name_index.
8983 (dwarf_record_line): Use to_underlying.
8984 (init_lnp_state_machine): Use file_name_index.
8985 (dwarf_decode_lines_1): Use dir_index and file_name_index.
8986
8987 2017-04-04 Pedro Alves <palves@redhat.com>
8988
8989 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
8990 operator bool, has_value and get methods.
8991
8992 2017-04-04 Pedro Alves <palves@redhat.com>
8993
8994 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
8995 fields.
8996 (line_header): Initialize all data fields. Change type of
8997 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
8998 Change type of include_dirs to std::vector<const char *>. Remove
8999 num_include_dirs, include_dirs_size. Change type of file_names to
9000 std::vector<file_entry>. Remove num_file_names, file_names_size.
9001 (line_header::line_header): New.
9002 (line_header::add_include_dir, line_header::add_file_name): New
9003 methods.
9004 (line_header::include_dir_at): Remove NULL check.
9005 (line_header::file_name_at): Add const overload.
9006 (line_header_up): New unique_ptr typedef.
9007 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
9008 std::vector. Remove free_line_header call.
9009 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
9010 free_line_header call.
9011 (free_cu_line_header): Delete.
9012 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
9013 (setup_type_unit_groups): Use line_header_up instead of cleanups.
9014 Adjust to use std::vector.
9015 (free_line_header): Delete.
9016 (free_line_header_voidp): Use delete.
9017 (add_include_dir): Replace with ...
9018 (line_header::add_include_dir): ... this method. Use std::vector.
9019 (add_file_name): Replace with ...
9020 (line_header::add_file_name): ... this method. Use std::vector.
9021 (add_include_dir_stub): Delete.
9022 (read_formatted_entries): Remove memset.
9023 (dwarf_decode_line_header): Return a line_header_up instead of a
9024 raw pointer. Remove cleanup handling. Pass lambdas to
9025 read_formatted_entries. Adjust to use line_header methods.
9026 (dwarf_decode_lines_1): Adjust to use line_header methods.
9027 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
9028 use std::vector.
9029
9030 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
9031
9032 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
9033 instead of struct ptid.
9034
9035 2017-05-04 Alan Hayward <alan.hayward@arm.com>
9036
9037 * frame.c (get_frame_register_bytes): Unwind using value.
9038 (put_frame_register_bytes): Likewise.
9039
9040 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
9041
9042 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
9043 aggregate-like.
9044
9045 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
9046
9047 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
9048
9049 2017-03-29 Yao Qi <yao.qi@linaro.org>
9050
9051 * gdbthread.h (struct thread_info): Declare constructor and
9052 destructor. Add some in-class member initializers.
9053 * thread.c (free_thread): Remove.
9054 (init_thread_list): Call delete instead of free_thread.
9055 (new_thread): Call thread_info constructor.
9056 (thread_info::thread_info): New function.
9057 (thread_info::~thread_info): New function.
9058 (delete_thread_1): Call delete instead of free_thread.
9059 (make_cleanup_restore_current_thread): Move tp and frame to
9060 inner block.
9061
9062 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9063
9064 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
9065 (arc_skip_prologue): Likewise.
9066 (arc_make_frame_cache): Likewise.
9067 (arc_pv_get_operand): New function.
9068 (arc_is_in_prologue): Likewise.
9069 (arc_analyze_prologue): Likewise.
9070 (arc_print_frame_cache): Likewise.
9071 (MAX_PROLOGUE_LENGTH): New constant.
9072
9073 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9074
9075 * configure.tgt: Add arc-insn.o.
9076 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
9077 (dump_arc_instruction_command): New function.
9078 (arc_fprintf_disasm): Likewise.
9079 (arc_disassemble_info): Likewise.
9080 (arc_insn_get_operand_value): Likewise.
9081 (arc_insn_get_operand_value_signed): Likewise.
9082 (arc_insn_get_memory_base_reg): Likewise.
9083 (arc_insn_get_memory_offset): Likewise.
9084 (arc_insn_get_branch_target): Likewise.
9085 (arc_insn_dump): Likewise.
9086 (arc_insn_get_linear_next_pc): Likewise.
9087 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
9088 (arc_disassemble_info): Likewise.
9089 (arc_insn_get_branch_target): Likewise.
9090 (arc_insn_get_linear_next_pc): Likewise.
9091 * NEWS: Mention new "maint print arc arc-instruction".
9092
9093 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9094
9095 * arc-tdep (maintenance_print_arc_list): New variable.
9096 (maintenance_print_arc_command): New function.
9097
9098 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9099
9100 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
9101 Add "limm" and "reserved".
9102 (arc_cannot_fetch_register, arc_cannot_store_register): Add
9103 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
9104 * arc-tdep.h (arc_regnum): Likewise.
9105
9106 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9107
9108 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9109 for THREADPTR register.
9110 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
9111 register.
9112 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
9113 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
9114 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
9115
9116 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9117
9118 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
9119 registers above gdbarch_num_regs (gdbarch) as privileged in
9120 call0 ABI.
9121
9122 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9123
9124 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9125 for a single specified register or for all registers in
9126 a0_base..a0_base + C0_NREGS range.
9127 (supply_gregset_reg): Call regcache_raw_supply for a single
9128 specified register or for all registers in a0_base..a0_base +
9129 C0_NREGS range.
9130
9131 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9132
9133 * arch/xtensa.h (C0_NREGS): Add definition.
9134 * xtensa-tdep.c (C0_NREGS): Remove definition.
9135
9136 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9137
9138 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9139 Drop xtensa_default_isa initialization.
9140 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9141
9142 2017-03-27 Pedro Alves <palves@redhat.com>
9143
9144 * dwarf2read.c (file_entry) <dir_index>: Add comment.
9145 (file_entry::include_dir): New method.
9146 (line_header::include_dir_at, line_header::file_name_at): New
9147 methods.
9148 (setup_type_unit_groups, setup_type_unit_groups)
9149 (psymtab_include_file_name): Simplify using the new methods.
9150 (lnp_state_machine) <the_line_header>: New field.
9151 <file>: Add comment.
9152 (lnp_state_machine::current_file): New method.
9153 (dwarf_record_line): Simplify using the new methods.
9154 (init_lnp_state_machine): Initialize the "the_line_header" field.
9155 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9156 Simplify using the new methods.
9157
9158 2017-03-27 Pedro Alves <palves@redhat.com>
9159
9160 * cp-name-parser.y (make_empty): Delete.
9161 (demangler_special, nested_name, ptr_operator, array_indicator)
9162 (direct_declarator, declarator_1): Use fill_comp instead of
9163 make_empty.
9164
9165 2017-03-27 Pedro Alves <palves@redhat.com>
9166
9167 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9168 to ATTRIBUTE_PRINTF.
9169 * solib-target.c (library_list_start_list): Print "string" not
9170 "version".
9171 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9172 gdb_xml_error call.
9173
9174 2017-03-27 Pedro Alves <palves@redhat.com>
9175
9176 * dwarf2read.c (struct file_and_directory): New.
9177 (dwarf2_get_dwz_file): Adjust to use std::string.
9178 (dw2_get_file_names_reader): Adjust to use file_and_directory.
9179 (find_file_and_directory): Adjust to return a file_and_directory
9180 object.
9181 (read_file_scope): Adjust to use file_and_directory. Remove
9182 make_cleanup/do_cleanups calls.
9183 (open_and_init_dwp_file): Adjust to use std::string. Remove
9184 make_cleanup/do_cleanups calls.
9185 * python/python.c (do_start_initialization): Adjust to ldirname
9186 returning a std::string.
9187 * utils.c (ldirname): Now returns a std::string.
9188 * utils.h (ldirname): Change return type to std::string.
9189 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9190 returning a std::string.
9191 * xml-tdesc.c (file_read_description_xml): Likewise.
9192
9193 2017-03-24 Alan Hayward <alan.hayward@arm.com>
9194
9195 * regcache.c (regcache_debug_print_register): New function.
9196 * regcache.h (regcache_debug_print_register): New declaration.
9197 * target.c (debug_print_register): Remove.
9198 (target_fetch_registers): Call regcache_debug_print_register.
9199 (target_store_registers): Likewise.
9200
9201 2017-03-24 Pádraig Brady <pbrady@fb.com>
9202
9203 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
9204 reference beyond the 'lh->include_dirs' array before accessing to
9205 it.
9206 (psymtab_include_file_name): Likewise.
9207 (dwarf_decode_lines_1): Likewise.
9208 (dwarf_decode_lines): Likewise.
9209 (file_file_name): Likewise.
9210
9211 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
9212
9213 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
9214 inferior_ptid.
9215 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9216 ps_lsetfpregs): Likewise.
9217 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
9218 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9219 ps_lsetfpregs): Likewise.
9220 * target.c (target_fetch_registers, target_store_registers):
9221 Remove asserts.
9222
9223 2017-03-23 Alan Hayward <alan.hayward@arm.com>
9224
9225 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
9226
9227 2017-03-23 Yao Qi <yao.qi@linaro.org>
9228
9229 * aarch64-tdep.c (aarch64_process_record_test): Declare.
9230 (_initialize_aarch64_tdep): Register it.
9231 (aarch64_record_load_store): Handle PRFM instruction.
9232 (aarch64_process_record_test): New function.
9233
9234 2017-03-23 Yao Qi <yao.qi@linaro.org>
9235
9236 * aarch64-tdep.c (aarch64_record_load_store): Fix code
9237 indentation.
9238
9239 2017-03-23 Yao Qi <yao.qi@linaro.org>
9240
9241 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
9242
9243 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9244
9245 python/python.c (do_start_initialization): Fix memory leak.
9246
9247 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9248
9249 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9250 using get_ptrace_pid.
9251 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9252 inferior_ptid.
9253 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9254 inferior_ptid instead of pid.
9255
9256 2017-03-22 Yao Qi <yao.qi@linaro.org>
9257
9258 * aarch64-tdep.c: Wrap locally used classes in anonymous
9259 namespace.
9260 * arm-tdep.c: Likewise.
9261 * linespec.c: Likewise.
9262 * ui-out.c: Likewise.
9263
9264 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
9265
9266 PR gdb/19637
9267 * python/lib/gdb/printer/bound_registers.py: Import sys.
9268
9269 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9270
9271 * windows-nat.c (do_windows_fetch_inferior_registers): Add
9272 windows_thread_info parameter and use it instead of
9273 current_thread.
9274 (windows_fetch_inferior_registers): Don't set current_thread,
9275 pass the thread to do_windows_fetch_inferior_registers. Use
9276 ptid from regcache instead of inferior_ptid.
9277 (do_windows_store_inferior_registers): Add windows_thread_info
9278 parameter and use it instead of current_thread.
9279 (windows_store_inferior_registers): Don't set current_thread,
9280 pass the thread to do_windows_store_inferior_registers. Use
9281 ptid from regcache instead of inferior_ptid.
9282
9283 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9284
9285 * ser-mingw.c (ser_windows_raw): Remove reference to
9286 struct serial::current_timeout.
9287
9288 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
9289
9290 PR tdep/20928
9291 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9292 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9293 (sparc64_fsr_type): Fix %fsr decoding.
9294
9295 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
9296
9297 * python/py-record-btrace.c (btpy_insn_data): Change return type
9298 for Python 2.
9299
9300 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9301
9302 * spu-linux-nat.c (spu_fetch_inferior_registers,
9303 spu_store_inferior_registers): Use ptid from regcache, set and
9304 restore inferior_ptid.
9305 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9306 Likewise.
9307
9308 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9309
9310 * i386-linux-nat.c (fetch_register, store_register,
9311 i386_linux_fetch_inferior_registers,
9312 i386_linux_store_inferior_registers): Use ptid from regcache.
9313 * ia64-linux-nat.c (ia64_linux_fetch_register,
9314 ia64_linux_store_register): Likewise.
9315 * inf-ptrace.c (inf_ptrace_fetch_register,
9316 inf_ptrace_store_register): Likewise.
9317 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
9318 m32r_linux_store_inferior_registers): Likewise.
9319 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
9320 m68kbsd_store_inferior_registers): Likewise.
9321 * m68k-linux-nat.c (fetch_register, store_register,
9322 m68k_linux_fetch_inferior_registers,
9323 m68k_linux_store_inferior_registers): Likewise.
9324 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
9325 m88kbsd_store_inferior_registers): Likewise.
9326 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
9327 mips_fbsd_store_inferior_registers): Likewise.
9328 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
9329 mips64_linux_regsets_store_registers): Likewise.
9330 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
9331 mipsnbsd_store_inferior_registers): Likewise.
9332 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
9333 mips64obsd_store_inferior_registers): Likewise.
9334 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
9335 Likewise.
9336 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
9337 ppcfbsd_store_inferior_registers): Likewise.
9338 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
9339 ppc_linux_store_inferior_registers): Likewise.
9340 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
9341 ppcnbsd_store_inferior_registers): Likewise.
9342 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
9343 ppcobsd_store_registers): Likewise.
9344 * procfs.c (procfs_fetch_registers, procfs_store_registers):
9345 Likewise.
9346 * ravenscar-thread.c (ravenscar_fetch_registers,
9347 ravenscar_store_registers, ravenscar_prepare_to_store):
9348 Likewise.
9349 * record-btrace.c (record_btrace_fetch_registers,
9350 record_btrace_store_registers, record_btrace_prepare_to_store):
9351 Likewise.
9352 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
9353 Lookup inferior using ptid from regcache, instead of
9354 current_inferior.
9355 * remote.c (remote_fetch_registers, remote_store_registers): Use
9356 ptid from regcache.
9357 * rs6000-nat.c (fetch_register, store_register): Likewise.
9358 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
9359 s390_linux_store_inferior_registers): Likewise.
9360 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
9361 shnbsd_store_inferior_registers): Likewise.
9362 * sol-thread.c (sol_thread_fetch_registers,
9363 sol_thread_store_registers): Likewise.
9364 * sparc-nat.c (sparc_fetch_inferior_registers,
9365 sparc_store_inferior_registers): Likewise.
9366 * tilegx-linux-nat.c (fetch_inferior_registers,
9367 store_inferior_registers): Likewise.
9368 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
9369 vaxbsd_store_inferior_registers): Likewise.
9370 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
9371 store_xtregs): Likewise.
9372
9373 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9374
9375 PR gdb/14441
9376 * NEWS: Mention support for rvalue references in GDB and python.
9377 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
9378 supports both lvalue and rvalue references.
9379
9380 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9381
9382 PR gdb/14441
9383 * gdbtypes.c (rank_one_type): Implement overloading
9384 resolution rules regarding rvalue references.
9385
9386 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9387
9388 PR gdb/14441
9389 * aarch64-tdep.c (aarch64_type_align)
9390 (aarch64_extract_return_value, aarch64_store_return_value): Change
9391 lvalue reference type checks to general reference type checks.
9392 * amd64-tdep.c (amd64_classify): Likewise.
9393 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
9394 Likewise.
9395 * arm-tdep.c (arm_type_align, arm_extract_return_value)
9396 (arm_store_return_value): Likewise.
9397 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
9398 * c-typeprint.c (c_print_type): Likewise.
9399 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
9400 (cplus_number_of_children, cplus_describe_child): Likewise.
9401 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
9402 * completer.c (expression_completer): Likewise.
9403 * cp-support.c (make_symbol_overload_list_adl_namespace):
9404 Likewise.
9405 * darwin-nat-info.c (info_mach_region_command): Likewise.
9406 * dwarf2loc.c (entry_data_value_coerce_ref)
9407 (value_of_dwarf_reg_entry): Likewise.
9408 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
9409 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
9410 Likewise.
9411 * findvar.c (extract_typed_address, store_typed_address):
9412 Likewise.
9413 * gdbtypes.c (rank_one_type): Likewise.
9414 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
9415 * infcall.c (value_arg_coerce): Likewise.
9416 * language.c (pointer_type): Likewise.
9417 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
9418 Likewise.
9419 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
9420 * mn10300-tdep.c (mn10300_type_align): Likewise.
9421 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
9422 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
9423 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
9424 Likewise.
9425 * printcmd.c (print_formatted, x_command): Likewise.
9426 * python/py-type.c (typy_get_composite, typy_template_argument):
9427 Likewise.
9428 * python/py-value.c (valpy_referenced_value)
9429 (valpy_get_dynamic_type, value_has_field): Likewise.
9430 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
9431 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
9432 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
9433 * spu-tdep.c (spu_scalar_value_p): Likewise.
9434 * symtab.c (lookup_symbol_aux): Likewise.
9435 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
9436 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
9437 Likewise.
9438 * valops.c (value_cast_pointers, value_cast)
9439 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
9440 (value_struct_elt, value_struct_elt_bitpos)
9441 (value_find_oload_method_list, find_overload_match)
9442 (value_rtti_indirect_type): Likewise.
9443 * valprint.c (val_print_scalar_type_p, generic_val_print):
9444 Likewise.
9445 * value.c (value_actual_type, value_as_address, unpack_long)
9446 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
9447 (coerce_ref): Likewise.
9448 * varobj.c (varobj_get_value_type): Likewise.
9449
9450 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9451
9452 PR gdb/14441
9453 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
9454 table of constants.
9455 * python/lib/gdb/command/explore.py: Support exploring values
9456 of rvalue reference types.
9457 * python/lib/gdb/types.py: Implement get_basic_type() for
9458 rvalue reference types.
9459 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
9460 constant.
9461 * python/py-value.c (valpy_getitem): Add an rvalue reference
9462 check.
9463 (valpy_reference_value): Add new parameter "refcode".
9464 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
9465 New wrappers for valpy_reference_value().
9466 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9467 (gdbpy_invoke_xmethod): Likewise.
9468
9469 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9470
9471 PR gdb/14441
9472 * dwarf2read.c (process_die, read_type_die_1): Handle the
9473 DW_TAG_rvalue_reference_type DIE.
9474 (read_tag_reference_type): Add new parameter "refcode".
9475
9476 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9477
9478 PR gdb/14441
9479 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
9480 (c_type_print_modifier, c_type_print_varspec_suffix)
9481 (c_type_print_base): Support printing rvalue reference types.
9482 * c-valprint.c (c_val_print, c_value_print): Support printing
9483 rvalue reference values.
9484
9485 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9486
9487 PR gdb/14441
9488 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
9489 typename.
9490 * cp-support.c (replace_typedefs): Handle
9491 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
9492 * python/py-type.c (typy_lookup_type): Likewise.
9493
9494 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9495
9496 PR gdb/14441
9497 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
9498 * parse.c (insert_type): Change assert statement.
9499 (follow_types): Handle rvalue reference types.
9500 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
9501 constant.
9502
9503 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9504
9505 PR gdb/14441
9506 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
9507 value_ref() interface.
9508 * c-valprint.c (c_value_print): Likewise.
9509 * infcall.c (value_arg_coerce): Likewise.
9510 * python/py-value.c (valpy_reference_value): Likewise.
9511 * valops.c (value_cast, value_reinterpret_cast)
9512 (value_dynamic_cast, typecmp): Likewise.
9513 (value_ref): Parameterize by kind of return value reference type.
9514 * value.h (value_ref): Add new parameter "refcode".
9515
9516 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9517
9518 PR gdb/14441
9519 * dwarf2read.c (read_tag_reference_type): Use
9520 lookup_lvalue_reference_type() instead of lookup_reference_type().
9521 * eval.c (evaluate_subexp_standard): Likewise.
9522 * f-exp.y: Likewise.
9523 * gdbtypes.c (make_reference_type, lookup_reference_type):
9524 Generalize with rvalue reference types.
9525 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
9526 convenience wrappers for lookup_reference_type().
9527 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
9528 reference kind parameter.
9529 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
9530 wrappers for lookup_reference_type().
9531 * guile/scm-type.c (gdbscm_type_reference): Use
9532 lookup_lvalue_reference_type() instead of lookup_reference_type().
9533 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
9534 * parse.c (follow_types): Likewise.
9535 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
9536 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
9537 Likewise.
9538 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9539 (gdbpy_invoke_xmethod): Likewise.
9540 * stabsread.c: Provide extra argument to make_reference_type()
9541 call.
9542 * valops.c (value_ref, value_rtti_indirect_type): Use
9543 lookup_lvalue_reference_type() instead of lookup_reference_type().
9544
9545 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9546
9547 PR gdb/14441
9548 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
9549 (TYPE_IS_REFERENCE): New macro.
9550 (struct type): Add rvalue_reference_type field.
9551 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
9552
9553 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9554
9555 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
9556 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
9557 New function definition.
9558 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
9559 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
9560 New function declaration.
9561 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
9562 * mi/mi-interp.h: New file.
9563 * solib.c (info_sharedlibrary_command): Replace for loop with
9564 ALL_SO_LIBS macro
9565 * solib.h (update_solib_list): New function declaration.
9566 (so_list_head): Move macro.
9567 * solist.h (ALL_SO_LIBS): New macro.
9568
9569 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9570
9571 * infcmd.c (post_create_inferior): Remove unused argument in
9572 call to solib_add.
9573 * remote.c (remote_start_remote): Likewise.
9574 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
9575 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
9576 (enable_break): Likewise.
9577 * solib.c (update_solib_list): Remove unused target argument
9578 and its documentation.
9579 (solib_add): Remove unused target argument. Remove unused
9580 argument in call to update_solib_list.
9581 (info_sharedlibrary_command): Remove unused argument in call
9582 to update_solib_list.
9583 (sharedlibrary_command): Remove unused argument in call to
9584 solib_add.
9585 (handle_solib_event): Likewise.
9586 (reload_shared_libraries): Likewise.
9587 * solib.h (solib_add): Remove unused target argument.
9588
9589 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
9590
9591 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
9592 (s390_displaced_step_fixup): Cover relative branches with the
9593 default fixup handling. This fixes lack of support for some
9594 relative branch instructions.
9595
9596 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9597
9598 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
9599 ptid from regcache.
9600
9601 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9602
9603 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
9604 i386_darwin_store_inferior_registers): Use ptid from regcache.
9605
9606 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9607
9608 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
9609 i386bsd_store_inferior_registers): Use ptid from regcache.
9610
9611 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9612
9613 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
9614 hppaobsd_store_registers): Use ptid from regcache.
9615
9616 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9617
9618 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
9619 hppanbsd_store_registers): Use ptid from regcache.
9620
9621 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9622
9623 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
9624 from regcache. Use get_ptrace_pid.
9625
9626 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9627
9628 * corelow.c (get_core_register_section): Use ptid from regcache,
9629 update doc.
9630
9631 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9632
9633 * bsd-uthread.c (bsd_uthread_fetch_registers,
9634 bsd_uthread_store_registers): Use ptid from regcache, set and
9635 restore inferior_ptid.
9636
9637 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9638
9639 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
9640 fetch_fp_regs, store_register, store_regs, store_fp_register,
9641 store_fp_regs): Use ptid from regcache.
9642
9643 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9644
9645 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
9646 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
9647 store_vfp_regs): Use ptid from regcache.
9648
9649 2017-03-17 Pedro Alves <palves@redhat.com>
9650
9651 PR remote/21188
9652 * ser-base.c (ser_base_wait_for): Add comment.
9653 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
9654 version.
9655 * ser-unix.c (hardwire_raw): Remove reference to
9656 scb->current_timeout.
9657 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
9658 (hardwire_ops): Install ser_base_readchar instead of
9659 hardwire_readchar.
9660 * serial.h (struct serial) <current_timeout, timeout_remaining>:
9661 Remove fields.
9662
9663 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
9664
9665 PR gdb/19637
9666 * python/lib/gdb/printer/bound_registers.py: Add support for
9667 Python 3.
9668
9669 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
9670
9671 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
9672 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
9673 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
9674 byte_offset to subobj_byte_offset. Fix the handling of
9675 DWARF_VALUE_STACK on big-endian targets when coming via an
9676 implicit pointer.
9677 (dwarf2_evaluate_loc_desc): Adjust call to
9678 dwarf2_evaluate_loc_desc_full.
9679 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
9680 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
9681
9682 2017-03-16 Yao Qi <yao.qi@linaro.org>
9683
9684 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
9685 and REVSH instructions.
9686
9687 2017-03-16 Yao Qi <yao.qi@linaro.org>
9688
9689 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
9690 (arm_record_test): Declare.
9691 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
9692 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
9693 align with the manual.
9694 (thumb_record_misc): Adjust the code order to align with the
9695 manual.
9696 (thumb2_record_decode_insn_handler): Fix instruction matching.
9697 (instruction_reader_thumb): New class.
9698 (arm_record_test): New function.
9699
9700 2017-03-16 Yao Qi <yao.qi@linaro.org>
9701
9702 * arm-tdep.c (abstract_memory_reader): New class.
9703 (instruction_reader): New class.
9704 (extract_arm_insn): Add argument 'reader'. Callers updated.
9705 (decode_insn): Likewise.
9706
9707 2017-03-16 Doug Evans <dje@google.com>
9708
9709 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
9710 member. Change type of TYPE member to SCM. All uses updated.
9711 (lsscm_make_lazy_string_smob): Add assert.
9712 (lsscm_make_lazy_string): Flag bad length values.
9713 (lsscm_elt_type): New function.
9714 (gdbscm_lazy_string_to_value): Rewrite to use
9715 lsscm_safe_lazy_string_to_value.
9716 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
9717 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
9718 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
9719 in incoming type.
9720 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9721 * guile/scm-type.c (tyscm_scm_to_type): New function.
9722
9723 2017-03-15 Doug Evans <dje@google.com>
9724
9725 PR python/17728, python/18439, python/18779
9726 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
9727 member. Change type of TYPE member to PyObject *. All uses updated.
9728 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
9729 (gdbpy_create_lazy_string_object): Flag bad length values.
9730 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
9731 Handle typedefs in incoming type.
9732 (stpy_lazy_string_elt_type): New function.
9733 (gdbpy_extract_lazy_string): Call it.
9734 * python/py-value.c (valpy_lazy_string): Flag bad length values.
9735 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
9736 typedefs in incoming type.
9737
9738 2017-03-16 Doug Evans <dje@google.com>
9739
9740 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9741 * guile/scm-type.c (tyscm_scm_to_type): New function.
9742
9743 2017-03-16 Jiong Wang <jiong.wang@arm.com>
9744
9745 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
9746 "ULONGEST" for "skip".
9747
9748 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9749
9750 PR gdb/21220
9751 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
9752 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
9753 (inf_ptrace_peek_poke): ...here. New function. Now also loop
9754 over ptrace peek/poke until end of buffer or error.
9755
9756 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
9757
9758 * parse.c (length_of_subexp): Make static.
9759 * parser-defs.h (length_of_subexp): Remove.
9760
9761 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9762
9763 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9764 as well.
9765
9766 2017-03-14 Pedro Alves <palves@redhat.com>
9767
9768 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9769 (main): Use std::unique_ptr. Remove calls to
9770 cp_demangled_name_parse_free.
9771
9772 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9773
9774 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9775 alphabsd_store_inferior_registers): Use regcache->ptid instead
9776 of inferior_ptid.
9777
9778 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9779
9780 * aix-thread.c (aix_thread_fetch_registers,
9781 aix_thread_store_registers): Use regcache->ptid instead of
9782 inferior_ptid.
9783
9784 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9785
9786 * aarch64-linux-nat.c (fetch_gregs_from_thread,
9787 store_gregs_to_thread, fetch_fpregs_from_thread,
9788 store_fpregs_to_thread): Use regcache->ptid instead of
9789 inferior_ptid.
9790
9791 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9792
9793 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9794 amd64_linux_fetch_inferior_registers): Use regcache->ptid
9795 instead of inferior_ptid.
9796
9797 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9798
9799 * target.c (target_fetch_registers, target_store_registers): Add
9800 assert.
9801
9802 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9803
9804 * regcache.h (regcache_get_ptid): New function.
9805 * regcache.c (regcache_get_ptid): New function.
9806
9807 2017-03-13 Mark Wielaard <mark@klomp.org>
9808
9809 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9810
9811 2017-03-10 Keith Seitz <keiths@redhat.com>
9812
9813 PR c++/8218
9814 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9815
9816 2017-03-08 Pedro Alves <palves@redhat.com>
9817
9818 PR gdb/18360
9819 * infrun.c (start_step_over, do_target_resume, resume)
9820 (restart_threads): Assert we're not resuming a thread that is
9821 meant to be stopped.
9822 (infrun_thread_stop_requested_callback): Delete.
9823 (infrun_thread_stop_requested): If the thread is internally
9824 stopped, queue a pending stop event and clear the thread's
9825 inline-frame state.
9826 (handle_stop_requested): New function.
9827 (handle_syscall_event, handle_inferior_event_1): Use
9828 handle_stop_requested.
9829 (handle_stop_requested): New function.
9830 (handle_signal_stop): Set the thread's stop_signal here instead of
9831 at caller.
9832 (finish_step_over): Clear step over info unconditionally.
9833 (handle_signal_stop): If the user had interrupted the event
9834 thread, consider the stop a random signal.
9835 (handle_signal_stop) <signal arrived while stepping over
9836 breakpoint>: Don't restart threads here.
9837 (stop_waiting): Don't clear step-over info here.
9838
9839 2017-03-08 Pedro Alves <palves@redhat.com>
9840
9841 PR 21206
9842 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
9843 goes to argument 2, not 1.
9844
9845 2017-03-08 Pedro Alves <palves@redhat.com>
9846
9847 PR cli/21218
9848 * top.c (gdb_readline_wrapper): Avoid passing NULL to
9849 display_gdb_prompt.
9850 (command_line_input): Add comment.
9851
9852 2017-03-08 Pedro Alves <palves@redhat.com>
9853
9854 PR tui/21216
9855 * tui/tui-file.c (tui_file::write): New.
9856 * tui/tui-file.h (tui_file): Override "write".
9857 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
9858 factored out from ...
9859 (tui_puts): ... here.
9860 (tui_putc): Use them.
9861 (tui_write): New function.
9862 * tui/tui-io.h (tui_write): Declare.
9863
9864 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
9865
9866 * Makefile.in (SFILES): Replace "environ.c" with
9867 "common/environ.c".
9868 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
9869 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
9870 to...
9871 * common/environ.c: ... here.
9872 * environ.h: Moved to...
9873 * common/environ.h: ... here.
9874
9875 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9876
9877 * gdbarch.sh (pstring_ptr): New static function.
9878 (gdbarch_disassembler_options): Use it.
9879 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
9880 not valid_disassembler_option->name.
9881 * gdbarch.c: Regenerate.
9882
9883 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9884
9885 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
9886
9887 2017-03-07 Pedro Alves <palves@redhat.com>
9888
9889 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
9890
9891 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
9892
9893 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
9894 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
9895 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
9896 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
9897
9898 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
9899
9900 * xtensa-linux-nat.c (fetch_gregs): Remove const.
9901
9902 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
9903
9904 * remote.c (remote_add_target_side_commands): Use range-based
9905 for loop.
9906
9907 2017-03-03 Yao Qi <yao.qi@linaro.org>
9908
9909 PR gdb/21165
9910 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
9911 value is lazy.
9912 * valprint.c (common_val_print): Likewise.
9913
9914 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
9915
9916 * NEWS: Mention new set/show disassembler-options commands.
9917 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
9918 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
9919 (prospective_options): New static variable.
9920 (gdb_disassembler::gdb_disassembler): Initialize
9921 m_di.disassembler_options.
9922 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
9923 (get_disassembler_options): New function.
9924 (set_disassembler_options): Likewise.
9925 (set_disassembler_options_sfunc): Likewise.
9926 (show_disassembler_options_sfunc): Likewise.
9927 (disassembler_options_completer): Likewise.
9928 (_initialize_disasm): Likewise.
9929 * disasm.h (get_disassembler_options): New prototype.
9930 (set_disassembler_options): Likewise.
9931 * gdbarch.sh (gdbarch_disassembler_options): New variable.
9932 (gdbarch_verify_disassembler_options): Likewise.
9933 * gdbarch.c: Regenerate.
9934 * gdbarch.h: Likewise.
9935 * arm-tdep.c (num_disassembly_options): Delete.
9936 (set_disassembly_style): Likewise.
9937 (arm_disassembler_options): New static variable.
9938 (set_disassembly_style_sfunc): Convert short style name into long
9939 option name. Call set_disassembler_options.
9940 (show_disassembly_style_sfunc): New function.
9941 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
9942 set_gdbarch_verify_disassembler_options.
9943 (_initialize_arm_tdep): Delete regnames variable and update callers.
9944 (arm_disassembler_options): Initialize.
9945 (disasm_options): New variable.
9946 (num_disassembly_options): Rename from this...
9947 (num_disassembly_styles): ...to this. Compute by scanning through
9948 disasm_options.
9949 (valid_disassembly_styles): Initialize using disasm_options.
9950 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
9951 set_arm_regname_option.
9952 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
9953 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
9954 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
9955 set_gdbarch_verify_disassembler_options.
9956 * s390-tdep.c (s390_disassembler_options): New static variable.
9957 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
9958 set_gdbarch_verify_disassembler_options.
9959
9960 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9961
9962 * remote.c (remote_add_target_side_condition): Remove "struct"
9963 keyword from range-based for loop.
9964
9965 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9966
9967 * remote.c (remote_add_target_side_condition): Use range-based
9968 for loop. Update comment.
9969
9970 2017-02-27 Yao Qi <yao.qi@linaro.org>
9971
9972 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
9973
9974 2017-02-26 Alan Hayward <alan.hayward@arm.com>
9975
9976 * regcache.c (regcache_raw_update): New function.
9977 (regcache_raw_read): Move code to regcache_raw_update.
9978 * regcache.h (regcache_raw_update): New declaration.
9979 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
9980
9981 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
9982
9983 * dwarf2read.c (create_debug_type_hash_table): Initialize
9984 header.signature and header.type_offset_in_tu.
9985
9986 2017-02-24 Pedro Alves <palves@redhat.com>
9987
9988 * symtab.c (make_file_symbol_completion_list_1): Use
9989 add_symtab_completions.
9990
9991 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9992
9993 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
9994
9995 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9996
9997 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
9998 I386_MAX_REGISTER_SIZE.
9999 (i386_pseudo_register_write): Likewise.
10000 (i386_process_record): Likewise.
10001 * i387-tdep.c (i387_supply_xsave): Likewise.
10002 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
10003 (store_register): Likewise.
10004
10005 2017-02-23 Pedro Alves <palves@redhat.com>
10006
10007 * ada-lang.c: Include "common/function-view.h".
10008 (ada_iterate_over_symbols): Adjust to use function_view as
10009 callback type.
10010 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
10011 (ada_make_symbol_completion_list): Use a lambda.
10012 (ada_exc_search_name_matches): Delete.
10013 (name_matches_regex): New.
10014 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
10015 * compile/compile-c-support.c: Include "common/function-view.h".
10016 (print_one_macro): Change prototype to accept a ui_file pointer.
10017 (write_macro_definitions): Use a lambda.
10018 * dwarf2read.c: Include "common/function-view.h".
10019 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
10020 (dw2_expand_symtabs_matching): Adjust to use function_view as
10021 callback type.
10022 * language.h: Include "common/function-view.h".
10023 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
10024 function_view as callback type.
10025 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
10026 * linespec.c: Include "common/function-view.h".
10027 (collect_info::add_symbol): New method.
10028 (struct symbol_and_data_callback, iterate_inline_only, struct
10029 symbol_matcher_data, iterate_name_matcher): Delete.
10030 (iterate_over_all_matching_symtabs): Adjust to use function_view
10031 as callback type and lambdas.
10032 (iterate_over_file_blocks): Adjust to use function_view as
10033 callback type.
10034 (decode_compound_collector): Now a class with private fields.
10035 (decode_compound_collector::release_symbols): New method.
10036 (collect_one_symbol): Rename to...
10037 (decode_compound_collector::operator()): ... this and adjust.
10038 (lookup_prefix_sym): decode_compound_collector construction bits
10039 move to decode_compound_collector ctor. Pass the
10040 decode_compound_collector object directly as callback. Remove
10041 cleanups and use decode_compound_collector::release_symbols
10042 instead.
10043 (symtab_collector): Now a class with private fields.
10044 (symtab_collector::release_symtabs): New method.
10045 (add_symtabs_to_list): Rename to...
10046 (symtab_collector::operator()): ... this and adjust.
10047 (collect_symtabs_from_filename): symtab_collector construction
10048 bits move to symtab_collector ctor. Pass the symtab_collector
10049 object directly as callback. Remove cleanups and use
10050 symtab_collector::release_symtabs instead.
10051 (collect_symbols): Delete.
10052 (add_matching_symbols_to_info): Use lambdas.
10053 * macrocmd.c (print_macro_callback): Delete.
10054 (info_macro_command): Use a lambda.
10055 (info_macros_command): Pass print_macro_definition as callable
10056 directly.
10057 (print_one_macro): Remove 'ignore' parameter.
10058 (macro_list_command): Adjust.
10059 * macrotab.c (macro_for_each_data::fn): Now a function_view.
10060 (macro_for_each_data::user_data): Delete field.
10061 (foreach_macro): Adjust to call the function_view.
10062 (macro_for_each): Adjust to use function_view as callback type.
10063 (foreach_macro_in_scope): Adjust to call the function_view.
10064 (macro_for_each_in_scope): Adjust to use function_view as callback
10065 type.
10066 * macrotab.h: Include "common/function-view.h".
10067 (macro_callback_fn): Declare a prototype instead of a pointer.
10068 Remove "user_data" parameter.
10069 (macro_for_each, macro_for_each_in_scope): Adjust to use
10070 function_view as callback type.
10071 * psymtab.c (partial_map_expand_apply)
10072 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
10073 Adjust to use function_view as callback type and to return bool.
10074 (psym_expand_symtabs_matching): Adjust to use function_view as
10075 callback types.
10076 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
10077 to use function_view as callback type and to return bool.
10078 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
10079 callback types.
10080 * symfile.c (expand_symtabs_matching): Adjust to use function_view
10081 as callback types.
10082 * symfile.h: Include "common/function-view.h".
10083 (expand_symtabs_file_matcher_ftype)
10084 (expand_symtabs_symbol_matcher_ftype)
10085 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
10086 return bool.
10087 (quick_symbol_functions::map_symtabs_matching_filename)
10088 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
10089 function_view as callback type and return bool.
10090 (expand_symtabs_matching): Adjust to use function_view as callback
10091 type.
10092 (maintenance_expand_name_matcher)
10093 (maintenance_expand_file_matcher): Delete.
10094 (maintenance_expand_symtabs): Use lambdas.
10095 * symtab.c (iterate_over_some_symtabs): Adjust to use
10096 function_view as callback types and return bool.
10097 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
10098 of a cleanup.
10099 (lookup_symtab_callback): Delete.
10100 (lookup_symtab): Use a lambda.
10101 (iterate_over_symbols): Adjust to use function_view as callback
10102 type.
10103 (struct search_symbols_data, search_symbols_file_matches)
10104 (search_symbols_name_matches): Delete.
10105 (search_symbols): Use a pair of lambdas.
10106 (struct add_name_data, add_macro_name, symbol_completion_matcher)
10107 (symtab_expansion_callback): Delete.
10108 (default_make_symbol_completion_list_break_on_1): Use lambdas.
10109 * symtab.h: Include "common/function-view.h".
10110 (iterate_over_some_symtabs): Adjust to use function_view as
10111 callback type and return bool.
10112 (iterate_over_symtabs): Adjust to use function_view as callback
10113 type.
10114 (symbol_found_callback_ftype): Remove 'data' parameter and return
10115 bool.
10116 (iterate_over_symbols): Adjust to use function_view as callback
10117 type.
10118
10119 2017-02-23 Pedro Alves <palves@redhat.com>
10120
10121 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10122 (%.o) <unittests/%.c>: New pattern.
10123 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10124 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10125 * common/function-view.h: New file.
10126 * unittests/function-view-selftests.c: New file.
10127 * configure: Regenerate.
10128
10129 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
10130
10131 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10132 inferior_ptid.
10133 * go32-nat.c (go32_thread_alive): Likewise.
10134
10135 2017-02-23 Yao Qi <yao.qi@linaro.org>
10136
10137 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10138 delete.
10139
10140 2017-02-23 Yao Qi <yao.qi@linaro.org>
10141
10142 * varobj.c (varobj_clear_saved_item): Use delete instead of
10143 xfree.
10144 (update_dynamic_varobj_children): Likewise.
10145
10146 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10147
10148 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10149
10150 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
10151
10152 * common/enum-flags.h (enum_flags::enum_flags): Initialize
10153 m_enum_value to 0 in default constructor.
10154
10155 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
10156
10157 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10158 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10159 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10160 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10161 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10162 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10163 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10164 IS_STORE_CONDITIONAL_INSN.
10165
10166 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10167
10168 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10169
10170 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10171
10172 * NEWS (Changes since GDB 7.12): Add DWARF-5.
10173
10174 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10175
10176 * dwarf2read.c (skip_one_die, read_attribute_value)
10177 (dwarf2_const_value_attr, dump_die_shallow)
10178 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10179 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10180
10181 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10182
10183 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10184 (dwarf_parse_macro_header): Accept DWARF version 5.
10185 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10186
10187 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10188
10189 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10190 DW_AT_GNU_*.
10191 * common/common-exceptions.h (enum errors): Likewise.
10192 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10193 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10194 (dwarf_expr_context::execute_stack_op): Likewise.
10195 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10196 Likewise.
10197 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10198 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10199 (show_entry_values_debug, call_site_to_target_addr)
10200 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10201 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10202 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10203 (value_of_dwarf_block_entry, indirect_pieced_value)
10204 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
10205 (disassemble_dwarf_expression): Likewise.
10206 * dwarf2read.c (process_die, inherit_abstract_dies)
10207 (read_call_site_scope): Likewise.
10208 * gdbtypes.h (struct func_type, struct call_site_parameter)
10209 (struct call_site): Likewise.
10210 * stack.c (read_frame_arg): Likewise.
10211 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
10212
10213 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10214
10215 * defs.h (read_unsigned_leb128): New declaration.
10216 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
10217 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
10218 (dwarf2_find_location_expression): Call also
10219 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
10220 * dwarf2loc.h (dwarf2_version): New declaration.
10221 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
10222 rnglists.
10223 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
10224 .debug_rnglists.
10225 (struct dwop_section_names): Add loclists_dwo.
10226 (dwop_section_names): Add .debug_loclists.dwo.
10227 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
10228 (struct dwarf2_per_cu_data): Add dwarf_version.
10229 (struct dwo_sections): Add loclists.
10230 (struct attr_abbrev): Add implicit_const.
10231 (read_indirect_line_string): New declaration.
10232 (read_unsigned_leb128): Delete declaration.
10233 (rcuh_kind): New definition.
10234 (read_and_check_comp_unit_head): Change parameter
10235 is_debug_types_section to section_kind.
10236 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
10237 (read_comp_unit_head): Change parameter abfd to section, add parameter
10238 section_kind. Handle DWARF-5.
10239 (error_check_comp_unit_head): Accept also DWARF version 5.
10240 (read_and_check_comp_unit_head): Change parameter
10241 is_debug_types_section to section_kind.
10242 (read_and_check_type_unit_head): Delete function.
10243 (read_abbrev_offset): Handle DWARF-5.
10244 (create_debug_type_hash_table): Add parameter section_kind. Process
10245 only DW_UT_type. Use signature and type_offset_in_tu from struct
10246 comp_unit_head.
10247 (create_debug_types_hash_table): Update create_debug_type_hash_table
10248 caller.
10249 (create_all_type_units): Call create_debug_type_hash_table.
10250 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10251 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10252 caller.
10253 (skip_one_die): Handle DW_FORM_implicit_const.
10254 (dwarf2_rnglists_process): New function.
10255 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10256 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10257 (read_attribute_value): Handle DW_FORM_implicit_const,
10258 DW_FORM_line_strp.
10259 (read_attribute): Handle DW_FORM_implicit_const.
10260 (read_indirect_string_at_offset_from): New function from
10261 read_indirect_string_at_offset.
10262 (read_indirect_string_at_offset): Call
10263 read_indirect_string_at_offset_from.
10264 (read_indirect_line_string_at_offset): New function.
10265 (read_indirect_string): New function comment.
10266 (read_indirect_line_string): New function.
10267 (read_unsigned_leb128): Make it global.
10268 (dwarf2_string_attr): Handle DWARF-5.
10269 (add_include_dir_stub, read_formatted_entries): New functions.
10270 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10271 Handle DWARF-5.
10272 (per_cu_header_read_in): Update read_comp_unit_head caller.
10273 (dwarf2_version): New function.
10274 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10275 rnglists.
10276 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10277 fields.
10278
10279 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10280
10281 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10282
10283 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10284
10285 * dwarf2read.c (dwarf2_ranges_process): New function from
10286 dwarf2_ranges_read.
10287 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10288 dwarf2_ranges_process.
10289
10290 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10291
10292 * dwarf2read.c (create_debug_type_hash_table): New function from
10293 create_debug_types_hash_table.
10294 (create_debug_types_hash_table): Call create_debug_type_hash_table.
10295 (create_all_type_units, open_and_init_dwo_file): Update
10296 create_debug_types_hash_table callers.
10297
10298 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10299
10300 PR gdb/16188
10301 * fork-child.c (trace_start_error): Fix thinko. va_end should
10302 refer to 'ap', not 'args'.
10303
10304 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10305 Pedro Alves <palves@redhat.com>
10306
10307 PR gdb/16188
10308 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
10309 calls succeeded.
10310 * fork-child.c (trace_start_error): New function.
10311 (trace_start_error_with_name): Likewise.
10312 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
10313 * inf-ptrace.c (inf_ptrace_me): Likewise.
10314 * inferior.h (trace_start_error): New prototype.
10315 (trace_start_error_with_name): Likewise.
10316
10317 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
10318
10319 PR gdb/21164
10320 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
10321 NULL before using it.
10322 * symmisc.c (maintenance_print_symbols): Likewise.
10323 (maintenance_print_msymbols): Likewise.
10324
10325 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10326
10327 * NEWS: Add record Python bindings entry.
10328
10329 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10330
10331 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
10332 py-record-full.o.
10333 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
10334 * python/py-record-btrace.c, python/py-record-btrace.h,
10335 python/py-record-full.c, python/py-record-full.h: New file.
10336 * python/py-record.c: Add include for py-record-btrace.h and
10337 py-record-full.h.
10338 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
10339 recpy_instruction_history, recpy_function_call_history, recpy_begin,
10340 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
10341 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
10342 New definition.
10343 (gdbpy_initialize_btrace): New export.
10344 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
10345
10346 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10347
10348 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
10349 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
10350 * python/py-record.c: New file.
10351 * python/python-internal.h (gdbpy_start_recording,
10352 gdbpy_current_recording, gdpy_stop_recording,
10353 gdbpy_initialize_record): New export.
10354 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
10355 (python_GdbMethods): Add gdbpy_start_recording,
10356 gdbpy_current_recording and gdbpy_stop_recording.
10357
10358 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10359
10360 * record-btrace.c (record_btrace_record_method): New function.
10361 (init_record_btrace_ops): Initialize to_record_method.
10362 * record-full.c (record_full_record_method): New function.
10363 (init_record_full_ops, init_record_full_core_ops): Add
10364 record_full_record_method.
10365 * record.h (enum record_method): New enum.
10366 * target-debug.h (target_debug_print_enum_record_method: New define.
10367 * target-delegates.c: Regenerate.
10368 * target.c (target_record_method): New function.
10369 * target.h: Include record.h.
10370 (struct target_ops) <to_record_method>: New field.
10371 (target_record_method): New export.
10372
10373 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10374
10375 * record.h (record_start, record_stop): New export.
10376 * record.c (record_start, record_stop): New function.
10377
10378 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10379
10380 * btrace.c (btrace_fetch): Copy function call segments pointer
10381 into a vector.
10382 (btrace_clear): Clear the vector.
10383 (btrace_find_insn_by_number): Use binary search to find the correct
10384 function call segment.
10385 * btrace.h (brace_fun_p): New typedef.
10386 (struct btrace_thread_info) <functions>: New field.
10387
10388 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10389
10390 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
10391 * btrace.c (btrace_decode_error): ... here. New function.
10392 * btrace.h (btrace_decode_error): New export.
10393
10394 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10395
10396 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
10397 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
10398 btrace_find_insn_by_number): Remove special case for gaps.
10399 * btrace.h (btrace_insn_get_error): New export.
10400 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
10401 * record-btrace.c (btrace_insn_history): Print number for gaps.
10402 (record_btrace_info, record_btrace_goto): Handle gaps.
10403
10404 2017-02-14 Tom Tromey <tom@tromey.com>
10405
10406 PR python/13598:
10407 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
10408 event.
10409 * python/py-evts.c (gdbpy_initialize_py_events): Add
10410 before_prompt registry.
10411 * python/py-events.h (events_object) <before_prompt>: New field.
10412
10413 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
10414
10415 * btrace.c (ftrace_new_switch): Preserve up link and flags.
10416
10417 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
10418
10419 * symfile (_initialize_symfile): Add usage text to the load command's
10420 help text.
10421
10422 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
10423
10424 * utils.c (defaulted_query): Don't query on secondary UIs.
10425
10426 2017-02-10 Tom Tromey <tom@tromey.com>
10427
10428 * rust-lang.c (rust_get_disr_info): Remove unused variable.
10429
10430 2017-02-10 Tom Tromey <tom@tromey.com>
10431
10432 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
10433 "cleanup" local.
10434 * python/py-type.c (typy_legacy_template_argument): Remove
10435 unnecessary "cleanup" local.
10436
10437 2017-02-10 Tom Tromey <tom@tromey.com>
10438
10439 * python/python.c (do_start_initialization): New function, from
10440 _initialize_python.
10441 (_initialize_python): Call do_start_initialization.
10442 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
10443 goto.
10444
10445 2017-02-10 Tom Tromey <tom@tromey.com>
10446
10447 * python/py-prettyprint.c (pretty_print_one_value): Use
10448 gdbpy_ref.
10449
10450 2017-02-10 Tom Tromey <tom@tromey.com>
10451
10452 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
10453 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
10454 gdbpy_ref.
10455 * python/py-type.c (field_new): Use gdbpy_ref.
10456 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
10457 gdbpy_ref.
10458 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
10459 (py_free_pspace): Likewise.
10460 (pspace_to_pspace_object): Likewise.
10461 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
10462 (py_free_objfile): Likewise.
10463 (objfile_to_objfile_object): Likewise.
10464 * python/py-inferior.c (delete_thread_object): Use
10465 gdbpy_ref.
10466 (infpy_read_memory): Likewise.
10467 (py_free_inferior): Likewise.
10468 * python/py-evtregistry.c (create_eventregistry_object): Use
10469 gdbpy_ref.
10470 * python/py-event.c (create_event_object): Use gdbpy_ref.
10471
10472 2017-02-10 Tom Tromey <tom@tromey.com>
10473
10474 * python/py-ref.h (gdbpy_ref_policy): Now a template.
10475 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
10476 used.
10477 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
10478 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
10479 python/py-exitedevent.c, python/py-finishbreakpoint.c,
10480 python/py-framefilter.c, python/py-function.c,
10481 python/py-inferior.c, python/py-infevents.c,
10482 python/py-linetable.c, python/py-newobjfileevent.c,
10483 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
10484 python/py-signalevent.c, python/py-stopevent.c,
10485 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
10486 python/py-unwind.c, python/py-utils.c, python/py-value.c,
10487 python/py-varobj.c, python/py-xmethods.c, python/python.c,
10488 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
10489
10490 2017-02-10 Tom Tromey <tom@tromey.com>
10491
10492 * ui-out.h (ui_out_emit_type): New class.
10493 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
10494 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
10495 and ui_out_emit_tuple.
10496 (enumerate_locals): Likewise.
10497 (py_mi_print_variables, py_print_locals, py_print_args): Use
10498 ui_out_emit_list.
10499 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
10500 ui_out_emit_list.
10501 * common/gdb_optional.h: New file.
10502
10503 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
10504
10505 * MAINTAINERS (Write After Approval): Update my e-mail address.
10506
10507 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
10508
10509 PR gdb/21122
10510 * breakpoint.c (_initialize_breakpoint): Update the help description
10511 of the 'commands' command to indicate that it takes a list argument.
10512
10513 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
10514
10515 * interps.c (current_interp_set_logging): Remove "return".
10516
10517 2017-02-09 Gary Benson <gbenson@redhat.com>
10518
10519 * symtab.c (add_symtab_completions): Prevent NULL pointer
10520 dereference.
10521
10522 2017-02-08 Pedro Alves <palves@redhat.com>
10523
10524 * interps.c (interp::interp): Remove reference to quiet_p.
10525 (interp_set): Make static. Remove dead "Switching to" output
10526 code.
10527 (interp_quiet_p, interp_set_quiet): Delete.
10528 (interpreter_exec_cmd): Don't set the interpreter quiet.
10529 * interps.h (interp_quiet_p): Make static.
10530 (class interp) <quiet_p>: Remove field
10531
10532 2017-02-08 Jerome Guitton <guitton@adacore.com>
10533
10534 * cli/cli-decode.c (find_command_name_length): Make it extern.
10535 * cli/cli-decode.h (find_command_name_length): Declare.
10536 * cli/cli-script.c (command_name_equals, line_first_arg):
10537 New functions.
10538 (process_next_line): Use cli-decode to parse command names.
10539 (build_command_line): Make args a constant pointer.
10540
10541 2017-02-08 Jerome Guitton <guitton@adacore.com>
10542
10543 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
10544 Remove case-insensitive search.
10545
10546 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
10547
10548 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
10549 at the end of the line. Avoids an ARI warning.
10550
10551 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
10552
10553 * NEWS: Mention support for record/replay of Intel 64 rdrand and
10554 rdseed instructions.
10555 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
10556
10557 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
10558
10559 PR tdep/20936
10560 Provide and use sparc32 and sparc64 target description XML files.
10561 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
10562 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
10563 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
10564 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
10565 * features/sparc/sparc32-solaris.xml: New file.
10566 * features/sparc/sparc64-solaris.xml: New file.
10567 * features/sparc/sparc32-solaris.c: Generated.
10568 * features/sparc/sparc64-solaris.c: Generated.
10569 * sparc-tdep.h: Account for differences in target descriptions.
10570 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
10571 (sparc32_register_type): Use target provided registers.
10572 (validate_tdesc_registers): New function.
10573 (sparc32_gdbarch_init): Use tdesc_has_registers.
10574 Set pseudoregister functions.
10575 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
10576 (sparc64_register_type): Use target provided registers.
10577 (sparc64_init_abi): Set pseudoregister functions.
10578
10579 2017-02-03 Tom Tromey <tom@tromey.com>
10580
10581 PR rust/21097:
10582 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
10583 with a single member.
10584
10585 2017-02-03 Pedro Alves <palves@redhat.com>
10586
10587 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
10588 (cli_interp_base::~cli_interp_base): New.
10589 (cli_interp): New struct.
10590 (as_cli_interp): Cast the interp itself to cli_interp.
10591 (cli_interpreter_pre_command_loop): Rename to ...
10592 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
10593 parameter.
10594 (cli_interpreter_init): Rename to ...
10595 (cli_interp::init): ... this. Remove 'self' parameter. Use
10596 boolean. Make extern.
10597 (cli_interpreter_resume): Rename to ...
10598 (cli_interp::resume): ... this. Remove 'data' parameter. Make
10599 extern.
10600 (cli_interpreter_suspend): Rename to ...
10601 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
10602 extern.
10603 (cli_interpreter_exec): Rename to ...
10604 (cli_interp::exec): ... this. Remove 'data' parameter. Make
10605 extern.
10606 (cli_interpreter_supports_command_editing): Rename to ...
10607 (cli_interp_base::supports_command_editing): ... this. Remove
10608 'interp' parameter. Make extern.
10609 (cli_ui_out): Rename to ...
10610 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
10611 Make extern.
10612 (cli_set_logging): Rename to ...
10613 (cli_interp_base::set_logging): ... this. Remove 'interp'
10614 parameter. Make extern.
10615 (cli_interp_procs): Delete.
10616 (cli_interp_factory): Adjust to use "new".
10617 * cli/cli-interp.h: Include "interps.h".
10618 (struct cli_interp_base): New struct.
10619 * interps.c (struct interp): Delete. Fields moved to interps.h.
10620 (interp_new): Delete.
10621 (interp::interp, interp::~interp): New.
10622 (interp_set): Use bool, and return void. Assume the interpreter
10623 has suspend, init and resume methods, and that the all return
10624 void.
10625 (set_top_level_interpreter): interp_set returns void.
10626 (interp_ui_out): Adapt.
10627 (current_interp_set_logging): Adapt.
10628 (interp_data): Delete.
10629 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
10630 (interp_exec): Adapt.
10631 (top_level_interpreter_data): Delete.
10632 * interps.h (interp_init_ftype, interp_resume_ftype)
10633 (interp_suspend_ftype, interp_exec_ftype)
10634 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
10635 (class interp): New.
10636 (interp_new): Delete.
10637 (interp_set): Now returns void. Use bool.
10638 (interp_data, top_level_interpreter_data): Delete.
10639 * mi/mi-common.h: Include interps.h.
10640 (class mi_interp): Inherit from interp. Define a ctor. Declare
10641 init, resume, suspect, exec, interp_ui_out, set_logging and
10642 pre_command_loop methods.
10643 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
10644 (mi_interpreter_init): Rename to ...
10645 (mi_interp::init): ... this. Remove the 'interp' parameter, use
10646 bool, return void and make extern. Adjust.
10647 (mi_interpreter_resume): ... Rename to ...
10648 (mi_interp::resume): ... this. Remove the 'data' parameter,
10649 return void and make extern. Adjust.
10650 (mi_interpreter_suspend): ... Rename to ...
10651 (mi_interp::suspend): ... this. Remove the 'data' parameter,
10652 return void and make extern. Adjust.
10653 (mi_interpreter_exec): ... Rename to ...
10654 (mi_interp::exec): ... this. Remove the 'data' parameter and make
10655 extern. Adjust.
10656 (mi_interpreter_pre_command_loop): ... Rename to ...
10657 (mi_interp::pre_command_loop): ... this. Remove the 'self'
10658 parameter and make extern.
10659 (mi_on_normal_stop_1): Adjust.
10660 (mi_ui_out): Rename to ...
10661 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
10662 parameter and make extern. Adjust.
10663 (mi_set_logging): Rename to ...
10664 (mi_interp::set_logging): ... this. Remove the 'interp'
10665 parameter and make extern. Adjust.
10666 (mi_interp_procs): Delete.
10667 (mi_interp_factory): Adjust to use 'new'.
10668 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
10669 (mi_print_exception, mi_execute_command, mi_load_progress):
10670 Adjust.
10671 * tui/tui-interp.c (tui_interp): New class.
10672 (as_tui_interp): Return a tui_interp pointer.
10673 (tui_on_normal_stop, tui_on_signal_received)
10674 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
10675 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
10676 to use interp::interp_ui_out.
10677 (tui_init): Rename to ...
10678 (tui_interp::init): ... this. Remove the 'self' parameter, use
10679 bool, return void and make extern. Adjust.
10680 (tui_resume): Rename to ...
10681 (tui_interp::resume): ... this. Remove the 'data' parameter,
10682 return void and make extern. Adjust.
10683 (tui_suspend): Rename to ...
10684 (tui_interp::suspend): ... this. Remove the 'data' parameter,
10685 return void and make extern. Adjust.
10686 (tui_ui_out): Rename to ...
10687 (tui_interp::interp_ui_out): ... this. Remove the 'self'
10688 parameter, and make extern. Adjust.
10689 (tui_exec): Rename to ...
10690 (tui_interp::exec): ... this. Remove the 'data' parameter and
10691 make extern.
10692 (tui_interp_procs): Delete.
10693 (tui_interp_factory): Use "new".
10694
10695 2017-02-02 Tom Tromey <tom@tromey.com>
10696
10697 * rust-exp.y (ends_raw_string, space_then_number)
10698 (rust_identifier_start_p): Return bool.
10699 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
10700 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
10701 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
10702 (rust_chartype_p): Return bool.
10703 (val_print_struct, rust_print_struct_def, rust_print_type):
10704 Update.
10705 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
10706 Return bool.
10707
10708 2017-02-02 Tom Tromey <tom@tromey.com>
10709
10710 * rust-lang.c: Reindent.
10711
10712 2017-02-02 Tom Tromey <tom@tromey.com>
10713
10714 * rust-lang.h (rust_crate_for_block): Update.
10715 * rust-lang.c (rust_crate_for_block): Return std::string.
10716 (rust_get_disr_info): Use std:;string, not
10717 gdb::unique_xmalloc_ptr.
10718 * rust-exp.y (crate_name): Update.
10719
10720 2017-02-02 Pedro Alves <palves@redhat.com>
10721
10722 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
10723 field out of gdb_disassembler_test and make it static.
10724
10725 2017-02-02 Pedro Alves <palves@redhat.com>
10726
10727 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
10728 mi1_interp and mi_interp fields.
10729
10730 2017-02-02 Pedro Alves <palves@redhat.com>
10731
10732 * cli/cli-interp.c (struct saved_output_files, saved_output):
10733 Moved from cli/cli-logging.c.
10734 (cli_set_logging): New function.
10735 (cli_interp_procs): Install cli_set_logging.
10736 * cli/cli-interp.h (make_logging_output, cli_set_logging):
10737 Declare.
10738 * cli/cli-logging.c (struct saved_output_files, saved_output):
10739 Moved to cli/cli-interp.c.
10740 (pop_output_files): Don't save outputs here.
10741 (make_logging_output): New function.
10742 (handle_redirections): Don't build tee nor save previous outputs
10743 here.
10744 * interps.c (current_interp_set_logging): Change prototype.
10745 Assume there's always a set_logging_proc method installed.
10746 * interps.h (interp_set_logging_ftype): Change prototype.
10747 (current_interp_set_logging): Change prototype and adjust comment.
10748 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
10749 use make_logging_output.
10750 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
10751 2017-02-02 Pedro Alves <palves@redhat.com>
10752
10753 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10754 from ...
10755 (set_logging_overwrite): ... here.
10756 (logging_no_redirect_file): Delete.
10757 (set_logging_redirect): Don't handle redirection on the fly.
10758 Instead warn that "logging off" / "logging on" is necessary.
10759 (pop_output_files): Delete references to logging_no_redirect_file.
10760 (show_logging_command): Always speak in terms of what will happen
10761 once logging is reenabled.
10762
10763 2017-02-02 Pedro Alves <palves@redhat.com>
10764
10765 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10766
10767 2017-02-02 Pedro Alves <palves@redhat.com>
10768
10769 * disasm.c (gdb_pretty_print_insn): Rename to ...
10770 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10771 Remove gdbarch parameter. Adapt to clear the object's buffers
10772 instead of allocating new buffers, and to print using the object's
10773 gdb_disassembler instead of calling gdb_print_insn.
10774 (dump_insns): Use gdb_pretty_print_disassembler.
10775 * disasm.h (gdb_pretty_print_insn): Delete declaration.
10776 (gdb_pretty_print_disassembler): New class.
10777 * record-btrace.c (btrace_insn_history): Use
10778 gdb_pretty_print_disassembler.
10779
10780 2017-02-02 Pedro Alves <palves@redhat.com>
10781
10782 * ada-lang.c (type_as_string): Use string_file.
10783 * ada-valprint.c (ada_print_floating): Use string_file.
10784 * ada-varobj.c (ada_varobj_scalar_image)
10785 (ada_varobj_get_value_image): Use string_file.
10786 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10787 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10788 * breakpoint.c (update_inserted_breakpoint_locations)
10789 (insert_breakpoint_locations, reattach_breakpoints)
10790 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10791 (print_it_watchpoint): Use string_file.
10792 (save_breakpoints): Use stdio_file.
10793 * c-exp.y (oper): Use string_file.
10794 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10795 tee_file.
10796 (pop_output_files): Use delete.
10797 (handle_redirections): Use stdio_file and tee_file.
10798 * cli/cli-setshow.c (do_show_command): Use string_file.
10799 * compile/compile-c-support.c (c_compute_program): Use
10800 string_file.
10801 * compile/compile-c-symbols.c (generate_vla_size): Take a
10802 'string_file &' instead of a 'ui_file *'.
10803 (generate_c_for_for_one_variable): Take a 'string_file &' instead
10804 of a 'ui_file *'. Use string_file.
10805 (generate_c_for_variable_locations): Take a 'string_file &'
10806 instead of a 'ui_file *'.
10807 * compile/compile-internal.h (generate_c_for_for_one_variable):
10808 Take a 'string_file &' instead of a 'ui_file *'.
10809 * compile/compile-loc2c.c (push, pushf, unary, binary)
10810 (print_label, pushf_register_address, pushf_register)
10811 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10812 'ui_file *'. Adjust.
10813 * compile/compile.c (compile_to_object): Use string_file.
10814 * compile/compile.h (compile_dwarf_expr_to_c)
10815 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10816 'ui_file *'.
10817 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10818 (replace_typedefs_qualified_name): Use string_file and
10819 obstack_copy0.
10820 * disasm.c (gdb_pretty_print_insn): Use string_file.
10821 (gdb_disassembly): Adjust reference the null_stream global.
10822 (do_ui_file_delete): Delete.
10823 (gdb_insn_length): Use null_stream.
10824 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10825 * dwarf2loc.c (dwarf2_compile_property_to_c)
10826 (locexpr_generate_c_location, loclist_generate_c_location): Take a
10827 'string_file &' instead of a 'ui_file *'.
10828 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10829 * dwarf2read.c (do_ui_file_peek_last): Delete.
10830 (dwarf2_compute_name): Use string_file.
10831 * event-top.c (gdb_setup_readline): Use stdio_file.
10832 * gdbarch.sh (verify_gdbarch): Use string_file.
10833 * gdbtypes.c (safe_parse_type): Use null_stream.
10834 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10835 string_file.
10836 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10837 'string_file *' instead of a 'ui_file *'.
10838 (gdbscm_arch_disassemble): Use string_file.
10839 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
10840 * guile/scm-ports.c (class ioscm_file_port): Now a class that
10841 inherits from ui_file.
10842 (ioscm_file_port_delete, ioscm_file_port_rewind)
10843 (ioscm_file_port_put): Delete.
10844 (ioscm_file_port_write): Rename to ...
10845 (ioscm_file_port::write): ... this. Remove file_port_magic
10846 checks.
10847 (ioscm_file_port_new): Delete.
10848 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
10849 ui_file_up.
10850 * guile/scm-type.c (tyscm_type_name): Use string_file.
10851 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
10852 Use string_file.
10853 * infcmd.c (print_return_value_1): Use string_file.
10854 * infrun.c (print_target_wait_results): Use string_file.
10855 * language.c (add_language): Use string_file.
10856 * location.c (explicit_to_string_internal): Use string_file.
10857 * main.c (captured_main_1): Use null_file.
10858 * maint.c (maintenance_print_architecture): Use stdio_file.
10859 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
10860 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
10861 event_channel>: Change type to mi_console_file pointer.
10862 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
10863 (mi_console_file_delete): Delete.
10864 (struct mi_console_file): Delete.
10865 (mi_console_file_magic): Delete.
10866 (mi_console_file_new): Delete.
10867 (mi_console_file::mi_console_file): New.
10868 (mi_console_file_delete): Delete.
10869 (mi_console_file_fputs): Delete.
10870 (mi_console_file::write): New.
10871 (mi_console_raw_packet): Delete.
10872 (mi_console_file::flush): New.
10873 (mi_console_file_flush): Delete.
10874 (mi_console_set_raw): Rename to ...
10875 (mi_console_file::set_raw): ... this.
10876 * mi/mi-console.h (class mi_console_file): New class.
10877 (mi_console_file_new, mi_console_set_raw): Delete.
10878 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
10879 (mi_set_logging): Use delete and tee_file. Adjust.
10880 * mi/mi-main.c (output_register): Use string_file.
10881 (mi_cmd_data_evaluate_expression): Use string_file.
10882 (mi_cmd_data_read_memory): Use string_file.
10883 (mi_cmd_execute, print_variable_or_computed): Use string_file.
10884 * mi/mi-out.c (mi_ui_out::main_stream): New.
10885 (mi_ui_out::rewind): Use main_stream and
10886 string_file.
10887 (mi_ui_out::put): Use main_stream and string_file.
10888 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10889 Allocate a 'string_file' instead.
10890 (mi_out_new): Don't allocate a mem_fileopen stream here.
10891 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10892 (mi_ui_out::main_stream): Declare method.
10893 * printcmd.c (eval_command): Use string_file.
10894 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
10895 * python/py-arch.c (archpy_disassemble): Use string_file.
10896 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
10897 * python/py-frame.c (frapy_str): Use string_file.
10898 * python/py-framefilter.c (py_print_type, py_print_single_arg):
10899 Use string_file.
10900 * python/py-type.c (typy_str): Use string_file.
10901 * python/py-unwind.c (unwind_infopy_str): Use string_file.
10902 * python/py-value.c (valpy_str): Use string_file.
10903 * record-btrace.c (btrace_insn_history): Use string_file.
10904 * regcache.c (regcache_print): Use stdio_file.
10905 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
10906 * remote.c (escape_buffer): Use string_file.
10907 * rust-lang.c (rust_get_disr_info): Use string_file.
10908 * serial.c (serial_open_ops_1): Use stdio_file.
10909 (do_serial_close): Use delete.
10910 * stack.c (print_frame_arg): Use string_file.
10911 (print_frame_args): Remove local mem_fileopen stream, not used.
10912 (print_frame): Use string_file.
10913 * symmisc.c (maintenance_print_symbols): Use stdio_file.
10914 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
10915 Take a 'string_file *' instead of a 'ui_file *'.
10916 * top.c (new_ui): Use stdio_file and stderr_file.
10917 (free_ui): Use delete.
10918 (execute_command_to_string): Use string_file.
10919 (quit_confirm): Use string_file.
10920 * tracepoint.c (collection_list::append_exp): Use string_file.
10921 * tui/tui-disasm.c (tui_disassemble): Use string_file.
10922 * tui/tui-file.c: Don't include "ui-file.h".
10923 (enum streamtype, struct tui_stream): Delete.
10924 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
10925 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
10926 (tui_file::tui_file): New method.
10927 (tui_file_fputs): Delete.
10928 (tui_file_get_strbuf): Delete.
10929 (tui_file::puts): New method.
10930 (tui_file_adjust_strbuf): Delete.
10931 (tui_file_flush): Delete.
10932 (tui_file::flush): New method.
10933 * tui/tui-file.h: Tweak intro comment.
10934 Include ui-file.h.
10935 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
10936 (tui_file_adjust_strbuf): Delete declarations.
10937 (class tui_file): New class.
10938 * tui/tui-io.c (tui_initialize_io): Use tui_file.
10939 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
10940 (tui_register_format): Use string_stream.
10941 * tui/tui-stack.c (tui_make_status_line): Use string_file.
10942 (tui_get_function_from_frame): Use string_file.
10943 * typeprint.c (type_to_string): Use string_file.
10944 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
10945 (null_stream): New global.
10946 (ui_file_delete): Delete.
10947 (ui_file::ui_file): New.
10948 (null_file_isatty): Delete.
10949 (ui_file::~ui_file): New.
10950 (null_file_rewind): Delete.
10951 (ui_file::printf): New.
10952 (null_file_put): Delete.
10953 (null_file_flush): Delete.
10954 (ui_file::putstr): New.
10955 (null_file_write): Delete.
10956 (ui_file::putstrn): New.
10957 (null_file_read): Delete.
10958 (ui_file::putc): New.
10959 (null_file_fputs): Delete.
10960 (null_file_write_async_safe): Delete.
10961 (ui_file::vprintf): New.
10962 (null_file_delete): Delete.
10963 (null_file::write): New.
10964 (null_file_fseek): Delete.
10965 (null_file::puts): New.
10966 (ui_file_data): Delete.
10967 (null_file::write_async_safe): New.
10968 (gdb_flush, ui_file_isatty): Adjust.
10969 (ui_file_put, ui_file_rewind): Delete.
10970 (ui_file_write): Adjust.
10971 (ui_file_write_for_put): Delete.
10972 (ui_file_write_async_safe, ui_file_read): Adjust.
10973 (ui_file_fseek): Delete.
10974 (fputs_unfiltered): Adjust.
10975 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
10976 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
10977 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
10978 (set_ui_file_data): Delete.
10979 (string_file::~string_file, string_file::write)
10980 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
10981 (do_ui_file_as_string, ui_file_as_string): Delete.
10982 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
10983 (struct mem_file): Delete.
10984 (mem_file_new): Delete.
10985 (stdio_file::stdio_file): New.
10986 (mem_file_delete): Delete.
10987 (stdio_file::stdio_file): New.
10988 (mem_fileopen): Delete.
10989 (stdio_file::~stdio_file): New.
10990 (mem_file_rewind): Delete.
10991 (stdio_file::set_stream): New.
10992 (mem_file_put): Delete.
10993 (stdio_file::open): New.
10994 (mem_file_write): Delete.
10995 (stdio_file_magic, struct stdio_file): Delete.
10996 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
10997 (stdio_file::flush): New.
10998 (stdio_file_read): Rename to ...
10999 (stdio_file::read): ... this. Adjust.
11000 (stdio_file_write): Rename to ...
11001 (stdio_file::write): ... this. Adjust.
11002 (stdio_file_write_async_safe): Rename to ...
11003 (stdio_file::write_async_safe) ... this. Adjust.
11004 (stdio_file_fputs): Rename to ...
11005 (stdio_file::puts) ... this. Adjust.
11006 (stdio_file_isatty): Delete.
11007 (stdio_file_fseek): Delete.
11008 (stdio_file::isatty): New.
11009 (stderr_file_write): Rename to ...
11010 (stderr_file::write) ... this. Adjust.
11011 (stderr_file_fputs): Rename to ...
11012 (stderr_file::puts) ... this. Adjust.
11013 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
11014 (stderr_file::stderr_file): New.
11015 (tee_file_magic): Delete.
11016 (struct tee_file): Delete.
11017 (tee_file::tee_file): New.
11018 (tee_file_new): Delete.
11019 (tee_file::~tee_file): New.
11020 (tee_file_delete): Delete.
11021 (tee_file_flush): Rename to ...
11022 (tee_file::flush): ... this. Adjust.
11023 (tee_file_write): Rename to ...
11024 (tee_file::write): ... this. Adjust.
11025 (tee_file::write_async_safe): New.
11026 (tee_file_fputs): Rename to ...
11027 (tee_file::puts): ... this. Adjust.
11028 (tee_file_isatty): Rename to ...
11029 (tee_file::isatty): ... this. Adjust.
11030 * ui-file.h (struct obstack, struct ui_file): Don't
11031 forward-declare.
11032 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
11033 (ui_file_write_ftype)
11034 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
11035 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
11036 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
11037 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
11038 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
11039 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
11040 (set_ui_file_fseek): Delete.
11041 (ui_file_data, ui_file_delete, ui_file_rewind)
11042 (struct ui_file): New.
11043 (ui_file_up): New.
11044 (class null_file): New.
11045 (null_stream): Declare.
11046 (ui_file_write_for_put, ui_file_put): Delete.
11047 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
11048 Delete.
11049 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
11050 (gdb_fopen, tee_file_new): Delete.
11051 (struct string_file): New.
11052 (struct stdio_file): New.
11053 (stdio_file_up): New.
11054 (struct stderr_file): New.
11055 (class tee_file): New.
11056 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
11057 of a 'ui_file *'. Adjust.
11058 * ui-out.h (class ui_out) <field_stream>: Likewise.
11059 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
11060 (null_stream): Delete.
11061 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
11062 Adjust.
11063 * utils.h (struct ui_file): Delete forward declaration..
11064 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
11065 (error_stream): Take a 'string_file &' instead of a
11066 'ui_file *'.
11067 * varobj.c (varobj_value_get_print_value): Use string_file.
11068 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
11069 * gdbarch.c: Regenerate.
11070
11071 2017-02-02 Pedro Alves <palves@redhat.com>
11072
11073 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
11074 (gdb_pretty_print_insn): ... this. Now a free function. Add back
11075 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
11076 Adjust to call gdb_print_insn instead of
11077 gdb_disassembler::print_insn.
11078 (dump_insns, do_mixed_source_and_assembly_deprecated)
11079 (do_mixed_source_and_assembly, do_assembly_only): Add back a
11080 'gdbarch' parameter. Remove gdb_disassembler parameter.
11081 (gdb_disassembly): Don't allocate a gdb_disassembler here.
11082 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
11083 declaration.
11084 (gdb_pretty_print_insn): Re-add declaration.
11085 * record-btrace.c (btrace_insn_history): Don't allocate a
11086 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
11087
11088 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
11089
11090 * disasm.h (gdb_disassembly): Remove file_string parameter.
11091 * disasm.c (gdb_disassembly): Likewise.
11092 * cli/cli-cmds.c (print_disassembly): Adapt.
11093 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
11094 * stack.c (do_gdb_disassembly): Likewise.
11095
11096 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
11097
11098 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
11099 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
11100 targets. And if the implicit value is longer than needed, extract
11101 the first bytes instead of the "least significant" ones.
11102
11103 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
11104
11105 * btrace.c (btrace_enable): Do not call btrace_add_pc for
11106 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
11107 (btrace_fetch): Assert can_access_registers_ptid.
11108 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
11109 validate_registers_access.
11110
11111 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
11112
11113 * gdbthread.h (can_access_registers_ptid): New.
11114 * thread.c (can_access_registers_ptid): New.
11115
11116 2017-02-01 Pedro Alves <palves@redhat.com>
11117
11118 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
11119
11120 2017-01-31 Pedro Alves <palves@redhat.com>
11121
11122 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11123 Fix typos.
11124
11125 2017-01-31 Pedro Alves <palves@redhat.com>
11126
11127 * stack.c (print_frame_args): Remove local mem_fileopen stream,
11128 not used.
11129
11130 2017-01-31 Pedro Alves <palves@redhat.com>
11131
11132 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11133
11134 2017-01-31 Pedro Alves <palves@redhat.com>
11135
11136 * common/scoped_restore.h
11137 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11138 change the value's parameter type to T2.
11139 (make_scoped_restore): Likewise.
11140
11141 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11142 Richard Henderson <rth@redhat.com>
11143
11144 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11145 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11146 GS_BASE for older kernels.
11147 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11148 GS_BASE for older kernels.
11149 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11150 and GS_BASE to the offset table.
11151 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11152 system register group.
11153 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11154 for older kernels.
11155 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11156 amd64 ABI.
11157 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11158 AMD64_GSBASE_REGNUM.
11159 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11160 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11161 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11162 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11163 i386/64bit-segments.xml in those rules.
11164 * features/i386/64bit-segments.xml: New file.
11165 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11166 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11167 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11168 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11169 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11170 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11171 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11172 * features/i386/amd64-avx-linux.c: Regenerated.
11173 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11174 * features/i386/amd64-avx-mpx.c: Regenerated.
11175 * features/i386/amd64-avx512-linux.c: Regenerated.
11176 * features/i386/amd64-linux.c: Regenerated.
11177 * features/i386/amd64-mpx-linux.c: Regenerated.
11178 * features/i386/i386-avx-mpx-linux.c: Regenerated.
11179 * features/i386/i386-avx-mpx.c: Regenerated.
11180 * features/i386/x32-avx-linux.c: Regenerated.
11181 * features/i386/x32-avx512-linux.c: Regenerated.
11182 * regformats/i386/amd64-avx-linux.dat: Regenerated.
11183 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11184 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11185 * regformats/i386/amd64-linux.dat: Regenerated.
11186 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11187 * regformats/i386/x32-avx-linux.dat: Regenerated.
11188 * regformats/i386/x32-avx512-linux.dat: Regenerated.
11189 * regformats/i386/x32-linux.dat: Regenerated.
11190
11191 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11192
11193 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11194 Set to AMD64_NUM_REGS.
11195
11196 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11197
11198 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11199 that checks validity of a register number.
11200
11201 2017-01-27 Kees Cook <keescook@google.com>
11202
11203 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
11204 fetch_fpregs if target has fpa registers.
11205 (arm_linux_store_inferior_registers): Call store_fpregs if target
11206 has fpa registers.
11207
11208 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
11209
11210 * cris-tdep.c (cris_gdbarch_init): Remove check for
11211 info.byte_order and force it to BFD_ENDIAN_LITTLE.
11212
11213 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
11214
11215 * corelow.c (get_core_register_section): Check for regset
11216 existence before checking for REGSET_VARIABLE_SIZE.
11217
11218 2017-01-26 Yao Qi <yao.qi@linaro.org>
11219 Pedro Alves <palves@redhat.com>
11220
11221 PR gdb/20939
11222 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
11223 call memory_error, save memaddr instead.
11224 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
11225 negative, cal memory_error.
11226 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
11227
11228 2017-01-26 Yao Qi <yao.qi@linaro.org>
11229
11230 * disasm-selftests.c (memory_error_test): New function.
11231 (_initialize_disasm_selftests): Register memory_error_test.
11232
11233 2017-01-26 Yao Qi <yao.qi@linaro.org>
11234
11235 * Makefile.in (SFILES): Add disasm-selftests.c and
11236 selftest-arch.c.
11237 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
11238 * disasm-selftests.c: New file.
11239 * selftest-arch.c: New file.
11240 * selftest-arch.h: New file.
11241
11242 2017-01-26 Yao Qi <yao.qi@linaro.org>
11243
11244 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
11245 to bfd_arch_mep. Don't return 0 if section is not
11246 found. Call print_insn_mep.
11247
11248 2017-01-26 Pedro Alves <palves@redhat.com>
11249 Yao Qi <yao.qi@linaro.org>
11250
11251 * arm-tdep.c: Include "disasm.h".
11252 (gdb_print_insn_arm): Update code to get gdbarch.
11253 * disasm.c (dis_asm_read_memory): Change it to
11254 gdb_disassembler::dis_asm_read_memory.
11255 (dis_asm_memory_error): Likewise.
11256 (dis_asm_print_address): Likewise.
11257 (gdb_pretty_print_insn): Change it to
11258 gdb_disassembler::pretty_print_insn.
11259 (dump_insns): Add one argument gdb_disassemlber. All
11260 callers updated.
11261 (do_mixed_source_and_assembly_deprecated): Likewise.
11262 (do_mixed_source_and_assembly): Likewise.
11263 (do_assembly_only): Likewise.
11264 (gdb_disassembler::gdb_disassembler): New.
11265 (gdb_disassembler::print_insn): New.
11266 * disasm.h (class gdb_disassembler): New.
11267 (gdb_pretty_print_insn): Remove declaration.
11268 (gdb_disassemble_info): Likewise.
11269 * guile/scm-disasm.c (class gdbscm_disassembler): New.
11270 (gdbscm_disasm_read_memory_worker): Update.
11271 (gdbscm_disasm_read_memory): Update.
11272 (gdbscm_disasm_memory_error): Remove.
11273 (gdbscm_disasm_print_address): Remove.
11274 (gdbscm_disassembler::gdbscm_disassembler): New.
11275 (gdbscm_print_insn_from_port): Update.
11276 * mips-tdep.c: Include disasm.h.
11277 (gdb_print_insn_mips): Update code to get gdbarch.
11278 * record-btrace.c (btrace_insn_history): Update.
11279 * spu-tdep.c: Include disasm.h.
11280 (struct spu_dis_asm_data): Remove.
11281 (struct spu_dis_asm_info): New.
11282 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11283 SPU id.
11284 (gdb_print_insn_spu): Cast disassemble_info to
11285 spu_dis_asm_info.
11286
11287 2017-01-26 Yao Qi <yao.qi@linaro.org>
11288
11289 * disasm.c (do_ui_file_delete): Delete.
11290 (gdb_insn_length): Move code creating stream to ...
11291 * utils.c (null_stream): ... here. New function.
11292 * utils.h (null_stream): Declare.
11293
11294 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
11295
11296 * python/py-inferior.c (find_thread_object): Return directly
11297 from the loop. Remove "found" variable.
11298
11299 2017-01-21 Joel Brobecker <brobecker@adacore.com>
11300
11301 GDB 7.12.1 released.
11302
11303 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11304
11305 * python/py-function.c (fnpy_call): Reorder declarations to have
11306 the gdbpy_enter object declared first.
11307 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11308
11309 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11310
11311 PR python/21068
11312 * python/python-internal.h (PyMem_RawMalloc): Define for
11313 Python < 3.4.
11314 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
11315 PyMem_RawMalloc instead of PyMem_Malloc.
11316
11317 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
11318 Luis Machado <lgustavo@codesourcery.com>
11319
11320 * NEWS (New commands): Mention flash-erase.
11321 (New MI commands): Mention target-flash-erase.
11322 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
11323 command.
11324 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
11325 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
11326 * target.c (flash_erase_command): New function.
11327 (initialize_targets): Add new flash-erase command.
11328 * target.h (flash_erase_command): New declaration.
11329
11330 2017-01-20 Joel Brobecker <brobecker@adacore.com>
11331
11332 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
11333 HAVE_SYS_PROCFS_H is defined.
11334
11335 2017-01-18 Alan Hayward <alan.hayward@arm.com>
11336
11337 * remote.c (struct cached_reg): Change data into a pointer.
11338 * (stop_reply_dtr): Free data pointers before deleting vector.
11339 (process_stop_reply): Likewise.
11340 (remote_parse_stop_reply): Allocate space for data
11341
11342 2017-01-18 Alan Hayward <alan.hayward@arm.com>
11343
11344 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
11345 MAX_REGISTER_SIZE.
11346 (amd64_pseudo_register_read_value): Likewise.
11347 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
11348 (store_register_using_P): Likewise.
11349 * regcache.c (regcache_xfer_part): Likewise.
11350
11351 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
11352
11353 Split real and pseudo registers.
11354 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
11355 (sparc32_pseudo_regnum): New enum.
11356 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
11357 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
11358 (SPARC32_CP0_REGISTERS): New macro.
11359 (sparc32_pseudo_register_name): New function.
11360 (sparc32_register_name): Use sparc32_pseudo_register_name.
11361 (sparc32_pseudo_register_type): New function.
11362 (sparc32_register_type): Use sparc32_pseudo_register_type.
11363 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
11364 pseudo register numbers.
11365 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
11366 (SPARC64_CP0_REGISTERS): New macro.
11367 (sparc64_pseudo_register_name): New function.
11368 (sparc64_register_name): Use sparc64_pseudo_register_name.
11369 (sparc64_pseudo_register_type): New function.
11370 (sparc64_register_type): Use sparc64_pseudo_register_type.
11371 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
11372 pseudo register numbers.
11373 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
11374 sparc64_store_arguments): Handle pseudo register numbers.
11375
11376 2017-01-13 Yao Qi <yao.qi@linaro.org>
11377
11378 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
11379 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
11380 output.
11381 (getpkt_or_notif_sane_1): Likewise.
11382
11383 2017-01-13 Yao Qi <yao.qi@linaro.org>
11384
11385 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
11386 of CC. Pass "-x c++-header" instead of "-x c".
11387
11388 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11389
11390 * remote.c (remote_can_async_p): Update comment.
11391
11392 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11393
11394 * linux-nat.c (linux_nat_can_async_p): Update comment.
11395
11396 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11397
11398 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
11399
11400 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
11401
11402 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
11403
11404 2017-01-10 Tom Tromey <tom@tromey.com>
11405
11406 * python/py-type.c (typy_legacy_template_argument): Update.
11407 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
11408 ~demangle_parse_info): Declare new members.
11409 (cp_demangled_name_to_comp): Return unique_ptr.
11410 (cp_demangled_name_parse_free)
11411 (make_cleanup_cp_demangled_name_parse_free)
11412 (cp_new_demangle_parse_info): Remove.
11413 * cp-support.c (do_demangled_name_parse_free_cleanup)
11414 (make_cleanup_cp_demangled_name_parse_free): Remove.
11415 (inspect_type, cp_canonicalize_string_full)
11416 (cp_canonicalize_string): Update.
11417 (mangled_name_to_comp): Change return type.
11418 (cp_class_name_from_physname, method_name_from_physname)
11419 (cp_func_name, cp_remove_params): Update.
11420 * cp-name-parser.y (demangle_parse_info): New constructor, from
11421 cp_new_demangle_parse_info.
11422 (~demangle_parse_info): New destructor, from
11423 cp_demangled_name_parse_free.
11424 (cp_merge_demangle_parse_infos): Update.
11425 (cp_demangled_name_to_comp): Change return type.
11426
11427 2017-01-10 Tom Tromey <tom@tromey.com>
11428
11429 * top.c (prevent_dont_repeat): Change return type.
11430 * python/python.c (execute_gdb_command): Use std::string.
11431 Update.
11432 * guile/guile.c (gdbscm_execute_gdb_command): Update.
11433 * command.h (prevent_dont_repeat): Change return type.
11434 * breakpoint.c (bpstat_do_actions_1): Update.
11435
11436 2017-01-10 Tom Tromey <tom@tromey.com>
11437
11438 * value.h (scoped_value_mark::~scoped_value_mark): Call
11439 free_to_mark.
11440 (scoped_value_mark::free_to_mark): New method.
11441 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
11442 scoped_value_mark.
11443
11444 2017-01-10 Tom Tromey <tom@tromey.com>
11445
11446 * python/py-value.c (valpy_dereference, valpy_referenced_value)
11447 (valpy_reference_value, valpy_const_value, valpy_get_address)
11448 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
11449 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
11450 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
11451 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
11452 scoped_value_mark.
11453 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
11454 * value.h (scoped_value_mark): New class.
11455
11456 2017-01-10 Tom Tromey <tom@tromey.com>
11457
11458 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
11459 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
11460 * psymtab.c (discard_psymtabs_upto): Remove.
11461 (make_cleanup_discard_psymtabs): Remove.
11462 (struct psymtab_state): Remove.
11463
11464 2017-01-10 Tom Tromey <tom@tromey.com>
11465
11466 * record-full.c (record_full_save_cleanups): Remove.
11467 (record_full_save): Use gdb::unlinker.
11468 * gcore.c (do_bfd_delete_cleanup): Remove.
11469 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
11470 cleanups.
11471 * dwarf2read.c (unlink_if_set): Remove.
11472 (write_psymtabs_to_index): Use gdb::unlinker.
11473 * common/gdb_unlinker.h: New file.
11474
11475 2017-01-10 Tom Tromey <tom@tromey.com>
11476
11477 * windows-tdep.c (windows_xfer_shared_library): Update.
11478 * windows-nat.c (windows_make_so): Update.
11479 * utils.h (make_cleanup_bfd_unref): Remove.
11480 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
11481 * symfile.h (symfile_bfd_open)
11482 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
11483 * symfile.c (read_symbols, symbol_file_add)
11484 (separate_debug_file_exists): Update.
11485 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
11486 (generic_load, reread_symbols): Update.
11487 * symfile-mem.c (symbol_file_add_from_memory): Update.
11488 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
11489 (spu_symbol_file_add_from_memory): Update.
11490 * solist.h (struct target_so_ops) <bfd_open>: Return
11491 gdb_bfd_ref_ptr.
11492 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
11493 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
11494 gdb_bfd_ref_ptr.
11495 (solib_map_sections, reload_shared_libraries_1): Update.
11496 * solib-svr4.c (enable_break): Update.
11497 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
11498 * solib-frv.c (enable_break2): Update.
11499 * solib-dsbt.c (enable_break): Update.
11500 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
11501 gdb_bfd_ref_ptr.
11502 (darwin_solib_get_all_image_info_addr_at_init): Update.
11503 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
11504 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
11505 * record-full.c (record_full_save): Update.
11506 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
11507 * procfs.c (insert_dbx_link_bpt_in_file): Update.
11508 * minidebug.c (find_separate_debug_file_in_section): Return
11509 gdb_bfd_ref_ptr.
11510 * machoread.c (macho_add_oso_symfile): Change abfd to
11511 gdb_bfd_ref_ptr.
11512 (macho_symfile_read_all_oso): Update.
11513 (macho_check_dsym): Return gdb_bfd_ref_ptr.
11514 (macho_symfile_read): Update.
11515 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
11516 (jit_bfd_try_read_symtab): Update.
11517 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11518 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11519 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11520 gdb_bfd_ref_ptr.
11521 (gdb_bfd_ref_policy): New struct.
11522 (gdb_bfd_ref_ptr): New typedef.
11523 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11524 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11525 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11526 gdb_bfd_ref_ptr.
11527 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11528 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11529 (gcore_command): Update.
11530 * exec.c (exec_file_attach): Update.
11531 * elfread.c (elf_symfile_read): Update.
11532 * dwarf2read.c (dwarf2_get_dwz_file): Update.
11533 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
11534 (open_and_init_dwo_file): Update.
11535 (open_dwp_file): Return gdb_bfd_ref_ptr.
11536 (open_and_init_dwp_file): Update.
11537 * corelow.c (core_open): Update.
11538 * compile/compile-object-load.c (compile_object_load): Update.
11539 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
11540 * coffread.c (coff_symfile_read): Update.
11541 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
11542 gdb_bfd_ref_ptr. Rename.
11543 (dump_bfd_file, restore_command): Update.
11544 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11545 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11546 (find_separate_debug_file_by_buildid): Update.
11547
11548 2017-01-10 Tom Tromey <tom@tromey.com>
11549
11550 * common/gdb_ref_ptr.h: New file.
11551 * python/py-ref.h (struct gdbpy_ref_policy): New.
11552 (gdbpy_ref): Now a typedef.
11553
11554 2017-01-10 Tom Tromey <tom@tromey.com>
11555
11556 * utils.h (make_cleanup_htab_delete): Don't declare.
11557 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
11558 Remove.
11559 * linespec.c (decode_compound_collector): Add constructor,
11560 destructor.
11561 (lookup_prefix_sym): Remove cleanup.
11562 (symtab_collector): Add constructor, destructor.
11563 (collect_symtabs_from_filename): Remove cleanup.
11564 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
11565 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
11566 Use htab_up.
11567 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
11568 * dwarf2read.c (dw2_expand_symtabs_matching)
11569 (dw2_map_symbol_filenames, dwarf_decode_macros)
11570 (write_psymtabs_to_index): Use htab_up.
11571 * dwarf2loc.c (func_verify_no_selftailcall)
11572 (call_site_find_chain_1, func_verify_no_selftailcall)
11573 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
11574 std::vector, gdb::unique_xmalloc_ptr.
11575 (call_sitep): Remove typedef.
11576 (dwarf2_locexpr_baton_eval): Remove unused variable.
11577
11578 2017-01-10 Tom Tromey <tom@tromey.com>
11579
11580 * python/python-internal.h (make_cleanup_py_decref)
11581 (make_cleanup_py_xdecref): Don't declare.
11582 * python/py-utils.c (py_decref, make_cleanup_py_decref)
11583 (py_xdecref, make_cleanup_py_xdecref): Remove.
11584
11585 2017-01-10 Tom Tromey <tom@tromey.com>
11586
11587 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
11588 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
11589
11590 2017-01-10 Tom Tromey <tom@tromey.com>
11591
11592 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
11593
11594 2017-01-10 Tom Tromey <tom@tromey.com>
11595
11596 * python/py-utils.c (unicode_to_encoded_string)
11597 (python_string_to_target_string)
11598 (python_string_to_target_python_string)
11599 (python_string_to_host_string, gdbpy_obj_to_string)
11600 (get_addr_from_python): Use gdbpy_ref.
11601
11602 2017-01-10 Tom Tromey <tom@tromey.com>
11603
11604 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
11605 gdbpy_ref.
11606
11607 2017-01-10 Tom Tromey <tom@tromey.com>
11608
11609 * python/python.c (eval_python_command, gdbpy_decode_line)
11610 (gdbpy_run_events, gdbpy_start_type_printers)
11611 (gdbpy_apply_type_printers): Use gdbpy_ref.
11612
11613 2017-01-10 Tom Tromey <tom@tromey.com>
11614
11615 * python/py-param.c (get_doc_string, compute_enum_values): Use
11616 gdbpy_ref.
11617
11618 2017-01-10 Tom Tromey <tom@tromey.com>
11619
11620 * python/py-inferior.c (find_thread_object, build_inferior_list):
11621 Use gdbpy_ref.
11622
11623 2017-01-10 Tom Tromey <tom@tromey.com>
11624
11625 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11626
11627 2017-01-10 Tom Tromey <tom@tromey.com>
11628
11629 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
11630 gdbpy_ref.
11631
11632 2017-01-10 Tom Tromey <tom@tromey.com>
11633
11634 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
11635 extra incref.
11636 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
11637 Use gdbpy_ref.
11638
11639 2017-01-10 Tom Tromey <tom@tromey.com>
11640
11641 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11642 gdbpy_ref.
11643
11644 2017-01-10 Tom Tromey <tom@tromey.com>
11645
11646 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
11647 decref results of PyArg_ParseTupleAndKeywords.
11648
11649 2017-01-10 Tom Tromey <tom@tromey.com>
11650
11651 * python/python.c (python_run_simple_file): Use
11652 unique_xmalloc_ptr, gdbpy_ref.
11653
11654 2017-01-10 Tom Tromey <tom@tromey.com>
11655
11656 * python/py-prettyprint.c (print_stack_unless_memory_error)
11657 (print_string_repr, print_children): Use gdbpy_ref.
11658 (dummy_python_frame): New class.
11659 (dummy_python_frame::dummy_python_frame): Rename from
11660 push_dummy_python_frame.
11661 (py_restore_tstate): Remove.
11662
11663 2017-01-10 Tom Tromey <tom@tromey.com>
11664
11665 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11666
11667 2017-01-10 Tom Tromey <tom@tromey.com>
11668
11669 * python/python.c (ensure_python_env, restore_python_env):
11670 Remove.
11671 * python/python-internal.h (ensure_python_env): Don't declare.
11672 * varobj.h (varobj_ensure_python_env): Don't declare.
11673 * varobj.c (varobj_ensure_python_env): Remove.
11674
11675 2017-01-10 Tom Tromey <tom@tromey.com>
11676
11677 * varobj.c (varobj_value_get_print_value): Use
11678 gdbpy_enter_varobj.
11679
11680 2017-01-10 Tom Tromey <tom@tromey.com>
11681
11682 * python/py-prettyprint.c (print_string_repr, print_children):
11683 Update.
11684 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
11685 of "encoding".
11686 * varobj.c (varobj_value_get_print_value): Update.
11687 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
11688
11689 2017-01-10 Tom Tromey <tom@tromey.com>
11690
11691 * varobj.c (varobj_get_display_hint)
11692 (dynamic_varobj_has_child_method, install_new_value_visualizer)
11693 (varobj_set_visualizer, free_variable): Use
11694 gdbpy_enter_varobj.
11695
11696 2017-01-10 Tom Tromey <tom@tromey.com>
11697
11698 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
11699 (do_finish_initialization): New function. Use gdbpy_ref.
11700 (gdbpy_finish_initialization): Use gdbpy_enter. Call
11701 do_finish_initialization.
11702
11703 2017-01-10 Tom Tromey <tom@tromey.com>
11704
11705 * python/py-param.c (get_set_value, get_show_value): Use
11706 gdbpy_enter, gdbpy_ref.
11707
11708 2017-01-10 Tom Tromey <tom@tromey.com>
11709
11710 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
11711
11712 2017-01-10 Tom Tromey <tom@tromey.com>
11713
11714 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
11715
11716 2017-01-10 Tom Tromey <tom@tromey.com>
11717
11718 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
11719 Use gdbpy_enter_varobj.
11720
11721 2017-01-10 Tom Tromey <tom@tromey.com>
11722
11723 * varobj.c (gdbpy_enter_varobj): New constructor.
11724 * python/python-internal.h (gdbpy_enter_varobj): New class.
11725 * python/py-varobj.c (py_varobj_get_iterator): Use
11726 gdbpy_enter_varobj.
11727
11728 2017-01-10 Tom Tromey <tom@tromey.com>
11729
11730 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
11731 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11732 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
11733 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
11734 unique_xmalloc_ptr.
11735 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
11736
11737 2017-01-10 Tom Tromey <tom@tromey.com>
11738
11739 * python/py-xmethods.c (invoke_match_method): Use
11740 gdbpy_ref.
11741
11742 2017-01-10 Tom Tromey <tom@tromey.com>
11743
11744 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
11745 gdbpy_enter, gdbpy_ref.
11746
11747 2017-01-10 Tom Tromey <tom@tromey.com>
11748
11749 * python/python.c (python_interactive_command): Use gdbpy_enter.
11750
11751 2017-01-10 Tom Tromey <tom@tromey.com>
11752
11753 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11754 gdbpy_ref.
11755
11756 2017-01-10 Tom Tromey <tom@tromey.com>
11757
11758 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11759 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11760
11761 2017-01-10 Tom Tromey <tom@tromey.com>
11762
11763 * utils.h (htab_deleter): New struct.
11764 (htab_up): New typedef.
11765 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11766 gdbpy_enter, gdbpy_ref, htab_up.
11767
11768 2017-01-10 Tom Tromey <tom@tromey.com>
11769
11770 * python/py-unwind.c (pending_frame_invalidate): Remove.
11771 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11772
11773 2017-01-10 Tom Tromey <tom@tromey.com>
11774
11775 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11776 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11777
11778 2017-01-10 Tom Tromey <tom@tromey.com>
11779
11780 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11781
11782 2017-01-10 Tom Tromey <tom@tromey.com>
11783
11784 * python/python.c (gdbpy_eval_from_control_command)
11785 (gdbpy_source_script, gdbpy_run_events)
11786 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11787 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11788 gdbpy_enter.
11789
11790 2017-01-10 Tom Tromey <tom@tromey.com>
11791
11792 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11793
11794 2017-01-10 Tom Tromey <tom@tromey.com>
11795
11796 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11797
11798 2017-01-10 Tom Tromey <tom@tromey.com>
11799
11800 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11801 (python_on_inferior_call_pre, python_on_inferior_call_post)
11802 (python_on_memory_change, python_on_register_change)
11803 (python_inferior_exit, python_new_objfile, add_thread_object)
11804 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11805
11806 2017-01-10 Tom Tromey <tom@tromey.com>
11807
11808 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11809 (bpfinishpy_handle_exit): Use gdbpy_enter.
11810
11811 2017-01-10 Tom Tromey <tom@tromey.com>
11812
11813 * python/py-cmd.c (cmdpy_destroyer)
11814 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11815 gdbpy_enter.
11816
11817 2017-01-10 Tom Tromey <tom@tromey.com>
11818
11819 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11820 gdbpy_enter.
11821 (gdbpy_breakpoint_has_cond): Likewise.
11822
11823 2017-01-10 Tom Tromey <tom@tromey.com>
11824
11825 * python/python.c (gdbpy_enter): New constructor.
11826 (~gdbpy_enter): New destructor.
11827 (restore_python_env, ensure_python_env): Rewrite.
11828 * python/python-internal.h (gdbpy_enter): New class.
11829
11830 2017-01-10 Tom Tromey <tom@tromey.com>
11831
11832 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11833
11834 2017-01-10 Tom Tromey <tom@tromey.com>
11835
11836 * python/py-value.c (value_has_field, get_field_flag)
11837 (get_field_type, valpy_getitem, convert_value_from_python): Use
11838 gdbpy_ref.
11839
11840 2017-01-10 Tom Tromey <tom@tromey.com>
11841
11842 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
11843 gdbpy_ref.
11844
11845 2017-01-10 Tom Tromey <tom@tromey.com>
11846
11847 * python/py-prettyprint.c (search_pp_list)
11848 (find_pretty_printer_from_objfiles)
11849 (find_pretty_printer_from_progspace)
11850 (find_pretty_printer_from_gdb, find_pretty_printer)
11851 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
11852 gdbpy_ref.
11853
11854 2017-01-10 Tom Tromey <tom@tromey.com>
11855
11856 * python/py-param.c (call_doc_function): Use gdbpy_ref.
11857
11858 2017-01-10 Tom Tromey <tom@tromey.com>
11859
11860 * python/py-linetable.c (build_line_table_tuple_from_pcs)
11861 (ltpy_get_all_source_lines): Use gdbpy_ref.
11862
11863 2017-01-10 Tom Tromey <tom@tromey.com>
11864
11865 * python/py-framefilter.c (extract_sym, extract_value)
11866 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
11867 gdbpy_ref.
11868
11869 2017-01-10 Tom Tromey <tom@tromey.com>
11870
11871 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
11872
11873 2017-01-10 Tom Tromey <tom@tromey.com>
11874
11875 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
11876
11877 2017-01-10 Tom Tromey <tom@tromey.com>
11878
11879 * python/py-function.c (convert_values_to_python, fnpy_init): Use
11880 gdbpy_ref.
11881
11882 2017-01-10 Tom Tromey <tom@tromey.com>
11883
11884 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
11885
11886 2017-01-10 Tom Tromey <tom@tromey.com>
11887
11888 * python/py-type.c (convert_field, make_fielditem, typy_fields)
11889 (typy_range): Use gdbpy_ref.
11890
11891 2017-01-10 Tom Tromey <tom@tromey.com>
11892
11893 * python/py-threadevent.c (create_thread_event_object): Use
11894 gdbpy_ref.
11895 * python/py-stopevent.c (create_stop_event_object): Simplify.
11896 (emit_stop_event): Use gdbpy_ref.
11897 * python/py-signalevent.c (create_signal_event_object): Use
11898 gdbpy_ref.
11899 * python/py-newobjfileevent.c (create_new_objfile_event_object)
11900 (emit_new_objfile_event, create_clear_objfiles_event_object)
11901 (emit_clear_objfiles_event): Use gdbpy_ref.
11902 * python/py-infevents.c (create_inferior_call_event_object)
11903 (create_register_changed_event_object)
11904 (create_memory_changed_event_object, emit_inferior_call_event)
11905 (emit_memory_changed_event, emit_register_changed_event): Use
11906 gdbpy_ref.
11907 * python/py-exitedevent.c (create_exited_event_object)
11908 (emit_exited_event): Use gdbpy_ref.
11909 * python/py-event.h (evpy_emit_event): Remove
11910 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
11911 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
11912 * python/py-continueevent.c (emit_continue_event): Use
11913 gdbpy_ref.
11914 * python/py-breakpoint.c (gdbpy_breakpoint_created)
11915 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
11916 gdbpy_ref.
11917 * python/py-bpevent.c (create_breakpoint_event_object): Use
11918 gdbpy_ref.
11919
11920 2017-01-10 Tom Tromey <tom@tromey.com>
11921
11922 * python/py-ref.h: New file.
11923
11924 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11925
11926 * cli-out.c (cli_ui_out::do_redirect): Change return type to
11927 void.
11928 * cli-out.h (cli_ui_out::do_redirect): Likewise.
11929 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
11930 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
11931 * ui-out.c (ui_out::redirect): Likewise.
11932 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
11933 * cli/cli-logging.c (set_logging_redirect): Update call site of
11934 ui_out::redirect.
11935 (handle_redirections): Likewise.
11936 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
11937 * top.c (execute_command_to_string): Likewise.
11938 * utils.c (do_ui_out_redirect_pop): Likewise.
11939
11940 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11941
11942 * stack.c (_initialize_stack): Update "frame" command help message.
11943
11944 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
11945
11946 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
11947
11948 2017-01-06 Yao Qi <yao.qi@linaro.org>
11949
11950 * x86-linux-nat.h: Include gdb_proc_service.h.
11951
11952 2017-01-06 Yao Qi <yao.qi@linaro.org>
11953
11954 * ser-base.h: Include serial.h.
11955
11956 2017-01-06 Yao Qi <yao.qi@linaro.org>
11957
11958 * ppc-linux-tdep.h: Include ppc-tdep.h.
11959
11960 2017-01-06 Yao Qi <yao.qi@linaro.org>
11961
11962 * nat/amd64-linux-siginfo.h: Include signal.h.
11963
11964 2017-01-06 Yao Qi <yao.qi@linaro.org>
11965
11966 * nat/aarch64-linux-hw-point.h: Include break-common.h.
11967
11968 2017-01-06 Yao Qi <yao.qi@linaro.org>
11969
11970 * mi/mi-parse.h: Include mi-cmds.h.
11971
11972 2017-01-06 Yao Qi <yao.qi@linaro.org>
11973
11974 * inf-loop.c: Don't include "target.h".
11975 * inf-loop.h: Include it here.
11976
11977 2017-01-06 Yao Qi <yao.qi@linaro.org>
11978
11979 * dfp.h: Include "dboulest.h" and "expression.h".
11980
11981 2017-01-06 Yao Qi <yao.qi@linaro.org>
11982
11983 * ax-gdb.h: Include "ax.h".
11984
11985 2017-01-06 Yao Qi <yao.qi@linaro.org>
11986
11987 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
11988 with nat/gdb_ptrace.h.
11989
11990 2017-01-05 Yao Qi <yao.qi@linaro.org>
11991
11992 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
11993 new line.
11994 (mips64_fbsd_sigframe_init): Likewise.
11995
11996 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11997
11998 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
11999 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
12000
12001 2017-01-04 John Baldwin <jhb@FreeBSD.org>
12002
12003 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
12004 * NEWS: Mention new FreeBSD/mips native configuration.
12005 * config/mips/fbsd.mh: New file.
12006 * configure.host: Add mips*-*-freebsd*.
12007 * mips-fbsd-nat.c: New file.
12008
12009 2017-01-04 John Baldwin <jhb@FreeBSD.org>
12010
12011 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
12012 (ALLDEPFILES): Add mips-fbsd-tdep.c.
12013 * NEWS: Mention new FreeBSD/mips target.
12014 * configure.tgt: Add mips*-*-freebsd*.
12015 * mips-fbsd-tdep.c: New file.
12016 * mips-fbsd-tdep.h: New file.
12017
12018 2017-01-04 Yao Qi <yao.qi@linaro.org>
12019
12020 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
12021 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
12022
12023 2017-01-01 Joel Brobecker <brobecker@adacore.com>
12024
12025 Update copyright year range in all GDB files.
12026
12027 2017-01-01 Joel Brobecker <brobecker@adacore.com>
12028
12029 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
12030
12031 For older changes see ChangeLog-2016.
12032 \f
12033 Local Variables:
12034 mode: change-log
12035 left-margin: 8
12036 fill-column: 74
12037 version-control: never
12038 coding: utf-8
12039 End:
This page took 0.285593 seconds and 4 git commands to generate.