Remove some unused declarations
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-09-29 Tom Tromey <tom@tromey.com>
2
3 * main.c (captured_main_1): Remove unused declaration.
4 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
5
6 2017-09-29 Tom Tromey <tom@tromey.com>
7
8 * symtab.c (search_symbols): Remove unused outer cleanup.
9 (make_source_files_completion_list): Remove unused declaration.
10
11 2017-09-29 Tom Tromey <tom@tromey.com>
12
13 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
14
15 2017-09-29 Tom Tromey <tom@tromey.com>
16
17 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
18 gdb::byte_vector.
19
20 2017-09-29 Tom Tromey <tom@tromey.com>
21
22 * complaints.c (vcomplaint): Use std::string.
23
24 2017-09-29 Tom Tromey <tom@tromey.com>
25
26 * tracepoint.c (trace_variable_command): Use std::string.
27 (encode_actions_1): Remove unused declarations.
28 (create_tsv_from_upload): Use std::string.
29
30 2017-09-29 Tom Tromey <tom@tromey.com>
31
32 * cp-support.c (gdb_demangle): Use std::string.
33
34 2017-09-29 Tom Tromey <tom@tromey.com>
35
36 * stack.c (parse_frame_specification): Use std::string
37 (info_frame_command): Use gdb::unique_xmalloc_ptr.
38
39 2017-09-29 Tom Tromey <tom@tromey.com>
40
41 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
42
43 2017-09-29 Tom Tromey <tom@tromey.com>
44
45 * utils.c (vfprintf_maybe_filtered): Use std::string.
46 (vfprintf_unfiltered): Likewise.
47
48 2017-09-29 Tom Tromey <tom@tromey.com>
49
50 * event-top.c (top_level_prompt): Return std::string.
51 (display_gdb_prompt): Update.
52
53 2017-09-29 Tom Tromey <tom@tromey.com>
54
55 * unittests/common-utils-selftests.c (format): New function.
56 (string_vprintf_tests): New function.
57 (_initialize_common_utils_selftests): Register new tests.
58 * common/common-utils.c (string_vprintf): New function.
59 * common/common-utils.h (string_vprintf): Declare.
60
61 2017-09-29 Pedro Alves <palves@redhat.com>
62
63 * common/rsp-low.c (unpack_varlen_hex): Constify.
64 * common/rsp-low.h (unpack_varlen_hex): Constify.
65 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
66 Constify.
67 * remote.c (remote_set_permissions, read_ptid)
68 (remote_current_thread, remote_get_threads_with_qthreadinfo)
69 (remote_static_tracepoint_marker_at)
70 (remote_static_tracepoint_markers_by_strid)
71 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
72 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
73 (parse_tracepoint_definition, parse_tsv_definition)
74 (parse_static_tracepoint_marker_definition): Constify.
75 * tracepoint.h (parse_static_tracepoint_marker_definition)
76 (parse_trace_status, parse_tracepoint_status)
77 (parse_tracepoint_definition, parse_tsv_definition): Constify.
78
79 2017-09-29 Pedro Alves <palves@redhat.com>
80
81 * remote.c (target_buf, target_buf_size): Delete.
82 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
83 Use the connection's packet buffer instead.
84 All callers adjusted.
85 (_initialize_remote): Remove references to target_buf and
86 target_buf_size.
87
88 2017-09-28 Pedro Alves <palves@redhat.com>
89
90 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
91 unittests/common-utils-selftests.c.
92 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
93 (COMMON_OBS): Remove utils-selftests.o.
94 * utils-selftests.c: Move to ...
95 * unittests/common-utils-selftests.c: ... here and rename self
96 test to "string_printf".
97
98 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
99
100 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
101 having NULL cus or tus.
102
103 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
104
105 * arm-tdep.c: (convert_from_extended): Remove.
106 (convert_to_extended): Likewise.
107 (arm_extract_return_value): Use convert_typed_floating.
108 (arm_store_return_value): Likewise.
109
110 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
111 * sh-tdep.c: Do not include "floatformat.h".
112 (sh_littlebyte_bigword_type): New function.
113 (sh_register_convert_to_virtual): Use convert_typed_floating.
114 (sh_register_convert_to_raw): Likewise.
115 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
116 (sh64_littlebyte_bigword_type): New function.
117 (sh64_extract_return_value): Use convert_typed_floating.
118 (sh64_register_convert_to_virtual): Likewise.
119 (sh64_register_convert_to_raw): Likewise.
120
121 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
122
123 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
124 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
125
126 * gdbtypes.h (union type_specific): Make field floatformat hold
127 just a single struct floatformat, not an array.
128 (floatformat_from_type): Move here.
129 * gdbtypes.c (floatformat_from_type): Move here. Update to
130 changed TYPE_FLOATFORMAT definition.
131 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
132 (recursive_dump_type): Likewise.
133 (init_float_type): Install correct floatformat for byte order.
134 (arch_float_type): Likewise.
135
136 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
137
138 * gdbtypes.c (init_type): Change incoming argument from
139 length-in-bytes to length-in-bits. Assert length is a
140 multiple of TARGET_CHAR_BITS.
141 (arch_type, arch_flags_type): Likewise.
142 (init_integer_type): Update call to init_type.
143 (init_character_type): Likewise.
144 (init_boolean_type): Likewise.
145 (init_float_type): Likewise.
146 (init_decfloat_type): Likewise.
147 (init_complex_type): Likewise.
148 (init_pointer_type): Likewise.
149 (objfile_type): Likewise.
150 (arch_integer_type): Update call to arch_type.
151 (arch_character_type): Likewise.
152 (arch_boolean_type): Likewise.
153 (arch_float_type): Likewise.
154 (arch_decfloat_type): Likewise.
155 (arch_complex_type): Likewise.
156 (arch_pointer_type): Likewise.
157 (gdbtypes_post_init): Likewise.
158
159 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
160 (read_base_type): Likewise.
161 * mdebugread.c (basic_type): Likewise.
162 * stabsread.c (dbx_init_float_type): Likewise.
163 (rs6000_builtin_type): Likewise.
164 (read_range_type): Likewise. Also, fix call to init_integer_type
165 with erroneous length argument.
166
167 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
168 * d-lang.c (build_d_types): Likewise.
169 * f-lang.c (build_fortran_types): Likewise.
170 * go-lang.c (build_go_types): Likewise.
171 * opencl-lang.c (build_opencl_types): Likewise.
172 * jit.c (finalize_symtab): Likewise.
173 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
174 (build_std_type_info_type): Likewise.
175 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
176 update call to arch_flags_type.
177
178 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
179 arch_type.
180 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
181 * windows-tdep.c (windows_get_tlb_type): Likewise.
182
183 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
184 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
185 * m32c-tdep.c (make_types): Likewise.
186 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
187 (rl78_psw_type): Update call to arch_flags_type.
188 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
189 * rx-tdep.c (rx_psw_type): Likewise.
190 (rx_fpsw_type): Likewise.
191 * sparc-tdep.c (sparc_psr_type): Likewise.
192 (sparc_fsr_type): Likewise.
193 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
194 (sparc64_ccr_type): Likewise.
195 (sparc64_fsr_type): Likewise.
196 (sparc64_fprs_type): Likewise.
197
198 2017-09-27 Tom Tromey <tom@tromey.com>
199
200 * findcmd.c (find_command): Constify.
201
202 2017-09-27 Tom Tromey <tom@tromey.com>
203
204 * ada-tasks.c (task_command_1, task_command): Constify.
205
206 2017-09-27 Tom Tromey <tom@tromey.com>
207
208 * symtab.c (maintenance_print_symbol_cache)
209 (maintenance_flush_symbol_cache)
210 (maintenance_print_symbol_cache_statistics): Constify.
211
212 2017-09-27 Tom Tromey <tom@tromey.com>
213
214 * inferior.c (detach_inferior_command, kill_inferior_command)
215 (inferior_command): Constify.
216
217 2017-09-27 Tom Tromey <tom@tromey.com>
218
219 * regcache.c (regcache_print, maintenance_print_registers)
220 (maintenance_print_raw_registers)
221 (maintenance_print_cooked_registers)
222 (maintenance_print_register_groups)
223 (maintenance_print_remote_registers): Constify.
224
225 2017-09-27 Tom Tromey <tom@tromey.com>
226
227 * printcmd.c (map_display_numbers, undisplay_command)
228 (enable_disable_display_command, enable_display_command)
229 (disable_display_command): Constify.
230
231 2017-09-27 Tom Tromey <tom@tromey.com>
232
233 * breakpoint.h (delete_command): Don't declare.
234 * breakpoint.c (delete_command, enable_once_command)
235 (enable_count_command, enable_delete_command, breakpoint_1)
236 (maintenance_info_breakpoints, stopin_command, stopat_command)
237 (delete_command, delete_trace_command, save_breakpoints)
238 (save_breakpoints_command, save_tracepoints_command): Constify.
239
240 2017-09-27 Tom Tromey <tom@tromey.com>
241
242 * macrocmd.c (macro_expand_command, macro_expand_once_command)
243 (skip_ws, extract_identifier, macro_define_command)
244 (macro_undef_command, macro_list_command): Constify.
245
246 2017-09-27 Tom Tromey <tom@tromey.com>
247
248 * infcmd.c (environment_info, set_environment_command)
249 (unset_environment_command, path_info, info_proc_cmd_1)
250 (info_proc_cmd_mappings, info_proc_cmd_stat)
251 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
252 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
253
254 2017-09-27 Tom Tromey <tom@tromey.com>
255
256 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
257 Constify.
258
259 2017-09-27 Tom Tromey <tom@tromey.com>
260
261 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
262
263 2017-09-27 Tom Tromey <tom@tromey.com>
264
265 * demangle.c (demangle_command): Constify.
266
267 2017-09-27 Tom Tromey <tom@tromey.com>
268
269 * progspace.c (maintenance_info_program_spaces_command):
270 Constify.
271
272 2017-09-27 Tom Tromey <tom@tromey.com>
273
274 * compile/compile.c (check_raw_argument, compile_file_command)
275 (compile_code_command, compile_print_command): Constify.
276
277 2017-09-27 Tom Tromey <tom@tromey.com>
278
279 * reggroups.c (maintenance_print_reggroups): Constify.
280
281 2017-09-27 Tom Tromey <tom@tromey.com>
282
283 * dwarf2read.c (save_gdb_index_command): Constify.
284
285 2017-09-27 Tom Tromey <tom@tromey.com>
286
287 * stap-probe.c (info_probes_stap_command): Constify.
288
289 2017-09-27 Tom Tromey <tom@tromey.com>
290
291 * fork-child.c (unset_exec_wrapper_command): Constify.
292
293 2017-09-27 Tom Tromey <tom@tromey.com>
294
295 * btrace.c (get_uint, get_context_size, no_chunk)
296 (maint_btrace_packet_history_cmd)
297 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
298 (maint_info_btrace_cmd): Constify.
299
300 2017-09-27 Tom Tromey <tom@tromey.com>
301
302 * reverse.c (delete_bookmark_command): Constify.
303
304 2017-09-27 Tom Tromey <tom@tromey.com>
305
306 * remote.c (set_memory_packet_size)
307 (set_memory_write_packet_size, show_memory_write_packet_size)
308 (set_memory_read_packet_size, show_memory_read_packet_size)
309 (compare_sections_command, packet_command, remote_put_command)
310 (remote_get_command, remote_delete_command): Constify.
311
312 2017-09-27 Tom Tromey <tom@tromey.com>
313
314 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
315 (set_mipsfpu_double_command, set_mipsfpu_none_command)
316 (set_mipsfpu_auto_command): Constify.
317
318 2017-09-27 Tom Tromey <tom@tromey.com>
319
320 * cli/cli-cmds.h (cd_command): Constify.
321 * cli/cli-cmds.c (cd_command): Constify.
322
323 2017-09-27 Tom Tromey <tom@tromey.com>
324
325 * thread.c (thread_name_command, thread_find_command): Constify.
326
327 2017-09-27 Tom Tromey <tom@tromey.com>
328
329 * probe.c (enable_probes_command, disable_probes_command):
330 Constify.
331
332 2017-09-27 Tom Tromey <tom@tromey.com>
333
334 * symfile.c (symbol_file_command): Constify.
335 * gdbcore.h (deprecated_file_changed_hook): Constify.
336 * exec.c (deprecated_file_changed_hook, exec_file_command)
337 (file_command): Constify.
338 * defs.h (symbol_file_command): Constify.
339
340 2017-09-27 Tom Tromey <tom@tromey.com>
341
342 * remote-fileio.c (set_system_call_allowed)
343 (show_system_call_allowed): Constify.
344
345 2017-09-27 Tom Tromey <tom@tromey.com>
346
347 * tracepoint.c (delete_trace_variable_command)
348 (tfind_end_command, tfind_start_command, tfind_pc_command)
349 (tfind_tracepoint_command, tfind_line_command)
350 (tfind_range_command, tfind_outside_command): Constify.
351
352 2017-09-27 Tom Tromey <tom@tromey.com>
353
354 * ax-gdb.c (maint_agent_printf_command, agent_command)
355 (agent_eval_command): Constify.
356
357 2017-09-27 Tom Tromey <tom@tromey.com>
358
359 * tracepoint.c (info_scope_command): Constify.
360 * python/python.c (gdbpy_decode_line): Constify.
361 * python/py-breakpoint.c (bppy_init): Constify.
362 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
363 * location.h: (new_linespec_location)
364 (string_to_event_location_basic, string_to_event_location):
365 Constify.
366 * location.c (new_linespec_location)
367 (string_to_event_location_basic, string_to_event_location):
368 Constify.
369 * linespec.h (decode_line_with_current_source)
370 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
371 * linespec.c (linespec_lex_to_end)
372 (decode_line_with_current_source)
373 (decode_line_with_last_displayed): Constify.
374 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
375 Constify.
376 * cli/cli-cmds.c (edit_command, list_command): Constify.
377 * breakpoint.h (until_break_command, watch_command_wrapper)
378 (awatch_command_wrapper, rwatch_command_wrapper)
379 (init_ada_exception_breakpoint): Constify.
380 * breakpoint.c (break_command_1, dprintf_command)
381 (break_range_command, watch_command_wrapper)
382 (rwatch_command_wrapper, awatch_command_wrapper)
383 (until_break_command, init_ada_exception_breakpoint)
384 (strace_marker_create_sals_from_location, trace_command)
385 (ftrace_command, strace_command, struct tracepoint): Constify.
386 * ax-gdb.c (agent_command_1): Constify.
387 * ada-lang.c (ada_exception_sal): Constify.
388
389 2017-09-27 Tom Tromey <tom@tromey.com>
390
391 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
392 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
393 (get_context_size, no_chunk, get_insn_history_modifiers)
394 (cmd_record_insn_history, get_call_history_modifiers)
395 (cmd_record_call_history): Constify.
396
397 2017-09-27 Tom Tromey <tom@tromey.com>
398
399 * source.c (show_substitute_path_command)
400 (unset_substitute_path_command, set_substitute_path_command):
401 Constify.
402
403 2017-09-27 Tom Tromey <tom@tromey.com>
404
405 * typeprint.c (maintenance_print_type): Constify.
406 * maint.c (maintenance_dump_me, maintenance_demangle)
407 (maintenance_time_display, maintenance_info_sections)
408 (maintenance_print_statistics, maintenance_deprecate)
409 (maintenance_undeprecate): Constify.
410 (maintenance_do_deprecate): Constify. Use std::string.
411 (maintenance_selftest): Constify.
412 * gdbtypes.h (maintenance_print_type): Constify.
413
414 2017-09-27 Tom Tromey <tom@tromey.com>
415
416 * hppa-tdep.c (unwind_command): Constify.
417
418 2017-09-27 Tom Tromey <tom@tromey.com>
419
420 * target-descriptions.c (unset_tdesc_filename_cmd)
421 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
422 Constify.
423
424 2017-09-27 Tom Tromey <tom@tromey.com>
425
426 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
427
428 2017-09-27 Tom Tromey <tom@tromey.com>
429
430 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
431
432 2017-09-27 Tom Tromey <tom@tromey.com>
433
434 * tui/tui-regs.c (tui_reg_command): Constify.
435
436 2017-09-27 Tom Tromey <tom@tromey.com>
437
438 * skip.c (skip_file_command, skip_function_command)
439 (skip_enable_command, skip_disable_command, skip_delete_command):
440 Constify.
441
442 2017-09-27 Tom Tromey <tom@tromey.com>
443
444 * record-btrace.c (cmd_record_btrace_bts_start)
445 (cmd_record_btrace_pt_start): Constify.
446
447 2017-09-27 Tom Tromey <tom@tromey.com>
448
449 * symmisc.c (maintenance_print_symbols)
450 (maintenance_print_msymbols, maintenance_print_objfiles)
451 (maintenance_info_symtabs, maintenance_check_symtabs)
452 (maintenance_expand_symtabs, maintenance_info_line_tables):
453 Constify.
454
455 2017-09-27 Tom Tromey <tom@tromey.com>
456
457 * top.c (new_ui_command): Constify.
458
459 2017-09-27 Tom Tromey <tom@tromey.com>
460
461 * symfile.c (add_symbol_file_command)
462 (remove_symbol_file_command, list_overlays_command)
463 (map_overlay_command, unmap_overlay_command)
464 (overlay_auto_command, overlay_manual_command)
465 (overlay_off_command, overlay_load_command): Constify.
466
467 2017-09-27 Tom Tromey <tom@tromey.com>
468
469 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
470 (info_spu_mailbox_command, info_spu_dma_command)
471 (info_spu_proxydma_command): Constify.
472
473 2017-09-27 Tom Tromey <tom@tromey.com>
474
475 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
476
477 2017-09-27 Tom Tromey <tom@tromey.com>
478
479 * cli/cli-script.c (user_defined_command): Constify.
480
481 2017-09-27 Tom Tromey <tom@tromey.com>
482
483 * cli/cli-dump.c (dump_memory_command, dump_value_command)
484 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
485 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
486 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
487 (dump_binary_value, append_binary_memory, append_binary_value):
488 Constify.
489 (struct dump_context) <func>: Constify.
490 (add_dump_command): Update.
491
492 2017-09-27 Tom Tromey <tom@tromey.com>
493
494 * cli/cli-cmds.c (show_version, show_configuration)
495 (source_command, show_user): Constify.
496
497 2017-09-27 Tom Tromey <tom@tromey.com>
498
499 * target.c (maintenance_print_target_stack): Constify.
500
501 2017-09-27 Tom Tromey <tom@tromey.com>
502
503 * interps.c (interpreter_exec_cmd): Constify.
504
505 2017-09-27 Tom Tromey <tom@tromey.com>
506
507 * record-full.c (cmd_record_full_restore): Constify.
508
509 2017-09-27 Tom Tromey <tom@tromey.com>
510
511 * memattr.c (enable_mem_command, disable_mem_command)
512 (delete_mem_command): Constify.
513
514 2017-09-27 Tom Tromey <tom@tromey.com>
515
516 * value.c (show_convenience): Constify.
517
518 2017-09-27 Tom Tromey <tom@tromey.com>
519
520 * gdbcore.h (core_file_command): Update.
521 * corefile.c (core_file_command): Constify.
522
523 2017-09-27 Tom Tromey <tom@tromey.com>
524
525 * user-regs.c (maintenance_print_user_registers): Constify.
526
527 2017-09-27 Tom Tromey <tom@tromey.com>
528
529 * cp-namespace.c (maintenance_cplus_namespace): Constify.
530
531 2017-09-27 Tom Tromey <tom@tromey.com>
532
533 * cp-support.c (first_component_command): Constify.
534
535 2017-09-27 Tom Tromey <tom@tromey.com>
536
537 * psymtab.c (maintenance_print_psymbols)
538 (maintenance_info_psymtabs, maintenance_check_psymtabs):
539 Constify.
540
541 2017-09-27 Tom Tromey <tom@tromey.com>
542
543 * windows-tdep.c (display_tib): Constify.
544
545 2017-09-27 Tom Tromey <tom@tromey.com>
546
547 * linux-fork.c (delete_checkpoint_command)
548 (detach_checkpoint_command): Constify.
549
550 2017-09-27 Tom Tromey <tom@tromey.com>
551
552 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
553
554 2017-09-27 Tom Tromey <tom@tromey.com>
555
556 * arc-tdep.c (dump_arc_instruction_command): Constify.
557
558 2017-09-27 Tom Tromey <tom@tromey.com>
559
560 * valprint.c (set_radix, show_radix): Constify.
561
562 2017-09-27 Tom Tromey <tom@tromey.com>
563
564 * dtrace-probe.c (info_probes_dtrace_command): Constify.
565
566 2017-09-27 Tom Tromey <tom@tromey.com>
567
568 * command.h (not_just_help_class_command): Update.
569 * cli/cli-decode.h (not_just_help_class_command): Update.
570 * cli/cli-decode.c (not_just_help_class_command): Constify.
571
572 2017-09-27 Tom Tromey <tom@tromey.com>
573
574 * gdb_bfd.c (maintenance_info_bfds): Constify.
575
576 2017-09-27 Tom Tromey <tom@tromey.com>
577
578 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
579 overloads.
580 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
581 (do_const_cfunc): New function.
582 (cmd_cfunc_eq): New overload.
583 (cli_user_command_p): Check do_const_cfunc.
584 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
585 const_cfunc.
586 * command.h (add_cmd): Add const overload and no-function
587 overload.
588 (set_cmd_cfunc): Add const overload.
589 (cmd_const_cfunc_ftype): Declare.
590 (cmd_cfunc_eq): Add const overload.
591 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
592 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
593 overload.
594
595 2017-09-27 Tom Tromey <tom@tromey.com>
596
597 * macroexp.c (get_next_token_for_substitution): New function.
598 (substitute_args): Call it. Check for __VA_OPT__.
599
600 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
601 Pedro Alves <palves@redhat.com>
602
603 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
604 producer_is_icc_lt_14.
605 (producer_is_icc_lt_14): New function.
606 (check_producer): Add code for checking version of ICC.
607 (producer_is_icc): Move to producer.c.
608 (read_structure_type): Restrict ICC workaround to ICC<14.
609 * producer.c: Include selftest.h.
610 (producer_is_icc, producer_parsing_tests, _initialize_producer):
611 New functions.
612 * producer.h (producer_is_icc): New declaration.
613
614 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
615
616 * Makefile.in (SFILES): Add producer.c.
617 (COMMON_OBS): Add producer.o
618 * amd64-tdep.c (producer.h): Add new include.
619 * dwarf2read.c (producer.h): Add new include.
620 * producer.c: New file.
621 * producer.h: New file.
622 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
623 producer.c.
624 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
625 producer.h.
626
627 2017-09-26 Matthias Klose <doko@ubuntu.com>
628
629 * configure.ac: Search ncursesw before ncurses.
630 Check ncursesw/ncurses.h before ncurses/ncurses.h.
631 * gdb_curses.h: Include <ncursesw/ncurses.h>
632 * config.in, configure: Regenerate.
633
634 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
635
636 PR gdb/22185
637 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
638 obsolete.
639 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
640 Remove i386sol2 support.
641 * configure.nat <i386sol2>: Remove.
642 <sol2-64>: Fold into ...
643 <sol2>: ... this.
644 Move common settings to default section.
645 Add sol-thread.o.
646 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
647 x86_64-*-solaris2.1[0-9]*>: Rename to ...
648 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
649 <i[34567]86-*-solaris*>: Remove.
650 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
651
652 * configure.ac: Remove wctype in libw check.
653 (_MSE_INT_H): Don't define on Solaris 7-9.
654 <solaris*>: Remove libthread_db.so.1 check.
655 * configure: Regenerate.
656 * config.in: Regenerate.
657
658 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
659 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
660 (gdb_ps_size_t): Remove.
661 Use base types in users.
662 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
663
664 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
665
666 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
667
668 PR build/22206
669 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
670 (adi_is_addr_mapped): Likewise.
671 (PSR_ICC): Don't redefine.
672 (PSR_IMPL): Likewise.
673
674 2017-09-25 Tom Tromey <tom@tromey.com>
675
676 * regcache.c (regcache::dump): Use string_printf.
677
678 2017-09-25 Tom Tromey <tom@tromey.com>
679
680 * regcache.c (class regcache_invalidator): New.
681 (struct register_to_invalidate): Remove.
682 (make_cleanup_regcache_invalidate): Remove.
683 (regcache::raw_write): Use regcache_invalidator.
684
685 2017-09-25 Tom Tromey <tom@tromey.com>
686
687 * spu-tdep.c (spu2ppu_sniffer): Update.
688 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
689 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
690 Remove.
691 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
692 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
693 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
694 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
695 (frame_pop): Update.
696
697 2017-09-25 Tom Tromey <tom@tromey.com>
698
699 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
700 * regcache.h (regcache_xfree): Don't declare.
701 * regcache.c (regcache_xfree): Remove.
702 (do_regcache_xfree): Use delete.
703 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
704 * linux-fork.c (free_fork): Use delete.
705 (fork_save_infrun_state): Likewise.
706 * jit.c (jit_dealloc_cache): Use delete.
707 * infrun.c (discard_infcall_suspend_state): Use delete.
708
709 2017-09-25 Tom Tromey <tom@tromey.com>
710
711 * regcache.h (regcache_xmalloc): Don't declare.
712 (regcache_raw_set_cached_value): Update comment.
713 * regcache.c (regcache_xmalloc): Remove.
714 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
715 * jit.c (jit_frame_sniffer): Use new.
716 * frame.c (frame_save_as_regcache): Use new.
717
718 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
719
720 * NEWS: Advertise support for guarded-storage registers on IBM z.
721
722 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
723
724 * s390-linux-nat.c (have_regset_gs): New static variable.
725 (s390_linux_fetch_inferior_registers): Handle guarded-storage
726 control block and guarded-storage broadcast control regsets.
727 (s390_read_description): Detect whether the target has
728 guarded-storage support, return appropriate tdesc.
729 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
730 (features/s390x-gs-linux64.c): Likewise.
731 (struct gdbarch_tdep) <have_gs>: New field.
732 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
733 (s390_gsbc_regset): New variables.
734 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
735 and s390_gsbc_regset, if applicable.
736 (s390_core_read_description): Check whether core file was from a
737 target with guarded-storage support; include appropriate regsets.
738 (s390_gdbarch_init): Add registers for guarded-storage support.
739 (_initialize_s390_tdep): Initialize new target descriptions that
740 include registers for guarded-storage support.
741 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
742 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
743 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
744 (S390_NUM_REGS): Adjust macro definition.
745 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
746 (tdesc_s390x_gs_linux64): New declarations.
747
748 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
749
750 * features/s390-gs-linux64.xml: New file.
751 * features/s390-gs.xml: New file.
752 * features/s390-gsbc.xml: New file.
753 * features/s390x-gs-linux64.xml: New file.
754 * features/Makefile (WHICH): Add s390-gs-linux64 and
755 s390x-gs-linux64.
756 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
757 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
758 * features/s390-gs-linux64.c: New generated file.
759 * features/s390x-gs-linux64.c: New file.
760 * regformats/s390-gs-linux64.dat: New file.
761 * regformats/s390x-gs-linux64.dat: New file.
762
763 2017-09-23 Tom Tromey <tom@tromey.com>
764
765 * defs.h (make_cleanup_override_quit_handler): Don't declare.
766
767 2017-09-22 Tom Tromey <tom@tromey.com>
768
769 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
770 type to scoped_restore_tmpl.
771 <scoped_input_handler>: Initialize m_quit_handler directly.
772
773 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
774
775 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
776 (cd_command): Likewise. Free "current_directory" before
777 assigning to it.
778 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
779 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
780 * top.c (gdb_dirbuf): Remove global declaration.
781 * top.h (gdb_dirbuf): Likewise.
782
783 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
784
785 * gnulib/aclocal.m4: Regenerate.
786 * gnulib/config.in: Regenerate.
787 * gnulib/configure: Regenerate.
788 * gnulib/import/Makefile.am: Regenerate.
789 * gnulib/import/Makefile.in: Regenerate.
790 * gnulib/import/assure.h: New file.
791 * gnulib/import/at-func.c: Likewise
792 * gnulib/import/chdir-long.c: New file.
793 * gnulib/import/chdir-long.h: New file.
794 * gnulib/import/cloexec.c: New file.
795 * gnulib/import/cloexec.h: New file.
796 * gnulib/import/close.c: New file.
797 * gnulib/import/closedir.c: New file.
798 * gnulib/import/dirent-private.h: New file.
799 * gnulib/import/dup-safer.c: New file.
800 * gnulib/import/dup.c: New file.
801 * gnulib/import/dup2.c: New file.
802 * gnulib/import/error.c: New file.
803 * gnulib/import/error.h: New file.
804 * gnulib/import/exitfail.c: New file.
805 * gnulib/import/exitfail.h: New file.
806 * gnulib/import/fchdir.c: New file.
807 * gnulib/import/fcntl.c: New file.
808 * gnulib/import/fcntl.in.h: New file.
809 * gnulib/import/fd-hook.c: New file.
810 * gnulib/import/fd-hook.h: New file.
811 * gnulib/import/fd-safer.c: New file.
812 * gnulib/import/fdopendir.c: New file.
813 * gnulib/import/filename.h: New file.
814 * gnulib/import/filenamecat-lgpl.c: New file.
815 * gnulib/import/filenamecat.h: New file.
816 * gnulib/import/fstat.c: New file.
817 * gnulib/import/fstatat.c: New file.
818 * gnulib/import/getcwd-lgpl.c: New file.
819 * gnulib/import/getcwd.c: New file.
820 * gnulib/import/getdtablesize.c: New file.
821 * gnulib/import/getlogin_r.c: New file.
822 * gnulib/import/getprogname.c: New file.
823 * gnulib/import/getprogname.h: New file.
824 * gnulib/import/gettext.h: New file.
825 * gnulib/import/glob-libc.h: New file.
826 * gnulib/import/glob.c: New file.
827 * gnulib/import/glob.in.h: New file.
828 * gnulib/import/intprops.h: New file.
829 * gnulib/import/m4/chdir-long.m4: New file.
830 * gnulib/import/m4/close.m4: New file.
831 * gnulib/import/m4/closedir.m4: New file.
832 * gnulib/import/m4/d-ino.m4: New file.
833 * gnulib/import/m4/d-type.m4: New file.
834 * gnulib/import/m4/dup.m4: New file.
835 * gnulib/import/m4/dup2.m4: New file.
836 * gnulib/import/m4/error.m4: New file.
837 * gnulib/import/m4/fchdir.m4: New file.
838 * gnulib/import/m4/fcntl.m4: New file.
839 * gnulib/import/m4/fcntl_h.m4: New file.
840 * gnulib/import/m4/fdopendir.m4: New file.
841 * gnulib/import/m4/filenamecat.m4: New file.
842 * gnulib/import/m4/fstat.m4: New file.
843 * gnulib/import/m4/fstatat.m4: New file.
844 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
845 * gnulib/import/m4/getcwd-path-max.m4: New file.
846 * gnulib/import/m4/getcwd.m4: New file.
847 * gnulib/import/m4/getdtablesize.m4: New file.
848 * gnulib/import/m4/getlogin_r.m4: New file.
849 * gnulib/import/m4/getprogname.m4: New file.
850 * gnulib/import/m4/glob.m4: New file.
851 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
852 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
853 * gnulib/import/m4/mempcpy.m4: New file.
854 * gnulib/import/m4/memrchr.m4: New file.
855 * gnulib/import/m4/mode_t.m4: New file.
856 * gnulib/import/m4/msvc-inval.m4: New file.
857 * gnulib/import/m4/msvc-nothrow.m4: New file.
858 * gnulib/import/m4/open.m4: New file.
859 * gnulib/import/m4/openat.m4: New file.
860 * gnulib/import/m4/opendir.m4: New file.
861 * gnulib/import/m4/readdir.m4: New file.
862 * gnulib/import/m4/realloc.m4: New file.
863 * gnulib/import/m4/rewinddir.m4: New file.
864 * gnulib/import/m4/save-cwd.m4: New file.
865 * gnulib/import/m4/strdup.m4: New file.
866 * gnulib/import/m4/strerror.m4: New file.
867 * gnulib/import/m4/unistd-safer.m4: New file.
868 * gnulib/import/mempcpy.c: New file.
869 * gnulib/import/memrchr.c: New file.
870 * gnulib/import/msvc-inval.c: New file.
871 * gnulib/import/msvc-inval.h: New file.
872 * gnulib/import/msvc-nothrow.c: New file.
873 * gnulib/import/msvc-nothrow.h: New file.
874 * gnulib/import/open.c: New file.
875 * gnulib/import/openat-die.c: New file.
876 * gnulib/import/openat-priv.h: New file.
877 * gnulib/import/openat-proc.c: New file.
878 * gnulib/import/openat.c: New file.
879 * gnulib/import/openat.h: New file.
880 * gnulib/import/opendir.c: New file.
881 * gnulib/import/pipe-safer.c: New file.
882 * gnulib/import/readdir.c: New file.
883 * gnulib/import/realloc.c: New file.
884 * gnulib/import/rewinddir.c: New file.
885 * gnulib/import/save-cwd.c: New file.
886 * gnulib/import/save-cwd.h: New file.
887 * gnulib/import/strdup.c: New file.
888 * gnulib/import/strerror-override.c: New file.
889 * gnulib/import/strerror-override.h: New file.
890 * gnulib/import/strerror.c: New file.
891 * gnulib/import/unistd--.h: New file.
892 * gnulib/import/unistd-safer.h: New file.
893 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
894 "getcwd" and "glob".
895 * ser-tcp.c: Undefine "close" before redefining it.
896
897 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
898
899 * guile/scm-value.c (gdbscm_value_address): Initialize address,
900 get rid of res_val.
901
902 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
903
904 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
905 <sol2,sparc>: Likewise.
906 <sol2-64,i386>: Likewise.
907
908 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
909 -Wdeprecated-declarations on *-*-solaris*.
910 * configure: Regenerate.
911
912 * procfs.c: Include "nat/inferior.h".
913 (procfs_info_proc): Fix typo.
914
915 2017-09-21 Kevin Buettner <kevinb@redhat.com>
916
917 * remote.c (vector): Include.
918 (struct private_thread_info): Add field, thread_handle.
919 (free_private_thread_info): Deallocate storage associated with
920 thread handle.
921 (get_private_info_thread): Initialize `thread_handle' field.
922 (struct thread_item): Add field, thread_handle.
923 (clear_threads_listing_context): Deallocate storage associated
924 with thread handle.
925 (start_thread): Add support for "handle" attribute.
926 (thread_attributes): Add "handle".
927 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
928 field.
929 (remote_update_thread_list): Update thread_handle.
930 (remote_thread_handle_to_thread_info): New function.
931 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
932
933 2017-09-21 Kevin Buettner <kevinb@redhat.com>
934
935 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
936 function.
937 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
938 * python/python-internal.h (thread_object_type): Declare.
939
940 2017-09-21 Kevin Buettner <kevinb@redhat.com>
941
942 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
943 (target_thread_handle_to_thread_info): Declare.
944 * target.c (target_thread_handle_to_thread_info): New function.
945 * target-delegates.c: Regenerate.
946 * gdbthread.h (find_thread_by_handle): Declare.
947 * thread.c (find_thread_by_handle): New function.
948 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
949 function.
950 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
951
952 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
953
954 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
955
956 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
957
958 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
959
960 2017-09-21 Yao Qi <yao.qi@linaro.org>
961
962 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
963 to gdb_target_obs.
964
965 2017-09-20 Tom Tromey <tom@tromey.com>
966
967 * breakpoint.c (struct counted_command_line): Remove.
968 (breakpoint_commands): Update.
969 (alloc_counted_command_line, incref_counted_command_line)
970 (decref_counted_command_line, do_cleanup_counted_command_line)
971 (make_cleanup_decref_counted_command_line): Remove.
972 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
973 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
974 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
975 (save_breakpoints): Update.
976 * breakpoint.h (counted_command_line): Now a typedef to
977 shared_ptr.
978 (struct breakpoint) <commands>: Now a counted_command_line.
979 (struct bpstats) <command>: Likewise.
980
981 2017-09-20 Tom Tromey <tom@tromey.com>
982
983 * breakpoint.c (struct commands_info, do_map_commands_command):
984 Remove.
985 (commands_command_1): Update.
986 (iterate_over_related_breakpoints): Take a function_view.
987 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
988 (delete_command): Update.
989 (map_breakpoint_numbers): Take a function_view.
990 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
991 (disable_command): Update.
992 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
993 (enable_command): Update.
994 (struct disp_data, do_enable_breakpoint_disp)
995 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
996 (do_map_enable_delete_breakpoint): Remove.
997 (enable_once_command, enable_count_command, enable_delete_command)
998 (delete_trace_variable_command): Update.
999
1000 2017-09-20 Tom Tromey <tom@tromey.com>
1001
1002 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
1003 (bpstat_clear): Use delete.
1004 (bpstats): New constructors.
1005 (bpstat_copy, bpstat_stop_status): Use new.
1006 (dprintf_after_condition_true): Update.
1007 * breakpoint.h (bpstats::bpstats): Add constructors.
1008 (bpstats::~bpstats): Add destructor.
1009
1010 2017-09-20 Pedro Alves <palves@redhat.com>
1011
1012 * eval.c (make_params): Delete, refactored as ...
1013 (class fake_method): ... this new type's ctor.
1014 (fake_method::~fake_method): New.
1015 (evaluate_subexp_standard): Use 'fake_method'.
1016
1017 2017-09-20 Tom Tromey <tom@tromey.com>
1018
1019 * windows-nat.c (get_windows_debug_event, windows_wait)
1020 (do_initial_windows_stuff, windows_attach): Update.
1021 * utils.c (vwarning, internal_vproblem): Update.
1022 (ui_unregister_input_event_handler_cleanup)
1023 (prepare_to_handle_input): Remove.
1024 (class scoped_input_handler): New.
1025 (defaulted_query, prompt_for_continue): Update.
1026 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
1027 Update.
1028 * top.c (undo_terminal_modifications_before_exit): Update.
1029 * target/target.h (target_terminal_init, target_terminal_inferior)
1030 (target_terminal_ours): Don't declare.
1031 (class target_terminal): New.
1032 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
1033 (target_terminal_ours_for_output)
1034 (make_cleanup_restore_target_terminal): Don't declare.
1035 (target_terminal_info): Remove.
1036 * target.c (enum terminal_state, terminal_state): Remove.
1037 (target_terminal::terminal_state): Define.
1038 (target_terminal::init): Rename from target_terminal_init.
1039 (target_terminal::inferior): Rename from
1040 target_terminal_inferior.
1041 (target_terminal::ours): Rename from target_terminal_ours.
1042 (target_terminal::ours_for_output): Rename from
1043 target_terminal_ours_for_output.
1044 (target_terminal::info): New method.
1045 (cleanup_restore_target_terminal)
1046 (make_cleanup_restore_target_terminal): Remove.
1047 * solib.c (handle_solib_event): Update.
1048 * remote.c (remote_serial_quit_handler): Update.
1049 (remote_terminal_inferior, remote_wait_as): Update.
1050 * record-full.c (record_full_wait_1): Update.
1051 * nto-procfs.c (procfs_create_inferior): Update.
1052 * nat/fork-inferior.c (startup_inferior): Update.
1053 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
1054 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
1055 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
1056 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
1057 (mi_breakpoint_created, mi_breakpoint_deleted)
1058 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
1059 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1060 (mi_user_selected_context_changed, report_initial_inferior):
1061 Update.
1062 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
1063 (linux_nat_terminal_inferior): Update.
1064 * infrun.c (follow_fork_inferior)
1065 (handle_vfork_child_exec_or_exit, do_target_resume)
1066 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
1067 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
1068 Update.
1069 * inflow.c (child_terminal_init, info_terminal_command): Update.
1070 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
1071 (attach_command): Update.
1072 * infcall.c (call_thread_fsm_should_stop): Update.
1073 * gnu-nat.c (gnu_attach): Update.
1074 * extension.c (struct active_ext_lang_state)
1075 (restore_active_ext_lang): Update.
1076 * exceptions.c (print_flush): Update.
1077 * event-top.c (async_enable_stdin, default_quit_handler): Update.
1078 (struct quit_handler_cleanup_data, restore_quit_handler)
1079 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
1080 Remove.
1081 * cp-support.c (gdb_demangle): Update.
1082 * breakpoint.c (update_inserted_breakpoint_locations)
1083 (insert_breakpoint_locations, handle_jit_event)
1084 (disable_breakpoints_in_unloaded_shlib): Update.
1085 * annotate.c (annotate_breakpoints_invalid)
1086 (annotate_frames_invalid): Update.
1087
1088 2017-09-20 Tom Tromey <tom@tromey.com>
1089
1090 * main.c (catch_command_errors): Rename from
1091 catch_command_errors_const.
1092 (captured_main_1): Update.
1093
1094 2017-09-20 Pedro Alves <palves@redhat.com>
1095
1096 * cli/cli-cmds.c (list_command): Use print_sal_location.
1097 (print_sal_location): New function.
1098 (ambiguous_line_spec): Use print_sal_location.
1099 * linespec.c (symbol_to_sal): Record the symbol in the sal.
1100 * symtab.c (find_function_start_sal): Likewise.
1101 * symtab.h (symtab_and_line::symbol): New field.
1102
1103 2017-09-20 Pedro Alves <palves@redhat.com>
1104
1105 * linespec.c (minsym_found): Handle non-text minsyms.
1106 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1107
1108 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1109
1110 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1111 backslash.
1112
1113 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1114
1115 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1116 vmovups instead vmovaps.
1117 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1118
1119 2017-09-19 John Baldwin <jhb@FreeBSD.org>
1120
1121 * NEWS (Changes since GDB 8.0): Add starti.
1122 * infcmd.c (enum run_break): New.
1123 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1124 case.
1125 (run_command): Use enum run_how.
1126 (start_command): Likewise.
1127 (starti_command): New function.
1128 (RUN_ARGS_HELP): New macro.
1129 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1130 commands. Add starti command.
1131
1132 2017-09-19 Yao Qi <yao.qi@linaro.org>
1133
1134 * Makefile.in (monitor.o): Remove the rule.
1135
1136 2017-09-19 Yao Qi <yao.qi@linaro.org>
1137
1138 * annotate.h (struct annotate_arg_emitter): Use
1139 DISABLE_COPY_AND_ASSIGN.
1140 * common/refcounted-object.h (refcounted_object): Likewise.
1141 * completer.h (struct completion_result): Likewise.
1142 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1143 * filename-seen-cache.h (filename_seen_cache): Likewise.
1144 * gdbcore.h (thread_section_name): Likewise.
1145 * gdb_regex.h (compiled_regex): Likewise.
1146 * gdbthread.h (scoped_restore_current_thread): Likewise.
1147 * inferior.h (scoped_restore_current_inferior): Likewise.
1148 * jit.c (jit_reader): Likewise.
1149 * linespec.h (struct linespec_result): Likewise.
1150 * mi/mi-parse.h (struct mi_parse): Likewise.
1151 * nat/fork-inferior.c (execv_argv): Likewise.
1152 * progspace.h (scoped_restore_current_program_space): Likewise.
1153 * python/python-internal.h (class gdbpy_enter): Likewise.
1154 * regcache.h (regcache): Likewise.
1155 * target-descriptions.c (struct tdesc_reg): Likewise.
1156 (struct tdesc_type): Likewise.
1157 (struct tdesc_feature): Likewise.
1158 * ui-out.h (ui_out_emit_type): Likewise.
1159
1160 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
1161
1162 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1163 label abort_expression.
1164
1165 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1166
1167 * common/buffer.c (buffer_xml_printf): Adjust.
1168 * common/xml-utils.c (xml_escape_text): Change return type to
1169 std::string, update code accordingly.
1170 * common/xml-utils.h (xml_escape_text): Change return type to
1171 std::string.
1172 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
1173 * windows-tdep.c (windows_xfer_shared_library): Adjust.
1174 * unittests/xml-utils-selftests.c (test_xml_escape_text):
1175 Adjust.
1176
1177 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1178
1179 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
1180 (SUBDIR_UNITTESTS_OBS): Add new object file.
1181 * unittests/xml-utils-selftests.c: New file.
1182
1183 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1184
1185 * common/selftest.h (selftest): New struct/interface.
1186 (register_test): Add name parameter, add new overload.
1187 (run_tests): Add filter parameter.
1188 (for_each_selftest_ftype): New typedef.
1189 (for_each_selftest): New declaration.
1190 * common/selftest.c (tests): Change type to
1191 map<string, unique_ptr<selftest>>.
1192 (simple_selftest): New struct.
1193 (register_test): New function.
1194 (register_test): Add name parameter and use it.
1195 (run_tests): Add filter parameter and use it. Add prints.
1196 Adjust to vector -> map change.
1197 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
1198 registering selftests.
1199 * arm-tdep.c (_initialize_arm_tdep): Likewise.
1200 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
1201 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
1202 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
1203 * findvar.c (_initialize_findvar): Likewise.
1204 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
1205 * maint.c (maintenance_selftest): Update call to run_tests.
1206 (maintenance_info_selftests): New function.
1207 (_initialize_maint_cmds): Register "maintenance info selftests"
1208 command. Update "maintenance selftest" doc.
1209 * regcache.c (_initialize_regcache): Add names when registering
1210 selftests.
1211 * rust-exp.y (_initialize_rust_exp): Likewise.
1212 * selftest-arch.c (gdbarch_selftest): New struct.
1213 (gdbarch_tests): Remove.
1214 (register_test_foreach_arch): Add name parameter. Call
1215 register_test.
1216 (tests_with_arch): Remove, move most content to
1217 gdbarch_selftest::operator().
1218 (_initialize_selftests_foreach_arch): Remove.
1219 * selftest-arch.h (register_test_foreach_arch): Add name
1220 parameter.
1221 (run_tests_with_arch): New declaration.
1222 * utils-selftests.c (_initialize_utils_selftests): Add names
1223 when registering selftests.
1224 * utils.c (_initialize_utils): Likewise.
1225 * unittests/array-view-selftests.c
1226 (_initialize_array_view_selftests): Likewise.
1227 * unittests/environ-selftests.c (_initialize_environ_selftests):
1228 Likewise.
1229 * unittests/function-view-selftests.c
1230 (_initialize_function_view_selftests): Likewise.
1231 * unittests/offset-type-selftests.c
1232 (_initialize_offset_type_selftests): Likewise.
1233 * unittests/optional-selftests.c
1234 (_initialize_optional_selftests): Likewise.
1235 * unittests/scoped_restore-selftests.c
1236 (_initialize_scoped_restore_selftests): Likewise.
1237 * NEWS: Document "maintenance selftest" and "maint info
1238 selftests".
1239
1240 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1241
1242 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1243 scoped_restore.
1244
1245 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1246
1247 * mi/mi-main.c (mi_load_progress): Make uiout variable
1248 a unique_ptr.
1249
1250 2017-09-15 Pedro Alves <palves@redhat.com>
1251
1252 * compile/compile-c-types.c (convert_enum, convert_int)
1253 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1254
1255 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1256
1257 * dwarf2read.c (copy_string): Remove.
1258 (parse_macro_definition): Replace copy_string with savestring.
1259
1260 2017-09-15 Yao Qi <yao.qi@linaro.org>
1261
1262 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1263 gdb_target_obs.
1264 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1265 Likewise.
1266 (i[34567]86-*-linux*): Likewise.
1267
1268 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1269
1270 * dwarf2expr.h (dwarf_stack_value): Add constructor.
1271 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1272 <stack>: Change type to std::vector.
1273 <stack_len, stack_allocated>: Remove.
1274 <grow_stack>: Remove.
1275 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1276 (dwarf_expr_context::~dwarf_expr_context): Remove.
1277 (dwarf_expr_context::grow_stack): Remove.
1278 (dwarf_expr_context::push): Adjust.
1279 (dwarf_expr_context::pop): Adjust.
1280 (dwarf_expr_context::fetch): Adjust.
1281 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
1282 (dwarf_expr_context::stack_empty_p): Adjust.
1283 (dwarf_expr_context::execute_stack_op): Adjust.
1284
1285 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1286
1287 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
1288 return type to bool.
1289 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
1290
1291 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1292
1293 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
1294 Change type to bool.
1295 (dwarf_stack_value) <in_stack_memory>: Likewise.
1296 (dwarf_expr_context) <push_address>: Change parameter type to
1297 bool.
1298 <fetch_in_stack_memory>: Change return type to bool.
1299 <push>: Change parameter type to bool.
1300 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
1301 to bool.
1302 (dwarf_expr_context::push_address): Likewise.
1303 (dwarf_expr_context::fetch_in_stack_memory): Change return type
1304 to bool.
1305 (dwarf_expr_context::execute_stack_op): Adjust.
1306 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
1307
1308 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1309
1310 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
1311 (struct dwarf_expr_context) <n_pieces>: Remove.
1312 <pieces>: Change type to std::vector.
1313 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1314 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
1315 pieces.
1316 (dwarf_expr_context::add_piece): Adjust.
1317 * dwarf2loc.c (struct piece_closure): Initialize fields.
1318 <n_pieces>: Remove.
1319 <pieces>: Change type to std::vector.
1320 (allocate_piece_closure): Adjust, change parameter to
1321 std::vector rvalue and std::move it to piece_closure.
1322 (rw_pieced_value): Adjust.
1323 (check_pieced_synthetic_pointer): Adjust.
1324 (indirect_synthetic_pointer): Adjust.
1325 (coerce_pieced_ref): Adjust.
1326 (free_pieced_value_closure): Adjust. Use delete to free
1327 piece_closure.
1328 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
1329 to allocate_piece_closure.
1330 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
1331
1332 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1333
1334 * probe.h (probe_ops_cp): Remove typedef.
1335 (DEF_VEC_P (probe_ops_cp)): Remove.
1336 (all_probe_ops): Change type to std::vector.
1337 * probe.c (info_probes_for_ops): Adjust to vector change.
1338 (probe_linespec_to_ops): Likewise.
1339 (all_probe_ops): Change type to std::vector.
1340 (_initialize_probe): Adjust to vector change.
1341 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
1342 * elfread.c (elf_get_probes): Likewise.
1343 * stap-probe.c (_initialize_stap_probe): Likewise.
1344
1345 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1346
1347 * probe.h (struct bound_probe): Define constructors.
1348 * probe.c (bound_probe_s): Remove typedef.
1349 (DEF_VEC_O (bound_probe_s)): Remove VEC.
1350 (collect_probes): Change return type to std::vector, remove
1351 cleanup.
1352 (compare_probes): Return bool, change parameter type. Change
1353 semantic to "less than".
1354 (gen_ui_out_table_header_info): Change parameter to std::vector
1355 and update.
1356 (exists_probe_with_pops): Likewise.
1357 (info_probes_for_ops): Update to std::vector change.
1358 (enable_probes_command): Likewise.
1359 (disable_probes_command): Likewise.
1360
1361 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1362
1363 * probe.h (struct probe_ops) <get_probes>: Change parameter from
1364 vec to std::vector.
1365 * probe.c (parse_probes_in_pspace): Update.
1366 (find_probes_in_objfile): Update.
1367 (find_probe_by_pc): Update.
1368 (collect_probes): Update.
1369 (probe_any_get_probes): Update.
1370 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
1371 return type to reference to std::vector.
1372 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
1373 std::vector and update.
1374 (dtrace_process_dof): Likewise.
1375 (dtrace_get_probes): Likewise.
1376 * elfread.c (elf_get_probes): Change return type to std::vector,
1377 store an std::vector in bfd_data.
1378 (probe_key_free): Update to std::vector.
1379 * stap-probe.c (handle_stap_probe): Change parameter to
1380 std::vector and update.
1381 (stap_get_probes): Likewise.
1382 * symfile-debug.c (debug_sym_get_probes): Change return type to
1383 std::vector and update.
1384
1385 2017-09-11 Tom Tromey <tom@tromey.com>
1386
1387 * breakpoint.c (program_breakpoint_here_p): Update.
1388 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
1389 from make_show_memory_breakpoints_cleanup. Return a
1390 scoped_restore_tmpl<int>.
1391 (restore_show_memory_breakpoints): Remove.
1392 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
1393 * mem-break.c (memory_validate_breakpoint): Update.
1394 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
1395 (ia64_memory_remove_breakpoint): Update.
1396 (ia64_breakpoint_from_pc): Update.
1397 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
1398 from make_show_memory_breakpoints_cleanup.
1399
1400 2017-09-11 Tom Tromey <tom@tromey.com>
1401
1402 * d-namespace.c (d_lookup_symbol): Use std::string.
1403 (find_symbol_in_baseclass): Likewise.
1404
1405 2017-09-11 Tom Tromey <tom@tromey.com>
1406
1407 * ctf.c (ctf_start): Use std::string.
1408
1409 2017-09-11 Tom Tromey <tom@tromey.com>
1410
1411 * ada-lang.c (is_known_support_routine): Update.
1412 (ada_unhandled_exception_name_addr_from_raise): Update.
1413 * guile/scm-frame.c (gdbscm_frame_name): Update.
1414 * python/py-frame.c (frapy_name): Update.
1415 (frapy_function): Update.
1416 * stack.h (find_frame_funname): Update.
1417 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
1418 (print_frame): Update.
1419
1420 2017-09-11 Tom Tromey <tom@tromey.com>
1421
1422 * findcmd.c (put_bits): Take a gdb::byte_vector.
1423 (parse_find_args): Return gdb::byte_vector. "args" now const.
1424 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
1425 cleanups.
1426 (find_command): Update.
1427
1428 2017-09-11 Tom Tromey <tom@tromey.com>
1429
1430 * cli/cli-script.c (class scoped_restore_hook_in): New.
1431 (clear_hook_in_cleanup): Remove.
1432 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
1433 scoped_restore_hook_in.
1434
1435 2017-09-11 Tom Tromey <tom@tromey.com>
1436
1437 * cli/cli-script.c (restore_interp): Remove.
1438 (read_command_lines): Use scoped_restore_interp.
1439 * interps.c (scoped_restore_interp::set_temp): Rename from
1440 interp_set_temp.
1441 * interps.h (class scoped_restore_interp): New.
1442 (interp_set_temp): Remove.
1443
1444 2017-09-11 Tom Tromey <tom@tromey.com>
1445
1446 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1447 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
1448 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
1449 scoped_restore.
1450 (mi_cmd_break_insert_1): Update.
1451 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
1452 scoped_restore.
1453
1454 2017-09-11 Tom Tromey <tom@tromey.com>
1455
1456 * demangle.c (demangle_command): Update.
1457 * breakpoint.c (disable_command): Update.
1458 (enable_command): Update.
1459 (find_location_by_number): Make "number" const. Use
1460 get_number_trailer.
1461 * cli/cli-utils.c (extract_arg): Return std::string.
1462 * probe.c (parse_probe_linespec): Update. Change types.
1463 (collect_probes): Take string arguments.
1464 (parse_probe_linespec): Likewise.
1465 (info_probes_for_ops): Update.
1466 (enable_probes_command): Update.
1467 (disable_probes_command): Update.
1468 * break-catch-sig.c (catch_signal_split_args): Update.
1469 * mi/mi-parse.c (mi_parse): Update.
1470
1471 2017-09-11 Tom Tromey <tom@tromey.com>
1472
1473 * language.h (language_enum): Make argument const.
1474 * language.c (language_enum): Make argument const.
1475
1476 2017-09-11 Tom Tromey <tom@tromey.com>
1477
1478 * common/common-utils.h (skip_to_space): Remove macro, redeclare
1479 as function.
1480 (skip_to_space): Rename from skip_to_space_const.
1481 * common/common-utils.c (skip_to_space): New function.
1482 (skip_to_space): Rename from skip_to_space_const.
1483 * cli/cli-utils.h (get_number): Rename from get_number_const.
1484 (extract_arg): Rename from extract_arg_const.
1485 * cli/cli-utils.c (get_number): Rename from get_number_const.
1486 (extract_arg): Rename from extract_arg_const.
1487 (number_or_range_parser::get_number): Use ::get_number.
1488 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
1489 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
1490 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
1491 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
1492 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
1493 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
1494 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
1495 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
1496
1497 2017-09-11 Tom Tromey <tom@tromey.com>
1498
1499 * python/python.c (do_start_initialization): Use
1500 py-event-types.def to initialize types.
1501 Define all object type structures.
1502 * python/python-internal.h: Don't declare event initialization
1503 functions.
1504 * python/py-threadevent.c (thread_event_object_type): Don't
1505 define.
1506 * python/py-stopevent.c (stop_event_object_type): Don't define.
1507 * python/py-signalevent.c (signal_event_object_type): Don't
1508 declare or define.
1509 * python/py-newobjfileevent.c (new_objfile_event_object_type)
1510 (clear_objfiles_event_object_type): Don't declare or define.
1511 * python/py-infevents.c (inferior_call_pre_event_object_type)
1512 (inferior_call_post_event_object_type)
1513 (register_changed_event_object_type)
1514 (memory_changed_event_object_type): Don't declare or define.
1515 * python/py-inferior.c (new_thread_event_object_type)
1516 (new_inferior_event_object_type)
1517 (inferior_deleted_event_object_type): Don't declare or define.
1518 * python/py-exitedevent.c (exited_event_object_type): Don't
1519 declare or define.
1520 * python/py-evts.c (gdbpy_initialize_py_events): Use
1521 py-all-events.def.
1522 * python/py-events.h (thread_event_object_type): Don't declare.
1523 (events_object): Use py-all-events.def.
1524 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
1525 py-event-types.def.
1526 * python/py-event-types.def: New file.
1527 * python/py-continueevent.c (create_continue_event_object): Don't
1528 declare or define.
1529 * python/py-bpevent.c (breakpoint_event_object_type): Don't
1530 declare or define.
1531 * python/py-all-events.def: New file.
1532
1533 2017-09-11 Tom Tromey <tom@tromey.com>
1534
1535 * python/py-threadevent.c (create_thread_event_object): Return
1536 gdbpy_ref.
1537 * python/py-stopevent.h (create_stop_event_object)
1538 (create_breakpoint_event_object, create_signal_event_object):
1539 Update.
1540 * python/py-stopevent.c (create_stop_event_object): Return
1541 gdbpy_ref.
1542 (emit_stop_event): Update.
1543 * python/py-signalevent.c (create_signal_event_object): Return
1544 gdbpy_ref.
1545 * python/py-infevents.c (create_inferior_call_event_object):
1546 Update.
1547 * python/py-event.h (create_event_object)
1548 (create_thread_event_object): Update.
1549 * python/py-event.c (create_event_object): Return gdbpy_ref.
1550 * python/py-continueevent.c: Return gdbpy_ref.
1551 * python/py-bpevent.c (create_breakpoint_event_object): Return
1552 gdbpy_ref.
1553
1554 2017-09-11 Tom Tromey <tom@tromey.com>
1555
1556 PR python/15622:
1557 * NEWS: Add entry.
1558 * python/python.c (do_start_initialization): Initialize new event
1559 types.
1560 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
1561 (gdbpy_initialize_inferior_deleted_event)
1562 (gdbpy_initialize_new_thread_event): Declare.
1563 * python/py-threadevent.c (create_thread_event_object): Add option
1564 "thread" parameter.
1565 * python/py-inferior.c (new_thread_event_object_type)
1566 (new_inferior_event_object_type)
1567 (inferior_deleted_event_object_type): Declare.
1568 (python_new_inferior, python_inferior_deleted): New functions.
1569 (add_thread_object): Emit new_thread event.
1570 (gdbpy_initialize_inferior): Attach new functions to corresponding
1571 observers.
1572 (new_thread, new_inferior, inferior_deleted): Define new event
1573 types.
1574 * python/py-evts.c (gdbpy_initialize_py_events): Add new
1575 registries.
1576 * python/py-events.h (events_object) <new_inferior,
1577 inferior_deleted, new_thread>: New fields.
1578 * python/py-event.h (create_thread_event_breakpoint): Add optional
1579 "thread" parameter.
1580
1581 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1582
1583 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
1584 check current_ui instead.
1585 (internal_vproblem): Likewise.
1586
1587 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
1588
1589 * thread.c (print_thread_info_1): Remove unnecessary calls to
1590 uiout->is_mi_like_p.
1591
1592 2017-09-09 Tom Tromey <tom@tromey.com>
1593
1594 * namespace.h (add_using_directive): Update.
1595 * namespace.c (add_using_directive): Change type of excludes to
1596 std::vector.
1597 * dwarf2read.c (read_import_statement): Use std::vector.
1598 (read_namespace): Update.
1599 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1600
1601 2017-09-09 Tom Tromey <tom@tromey.com>
1602
1603 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
1604
1605 2017-09-09 Tom Tromey <tom@tromey.com>
1606
1607 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
1608
1609 2017-09-09 Tom Tromey <tom@tromey.com>
1610
1611 * stack.c (func_command): Use gdb::def_vector.
1612
1613 2017-09-09 Tom Tromey <tom@tromey.com>
1614
1615 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
1616 ui_out_emit_list, ui_out_emit_tuple.
1617 (mi_cmd_var_update): Likewise.
1618
1619 2017-09-09 Tom Tromey <tom@tromey.com>
1620
1621 * mi/mi-interp.c (mi_user_selected_context_changed): Use
1622 ui_out_redirect_pop.
1623 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1624 ui_out_redirect_pop.
1625 * utils.c (do_ui_out_redirect_pop)
1626 (make_cleanup_ui_out_redirect_pop): Remove.
1627 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
1628 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
1629 * ui-out.h (ui_out_redirect_pop): New class.
1630
1631 2017-09-09 Tom Tromey <tom@tromey.com>
1632
1633 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
1634 (list_available_thread_groups, mi_cmd_list_thread_groups)
1635 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
1636 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
1637 Likewise.
1638
1639 2017-09-09 Tom Tromey <tom@tromey.com>
1640
1641 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
1642 ui_out_emit_tuple.
1643
1644 2017-09-09 Tom Tromey <tom@tromey.com>
1645
1646 * target.c (flash_erase_command): Use ui_out_emit_tuple.
1647 * stack.c (print_frame): Use ui_out_emit_tuple.
1648 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
1649 (info_spu_mailbox_command, info_spu_dma_command)
1650 (info_spu_proxydma_command): Likewise.
1651 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
1652 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
1653 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
1654 ui_out_emit_tuple.
1655 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
1656
1657 2017-09-09 Tom Tromey <tom@tromey.com>
1658
1659 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
1660 (class ui_out_emit_table): Update comment.
1661 * ui-out.c (do_cleanup_table_end)
1662 (make_cleanup_ui_out_table_begin_end): Remove.
1663 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
1664 (info_spu_dma_cmdlist): Likewise.
1665 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
1666 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
1667 ui_out_emit_table.
1668
1669 2017-09-09 Tom Tromey <tom@tromey.com>
1670
1671 * thread.c (print_thread_info_1): Use ui_out_emit_table,
1672 ui_out_emit_list, gdb::optional.
1673
1674 2017-09-09 John Baldwin <jhb@FreeBSD.org>
1675
1676 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
1677 prototype.
1678 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
1679 prototype.
1680 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
1681 prototype.
1682 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
1683 * ada-exp.y: Remove _initialize_ada_exp prototype.
1684 * ada-lang.c: Remove _initialize_ada_language prototype.
1685 * ada-tasks.c: Remove _initialize_tasks prototype.
1686 * addrmap.c: Remove _initialize_addrmap prototype.
1687 * agent.c: Remove _initialize_agent prototype.
1688 * aix-thread.c: Remove _initialize_aix_thread prototype.
1689 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
1690 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
1691 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
1692 prototype.
1693 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
1694 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
1695 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
1696 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
1697 prototype.
1698 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
1699 prototype.
1700 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
1701 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
1702 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
1703 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
1704 prototype.
1705 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
1706 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
1707 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
1708 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
1709 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1710 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
1711 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
1712 prototype.
1713 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
1714 prototype.
1715 * annotate.c: Remove _initialize_annotate prototype.
1716 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
1717 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
1718 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
1719 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
1720 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1721 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1722 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1723 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1724 prototype.
1725 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1726 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1727 * auto-load.c: Remove _initialize_auto_load prototype.
1728 * auxv.c: Remove _initialize_auxv prototype.
1729 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1730 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1731 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1732 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1733 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1734 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1735 prototype.
1736 * break-catch-throw.c: Remove _initialize_break_catch_throw
1737 prototype.
1738 * breakpoint.c: Remove _initialize_breakpoint prototype.
1739 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1740 * btrace.c: Remove _initialize_btrace prototype.
1741 * charset.c: Remove _initialize_charset prototype.
1742 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1743 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1744 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1745 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1746 * cli/cli-script.c: Remove _initialize_cli_script prototype.
1747 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1748 * coffread.c: Remove _initialize_coffread prototype.
1749 * compile/compile.c: Remove _initialize_compile prototype.
1750 * complaints.c: Remove _initialize_complaints prototype.
1751 * completer.c: Remove _initialize_completer prototype.
1752 * copying.awk: Remove _initialize_copying prototype.
1753 * copying.c: Regenerate.
1754 * core-regset.c: Remove _initialize_core_regset prototype.
1755 * corefile.c: Remove _initialize_core prototype.
1756 * corelow.c: Remove _initialize_corelow prototype.
1757 * cp-abi.c: Remove _initialize_cp_abi prototype.
1758 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1759 * cp-support.c: Remove _initialize_cp_support prototype.
1760 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1761 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1762 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1763 * ctf.c: Remove _initialize_ctf prototype.
1764 * d-lang.c: Remove _initialize_d_language prototype.
1765 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1766 prototype.
1767 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1768 * dbxread.c: Remove _initialize_dbxread prototype.
1769 * dcache.c: Remove _initialize_dcache prototype.
1770 * demangle.c: Remove _initialize_demangler prototype.
1771 * disasm-selftests.c: Remove _initialize_disasm_selftests
1772 prototype.
1773 * disasm.c: Remove _initialize_disasm prototype.
1774 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1775 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1776 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1777 prototype.
1778 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1779 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1780 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1781 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1782 * elfread.c: Remove _initialize_elfread prototype.
1783 * exec.c: Remove _initialize_exec prototype.
1784 * extension.c: Remove _initialize_extension prototype.
1785 * f-lang.c: Remove _initialize_f_language prototype.
1786 * f-valprint.c: Remove _initialize_f_valprint prototype.
1787 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1788 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1789 * filesystem.c: Remove _initialize_filesystem prototype.
1790 * findcmd.c: Remove _initialize_mem_search prototype.
1791 * fork-child.c: Remove _initialize_fork_child prototype.
1792 * frame-base.c: Remove _initialize_frame_base prototype.
1793 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1794 * frame.c: Remove _initialize_frame prototype.
1795 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1796 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1797 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1798 * gcore.c: Remove _initialize_gcore prototype.
1799 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1800 * gdbarch.c: Regenerate.
1801 * gdbarch.sh: Remove _initialize_gdbarch prototype.
1802 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1803 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1804 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1805 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1806 * go-lang.c: Remove _initialize_go_language prototype.
1807 * go32-nat.c: Remove _initialize_go32_nat prototype.
1808 * guile/guile.c: Remove _initialize_guile prototype.
1809 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
1810 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
1811 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
1812 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
1813 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
1814 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
1815 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
1816 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
1817 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
1818 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
1819 prototype.
1820 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
1821 prototype.
1822 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
1823 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
1824 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
1825 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
1826 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
1827 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
1828 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
1829 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
1830 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
1831 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
1832 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
1833 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
1834 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
1835 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1836 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
1837 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
1838 prototype.
1839 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
1840 prototype.
1841 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
1842 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
1843 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
1844 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
1845 * infcall.c: Remove _initialize_infcall prototype.
1846 * infcmd.c: Remove _initialize_infcmd prototype.
1847 * inferior.c: Remove _initialize_inferiors prototype.
1848 * inflow.c: Remove _initialize_inflow prototype.
1849 * infrun.c: Remove _initialize_infrun prototype.
1850 * interps.c: Remove _initialize_interpreter prototype.
1851 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
1852 * jit.c: Remove _initialize_jit prototype.
1853 * language.c: Remove _initialize_language prototype.
1854 * linux-fork.c: Remove _initialize_linux_fork prototype.
1855 * linux-nat.c: Remove _initialize_linux_nat prototype.
1856 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
1857 * linux-thread-db.c: Remove _initialize_thread_db prototype.
1858 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
1859 * m2-lang.c: Remove _initialize_m2_language prototype.
1860 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
1861 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
1862 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
1863 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
1864 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
1865 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1866 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1867 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
1868 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
1869 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
1870 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1871 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1872 * machoread.c: Remove _initialize_machoread prototype.
1873 * macrocmd.c: Remove _initialize_macrocmd prototype.
1874 * macroscope.c: Remove _initialize_macroscope prototype.
1875 * maint.c: Remove _initialize_maint_cmds prototype.
1876 * mdebugread.c: Remove _initialize_mdebugread prototype.
1877 * memattr.c: Remove _initialize_mem prototype.
1878 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
1879 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
1880 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
1881 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
1882 * mi/mi-main.c: Remove _initialize_mi_main prototype.
1883 * microblaze-linux-tdep.c: Remove
1884 _initialize_microblaze_linux_tdep prototype.
1885 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
1886 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
1887 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
1888 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
1889 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
1890 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
1891 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
1892 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
1893 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
1894 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
1895 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
1896 prototype.
1897 * mipsread.c: Remove _initialize_mipsread prototype.
1898 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
1899 prototype.
1900 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
1901 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
1902 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
1903 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
1904 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
1905 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
1906 prototype.
1907 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
1908 * nto-procfs.c: Remove _initialize_procfs prototype.
1909 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
1910 * objc-lang.c: Remove _initialize_objc_language prototype.
1911 * objfiles.c: Remove _initialize_objfiles prototype.
1912 * observer.c: Remove observer_test_first_notification_function,
1913 observer_test_second_notification_function,
1914 observer_test_third_notification_function, and
1915 _initialize_observer prototypes.
1916 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
1917 * osabi.c: Remove _initialize_gdb_osabi prototype.
1918 * osdata.c: Remove _initialize_osdata prototype.
1919 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
1920 * parse.c: Remove _initialize_parse prototype.
1921 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
1922 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
1923 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
1924 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
1925 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
1926 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
1927 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
1928 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
1929 * printcmd.c: Remove _initialize_printcmd prototype.
1930 * probe.c: Remove _initialize_probe prototype.
1931 * proc-api.c: Remove _initialize_proc_api prototype.
1932 * proc-events.c: Remove _initialize_proc_events prototype.
1933 * proc-service.c: Remove _initialize_proc_service prototype.
1934 * procfs.c: Remove _initialize_procfs prototype.
1935 * psymtab.c: Remove _initialize_psymtab prototype.
1936 * python/python.c: Remove _initialize_python prototype.
1937 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
1938 * record-btrace.c: Remove _initialize_record_btrace prototype.
1939 * record-full.c: Remove _initialize_record_full prototype.
1940 * record.c: Remove _initialize_record prototype.
1941 * regcache.c: Remove _initialize_regcache prototype.
1942 * reggroups.c: Remove _initialize_reggroup prototype.
1943 * remote-notif.c: Remove _initialize_notif prototype.
1944 * remote-sim.c: Remove _initialize_remote_sim prototype.
1945 * remote.c: Remove _initialize_remote prototype.
1946 * reverse.c: Remove _initialize_reverse prototype.
1947 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
1948 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
1949 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
1950 prototype.
1951 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
1952 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
1953 * rust-exp.y: Remove _initialize_rust_exp prototype.
1954 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
1955 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
1956 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
1957 * score-tdep.c: Remove _initialize_score_tdep prototype.
1958 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
1959 prototype.
1960 * ser-go32.c: Remove _initialize_ser_dos prototype.
1961 * ser-mingw.c: Remove _initialize_ser_windows prototype.
1962 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
1963 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
1964 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
1965 * serial.c: Remove _initialize_serial prototype.
1966 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
1967 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
1968 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
1969 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
1970 * skip.c: Remove _initialize_step_skip prototype.
1971 * sol-thread.c: Remove _initialize_sol_thread prototype.
1972 * solib-aix.c: Remove _initialize_solib_aix prototype.
1973 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
1974 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
1975 * solib-frv.c: Remove _initialize_frv_solib prototype.
1976 * solib-spu.c: Remove _initialize_spu_solib prototype.
1977 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
1978 * solib-target.c: Remove _initialize_solib_target prototype.
1979 * solib.c: Remove _initialize_solib prototype.
1980 * source.c: Remove _initialize_source prototype.
1981 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
1982 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
1983 prototype.
1984 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
1985 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
1986 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
1987 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
1988 prototype.
1989 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
1990 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
1991 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
1992 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
1993 prototype.
1994 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
1995 prototype.
1996 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
1997 prototype.
1998 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
1999 prototype.
2000 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
2001 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
2002 prototype.
2003 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
2004 prototype.
2005 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
2006 prototype.
2007 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
2008 prototype.
2009 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
2010 prototype.
2011 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
2012 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
2013 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
2014 * stabsread.c: Remove _initialize_stabsread prototype.
2015 * stack.c: Remove _initialize_stack prototype.
2016 * stap-probe.c: Remove _initialize_stap_probe prototype.
2017 * std-regs.c: Remove _initialize_frame_reg prototype.
2018 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
2019 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
2020 * symfile.c: Remove _initialize_symfile prototype.
2021 * symmisc.c: Remove _initialize_symmisc prototype.
2022 * symtab.c: Remove _initialize_symtab prototype.
2023 * target-dcache.c: Remove _initialize_target_dcache prototype.
2024 * target-descriptions.c: Remove _initialize_target_descriptions
2025 prototype.
2026 * thread.c: Remove _initialize_thread prototype.
2027 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
2028 prototype.
2029 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
2030 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
2031 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
2032 prototype.
2033 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
2034 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
2035 * tracefile.c: Remove _initialize_tracefile prototype.
2036 * tracepoint.c: Remove _initialize_tracepoint prototype.
2037 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
2038 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
2039 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
2040 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
2041 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
2042 * tui/tui-win.c: Remove _initialize_tui_win prototype.
2043 * tui/tui.c: Remove _initialize_tui prototype.
2044 * typeprint.c: Remove _initialize_typeprint prototype.
2045 * user-regs.c: Remove _initialize_user_regs prototype.
2046 * utils.c: Remove _initialize_utils prototype.
2047 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
2048 * valarith.c: Remove _initialize_valarith prototype.
2049 * valops.c: Remove _initialize_valops prototype.
2050 * valprint.c: Remove _initialize_valprint prototype.
2051 * value.c: Remove _initialize_values prototype.
2052 * varobj.c: Remove _initialize_varobj prototype.
2053 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
2054 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
2055 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
2056 * windows-nat.c: Remove _initialize_windows_nat,
2057 _initialize_check_for_gdb_ini, and _initialize_loadable
2058 prototypes.
2059 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
2060 * xcoffread.c: Remove _initialize_xcoffread prototype.
2061 * xml-support.c: Remove _initialize_xml_support prototype.
2062 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
2063 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
2064 prototype.
2065 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
2066 prototype.
2067 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2068
2069 2017-09-08 Keith Seitz <keiths@redhat.com>
2070
2071 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
2072 field.
2073
2074 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
2075
2076 * f-valprint.c (f_val_print): Remove check for one byte
2077 sized integers. Remove printing of character type.
2078
2079 2017-09-08 Frank Penczek <frank.penczek@intel.com>
2080 Christoph Weinmann <christoph.t.weinmann@intel.com>
2081 Bernhard Heckel <bernhard.heckel@intel.com>
2082
2083 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
2084 to maintain proper indentation when printing pointers/refs.
2085
2086 2017-09-07 Joel Brobecker <brobecker@adacore.com>
2087
2088 GDB 8.0.1 released.
2089
2090 2017-09-07 Joel Brobecker <brobecker@adacore.com>
2091
2092 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2093
2094 2017-09-05 Tom Tromey <tom@tromey.com>
2095
2096 * parse.c (funcall_chain): Now a std::vector.
2097 (start_arglist, end_arglist): Simplify.
2098 (free_funcalls): Remove.
2099 (parse_exp_in_context_1): Remove cleanup.
2100
2101 2017-09-05 Tom Tromey <tom@tromey.com>
2102
2103 * go-exp.y (go_parse): Don't create a cleanup.
2104
2105 2017-09-05 Tom Tromey <tom@tromey.com>
2106
2107 * d-exp.y (PrimaryExpression): Use std::string.
2108 (d_parse): Don't create a cleanup.
2109
2110 2017-09-05 Tom Tromey <tom@tromey.com>
2111
2112 * utils.c (do_clear_parser_state): Remove.
2113 (make_cleanup_clear_parser_state): Remove.
2114 * p-exp.y (pascal_parse): Use scoped_restore.
2115 * m2-exp.y (m2_parse): Use scoped_restore.
2116 * f-exp.y (f_parse): Use scoped_restore.
2117 * d-exp.y (d_parse): Use scoped_restore.
2118 * c-exp.y (c_parse): Use scoped_restore.
2119 * ada-exp.y (ada_parse): Use scoped_restore.
2120 * utils.h (make_cleanup_clear_parser_state): Remove.
2121
2122 2017-09-06 Keith Seitz <keiths@redhat.com>
2123
2124 * dwarf2read.c (dw2_linkage_name_attr): New function.
2125 (dw2_linkage_name): New function.
2126 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2127 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2128 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2129
2130 2017-09-06 Kamil Rytarowski <n54@gmx.com>
2131
2132 * config/djgpp/djconfig.sh: Correct shell portability issue.
2133
2134 2017-09-06 Kamil Rytarowski <n54@gmx.com>
2135
2136 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2137
2138 2017-09-06 John Baldwin <jhb@FreeBSD.org>
2139
2140 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2141 * NEWS: Mention new FreeBSD/mips native configuration.
2142 * configure.host: Add aarch64*-*-freebsd*.
2143 * configure.nat: Likewise.
2144 * aarch64-fbsd-nat.c: New file.
2145
2146 2017-09-06 John Baldwin <jhb@FreeBSD.org>
2147
2148 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2149 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2150 * NEWS: Mention new FreeBSD/aarch64 target.
2151 * configure.tgt: Add aarch64*-*-freebsd*.
2152 * aarch64-fbsd-tdep.c: New file.
2153 * aarch64-fbsd-tdep.h: New file.
2154
2155 2017-09-06 Kamil Rytarowski <n54@gmx.com>
2156
2157 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2158
2159 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2160
2161 * parse.c (find_minsym_type_and_address): Don't relocate addresses
2162 of TLS symbols.
2163
2164 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2165
2166 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2167 call.
2168
2169 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2170
2171 * infrun.c (follow_exec): Call add_thread after
2172 target_find_description.
2173
2174 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2175
2176 * infrun.c (handle_inferior_event_1): When exec'ing, read
2177 stop_pc after follow_exec.
2178
2179 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2180
2181 * remote.c (process_g_packet): Update error message.
2182
2183 2017-09-05 Yao Qi <yao.qi@linaro.org>
2184
2185 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
2186 targets.
2187
2188 2017-09-05 Pedro Alves <palves@redhat.com>
2189
2190 * eval.c (eval_call, evaluate_funcall): New functions, factored
2191 out from ...
2192 (evaluate_subexp_standard): ... this.
2193
2194 2017-09-05 Yao Qi <yao.qi@linaro.org>
2195
2196 * amd64-tdep.c (amd64_target_description): Create target
2197 descriptions.
2198 (_initialize_amd64_tdep): Don't call functions
2199 initialize_tdesc_amd64_*. Add self tests.
2200 * arch/amd64.c (amd64_create_target_description): Add parameter
2201 is_linux. Call set_tdesc_osabi if is_linux is true.
2202 * arch/amd64.h (amd64_create_target_description): Update the
2203 declaration.
2204 * arch/i386.c (i386_create_target_description): Add parameter
2205 is_linux. Call set_tdesc_osabi if is_linux is true.
2206 * arch/i386.h (i386_create_target_description): Update
2207 declaration.
2208 * configure.tgt: Add i386.o to gdb_target_obs.
2209 * features/Makefile (XMLTOC): Remove i386/*.xml.
2210 * features/i386/amd64-avx-avx512.c: Remove.
2211 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
2212 * features/i386/amd64-avx-mpx.c: Remove.
2213 * features/i386/amd64-avx.c: Remove.
2214 * features/i386/amd64-mpx.c: Remove.
2215 * features/i386/amd64.c: Remove.
2216 * features/i386/i386-avx-avx512.c: Remove.
2217 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2218 * features/i386/i386-avx-mpx.c: Remove.
2219 * features/i386/i386-avx.c: Remove.
2220 * features/i386/i386-mmx.c: Remove.
2221 * features/i386/i386-mpx.c: Remove.
2222 * features/i386/i386.c: Remove.
2223 * i386-tdep.c: Don't include features/i386/i386*.c., include
2224 target-descriptions.h and arch/i386.h.
2225 (i386_target_description): Create target descriptions.
2226 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2227 functions. Do self tests.
2228
2229 2017-09-05 Yao Qi <yao.qi@linaro.org>
2230
2231 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2232 * features/i386/amd64-avx-avx512-linux.c: Removed.
2233 * features/i386/amd64-avx-linux.c: Removed.
2234 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2235 * features/i386/amd64-avx-mpx-linux.c: Removed.
2236 * features/i386/amd64-linux.c: Removed.
2237 * features/i386/amd64-mpx-linux.c: Removed.
2238 * features/i386/x32-avx-avx512-linux.c: Removed.
2239 * features/i386/x32-avx-linux.c: Removed.
2240 * features/i386/x32-linux.c: Removed.
2241
2242 2017-09-05 Yao Qi <yao.qi@linaro.org>
2243
2244 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
2245 features/i386/*.c.
2246 (amd64_linux_read_description): Call
2247 amd64_create_target_description.
2248 * arch/amd64.c: New file.
2249 * arch/amd64.h: New file.
2250 * configure.tgt (x86_64-*-linux*): Append amd64.o.
2251 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2252
2253 2017-09-05 Yao Qi <yao.qi@linaro.org>
2254
2255 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2256 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
2257 (amd64_linux_read_description): Create target descriptions.
2258 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2259 functions. Add unit tests.
2260 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2261 x32-core.xml.
2262 * features/i386/64bit-avx.c: Generated.
2263 * features/i386/64bit-avx512.c: Generated.
2264 * features/i386/64bit-core.c: Generated.
2265 * features/i386/64bit-linux.c: Generated.
2266 * features/i386/64bit-mpx.c: Generated.
2267 * features/i386/64bit-pkeys.c: Generated.
2268 * features/i386/64bit-segments.c: Generated.
2269 * features/i386/64bit-sse.c: Generated.
2270 * features/i386/x32-core.c: Generated.
2271 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2272 c files for amd64-linux and x32-linux.
2273
2274 2017-09-05 Yao Qi <yao.qi@linaro.org>
2275
2276 * amd64-linux-tdep.c (amd64_linux_read_description): New
2277 function.
2278 (amd64_linux_core_read_description): Call
2279 amd64_linux_read_description.
2280 (amd64_linux_init_abi): Likewise.
2281 (amd64_x32_linux_init_abi): Likewise.
2282 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
2283 * x86-linux-nat.c (x86_linux_read_description): Call
2284 amd64_linux_read_description.
2285
2286 2017-09-05 Yao Qi <yao.qi@linaro.org>
2287
2288 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
2289 comments.
2290
2291 2017-09-05 Yao Qi <yao.qi@linaro.org>
2292
2293 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
2294 * features/i386/i386-avx-avx512-linux.c: Remove.
2295 * features/i386/i386-avx-linux.c: Remove.
2296 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
2297 * features/i386/i386-avx-mpx-linux.c: Remove.
2298 * features/i386/i386-linux.c: Remove.
2299 * features/i386/i386-mmx-linux.c: Remove.
2300 * features/i386/i386-mpx-linux.c: Remove.
2301
2302 2017-09-05 Yao Qi <yao.qi@linaro.org>
2303
2304 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
2305 (SFILES): Add arch/i386.c.
2306 (HFILES_NO_SRCDIR): Add arch/i386.h.
2307 * arch/i386.c: New file.
2308 * arch/i386.h: New file.
2309 * arch/tdesc.h (allocate_target_description): Declare.
2310 (set_tdesc_architecture): Declare.
2311 (set_tdesc_osabi): Declare.
2312 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
2313 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
2314 include arch/i386.h.
2315 (i386_linux_read_description): Remove code and call
2316 i386_create_target_description.
2317 (set_tdesc_architecture): New function.
2318 (set_tdesc_osabi): New function.
2319 * target-descriptions.h (allocate_target_description): Remove.
2320
2321 2017-09-05 Yao Qi <yao.qi@linaro.org>
2322
2323 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
2324 * target-descriptions.c (tdesc_create_feature): Likewise, and
2325 adjust code.
2326 * features/i386/32bit-avx.c: Re-generated.
2327 * features/i386/32bit-avx512.c: Re-generated.
2328 * features/i386/32bit-core.c: Re-generated.
2329 * features/i386/32bit-linux.c: Re-generated.
2330 * features/i386/32bit-mpx.c: Re-generated.
2331 * features/i386/32bit-pkeys.c: Re-generated.
2332 * features/i386/32bit-sse.c: Re-generated.
2333
2334 2017-09-05 Yao Qi <yao.qi@linaro.org>
2335
2336 * regformats/regdef.h (struct reg): Override operator == and !=.
2337
2338 2017-09-05 Yao Qi <yao.qi@linaro.org>
2339
2340 * arch/tdesc.h: New file.
2341 * regformats/regdat.sh: Generate code using tdesc_create_reg.
2342 * target-descriptions.c: Update comments.
2343 * target-descriptions.h: Include "arch/tdesc.h". Remove the
2344 declarations.
2345 * features/i386/32bit-avx.c: Re-generated.
2346 * features/i386/32bit-avx512.c: Re-generated.
2347 * features/i386/32bit-core.c: Re-generated.
2348 * features/i386/32bit-linux.c: Re-generated.
2349 * features/i386/32bit-mpx.c: Re-generated.
2350 * features/i386/32bit-pkeys.c: Re-generated.
2351 * features/i386/32bit-sse.c: Re-generated.
2352
2353 2017-09-05 Yao Qi <yao.qi@linaro.org>
2354
2355 * regformats/regdat.sh: Update generated code.
2356
2357 2017-09-05 Yao Qi <yao.qi@linaro.org>
2358
2359 * regformats/regdat.sh: Adjust code order.
2360
2361 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2362
2363 * expprint.c (dump_subexp_body_standard): Use constant format
2364 string in fprintf_filtered call.
2365
2366 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2367
2368 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
2369 NetBSD/i386.
2370 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
2371
2372 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2373
2374 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
2375
2376 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2377
2378 * bsd-kvm.o: Define _KMEMUSER.
2379 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
2380 * configure: Regenerate.
2381
2382 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2383
2384 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
2385 * i386-fbsd-nat.c: Likewise.
2386
2387 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2388
2389 * unittests/array-view-selftests.c: Add include of <array>.
2390
2391 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2392
2393 * spu-tdep.c (flush_ea_cache): Add missing argument to
2394 call_function_by_hand.
2395
2396 2017-09-04 Pedro Alves <palves@redhat.com>
2397
2398 * NEWS (Safer support for debugging with no debug info): New.
2399
2400 2017-09-04 Pedro Alves <palves@redhat.com>
2401
2402 * c-exp.y (function_method, function_method_void): Add current
2403 instance flags to TYPE_INSTANCE.
2404 * dwarf2read.c (check_modifier): New.
2405 (compute_delayed_physnames): Assert that only C++ adds delayed
2406 physnames. Mark fn_fields as const/volatile depending on
2407 physname.
2408 * eval.c (make_params): New type_instance_flags parameter. Use
2409 it as the new type's instance flags.
2410 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
2411 flags element and pass it to make_params.
2412 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
2413 instance flags element.
2414 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
2415 * gdbtypes.h: Include "enum-flags.h".
2416 (type_instance_flags): New enum-flags type.
2417 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
2418 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
2419 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
2420 (follow_type_instance_flags): New function.
2421 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
2422 * parser-defs.h (follow_type_instance_flags): Declare.
2423 * valops.c (value_struct_elt_for_reference): const/volatile must
2424 match too.
2425
2426 2017-09-04 Pedro Alves <palves@redhat.com>
2427
2428 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
2429 function/method scopes; lookup the nested name as a function local
2430 static variable.
2431
2432 2017-09-04 Pedro Alves <palves@redhat.com>
2433
2434 (%type <voidval>): Add function_method.
2435 * c-exp.y (exp): New production for calls with no arguments.
2436 (function_method, function_method_void_or_typelist): New
2437 productions.
2438 (exp): New production for "method()::static_var".
2439 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
2440 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2441 Handle OP_FUNC_STATIC_VAR.
2442 * parse.c (operator_length_standard):
2443 Handle OP_FUNC_STATIC_VAR.
2444
2445 2017-09-04 Pedro Alves <palves@redhat.com>
2446
2447 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
2448 handling.
2449 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2450 Ditto.
2451 * parse.c (operator_length_standard, operator_check_standard):
2452 Ditto.
2453 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
2454
2455 2017-09-04 Pedro Alves <palves@redhat.com>
2456
2457 * ax-gdb.c: Include "typeprint.h".
2458 (gen_expr_for_cast): New function.
2459 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
2460 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
2461 type is unknown.
2462 * dwarf2read.c (new_symbol_full): Fallback to int instead of
2463 nodebug_data_symbol.
2464 * eval.c: Include "typeprint.h".
2465 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
2466 Error out if symbol has unknown type.
2467 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
2468 evaluate_subexp_for_cast.
2469 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
2470 OP_VAR_MSYM_VALUE.
2471 (evaluate_subexp_for_cast): New function.
2472 * gdbtypes.c (init_nodebug_var_type): New function.
2473 (objfile_type): Use it to initialize types of variables with no
2474 debug info.
2475 * typeprint.c (error_unknown_type): New.
2476 * typeprint.h (error_unknown_type): New declaration.
2477 * compile/compile-c-types.c (convert_type_basic): Handle
2478 TYPE_CODE_ERROR; warn and fallback to int for variables with
2479 unknown type.
2480
2481 2017-09-04 Pedro Alves <palves@redhat.com>
2482
2483 * eval.c (evaluate_var_value): New function, factored out from ...
2484 (evaluate_subexp_standard): ... here.
2485
2486 2017-09-04 Pedro Alves <palves@redhat.com>
2487
2488 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
2489 Remove useless assignments to 'op'.
2490
2491 2017-09-04 Pedro Alves <palves@redhat.com>
2492
2493 * eval.c (eval_skip_value): New function.
2494 (evaluate_subexp_standard): Use it.
2495
2496 2017-09-04 Pedro Alves <palves@redhat.com>
2497
2498 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
2499 function name from symbol/minsym and pass it to
2500 error_call_unknown_return_type.
2501
2502 2017-09-04 Pedro Alves <palves@redhat.com>
2503
2504 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
2505 * ax-gdb.c (gen_msym_var_ref): New function.
2506 (gen_expr): Handle OP_VAR_MSYM_VALUE.
2507 * eval.c (evaluate_var_msym_value): New function.
2508 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
2509 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
2510 to call_function_by_hand.
2511 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2512 Handle OP_VAR_MSYM_VALUE.
2513 (union exp_element) <msymbol>: New field.
2514 * minsyms.h (struct type): Forward declare.
2515 (find_minsym_type_and_address): Declare.
2516 * parse.c (write_exp_elt_msym): New function.
2517 (write_exp_msymbol): Delete, refactored as ...
2518 (find_minsym_type_and_address): ... this new function.
2519 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
2520 (operator_length_standard, operator_check_standard): Handle
2521 OP_VAR_MSYM_VALUE.
2522 * std-operator.def (OP_VAR_MSYM_VALUE): New.
2523
2524 2017-09-04 Pedro Alves <palves@redhat.com>
2525
2526 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
2527 TYPE_GNU_IFUNC specially here. Throw error if return type is
2528 unknown.
2529 * ada-typeprint.c (print_func_type): Handle functions with unknown
2530 return type.
2531 * c-typeprint.c (c_type_print_base): Handle functions and methods
2532 with unknown return type.
2533 * compile/compile-c-symbols.c (convert_symbol_bmsym)
2534 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
2535 * compile/compile-c-types.c: Include "objfiles.h".
2536 (convert_func): For functions with unknown return type, warn and
2537 default to int.
2538 * compile/compile-object-run.c (compile_object_run): Adjust call
2539 to call_function_by_hand_dummy.
2540 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
2541 call_function_by_hand.
2542 * eval.c (evaluate_subexp_standard): Adjust calls to
2543 call_function_by_hand. Handle functions and methods with unknown
2544 return type. Pass expect_type to call_function_by_hand.
2545 * f-typeprint.c (f_type_print_base): Handle functions with unknown
2546 return type.
2547 * gcore.c (call_target_sbrk): Adjust call to
2548 call_function_by_hand.
2549 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
2550 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
2551 an integer address type instead of nodebug.
2552 * guile/scm-value.c (gdbscm_value_call): Adjust call to
2553 call_function_by_hand.
2554 * infcall.c (error_call_unknown_return_type): New function.
2555 (call_function_by_hand): New "default_return_type" parameter.
2556 Pass it down.
2557 (call_function_by_hand_dummy): New "default_return_type"
2558 parameter. Use it instead of defaulting to int. If there's no
2559 default and the return type is unknown, throw an error. If
2560 there's a default return type, and the called function has no
2561 debug info, then assume the function is prototyped.
2562 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
2563 New "default_return_type" parameter.
2564 (error_call_unknown_return_type): New declaration.
2565 * linux-fork.c (call_lseek): Cast return type of lseek.
2566 (inferior_call_waitpid, checkpoint_command): Adjust calls to
2567 call_function_by_hand.
2568 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
2569 calls to call_function_by_hand.
2570 * m2-typeprint.c (m2_procedure): Handle functions with unknown
2571 return type.
2572 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2573 (value_nsstring, print_object_command): Adjust calls to
2574 call_function_by_hand.
2575 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
2576 functions with unknown return type.
2577 (pascal_type_print_func_varspec_suffix): New function.
2578 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
2579 TYPE_CODE_METHOD>: Use it.
2580 * python/py-value.c (valpy_call): Adjust call to
2581 call_function_by_hand.
2582 * rust-lang.c (rust_evaluate_funcall): Adjust call to
2583 call_function_by_hand.
2584 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
2585 call_function_by_hand.
2586 * valops.c (value_allocate_space_in_inferior): Adjust call to
2587 call_function_by_hand.
2588 * typeprint.c (type_print_unknown_return_type): New function.
2589 * typeprint.h (type_print_unknown_return_type): New declaration.
2590
2591 2017-09-04 Pedro Alves <palves@redhat.com>
2592
2593 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
2594 types with more than one parameter as prototyped.
2595
2596 2017-09-04 Pedro Alves <palves@redhat.com>
2597
2598 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
2599 (disassemble_command): Use gdb_disassembly_flags instead of bare
2600 int.
2601 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
2602 (dump_insns, do_mixed_source_and_assembly_deprecated)
2603 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
2604 Use gdb_disassembly_flags instead of bare int.
2605 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
2606 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
2607 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
2608 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
2609 (enum gdb_disassembly_flag): ... values of this new enumeration.
2610 (gdb_disassembly_flags): Define.
2611 (gdb_disassembly)
2612 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
2613 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
2614 gdb_disassembly_flags instead of bare int.
2615 * record-btrace.c (btrace_insn_history)
2616 (record_btrace_insn_history, record_btrace_insn_history_range)
2617 (record_btrace_insn_history_from): Use gdb_disassembly_flags
2618 instead of bare int.
2619 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
2620 Use gdb_disassembly_flags instead of bare int.
2621 * target-debug.h (target_debug_print_gdb_disassembly_flags):
2622 Define.
2623 * target-delegates.c: Regenerate.
2624 * target.c (target_insn_history, target_insn_history_from)
2625 (target_insn_history_range): Use gdb_disassembly_flags instead of
2626 bare int.
2627 * target.h: Include "disasm.h".
2628 (struct target_ops) <to_insn_history, to_insn_history_from,
2629 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
2630 int.
2631 (target_insn_history, target_insn_history_from)
2632 (target_insn_history_range): Use gdb_disassembly_flags instead of
2633 bare int.
2634
2635 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2636
2637 * cli/cli-script.c (build_command_line): For if/while commands,
2638 check whether args is empty.
2639
2640 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2641
2642 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
2643 (enum command_control_type): Likewise.
2644 (struct command_line): Likewise.
2645 (free_command_lines): Likewise.
2646 (struct command_lines_deleter): Likewise.
2647 (command_line_up): Likewise.
2648 (read_command_lines): Likewise.
2649 (read_command_lines_1): Likewise.
2650 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
2651 (enum command_control_type): Likewise.
2652 (struct command_line): Likewise.
2653 (free_command_lines): Likewise.
2654 (struct command_lines_deleter): Likewise.
2655 (command_line_up): Likewise.
2656 (read_command_lines): Likewise.
2657 (read_command_lines_1): Likewise.
2658 * breakpoint.h: Include cli/cli-script.h.
2659 * extension-priv.h: Likewise.
2660 * gdbcmd.h: Likewise.
2661
2662 2017-09-04 Pedro Alves <palves@redhat.com>
2663
2664 * ada-lang.c (is_known_support_routine): Move sal declaration to
2665 where it is initialized.
2666 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
2667 (parse_breakpoint_sals, decode_static_tracepoint_spec)
2668 (clear_command, update_static_tracepoint): Remove init_sal
2669 references. Move declarations closer to initializations.
2670 * cli/cli-cmds.c (list_command): Move sal declarations closer to
2671 initializations.
2672 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
2673 references. Move sal declarations closer to initializations.
2674 * frame.c (find_frame_sal): Return a symtab_and_line via function
2675 return instead of output parameter. Remove init_sal references.
2676 * frame.h (find_frame_sal): Return a symtab_and_line via function
2677 return instead of output parameter.
2678 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
2679 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
2680 instead of memset.
2681 (gdbscm_find_pc_line): Remove init_sal reference.
2682 * infcall.c (call_function_by_hand_dummy): Remove init_sal
2683 references. Move declarations closer to initializations.
2684 * infcmd.c (set_step_frame): Update. Move declarations closer to
2685 initializations.
2686 (finish_backward): Remove init_sal references. Move declarations
2687 closer to initializations.
2688 * infrun.c (process_event_stop_test, handle_step_into_function)
2689 (insert_hp_step_resume_breakpoint_at_frame)
2690 (insert_step_resume_breakpoint_at_caller): Likewise.
2691 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
2692 (symbol_to_sal): Likewise.
2693 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
2694 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
2695 to its initialization.
2696 * reverse.c (save_bookmark_command): Use new/delete. Remove
2697 init_sal references. Move declarations closer to initializations.
2698 * source.c (get_current_source_symtab_and_line): Remove brace
2699 initialization.
2700 (set_current_source_symtab_and_line): Now takes the sal by const
2701 reference. Remove brace initialization.
2702 (line_info): Remove init_sal reference.
2703 * source.h (set_current_source_symtab_and_line): Now takes a
2704 symtab_and_line via const reference.
2705 * stack.c (set_current_sal_from_frame): Adjust.
2706 (print_frame_info): Adjust.
2707 (get_last_displayed_sal): Return the sal via function return
2708 instead of via output parameter. Simplify.
2709 (frame_info): Adjust.
2710 * stack.h (get_last_displayed_sal): Return the sal via function
2711 return instead of via output parameter.
2712 * symtab.c (init_sal): Delete.
2713 (find_pc_sect_line): Remove init_sal references. Move
2714 declarations closer to initializations.
2715 (find_function_start_sal): Remove init_sal references. Move
2716 declarations closer to initializations.
2717 * symtab.h (struct symtab_and_line): In-class initialize all
2718 fields.
2719 * tracepoint.c (set_traceframe_context)
2720 (print_one_static_tracepoint_marker): Remove init_sal references.
2721 Move declarations closer to initializations.
2722 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2723 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
2724 declarations closer to initializations.
2725 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2726 init_sal references. Adjust.
2727
2728 2017-09-04 Pedro Alves <palves@redhat.com>
2729
2730 * ax-gdb.c (agent_command_1): Use range-for.
2731 * break-catch-throw.c (re_set_exception_catchpoint): Update.
2732 * breakpoint.c: Include "common/array-view.h".
2733 (init_breakpoint_sal, create_breakpoint_sal): Change sals
2734 parameter from struct symtabs_and_lines to
2735 array_view<symtab_and_line>. Adjust. Use range-for. Update.
2736 (breakpoint_sals_to_pc): Change sals parameter from struct
2737 symtabs_and_lines to std::vector reference.
2738 (check_fast_tracepoint_sals): Change sals parameter from struct
2739 symtabs_and_lines to std::array_view. Use range-for.
2740 (decode_static_tracepoint_spec): Return a std::vector instead of
2741 symtabs_and_lines. Update.
2742 (create_breakpoint): Update.
2743 (break_range_command, until_break_command, clear_command): Update.
2744 (base_breakpoint_decode_location, bkpt_decode_location)
2745 (bkpt_probe_create_sals_from_location)
2746 (bkpt_probe_decode_location, tracepoint_decode_location)
2747 (tracepoint_probe_decode_location)
2748 (strace_marker_create_sals_from_location): Return a std::vector
2749 instead of symtabs_and_lines.
2750 (strace_marker_create_breakpoints_sal): Update.
2751 (strace_marker_decode_location): Return a std::vector instead of
2752 symtabs_and_lines. Update.
2753 (update_breakpoint_locations): Change struct symtabs_and_lines
2754 parameters to gdb::array_view. Adjust.
2755 (location_to_sals): Return a std::vector instead of
2756 symtabs_and_lines. Update.
2757 (breakpoint_re_set_default): Use std::vector instead of struct
2758 symtabs_and_lines.
2759 (decode_location_default): Return a std::vector instead of
2760 symtabs_and_lines. Update.
2761 * breakpoint.h: Include "common/array-view.h".
2762 (struct breakpoint_ops) <decode_location>: Now returns a
2763 std::vector instead of returning a symtabs_and_lines via output
2764 parameter.
2765 (update_breakpoint_locations): Change sals parameters to use
2766 gdb::array_view.
2767 * cli/cli-cmds.c (edit_command, list_command): Update to use
2768 std::vector and gdb::array_view.
2769 (ambiguous_line_spec): Adjust to use gdb::array_view and
2770 range-for.
2771 (compare_symtabs): Rename to ...
2772 (cmp_symtabs): ... this. Change parameters to symtab_and_line
2773 const reference and adjust.
2774 (filter_sals): Rewrite using std::vector and standard algorithms.
2775 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2776 (jump_command): Update to use std::vector.
2777 * linespec.c (struct linespec_state) <canonical_names>: Update
2778 comment.
2779 (add_sal_to_sals_basic): Delete.
2780 (add_sal_to_sals, filter_results, convert_results_to_lsals)
2781 (decode_line_2, create_sals_line_offset)
2782 (convert_address_location_to_sals, convert_linespec_to_sals)
2783 (convert_explicit_location_to_sals, parse_linespec)
2784 (event_location_to_sals, decode_line_full, decode_line_1)
2785 (decode_line_with_current_source)
2786 (decode_line_with_last_displayed, decode_objc)
2787 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2788 (linespec_result::~linespec_result): Adjust to use std::vector
2789 instead of symtabs_and_lines.
2790 * linespec.h (linespec_sals::sals): Now a std::vector.
2791 (struct linespec_result): Use std::vector, bool, and in-class
2792 initialization.
2793 (decode_line_1, decode_line_with_current_source)
2794 (decode_line_with_last_displayed): Return std::vector.
2795 * macrocmd.c (info_macros_command): Use std::vector.
2796 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2797 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2798 std::vector.
2799 * probe.h (parse_probes): Return a std::vector.
2800 * python/python.c (gdbpy_decode_line): Use std::vector and
2801 gdb::array_view.
2802 * source.c (select_source_symtab, line_info): Use std::vector.
2803 * stack.c (func_command): Use std::vector.
2804 * symtab.h (struct symtabs_and_lines): Delete.
2805 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2806
2807 2017-09-04 Pedro Alves <palves@redhat.com>
2808
2809 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2810 unittests/array-view-selftests.c.
2811 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
2812 * common/array-view.h: New file.
2813 * unittests/array-view-selftests.c: New file.
2814
2815 2017-09-04 Pedro Alves <palves@redhat.com>
2816
2817 * cli/cli-cmds.c (edit_command): Pass message to
2818 ambiguous_line_spec.
2819 (list_command): Pass message to ambiguous_line_spec. Say
2820 "first"/"last" instead of "start" and "end" to be consistent with
2821 the manual.
2822 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
2823 them to print formatted message.
2824
2825 2017-09-04 Pedro Alves <palves@redhat.com>
2826
2827 * btrace.c (ftrace_add_pt): Pass btrace_insn to
2828 ftrace_update_insns by reference instead of pointer.
2829
2830 2017-09-04 Yao Qi <yao.qi@linaro.org>
2831
2832 * i386-go32-tdep.c: Include x86-xstate.h.
2833 (i386_go32_init_abi): Call i386_target_description.
2834 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
2835 if xcr0 is X86_XSTATE_X87_MASK.
2836 * i386-tdep.h (tdesc_i386): Remove the declaration.
2837 (tdesc_i386_mmx): Likewise.
2838
2839 2017-09-04 Yao Qi <yao.qi@linaro.org>
2840
2841 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
2842 X86_XSTATE_SSE_MASK instead of 0.
2843
2844 2017-09-04 Yao Qi <yao.qi@linaro.org>
2845
2846 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
2847 i386_target_description.
2848 * i386-fbsd-nat.c (i386fbsd_read_description): Call
2849 i386_target_description.
2850 * i386-tdep.c (i386_gdbarch_init): Likewise.
2851
2852 2017-09-04 Yao Qi <yao.qi@linaro.org>
2853
2854 * amd64-darwin-tdep.c: Include "x86-xstate.h".
2855 (x86_darwin_init_abi_64): Call amd64_target_description.
2856 * amd64-dicos-tdep.c: Likewise.
2857 * amd64-fbsd-nat.c: Likewise.
2858 * amd64-fbsd-tdep.c: Likewise.
2859 * amd64-nbsd-tdep.c: Likewise.
2860 * amd64-obsd-tdep.c: Likewise.
2861 * amd64-sol2-tdep.c: Likewise.
2862 * amd64-windows-tdep.c: Likewise.
2863 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
2864
2865 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2866
2867 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
2868 (btrace_function) <insn>: Change type to use std::vector.
2869 * btrace.c (ftrace_debug, ftrace_call_num_insn,
2870 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
2871 ftrace_update_insns, ftrace_compute_global_level_offset,
2872 btrace_stitch_bts, btrace_clear, btrace_insn_get,
2873 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
2874 change to std::vector.
2875 (ftrace_update_insns): Adjust to change to std::vector, change
2876 type of INSN parameter.
2877 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
2878 * record-btrace.c (btrace_call_history_insn_range,
2879 btrace_compute_src_line_range,
2880 record_btrace_frame_prev_register): Adjust to change to
2881 std::vector.
2882 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
2883 to change to std::vector.
2884
2885 2017-09-03 Tom Tromey <tom@tromey.com>
2886
2887 * corefile.c (reopen_exec_file): Use std::string.
2888
2889 2017-09-03 Tom Tromey <tom@tromey.com>
2890
2891 * compile/compile.c (compile_register_name_mangled): Return
2892 std::string.
2893 * compile/compile-loc2c.c (pushf_register_address): Update.
2894 (pushf_register): Update.
2895 * compile/compile-c-types.c (convert_array): Update.
2896 * compile/compile-c-symbols.c (generate_vla_size): Update.
2897 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
2898 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
2899 (convert_one_symbol): Update.
2900 (generate_c_for_for_one_variable): Update.
2901 * compile/compile-c-support.c (c_get_range_decl_name): Return a
2902 std::string.
2903 (generate_register_struct): Update.
2904 * compile/compile-internal.h (c_get_range_decl_name): Return a
2905 std::string.
2906 (compile_register_name_mangled): Return std::string.
2907
2908 2017-09-03 Tom Tromey <tom@tromey.com>
2909
2910 * utils.c (perror_string): Return a std::string.
2911 (throw_perror_with_name, perror_warning_with_name): Update.
2912
2913 2017-09-03 Tom Tromey <tom@tromey.com>
2914
2915 * demangle.c (demangle_command): Use std::string,
2916 unique_xmalloc_ptr.
2917
2918 2017-09-03 Tom Tromey <tom@tromey.com>
2919
2920 * cli/cli-setshow.c (do_set_command): Use std::string.
2921
2922 2017-09-03 Tom Tromey <tom@tromey.com>
2923
2924 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
2925
2926 2017-09-03 Tom Tromey <tom@tromey.com>
2927
2928 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
2929
2930 2017-09-03 Tom Tromey <tom@tromey.com>
2931
2932 * mi/mi-cmd-env.c (env_execute_cli_command): Use
2933 gdb::unique_xmalloc_ptr.
2934
2935 2017-09-03 Tom Tromey <tom@tromey.com>
2936
2937 * thread.c (print_thread_info_1): Use string_printf.
2938 (thread_apply_command, thread_apply_all_command): Use
2939 std::string.
2940
2941 2017-09-03 Tom Tromey <tom@tromey.com>
2942
2943 * valprint.c (val_print_string): Update.
2944 * gdbcore.h (memory_error_message): Return std::string.
2945 * corefile.c (memory_error_message): Return std::string.
2946 (memory_error): Update.
2947 * breakpoint.c (insert_bp_location): Update.
2948
2949 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2950
2951 * target/waitstatus.h (target_waitstatus_to_string): Change
2952 return type to std::string.
2953 * target/waitstatus.c (target_waitstatus_to_string): Return
2954 std::string.
2955 * target.h (target_waitstatus_to_string): Remove declaration.
2956 * infrun.c (resume, clear_proceed_status_thread,
2957 print_target_wait_results, do_target_wait, save_waitstatus,
2958 stop_all_threads): Adjust.
2959 * record-btrace.c (record_btrace_wait): Adjust.
2960 * target-debug.h
2961 (target_debug_print_struct_target_waitstatus_p): Adjust.
2962
2963 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2964
2965 PR gdb/22046
2966 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
2967 detection.
2968
2969 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2970
2971 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
2972 for setting/unsetting environment variables on the remote target.
2973 (New remote packets): Add entries for QEnvironmentHexEncoded,
2974 QEnvironmentUnset and QEnvironmentReset.
2975 * common/environ.c (gdb_environ::operator=): Extend method to
2976 handle m_user_set_env_list and m_user_unset_env_list.
2977 (gdb_environ::clear): Likewise.
2978 (match_var_in_string): Change type of first parameter from 'char
2979 *' to 'const char *'.
2980 (gdb_environ::set): Extend method to handle
2981 m_user_set_env_list and m_user_unset_env_list.
2982 (gdb_environ::unset): Likewise.
2983 (gdb_environ::clear_user_set_env): New method.
2984 (gdb_environ::user_set_envp): Likewise.
2985 (gdb_environ::user_unset_envp): Likewise.
2986 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
2987 m_user_unset_env_list on move constructor/assignment.
2988 (unset): Add new default parameter 'update_unset_list = true'.
2989 (clear_user_set_env): New method.
2990 (user_set_envp): Likewise.
2991 (user_unset_envp): Likewise.
2992 (m_user_set_env_list): New std::set.
2993 (m_user_unset_env_list): Likewise.
2994 * common/rsp-low.c (hex2str): New function.
2995 (bin2hex): New overload for bin2hex function.
2996 * common/rsp-low.c (hex2str): New prototype.
2997 (str2hex): New overload prototype.
2998 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
2999 QEnvironmentUnset and QEnvironmentReset.
3000 (remote_protocol_features): Add QEnvironmentHexEncoded,
3001 QEnvironmentUnset and QEnvironmentReset packets.
3002 (send_environment_packet): New function.
3003 (extended_remote_environment_support): Likewise.
3004 (extended_remote_create_inferior): Call
3005 extended_remote_environment_support.
3006 (_initialize_remote): Add QEnvironmentHexEncoded,
3007 QEnvironmentUnset and QEnvironmentReset packet configs.
3008 * unittests/environ-selftests.c (gdb_selftest_env_var):
3009 New variable.
3010 (test_vector_initialization): New function.
3011 (test_init_from_host_environ): Likewise.
3012 (test_reinit_from_host_environ): Likewise.
3013 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
3014 Likewise.
3015 (test_unset_set_empty_vector): Likewise.
3016 (test_vector_clear): Likewise.
3017 (test_std_move): Likewise.
3018 (test_move_constructor):
3019 (test_self_move): Likewise.
3020 (test_set_unset_reset): Likewise.
3021 (run_tests): Rewrite in terms of the functions above.
3022
3023 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
3024
3025 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
3026 (adi_available): Use a temp variable of type CORE_ADDR as argument
3027 3 when calling target_auxv_search.
3028 (adi_normalize_address): Use masks and xor operators to calculate
3029 normalized address.
3030 (adi_read_versions, adi_write_versions, adi_print_versions)
3031 (do_examine, do_assign): Use paddress.
3032
3033 2017-08-29 John Baldwin <jhb@FreeBSD.org>
3034
3035 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
3036 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
3037 out of loop and add supply of FIR.
3038 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
3039 add collect of FIR.
3040
3041 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
3042
3043 PR gdb/21827
3044 * cli/cli-script.c (define_command): Don't convert command name
3045 to lower case.
3046
3047 2017-08-25 Joel Brobecker <brobecker@adacore.com>
3048
3049 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
3050 Update all callers accordingly. Remove all code blocks handling
3051 the case where DISPP is not NULL.
3052
3053 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3054
3055 PR symtab/22003
3056 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
3057 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3058 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
3059
3060 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3061
3062 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
3063 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
3064 (read_comp_units_from_section): New parameter abbrev_section, use
3065 read_and_check_comp_unit_head, allocate signatured_type if needed.
3066 (create_all_comp_units): Update read_comp_units_from_section caller.
3067
3068 2017-08-23 Pedro Alves <palves@redhat.com>
3069
3070 PR remote/21852
3071 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
3072 to null_ptid and switch to thread without reading the registers
3073 after adding the inferior.
3074
3075 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3076
3077 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
3078 compile-gcc.
3079 * compile/compile.c (compile_gcc, show_compile_gcc): New.
3080 (compile_to_object): Implement compile_gcc.
3081 (_initialize_compile): Install "set compile-gcc". Initialize
3082 compile_gcc.
3083
3084 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3085
3086 * compile/compile.c (compile_to_object): Conditionally call
3087 set_verbose. Conditionally call compile or compile_v0.
3088
3089 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
3090
3091 * sparc64-tdep.h: (adi_normalize_address): New export.
3092 * sparc-nat.h: (open_adi_tag_fd): New export.
3093 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3094 * sparc64-linux-tdep.c:
3095 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3096 (sparc64_linux_handle_segmentation_fault): New function.
3097 (sparc64_linux_init_abi): Register
3098 sparc64_linux_handle_segmentation_fault
3099 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3100 (sparc64_addr_bits_remove): New function.
3101 (sparc64_init_abi): Register sparc64_addr_bits_remove.
3102 (MAX_PROC_NAME_SIZE): New macro.
3103 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3104 (sparc64adilist): New variable.
3105 (adi_proc_list): New variable.
3106 (find_adi_info): New function.
3107 (add_adi_info): New function.
3108 (get_adi_info_proc): New function.
3109 (get_adi_info): New function.
3110 (info_adi_command): New function.
3111 (read_maps_entry): New function.
3112 (adi_available): New function.
3113 (adi_normalize_address): New function.
3114 (adi_align_address): New function.
3115 (adi_convert_byte_count): New function.
3116 (adi_tag_fd): New function.
3117 (adi_is_addr_mapped): New function.
3118 (adi_read_versions): New function.
3119 (adi_write_versions): New function.
3120 (adi_print_versions): New function.
3121 (do_examine): New function.
3122 (do_assign): New function.
3123 (adi_examine_command): New function.
3124 (adi_assign_command): New function.
3125 (_initialize_sparc64_adi_tdep): New function.
3126
3127 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
3128
3129 * breakpoint.c (breakpoints_info): Rename to ...
3130 (info_breakpoints_command): ... this.
3131 (watchpoints_info): Rename to ...
3132 (info_watchpoints_command): ... this.
3133 (tracepoints_info): Rename to ...
3134 (info_tracepoints_command): ... this.
3135 (_initialize_breakpoint): Adjust.
3136 * dcache.c (dcache_info): Rename to ...
3137 (info_display_command): ... this.
3138 (_initialize_dcache): Adjust.
3139 * frame.h (args_info): Rename to ...
3140 (info_args_command): ... this.
3141 (locals_info): Rename to ...
3142 (info_locals_command): ... this.
3143 * infcmd.c (nofp_registers_info): Rename to ...
3144 (info_registers_command): ... this.
3145 (float_info): Rename to ...
3146 (info_float_command): ... this.
3147 (program_info): Rename to ...
3148 (info_program_command): ... this.
3149 (all_registers_info): Rename to ...
3150 (info_all_registers_command): ... this.
3151 (vector_info): Rename to ...
3152 (info_vector_command): ... this.
3153 (float_info): Rename to ...
3154 (info_float_command): ... this.
3155 (_initialize_infcmd): Adjust.
3156 * inferior.h (term_info): Rename to ...
3157 (info_terminal_command): ... this.
3158 * inflow.c (term_info): Rename to ...
3159 (info_terminal_command): ... this.
3160 (_initialize_inflow): Adjust.
3161 * infrun.c (signals_info): Rename to ...
3162 (info_signals_command): ... this.
3163 (_initialize_infrun): Adjust.
3164 * objc-lang.c (classes_info): Rename to ...
3165 (info_classes_command): ... this.
3166 (selectors_info): Rename to ...
3167 (info_selectors_command): ... this.
3168 (_initialize_objc_language): Adjust.
3169 * printcmd.c (sym_info): Rename to ...
3170 (info_symbol_command): ... this.
3171 (address_info): Rename to ...
3172 (info_address_command): ... this.
3173 (display_info): Rename to ...
3174 (info_display_command): ... this.
3175 (_initialize_printcmd): Adjust.
3176 * reverse.c (bookmarks_info): Rename to ...
3177 (info_breakpoints_command): ... this.
3178 (_initialize_reverse): Adjust.
3179 * ser-go32.c (dos_info): Rename to ...
3180 (info_serial_command): ... this.
3181 (_initialize_ser_dos): Adjust.
3182 * skip.c (skip_info): Rename to ...
3183 (info_skip_command): ... this.
3184 (_initialize_step_skip): Adjust.
3185 * source.c (line_info): Rename to ...
3186 (info_line_command): ... this.
3187 (source_info): Rename to ...
3188 (info_source_command)
3189 * stack.c (frame_info): Rename to ...
3190 (info_frame_command): ... this.
3191 (locals_info): Rename to ...
3192 (info_locals_command): ... this.
3193 (args_info): Rename to ...
3194 (info_args_command): ... this.
3195 (_initialize_stack): Adjust.
3196 * symtab.c (sources_info): Rename to ...
3197 (info_sources_command): ... this.
3198 (variables_info): Rename to ...
3199 (info_variables_command): ... this.
3200 (functions_info): Rename to ...
3201 (info_functions_command): ... this.
3202 (types_info): Rename to ...
3203 (info_types_command): ... this.
3204 (_initialize_symtab): Adjust.
3205 * target.c (target_info): Rename to ...
3206 (info_target_command): ... this.
3207 (initialize_targets): Adjust.
3208 * tracepoint.c (tvariables_info): Rename to ...
3209 (info_tvariables_command): ... this.
3210 (scope_info): Rename to ...
3211 (info_scope_command): ... this.
3212 (trace_dump_actions): Adjust.
3213 (_initialize_tracepoint): Adjust.
3214
3215 2017-08-22 Tom Tromey <tom@tromey.com>
3216
3217 * breakpoint.h (install_breakpoint): Update.
3218 * breakpoint.c (add_solib_catchpoint): Update.
3219 (install_breakpoint): Change argument to a std::unique_ptr.
3220 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3221 (create_breakpoint_sal, create_breakpoint): Update.
3222 (watch_command_1, catch_exec_command_1)
3223 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3224 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3225 Return the breakpoint.
3226 (set_raw_breakpoint_without_location, set_raw_breakpoint)
3227 (new_single_step_breakpoint): Update.
3228 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3229 std::unique_ptr.
3230 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3231 std::unique_ptr.
3232 * break-catch-sig.c (create_signal_catchpoint): Use
3233 std::unique_ptr.
3234 * ada-lang.c (create_ada_exception_catchpoint): Use
3235 std::unique_ptr.
3236
3237 2017-08-22 Tom Tromey <tom@tromey.com>
3238
3239 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3240
3241 2017-08-22 Tom Tromey <tom@tromey.com>
3242
3243 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3244 (lookup_partial_symbol): Update.
3245
3246 2017-08-22 Tom Tromey <tom@tromey.com>
3247
3248 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3249 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3250 (find_and_open_source, symtab_to_fullname): Update.
3251 * psymtab.c (psymtab_to_fullname): Update.
3252
3253 2017-08-22 Tom Tromey <tom@tromey.com>
3254
3255 * exec.c (exec_file_attach): Update.
3256 * linux-thread-db.c (try_thread_db_load): Update.
3257 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3258 * utils.c (gdb_realpath): Change return type.
3259 (gdb_realpath_keepfile): Update.
3260 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3261 (_initialize_utils): Register the new self test.
3262 * source.c (openp): Update.
3263 (find_and_open_source): Update.
3264 * nto-tdep.c (nto_find_and_open_solib): Update.
3265 * main.c (set_gdb_data_directory): Update.
3266 (captured_main_1): Update.
3267 * dwarf2read.c (dwarf2_get_dwz_file): Update
3268 (dw2_map_symbol_filenames): Update.
3269 * auto-load.c (auto_load_safe_path_vec_update): Update.
3270 (filename_is_in_auto_load_safe_path_vec): Change type of
3271 "filename_realp".
3272 (auto_load_objfile_script): Update.
3273 (file_is_auto_load_safe): Update. Use std::string.
3274 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3275
3276 2017-08-22 Tom Tromey <tom@tromey.com>
3277
3278 * utils.c (gdb_realpath_keepfile): Return a
3279 gdb::unique_xmalloc_ptr.
3280 * exec.c (exec_file_attach): Update.
3281 * utils.h (gdb_realpath_keepfile): Return a
3282 gdb::unique_xmalloc_ptr.
3283
3284 2017-08-22 Tom Tromey <tom@tromey.com>
3285
3286 * compile/compile.c (compile_file_command): Use
3287 gdb::unique_xmalloc_ptr, std::string.
3288 * utils.c (gdb_abspath): Change return type.
3289 * source.c (openp): Update.
3290 * objfiles.c (allocate_objfile): Update.
3291 * main.c (set_gdb_data_directory): Update.
3292 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
3293
3294 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
3295
3296 * cli-cmds.c (list_commands): List actual code around more than
3297 one location.
3298
3299 2017-08-21 John Baldwin <jhb@FreeBSD.org>
3300
3301 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
3302
3303 2017-08-21 Pedro Alves <palves@redhat.com>
3304
3305 PR gdb/19487
3306 * c-exp.y (variable production): Handle function aliases.
3307 * minsyms.c (msymbol_is_text): New function.
3308 * minsyms.h (msymbol_is_text): Declare.
3309 * symtab.c (find_function_alias_target): New function.
3310 * symtab.h (find_function_alias_target): Declare.
3311
3312 2017-08-21 Pedro Alves <palves@redhat.com>
3313
3314 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
3315 typedefs.
3316 * typeprint.c (whatis_exp): If handling "whatis", and expression
3317 is OP_TYPE, strip one typedef level. Otherwise don't strip
3318 typedefs here.
3319 * valops.c (value_cast): Save "to" type before resolving
3320 stubs/typedefs. Use that type as resulting value's type.
3321
3322 2017-08-18 Tom Tromey <tom@tromey.com>
3323 Pedro Alves <palves@redhat.com>
3324
3325 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
3326 * sol-thread.c (sol_thread_resume, sol_thread_wait)
3327 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
3328 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
3329 * proc-service.c (ps_xfer_memory): Use scoped_restore.
3330 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
3331 (linux_get_siginfo_data): Add "thread" argument. Use
3332 scoped_restore.
3333 * linux-nat.c (linux_child_follow_fork)
3334 (check_stopped_by_watchpoint): Use scoped_restore.
3335 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
3336 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
3337 (restore_inferior_ptid, save_inferior_ptid): Remove.
3338 * btrace.c (btrace_fetch): Use scoped_restore.
3339 * bsd-uthread.c (bsd_uthread_fetch_registers)
3340 (bsd_uthread_store_registers): Use scoped_restore.
3341 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
3342 scoped_restore.
3343 * aix-thread.c (aix_thread_resume, aix_thread_wait)
3344 (aix_thread_xfer_partial): Use scoped_restore.
3345 * inferior.h (save_inferior_ptid): Remove.
3346
3347 2017-08-18 Yao Qi <yao.qi@linaro.org>
3348
3349 PR tdep/21818
3350 * arm-tdep.c (gdb_print_insn_arm): Mark
3351 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
3352
3353 2017-08-18 Yao Qi <yao.qi@linaro.org>
3354
3355 * NEWS: Mention GDBserver's new option "--selftest".
3356 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
3357 * selftest.c: Move it to common/selftest.c.
3358 * selftest.h: Move it to common/selftest.h.
3359 * selftest-arch.c (reset): New function.
3360 (tests_with_arch): Call reset.
3361
3362 2017-08-18 Yao Qi <yao.qi@linaro.org>
3363
3364 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
3365 instead of exception_fprintf and printf_filtered.
3366
3367 2017-08-18 Yao Qi <yao.qi@linaro.org>
3368
3369 * selftest.c (register_self_test): Rename it to
3370 selftests::register_test.
3371 (run_self_tests): selftest::run_tests.
3372 * selftest.h: Update declarations.
3373 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
3374 selftests::register_test_foreach_arch.
3375 * selftest-arch.h: Update declaration.
3376 * aarch64-tdep.c: Update.
3377 * arm-tdep.c: Likewise.
3378 * disasm-selftests.c: Likewise.
3379 * dwarf2loc.c: Likewise.
3380 * dwarf2-frame.c: Likewise.
3381 * findvar.c: Likewise.
3382 * gdbarch-selftests.c: Likewise.
3383 * maint.c (maintenance_selftest): Likewise.
3384 * regcache.c: Likewise.
3385 * rust-exp.y: Likewise.
3386 * selftest-arch.c: Likewise.
3387 * unittests/environ-selftests.c: Likewise.
3388 * unittests/function-view-selftests.c: Likewise.
3389 * unittests/offset-type-selftests.c: Likewise.
3390 * unittests/optional-selftests.c: Likewise.
3391 * unittests/scoped_restore-selftests.c: Likewise.
3392 * utils-selftests.c: Likewise.
3393
3394 2017-08-17 Pedro Alves <palves@redhat.com>
3395
3396 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
3397 local.
3398
3399 2017-08-17 Pedro Alves <palves@redhat.com>
3400
3401 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
3402 field.
3403 (reset_die_in_process): Delete, replaced by ...
3404 (process_die_scope): ... this new class. Make it responsible for
3405 freeing cu->line_header too.
3406 (process_die): Use process_die_scope.
3407 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
3408 cu->line_header_die_owner. Don't release the line header if it's
3409 owned by the CU.
3410 (setup_type_unit_groups): Make the CU/DIE own the line header.
3411 Don't release the line header here.
3412
3413 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
3414
3415 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
3416
3417 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
3418
3419 * NEWS: Mention new shortcuts for nexti and stepi in TUI
3420 Single-Key mode
3421
3422 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
3423
3424 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
3425 mode command list.
3426
3427 2017-08-15 Stafford Horne <shorne@gmail.com>
3428
3429 * MAINTAINERS (Write After Approval): Add Stafford Horne.
3430
3431 2017-08-15 Stafford Horne <shorne@gmail.com>
3432
3433 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
3434
3435 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
3436
3437 PR gdb/21954
3438 * infcmd.c (unset_environment_command): Use the 'clear' method on
3439 the environment instead of resetting it.
3440
3441 2017-08-15 John Baldwin <jhb@FreeBSD.org>
3442
3443 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
3444 platforms.
3445
3446 2017-08-14 Tom Tromey <tom@tromey.com>
3447
3448 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
3449 (print_binary_chars): Likewise.
3450 (BITS_IN_BYTES): Remove.
3451
3452 2017-08-14 Tom Tromey <tom@tromey.com>
3453
3454 PR gdb/21675
3455 * valprint.c (LOW_ZERO): Change value to 034.
3456 (print_octal_chars): Add static_asserts for octal constants.
3457 * printcmd.c (print_scalar_formatted): Add 'd' case.
3458
3459 2017-08-11 Tom Tromey <tom@tromey.com>
3460
3461 * symfile.c (add_symbol_file_command): Use std::vector.
3462
3463 2017-08-14 Tom Tromey <tom@tromey.com>
3464
3465 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
3466 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3467 std::move.
3468 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
3469
3470 2017-08-11 Pedro Alves <palves@redhat.com>
3471
3472 * infrun.c (process_event_stop_test): Adjust
3473 function_name_is_marked_for_skip call.
3474 * skip.c: Include <list>.
3475 (skiplist_entry): Make it a class with private fields, and
3476 getters/setters.
3477 (skiplist_entry_chain): Delete.
3478 (skiplist_entries): New.
3479 (skiplist_entry_count): Delete.
3480 (highest_skiplist_entry_num): New.
3481 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
3482 (add_skiplist_entry): Delete.
3483 (skiplist_entry::skiplist_entry): New.
3484 (skiplist_entry::add_entry): New.
3485 (skip_file_command, skip_function): Adjust.
3486 (compile_skip_regexp): Delete.
3487 (skip_command): Don't compile regexp here. Adjust to use
3488 skiplist_entry::add_entry.
3489 (skip_info): Adjust to use range-for and getters.
3490 (skip_enable_command, skip_disable_command): Adjust to use
3491 range-for and setters.
3492 (skip_delete_command): Adjust to use std::list.
3493 (add_skiplist_entry): Delete.
3494 (skip_file_p): Delete, refactored as ...
3495 (skiplist_entry::do_skip_file_p): ... this new method.
3496 (skip_gfile_p): Delete, refactored as ...
3497 (skiplist_entry::do_gskip_file_p): ... this new method.
3498 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
3499 (skiplist_entry::skip_function_p): ... this new method.
3500 (function_name_is_marked_for_skip): Now returns bool, and takes
3501 the function sal by const reference. Adjust to use range-for and
3502 skiplist_entry methods.
3503 (_initialize_step_skip): Remove references to
3504 skiplist_entry_chain, skiplist_entry_count.
3505 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
3506 takes the function sal by const reference.
3507
3508 2017-08-11 Yao Qi <yao.qi@linaro.org>
3509
3510 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
3511 (dwarf2_frame_cache): Remove reset_cache_cleanup.
3512 (dwarf2_frame_cache):
3513 * frame-unwind.c (frame_unwind_try_unwinder): Catch
3514 RETURN_MASK_ALL and set *this_case to NULL.
3515 * frame-unwind.h: Update comments.
3516
3517 2017-08-11 Yao Qi <yao.qi@linaro.org>
3518
3519 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
3520 (dwarf2_frame_state_copy_regs): Remove.
3521 (dwarf2_frame_state_free_regs): Remove.
3522 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
3523 (dwarf2_restore_rule): Call method .alloc_regs instead of
3524 dwarf2_frame_state_alloc_regs.
3525 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
3526 constructor. Call std::move.
3527 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
3528 (dwarf2_frame_cache): Likewise.
3529
3530 [GDB_SELF_TEST]: Include selftest.h and
3531 selftest-arch.h.
3532 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
3533 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
3534 execute_cfa_program_test.
3535
3536 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
3537 copy ctor, assignment operator, move assignment.
3538 <alloc_regs>: New method.
3539 <swap>: New method.
3540 (struct dwarf2_frame_state): Delete dtor.
3541 (dwarf2_frame_state_alloc_regs): Remove declaration.
3542 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
3543 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
3544
3545 2017-08-11 Yao Qi <yao.qi@linaro.org>
3546
3547 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
3548 (dwarf2_frame_state::dwarf2_frame_state): New.
3549 (dwarf2_frame_state::~dwarf2_frame_state): New.
3550 (dwarf2_fetch_cfa_info): Update.
3551 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
3552 rather than a pointer. Update code.
3553 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
3554 dtor.
3555 <data_align, code_align, retaddr_column>: Change them to const.
3556 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
3557 to bool.
3558
3559 2017-08-11 Yao Qi <yao.qi@linaro.org>
3560
3561 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
3562 <loc.exp>: New field.
3563 * dwarf2-frame.c (execute_cfa_program): Update.
3564 (dwarf2_frame_prev_register): Update.
3565
3566 2017-08-10 Pedro Alves <palves@redhat.com>
3567
3568 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
3569
3570 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3571
3572 * fbsd-nat.c (struct fbsd_fork_info): Remove.
3573 (fbsd_pending_children): Use std::list.
3574 (fbsd_remember_child): Likewise.
3575 (fbsd_is_child_pending): Likewise.
3576 (fbsd_pending_vfork_done): Use std::forward_list.
3577 (fbsd_add_vfork_done): Likewise.
3578 (fbsd_is_vfork_done_pending): Likewise.
3579 (fbsd_next_vfork_done): Likewise.
3580
3581 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3582
3583 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
3584 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
3585 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
3586 for `mapfilename'.
3587 (fbsd_xfer_partial): Use gdb::byte_vector.
3588 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
3589
3590 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3591
3592 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
3593 "filestuff.h".
3594 (fbsd_find_memory_regions): Fix `mapfile' initialization.
3595
3596 2017-08-09 Tom Tromey <tom@tromey.com>
3597
3598 * skip.c (skiplist_entry): New constructor.
3599 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
3600 (skiplist_entry::file_is_glob): Now bool.
3601 (skiplist_entry::file, skiplist_entry::function): Now
3602 std::string.
3603 (make_skip_entry): Return a unique_ptr. Use new.
3604 (free_skiplist_entry, free_skiplist_entry_cleanup)
3605 (make_free_skiplist_entry_cleanup): Remove.
3606 (skip_command, skip_disable_command, add_skiplist_entry)
3607 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
3608 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
3609 (function_name_is_marked_for_skip): Update.
3610 (skip_delete_command): Update. Use delete.
3611
3612 2017-08-09 Jiong Wang <jiong.wang@arm.com>
3613
3614 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
3615 (aarch64_linux_core_read_description): New function.
3616 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
3617
3618 2017-08-09 Pedro Alves <palves@redhat.com>
3619
3620 * cp-name-parser.y (cp_comp_to_string): Return a
3621 gdb::unique_xmalloc_ptr<char>.
3622 * cp-support.c (replace_typedefs_qualified_name)
3623 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
3624 (cp_canonicalize_string_full): Use op= instead of explicit
3625 convertion.
3626 (cp_class_name_from_physname, method_name_from_physname)
3627 (cp_func_name, cp_remove_params): Adjust to use
3628 gdb::unique_xmalloc_ptr<char>.
3629 * cp-support.h (cp_comp_to_string): Return a
3630 gdb::unique_xmalloc_ptr<char>.
3631 * python/py-type.c (typy_lookup_type): Adjust to use
3632 gdb::unique_xmalloc_ptr<char>.
3633
3634 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
3635
3636 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
3637
3638 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
3639 Yao Qi <yao.qi@linaro.org>
3640
3641 * cp-support.c (cp_canonicalize_string_full): Use
3642 gdb::unique_xmalloc_ptr<char>.
3643 (cp_canonicalize_string): Likewise.
3644
3645 2017-08-09 Yao Qi <yao.qi@linaro.org>
3646
3647 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
3648 * regformats/i386/amd64-avx-avx512.dat: Remove.
3649 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
3650 * regformats/i386/amd64-avx-mpx.dat:Remove.
3651 * regformats/i386/amd64-avx.dat: Remove.
3652 * regformats/i386/amd64-mpx.dat: Remove.
3653 * regformats/i386/i386-avx-avx512.dat: Remove.
3654 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
3655 * regformats/i386/i386-avx-mpx.dat: Remove.
3656 * regformats/i386/i386-mmx.dat: Remove.
3657 * regformats/i386/i386-mpx.dat: Remove.
3658
3659 2017-08-09 Yao Qi <yao.qi@linaro.org>
3660
3661 * amd64-tdep.h (tdesc_x32): Remove the declaration.
3662 * amd64-tdep.c: Don't include features/i386/x32*.c.
3663 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
3664 functions.
3665 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
3666 and i386/x32-avx-avx512.
3667 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
3668 and i386/x32.xml.
3669 * features/i386/x32-avx-avx512.c: Removed.
3670 * features/i386/x32-avx-avx512.xml: Removed.
3671 * features/i386/x32-avx.c: Removed.
3672 * features/i386/x32-avx.xml: Removed.
3673 * features/i386/x32.c: Removed.
3674 * features/i386/x32.xml: Removed.
3675 * regformats/i386/x32-avx-avx512.dat: Removed.
3676 * regformats/i386/x32-avx.dat: Removed.
3677 * regformats/i386/x32.dat: Removed.
3678
3679 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3680
3681 PR breakpoints/21886
3682 * mem-break.c (default_memory_insert_breakpoint): Use
3683 `->placed_address' rather than `->reqstd_address' for the
3684 breakpoint location.
3685
3686 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3687
3688 * arch-utils.c (default_print_insn): Remove arch/mach/endian
3689 assertions.
3690
3691 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3692
3693 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
3694 a union of `tdep_info', `tdesc_data' and `id'.
3695 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
3696 rather than `info.tdep_info'.
3697 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
3698 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3699 * i386-tdep.c (i386_gdbarch_init): Likewise.
3700 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
3701 * mips-tdep.c (mips_gdbarch_init): Likewise.
3702 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3703 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3704 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
3705 `info.tdep_info'.
3706 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
3707 `info.tdep_info'.
3708 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3709 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
3710 `info.tdep_info'.
3711 * spu-tdep.c (spu_gdbarch_init): Likewise.
3712 * gdbarch.h: Regenerate.
3713
3714 2017-08-07 Leszek Swirski <leszeks@google.com>
3715
3716 PR symtab/20899
3717 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
3718
3719 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
3720
3721 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3722 (gdbsim_open): Rename gdb_argv args object to argv.
3723
3724 2017-08-05 Tom Tromey <tom@tromey.com>
3725
3726 * compile/compile-object-load.c (compile_object_load): Use
3727 gdb::unique_xmalloc_ptr.
3728 * cli/cli-dump.c (scan_filename): Rename from
3729 scan_filename_with_cleanup. Change return type.
3730 (scan_expression): Rename from scan_expression_with_cleanup.
3731 Change return type.
3732 (dump_memory_to_file, dump_value_to_file, restore_command):
3733 Use gdb::unique_xmalloc_ptr. Update.
3734 * cli/cli-cmds.c (find_and_open_script): Use
3735 gdb::unique_xmalloc_ptr.
3736 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3737 * symmisc.c (maintenance_print_symbols)
3738 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3739 * symfile.c (symfile_bfd_open, generic_load)
3740 (add_symbol_file_command, remove_symbol_file_command): Use
3741 gdb::unique_xmalloc_ptr.
3742 * source.c (openp): Use gdb::unique_xmalloc_ptr.
3743 * psymtab.c (maintenance_print_psymbols): Use
3744 gdb::unique_xmalloc_ptr.
3745 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3746 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3747 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3748 (reload_shared_libraries_1): Likewise.
3749
3750 2017-08-05 Tom Tromey <tom@tromey.com>
3751
3752 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3753 (rust_op_vector, rust_set_vector): New typedefs.
3754 (current_parser): New global.
3755 (work_obstack): Change to pointer type. Update all users.
3756 (rust_ast, pstate): Remove globals.
3757 (struct rust_parser): New.
3758 (%union) <params, field_inits>: Change type.
3759 (start, tuple_expr, unit_expr, struct_expr_list, literal)
3760 (field_expr, expr_list, maybe_expr_list, type_list): Update.
3761 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3762 (convert_params_to_types, convert_params_to_expression): Change
3763 type of "params".
3764 (ast_string): Change type of "fields".
3765 (rust_parse): Make a rust_parser. Remove cleanups.
3766 (rust_lex_tests): Make and install an auto_obstack.
3767
3768 2017-08-04 Yao Qi <yao.qi@linaro.org>
3769
3770 * configure.srv (ipa_x32_linux_regobj): New.
3771 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3772 instead of X86_TDESC_AVX512.
3773 (initialize_low_tracepoint): Call
3774 init_registers_x32_avx_avx512_linux.
3775
3776 2017-08-04 Yao Qi <yao.qi@linaro.org>
3777
3778 * utils.h (gdb_argv): Add namespace std for nullptr_t.
3779
3780 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
3781
3782 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3783
3784 2017-08-03 Tom Tromey <tom@tromey.com>
3785
3786 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3787 Remove.
3788 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3789
3790 2017-08-03 Tom Tromey <tom@tromey.com>
3791
3792 * python/py-param.c (compute_enum_values): Use gdb_argv.
3793
3794 2017-08-03 Tom Tromey <tom@tromey.com>
3795
3796 * utils.h (struct gdb_argv_deleter): New.
3797 (gdb_argv): New class.
3798 * utils.c (gdb_argv::reset): New method.
3799 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3800 * tracefile.c (tsave_command): Use gdb_argv.
3801 * top.c (new_ui_command): Use gdb_argv.
3802 * symmisc.c (maintenance_print_symbols)
3803 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3804 * symfile.c (symbol_file_command, generic_load)
3805 (remove_symbol_file_command): Use gdb_argv.
3806 * stack.c (backtrace_command): Use gdb_argv.
3807 * source.c (add_path, show_substitute_path_command)
3808 (unset_substitute_path_command, set_substitute_path_command):
3809 Use gdb_argv.
3810 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
3811 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
3812 * remote.c (extended_remote_run, remote_put_command)
3813 (remote_get_command, remote_delete_command): Use gdb_argv.
3814 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
3815 (gdbsim_open): Use gdb_argv.
3816 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
3817 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
3818 * procfs.c (procfs_info_proc): Use gdb_argv.
3819 * interps.c (interpreter_exec_cmd): Use gdb_argv.
3820 * infrun.c (handle_command): Use gdb_argv.
3821 * inferior.c (add_inferior_command, clone_inferior_command):
3822 Use gdb_argv.
3823 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
3824 * exec.c (exec_file_command): Use gdb_argv.
3825 * cli/cli-cmds.c (alias_command): Use gdb_argv.
3826 * compile/compile.c (build_argc_argv): Use gdb_argv.
3827
3828 2017-08-03 Tom Tromey <tom@tromey.com>
3829
3830 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
3831
3832 2017-08-03 Tom Tromey <tom@tromey.com>
3833
3834 * python/python.c (compute_python_string): Return std::string.
3835 (gdbpy_eval_from_control_command): Update.
3836 (do_start_initialization): Use std::string.
3837 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
3838 xstrprintf.
3839 * python/py-breakpoint.c (local_setattro): Use string_printf, not
3840 xstrprintf.
3841
3842 2017-08-03 Tom Tromey <tom@tromey.com>
3843
3844 * top.h (do_restore_instream_cleanup): Remove.
3845 * top.c (do_restore_instream_cleanup): Remove.
3846 (read_command_file): Use scoped_restore.
3847 * cli/cli-script.c (execute_user_command): Use scoped_restore.
3848
3849 2017-08-03 Tom Tromey <tom@tromey.com>
3850
3851 * cli/cli-script.c (execute_user_command)
3852 (execute_control_command): Use scoped_restore.
3853
3854 2017-08-03 Tom Tromey <tom@tromey.com>
3855
3856 * cli/cli-script.c (do_restore_user_call_depth): Remove.
3857 (execute_user_command): Remove user_call_depth; use
3858 user_args_stack's size instead.
3859
3860 2017-08-03 Tom Tromey <tom@tromey.com>
3861
3862 * top.h (in_user_command): Remove.
3863 * top.c (in_user_command): Remove.
3864 * cli/cli-script.c (do_restore_user_call_depth)
3865 (execute_user_command): Update.
3866
3867 2017-08-03 Tom Tromey <tom@tromey.com>
3868
3869 * valops.c (search_struct_method): Use gdb::byte_vector.
3870 * valarith.c (value_concat): Use std::vector.
3871 * target.c (memory_xfer_partial): Use gdb::byte_vector.
3872 (simple_search_memory): Likewise.
3873 * printcmd.c (find_string_backward): Use gdb::byte_vector.
3874 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
3875 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
3876 * elfread.c (elf_rel_plt_read): Use std::string.
3877 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
3878 * cli/cli-dump.c (restore_section_callback): Use
3879 gdb::byte_vector.
3880
3881 2017-08-03 Tom Tromey <tom@tromey.com>
3882
3883 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
3884
3885 2017-08-03 Tom Tromey <tom@tromey.com>
3886
3887 * tui/tui-regs.c (tui_restore_gdbout): Remove.
3888 (tui_register_format): Use scoped_restore.
3889
3890 2017-08-03 Tom Tromey <tom@tromey.com>
3891
3892 * reverse.c (exec_direction_default): Remove.
3893 (exec_reverse_once): Use scoped_restore.
3894 * remote.c (restore_remote_timeout): Remove.
3895 (remote_flash_erase, remote_flash_write, remote_flash_done)
3896 (readchar, remote_serial_write): Use scoped_restore.
3897 * cli/cli-script.c (struct source_cleanup_lines_args)
3898 (source_cleanup_lines): Remove.
3899 (script_from_file): Use scoped_restore.
3900 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
3901 (source_command): Use scoped_restore.
3902
3903 2017-08-03 Tom Tromey <tom@tromey.com>
3904
3905 * utils.h (make_cleanup_free_so): Remove.
3906 * utils.c (do_free_so, make_cleanup_free_so): Remove.
3907 * solist.h (struct so_deleter): New.
3908 (so_list_up): New typedef.
3909 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
3910
3911 2017-08-03 Tom Tromey <tom@tromey.com>
3912
3913 * utils.h (make_cleanup_restore_current_language): Remove.
3914 * utils.c (do_restore_current_language)
3915 (make_cleanup_restore_current_language): Remove.
3916 * parse.c (parse_exp_in_context_1)
3917 (parse_expression_with_language): Use
3918 scoped_restore_current_language.
3919 * mi/mi-main.c (mi_cmd_execute): Use
3920 scoped_restore_current_language.
3921 * language.h (scoped_restore_current_language): New class.
3922
3923 2017-08-03 Tom Tromey <tom@tromey.com>
3924
3925 * compile/compile.c (cleanup_unlink_file): Remove.
3926 (compile_to_object): Use gdb::unlinker.
3927 (eval_compile_command): Likewise.
3928
3929 2017-08-03 Tom Tromey <tom@tromey.com>
3930
3931 * utils.h (make_cleanup_fclose): Remove.
3932 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
3933
3934 2017-08-03 Tom Tromey <tom@tromey.com>
3935
3936 * top.c (open_terminal_stream): Return gdb_file_up.
3937 (new_ui_command): Update.
3938
3939 2017-08-03 Tom Tromey <tom@tromey.com>
3940
3941 * source.c (print_source_lines_base, forward_search_command)
3942 (reverse_search_command): Use gdb_file_up.
3943
3944 2017-08-03 Tom Tromey <tom@tromey.com>
3945
3946 * fbsd-nat.c (fbsd_find_memory_regions): Update.
3947
3948 2017-08-03 Tom Tromey <tom@tromey.com>
3949
3950 * cli/cli-cmds.c (find_and_open_script): Change return type.
3951 Remove "streamp" and "full_path" parameters.
3952 (source_script_with_search): Update.
3953 * auto-load.c (source_script_file): Update.
3954 * cli/cli-cmds.h (find_and_open_script): Change type.
3955 (open_script): New struct.
3956
3957 2017-08-03 Tom Tromey <tom@tromey.com>
3958
3959 * xml-support.c (xml_fetch_content_from_file): Update.
3960 * ui-file.c (stdio_file::open): Update.
3961 * tracefile-tfile.c (tfile_start): Update.
3962 * remote.c (remote_file_put, remote_file_get): Update.
3963 * nat/linux-procfs.c (linux_proc_get_int)
3964 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
3965 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
3966 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
3967 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
3968 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
3969 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
3970 * linux-nat.c (linux_proc_pending_signals): Update.
3971 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
3972 (file_closer): Remove.
3973 * compile/compile.c (compile_to_object): Update.
3974 * common/filestuff.h (struct gdb_file_deleter): New.
3975 (gdb_file_up): New typedef.
3976 (gdb_fopen_cloexec): Change return type.
3977 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
3978 * cli/cli-dump.c (fopen_with_cleanup): Remove.
3979 (dump_binary_file, restore_binary_file): Update.
3980 * auto-load.c (auto_load_objfile_script_1): Update.
3981
3982 2017-08-03 Tom Tromey <tom@tromey.com>
3983
3984 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
3985 (info_static_tracepoint_markers_command): Likewise.
3986 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
3987 * skip.c (skip_info): Use ui_out_emit_table.
3988 * progspace.c (print_program_space): Use ui_out_emit_table.
3989 * osdata.c (info_osdata): Use ui_out_emit_table.
3990 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
3991 ui_out_emit_table.
3992 * linux-thread-db.c (info_auto_load_libthread_db): Use
3993 ui_out_emit_table.
3994 * inferior.c (print_inferior): Use ui_out_emit_table.
3995 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
3996 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
3997 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
3998 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
3999 * ui-out.h (class ui_out_emit_table): New.
4000
4001 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
4002
4003 * mips-tdep.c (mips_fpu_type_str): New function.
4004 (mips_dump_tdep): Call it.
4005
4006 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
4007
4008 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
4009 `->mips_fpu_type'.
4010
4011 2017-07-31 Xavier Roirand <roirand@adacore.com>
4012
4013 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
4014
4015 2017-07-27 Xavier Roirand <roirand@adacore.com>
4016
4017 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
4018
4019 2017-07-26 Yao Qi <yao.qi@linaro.org>
4020
4021 * cli/cli-cmds.c (maintenancechecklist): New variable.
4022 * gdbcmd.h (maintenancechecklist): Declare it.
4023 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
4024 Call i386_linux_read_description with different masks.
4025 * maint.c (maintenance_check_command): New function.
4026 (_initialize_maint_cmds): Call add_prefix_cmd.
4027 * target-descriptions.c (tdesc_reg): override operator != and ==.
4028 (tdesc_type): Likewise.
4029 (tdesc_feature): Likewise.
4030 (target_desc): Likewise.
4031 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
4032 (maintenance_check_xml_descriptions): New function.
4033 (_initialize_target_descriptions) Add command "xml-descriptions".
4034 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
4035
4036 2017-07-26 Yao Qi <yao.qi@linaro.org>
4037
4038 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
4039 Include features/i386/32bit-*.c.
4040 (i386_linux_read_description): Generate target description if it
4041 doesn't exist.
4042 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
4043 functions.
4044 * features/i386/32bit-linux.c: Re-generated.
4045 * features/i386/32bit-sse.c: Likewise.
4046 * target-descriptions.c (print_c_feature::visit): Print code to
4047 set register number if needed.
4048 (print_c_feature) <m_next_regnum>: New field.
4049
4050 2017-07-26 Yao Qi <yao.qi@linaro.org>
4051
4052 * features/Makefile (CFILES): Rename with TDESC_CFILES.
4053 (FEATURE_XMLFILES): New.
4054 (FEATURE_CFILES): New.
4055 New rules.
4056 (clean-cfiles): Remove generated c files.
4057 * features/i386/32bit-avx.c: Generated.
4058 * features/i386/32bit-avx512.c: Generated.
4059 * features/i386/32bit-core.c: Generated.
4060 * features/i386/32bit-linux.c: Generated.
4061 * features/i386/32bit-mpx.c: Generated.
4062 * features/i386/32bit-pkeys.c: Generated.
4063 * features/i386/32bit-sse.c: Generated.
4064 * target-descriptions.c: Include algorithm.
4065 (tdesc_element_visitor): Add method visit_end.
4066 (print_c_tdesc): Implement visit_end.
4067 (print_c_tdesc:: m_filename_after_features): Move it to
4068 protected.
4069 (print_c_feature): New class.
4070 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
4071 name starts with "i386/32bit-".
4072
4073 2017-07-26 Yao Qi <yao.qi@linaro.org>
4074
4075 * target-descriptions.c (tdesc_element_visitor): New class.
4076 (tdesc_element): New class.
4077 (tdesc_reg): Inherit from tdesc_element.
4078 (tdesc_reg::accept): New function.
4079 (tdesc_type): Inherit from tdesc_element.
4080 (tdesc_type::accept): New function.
4081 (tdesc_feature): Inherit from tdesc_element.
4082 (tdesc_feature::accept): New function.
4083 (target_desc): Inherit from tdesc_element.
4084 (target_desc::target_desc): New.
4085 (target_desc::~target_desc): New.
4086 (target_desc::accept): New.
4087 (allocate_target_description): Use new.
4088 (free_target_description): Use delete.
4089 (print_c_tdesc): New class.
4090 (maint_print_c_tdesc_cmd): Adjust.
4091
4092 * features/aarch64.c: Re-generated.
4093 * features/arc-arcompact.c: Re-generated.
4094 * features/arc-v2.c: Re-generated.
4095 * features/arm/arm-with-iwmmxt.c: Re-generated.
4096 * features/arm/arm-with-m.c: Re-generated.
4097 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4098 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4099 * features/arm/arm-with-neon.c: Re-generated.
4100 * features/arm/arm-with-vfpv2.c: Re-generated.
4101 * features/arm/arm-with-vfpv3.c: Re-generated.
4102 * features/i386/amd64-avx-avx512.c: Re-generated.
4103 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4104 * features/i386/amd64-avx.c: Re-generated.
4105 * features/i386/amd64-avx-linux.c: Re-generated.
4106 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4107 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4108 * features/i386/amd64-avx-mpx.c: Re-generated.
4109 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4110 * features/i386/amd64.c: Re-generated.
4111 * features/i386/amd64-linux.c: Re-generated.
4112 * features/i386/amd64-mpx.c: Re-generated.
4113 * features/i386/amd64-mpx-linux.c: Re-generated.
4114 * features/i386/i386-avx-avx512.c: Re-generated.
4115 * features/i386/i386-avx-avx512-linux.c: Re-generated.
4116 * features/i386/i386-avx.c: Re-generated.
4117 * features/i386/i386-avx-linux.c: Re-generated.
4118 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4119 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4120 * features/i386/i386-avx-mpx.c: Re-generated.
4121 * features/i386/i386-avx-mpx-linux.c: Re-generated.
4122 * features/i386/i386.c: Re-generated.
4123 * features/i386/i386-linux.c: Re-generated.
4124 * features/i386/i386-mmx.c: Re-generated.
4125 * features/i386/i386-mmx-linux.c: Re-generated.
4126 * features/i386/i386-mpx.c: Re-generated.
4127 * features/i386/i386-mpx-linux.c: Re-generated.
4128 * features/i386/x32-avx-avx512.c: Re-generated.
4129 * features/i386/x32-avx-avx512-linux.c: Re-generated.
4130 * features/i386/x32-avx.c: Re-generated.
4131 * features/i386/x32-avx-linux.c: Re-generated.
4132 * features/i386/x32.c: Re-generated.
4133 * features/i386/x32-linux.c: Re-generated.
4134 * features/microblaze.c: Re-generated.
4135 * features/microblaze-with-stack-protect.c: Re-generated.
4136 * features/mips64-dsp-linux.c: Re-generated.
4137 * features/mips64-linux.c: Re-generated.
4138 * features/mips-dsp-linux.c: Re-generated.
4139 * features/mips-linux.c: Re-generated.
4140 * features/nds32.c: Re-generated.
4141 * features/nios2.c: Re-generated.
4142 * features/nios2-linux.c: Re-generated.
4143 * features/rs6000/powerpc-32.c: Re-generated.
4144 * features/rs6000/powerpc-32l.c: Re-generated.
4145 * features/rs6000/powerpc-403.c: Re-generated.
4146 * features/rs6000/powerpc-403gc.c : Re-generated.
4147 * features/rs6000/powerpc-405.c: Re-generated.
4148 * features/rs6000/powerpc-505.c: Re-generated.
4149 * features/rs6000/powerpc-601.c: Re-generated.
4150 * features/rs6000/powerpc-602.c: Re-generated.
4151 * features/rs6000/powerpc-603.c: Re-generated.
4152 * features/rs6000/powerpc-604.c: Re-generated.
4153 * features/rs6000/powerpc-64.c: Re-generated.
4154 * features/rs6000/powerpc-64l.c: Re-generated.
4155 * features/rs6000/powerpc-7400.c: Re-generated.
4156 * features/rs6000/powerpc-750.c: Re-generated.
4157 * features/rs6000/powerpc-860.c: Re-generated.
4158 * features/rs6000/powerpc-altivec32.c: Re-generated.
4159 * features/rs6000/powerpc-altivec32l.c: Re-generated.
4160 * features/rs6000/powerpc-altivec64.c: Re-generated.
4161 * features/rs6000/powerpc-altivec64l.c: Re-generated.
4162 * features/rs6000/powerpc-cell32l.c: Re-generated.
4163 * features/rs6000/powerpc-cell64l.c: Re-generated.
4164 * features/rs6000/powerpc-e500.c: Re-generated.
4165 * features/rs6000/powerpc-e500l.c: Re-generated.
4166 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4167 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4168 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4169 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4170 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
4171 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
4172 * features/rs6000/powerpc-vsx32.c: Re-generated.
4173 * features/rs6000/powerpc-vsx32l.c: Re-generated.
4174 * features/rs6000/powerpc-vsx64.c: Re-generated.
4175 * features/rs6000/powerpc-vsx64l.c: Re-generated.
4176 * features/rs6000/rs6000.c: Re-generated.
4177 * features/s390-linux32.c: Re-generated.
4178 * features/s390-linux32v1.c: Re-generated.
4179 * features/s390-linux32v2.c: Re-generated.
4180 * features/s390-linux64.c: Re-generated.
4181 * features/s390-linux64v1.c: Re-generated.
4182 * features/s390-linux64v2.c: Re-generated.
4183 * features/s390-te-linux64.c: Re-generated.
4184 * features/s390-tevx-linux64.c: Re-generated.
4185 * features/s390-vx-linux64.c: Re-generated.
4186 * features/s390x-linux64.c: Re-generated.
4187 * features/s390x-linux64v1.c: Re-generated.
4188 * features/s390x-linux64v2.c: Re-generated.
4189 * features/s390x-te-linux64.c: Re-generated.
4190 * features/s390x-tevx-linux64.c: Re-generated.
4191 * features/s390x-vx-linux64.c: Re-generated.
4192 * features/sparc/sparc32-solaris.c: Re-generated.
4193 * features/sparc/sparc64-solaris.c: Re-generated.
4194 * features/tic6x-c62x.c: Re-generated.
4195 * features/tic6x-c62x-linux.c: Re-generated.
4196 * features/tic6x-c64x.c: Re-generated.
4197 * features/tic6x-c64x-linux.c: Re-generated.
4198 * features/tic6x-c64xp.c: Re-generated.
4199 * features/tic6x-c64xp-linux.c: Re-generated.
4200
4201 2017-07-26 Yao Qi <yao.qi@linaro.org>
4202
4203 * i386-linux-tdep.c (i386_linux_read_description): New function.
4204 (i386_linux_core_read_description): Call
4205 i386_linux_read_description.
4206 * i386-linux-tdep.h (i386_linux_read_description): Declare.
4207 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
4208 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
4209 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
4210 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
4211 * x86-linux-nat.c (x86_linux_read_description): Call
4212 i386_linux_read_description.
4213
4214 2017-07-26 Yao Qi <yao.qi@linaro.org>
4215
4216 * NEWS: Mention it.
4217 * features/Makefile (%.c: %.xml): Pass the xml file name to
4218 command "maint print c-tdesc".
4219 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4220 name from 'arg'.
4221
4222 2017-07-26 Yao Qi <yao.qi@linaro.org>
4223
4224 * target-descriptions.c (target_desc): Add ctor and dtor. Do
4225 in-class initialization.
4226 (tdesc_create_feature): Call new instead of XCNEW.
4227 (free_target_description): Ue delete.
4228
4229 2017-07-25 John Baldwin <jhb@FreeBSD.org>
4230
4231 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4232
4233 2017-07-25 Yao Qi <yao.qi@linaro.org>
4234
4235 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4236 constant.
4237 (amd64_x32_init_abi): Likewise.
4238 * amd64-tdep.h (amd64_init_abi): Update declaration.
4239 (amd64_x32_init_abi): Likewise.
4240
4241 2017-07-25 Yao Qi <yao.qi@linaro.org>
4242
4243 PR tdep/21717
4244 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4245 condition for FPSCR.
4246 (arm_linux_store_inferior_registers): Likewise.
4247
4248 2017-07-22 Tom Tromey <tom@tromey.com>
4249
4250 * break-catch-syscall.c (struct catch_syscall_inferior_data)
4251 <syscalls_counts>: Now a std::vector.
4252 (get_catch_syscall_inferior_data): Use "new".
4253 (catch_syscall_inferior_data_cleanup): Use "delete".
4254 (insert_catch_syscall, remove_catch_syscall)
4255 (clear_syscall_counts): Update.
4256
4257 2017-07-22 Tom Tromey <tom@tromey.com>
4258
4259 * break-catch-syscall.c (syscall_catchpoint)
4260 <syscalls_to_be_caught>: Now a std::vector<int>
4261 (~syscall_catchpoint): Remove.
4262 (insert_catch_syscall, remove_catch_syscall)
4263 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4264 (print_mention_catch_syscall, print_recreate_catch_syscall):
4265 Update.
4266 (create_syscall_event_catchpoint): Change type of "filter"
4267 parameter.
4268 (catch_syscall_split_args): Return a std::vector.
4269 (catch_syscall_command_1, catching_syscall_number_1): Update.
4270
4271 2017-07-22 Tom Tromey <tom@tromey.com>
4272
4273 * break-catch-throw.c (struct exception_catchpoint)
4274 <exception_rx>: Now a std::string.
4275 (~exception_catchpoint): Remove.
4276 (print_one_detail_exception_catchpoint): Update.
4277 (handle_gnu_v3_exceptions): Change type of except_rx.
4278 (extract_exception_regexp): Return a std::string.
4279 (catch_exception_command_1): Update.
4280
4281 2017-07-22 Tom Tromey <tom@tromey.com>
4282
4283 * break-catch-sig.c (gdb_signal_type): Remove typedef.
4284 (struct signal_catchpoint) <signals_to_be_caught>: Now a
4285 std::vector.
4286 <catch_all>: Now a bool.
4287 (~signal_catchpoint): Remove.
4288 (signal_catchpoint_insert_location)
4289 (signal_catchpoint_remove_location)
4290 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
4291 (signal_catchpoint_print_mention)
4292 (signal_catchpoint_print_recreate)
4293 (signal_catchpoint_explains_signal): Update.
4294 (create_signal_catchpoint): Change type of "filter" and
4295 "catch_all".
4296 (catch_signal_split_args): Return a std::vector. Change type of
4297 "catch_all".
4298 (catch_signal_command): Update.
4299
4300 2017-07-20 Pedro Alves <palves@redhat.com>
4301
4302 * ada-lang.c (ada_language_defn): Make extern.
4303 (_initialize_ada_language): Remove add_language call.
4304 * c-lang.c (c_language_defn, cplus_language_defn)
4305 (asm_language_defn, minimal_language_defn): Make extern.
4306 (_initialize_c_language): Delete.
4307 * completer.c (compare_cstrings): Delete, moved to utils.h.
4308 * d-lang.c (d_language_defn): Make extern.
4309 (_initialize_d_language): Remove add_language calls.
4310 * defs.h (enum language): Add comment.
4311 * f-lang.c (f_language_defn): Make extern.
4312 (_initialize_f_language): Remove add_language call.
4313 * go-lang.c (go_language_defn): Make extern.
4314 (_initialize_go_language): Remove add_language call.
4315 * language.c: Include <algorithm>.
4316 (languages): Redefine as const array.
4317 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
4318 (set_language_command): Handle "local". Use for-range loop.
4319 (set_language): Remove loop.
4320 (language_enum): Rewrite.
4321 (language_def, language_str): Remove loops.
4322 (add_language): Delete.
4323 (add_set_language_command): New, based on add_languages.
4324 (skip_language_trampoline): Adjust.
4325 (local_language_defn): Delete.
4326 (language_gdbarch_post_init): Adjust.
4327 (_initialize_language): Remove add_language calls. Call
4328 add_set_language_command.
4329 * language.h (add_language): Delete.
4330 (auto_language_defn)
4331 (unknown_language_defn, minimal_language_defn, ada_language_defn)
4332 (asm_language_defn, c_language_defn, cplus_language_defn)
4333 (d_language_defn, f_language_defn, go_language_defn)
4334 (m2_language_defn, objc_language_defn, opencl_language_defn)
4335 (pascal_language_defn, rust_language_defn): Declare.
4336 * m2-lang.c (m2_language_defn): Make extern.
4337 (_initialize_m2_language): Remove add_language call.
4338 * objc-lang.c (objc_language_defn): Make extern.
4339 (_initialize_objc_language): Remove add_language call.
4340 * opencl-lang.c (opencl_language_defn): Make extern.
4341 (_initialize_opencl_language): Remove add_language call.
4342 * p-lang.c (pascal_language_defn): Make extern.
4343 (_initialize_pascal_language): Delete.
4344 * rust-lang.c (rust_language_defn): Make extern.
4345 (_initialize_rust_language): Delete.
4346 * utils.h (compare_cstrings): New static inline function.
4347
4348 2017-07-20 Pedro Alves <palves@redhat.com>
4349
4350 * ada-lang.c (ada_to_fixed_type_1): Adjust.
4351 (get_var_value): Constify parameters.
4352 (get_int_var_value): Change prototype.
4353 (to_fixed_range_type): Adjust.
4354 * ada-lang.h (get_int_var_value): Change prototype.
4355
4356 2017-07-20 Pedro Alves <palves@redhat.com>
4357
4358 * dwarf2read.c (dw2_lookup_symbol): Use
4359 SYMBOL_MATCHES_SEARCH_NAME.
4360 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
4361
4362 2017-07-20 Pedro Alves <palves@redhat.com>
4363
4364 * block.c (block_iter_name_step, block_iter_name_first)
4365 (block_iter_name_next): Delete.
4366 (block_lookup_symbol_primary): Adjust to use
4367 dict_iter_match_first/dict_iter_match_next.
4368 * block.h (block_iter_name_first, block_iter_name_next): Delete
4369 declarations.
4370 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
4371 dict_iter_match_first/dict_iter_match_next.
4372
4373 2017-07-20 Pedro Alves <palves@redhat.com>
4374
4375 * cp-support.c (cp_find_first_component_aux): Add missing case for
4376 end of string.
4377
4378 2017-07-18 David Blaikie <dblaikie@gmail.com>
4379
4380 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
4381 of dwo_cu's dwo_file.
4382
4383 2017-07-18 Yao Qi <yao.qi@linaro.org>
4384
4385 * remote.c (store_registers_using_G): Remove one line comment.
4386
4387 2017-07-18 Yao Qi <yao.qi@linaro.org>
4388
4389 * regcache.c (regcache_cpy): Simplify it.
4390 (regcache::cpy_no_passthrough): Remove it.
4391 * regcache.h (cpy_no_passthrough): Remove it.
4392 (regcache_dup, regcache_cpy): Update comments.
4393
4394 2017-07-18 Pedro Alves <palves@redhat.com>
4395
4396 * remote-sim.c (sim_command_completer): Adjust to work with a
4397 completion_tracker instead of a VEC.
4398
4399 2017-07-17 Pedro Alves <palves@redhat.com>
4400
4401 * completer.c (complete_source_filenames): New function.
4402 (complete_address_and_linespec_locations): New function.
4403 (location_completer): Use complete_address_and_linespec_locations.
4404 (completion_tracker::build_completion_result): Honor the tracker's
4405 request to suppress append.
4406 * completer.h (completion_tracker::suppress_append_ws)
4407 (completion_tracker::set_suppress_append_ws): New methods.
4408 (completion_tracker::m_suppress_append_ws): New field.
4409 (complete_source_filenames): New declaration.
4410 * linespec.c (linespec_complete_what): New.
4411 (struct ls_parser) <complete_what, completion_word,
4412 completion_quote_char, completion_quote_end, completion_tracker>:
4413 New fields.
4414 (string_find_incomplete_keyword_at_end): New.
4415 (linespec_lexer_lex_string): Record quote char. If in completion
4416 mode, don't throw.
4417 (linespec_lexer_consume_token): Advance the completion word point.
4418 (linespec_lexer_peek_token): Save/restore completion info.
4419 (save_stream_and_consume_token): New.
4420 (set_completion_after_number): New.
4421 (linespec_parse_basic): Set what to complete next depending on
4422 token. Handle function and label completions specially.
4423 (parse_linespec): Disable objc shortcut in completion mode. Set
4424 what to complete next depending on token type. Skip keyword if in
4425 completion mode.
4426 (complete_linespec_component, linespec_complete): New.
4427 * linespec.h (linespec_complete): Declare.
4428
4429 2017-07-17 Pedro Alves <palves@redhat.com>
4430
4431 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
4432 Handle 'operator<' / 'operator<<'.
4433
4434 2017-07-17 Pedro Alves <palves@redhat.com>
4435
4436 * completer.c (collect_explicit_location_matches): Handle
4437 MATCH_LABEL.
4438 (convert_explicit_location_to_linespec): New, factored out from
4439 ...
4440 (convert_explicit_location_to_sals): ... this.
4441 (complete_label): New.
4442 (linespec_complete_label, find_label_symbols_in_block): New.
4443 (find_label_symbols): Add completion_mode parameter and adjust to
4444 call find_label_symbols_in_block.
4445 * linespec.h (linespec_complete_label): Declare.
4446
4447 2017-07-17 Pedro Alves <palves@redhat.com>
4448
4449 * ada-lang.c (ada_collect_symbol_completion_matches): Add
4450 complete_symbol_mode parameter.
4451 * cli/cli-cmds.c (complete_command): Get the completion result out
4452 of the handle_brkchars tracker if used a custom word point.
4453 * completer.c: Include "linespec.h".
4454 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
4455 (advance_to_expression_complete_word_point): New.
4456 (completion_tracker::completes_to_completion_word): New.
4457 (complete_files_symbols): Pass down
4458 complete_symbol_mode::EXPRESSION.
4459 (explicit_options, probe_options): New.
4460 (collect_explicit_location_matches): Complete on the
4461 explictit_loc->foo instead of word. Use
4462 linespec_complete_function. Handle MATCH_LINE. Handle offering
4463 keyword and options completions.
4464 (backup_text_ptr): Delete.
4465 (skip_keyword): New.
4466 (complete_explicit_location): Remove 'word' parameter. Add
4467 language, quoted_arg_start and quoted_arg_end parameters.
4468 Rewrite, parsing left to right.
4469 (location_completer): Rewrite.
4470 (location_completer_handle_brkchars): New function.
4471 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
4472 (enum complete_line_internal_reason): Adjust comments.
4473 (completion_tracker::discard_completions): New.
4474 (completer_handle_brkchars_func_for_completer): Handle
4475 location_completer.
4476 (gdb_custom_word_point_brkchars)
4477 (gdb_org_rl_basic_quote_characters): New.
4478 (gdb_completion_word_break_characters_throw)
4479 (completion_find_completion_word): Handle trackers that use a
4480 custom word point.
4481 (completion_tracker::advance_custom_word_point_by): New.
4482 (completion_tracker::build_completion_result): Don't rely on
4483 readline appending the quote char.
4484 (gdb_rl_attempted_completion_function_throw): Handle trackers that
4485 use a custom word point.
4486 (gdb_rl_attempted_completion_function): Restore
4487 rl_basic_quote_characters.
4488 * completer.h (class completion_tracker): Extend intro comment.
4489 (completion_tracker::set_quote_char)
4490 (completion_tracker::quote_char)
4491 (completion_tracker::set_use_custom_word_point)
4492 (completion_tracker::use_custom_word_point)
4493 (completion_tracker::custom_word_point)
4494 (completion_tracker::set_custom_word_point)
4495 (completion_tracker::advance_custom_word_point_by)
4496 (completion_tracker::completes_to_completion_word)
4497 (completion_tracker::discard_completions): New methods.
4498 (completion_tracker::m_quote_char)
4499 (completion_tracker::m_use_custom_word_point)
4500 (completion_tracker::m_custom_word_point): New fields.
4501 (advance_to_expression_complete_word_point): Declare.
4502 * f-lang.c (f_collect_symbol_completion_matches): Add
4503 complete_symbol_mode parameter.
4504 * language.h (struct language_defn)
4505 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
4506 parameter.
4507 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
4508 (linespec_complete_function): New function.
4509 (linespec_lexer_lex_keyword): Adjust.
4510 * linespec.h (linespec_keywords, linespec_complete_function): New
4511 declarations.
4512 * location.c (find_end_quote): New function.
4513 (explicit_location_lex_one): Add explicit_completion_info
4514 parameter. Save quoting info. Don't throw if being called for
4515 completion. Don't handle Ada operators here.
4516 (is_cp_operator, skip_op_false_positives, first_of)
4517 (explicit_location_lex_one_function): New function.
4518 (string_to_explicit_location): Replace 'dont_throw' parameter with
4519 an explicit_completion_info pointer parameter. Handle it. Don't
4520 use explicit_location_lex_one to lex function names. Use
4521 explicit_location_lex_one_function instead.
4522 * location.h (struct explicit_completion_info): New.
4523 (string_to_explicit_location): Replace 'dont_throw' parameter with
4524 an explicit_completion_info pointer parameter.
4525 * symtab.c (default_collect_symbol_completion_matches_break_on):
4526 Add complete_symbol_mode parameter. Handle LINESPEC mode.
4527 (default_collect_symbol_completion_matches)
4528 (collect_symbol_completion_matches): Add complete_symbol_mode
4529 parameter.
4530 (collect_symbol_completion_matches_type): Pass down
4531 complete_symbol_mode::EXPRESSION.
4532 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4533 parameter. Handle LINESPEC mode.
4534 * symtab.h (complete_symbol_mode): New.
4535 (default_collect_symbol_completion_matches_break_on)
4536 (default_collect_symbol_completion_matches)
4537 (collect_symbol_completion_matches)
4538 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4539 parameter.
4540
4541 2017-07-17 Pedro Alves <palves@redhat.com>
4542
4543 * utils.c (enum class strncmp_iw_mode): New.
4544 (strcmp_iw): Rename to ...
4545 (strncmp_iw_with_mode): ... this. Add string2_len and mode
4546 parameters. Handle them.
4547 (strncmp_iw): New.
4548 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
4549 * utils.h (strncmp_iw): Declare.
4550 (strcmp_iw): Move describing comments here.
4551
4552 2017-07-17 Pedro Alves <palves@redhat.com>
4553
4554 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
4555 CP_OPERATOR_STR.
4556 * c-typeprint.c (is_type_conversion_operator): Use
4557 CP_OPERATOR_STR.
4558 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
4559 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
4560 CP_OPERATOR_LEN.
4561 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
4562 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
4563 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
4564 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
4565 CP_OPERATOR_STR.
4566 * location.c: Include "cp-support.h".
4567 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
4568 CP_OPERATOR_STR.
4569 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
4570 CP_OPERATOR_LEN.
4571
4572 2017-07-17 Pedro Alves <palves@redhat.com>
4573
4574 * cli/cli-cmds.c (complete_command): Use a completion tracker
4575 along with completion_find_completion_word for handle_brkchars
4576 phase.
4577 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
4578 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
4579 (struct gdb_rl_completion_word_info): New.
4580 (gdb_rl_find_completion_word): New.
4581 (completion_find_completion_word): New.
4582 * completer.h (completion_find_completion_word): Declare.
4583
4584 2017-07-17 Pedro Alves <palves@redhat.com>
4585
4586 * ada-lang.c (symbol_completion_match): Adjust comments.
4587 (symbol_completion_add): Replace vector parameter with
4588 completion_tracker parameter. Use it.
4589 (ada_make_symbol_completion_list): Rename to...
4590 (ada_collect_symbol_completion_matches): ... this. Add
4591 completion_tracker parameter and use it.
4592 (ada_language_defn): Adjust.
4593 * break-catch-syscall.c (catch_syscall_completer): Adjust
4594 prototype and work with completion_tracker instead of VEC.
4595 * breakpoint.c (condition_completer): Adjust prototype and work
4596 with completion_tracker instead of VEC.
4597 * c-lang.c (c_language_defn, cplus_language_defn)
4598 (asm_language_defn, minimal_language_defn): Adjust to renames.
4599 * cli/cli-cmds.c (complete_command): Rework using
4600 completion_tracker. Catch exceptions when completing.
4601 * cli/cli-decode.c (integer_unlimited_completer)
4602 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
4603 with completion_tracker instead of VEC.
4604 * command.h (struct completion_tracker): Forward declare.
4605 (completer_ftype, completer_handle_brkchars_ftype): Change
4606 types.
4607 (complete_on_cmdlist, complete_on_enum): Adjust.
4608 * completer.c: Include <algorithm>.
4609 (struct gdb_completer_state): New.
4610 (current_completion): New global.
4611 (readline_line_completion_function): Delete.
4612 (noop_completer, filename_completer)
4613 (filename_completer_handle_brkchars, complete_files_symbols)
4614 (linespec_location_completer): Adjust to work with a
4615 completion_tracker instead of a VEC.
4616 (string_or_empty): New.
4617 (collect_explicit_location_matches): Adjust to work with a
4618 completion_tracker instead of a VEC.
4619 (explicit_location_completer): Rename to ...
4620 (complete_explicit_location): ... this and adjust to work with a
4621 completion_tracker instead of a VEC.
4622 (location_completer): Adjust to work with a completion_tracker
4623 instead of a VEC.
4624 (add_struct_fields): Adjust to work with a completion_list instead
4625 of VEC.
4626 (expression_completer): Rename to ...
4627 (complete_expression): ... this and adjust to work with a
4628 completion_tracker instead of a VEC. Use complete_files_symbols.
4629 (expression_completer): Reimplement on top of complete_expression.
4630 (symbol_completer): Adjust to work with a completion_tracker
4631 instead of a VEC.
4632 (enum complete_line_internal_reason): Add describing comments.
4633 (complete_line_internal_normal_command): Adjust to work with a
4634 completion_tracker instead of a VEC.
4635 (complete_line_internal): Rename to ...
4636 (complete_line_internal_1): ... this and adjust to work with a
4637 completion_tracker instead of a VEC. Assert TEXT is NULL in the
4638 handle_brkchars phase.
4639 (new_completion_tracker): Delete.
4640 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
4641 complete_line_internal_1.
4642 (free_completion_tracker): Delete.
4643 (INITIAL_COMPLETION_HTAB_SIZE): New.
4644 (completion_tracker::completion_tracker)
4645 (completion_tracker::~completion_tracker): New.
4646 (maybe_add_completion): Delete.
4647 (completion_tracker::maybe_add_completion)
4648 (completion_tracker::add_completion)
4649 (completion_tracker::add_completions): New.
4650 (throw_max_completions_reached_error): Delete.
4651 (complete_line): Adjust to work with a completion_tracker instead
4652 of a VEC. Don't create a completion_tracker_t or check for max
4653 completions here.
4654 (command_completer, command_completer_handle_brkchars)
4655 (signal_completer, reg_or_group_completer_1)
4656 (reg_or_group_completer, default_completer_handle_brkchars):
4657 Adjust to work with a completion_tracker.
4658 (gdb_completion_word_break_characters_throw): New.
4659 (gdb_completion_word_break_characters): Reimplement.
4660 (line_completion_function): Delete.
4661 (completion_tracker::recompute_lowest_common_denominator)
4662 (expand_preserving_ws)
4663 (completion_tracker::build_completion_result)
4664 (completion_result::completion_result)
4665 (completion_result::completion_result)
4666 (completion_result::~completion_result)
4667 (completion_result::completion_result)
4668 (completion_result::release_match_list, compare_cstrings)
4669 (completion_result::sort_match_list)
4670 (completion_result::reset_match_list)
4671 (gdb_rl_attempted_completion_function_throw)
4672 (gdb_rl_attempted_completion_function): New.
4673 * completer.h (completion_list, struct completion_result)
4674 (class completion_tracker): New.
4675 (complete_line): Add completion_tracker parameter.
4676 (readline_line_completion_function): Delete.
4677 (gdb_rl_attempted_completion_function): New.
4678 (noop_completer, filename_completer, expression_completer)
4679 (location_completer, symbol_completer, command_completer)
4680 (signal_completer, reg_or_group_completer): Update prototypes.
4681 (completion_tracker_t, new_completion_tracker)
4682 (make_cleanup_free_completion_tracker): Delete.
4683 (enum maybe_add_completion_enum): Delete.
4684 (maybe_add_completion): Delete.
4685 (throw_max_completions_reached_error): Delete.
4686 * corefile.c (complete_set_gnutarget): Adjust to work with a
4687 completion_tracker instead of a VEC.
4688 * cp-abi.c (cp_abi_completer): Adjust to work with a
4689 completion_tracker instead of a VEC.
4690 * d-lang.c (d_language_defn): Adjust.
4691 * disasm.c (disassembler_options_completer): Adjust to work with a
4692 completion_tracker instead of a VEC.
4693 * f-lang.c (f_make_symbol_completion_list): Rename to ...
4694 (f_collect_symbol_completion_matches): ... this. Adjust to work
4695 with a completion_tracker instead of a VEC.
4696 (f_language_defn): Adjust.
4697 * go-lang.c (go_language_defn): Adjust.
4698 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
4699 Adjust to work with a completion_tracker instead of a VEC.
4700 * infrun.c (handle_completer): Likewise.
4701 * interps.c (interpreter_completer): Likewise.
4702 * interps.h (interpreter_completer): Likewise.
4703 * language.c (unknown_language_defn, auto_language_defn)
4704 (local_language_defn): Adjust.
4705 * language.h (language_defn::la_make_symbol_completion_list):
4706 Rename to ...
4707 (language_defn::la_collect_symbol_completion_matches): ... this
4708 and adjust to work with a completion_tracker instead of a VEC.
4709 * m2-lang.c (m2_language_defn): Adjust.
4710 * objc-lang.c (objc_language_defn): Adjust.
4711 * opencl-lang.c (opencl_language_defn): Adjust.
4712 * p-lang.c (pascal_language_defn): Adjust.
4713 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
4714 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
4715 with a completion_tracker.
4716 * rust-lang.c (rust_language_defn): Adjust.
4717 * symtab.c (free_completion_list, do_free_completion_list)
4718 (return_val, completion_tracker): Delete.
4719 (completion_list_add_name, completion_list_add_symbol)
4720 (completion_list_add_msymbol, completion_list_objc_symbol)
4721 (completion_list_add_fields, add_symtab_completions): Add
4722 completion_tracker parameter and use it.
4723 (default_make_symbol_completion_list_break_on_1): Rename to...
4724 (default_collect_symbol_completion_matches_break_on): ... this.
4725 Add completion_tracker parameter and use it instead of allocating
4726 a completion tracker here.
4727 (default_make_symbol_completion_list_break_on): Delete old
4728 implementation.
4729 (default_make_symbol_completion_list): Delete.
4730 (default_collect_symbol_completion_matches): New.
4731 (make_symbol_completion_list): Delete.
4732 (collect_symbol_completion_matches): New.
4733 (make_symbol_completion_type): Rename to ...
4734 (collect_symbol_completion_matches_type): ... this. Add
4735 completion_tracker parameter and use it instead of VEC.
4736 (make_file_symbol_completion_list_1): Rename to...
4737 (collect_file_symbol_completion_matches): ... this. Add
4738 completion_tracker parameter and use it instead of VEC.
4739 (make_file_symbol_completion_list): Delete.
4740 (add_filename_to_list): Use completion_list instead of a VEC.
4741 (add_partial_filename_data::list): Now a completion_list.
4742 (make_source_files_completion_list): Work with a completion_list
4743 instead of a VEC.
4744 * symtab.h: Include "completer.h".
4745 (default_make_symbol_completion_list_break_on)
4746 (default_make_symbol_completion_list, make_symbol_completion_list)
4747 (make_symbol_completion_type, make_file_symbol_completion_list)
4748 (make_source_files_completion_list): Delete.
4749 (default_collect_symbol_completion_matches_break_on)
4750 (default_collect_symbol_completion_matches)
4751 (collect_symbol_completion_matches)
4752 (collect_symbol_completion_matches_type)
4753 (collect_file_symbol_completion_matches)
4754 (make_source_files_completion_list): New.
4755 * top.c (init_main): Don't install a rl_completion_entry_function
4756 hook. Install a rl_attempted_completion_function hook instead.
4757 * tui/tui-layout.c (layout_completer): Adjust to work with a
4758 completion_tracker.
4759 * tui/tui-regs.c (tui_reggroup_completer):
4760 * tui/tui-win.c (window_name_completer, focus_completer)
4761 (winheight_completer): Adjust to work with a completion_tracker.
4762 * value.c: Include "completer.h".
4763 (complete_internalvar): Adjust to work with a completion_tracker.
4764 * value.h (complete_internalvar): Likewise.
4765
4766 2017-07-17 Pedro Alves <palves@redhat.com>
4767
4768 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4769 renames.
4770 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4771 comments to completer_ftype's declaration.
4772 <completer_handle_brkchars>: Change type to
4773 completer_handle_brkchars_ftype.
4774 * command.h (completer_ftype): Add describing comment and give
4775 names to parameters.
4776 (completer_ftype_void): Rename to ...
4777 (completer_handle_brkchars_ftype) ... this. Add describing comment.
4778 (set_cmd_completer_handle_brkchars): Adjust.
4779 * completer.c (filename_completer_handle_brkchars): New function.
4780 (complete_line_internal_normal_command): New function, factored
4781 out from ...
4782 (complete_line_internal): ... here.
4783 (command_completer_handle_brkchars)
4784 (default_completer_handle_brkchars)
4785 (completer_handle_brkchars_func_for_completer): New functions.
4786 * completer.h (set_gdb_completion_word_break_characters): Delete
4787 declaration.
4788 (completer_handle_brkchars_func_for_completer): New declaration.
4789 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4790 completer_handle_brkchars_func_for_completer.
4791
4792 2017-07-17 Pedro Alves <palves@redhat.com>
4793
4794 * completer.c (symbol_completer): New function, based on
4795 make_symbol_completion_list_fn.
4796 * completer.h (symbol_completer): New declaration.
4797 * guile/scm-cmd.c (cmdscm_completers): Adjust.
4798 * python/py-cmd.c (completers): Adjust.
4799 * symtab.c (make_symbol_completion_list_fn): Delete.
4800 * symtab.h (make_symbol_completion_list_fn): Delete.
4801 * cli/cli-decode.c (add_cmd): Adjust.
4802
4803 2017-07-17 Pedro Alves <palves@redhat.com>
4804
4805 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4806 * dwarf2read.c: Include "filename-seen-cache.h".
4807 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
4808 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
4809 * filename-seen-cache.c: New file.
4810 * filename-seen-cache.h: New file.
4811 * symtab.c: Include "filename-seen-cache.h".
4812 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
4813 (create_filename_seen_cache, clear_filename_seen_cache)
4814 (delete_filename_seen_cache, filename_seen): Delete, parts moved
4815 to filename-seen-cache.h/filename-seen-cache.c.
4816 (output_source_filename, sources_info)
4817 (maybe_add_partial_symtab_filename)
4818 (make_source_files_completion_list): Adjust to use
4819 filename_seen_cache.
4820
4821 2017-07-17 Pedro Alves <palves@redhat.com>
4822
4823 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
4824 fields.
4825 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
4826 dwarf2_debug_sections*)): New.
4827 (dwarf2_per_objfile::dwarf2_per_objfile(const
4828 dwarf2_per_objfile&)): Declare as deleted.
4829 (dwarf2_per_objfile::operator=): Declare as deleted.
4830 (dwarf2_per_objfile::dwarf2_per_objfile)
4831 (dwarf2_per_objfile::~dwarf2_per_objfile)
4832 (dwarf2_per_objfile::free_cached_comp_units): New.
4833 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
4834 ctor. Call dwarf2_per_objfile's ctor manually.
4835 (dwarf2_locate_sections): Deleted/refactored as ...
4836 (dwarf2_per_objfile::locate_sections): ... this new method.
4837 (free_cached_comp_units): Defer to
4838 dwarf2_per_objfile::free_cached_comp_units.
4839 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
4840
4841 2017-07-14 Tom Tromey <tom@tromey.com>
4842
4843 PR rust/21764:
4844 * rust-exp.y (convert_ast_to_expression): Add "want_type"
4845 parameter.
4846 <UNOP_SIZEOF>: Split into separate case.
4847 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
4848
4849 2017-07-14 Tom Tromey <tom@tromey.com>
4850
4851 PR rust/21763:
4852 * symtab.c (symbol_matches_domain): Add language_rust to special
4853 case.
4854 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
4855 treat LOC_TYPEDEF symbols as variables.
4856
4857 2017-07-14 Pedro Alves <palves@redhat.com>
4858
4859 * symtab.c (make_file_symbol_completion_list_1): Iterate over
4860 symtabs matching all symtabs with SRCFILE as file name instead of
4861 only considering the first hit, with lookup_symtab.
4862
4863 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4864
4865 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
4866 operator_name parameters.
4867 (gen_expr): Update function call.
4868
4869 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4870
4871 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
4872 parameter.
4873 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
4874 Likewise.
4875 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
4876 parameter, use agent_expr::gdbarch instead, update function
4877 calls.
4878 (locexpr_tracepoint_var_ref): Likewise.
4879 (loclist_tracepoint_var_ref): Likewise.
4880 * ax-gdb.c (gen_trace_static_fields): Likewise.
4881 (gen_traced_pop): Likewise.
4882 (gen_frame_args_address): Likewise.
4883 (gen_frame_locals_address): Likewise.
4884 (gen_var_ref): Likewise.
4885 (gen_struct_ref_recursive): Likewise.
4886 (gen_static_field): Likewise.
4887 (gen_maybe_namespace_elt): Likewise.
4888 (gen_expr): Likewise.
4889 (gen_trace_for_var): Likewise.
4890 (gen_trace_for_expr): Likewise.
4891 (gen_trace_for_return_address): Likewise.
4892
4893 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4894
4895 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
4896 parameter.
4897 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
4898
4899 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4900
4901 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
4902 from ax, update calls.
4903 (gen_usual_arithmetic): Likewise.
4904 (gen_integral_promotions): Likewise.
4905 (gen_bitfield_ref): Likewise.
4906 (gen_primitive_field): Likewise.
4907 (gen_struct_ref_recursive): Likewise.
4908 (gen_struct_ref): Likewise.
4909 (gen_maybe_namespace_elt): Likewise.
4910 (gen_struct_elt_for_reference): Likewise.
4911 (gen_namespace_elt): Likewise.
4912 (gen_aggregate_elt_ref): Likewise.
4913 (gen_expr): Get gdbarch from ax, update calls.
4914 (gen_expr_binop_rest): Likewise.
4915
4916 2017-07-13 Pedro Alves <palves@redhat.com>
4917
4918 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
4919 as default tdesc.
4920 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
4921 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
4922 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
4923 tdesc_amd64_linux as default tdesc. Get final tdesc from the
4924 tdep.
4925 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
4926 Get final tdesc from the tdep.
4927 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
4928 default tdesc.
4929 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4930 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4931 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
4932 Use it as default tdesc.
4933 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
4934 down to amd_init_abi. No longer handle fallback tdesc here.
4935 * amd64-tdep.h (tdesc_x32): Declare.
4936 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
4937 parameter.
4938 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
4939 as default tdesc.
4940
4941 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4942
4943 * s390-linux-tdep.c (s390_process_record): Add support for
4944 instructions new in arch12.
4945
4946 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4947
4948 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
4949 PT_GETFSBASE and PT_GETGSBASE.
4950 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
4951 PT_SETGSBASE.
4952
4953 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4954
4955 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
4956 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
4957 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
4958 those rules.
4959 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
4960 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
4961 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
4962 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
4963 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
4964 * features/i386/amd64.xml: Add 64bit-segments.xml.
4965 * features/i386/amd64-avx-avx512.c: Regenerated.
4966 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
4967 * features/i386/amd64-avx-mpx.c: Regenerated.
4968 * features/i386/amd64-avx.c: Regenerated.
4969 * features/i386/amd64-mpx.c: Regenerated.
4970 * features/i386/amd64.c: Regenerated.
4971 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
4972 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4973 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
4974 * regformats/i386/amd64-avx.dat: Regenerated.
4975 * regformats/i386/amd64-mpx.dat: Regenerated.
4976 * regformats/i386/amd64.dat: Regenerated.
4977
4978 2017-07-10 Yao Qi <yao.qi@linaro.org>
4979
4980 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4981 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4982
4983 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
4984
4985 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
4986 unsetenv.
4987 * gnulib/aclocal.m4: Regenerate.
4988 * gnulib/config.in: Regenerate.
4989 * gnulib/configure: Regenerate.
4990 * gnulib/import/Makefile.am: Regenerate.
4991 * gnulib/import/Makefile.in: Regenerate.
4992 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4993 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4994 * gnulib/import/m4/environ.m4: New file.
4995 * gnulib/import/m4/setenv.m4: New file.
4996 * gnulib/import/setenv.c: New file.
4997 * gnulib/import/unsetenv.c: New file.
4998
4999 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
5000
5001 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
5002 address when op is DW_OP_addr.
5003
5004 2017-07-09 Tom Tromey <tom@tromey.com>
5005
5006 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
5007 check and apply to outer type.
5008
5009 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5010
5011 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
5012 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
5013 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
5014 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
5015
5016 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5017
5018 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
5019
5020 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5021
5022 * corelow.c (get_core_siginfo): Remove.
5023 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
5024 instead of get_core_siginfo.
5025 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
5026 * gdbarch.h: Re-generate.
5027 * gdbarch.c: Re-generate.
5028 * linux-tdep.c (linux_core_xfer_siginfo): New.
5029 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
5030
5031 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5032
5033 * corelow.c (thread_section_name): Move to ...
5034 * gdbcore.h (thread_section_name): ... here.
5035
5036 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5037
5038 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
5039 (struct siginfo32): New.
5040 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
5041 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
5042 via ptrace(PT_LWPINFO).
5043
5044 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5045
5046 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
5047 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
5048 (fbsd_get_siginfo_type): New.
5049 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
5050 (_initialize_fbsd_tdep): New.
5051
5052 2017-07-06 David Blaikie <dblaikie@gmail.com>
5053
5054 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
5055 a singular dwo_unit*) to support multiple CUs in the same way that
5056 multiple TUs are supported.
5057 (create_cus_hash_table): Replace create_dwo_cu with a function for
5058 parsing multiple CUs from a DWO file.
5059 (open_and_init_dwo_file): Use create_cus_hash_table rather than
5060 create_dwo_cu.
5061 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
5062 htab_find, rather than comparing the signature to a singleton CU in
5063 the dwo_file.
5064
5065 2017-07-06 Pedro Alves <palves@redhat.com>
5066
5067 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
5068
5069 2017-07-04 Pedro Alves <palves@redhat.com>
5070
5071 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
5072 * gdbtypes.h (TYPE_STATIC): Delete.
5073 (struct fn_field) <is_public, is_abstract, is_static, is_final,
5074 is_synchronized, is_native>: Delete.
5075 <dummy>: Bump.
5076 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
5077 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
5078 (TYPE_FN_FIELD_ABSTRACT): Delete.
5079
5080 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
5081
5082 * buffer.h (buffer_finish): Fix spelling mistakes.
5083
5084 2017-07-01 Eli Zaretskii <eliz@gnu.org>
5085
5086 * .dir-locals.el: Automatically switch to C-style comments in
5087 versions of Emacs that support the feature.
5088
5089 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5090 Pedro Alves <palves@redhat.com>
5091
5092 PR cli/21688
5093 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5094 (process_next_line): New variable 'inline_cmd'.
5095 Adjust 'if' clauses for "python", "compile" and "guile" to use
5096 'command_name_equals' and check for '!inline_cmd'.
5097
5098 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5099
5100 PR cli/21688
5101 * cli/cli-script.c (command_name_equals_not_inline): New function.
5102 (process_next_line): Adjust 'if' clauses for "python", "compile"
5103 and "guile" to use command_name_equals_not_inline.
5104
5105 2017-06-29 Pedro Alves <palves@redhat.com>
5106
5107 * completer.c (expression_completer): Call
5108 linespec_location_completer instead of location_completer.
5109
5110 2017-06-29 Pedro Alves <palves@redhat.com>
5111
5112 * completer.c (expression_completer): Remove code that recomputes
5113 'text' from 'word'.
5114
5115 2017-06-29 Yao Qi <yao.qi@linaro.org>
5116
5117 * regformats/regdat.sh: Generate code with
5118 "ifndef IN_PROCESS_AGENT".
5119
5120 2017-06-28 Pedro Alves <palves@redhat.com>
5121
5122 * command.h: Include "common/scoped_restore.h".
5123
5124 2017-06-28 Yao Qi <yao.qi@linaro.org>
5125
5126 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5127 instead of obstack_grow.
5128
5129 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
5130
5131 PR gdb/21337
5132 * symfile.c (reread_symbols): Call objfiles_changed just before
5133 read_symbols.
5134
5135 2017-06-27 Pedro Alves <palves@redhat.com>
5136
5137 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5138 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5139 (completion_list_add_symbol, completion_list_add_msymbol):
5140 ... these new functions.
5141 (add_symtab_completions)
5142 (default_make_symbol_completion_list_break_on_1): Adjust.
5143
5144 2017-06-27 Pedro Alves <palves@redhat.com>
5145
5146 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5147 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
5148 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5149 dtor.
5150 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
5151 'storage_obstack' field an auto_obstack. In-class initialize all
5152 non-bitfield fields. Make minsyms_read bool.
5153 * symfile.c (read_symbols): Adjust.
5154
5155 2017-06-27 Alan Hayward <alan.hayward@arm.com>
5156
5157 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5158 (gdbsim_store_register): Likewise.
5159
5160 2017-06-27 Pedro Alves <palves@redhat.com>
5161
5162 * c-exp.y (name_obstack): Now an auto_obstack.
5163 (yylex): Use auto_obstack::clear.
5164 (c_parse): Use auto_obstack::clear instead of reinitializing and
5165 freeing the obstack.
5166 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5167 * d-exp.y (name_obstack): Now an auto_obstack.
5168 (yylex): Use auto_obstack::clear.
5169 (d_parse): Use auto_obstack::clear instead of reinitializing and
5170 freeing the obstack.
5171 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
5172 auto_obstack.
5173 * dwarf2read.c (create_addrmap_from_index)
5174 (dwarf2_build_psymtabs_hard)
5175 (update_enumeration_type_from_children): Likewise.
5176 * gdb_obstack.h (auto_obstack): New type.
5177 * go-exp.y (name_obstack): Now an auto_obstack.
5178 (build_packaged_name): Use auto_obstack::clear.
5179 (go_parse): Use auto_obstack::clear instead of reinitializing and
5180 freeing the obstack.
5181 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
5182 auto_obstack.
5183 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
5184 * rust-exp.y (work_obstack): Now an auto_obstack.
5185 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
5186 reinitializing and freeing the obstack.
5187 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
5188 (host_char_to_target): Use auto_obstack.
5189 * utils.h (make_cleanup_obstack_free): Delete declaration.
5190 * valprint.c (generic_emit_char, generic_printstr): Use
5191 auto_obstack.
5192
5193 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
5194
5195 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
5196 thread.
5197 (darwin_init_thread_list): Don't update dummy thread.
5198 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
5199
5200 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5201
5202 * record-full.c (netorder16): Remove.
5203
5204 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5205
5206 * common/diagnostics.h: Define macros for GCC.
5207 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
5208 * common/vec.h: Include diagnostics.h.
5209 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
5210 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
5211 warning.
5212
5213 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5214
5215 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5216 New macro.
5217 * ada-lex.l: Ignore deprecated register warnings.
5218
5219 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5220
5221 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5222 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5223
5224 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5225
5226 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5227 its own line.
5228
5229 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5230
5231 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5232
5233 2017-06-23 Alan Hayward <alan.hayward@arm.com>
5234
5235 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5236 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5237 (xtensa_register_read_masked): Likewise.
5238
5239 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
5240
5241 * common/environ.c (gdb_environ::unset): Update comment.
5242
5243 2017-06-22 Alan Hayward <alan.hayward@arm.com>
5244
5245 * python/py-unwind.c (pyuw_sniffer): Allocate space for
5246 registers.
5247
5248 2017-06-22 Alan Hayward <alan.hayward@arm.com>
5249
5250 * record-full.c (record_full_exec_insn): Use byte_vector.
5251
5252 2017-06-22 Yao Qi <yao.qi@linaro.org>
5253
5254 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5255 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5256
5257 2017-06-22 Alan Hayward <alan.hayward@arm.com>
5258
5259 * remote.c (cached_reg): Move from here...
5260 * regcache.h (cached_reg): ...to here.
5261 * python/py-unwind.c (struct reg_info): Remove.
5262 (cached_frame_info): Use cached_reg_t.
5263 (pyuw_prev_register): Likewise.
5264 (pyuw_sniffer): Use cached_reg_t and allocate registers.
5265 (pyuw_dealloc_cache): Free all registers.
5266
5267 2017-06-22 Pedro Alves <palves@redhat.com>
5268 Simon Marchi <simon.marchi@ericsson.com>
5269
5270 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5271 warning.
5272 * common/diagnostics.h: New file.
5273
5274 2017-06-22 Pedro Alves <palves@redhat.com>
5275
5276 * common/agent.h: Add include guards.
5277
5278 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
5279
5280 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
5281 talk about addressable units instead of bytes.
5282
5283 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5284
5285 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
5286 of '::const_iterator'.
5287
5288 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5289
5290 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5291 'unittests/environ-selftests.c'.
5292 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
5293 * charset.c (find_charset_names): Declare object 'iconv_env'.
5294 Update code to use 'iconv_env' object. Remove call to
5295 'free_environ'.
5296 * common/environ.c: Include <utility>.
5297 (make_environ): Delete function.
5298 (free_environ): Delete function.
5299 (gdb_environ::clear): New function.
5300 (gdb_environ::operator=): New function.
5301 (gdb_environ::get): Likewise.
5302 (environ_vector): Delete function.
5303 (set_in_environ): Delete function.
5304 (gdb_environ::set): New function.
5305 (unset_in_environ): Delete function.
5306 (gdb_environ::unset): New function.
5307 (gdb_environ::envp): Likewise.
5308 * common/environ.h: Include <vector>.
5309 (struct gdb_environ): Delete; transform into...
5310 (class gdb_environ): ... this class.
5311 (free_environ): Delete prototype.
5312 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
5313 environ_vector): Likewise.
5314 * infcmd.c (run_command_1): Update code to call
5315 'envp' from 'gdb_environ' class.
5316 (environment_info): Update code to call methods from 'gdb_environ'
5317 class.
5318 (unset_environment_command): Likewise.
5319 (path_info): Likewise.
5320 (path_command): Likewise.
5321 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
5322 (inferior::inferior): Initialize 'environment' using the host's
5323 information.
5324 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
5325 Include "environ.h".
5326 (class inferior) <environment>: Change type from 'struct
5327 gdb_environ' to 'gdb_environ'.
5328 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
5329 methods from 'gdb_environ' class.
5330 * solib.c (solib_find_1): Likewise
5331 * unittests/environ-selftests.c: New file.
5332
5333 2017-06-20 Yao Qi <yao.qi@linaro.org>
5334
5335 * features/i386/i386-linux.xml: Exchange the order of including
5336 32bit-linux.xml and 32bit-sse.xml.
5337 * features/i386/i386-linux.c: Regenerated.
5338
5339 2017-06-20 Yao Qi <yao.qi@linaro.org>
5340
5341 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
5342 Delete copy ctor and assignment operator.
5343 (tdesc_type): Likewise.
5344 (tdesc_feature): Likewise.
5345 (tdesc_free_reg): Remove.
5346 (tdesc_create_reg): Use new.
5347 (tdesc_free_type): Remove.
5348 (tdesc_create_vector): Use new.
5349 (tdesc_create_union): Likewise.
5350 (tdesc_create_flags): Likewise.
5351 (tdesc_create_enum): Likewise.
5352 (tdesc_free_feature): Delete.
5353 (free_target_description): Use delete.
5354
5355 2017-06-19 John Baldwin <jhb@FreeBSD.org>
5356
5357 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
5358 registers.
5359
5360 2017-06-19 Pedro Alves <palves@redhat.com>
5361
5362 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
5363 after gdb::unlinker.
5364
5365 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
5366
5367 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
5368 gdb_environ to access an environment variable.
5369
5370 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
5371
5372 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
5373 gdb_byte*.
5374
5375 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5376
5377 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
5378
5379 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5380
5381 * configure: Re-generate.
5382 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
5383
5384 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5385
5386 * configure: Re-generate.
5387 * warning.m4: Pass -Werror to compiler when checking for
5388 supported warning flags.
5389
5390 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5391
5392 * Makefile.in (COMPILE.pre): Add "-x c++".
5393
5394 2017-06-16 Alan Hayward <alan.hayward@arm.com>
5395 Pedro Alves <palves@redhat.com>
5396 Yao Qi <yao.qi@linaro.org>
5397
5398 * defs.h (RequireLongest): New.
5399 (extract_integer): Declare function template.
5400 (extract_signed_integer): Remove the declaration, but define it
5401 static inline.
5402 (extract_unsigned_integer): Likewise.
5403 (store_integer): Declare function template.
5404 (store_signed_integer): Remove the declaration, but define it
5405 static inline.
5406 (store_unsigned_integer): Likewise.
5407 * findvar.c (extract_integer): New function template.
5408 (extract_signed_integer): Remove.
5409 (extract_unsigned_integer): Remove.
5410 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
5411 instantiations.
5412 (store_integer): New function template.
5413 (store_signed_integer): Remove.
5414 (store_unsigned_integer): Remove.
5415 (store_integer): Explicit instantiations.
5416 * regcache.c (regcache_raw_read_signed): Update.
5417 (regcache::raw_read): New function.
5418 (regcache::raw_read_signed): Remove.
5419 (regcache::raw_read_unsigned): Remove.
5420 (regcache_raw_read_unsigned): Update.
5421 (regcache_raw_write_unsigned): Update.
5422 (regcache::raw_write_signed): Remove.
5423 (regcache::raw_write): New function.
5424 (regcache_cooked_read_signed): Update.
5425 (regcache::raw_write_unsigned): Remove.
5426 (regcache::cooked_read_signed): Remove.
5427 (regcache_cooked_read_unsigned): Update.
5428 (regcache::cooked_read_unsigned): Remove.
5429 (regcache_cooked_write_signed): Update.
5430 (regcache_cooked_write_unsigned): Update.
5431 * regcache.h (regcache) <raw_read_signed>: Remove.
5432 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
5433 <raw_read, raw_write>: New.
5434 <cooked_read_signed, cooked_write_signed>: Remove.
5435 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
5436 <cooked_read, cooked_write>: New.
5437 * sh64-tdep.c (sh64_pseudo_register_read): Update.
5438 (sh64_pseudo_register_write): Update.
5439
5440 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
5441
5442 * arc-tdep.c (arc_disassembler_options): New variable.
5443 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
5444 of default_print_insn.
5445 (arc_delayed_print_insn): Set info->section when needed,
5446 use default_print_insn to retrieve a disassembler.
5447
5448 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
5449
5450 PR gdb/21574
5451 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
5452 to mention $SHELL and startup-with-shell.
5453
5454 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
5455
5456 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
5457
5458 2017-06-14 Yao Qi <yao.qi@linaro.org>
5459
5460 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
5461 default_print_insn instead of print_insn_aarch64.
5462 * arm-tdep.c (gdb_print_insn_arm): Call
5463 default_print_insn instead of print_insn_big_arm
5464 and print_insn_little_arm.
5465 * i386-tdep.c (i386_print_insn): Call default_print_insn
5466 instead of print_insn_i386.
5467 * ia64-tdep.c (ia64_print_insn): Call
5468 default_print_insn instead of print_insn_ia64.
5469 * mips-tdep.c (gdb_print_insn_mips): Call
5470 default_print_insn instead of print_insn_big_mips
5471 and print_insn_little_mips.
5472 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
5473 instead of print_insn_spu.
5474
5475 2017-06-14 Pedro Alves <palves@redhat.com>
5476
5477 * ada-lang.c: Include "common/byte-vector.h".
5478 (ada_value_primitive_packed_val): Use gdb::byte_vector.
5479 * charset.c (wchar_iterator::iterate): Resize the vector instead
5480 of reserving it.
5481 * common/byte-vector.h: Include "common/def-vector.h".
5482 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
5483 * cli/cli-dump.c: Include "common/byte-vector.h".
5484 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
5485 * common/byte-vector.h: New file.
5486 * common/def-vector.h: New file.
5487 * common/default-init-alloc.h: New file.
5488 * dwarf2loc.c: Include "common/byte-vector.h".
5489 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
5490 instead of reserving it.
5491 * dwarf2read.c: Include "common/byte-vector.h".
5492 (data_buf::m_vec): Now a gdb::byte_vector.
5493 * gdb_regex.c: Include "common/def-vector.h".
5494 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
5495 * mi/mi-main.c: Include "common/byte-vector.h".
5496 (mi_cmd_data_read_memory): Use gdb::byte_vector.
5497 * printcmd.c: Include "common/byte-vector.h".
5498 (print_scalar_formatted): Use gdb::byte_vector.
5499 * valprint.c: Include "common/byte-vector.h".
5500 (maybe_negate_by_bytes, print_decimal_chars): Use
5501 gdb::byte_vector.
5502
5503 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5504
5505 * darwin-nat.c: Include "nat/fork-inferior.h".
5506
5507 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5508
5509 * configure.nat: Factor out Darwin bits that are not
5510 architecture-specific. Add fork-inferior.o.
5511
5512 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5513
5514 * configure.nat: Factor out AIX bits that are not
5515 architecture-specific. Add fork-inferior.o.
5516
5517 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5518
5519 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
5520 (read_pieced_value, write_pieced_value): ...here. Reduce to
5521 wrappers that just call rw_pieced_value.
5522
5523 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5524
5525 * dwarf2loc.c (write_pieced_value): When writing the data for a
5526 memory piece, use write_memory_with_notification instead of
5527 write_memory.
5528
5529 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5530
5531 * valops.c (read_value_memory): Change embedded_offset to
5532 represent a bit offset instead of a byte offset.
5533 * value.h (read_value_memory): Adjust comment.
5534
5535 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5536
5537 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
5538 dest_offset_bits and source_offset_bits.
5539 (write_pieced_value): Likewise.
5540
5541 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5542
5543 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
5544 given by DW_OP_bit_piece.
5545 (write_pieced_value): Likewise.
5546
5547 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5548
5549 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
5550 some other preparations to the places where sufficient information
5551 is available.
5552 (write_pieced_value): Likewise.
5553
5554 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5555
5556 * dwarf2loc.c (bits_to_bytes): New function.
5557 (read_pieced_value): Fix offset calculations for register pieces
5558 on big-endian targets.
5559 (write_pieced_value): Likewise.
5560
5561 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5562
5563 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
5564 (write_pieced_value): Likewise.
5565
5566 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5567
5568 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
5569 transfer the source value's least significant bits, instead of its
5570 lowest-addressed ones. Rename type_len to max_offset.
5571 (read_pieced_value): Mirror above changes to write_pieced_value as
5572 applicable.
5573
5574 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5575
5576 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
5577 truncate full bytes from dest_offset_bits before using it as an
5578 offset into the buffer.
5579
5580 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5581
5582 * dwarf2loc.c (write_pieced_value): Include transfer size in
5583 byte-wise check.
5584
5585 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5586
5587 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
5588 calculation of this_size.
5589
5590 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5591
5592 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
5593 when targeting a bit-field.
5594 (write_pieced_value): Likewise.
5595
5596 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5597
5598 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
5599 (allocate_piece_closure): Drop addr_size parameter.
5600 (dwarf2_evaluate_loc_desc_full): Adjust call to
5601 allocate_piece_closure.
5602
5603 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5604
5605 PR gdb/21226
5606 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
5607 the LSB end, independent of endianness.
5608
5609 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5610
5611 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
5612 size capping.
5613
5614 2017-06-13 Yao Qi <yao.qi@linaro.org>
5615
5616 * mips-linux-nat.c: Move include features/mips*-linux.c to
5617 mips-linux-tdep.c.
5618 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
5619 to mips-linux-tdep.c.
5620 * mips-linux-tdep.c: Include features/mips*-linux.c
5621 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
5622 functions.
5623 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
5624 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
5625 (tdesc_mips64_dsp_linux): Declare.
5626
5627 2017-06-12 Tom Tromey <tom@tromey.com>
5628
5629 * valprint.h (val_print_type_code_int): Remove.
5630 * valprint.c (generic_val_print_int): Always call
5631 val_print_scalar_formatted.
5632 (val_print_type_code_int): Remove.
5633 * printcmd.c (print_scalar_formatted): Handle options->format==0.
5634 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
5635 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
5636 * ada-valprint.c (ada_val_print_num): Use
5637 val_print_scalar_formatted.
5638
5639 2017-06-12 Tom Tromey <tom@tromey.com>
5640
5641 * printcmd.c (print_scalar_formatted): Unify the two switches.
5642 Don't convert scalars to LONGEST.
5643
5644 2017-06-12 Tom Tromey <tom@tromey.com>
5645
5646 PR exp/16225:
5647 * valprint.h (print_decimal_chars): Update.
5648 * valprint.c (maybe_negate_by_bytes): New function.
5649 (print_decimal_chars): Add "is_signed" argument.
5650 * printcmd.c (print_scalar_formatted): Update.
5651
5652 2017-06-12 Tom Tromey <tom@tromey.com>
5653
5654 PR exp/16225:
5655 * valprint.h (print_binary_chars, print_hex_chars): Update.
5656 * valprint.c (val_print_type_code_int): Update.
5657 (print_binary_chars): Add "zero_pad" argument.
5658 (emit_octal_digit): New function.
5659 (print_octal_chars): Don't zero-pad.
5660 (print_decimal_chars): Likewise.
5661 (print_hex_chars): Add "zero_pad" argument.
5662 * sh64-tdep.c (sh64_do_fp_register): Update.
5663 * regcache.c (regcache::dump): Update.
5664 * printcmd.c (print_scalar_formatted): Update.
5665 * infcmd.c (default_print_one_register_info): Update.
5666
5667 2017-06-12 Pedro Alves <palves@redhat.com>
5668 Alan Hayward <alan.hayward@arm.com>
5669
5670 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
5671 (mips_eabi_push_dummy_call): Rename local 'regsize' to
5672 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
5673 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
5674 Assert that abi_regsize bytes fit in 'ref_valbuf'.
5675
5676 2017-06-12 Pedro Alves <palves@redhat.com>
5677
5678 * dwarf2read.c (mapped_symtab::data): Now a vector of
5679 symtab_index_entry instead of vector of
5680 std::unique_ptr<symtab_index_entry>. All users adjusted to check
5681 whether an element's name is NULL instead of checking whether the
5682 element itself is NULL.
5683 (find_slot): Change return type. Adjust.
5684 (hash_expand, , add_index_entry, uniquify_cu_indices)
5685 (write_hash_table): Adjust.
5686
5687 2017-06-12 Pedro Alves <palves@redhat.com>
5688
5689 * dwarf2read.c (recursively_count_psymbols): New function.
5690 (write_psymtabs_to_index): Call it to compute number of psyms and
5691 pass estimate size of psyms_seen to unordered_set's ctor.
5692
5693 2017-06-12 Pedro Alves <palves@redhat.com>
5694
5695 * dwarf2read.c (write_hash_table): Check if key already exists
5696 before emplacing.
5697
5698 2017-06-12 Pedro Alves <palves@redhat.com>
5699
5700 * dwarf2read.c (data_buf::append_space): Rename to...
5701 (data_buf::grow): ... this, and make private. Adjust all callers.
5702 (data_buf::append_uint): New method.
5703 (add_address_entry, write_one_signatured_type)
5704 (write_psymtabs_to_index): Use it.
5705
5706 2017-06-12 Pedro Alves <palves@redhat.com>
5707
5708 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
5709 (file_write (FILE *, const std::vector<Elem>&)): Delete.
5710 (data_buf::file_write): Call ::fwrite directly.
5711
5712 2017-06-12 Pedro Alves <palves@redhat.com>
5713
5714 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
5715 std::vector::erase.
5716
5717 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5718
5719 Code cleanup: C++ify .gdb_index producer.
5720 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5721 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5722 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5723 (create_strtab, add_string): Remove.
5724 (file_write, data_buf): New.
5725 (struct symtab_index_entry): Use std::vector for cu_indices.
5726 (struct mapped_symtab): Use std::vector for data.
5727 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5728 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5729 Remove.
5730 (find_slot): Change return type. Update it to the new data structures.
5731 (hash_expand, add_index_entry): Update it to the new data structures.
5732 (offset_type_compare): Remove.
5733 (uniquify_cu_indices): Update it to the new data structures.
5734 (c_str_view, c_str_view_hasher, vector_hasher): New.
5735 (add_indices_to_cpool): Remove.
5736 (write_hash_table): Update it to the new data structures.
5737 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5738 (eq_psymtab_cu_index): Remove.
5739 (psym_index_map): New typedef.
5740 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5741 reference and std::unordered_map for cu_index_htab.
5742 (add_address_entry, add_address_entry_worker, write_address_map)
5743 (write_psymbols): Update it to the new data structures.
5744 (write_obstack): Remove.
5745 (struct signatured_type_index_data): Change types_list to a data_buf
5746 reference and psyms_seen to a std::unordered_set reference.
5747 (write_one_signatured_type, recursively_write_psymbols)
5748 (write_psymtabs_to_index): Update it to the new data structures.
5749
5750 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
5751
5752 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5753 separate-debug-file commands.
5754 * symfile.h (separate_debug_file_debug): New global.
5755 * symfile.c (separate_debug_file_debug): New global.
5756 (separate_debug_file_exists, find_separate_debug_file): Add
5757 debug output.
5758 (_initialize_symfile): Add "set debug separate-debug-file"
5759 command.
5760 * build-id.c (build_id_to_debug_bfd,
5761 find_separate_debug_file_by_buildid): Add debug output.
5762
5763 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5764
5765 * gdbarch.sh (displaced_step_free_closure): Remove.
5766 * gdbarch.h, gdbarch.c: Re-generate.
5767 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5768 displaced_step_free_closure.
5769 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5770 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5771 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5772 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5773 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5774 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5775 * arch-utils.h (simple_displaced_step_free_closure): Remove.
5776 * arch-utils.c (simple_displaced_step_free_closure): Remove.
5777 * infrun.c (displaced_step_clear): Call xfree instead of
5778 gdbarch_displaced_step_free_closure.
5779
5780 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
5781
5782 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5783 NULL".
5784
5785 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5786
5787 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5788 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5789 (mn10300_push_dummy_call): Likewise.
5790
5791 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5792
5793 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5794
5795 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5796
5797 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5798
5799 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5800
5801 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5802 able to start inferiors using a shell.
5803 (New remote packets): Announce new packet "QStartupWithShell".
5804 * remote.c: Add PACKET_QStartupWithShell.
5805 (extended_remote_create_inferior): Handle new
5806 PACKET_QStartupWithShell.
5807 (remote_protocol_features) <QStartupWithShell>: New entry for
5808 PACKET_QStartupWithShell.
5809 (_initialize_remote): Call "add_packet_config_cmd" for
5810 QStartupShell.
5811
5812 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5813 Pedro Alves <palves@redhat.com>
5814
5815 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
5816 and "nat/fork-inferior.h".
5817 * common/common-inferior.h: New file, with contents from
5818 "gdb/inferior.h".
5819 * commom/common-utils.c: Include "common-utils.h".
5820 (stringify_argv): New function.
5821 * common/common-utils.h (stringify_argv): New prototype.
5822 * configure.nat: Add "fork-inferior.o" as a dependency for
5823 "*linux*", "fbsd*" and "nbsd*" hosts.
5824 * corefile.c (get_exec_file): Update comment.
5825 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
5826 instead of "startup_inferior".
5827 (darwin_create_inferior): Call "add_thread_silent" after
5828 "fork_inferior".
5829 * fork-child.c: Cleanup unnecessary includes.
5830 (SHELL_FILE): Move to "common/common-fork-child.c".
5831 (environ): Likewise.
5832 (exec_wrapper): Initialize.
5833 (get_exec_wrapper): New function.
5834 (breakup_args): Move to "common/common-fork-child.c"; rename to
5835 "breakup_args_for_exec".
5836 (escape_bang_in_quoted_argument): Move to
5837 "common/common-fork-child.c".
5838 (saved_ui): New variable.
5839 (prefork_hook): New function.
5840 (postfork_hook): Likewise.
5841 (postfork_child_hook): Likewise.
5842 (gdb_startup_inferior): Likewise.
5843 (fork_inferior): Move to "common/common-fork-child.c". Update
5844 function to support gdbserver.
5845 (startup_inferior): Likewise.
5846 * gdbcore.h (get_exec_file): Remove declaration.
5847 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
5848 instead of "startup_inferior". Call "add_thread_silent" after
5849 "fork_inferior".
5850 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
5851 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
5852 instead of "startup_inferior". Call "add_thread_silent" after
5853 "fork_inferior".
5854 * inferior.h: Include "common-inferior.h".
5855 (trace_start_error): Move to "common/common-utils.h".
5856 (trace_start_error_with_name): Likewise.
5857 (fork_inferior): Move prototype to "nat/fork-inferior.h".
5858 (startup_inferior): Likewise.
5859 (gdb_startup_inferior): New prototype.
5860 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
5861 * nat/fork-inferior.h: New file.
5862 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
5863 instead of "startup_inferior". Call "add_thread_silent" after
5864 "fork_inferior".
5865 * target.h (target_terminal_init): Move prototype to
5866 "target/target.h".
5867 (target_terminal_inferior): Likewise.
5868 (target_terminal_ours): Likewise.
5869 * target/target.h (target_terminal_init): New prototype, moved
5870 from "target.h".
5871 (target_terminal_inferior): Likewise.
5872 (target_terminal_ours): Likewise.
5873 * utils.c (gdb_flush_out_err): New function.
5874
5875 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5876
5877 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
5878 * common/common-gdbthread.h: New file, with parts from
5879 "gdb/gdbthread.h".
5880 * gdbthread.h: Include "common-gdbthread.h".
5881 (switch_to_thread): Moved to "common/common-gdbthread.h".
5882
5883 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5884
5885 * Makefile.in (SFILES): Add "common/job-control.c".
5886 (HFILES_NO_SRCDIR): Add "common/job-control.h".
5887 (COMMON_OBS): Add "job-control.o".
5888 * common/job-control.c: New file, with contents from
5889 "gdb/inflow.c".
5890 * common/job-control.h: New file, with contents from "terminal.h".
5891 * fork-child.c: Include "job-control.h".
5892 * inflow.c: Include "job-control.h".
5893 (gdb_setpgid): Move to "common/common-inflow.c".
5894 (_initialize_inflow): Move setting of "job_control" to
5895 "handle_job_control".
5896 * terminal.h (job_control): Moved to "common/common-terminal.h".
5897 (gdb_setpgid): Likewise.
5898 * top.c: Include "job_control.h".
5899 * utils.c: Likewise.
5900 (job_control): Moved to "job-control.c".
5901
5902 2017-06-07 Pedro Alves <palves@redhat.com>
5903
5904 * Makefile.in (SFILES): Add gdb_regex.c.
5905 (COMMON_OBS): Add gdb_regex.o.
5906 * ada-lang.c (ada_add_standard_exceptions)
5907 (ada_add_exceptions_from_frame, name_matches_regex)
5908 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
5909 parameter type to compiled_regex. Adjust.
5910 (ada_exceptions_list): Use compiled_regex.
5911 * break-catch-throw.c (exception_catchpoint::pattern): Now a
5912 std::unique_ptr<compiled_regex>.
5913 (exception_catchpoint::~exception_catchpoint): Remove regfree
5914 call.
5915 (check_status_exception_catchpoint): Adjust to use compiled_regex.
5916 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
5917 * breakpoint.c (solib_catchpoint::compiled): Now a
5918 std::unique_ptr<compiled_regex>.
5919 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
5920 (check_status_catch_solib): Adjust to use compiled_regex.
5921 (add_solib_catchpoint): Adjust to use compiled_regex.
5922 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
5923 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
5924 compiled_regex reference. Adjust to use it.
5925 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
5926 declaration. Include "gdb_regex.h".
5927 (apropos_cmd): Change regex parameter to compiled_regex reference.
5928 * gdb_regex.c: New file.
5929 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
5930 declarations.
5931 (class compiled_regex): New.
5932 * linux-tdep.c: Include "common/gdb_optional.h".
5933 (struct mapping_regexes): New, factored out from
5934 mapping_is_anonymous_p, and adjusted to use compiled_regex.
5935 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
5936 gdb::optional and remove cleanups. Adjust to compiled_regex.
5937 * probe.c: Include "common/gdb_optional.h".
5938 (collect_probes): Use compiled_regex and gdb::optional and remove
5939 cleanups.
5940 * skip.c: Include "common/gdb_optional.h".
5941 (skiplist_entry::compiled_function_regexp): Now a
5942 gdb::optional<compiled_regex>.
5943 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
5944 (free_skiplist_entry): Remove regfree call.
5945 (compile_skip_regexp, skip_rfunction_p): Adjust to use
5946 compiled_regex and gdb::optional.
5947 * symtab.c: Include "common/gdb_optional.h".
5948 (search_symbols): Use compiled_regex and gdb::optional.
5949 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
5950 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
5951 to gdb_regex.c.
5952
5953 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5954
5955 * regcache.c (regcache::save): Avoid buffer use.
5956 (regcache::dump): Likewise.
5957
5958 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5959
5960 * sh-tdep.c (sh_pseudo_register_read): Remove
5961 MAX_REGISTER_SIZE.
5962 (sh_pseudo_register_write): Likewise.
5963 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
5964 (sh64_pseudo_register_write): Likewise
5965
5966 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5967
5968 * aarch64-tdep.c (aarch64_store_return_value): Use
5969 V_REGISTER_SIZE.
5970 (aarch64_pseudo_read_value): Likewise.
5971 (aarch64_pseudo_write): Likewise.
5972
5973 2017-06-06 Yao Qi <yao.qi@linaro.org>
5974
5975 * regformats/regdef.h (set_register_cache): Remove the
5976 declaration.
5977
5978 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5979
5980 * frame.c (frame_unwind_register_signed): Use
5981 frame_unwind_register_value.
5982
5983 2017-06-06 Pedro Alves <palves@redhat.com>
5984
5985 PR breakpoints/21553
5986 * breakpoint.c (create_breakpoints_sal_default)
5987 (init_breakpoint_sal, create_breakpoint_sal): Use
5988 gdb::unique_xmalloc_ptr for string parameters.
5989 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5990 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
5991 (base_breakpoint_create_breakpoints_sal)
5992 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
5993 (strace_marker_create_breakpoints_sal)
5994 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
5995 string parameters.
5996 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
5997 gdb::unique_xmalloc_ptr for string parameters.
5998 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5999 parameters.
6000
6001 2017-06-06 Alan Hayward <alan.hayward@arm.com>
6002
6003 * alpha-tdep.c (alpha_register_to_value): Use
6004 get_frame_register_value.
6005 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
6006
6007 2017-06-06 Alan Hayward <alan.hayward@arm.com>
6008
6009 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
6010 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
6011 (ia64_value_to_register): Likewise.
6012 (ia64_extract_return_value): Likewise.
6013 (ia64_store_return_value): Likewise.
6014 (ia64_push_dummy_call): Likewise.
6015
6016 2017-06-04 Joel Brobecker <brobecker@adacore.com>
6017
6018 GDB 8.0 released.
6019
6020 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
6021
6022 * x86-linux-nat.c (struct arch_lwp_info): Remove.
6023
6024 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
6025
6026 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
6027 parameter.
6028 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
6029
6030 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
6031
6032 * event-loop.c (poll_timers): Unallocate timer using delete
6033 instead of xfree.
6034
6035 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6036
6037 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
6038 (struct breakpoint) <~breakpoint>: New.
6039 (struct watchpoint): Inherit from breakpoint.
6040 <~watchpoint>: New.
6041 <base>: Remove.
6042 (struct tracepoint): Inherit from breakpoint.
6043 <base>: Remove.
6044 * breakpoint.c (longjmp_breakpoint_ops): Remove.
6045 (struct longjmp_breakpoint): Inherit from breakpoint.
6046 <~longjmp_breakpoint>: New.
6047 <base>: Remove.
6048 (new_breakpoint_from_type): Remove casts.
6049 (watchpoint_in_thread_scope): Remove reference to base field.
6050 (watchpoint_del_at_next_stop): Likewise.
6051 (update_watchpoint): Likewise.
6052 (watchpoint_check): Likewise.
6053 (bpstat_check_watchpoint): Likewise.
6054 (set_longjmp_breakpoint): Likewise.
6055 (struct fork_catchpoint): Inherit from breakpoint.
6056 <base>: Remove.
6057 (struct solib_catchpoint): Inherit from breakpoint.
6058 <~solib_catchpoint>: New.
6059 <base>: Remove.
6060 (dtor_catch_solib): Change to ...
6061 (solib_catchpoint::~solib_catchpoint): ... this.
6062 (breakpoint_hit_catch_solib): Remove reference to base field.
6063 (add_solib_catchpoint): Likewise.
6064 (create_fork_vfork_event_catchpoint): Likewise.
6065 (struct exec_catchpoint): Inherit from breakpoint.
6066 <~exec_catchpoint>: New.
6067 <base>: Remove.
6068 (dtor_catch_exec): Change to ...
6069 (exec_catchpoint::~exec_catchpoint): ... this.
6070 (dtor_watchpoint): Change to ...
6071 (watchpoint::~watchpoint): ... this.
6072 (watch_command_1): Remove reference to base field.
6073 (catch_exec_command_1): Likewise.
6074 (base_breakpoint_dtor): Change to ...
6075 (breakpoint::~breakpoint): ... this.
6076 (base_breakpoint_ops): Remove dtor field value.
6077 (longjmp_bkpt_dtor): Change to ...
6078 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
6079 (strace_marker_create_breakpoints_sal): Remove reference to base
6080 field.
6081 (delete_breakpoint): Don't manually call breakpoint destructor.
6082 (create_tracepoint_from_upload): Remove reference to base field.
6083 (trace_pass_set_count): Likewise.
6084 (initialize_breakpoint_ops): Don't initialize
6085 momentary_breakpoint_ops, don't set dtors.
6086 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6087 <~ada_catchpoint>: New.
6088 <base>: Remove.
6089 (create_excep_cond_exprs): Remove reference to base field.
6090 (dtor_exception): Change to ...
6091 (ada_catchpoint::~ada_catchpoint): ... this.
6092 (dtor_catch_exception): Remove.
6093 (dtor_catch_exception_unhandled): Remove.
6094 (dtor_catch_assert): Remove.
6095 (create_ada_exception_catchpoint): Remove reference to base
6096 field.
6097 (initialize_ada_catchpoint_ops): Don't set dtors.
6098 * break-catch-sig.c (struct signal_catchpoint): Inherit from
6099 breakpoint.
6100 <~signal_catchpoint>: New.
6101 <base>: Remove.
6102 (signal_catchpoint_dtor): Change to ...
6103 (signal_catchpoint::~signal_catchpoint): ... this.
6104 (create_signal_catchpoint): Remove reference to base field.
6105 (initialize_signal_catchpoint_ops): Don't set dtor.
6106 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6107 from breakpoint.
6108 <~syscall_catchpoint>: New.
6109 <base>: Remove.
6110 (dtor_catch_syscall): Change to ...
6111 (syscall_catchpoint::~syscall_catchpoint): ... this.
6112 (create_syscall_event_catchpoint): Remove reference to base
6113 field.
6114 (initialize_syscall_catchpoint_ops): Don't set dtor.
6115 * break-catch-throw.c (struct exception_catchpoint): Inherit
6116 from breakpoint.
6117 <~exception_catchpoint>: New.
6118 <base>: Remove.
6119 (dtor_exception_catchpoint): Change to ...
6120 (exception_catchpoint::~exception_catchpoint): ... this.
6121 (handle_gnu_v3_exceptions): Remove reference to base field.
6122 (initialize_throw_catchpoint_ops): Don't set dtor.
6123 * ctf.c (ctf_get_traceframe_address): Remove reference to base
6124 field.
6125 * remote.c (remote_get_tracepoint_status): Likewise.
6126 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6127 * tracefile.c (tracefile_fetch_registers): Likewise.
6128 * tracepoint.c (actions_command): Likewise.
6129 (validate_actionline): Likewise.
6130 (tfind_1): Likewise.
6131 (get_traceframe_location): Likewise.
6132 (find_matching_tracepoint_location): Likewise.
6133 (parse_tracepoint_status): Likewise.
6134 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6135
6136 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6137
6138 * breakpoint.c (struct longjmp_breakpoint): New struct.
6139 (is_tracepoint_type): Change return type to bool.
6140 (is_longjmp_type): New function.
6141 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6142 (set_raw_breakpoint_without_location): Use
6143 new_breakpoint_from_type.
6144 (set_raw_breakpoint): Likewise.
6145
6146 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6147
6148 * breakpoint.c (new_breakpoint_from_type): New function.
6149 (create_breakpoint_sal): Use new_breakpoint_from_type and
6150 unique_ptr.
6151 (create_breakpoint): Likewise.
6152
6153 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
6154
6155 * memattr.c (mem_info_command): Rename to ...
6156 (info_mem_command): ... this.
6157 (mem_enable_command): Rename to ...
6158 (enable_mem_command): ... this.
6159 (mem_disable_command): Rename to ...
6160 (disable_mem_command): ... this.
6161 (mem_delete_command): Rename to ...
6162 (delete_mem_command): ... this.
6163 (_initialize_mem): Adjust function names.
6164
6165 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6166
6167 * btrace.c (handle_pt_insn_events): New.
6168 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
6169 STATUS. Split into this and ...
6170 (handle_pt_insn_event_flags): ... this.
6171
6172 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6173
6174 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
6175 and struct pt_insn.resynced.
6176 * configure: Regenerated.
6177 * config.in: Regenerated.
6178
6179 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6180
6181 * btrace.c (ftrace_find_call_by_number): New function.
6182 (ftrace_new_function): Store objects, not pointers.
6183 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
6184 ftrace_new_gap, ftrace_update_function,
6185 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
6186 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
6187 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
6188 btrace_ends_with_single_insn, btrace_call_get): Account for
6189 btrace_thread_info::functions now storing objects.
6190 * btrace.h (struct btrace_thread_info): Add constructor.
6191 (struct btrace_thread_info) <functions>: Make std::vector.
6192 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
6193 Initialize with default values.
6194 * record-btrace.c (record_btrace_frame_sniffer): Account for
6195 btrace_thread_info::functions now storing objects.
6196
6197 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6198
6199 * btrace.c: Remove typedef bfun_s.
6200 (ftrace_new_gap): Directly add gaps to the list of gaps.
6201 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
6202 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
6203 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
6204 instead of gdb VEC.
6205
6206 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6207
6208 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
6209 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
6210 with btrace_thread_info::next_segment and
6211 btrace_thread_info::prev_segment.
6212 * btrace.h: Remove struct btrace_func_link.
6213 (struct btrace_function): Replace pair of function segment pointers
6214 with pair of indices.
6215 * python/py-record-btrace.c (btpy_call_prev_sibling,
6216 btpy_call_next_sibling): Replace references to
6217 btrace_thread_info::segment with btrace_thread_info::next_segment and
6218 btrace_thread_info::prev_segment.
6219 * record-btrace.c (record_btrace_frame_this_id): Use
6220 btrace_find_call_by_number.
6221
6222 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6223
6224 * btrace.c (ftrace_new_function, ftrace_fixup_level,
6225 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6226 btrace_insn_next, btrace_insn_prev): Remove references to
6227 btrace_thread_info::flow.
6228 * btrace.h (struct btrace_function): Remove FLOW.
6229
6230 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6231
6232 * btrace.c (ftrace_find_call_by_number): New function.
6233 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6234 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6235 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6236 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6237 index.
6238 * btrace.h (struct btrace_function): Turn UP into an index.
6239 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6240 as an index.
6241 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6242 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6243 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6244
6245 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6246
6247 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6248 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6249 ftrace_update_function, ftrace_compute_global_level_offset,
6250 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6251 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6252 btrace_insn_end, btrace_is_empty): Remove references to
6253 btrace_thread_info::begin and btrace_thread_info::end.
6254 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6255 (struct btrace_thread_info) <functions>: Adjust comment.
6256 * record-btrace.c (record_btrace_start_replaying): Remove reference to
6257 btrace_thread_info::begin.
6258
6259 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6260
6261 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6262 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6263 ftrace_update_function): Remove arguments that implicitly were always
6264 BTINFO->END.
6265 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6266 Don't pass BTINFO->END.
6267
6268 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6269
6270 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6271 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6272 btrace_find_insn_by_number): Replace function segment pointer with
6273 index.
6274 (btrace_insn_cmp): Simplify.
6275 * btrace.h: (struct btrace_insn_iterator) Rename index to
6276 insn_index. Replace function segment pointer with index into function
6277 segment vector.
6278 * record-btrace.c (record_btrace_call_history): Replace function
6279 segment pointer use with index.
6280 (record_btrace_frame_sniffer): Retrieve function call segment through
6281 vector.
6282 (record_btrace_set_replay): Remove defunc't safety check.
6283
6284 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6285
6286 * btrace.c (btrace_ends_with_single_insn): New function.
6287 (btrace_call_get, btrace_call_number, btrace_call_begin,
6288 btrace_call_end, btrace_call_next, btrace_call_prev,
6289 btrace_find_call_by_number): Use index into call segment vector
6290 instead of pointer.
6291 (btrace_call_cmp): Simplify.
6292 * btrace.h (struct btrace_call_iterator): Replace function call segment
6293 pointer with index into vector.
6294 * record-btrace.c (record_btrace_call_history): Use index instead of
6295 pointer.
6296
6297 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6298
6299 * btrace.c (btrace_insn_begin, btrace_insn_end,
6300 btrace_find_insn_by_number): Add btinfo to iterator.
6301 * btrace.h (struct btrace_insn_iterator): Add btinfo.
6302
6303 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6304
6305 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
6306 and save pointers directly.
6307 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
6308 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
6309 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
6310 changed signature of functions.
6311 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
6312 (btrace_fetch): Remove code that adds btrace_function pointers to
6313 vector of btrace_functions.
6314 (btrace_clear): Simplify freeing vector of btrace_functions.
6315
6316 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6317
6318 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
6319 Replace VEC_* with std::vector functions.
6320 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
6321 (struct btrace_thread_info)<functions>: Change type to std::vector.
6322
6323 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
6324
6325 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
6326 "Removed targets and native configurations" up. Merge duplicate
6327 "New commands" sub-sections. Add "New options" sub-sections.
6328
6329 2017-05-26 Alan Hayward <alan.hayward@arm.com>
6330
6331 * defs.h (copy_integer_to_size): New declaration.
6332 * findvar.c (copy_integer_to_size): New function.
6333 (do_cint_test): New selftest function.
6334 (copy_integer_to_size_test): Likewise.
6335 (_initialize_findvar): Likewise.
6336 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
6337 (mips_fbsd_collect_reg): Use raw_collect_integer.
6338 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
6339 (mips64_fill_gregset): Use raw_collect_integer
6340 (mips64_fill_fpregset): Use raw_supply_integer.
6341 * regcache.c (regcache::raw_supply_integer): New function.
6342 (regcache::raw_collect_integer): Likewise.
6343 * regcache.h: (regcache::raw_supply_integer): New declaration.
6344 (regcache::raw_collect_integer): Likewise.
6345
6346 2017-05-24 Yao Qi <yao.qi@linaro.org>
6347
6348 * Makefile.in (SFILES): Add gdbarch-selftests.c.
6349 (COMMON_OBS): Add gdbarch-selftests.o.
6350 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
6351 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
6352 * gdbarch-selftests.c: New file.
6353 * regcache.h (regcache) <~regcache>: Mark it virtual if
6354 GDB_SELF_TEST.
6355 <raw_write>: Likewise.
6356
6357 2017-05-24 Yao Qi <yao.qi@linaro.org>
6358
6359 * regcache.c (current_regcache): Change it to
6360 regcache::current_regcache.
6361 (regcache_observer_target_changed): Update.
6362 (regcache_thread_ptid_changed): Make it a regcache static
6363 method.
6364 (regcache_thread_ptid_changed): Update.
6365 (class regcache_access): New.
6366 (current_regcache_test): Update.
6367 (_initialize_regcache): Update.
6368 * regcache.h: Include forward_list.
6369 (regcache): Declare regcache_thread_ptid_changed and declare
6370 registers_changed_ptid as friend.
6371
6372 2017-05-24 Yao Qi <yao.qi@linaro.org>
6373
6374 * i387-tdep.c (i387_register_to_value): Use register_size
6375 instead of TYPE_LENGTH.
6376 * m68k-tdep.c (m68k_register_to_value): Likewise.
6377
6378 2017-05-24 Yao Qi <yao.qi@linaro.org>
6379
6380 * i387-tdep.c (i387_convert_register_p): Return false if type
6381 code isn't TYPE_CODE_FLT.
6382
6383 2017-05-24 Yao Qi <yao.qi@linaro.org>
6384
6385 * alpha-tdep.c (alpha_convert_register_p): Return true if type
6386 length is 4.
6387 (alpha_register_to_value): Remove type length check.
6388 (alpha_value_to_register): Likewise.
6389
6390 2017-05-24 Yao Qi <yao.qi@linaro.org>
6391
6392 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
6393 TYPE_CODE_FLT.
6394
6395 2017-05-24 Yao Qi <yao.qi@linaro.org>
6396
6397 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
6398 TYPE_CODE_FLT or not.
6399
6400 2017-05-24 Yao Qi <yao.qi@linaro.org>
6401
6402 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
6403 * avr-tdep.c (avr_gdbarch_init): Likewise.
6404 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6405 * cris-tdep.c (cris_gdbarch_init): Likewise.
6406 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6407 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6408 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6409 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
6410 * mep-tdep.c (mep_gdbarch_init): Likewise.
6411 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6412 * mips-tdep.c (mips_gdbarch_init): Likewise.
6413 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6414 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6415 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6416 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6417 * v850-tdep.c (v850_gdbarch_init): Likewise.
6418
6419 2017-05-24 Yao Qi <yao.qi@linaro.org>
6420
6421 * selftest-arch.c (tests_with_arch): Call registers_changed
6422 and reinit_frame_cache.
6423 * selftest.c (run_self_tests): Likewise.
6424
6425 2017-05-24 Yao Qi <yao.qi@linaro.org>
6426
6427 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
6428 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
6429
6430 2017-05-24 Yao Qi <yao.qi@linaro.org>
6431
6432 * rl78-tdep.c (rl78_gdbarch_init): Don't call
6433 set_gdbarch_print_insn.
6434
6435 2017-05-24 Yao Qi <yao.qi@linaro.org>
6436
6437 * h8300-tdep.c (h8300_gdbarch_init): Don't call
6438 set_gdbarch_print_insn.
6439
6440 2017-05-24 Yao Qi <yao.qi@linaro.org>
6441
6442 * alpha-tdep.c (alpha_gdbarch_init): Don't call
6443 set_gdbarch_print_insn.
6444 * arc-tdep.c (arc_gdbarch_init): Likewise.
6445 * arch-utils.c: include dis-asm.h.
6446 (default_print_insn): New function.
6447 * arch-utils.h (default_print_insn): Declare.
6448 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
6449 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6450 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
6451 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
6452 * frv-tdep.c (frv_gdbarch_init): Likewise.
6453 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6454 * gdbarch.sh (print_insn): Use default_print_insn.
6455 * gdbarch.c: Regenerated.
6456 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
6457 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
6458 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6459 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
6460 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6461 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
6462 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
6463 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
6464 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
6465 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6466 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6467 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6468 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6469 * mt-tdep.c (mt_gdbarch_init): Likewise.
6470 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6471 * nios2-tdep.c (nios2_print_insn): Remove.
6472 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
6473 * rx-tdep.c (rx_gdbarch_init): Likewise.
6474 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6475 * score-tdep.c (score_print_insn): Remove.
6476 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
6477 * sh-tdep.c (sh_gdbarch_init): Likewise.
6478 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6479 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6480 * tic6x-tdep.c (tic6x_print_insn): Remove.
6481 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
6482 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
6483 * v850-tdep.c (v850_gdbarch_init): Likewise.
6484 * vax-tdep.c (vax_gdbarch_init): Likewise.
6485 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6486 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
6487
6488 2017-05-23 John Baldwin <jhb@FreeBSD.org>
6489
6490 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
6491 (MIPS_FP0_REGNUM): Remove.
6492 (MIPS_FSR_REGNUM): Remove.
6493 (mips_fbsd_supply_fpregs): Use mips_regnum.
6494 (mips_fbsd_supply_gregs): Likewise.
6495 (mips_fbsd_collect_fpregs): Likewise.
6496 (mips_fbsd_collect_gregs): Likewise.
6497
6498 2017-05-23 John Baldwin <jhb@FreeBSD.org>
6499
6500 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
6501 (getpfpregs_supplies): New function.
6502 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
6503 getfpregs_supplies.
6504 (mips_fbsd_store_inferior_registers): Likewise.
6505
6506 2017-05-22 Pedro Alves <palves@redhat.com>
6507
6508 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
6509 maintainer.
6510
6511 2017-05-22 Alan Hayward <alan.hayward@arm.com>
6512
6513 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
6514 (store_register): Likewise.
6515 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
6516 (get_decimal_float_return_value): Likewise.
6517 (do_ppc_sysv_return_value): Likewise.
6518 (ppc64_sysv_abi_push_integer): Likewise.
6519 (ppc64_sysv_abi_push_freg): Likewise.
6520 (ppc64_sysv_abi_return_value_base): Likewise.
6521 (ppc64_sysv_abi_return_value): Likewise.
6522 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
6523 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
6524 * rs6000-nat.c: Likewise.
6525 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
6526 (rs6000_value_to_register): Likewise.
6527 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
6528
6529 2017-05-21 Tom Tromey <tom@tromey.com>
6530
6531 PR rust/21466:
6532 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
6533 arrays as "[T]", not "[T; ]".
6534
6535 2017-05-19 Tom Tromey <tom@tromey.com>
6536
6537 PR rust/21484:
6538 * rust-lang.c (exp_descriptor_rust): New function.
6539 (rust_language_defn): Use it.
6540 * p-lang.c (pascal_language_defn): Update.
6541 * opencl-lang.c (opencl_language_defn): Update.
6542 * objc-lang.c (objc_language_defn): Update.
6543 * m2-lang.c (m2_language_defn): Update.
6544 * language.h (struct language_defn)
6545 <la_watch_location_expression>: New member.
6546 * language.c (unknown_language_defn, auto_language_defn)
6547 (local_language_defn): Update.
6548 * go-lang.c (go_language_defn): Update.
6549 * f-lang.c (f_language_defn): Update.
6550 * d-lang.c (d_language_defn): Update.
6551 * c-lang.h (c_watch_location_expression): Declare.
6552 * c-lang.c (c_watch_location_expression): New function.
6553 (c_language_defn, cplus_language_defn, asm_language_defn)
6554 (minimal_language_defn): Use it.
6555 * breakpoint.c (watch_command_1): Call
6556 la_watch_location_expression.
6557 * ada-lang.c (ada_language_defn): Update.
6558
6559 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6560
6561 PR tui/21482
6562 * gdb_curses.h (NOMACROS): Define.
6563 (NCURSES_NOMACROS): Define.
6564
6565 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6566
6567 PR tui/21482
6568 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
6569 arg to char *.
6570 * tui/tui-wingeneral.c (box_win): Likewise.
6571 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
6572 (tui_show_source_line): Likewise.
6573 (tui_show_exec_info_content): Likewise.
6574
6575 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6576
6577 * sparc-tdep.c (sparc_structure_return_p)
6578 (sparc_arg_on_registers_p): New functions.
6579 (sparc32_store_arguments): Use them.
6580 * sparc64-tdep.c (sparc64_16_byte_align_p)
6581 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
6582 Handle TYPE_CODE_ARRAY.
6583
6584 2017-05-17 Yao Qi <yao.qi@linaro.org>
6585
6586 * cli/cli-decode.c (add_alias_cmd): New function.
6587 * command.h (add_alias_cmd): Declare.
6588 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
6589 instead call add_alias_cmd.
6590
6591 2017-05-17 Pedro Alves <palves@redhat.com>
6592
6593 * Makefile.in (nat_extra_makefile_frag): Rename to ...
6594 (nat_makefile_frag): ... this. All references updated.
6595 * configure.ac: Likewise.
6596 * configure.nat: Likewise. Enhance comments.
6597 * configure: Regenerate.
6598
6599 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6600
6601 * procfs.c (procfs_create_inferior): Change prototype to match
6602 definition.
6603
6604 2017-05-13 Eli Zaretskii <eliz@gnu.org>
6605
6606 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
6607 C++ compiler warning.
6608
6609 2017-05-12 Tom Tromey <tom@tromey.com>
6610
6611 PR rust/21483:
6612 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
6613 recurse, just call value_struct_elt directly.
6614
6615 2017-05-12 Tom Tromey <tom@tromey.com>
6616
6617 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
6618 OP_RUST_ARRAY>: Fix.
6619
6620 2017-05-12 Tom Tromey <tom@tromey.com>
6621
6622 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
6623
6624 2017-05-09 Yao Qi <yao.qi@linaro.org>
6625
6626 * regcache.c: Include <forward_list>.
6627 (struct regcache_list): Remove.
6628 (current_regcache): Update.
6629 (get_thread_arch_aspace_regcache): Update for std::forward_list.
6630 (regcache_thread_ptid_changed): Likewise.
6631 (registers_changed_ptid): Likewise.
6632 (current_regcache_size): Likewise.
6633
6634 2017-05-09 Yao Qi <yao.qi@linaro.org>
6635
6636 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
6637 (current_regcache_size): New function.
6638 (current_regcache_test): New function.
6639 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
6640
6641 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6642
6643 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
6644 (print_gp_register_row): Use get_frame_register_value.
6645
6646 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6647
6648 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
6649 (mips_supply_fpregset): Likewise.
6650 (mips64_supply_gregset): Likewise.
6651
6652 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6653
6654 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
6655 regcache->raw_supply_zeroed.
6656
6657 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6658
6659 * configure.nat: Rearrange 'case' statements to match
6660 host before cpu.
6661
6662 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6663
6664 * Makefile.in: Remove "@host_makefile_frag@". Add variables
6665 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
6666 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
6667 "@nat_extra_makefile_frag@".
6668 (Makefile): Remove dependency on "@frags@".
6669 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
6670 (data-directory/Makefile): Likewise.
6671 * config/aarch64/linux.mh: Deleted; moved contents to
6672 "gdb/configure.nat".
6673 * config/alpha/alpha-linux.mh: Likewise.
6674 * config/alpha/nbsd.mh: Likewise.
6675 * config/arm/linux.mh: Likewise.
6676 * config/arm/nbsdelf.mh: Likewise.
6677 * config/i386/cygwin.mh: Likewise.
6678 * config/i386/cygwin64.mh: Likewise.
6679 * config/i386/darwin.mh: Likewise.
6680 * config/i386/fbsd.mh: Likewise.
6681 * config/i386/fbsd64.mh: Likewise.
6682 * config/i386/go32.mh: Likewise.
6683 * config/i386/i386gnu.mh: Likewise.
6684 * config/i386/i386sol2.mh: Likewise.
6685 * config/i386/linux.mh: Likewise.
6686 * config/i386/linux64.mh: Likewise.
6687 * config/i386/mingw.mh: Likewise.
6688 * config/i386/mingw64.mh: Likewise.
6689 * config/i386/nbsd64.mh: Likewise.
6690 * config/i386/nbsdelf.mh: Likewise.
6691 * config/i386/nto.mh: Likewise.
6692 * config/i386/obsd.mh: Likewise.
6693 * config/i386/obsd64.mh: Likewise.
6694 * config/i386/sol2-64.mh: Likewise.
6695 * config/ia64/linux.mh: Likewise.
6696 * config/m32r/linux.mh: Likewise.
6697 * config/m68k/linux.mh: Likewise.
6698 * config/m68k/nbsdelf.mh: Likewise.
6699 * config/m68k/obsd.mh: Likewise.
6700 * config/m88k/obsd.mh: Likewise.
6701 * config/mips/fbsd.mh: Likewise.
6702 * config/mips/linux.mh: Likewise.
6703 * config/mips/nbsd.mh: Likewise.
6704 * config/mips/obsd64.mh: Likewise.
6705 * config/pa/linux.mh: Likewise.
6706 * config/pa/nbsd.mh: Likewise.
6707 * config/pa/obsd.mh: Likewise.
6708 * config/powerpc/aix.mh: Likewise.
6709 * config/powerpc/fbsd.mh: Likewise.
6710 * config/powerpc/linux.mh: Likewise.
6711 * config/powerpc/nbsd.mh: Likewise.
6712 * config/powerpc/obsd.mh: Likewise.
6713 * config/powerpc/ppc64-linux.mh: Likewise.
6714 * config/powerpc/spu-linux.mh: Likewise.
6715 * config/s390/linux.mh: Likewise.
6716 * config/sh/nbsd.mh: Likewise.
6717 * config/sparc/fbsd.mh: Likewise.
6718 * config/sparc/linux.mh: Likewise.
6719 * config/sparc/linux64.mh: Likewise.
6720 * config/sparc/nbsd64.mh: Likewise.
6721 * config/sparc/nbsdelf.mh: Likewise.
6722 * config/sparc/obsd64.mh: Likewise.
6723 * config/sparc/sol2.mh: Likewise.
6724 * config/tilegx/linux.mh: Likewise.
6725 * config/vax/nbsdelf.mh: Likewise.
6726 * config/vax/obsd.mh: Likewise.
6727 * config/xtensa/linux.mh: Likewise.
6728 * config/i386/i386gnu.mn: New file, with excerpts from
6729 "config/i386/i386gnu.mh".
6730 * configure: Regenerate.
6731 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6732 *.mh files under "gdb/config".
6733 * configure.nat: New file, with contents from the
6734 "gdb/config/*/*.mh" files.
6735
6736 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
6737
6738 * btrace.c (btrace_clear): Free insn vector.
6739
6740 2017-05-05 Pedro Alves <palves@redhat.com>
6741
6742 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6743 * configure: Regenerate.
6744
6745 2017-05-04 Pedro Alves <palves@redhat.com>
6746
6747 * Makefile.in (SFILES): Add progspace-and-thread.c.
6748 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6749 (COMMON_OBS): Add progspace-and-thread.o.
6750 * breakpoint.c: Include "progspace-and-thread.h".
6751 (update_inserted_breakpoint_locations)
6752 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6753 Use scoped_restore_current_pspace_and_thread.
6754 (create_std_terminate_master_breakpoint): Use
6755 scoped_restore_current_program_space.
6756 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6757 (print_breakpoint_location): Use
6758 scoped_restore_current_program_space.
6759 (bp_loc_is_permanent): Use
6760 scoped_restore_current_pspace_and_thread.
6761 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6762 (download_tracepoint_locations): Use
6763 scoped_restore_current_pspace_and_thread.
6764 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6765 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6766 (enum step_over_calls_kind): Moved from inferior.h.
6767 (class scoped_restore_current_thread): New class.
6768 * gdbthread.h (make_cleanup_restore_current_thread): Delete
6769 declaration.
6770 (scoped_restore_current_thread): New class.
6771 * infcmd.c: Include "common/gdb_optional.h".
6772 (continue_1, proceed_after_attach): Use
6773 scoped_restore_current_thread.
6774 (notice_new_inferior): Use scoped_restore_current_thread.
6775 * inferior.c: Include "progspace-and-thread.h".
6776 (restore_inferior, save_current_inferior): Delete.
6777 (add_inferior_command, clone_inferior_command): Use
6778 scoped_restore_current_pspace_and_thread.
6779 * inferior.h (scoped_restore_current_inferior): New class.
6780 * infrun.c: Include "progspace-and-thread.h" and
6781 "common/gdb_optional.h".
6782 (follow_fork_inferior): Use
6783 scoped_restore_current_pspace_and_thread.
6784 (scoped_restore_exited_inferior): New class.
6785 (handle_vfork_child_exec_or_exit): Use
6786 scoped_restore_exited_inferior,
6787 scoped_restore_current_pspace_and_thread,
6788 scoped_restore_current_thread and scoped_restore.
6789 (fetch_inferior_event): Use scoped_restore_current_thread.
6790 * linespec.c (decode_line_full, decode_line_1): Use
6791 scoped_restore_current_program_space.
6792 * mi/mi-main.c: Include "progspace-and-thread.h".
6793 (exec_continue): Use scoped_restore_current_thread.
6794 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6795 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6796 * proc-service.c (ps_pglobal_lookup): Use
6797 scoped_restore_current_program_space.
6798 * progspace-and-thread.c: New file.
6799 * progspace-and-thread.h: New file.
6800 * progspace.c (release_program_space, clone_program_space): Use
6801 scoped_restore_current_program_space.
6802 (restore_program_space, save_current_program_space)
6803 (save_current_space_and_thread): Delete.
6804 (switch_to_program_space_and_thread): Moved to
6805 progspace-and-thread.c.
6806 * progspace.h (save_current_program_space)
6807 (save_current_space_and_thread): Delete declarations.
6808 (scoped_restore_current_program_space): New class.
6809 * remote.c (remote_btrace_maybe_reopen): Use
6810 scoped_restore_current_thread.
6811 * symtab.c: Include "progspace-and-thread.h".
6812 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
6813 * thread.c (print_thread_info_1): Use
6814 scoped_restore_current_thread.
6815 (struct current_thread_cleanup): Delete.
6816 (do_restore_current_thread_cleanup)
6817 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
6818 (scoped_restore_current_thread::~scoped_restore_current_thread):
6819 ... this new dtor.
6820 (make_cleanup_restore_current_thread): Rename/convert to ...
6821 (scoped_restore_current_thread::scoped_restore_current_thread):
6822 ... this new ctor.
6823 (thread_apply_all_command): Use scoped_restore_current_thread.
6824 (thread_apply_command): Use scoped_restore_current_thread.
6825 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
6826 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
6827
6828 2017-05-04 Pedro Alves <palves@redhat.com>
6829
6830 * thread.c (make_cleanup_restore_current_thread): Move
6831 find_thread_ptid call before the is_stopped call. Assert that the
6832 thread is found. Replace is_stopped call by checking the thread's
6833 state directly. Remove unnecessary NULL-thread check.
6834
6835 2017-05-04 Pedro Alves <palves@redhat.com>
6836
6837 * corelow.c (thread_section_name): New class.
6838 (get_core_register_section, get_core_siginfo): Use it.
6839
6840 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
6841
6842 * corelow.c (sniff_core_bfd): Remove extra semicolon.
6843 (get_core_register_section): Remove xfree of NULL pointer.
6844
6845 2017-05-03 Alan Hayward <alan.hayward@arm.com>
6846
6847 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
6848 * regcache.c (regcache::raw_supply_zeroed): New function.
6849 * regcache.h (regcache::raw_supply_zeroed): New declaration.
6850
6851 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
6852
6853 * gdbarch.sh: Remove commented out definition of
6854 TARGET_CHAR_BIT.
6855 * gdbarch.h: Re-generate.
6856
6857 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6858
6859 * configure: Regenerate.
6860
6861 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
6862
6863 * solib-target.c (solib_target_relocate_section_addresses):
6864 Remove num_section_bases, num_bases, segment_bases variables.
6865
6866 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6867
6868 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
6869
6870 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6871
6872 * solib-target.c: Include <vector>
6873 (struct lm_info_target) <~lm_info_target>: Remove.
6874 <segment_bases, section_bases>: Change type to
6875 std::vector<CORE_ADDR>.
6876 (library_list_start_segment, library_list_start_section,
6877 library_list_end_library,
6878 solib_target_relocate_section_addresses): Adjust.
6879
6880 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6881
6882 * gdbarch.sh (software_single_step): Change return type to
6883 std::vector<CORE_ADDR>.
6884 * gdbarch.c, gdbarch.h: Re-generate.
6885 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
6886 Adjust.
6887 (arm_deal_with_atomic_sequence_raw): Adjust.
6888 (thumb_get_next_pcs_raw): Adjust.
6889 (arm_get_next_pcs_raw): Adjust.
6890 (arm_get_next_pcs): Adjust.
6891 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
6892 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
6893 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
6894 (alpha_software_single_step): Adjust.
6895 * alpha-tdep.h (alpha_software_single_step): Adjust.
6896 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
6897 * arm-tdep.c (arm_software_single_step): Adjust.
6898 (arm_breakpoint_kind_from_current_state): Adjust.
6899 * arm-tdep.h (arm_software_single_step): Adjust.
6900 * breakpoint.c (insert_single_step_breakpoint): Adjust.
6901 * cris-tdep.c (cris_software_single_step): Adjust.
6902 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
6903 (micromips_deal_with_atomic_sequence): Adjust.
6904 (deal_with_atomic_sequence): Adjust.
6905 (mips_software_single_step): Adjust.
6906 * mips-tdep.h (mips_software_single_step): Adjust.
6907 * moxie-tdep.c (moxie_software_single_step): Adjust.
6908 * nios2-tdep.c (nios2_software_single_step): Adjust.
6909 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
6910 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
6911 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
6912 * s390-linux-tdep.c (s390_software_single_step): Adjust.
6913 * sparc-tdep.c (sparc_software_single_step): Adjust.
6914 * spu-tdep.c (spu_software_single_step): Adjust.
6915 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
6916
6917 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6918
6919 * gdbarch.sh: Use semi-colon as field separator instead of colon.
6920 * gdbarch.h: Re-generate.
6921
6922 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6923
6924 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
6925 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
6926 * python/py-instruction.c, python/py-instruction.h: New file.
6927 * python/py-record.c: Add py-instruction.h include.
6928 (gdbpy_initialize_record): Make gdb.Instruction a super class of
6929 gdb.RecordInstruction.
6930 * python/python-internal.h: Add gdbpy_initialize_instruction
6931 declaration.
6932 * python/python.c (do_start_initialization): Add
6933 gdbpy_initialize_instruction.
6934
6935 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6936
6937 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
6938 Remove.
6939 (btrace_func_from_recpy_func): New function.
6940 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
6941 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
6942 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
6943 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
6944 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
6945 Also, use new helper functions.
6946 (btpy_list_item): Use new helper functions.
6947 (recpy_bt_function_call_history): Use new type name.
6948 (btpy_call_getset): Remove.
6949 (gdbpy_initialize_btrace): Remove code to initialize
6950 gdb.BtraceFunctionCall.
6951 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
6952 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
6953 recpy_bt_func_prev, recpy_bt_func_next): New export.
6954 * python/py-record.c (recpy_func_type): New static object.
6955 (recpy_func_new, recpy_func_level, recpy_func_symbol,
6956 recpy_func_instructions, recpy_func_up, recpy_func_prev,
6957 recpy_func_next): New function.
6958 (recpy_element_hash, recpy_element_richcompare): Updated comment.
6959 (recpy_func_getset): New static object.
6960 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
6961 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
6962
6963 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6964
6965 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
6966 (btpy_object, btpy_insn_type, btpy_new): Remove.
6967 (btpy_list_object): Use gdb.RecordInstruction type instead of
6968 gdb.BtraceInstruction type.
6969 (btrace_insn_from_recpy_insn): New function.
6970 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
6971 btpy_new.
6972 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
6973 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
6974 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
6975 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
6976 instead of btpy_object.
6977 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6978 btpy_insn_data, btpy_insn_decode): Rename to ...
6979 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
6980 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
6981 recpy_bt_insn_decode): This. Also, use new helper functions.
6982 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
6983 recpy_insn_type.
6984 (btpy_insn_getset): Remove.
6985 (gdbpy_initialize_btrace): Remove code to initialize
6986 gdb.BtraceInstruction. Use recpy_element_object.
6987 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
6988 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
6989 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
6990 * python/py-record.c (recpy_insn_type): New static object.
6991 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
6992 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
6993 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
6994 New function.
6995 (recpy_insn_getset): New static object.
6996 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
6997 * python/py-record.h (recpy_element_object): New typedef.
6998 (recpy_insn_type, recpy_insn_new): New export.
6999
7000 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7001
7002 * py-record-btrace.c (btpy_insn_new): Removed.
7003 (btpy_insn_or_gap_new): New function.
7004 (btpy_insn_error): Removed.
7005 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7006 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
7007 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
7008 btpy_insn_or_gap_new instead of btpy_insn_new.
7009 (btpy_insn_getset): Remove btpy_insn_error.
7010 * py-record.c (recpy_gap_type): New static object.
7011 (recpy_gap_object): New typedef.
7012 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
7013 recpy_gap_reason_string): New function.
7014 (recpy_gap_getset): New static object.
7015 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
7016 * py-record.h (recpy_gap_new): New export.
7017
7018 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7019
7020 * python/py-record.c (recpy_ptid): Remove.
7021 (recpy_record_getset): Remove recpy_ptid.
7022
7023 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7024
7025 * btrace.c (btrace_fetch): Set inferior_ptid.
7026 * python/py-record-btrace.c: Add "py-record.h" include.
7027 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
7028 recpy_bt_end, recpy_bt_instruction_history,
7029 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
7030 in gdb.Record object instead of current ptid.
7031 * python/py-record.c: Include new "py-record.h" file.
7032 (recpy_record_object): Moved to py-record.h.
7033 * python/py-record.h: New file.
7034
7035 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
7036
7037 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
7038 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
7039 indentation.
7040
7041 2017-05-01 Joel Brobecker <brobecker@adacore.com>
7042
7043 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
7044 the past maintainers section.
7045
7046 2017-04-28 Yao Qi <yao.qi@linaro.org>
7047
7048 * infcmd.c (get_return_value): Use regcache ctor, and remove
7049 cleanup.
7050
7051 2017-04-28 Yao Qi <yao.qi@linaro.org>
7052 Pedro Alves <palves@redhat.com>
7053
7054 * regcache.c (regcache::regcache): New tag dispatch ctor.
7055 (do_cooked_read): Moved above.
7056 (regcache_dup): Use the tag dispatch ctor..
7057 * regcache.h (regcache): Declare ctor, delete copy ctor and
7058 assignment operator, remove friend regcache_dup.
7059
7060 2017-04-28 Yao Qi <yao.qi@linaro.org>
7061
7062 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
7063 call method save instead of regcache_cpy.
7064 * regcache.h (struct regcache): Make regcache_dup a friend.
7065
7066 2017-04-28 Yao Qi <yao.qi@linaro.org>
7067
7068 * regcache.c (struct regcache): Move to regcache.h
7069 (regcache::arch): New method.
7070 (regcache_get_ptid): Update.
7071 (get_regcache_arch): Call arch method.
7072 (get_regcache_aspace): Call method aspace.
7073 (register_buffer): Change it to method.
7074 (regcache_save): Change it to regcache::save.
7075 (regcache_restore): Likewise.
7076 (regcache_cpy_no_passthrough): Remove the declaration.
7077 (regcache_cpy): Call methods restore and cpy_no_passthrough.
7078 (regcache_cpy_no_passthrough): Change it to method
7079 cpy_no_passthrough.
7080 (regcache_register_status): Change it to method
7081 get_register_status.
7082 (regcache_invalidate): Change it to method invalidate.
7083 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
7084 (regcache_raw_update): Change it to method raw_update.
7085 (regcache_raw_read): Likewise.
7086 (regcache_raw_read_signed): Likewise.
7087 (regcache_raw_read_unsigned): Likewise.
7088 (regcache_raw_write_signed): Likewise.
7089 (regcache_raw_write_unsigned): Likewise.
7090 (regcache_cooked_read): Likewise.
7091 (regcache_cooked_read_value): Likewise.
7092 (regcache_cooked_read_signed): Likewise.
7093 (regcache_cooked_read_unsigned): Likewise.
7094 (regcache_cooked_write_signed): Likewise.
7095 (regcache_cooked_write_unsigned): Likewise.
7096 (regcache_raw_set_cached_value): Likewise.
7097 (regcache_raw_write): Likewise.
7098 (regcache_cooked_write): Likewise.
7099 (regcache_xfer_part): Likewise.
7100 (regcache_raw_read_part): Likewise.
7101 (regcache_raw_write_part): Likewise.
7102 (regcache_cooked_read_part): Likewise.
7103 (regcache_cooked_write_part): Likewise.
7104 (regcache_raw_supply): Likewise.
7105 (regcache_raw_collect): Likewise.
7106 (regcache_transfer_regset): Likewise.
7107 (regcache_supply_regset): Likewise.
7108 (regcache_collect_regset): Likewise.
7109 (regcache_debug_print_register): Likewise.
7110 (enum regcache_dump_what): Move it to regcache.h.
7111 (regcache_dump): Change it to method dump.
7112 * regcache.h (enum regcache_dump_what): New.
7113 (class regcache): New.
7114 * target.c (target_fetch_registers): Call method
7115 debug_print_register.
7116 (target_store_registers): Likewise.
7117
7118 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7119
7120 * windows-nat.c (struct lm_info_windows): Initialize field.
7121 (windows_make_so): Allocate lm_info_windows with new.
7122 (windows_free_so): Free lm_info_windows with delete.
7123
7124 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7125
7126 * solib-darwin.c (struct lm_info_darwin): Initialize field.
7127 (darwin_current_sos): Allocate lm_info_darwin with new, remove
7128 cleanup.
7129 (darwin_free_so): Free lm_info_darwin with delete.
7130
7131 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7132
7133 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7134 <l_addr_p>: Change type to bool.
7135 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7136 (svr4_free_so): Free lm_info_svr4 with delete.
7137 (svr4_copy_library_list): Replace memcpy with call to copy
7138 constructor.
7139 (library_list_start_library, svr4_default_sos): Allocate
7140 lm_info_svr4 with new.
7141
7142 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7143
7144 * solib-target.c (struct lm_info_target): Add destructor,
7145 initialize fields.
7146 <name>: Change type to std::string.
7147 (library_list_start_library): Allocate lm_info_target with new.
7148 (solib_target_free_library_list): Free lm_info_target with
7149 delete.
7150 (solib_target_current_sos): Adapt to std::string.
7151 (solib_target_free_so): Free lm_info_target with delete.
7152
7153 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7154
7155 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7156 fields.
7157 (frv_current_sos): Allocate lm_info_frv with new.
7158 (frv_relocate_main_executable): Free lm_info_frv with delete,
7159 allocate with new.
7160 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7161
7162 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7163
7164 * solib-frv.c (struct lm_info_frv): Fix indentation.
7165
7166 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7167
7168 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7169 map field.
7170 (dsbt_current_sos): Allocate lm_info_dsbt with new.
7171 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
7172 and allocate with new.
7173 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
7174
7175 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7176
7177 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
7178 <filename, member_name>: Change type to std::string.
7179 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
7180 (library_list_start_library): Allocate lm_info_aix with new.
7181 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
7182 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
7183 with copy constructor.
7184
7185 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7186
7187 * solist.h (struct lm_info): Remove.
7188 (struct lm_info_base): New class.
7189 (struct so_list) <lm_info>: Change type to lm_info_base *.
7190 * nto-tdep.c (struct lm_info): Remove.
7191 (lm_addr): Adjust.
7192 * solib-aix.c (struct lm_info): Rename to ...
7193 (struct lm_info_aix): ... this. Extend lm_info_base.
7194 (lm_info_p): Rename to ...
7195 (lm_info_aix_p): ... this, and adjust.
7196 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
7197 solib_aix_parse_libraries, library_list_start_library,
7198 solib_aix_free_library_list, solib_aix_parse_libraries,
7199 solib_aix_get_library_list,
7200 solib_aix_relocate_section_addresses, solib_aix_free_so,
7201 solib_aix_get_section_offsets,
7202 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
7203 Adjust.
7204 (struct solib_aix_inferior_data) <library_list>: Adjust.
7205 * solib-darwin.c (struct lm_info): Rename to ...
7206 (struct lm_info_darwin): ... this. Extend lm_info_base.
7207 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
7208 * solib-dsbt.c (struct lm_info): Rename to ...
7209 (struct lm_info_dsbt): ... this. Extend lm_info_base.
7210 (struct dsbt_info) <main_executable_lm_info): Adjust.
7211 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
7212 dsbt_relocate_section_addresses): Adjust.
7213 * solib-frv.c (struct lm_info): Rename to ...
7214 (struct lm_info_frv): ... this. Extend lm_info_base.
7215 (main_executable_lm_info): Adjust.
7216 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7217 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7218 find_canonical_descriptor_in_load_object,
7219 frv_fdpic_find_canonical_descriptor): Adjust.
7220 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7221 to lm_info_svr4.
7222 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7223 svr4_clear_so, svr4_copy_library_list,
7224 library_list_start_library, svr4_default_sos, svr4_read_so_list,
7225 svr4_current_sos, svr4_fetch_objfile_link_map,
7226 solist_update_incremental): Adjust.
7227 * solib-svr4.h (struct lm_info_svr4): Move here from
7228 solib-svr4.c.
7229 * solib-target.c (struct lm_info): Rename to ...
7230 (struct lm_info_target): ... this. Extend lm_info_base.
7231 (lm_info_p): Rename to ...
7232 (lm_info_target_p): ... this.
7233 (solib_target_parse_libraries, library_list_start_segment,
7234 library_list_start_section, library_list_start_library,
7235 library_list_end_library, solib_target_free_library_list,
7236 solib_target_current_sos, solib_target_free_so,
7237 solib_target_relocate_section_addresses): Adjust.
7238 * windows-nat.c (struct lm_info): Rename to ...
7239 (struct lm_info_windows): ... this. Extend lm_info_base.
7240 (windows_make_so, handle_load_dll, handle_unload_dll,
7241 windows_xfer_shared_libraries): Adjust.
7242
7243 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7244
7245 * solib-darwin.c (struct darwin_so_list): Remove.
7246 (darwin_current_sos): Allocate an so_list object instead of a
7247 darwin_so_list, separately allocate an lm_info object.
7248 (darwin_free_so): Free lm_info.
7249
7250 2017-04-28 John Baldwin <jhb@FreeBSD.org>
7251
7252 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7253 with fprintf_filtered.
7254
7255 2017-04-28 Yao Qi <yao.qi@linaro.org>
7256
7257 * regcache.c (regcache::regcache): New function.
7258 (regcache::~regcache): New function.
7259 (regcache_xmalloc_1): Remove.
7260 (regcache_xmalloc): Call new regcache.
7261 (regcache_xfree): Call delete regcache.
7262 (get_thread_arch_aspace_regcache): Call new regcache.
7263
7264 2017-04-28 Yao Qi <yao.qi@linaro.org>
7265
7266 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7267 lwp instead of ptid_get_lwp.
7268
7269 2017-04-28 Yao Qi <yao.qi@linaro.org>
7270
7271 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7272 lwp_info instead of getting from inferior_ptid.
7273
7274 2017-04-27 Keith Seitz <keiths@redhat.com>
7275
7276 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
7277 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
7278 (CV_CONVERSION_BADNESS): Define.
7279 (rank_one_type): Remove overly restrictive rvalue reference
7280 rank checks.
7281 Add cv-qualifier checks and subranks for type equality.
7282 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
7283 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
7284 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
7285
7286 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
7287
7288 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
7289 count when creating the object.
7290
7291 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
7292 Ulrich Weigand <uweigand@de.ibm.com>
7293
7294 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
7295 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
7296 is used in AIX.
7297 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
7298 (process_xcoff_symbol): Likewise.
7299 (scan_xcoff_symtab): Likewise.
7300
7301 2017-04-26 Alan Hayward <alan.hayward@arm.com>
7302
7303 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
7304 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
7305 (ia64_access_reg): Use get_frame_register_unsigned.
7306 (ia64_access_rse_reg): Likewise.
7307 (ia64_libunwind_frame_prev_register): Likewise.
7308
7309 2017-04-26 Jiong Wang <jiong.wang@arm.com>
7310
7311 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
7312 * gdbarch.c: Regenerated.
7313 * gdbarch.h: Regenerated.
7314 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
7315 visibility external.
7316 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
7317 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
7318 (enum cfa_how_kind): Move to ...
7319 (struct dwarf2_frame_state_reg_info): Likewise.
7320 (struct dwarf2_frame_state): Likewise.
7321 * dwarf2-frame.h: ... here.
7322 (dwarf2_frame_state_alloc_regs): New declaration.
7323 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
7324 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
7325
7326 2017-04-26 Alan Hayward <alan.hayward@arm.com>
7327
7328 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
7329 regcache_raw_read_unsigned.
7330 (xtensa_pseudo_register_write): Likewise.
7331
7332 2017-04-26 Alan Hayward <alan.hayward@arm.com>
7333
7334 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
7335 (nds32_pseudo_register_write): Likewise.
7336
7337 2017-04-25 Yao Qi <yao.qi@linaro.org>
7338
7339 * regcache.c (struct regcache) <readonly_p>: Change its type
7340 to bool.
7341 (regcache_xmalloc_1): Update parameter type and callers update.
7342
7343 2017-04-25 Yao Qi <yao.qi@linaro.org>
7344
7345 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
7346 set_gdbarch_wchar_bit.
7347 * arm-tdep.c (arm_gdbarch_init): Likewise.
7348
7349 2017-04-25 Pedro Alves <palves@redhat.com>
7350
7351 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
7352 (BothAreRelocatable, memcopy, memmove): Don't define.
7353 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
7354 macros.
7355
7356 2017-04-25 Pedro Alves <palves@redhat.com>
7357
7358 * common/common-defs.h: Include "common/poison.h".
7359 * common/function-view.h: (Not, Or, Requires): Move to traits.h
7360 and adjust.
7361 * common/poison.h: New file.
7362 * common/traits.h: Include <type_traits>.
7363 (Not, Or, Requires): New, moved from common/function-view.h.
7364
7365 2017-04-25 Pedro Alves <palves@redhat.com>
7366
7367 * breakpoint.h (struct breakpoint): In-class initialize all
7368 fields. Make boolean fields "bool".
7369 * breakpoint.c (init_raw_breakpoint_without_location): Remove
7370 memset call and initializations no longer necessary.
7371
7372 2017-04-25 Pedro Alves <palves@redhat.com>
7373
7374 * btrace.c (pt_btrace_insn_flags): Change parameter type to
7375 reference.
7376 (pt_btrace_insn): New function.
7377 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
7378
7379 2017-04-25 Pedro Alves <palves@redhat.com>
7380
7381 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
7382 "base" field and inherit from "bp_location" instead. Add
7383 non-default ctor.
7384 (allocate_location_exception): Use new non-default ctor.
7385 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
7386 (init_bp_location): Convert to ...
7387 (bp_location::bp_location): ... this new ctor, and remove memset
7388 call.
7389 (base_breakpoint_allocate_location): Use the new non-default ctor.
7390 * breakpoint.h (bp_location): Now a class. Declare default and
7391 non-default ctors. In-class initialize all members.
7392 (init_bp_location): Remove declaration.
7393
7394 2017-04-25 Pedro Alves <palves@redhat.com>
7395
7396 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
7397 assignment operator.
7398
7399 2017-04-24 Yao Qi <yao.qi@linaro.org>
7400
7401 * doublest.c (convert_doublest_to_floatformat): Call
7402 floatformat_totalsize_bytes.
7403
7404 2017-04-22 Tom Tromey <tom@tromey.com>
7405
7406 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7407 ui_out_emit_list.
7408 * stack.c (print_frame): Use ui_out_emit_list.
7409 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7410 ui_out_emit_list.
7411 * mi/mi-main.c (print_one_inferior)
7412 (mi_cmd_data_list_register_names)
7413 (mi_cmd_data_list_register_values, mi_cmd_list_features)
7414 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
7415 ui_out_emit_list.
7416 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
7417 (mi_output_solib_attribs): Use ui_out_emit_list,
7418 ui_out_emit_tuple.
7419 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
7420 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
7421 (mi_cmd_stack_list_args, list_args_or_locals): Use
7422 ui_out_emit_list.
7423 * disasm.c (do_assembly_only): Use ui_out_emit_list.
7424 * breakpoint.c (print_solib_event, output_thread_groups): Use
7425 ui_out_emit_list.
7426
7427 2017-04-22 Tom Tromey <tom@tromey.com>
7428
7429 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
7430 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
7431 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
7432
7433 2017-04-22 Tom Tromey <tom@tromey.com>
7434
7435 * tracepoint.c (tvariables_info_1)
7436 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
7437
7438 2017-04-22 Tom Tromey <tom@tromey.com>
7439
7440 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
7441 annotate_arg_emitter.
7442 * breakpoint.c (print_mention_watchpoint)
7443 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
7444 * annotate.h (struct annotate_arg_emitter): New.
7445
7446 2017-04-22 Tom Tromey <tom@tromey.com>
7447
7448 * record-btrace.c (record_btrace_insn_history)
7449 (record_btrace_insn_history_range, record_btrace_call_history)
7450 (record_btrace_call_history_range): Use ui_out_emit_tuple.
7451 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
7452 ui_out_emit_tuple.
7453 * stack.c (print_frame_info): Use ui_out_emit_tuple.
7454 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
7455 * skip.c (skip_info): Use ui_out_emit_tuple.
7456 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
7457 * progspace.c (print_program_space): Use ui_out_emit_tuple.
7458 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
7459 * osdata.c (info_osdata): Use ui_out_emit_tuple.
7460 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7461 ui_out_emit_tuple.
7462 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
7463 (output_register, mi_cmd_data_read_memory)
7464 (mi_cmd_data_read_memory_bytes, mi_load_progress)
7465 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
7466 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
7467 Use ui_out_emit_tuple.
7468 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
7469 ui_out_emit_tuple.
7470 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7471 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
7472 * linux-thread-db.c (info_auto_load_libthread_db): Use
7473 ui_out_emit_tuple.
7474 * inferior.c (print_inferior): Use ui_out_emit_tuple.
7475 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
7476 * disasm.c (do_mixed_source_and_assembly_deprecated)
7477 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
7478 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
7479 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
7480 * breakpoint.c (print_one_breakpoint_location)
7481 (print_one_breakpoint): Use ui_out_emit_tuple.
7482 * auto-load.c (print_script, info_auto_load_cmd): Use
7483 ui_out_emit_tuple.
7484 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
7485
7486 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
7487
7488 * thread.c (print_thread_info_1): Remove dead code.
7489
7490 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7491
7492 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
7493 GDB_SELF_TEST.
7494 * arm-tdep.c (selftests::arm_record_test): Likewise.
7495
7496 2017-04-21 Yao Qi <yao.qi@linaro.org>
7497
7498 * regcache.c (regcache_restore): Remove argument 2. Replace
7499 argument 3 with regcache. Get register status from
7500 src->register_status and get register contents from
7501 register_buffer (src, regnum).
7502 (regcache_cpy): Update.
7503
7504 2017-04-19 Pedro Alves <palves@redhat.com>
7505
7506 * gdbthread.h (thread): Add missing closing parenthesis in
7507 comment.
7508
7509 2017-04-19 Pedro Alves <palves@redhat.com>
7510
7511 * common/refcounted-object.h: New file.
7512 * gdbthread.h: Include "common/refcounted-object.h".
7513 (thread_info): Inherit from refcounted_object and add comments.
7514 (thread_info::incref, thread_info::decref)
7515 (thread_info::m_refcount): Delete.
7516 (thread_info::deletable): Use the refcounted_object::refcount()
7517 method.
7518 * inferior.c (current_inferior_): Add comment.
7519 (set_current_inferior): Increment/decrement refcounts.
7520 (prune_inferiors, remove_inferior_command): Skip inferiors marked
7521 not-deletable instead of comparing with the current inferior.
7522 (initialize_inferiors): Increment the initial inferior's refcount.
7523 * inferior.h (struct inferior): Forward declare.
7524 Include "common/refcounted-object.h".
7525 (current_inferior, set_current_inferior): Move declaration to
7526 before struct inferior's definition, and fix comment.
7527 (inferior): Inherit from refcounted_object. Add comments.
7528 * thread.c (switch_to_thread_no_regs): Reference the thread's
7529 inferior pointer directly instead of doing a ptid lookup.
7530 (switch_to_no_thread): New function.
7531 (switch_to_thread(thread_info *)): New function, factored out
7532 from ...
7533 (switch_to_thread(ptid_t)): ... this.
7534 (restore_current_thread): Delete.
7535 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
7536 fields, and add 'inf' field.
7537 (do_restore_current_thread_cleanup): Check whether old->inf is
7538 alive instead of looking up an inferior by ptid. Use
7539 switch_to_thread and switch_to_no_thread.
7540 (restore_current_thread_cleanup_dtor): Use old->inf directly
7541 instead of lookup up an inferior by id. Decref the inferior.
7542 Don't restore 'removable'.
7543 (make_cleanup_restore_current_thread): Same the inferior pointer
7544 in old, instead of the inferior number. Incref the inferior.
7545 Don't save/clear 'removable'.
7546
7547 2017-04-19 Pedro Alves <palves@redhat.com>
7548
7549 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7550 unittests/scoped_restore-selftests.c.
7551 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
7552 * common/scoped_restore.h (scoped_restore_base): Make "class".
7553 (scoped_restore_base::release): New public method.
7554 (scoped_restore_base::scoped_restore_base): New protected ctor.
7555 (scoped_restore_base::m_saved_var): New protected field.
7556 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
7557 scoped_restore_base base class instead of m_saved_var directly.
7558 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
7559 (scoped_restore_tmpl::scoped_restore_tmpl(const
7560 scoped_restore_tmpl<T>&)): Likewise.
7561 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
7562 method.
7563 (scoped_restore_tmpl::saved_var): New method.
7564 (scoped_restore_tmpl::m_saved_var): Delete.
7565 * inferior.h (inferior::detaching): Now a bool.
7566 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
7567 cleanup.
7568 * unittests/scoped_restore-selftests.c: New file.
7569
7570 2017-04-19 Pedro Alves <palves@redhat.com>
7571
7572 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
7573 Re-sort in alphabetic order.
7574
7575 2017-04-18 Pedro Alves <palves@redhat.com>
7576
7577 * xml-support.c (obstack_xml_printf): Delete.
7578 * xml-support.h (obstack_xml_printf): Delete.
7579
7580 2017-04-18 Pedro Alves <palves@redhat.com>
7581
7582 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
7583 vdebug, verror, body_text, start_element, end_element, name,
7584 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
7585 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
7586 is_xinclude>: Make private and add m_ prefix.
7587 (gdb_xml_parser::body_text): New method, based on ...
7588 (gdb_xml_body_text): ... this. Adjust.
7589 (gdb_xml_parser::vdebug): New method, based on ...
7590 (gdb_xml_debug): ... this. Adjust.
7591 (gdb_xml_parser::verror): New method, based on ...
7592 (gdb_xml_error): ... this. Adjust.
7593 (gdb_xml_parser::start_element): New method, based on ...
7594 (gdb_xml_start_element): ... this. Adjust.
7595 (gdb_xml_start_element_wrapper): Defer to
7596 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
7597 (gdb_xml_parser::end_element): New method, based on ...
7598 (gdb_xml_end_element_wrapper): ... this. Adjust.
7599 (gdb_xml_parser::~gdb_xml_parser): Adjust.
7600 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
7601 (gdb_xml_parser::use_dtd): New method, based on ...
7602 (gdb_xml_use_dtd): ... this. Adjust.
7603 (gdb_xml_parser::parse): New method, based on ...
7604 (gdb_xml_parse): ... this. Adjust.
7605 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
7606 (xinclude_start_include): Adjust to call the parser's name method.
7607 (xml_xinclude_default, xml_xinclude_start_doctype)
7608 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
7609 method.
7610 (xml_process_xincludes): Adjust to call parser methods.
7611 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
7612 declarations.
7613
7614 2017-04-18 Pedro Alves <palves@redhat.com>
7615
7616 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
7617 gdb::optional<std::string>.
7618 * xml-support.c: Include <string>.
7619 (scope_level::scope_level(scope_level &&))
7620 (scope_level::~scope_level): Delete.
7621 (scope_level::body): Now a std::string.
7622 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
7623 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
7624 parameter.
7625 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
7626 (xinclude_parsing_data::output): Now a std::string reference.
7627 (xinclude_start_include): Adjust.
7628 (xml_xinclude_default): Adjust.
7629 (xml_process_xincludes): Add 'output' parameter, and return bool.
7630 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
7631 and return bool.
7632 * xml-tdesc.c: Include <unordered_map> and <string>.
7633 (tdesc_xml_cache): Delete.
7634 (tdesc_xml_cache_s): Delete.
7635 (xml_cache): Now an std::unordered_map.
7636 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
7637 (target_fetch_description_xml): Change return type to
7638 gdb::optional<std::string>, and adjust.
7639 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
7640 (target_fetch_description_xml): Change return type to
7641 gdb::optional<std::string>.
7642
7643 2017-04-18 Pedro Alves <palves@redhat.com>
7644
7645 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7646 unittests/optional-selftests.c.
7647 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
7648 * unittests/optional-selftests.c: New file.
7649 * unittests/optional/assignment/1.cc: New file.
7650 * unittests/optional/assignment/2.cc: New file.
7651 * unittests/optional/assignment/3.cc: New file.
7652 * unittests/optional/assignment/4.cc: New file.
7653 * unittests/optional/assignment/5.cc: New file.
7654 * unittests/optional/assignment/6.cc: New file.
7655 * unittests/optional/assignment/7.cc: New file.
7656 * unittests/optional/cons/copy.cc: New file.
7657 * unittests/optional/cons/default.cc: New file.
7658 * unittests/optional/cons/move.cc: New file.
7659 * unittests/optional/cons/value.cc: New file.
7660 * unittests/optional/in_place.cc: New file.
7661 * unittests/optional/observers/1.cc: New file.
7662 * unittests/optional/observers/2.cc: New file.
7663
7664 2017-04-18 Pedro Alves <palves@redhat.com>
7665
7666 * common/gdb_optional.h: Include common/traits.h.
7667 (in_place_t): New type.
7668 (in_place): New constexpr variable.
7669 (optional::optional): Remove member initialization of
7670 m_instantiated.
7671 (optional::optional(in_place_t...)): New constructor.
7672 (optional::~optional): Use reset.
7673 (optional::optional(const optional&)): New.
7674 (optional::optional(const optional&&)): New.
7675 (optional::optional(T &)): New.
7676 (optional::optional(T &&)): New.
7677 (operator::operator=(const optional &)): New.
7678 (operator::operator=(optional &&)): New.
7679 (operator::operator= (const T &))
7680 (operator::operator= (T &&))
7681 (operator::emplace (Args &&... args)): Return a T&. Use reset.
7682 (operator::reset): New.
7683 (operator::m_instantiated):: Add in-class initializer.
7684 * common/traits.h: Include <type_traits>.
7685 (struct And): New types.
7686
7687 2017-04-18 Pedro Alves <palves@redhat.com>
7688
7689 * xml-support.c: Include <vector>.
7690 (scope_level::scope_level(const gdb_xml_element *))
7691 (scope_level::scope_level(scope_level&&)): New.
7692 (scope_level::~scope_level): New.
7693 (scope_level_s): Delete.
7694 (gdb_xml_parser::scopes): Now a std::vector.
7695 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
7696 Use std::vector.
7697 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
7698 scope cleanup code.
7699 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
7700 of the scopes member. Use std::vector::emplace_back.
7701
7702 2017-04-18 Pedro Alves <palves@redhat.com>
7703
7704 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
7705 a bool.
7706 (gdb_xml_end_element): Change type of first parameter.
7707 (gdb_xml_cleanup): Rename to ...
7708 (gdb_xml_parser::~gdb_xml_parser): ... this.
7709 (gdb_xml_create_parser_and_cleanup): Delete with ...
7710 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
7711 to this new ctor.
7712 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
7713 using gdb_xml_create_parser_and_cleanup.
7714 (xinclude_parsing_data): Add ctor/dtor.
7715 (xml_xinclude_cleanup): Delete.
7716 (xml_process_xincludes): Create a local xinclude_parsing_data
7717 instead of heap-allocating one. Create a local gdb_xml_parser
7718 instead of heap-allocating one with
7719 gdb_xml_create_parser_and_cleanup.
7720
7721 2017-04-18 John Baldwin <jhb@FreeBSD.org>
7722
7723 PR threads/20743
7724 * fbsd-nat.c (resume_one_thread_cb): Remove.
7725 (resume_all_threads_cb): Remove.
7726 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7727 iterate_over_threads.
7728
7729 2017-04-17 Joel Brobecker <brobecker@adacore.com>
7730
7731 * NEWS: Create a new section for the next release branch.
7732 Rename the section of the current branch, now that it has
7733 been cut.
7734
7735 2017-04-17 Joel Brobecker <brobecker@adacore.com>
7736
7737 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7738 * version.in: Bump version to 8.0.50.DATE-git.
7739
7740 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
7741
7742 PR gdb/21385
7743 * windows-nat.c (windows_create_inferior): Declare 'allargs'
7744 independently of the host, and fix build breakage on Cygwin.
7745
7746 2017-04-13 Pedro Alves <palves@redhat.com>
7747
7748 * inferior.c (free_inferior): Convert to ...
7749 (inferior::~inferior): ... this dtor.
7750 (inferior::inferior): New ctor, factored out from ...
7751 (add_inferior_silent): ... here. Allocate the inferior with a new
7752 expression.
7753 (delete_inferior): Call delete instead of free_inferior.
7754 * inferior.h (gdb_environ, continuation): Forward declare.
7755 (inferior): Now a class. Add in-class initialization to all
7756 members. Make boolean fields bool, except 'detaching'.
7757 (inferior::inferior): New explicit ctor.
7758 (inferior::~inferior): New.
7759
7760 2017-04-13 Pedro Alves <palves@redhat.com>
7761
7762 * inferior.c (init_inferior_list): Delete.
7763 * inferior.h (init_inferior_list): Delete.
7764
7765 2017-04-13 Pedro Alves <palves@redhat.com>
7766
7767 PR threads/13217
7768 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7769 (top level): Call it twice, with different thread sets.
7770
7771 2017-04-13 Pedro Alves <palves@redhat.com>
7772
7773 * thread.c: Include <algorithm>.
7774 (thread_array_cleanup): Delete.
7775 (scoped_inc_dec_ref): New class.
7776 (live_threads_count): New function.
7777 (set_thread_refcount): Delete.
7778 (tp_array_compar_ascending): Now a bool.
7779 (tp_array_compar): Convert to a std::sort comparison function.
7780 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7781 and live_threads_count.
7782
7783 2017-04-13 Pedro Alves <palves@redhat.com>
7784
7785 * infrun.c (follow_fork_inferior): Also switch the current
7786 inferior.
7787
7788 2017-04-13 Pedro Alves <palves@redhat.com>
7789
7790 * breakpoint.c (watch_command_1): Save watchpoint-frame info
7791 before calling create_internal_breakpoint.
7792
7793 2017-04-13 Pedro Alves <palves@redhat.com>
7794
7795 * fork-child.c (execv_argv): New class.
7796 (breakup_args): Refactored as ...
7797 (execv_argv::init_for_no_shell): .. this method of execv_argv.
7798 Copy arguments to storage and replace separators with NULL
7799 terminators in place.
7800 (escape_bang_in_quoted_argument): Adjust to return bool.
7801 (execv_argv::execv_argv): New ctor.
7802 (execv_argv::init_for_shell): New method, factored out from
7803 fork_inferior. Don't strdup strings into the vector.
7804 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
7805 Remove free_vector_argv call.
7806
7807 2017-04-13 Yao Qi <yao.qi@linaro.org>
7808
7809 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
7810 tdep->rx_psw_type.
7811
7812 2017-04-13 Yao Qi <yao.qi@linaro.org>
7813
7814 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
7815 * rx-tdep.c (rx_gdbarch_init): Likewise.
7816
7817 2017-04-13 Pedro Alves <palves@redhat.com>
7818
7819 * breakpoint.h (struct breakpoint): Reindent.
7820
7821 2017-04-13 Pedro Alves <palves@redhat.com>
7822
7823 * breakpoint.c (bp_location): Rename to ...
7824 (bp_locations): ... this. All references updated.
7825 (bp_location_count): Rename to ...
7826 (bp_locations_count): ... this. All references updated.
7827 (bp_location_placed_address_before_address_max): Rename to ...
7828 (bp_locations_placed_address_before_address_max): ... this. All
7829 references updated.
7830 (bp_location_shadow_len_after_address_max): Rename to ...
7831 (bp_locations_shadow_len_after_address_max): ... this. All
7832 references updated.
7833 (bp_location_compare_addrs): Rename to ...
7834 (bp_locations_compare_addrs): ... this. All references updated.
7835 (bp_location_compare):Rename to ...
7836 (bp_locations_compare): ... this. All references updated.
7837 (bp_location_target_extensions_update): Rename to ...
7838 (bp_locations_target_extensions_update): ... this. All references
7839 updated.
7840
7841 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7842
7843 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
7844 * common/common.m4: Check headers 'termios.h', 'termio.h' and
7845 'sgtty.h'.
7846 * common/gdb_termios.h: New file, with parts of "terminal.h".
7847 * inflow.c: Include "gdb_termios.h".
7848 * ser-unix.c: Include "gdb_termios.h".
7849 * terminal.h: Move terminal-related defines to
7850 "common/gdb_termios.h".
7851
7852 2017-04-12 Tom Tromey <tom@tromey.com>
7853
7854 * probe.c (parse_probes): Update.
7855 * location.h (delete_event_location): Don't declare.
7856 (event_location_deleter::operator()): Update.
7857 * location.c (event_location_deleter::operator()): Rename from
7858 delete_event_location.
7859 * linespec.h (linespec_result) <location>: Change type to
7860 event_location_up.
7861 * linespec.c (canonicalize_linespec, event_location_to_sals)
7862 (decode_objc): Update.
7863 (linespec_result): Don't call delete_event_location.
7864 * breakpoint.c (create_breakpoints_sal)
7865 (bkpt_probe_create_sals_from_location)
7866 (strace_marker_create_sals_from_location): Update.
7867
7868 2017-04-12 Tom Tromey <tom@tromey.com>
7869
7870 * linespec.h (struct linespec_result): Add constructor and
7871 destructor.
7872 (init_linespec_result, destroy_linespec_result)
7873 (make_cleanup_destroy_linespec_result): Don't declare.
7874 * linespec.c (init_linespec_result): Remove.
7875 (linespec_result::~linespec_result): Rename from
7876 destroy_linespec_result. Update.
7877 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
7878 Remove.
7879 * breakpoint.c (create_breakpoint, break_range_command)
7880 (decode_location_default): Update.
7881 * ax-gdb.c (agent_command_1): Update.
7882
7883 2017-04-12 Tom Tromey <tom@tromey.com>
7884
7885 * remote.c (remote_download_tracepoint): Update.
7886 * python/py-breakpoint.c (bppy_get_location): Update.
7887 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
7888 (gdbscm_breakpoint_location): Update.
7889 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
7890 * breakpoint.h (struct breakpoint) <location, location_range_end>:
7891 Change type to event_location_up.
7892 * breakpoint.c (create_overlay_event_breakpoint)
7893 (create_longjmp_master_breakpoint)
7894 (create_std_terminate_master_breakpoint)
7895 (create_exception_master_breakpoint)
7896 (breakpoint_event_location_empty_p, print_breakpoint_location)
7897 (print_one_breakpoint_location, create_thread_event_breakpoint)
7898 (init_breakpoint_sal, create_breakpoint)
7899 (print_recreate_ranged_breakpoint, break_range_command)
7900 (init_ada_exception_breakpoint, say_where): Update.
7901 (base_breakpoint_dtor): Don't call delete_event_location.
7902 (bkpt_print_recreate, tracepoint_print_recreate)
7903 (dprintf_print_recreate, update_static_tracepoint)
7904 (breakpoint_re_set_default): Update.
7905
7906 2017-04-12 Tom Tromey <tom@tromey.com>
7907
7908 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
7909 type of "to_do". Update.
7910 (compute_stack_depth): Use std::vector.
7911
7912 2017-04-12 Tom Tromey <tom@tromey.com>
7913
7914 * printcmd.c (find_instruction_backward): Use std::vector.
7915
7916 2017-04-12 Tom Tromey <tom@tromey.com>
7917
7918 * symfile.c (objfilep): Remove typedef.
7919 (reread_symbols): Use a std::vector.
7920
7921 2017-04-12 Tom Tromey <tom@tromey.com>
7922
7923 * mi/mi-main.c (exec_direction_forward): Remove.
7924 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
7925 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7926 scoped_restore.
7927 * guile/guile.c (guile_repl_command, guile_command)
7928 (gdbscm_execute_gdb_command): Use scoped_restore.
7929 * go-exp.y (go_parse): Use scoped_restore.
7930 * d-exp.y (d_parse): Use scoped_restore.
7931 * cli/cli-decode.c (cmd_func): Use scoped_restore.
7932 * c-exp.y (c_parse): Use scoped_restore.
7933
7934 2017-04-12 Tom Tromey <tom@tromey.com>
7935
7936 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
7937 (mi_parse): Update return type.
7938 (mi_parse_free): Remove.
7939 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
7940 (mi_parse::~mi_parse): Rename from mi_parse_free.
7941 (mi_parse_cleanup): Remove.
7942 (mi_parse): Return a unique_ptr. Use new.
7943 * mi/mi-main.c (mi_execute_command): Update.
7944
7945 2017-04-12 Tom Tromey <tom@tromey.com>
7946
7947 * location.c (explicit_location_lex_one): Return a
7948 unique_xmalloc_ptr.
7949 (string_to_explicit_location): Update. Remove cleanups.
7950
7951 2017-04-12 Tom Tromey <tom@tromey.com>
7952
7953 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
7954 (compare_value_and_voffset): Change type. Update.
7955 (compute_vtable_size): Change type of "offset_vec".
7956 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
7957 (gnuv3_get_typeid): Remove extraneous declaration.
7958
7959 2017-04-12 Tom Tromey <tom@tromey.com>
7960
7961 * charset.h (wchar_iterator): Fix comment.
7962
7963 2017-04-12 Tom Tromey <tom@tromey.com>
7964
7965 * charset.c (iconv_wrapper): New class.
7966 (cleanup_iconv): Remove.
7967 (convert_between_encodings): Use it.
7968
7969 2017-04-12 Tom Tromey <tom@tromey.com>
7970
7971 * symfile.h (increment_reading_symtab): Update type.
7972 * symfile.c (decrement_reading_symtab): Remove.
7973 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
7974 * psymtab.c (psymtab_to_symtab): Update.
7975 * dwarf2read.c (dw2_instantiate_symtab): Update.
7976
7977 2017-04-12 Tom Tromey <tom@tromey.com>
7978
7979 * jit.c (struct jit_reader): Declare separately. Add constructor
7980 and destructor. Change type of "handle".
7981 (loaded_jit_reader): Define separately.
7982 (jit_reader_load): Update. New "new".
7983 (jit_reader_unload_command): Use "delete".
7984 * gdb-dlfcn.h (struct dlclose_deleter): New.
7985 (gdb_dlhandle_up): New typedef.
7986 (gdb_dlopen, gdb_dlsym): Update types.
7987 (gdb_dlclose): Remove.
7988 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
7989 (gdb_dlsym): Change type of "handle".
7990 (make_cleanup_dlclose): Remove.
7991 (dlclose_deleter::operator()): Rename from gdb_dlclose.
7992 * compile/compile-c-support.c (load_libcc): Update.
7993
7994 2017-04-12 Tom Tromey <tom@tromey.com>
7995
7996 * symtab.h (find_pcs_for_symtab_line): Change return type.
7997 * symtab.c (find_pcs_for_symtab_line): Change return type.
7998 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
7999 type of "vec". Update.
8000 (ltpy_get_pcs_for_line): Update.
8001 * linespec.c (decode_digits_ordinary): Update.
8002
8003 2017-04-12 Tom Tromey <tom@tromey.com>
8004
8005 * tracepoint.c (actions_command): Update.
8006 * python/python.c (python_command, python_interactive_command):
8007 Update.
8008 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8009 * guile/guile.c (guile_command): Update.
8010 * defs.h (read_command_lines, read_command_lines_1): Return
8011 command_line_up.
8012 (command_lines_deleter): New struct.
8013 (command_line_up): New typedef.
8014 * compile/compile.c (compile_code_command)
8015 (compile_print_command): Update.
8016 * cli/cli-script.h (get_command_line, copy_command_lines): Return
8017 command_line_up.
8018 (make_cleanup_free_command_lines): Remove.
8019 * cli/cli-script.c (get_command_line, read_command_lines_1)
8020 (copy_command_lines): Return command_line_up.
8021 (while_command, if_command, read_command_lines, define_command)
8022 (document_command): Update.
8023 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
8024 Remove.
8025 * breakpoint.h (breakpoint_set_commands): Change type of
8026 "commands".
8027 * breakpoint.c (breakpoint_set_commands): Change type of
8028 "commands". Update.
8029 (do_map_commands_command, update_dprintf_command_list)
8030 (create_tracepoint_from_upload): Update.
8031
8032 2017-04-12 Tom Tromey <tom@tromey.com>
8033
8034 * tracepoint.c (scope_info): Update.
8035 * spu-tdep.c (spu_catch_start): Update.
8036 * python/python.c (gdbpy_decode_line): Update.
8037 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
8038 * python/py-breakpoint.c (bppy_init): Update.
8039 * probe.c (parse_probes): Update.
8040 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
8041 * location.h (event_location_deleter): New struct.
8042 (event_location_up): New typedef.
8043 (new_linespec_location, new_address_location, new_probe_location)
8044 (new_explicit_location, copy_event_location)
8045 (string_to_event_location, string_to_event_location_basic)
8046 (string_to_explicit_location): Update return type.
8047 (make_cleanup_delete_event_location): Remove.
8048 * location.c (new_linespec_location, new_address_location)
8049 (new_probe_location, new_explicit_location, copy_event_location):
8050 Return event_location_up.
8051 (delete_event_location_cleanup)
8052 (make_cleanup_delete_event_location): Remove.
8053 (string_to_explicit_location, string_to_event_location_basic)
8054 (string_to_event_location): Return event_location_up.
8055 * linespec.c (canonicalize_linespec, event_location_to_sals)
8056 (decode_line_with_current_source)
8057 (decode_line_with_last_displayed, decode_objc): Update.
8058 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
8059 * completer.c (location_completer): Update.
8060 * cli/cli-cmds.c (edit_command, list_command): Update.
8061 * breakpoint.c (create_overlay_event_breakpoint)
8062 (create_longjmp_master_breakpoint)
8063 (create_std_terminate_master_breakpoint)
8064 (create_exception_master_breakpoint)
8065 (create_thread_event_breakpoint): Update.
8066 (init_breakpoint_sal): Update. Remove some dead code.
8067 (create_breakpoint_sal): Change type of "location". Update.
8068 (create_breakpoints_sal, create_breakpoint, break_command_1)
8069 (dprintf_command, break_range_command, until_break_command)
8070 (init_ada_exception_breakpoint)
8071 (strace_marker_create_sals_from_location)
8072 (update_static_tracepoint, trace_command, ftrace_command)
8073 (strace_command, create_tracepoint_from_upload): Update.
8074 * break-catch-throw.c (re_set_exception_catchpoint): Update.
8075 * ax-gdb.c (agent_command_1): Update.
8076
8077 2017-04-12 Pedro Alves <palves@redhat.com>
8078
8079 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
8080 * configure.tgt: Handle i[34567]86-*-go32* and
8081 i[34567]86-*-msdosdjgpp*.
8082 * i386-tdep.c (i386_svr4_reg_to_regnum):
8083 Make extern.
8084 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
8085 i386-go32-tdep.c.
8086 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8087 * i386-go32-tdep.c: New file.
8088 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8089 declarations.
8090
8091 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
8092
8093 * aix-thread.c (pd_status2str): Change return type to const char *.
8094
8095 2017-04-12 Pedro Alves <palves@redhat.com>
8096
8097 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8098 calls to set_gdbarch_gnu_triplet_regexp.
8099
8100 2017-04-12 Pedro Alves <palves@redhat.com>
8101
8102 PR gdb/21323
8103 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8104 New enum value.
8105 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8106 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8107 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8108 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8109 * gdbarch.h, gdbarch.c: Regenerate.
8110 * aarch64-tdep.c (aarch64_gdbarch_init): Override
8111 gdbarch_wchar_bit and gdbarch_wchar_signed.
8112 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8113 * arm-tdep.c (arm_gdbarch_init): Likewise.
8114 * avr-tdep.c (avr_gdbarch_init): Likewise.
8115 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8116 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8117 * i386-tdep.c (i386_go32_init_abi): Likewise.
8118 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8119 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8120 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8121 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8122 * sh-tdep.c (sh_gdbarch_init): Likewise.
8123 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8124 * sparc64-tdep.c (sparc64_init_abi): Likewise.
8125 * windows-tdep.c (windows_init_abi): Likewise.
8126 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8127
8128 2017-04-12 Pedro Alves <palves@redhat.com>
8129
8130 PR c++/21323
8131 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8132 cplus_primitive_type_char32_t>: New enum values.
8133 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8134 and cplus_primitive_type_char32_t.
8135 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8136 32, use the archtecture's built-in type for char16_t and char32_t,
8137 respectively. Otherwise, fallback to init_integer_type as before,
8138 but make the type unsigned, and issue a complaint.
8139 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8140
8141 2017-04-12 Alan Hayward <alan.hayward@arm.com>
8142
8143 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
8144 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8145
8146 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8147
8148 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8149 'const char *'.
8150
8151 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8152
8153 * common/common-utils.c (free_vector_argv): New function.
8154 * common/common-utils.h: Include <vector>.
8155 (free_vector_argv): New prototype.
8156 * darwin-nat.c (darwin_create_inferior): Rewrite function
8157 prototype in order to constify "exec_file" and accept a
8158 "std::string" for "allargs".
8159 * fork-child.c: Include <vector>.
8160 (breakup_args): Rewrite function, using C++.
8161 (fork_inferior): Rewrite function header, constify "exec_file_arg"
8162 and accept "std::string" for "allargs". Update the code to
8163 calculate "argv" based on "allargs". Update calls to "exec_fun"
8164 and "execvp".
8165 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8166 order to constify "exec_file" and accept a "std::string" for
8167 "allargs".
8168 * go32-nat.c (go32_create_inferior): Likewise.
8169 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8170 * infcmd.c (run_command_1): Constify "exec_file". Use
8171 "std::string" for inferior arguments.
8172 * inferior.h (fork_inferior): Update prototype.
8173 * linux-nat.c (linux_nat_create_inferior): Rewrite function
8174 prototype in order to constify "exec_file" and accept a
8175 "std::string" for "allargs".
8176 * nto-procfs.c (procfs_create_inferior): Likewise.
8177 * procfs.c (procfs_create_inferior): Likewise.
8178 * remote-sim.c (gdbsim_create_inferior): Likewise.
8179 * remote.c (extended_remote_run): Update code to accept
8180 "std::string" as argument.
8181 (extended_remote_create_inferior): Rewrite function prototype in
8182 order to constify "exec_file" and accept a "std::string" for
8183 "allargs".
8184 * rs6000-nat.c (super_create_inferior): Likewise.
8185 (rs6000_create_inferior): Likewise.
8186 * target.h (struct target_ops) <to_create_inferior>: Likewise.
8187 * windows-nat.c (windows_create_inferior): Likewise.
8188
8189 2017-04-11 Pedro Alves <palves@redhat.com>
8190
8191 * thread.c: Fix whitespace throughout.
8192
8193 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
8194
8195 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
8196
8197 2017-04-11 Alan Hayward <alan.hayward@arm.com>
8198
8199 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
8200
8201 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
8202
8203 PR gdb/21364
8204 * osdata.c (info_osdata): Check if 'type' is an empty string
8205 instead of NULL.
8206
8207 2017-04-10 Pedro Alves <palves@redhat.com>
8208
8209 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
8210 (ptid_to_global_thread_id, in_thread_list)
8211 (do_captured_list_thread_ids, set_resumed, set_running)
8212 (set_executing, set_stop_requested, finish_thread_state)
8213 (validate_registers_access, can_access_registers_ptid)
8214 (print_thread_info_1, switch_to_thread)
8215 (do_restore_current_thread_cleanup)
8216 (make_cleanup_restore_current_thread, thread_command)
8217 (thread_name_command): Use operator== instead of ptid_equal.
8218
8219 2017-04-10 Pedro Alves <palves@redhat.com>
8220
8221 * thread.c (struct current_thread_cleanup) <next>: Delete field.
8222 (current_thread_cleanup_chain): Delete.
8223 (restore_current_thread_cleanup_dtor)
8224 (make_cleanup_restore_current_thread): Remove references to
8225 current_thread_cleanup_chain.
8226
8227 2017-04-10 Alan Hayward <alan.hayward@arm.com>
8228
8229 * msp430-tdep.c (msp430_pseudo_register_read): Never return
8230 REG_UNKNOWN.
8231
8232 2017-04-10 Yao Qi <yao.qi@linaro.org>
8233
8234 PR gdb/19942
8235 * gdbthread.h (thread_info::deletable): New method.
8236 (thread_info::incref): New method.
8237 (thread_info::decref): New method.
8238 (thread_info::refcount): Move it to private.
8239 * infrun.c (save_stop_context): Call inc_refcount.
8240 (release_stop_context_cleanup): Likewise.
8241 * thread.c (set_thread_exited): New function.
8242 (init_thread_list): Delete "tp" only it is deletable, otherwise
8243 call set_thread_exited.
8244 (delete_thread_1): Call set_thread_exited.
8245 (current_thread_cleanup) <inferior_pid>: Remove.
8246 <thread>: New field.
8247 (restore_current_thread_ptid_changed): Removed.
8248 (do_restore_current_thread_cleanup): Adjust.
8249 (restore_current_thread_cleanup_dtor): Don't call
8250 find_thread_ptid.
8251 (set_thread_refcount): Use dec_refcount.
8252 (make_cleanup_restore_current_thread): Adjust.
8253 (thread_apply_all_command): Call inc_refcount.
8254 (_initialize_thread): Don't call
8255 observer_attach_thread_ptid_changed.
8256
8257 2017-04-10 Yao Qi <yao.qi@linaro.org>
8258
8259 * thread.c (delete_thread_1): Hoist code on marking thread as
8260 exited.
8261
8262 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8263
8264 * windows-nat.c (windows_detach): Initialize ptid with
8265 minus_one_ptid.
8266
8267 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
8268
8269 * unittests/ptid-selftests.c: Fix erroneous assert messages.
8270
8271 2017-04-07 Alan Hayward <alan.hayward@arm.com>
8272
8273 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8274 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8275 (bfin_pseudo_register_write): Likewise
8276
8277 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
8278
8279 * common/ptid.h (struct ptid): Change to...
8280 (class ptid_t): ... this.
8281 <ptid_t>: New constructors.
8282 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
8283 matches>: New methods.
8284 <make_null, make_minus_one>: New static methods.
8285 <pid>: Rename to...
8286 <m_pid>: ...this.
8287 <lwp>: Rename to...
8288 <m_lwp>: ...this.
8289 <tid>: Rename to...
8290 <m_tid>: ...this.
8291 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
8292 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
8293 as references, move comment to class ptid_t.
8294 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
8295 ptid_t static methods.
8296 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
8297 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
8298 Take ptid arguments as references, implement using ptid_t methods.
8299 * unittests/ptid-selftests.c: New file.
8300 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8301 unittests/ptid-selftests.c.
8302 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
8303
8304 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
8305
8306 * python/python.c (python_run_simple_file): Cast mode literal to
8307 non-const char pointer as expected by PyFile_FromString.
8308
8309 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
8310
8311 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
8312 minus_one_ptid and null_ptid.
8313
8314 2017-04-05 Pedro Alves <palves@redhat.com>
8315
8316 * warning.m4 (build_warnings): Remove -Wno-write-strings.
8317 * configure: Regenerate.
8318
8319 2017-04-05 Pedro Alves <palves@redhat.com>
8320
8321 * ada-exp.y (yyerror): Constify.
8322 * ada-lang.c (bound_name, get_selections)
8323 (ada_variant_discrim_type)
8324 (ada_variant_discrim_name, ada_value_struct_elt)
8325 (ada_lookup_struct_elt_type, is_unchecked_variant)
8326 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
8327 (catch_ada_exception_command_split)
8328 (catch_ada_assert_command_split, catch_assert_command)
8329 (ada_op_name): Constify.
8330 * ada-lang.h (ada_yyerror, get_selections)
8331 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
8332 * arc-tdep.c (arc_print_frame_cache): Constify.
8333 * arm-tdep.c (arm_skip_stub): Constify.
8334 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
8335 (gen_aggregate_elt_ref): Constify.
8336 * bcache.c (print_bcache_statistics): Constify.
8337 * bcache.h (print_bcache_statistics): Constify.
8338 * break-catch-throw.c (catch_exception_command_1):
8339 * breakpoint.c (struct ep_type_description::description):
8340 Constify.
8341 (add_solib_catchpoint): Constify.
8342 (catch_fork_command_1): Add cast.
8343 (add_catch_command): Constify.
8344 * breakpoint.h (add_catch_command, add_solib_catchpoint):
8345 Constify.
8346 * bsd-uthread.c (bsd_uthread_state): Constify.
8347 * buildsym.c (patch_subfile_names): Constify.
8348 * buildsym.h (next_symbol_text_func, patch_subfile_names):
8349 Constify.
8350 * c-exp.y (yyerror): Constify.
8351 (token::oper): Constify.
8352 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
8353 * c-varobj.c (cplus_describe_child): Constify.
8354 * charset.c (find_charset_names): Add cast.
8355 (find_charset_names): Constify array and add const_cast.
8356 * cli/cli-cmds.c (complete_command, cd_command): Constify.
8357 (edit_command): Constify.
8358 * cli/cli-decode.c (lookup_cmd): Constify.
8359 * cli/cli-dump.c (dump_memory_command, dump_value_command):
8360 Constify.
8361 (struct dump_context): Constify.
8362 (add_dump_command, restore_command): Constify.
8363 * cli/cli-script.c (get_command_line): Constify.
8364 * cli/cli-script.h (get_command_line): Constify.
8365 * cli/cli-utils.c (check_for_argument): Constify.
8366 * cli/cli-utils.h (check_for_argument): Constify.
8367 * coff-pe-read.c (struct read_pe_section_data): Constify.
8368 * command.h (lookup_cmd): Constify.
8369 * common/print-utils.c (decimal2str): Constify.
8370 * completer.c (gdb_print_filename): Constify.
8371 * corefile.c (set_gnutarget): Constify.
8372 * cp-name-parser.y (yyerror): Constify.
8373 * cp-valprint.c (cp_print_class_member): Constify.
8374 * cris-tdep.c (cris_register_name, crisv32_register_name):
8375 Constify.
8376 * d-exp.y (yyerror): Constify.
8377 (struct token::oper): Constify.
8378 * d-lang.h (d_yyerror): Constify.
8379 * dbxread.c (struct header_file_location::name): Constify.
8380 (add_old_header_file, add_new_header_file, last_function_name)
8381 (dbx_next_symbol_text, add_bincl_to_list)
8382 (find_corresponding_bincl_psymtab, set_namestring)
8383 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
8384 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
8385 * defs.h (command_line_input, print_address_symbolic)
8386 (deprecated_readline_begin_hook): Constify.
8387 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
8388 Constify.
8389 * event-top.c (handle_line_of_input): Constify and add cast.
8390 * exceptions.c (catch_errors): Constify.
8391 * exceptions.h (catch_errors): Constify.
8392 * expprint.c (print_subexp_standard, op_string, op_name)
8393 (op_name_standard, dump_raw_expression, dump_raw_expression):
8394 * expression.h (op_name, op_string, dump_raw_expression):
8395 Constify.
8396 * f-exp.y (yyerror): Constify.
8397 (struct token::oper): Constify.
8398 (struct f77_boolean_val::name): Constify.
8399 * f-lang.c (f_word_break_characters): Constify.
8400 * f-lang.h (f_yyerror): Constify.
8401 * fork-child.c (fork_inferior): Add cast.
8402 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
8403 (new_variant): Constify.
8404 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
8405 * gdbarch.c: Regenerate.
8406 * gdbcore.h (set_gnutarget): Constify.
8407 * go-exp.y (yyerror): Constify.
8408 (token::oper): Constify.
8409 * go-lang.h (go_yyerror): Constify.
8410 * go32-nat.c (go32_sysinfo): Constify.
8411 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
8412 * guile/scm-cmd.c (cmdscm_function): Constify.
8413 * guile/scm-param.c (pascm_param_value): Constify.
8414 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
8415 (h8300sx_register_name): Constify.
8416 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
8417 Constify.
8418 * ia64-tdep.c (ia64_register_names): Constify.
8419 * infcmd.c (construct_inferior_arguments): Constify.
8420 (path_command, attach_post_wait): Constify.
8421 * language.c (show_range_command, show_case_command)
8422 (unk_lang_error): Constify.
8423 * language.h (language_defn::la_error)
8424 (language_defn::la_name_of_this): Constify.
8425 * linespec.c (decode_line_2): Constify.
8426 * linux-thread-db.c (thread_db_err_str): Constify.
8427 * lm32-tdep.c (lm32_register_name): Constify.
8428 * m2-exp.y (yyerror): Constify.
8429 * m2-lang.h (m2_yyerror): Constify.
8430 * m32r-tdep.c (m32r_register_names): Constify and make static.
8431 * m68hc11-tdep.c (m68hc11_register_names): Constify.
8432 * m88k-tdep.c (m88k_register_name): Constify.
8433 * macroexp.c (appendmem): Constify.
8434 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
8435 (upgrade_type, parse_external, parse_partial_symbols)
8436 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
8437 (new_symbol): Constify.
8438 * memattr.c (mem_info_command): Constify.
8439 * mep-tdep.c (register_name_from_keyword): Constify.
8440 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
8441 Constify.
8442 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
8443 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
8444 * mi/mi-main.c (captured_mi_execute_command): Constify and add
8445 cast.
8446 (mi_execute_async_cli_command): Constify.
8447 * mips-tdep.c (mips_register_name): Constify.
8448 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
8449 (am33_register_name, am33_2_register_name)
8450 * moxie-tdep.c (moxie_register_names): Constify.
8451 * nat/linux-osdata.c (osdata_type): Constify fields.
8452 * nto-tdep.c (nto_parse_redirection): Constify.
8453 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
8454 (lookup_child_selector): Constify.
8455 (objc_methcall::name): Constify.
8456 * objc-lang.h (lookup_objc_class, lookup_child_selector)
8457 (lookup_struct_typedef): Constify.
8458 * objfiles.c (pc_in_section): Constify.
8459 * objfiles.h (pc_in_section): Constify.
8460 * p-exp.y (struct token::oper): Constify.
8461 (yyerror): Constify.
8462 * p-lang.h (pascal_yyerror): Constify.
8463 * parser-defs.h (op_name_standard): Constify.
8464 (op_print::string): Constify.
8465 (exp_descriptor::op_name): Constify.
8466 * printcmd.c (print_address_symbolic): Constify.
8467 * psymtab.c (print_partial_symbols): Constify.
8468 * python/py-breakpoint.c (stop_func): Constify.
8469 (bppy_get_expression): Constify.
8470 * python/py-cmd.c (cmdpy_completer::name): Constify.
8471 (cmdpy_function): Constify.
8472 * python/py-event.c (evpy_add_attribute)
8473 (gdbpy_initialize_event_generic): Constify.
8474 * python/py-event.h (evpy_add_attribute)
8475 (gdbpy_initialize_event_generic): Constify.
8476 * python/py-evts.c (add_new_registry): Constify.
8477 * python/py-finishbreakpoint.c (outofscope_func): Constify.
8478 * python/py-framefilter.c (get_py_iter_from_func): Constify.
8479 * python/py-inferior.c (get_buffer): Add cast.
8480 * python/py-param.c (parm_constant::name): Constify.
8481 * python/py-unwind.c (fprint_frame_id): Constify.
8482 * python/python.c (gdbpy_parameter_value): Constify.
8483 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
8484 * remote.c (memory_packet_config::name): Constify.
8485 (show_packet_config_cmd, remote_write_bytes)
8486 (remote_buffer_add_string):
8487 * reverse.c (exec_reverse_once): Constify.
8488 * rs6000-tdep.c (variant::name, variant::description): Constify.
8489 * rust-exp.y (rustyyerror): Constify.
8490 * rust-lang.c (rust_op_name): Constify.
8491 * rust-lang.h (rustyyerror): Constify.
8492 * serial.h (serial_ops::name): Constify.
8493 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
8494 (sh_sh3e_register_name, sh_sh2e_register_name)
8495 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
8496 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
8497 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
8498 (sh_sh4al_dsp_register_name): Constify.
8499 * sh64-tdep.c (sh64_register_name): Constify.
8500 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
8501 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
8502 * stabsread.c (patch_block_stabs, read_type_number)
8503 (ref_map::stabs, ref_add, process_reference)
8504 (symbol_reference_defined, define_symbol, define_symbol)
8505 (error_type, read_type, read_member_functions, read_cpp_abbrev)
8506 (read_one_struct_field, read_struct_fields, read_baseclasses)
8507 (read_tilde_fields, read_struct_type, read_array_type)
8508 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
8509 (read_huge_number, read_range_type, read_args, common_block_start)
8510 (find_name_end): Constify.
8511 * stabsread.h (common_block_start, define_symbol)
8512 (process_one_symbol, symbol_reference_defined, ref_add):
8513 * symfile.c (get_section_index, add_symbol_file_command):
8514 * symfile.h (get_section_index): Constify.
8515 * target-descriptions.c (tdesc_type::name): Constify.
8516 (tdesc_free_type): Add cast.
8517 * target.c (find_default_run_target):
8518 (add_deprecated_target_alias, find_default_run_target)
8519 (target_announce_detach): Constify.
8520 (do_option): Constify.
8521 * target.h (add_deprecated_target_alias): Constify.
8522 * thread.c (print_thread_info_1): Constify.
8523 * top.c (deprecated_readline_begin_hook, command_line_input):
8524 Constify.
8525 (init_main): Add casts.
8526 * top.h (handle_line_of_input): Constify.
8527 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
8528 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
8529 (tfind_command): Rename to ...
8530 (tfind_command_1): ... this and constify.
8531 (tfind_command): New function.
8532 (tfind_end_command, tfind_start_command): Adjust.
8533 (encode_source_string): Constify.
8534 * tracepoint.h (encode_source_string): Constify.
8535 * tui/tui-data.c (tui_partial_win_by_name): Constify.
8536 * tui/tui-data.h (tui_partial_win_by_name): Constify.
8537 * tui/tui-source.c (tui_set_source_content_nil): Constify.
8538 * tui/tui-source.h (tui_set_source_content_nil): Constify.
8539 * tui/tui-win.c (parse_scrolling_args): Constify.
8540 * tui/tui-windata.c (tui_erase_data_content): Constify.
8541 * tui/tui-windata.h (tui_erase_data_content): Constify.
8542 * tui/tui-winsource.c (tui_erase_source_content): Constify.
8543 * tui/tui.c (tui_enable): Add cast.
8544 * utils.c (defaulted_query): Constify.
8545 (init_page_info): Add cast.
8546 (puts_debug, subset_compare): Constify.
8547 * utils.h (subset_compare): Constify.
8548 * varobj.c (varobj_format_string): Constify.
8549 * varobj.h (varobj_format_string): Constify.
8550 * vax-tdep.c (vax_register_name): Constify.
8551 * windows-nat.c (windows_detach): Constify.
8552 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
8553 * xml-support.c (gdb_xml_end_element): Constify.
8554 * xml-tdesc.c (tdesc_start_reg): Constify.
8555 * xstormy16-tdep.c (xstormy16_register_name): Constify.
8556 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
8557 * xtensa-tdep.h (xtensa_register_t::name): Constify.
8558
8559 2017-04-05 Pedro Alves <palves@redhat.com>
8560
8561 * proc-api.c (struct trans): Constify.
8562 (procfs_note): Constify.
8563 * proc-events.c (struct trans, syscall_table):
8564 * proc-flags.c (struct trans): Constify.
8565 * proc-utils.h (procfs_note): Constify.
8566 * proc-why.c (struct trans): Constify.
8567 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
8568 (procfs_detach): Constify.
8569 * sol-thread.c (struct string_map): Constify.
8570 (td_err_string, td_state_string): Constify.
8571
8572 2017-04-05 Pedro Alves <palves@redhat.com>
8573
8574 * proc-api.c (procfs_filename): Don't initialize
8575 procfs_filename.
8576 (prepare_to_trace): Assume procfs_filename is non-NULL.
8577 (_initialize_proc_api): Give procfs_filename a default value here.
8578
8579 2017-04-05 Pedro Alves <palves@redhat.com>
8580
8581 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
8582 'cond_string' parameter.
8583 (extract_exception_regexp): Constify 'string' parameter.
8584 (catch_exception_command_1): Constify.
8585 * breakpoint.c (init_catchpoint)
8586 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
8587 parameter.
8588 (ep_parse_optional_if_clause, catch_fork_command_1)
8589 (catch_exec_command_1): Constify.
8590 * breakpoint.h (init_catchpoint): Constify 'cond_string'
8591 parameter.
8592 (ep_parse_optional_if_clause): Constify.
8593 * cli/cli-utils.c (remove_trailing_whitespace)
8594 (check_for_argument): Constify.
8595 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
8596 non-const overload.
8597 (check_for_argument): Likewise.
8598
8599 2017-04-05 Pedro Alves <palves@redhat.com>
8600
8601 * event-top.c (command_line_handler): Add cast to execute_command
8602 call.
8603 * record-btrace.c (cmd_record_btrace_bts_start)
8604 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
8605 (cmd_record_btrace_start): Add cast to execute_command call.
8606 * record-full.c (record_full_goto_insn):
8607 * record.c (record_start, record_stop): Add cast to
8608 execute_command_to_string calls.
8609 (cmd_record_start): Add cast to execute_command calls.
8610
8611 2017-04-05 Pedro Alves <palves@redhat.com>
8612
8613 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
8614 static inline function.
8615 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
8616 array and use gdb_PyArg_ParseTupleAndKeywords.
8617 * python/py-cmd.c (cmdpy_init): Likewise.
8618 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
8619 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
8620 (infpy_search_memory): Likewise.
8621 * python/py-objfile.c (objfpy_add_separate_debug_file)
8622 (gdbpy_lookup_objfile): Likewise.
8623 * python/py-symbol.c (gdbpy_lookup_symbol)
8624 (gdbpy_lookup_global_symbol): Likewise.
8625 * python/py-type.c (gdbpy_lookup_type): Likewise.
8626 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
8627 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
8628 Likewise.
8629
8630 2017-04-05 Pedro Alves <palves@redhat.com>
8631
8632 * python/python-internal.h (gdb_PyGetSetDef): New type.
8633 * python/py-block.c (block_object_getset)
8634 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
8635 * python/py-event.c (event_object_getset)
8636 (finish_breakpoint_object_getset): Likewise.
8637 * python/py-inferior.c (inferior_object_getset): Likewise.
8638 * python/py-infthread.c (thread_object_getset): Likewise.
8639 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
8640 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
8641 * python/py-objfile.c (objfile_getset): Likewise.
8642 * python/py-progspace.c (pspace_getset): Likewise.
8643 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
8644 Likewise.
8645 * python/py-record.c (recpy_record_getset): Likewise.
8646 * python/py-symbol.c (symbol_object_getset): Likewise.
8647 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
8648 Likewise.
8649 * python/py-type.c (type_object_getset, field_object_getset):
8650 Likewise.
8651 * python/py-value.c (value_object_getset): Likewise.
8652
8653 2017-04-05 Pedro Alves <palves@redhat.com>
8654
8655 * python/python-internal.h (gdb_PyObject_CallMethod)
8656 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
8657 New functions.
8658 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
8659 (PySys_GetObject, PySys_SetPath): New macros.
8660
8661 2017-04-05 Pedro Alves <palves@redhat.com>
8662
8663 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
8664 info_osdata_command.
8665 * osdata.c (info_osdata_command): Rename to ...
8666 (info_osdata): ... this. Constify 'type' parameter, and remove
8667 the 'from_tty' parameter. Accept NULL TYPE.
8668 (info_osdata_command): New function.
8669 * osdata.h (info_osdata_command): Remove declaration.
8670 (info_osdata): New declaration.
8671
8672 2017-04-05 Pedro Alves <palves@redhat.com>
8673
8674 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
8675 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
8676 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
8677 parameter.
8678 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
8679 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
8680 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
8681 parameter.
8682 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
8683 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
8684 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
8685 (mi_cmd_file_list_exec_source_files)
8686 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
8687 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8688 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
8689 parameter.
8690 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
8691 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
8692 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
8693 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
8694 (mi_cmd_stack_info_frame): Constify 'command' parameter.
8695 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
8696 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
8697 'command' parameter.
8698 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
8699 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
8700 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
8701 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
8702 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
8703 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
8704 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
8705 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
8706 (mi_cmd_var_set_update_range): Constify 'command' parameter.
8707 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
8708 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
8709 parameter.
8710 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
8711 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
8712 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
8713 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
8714 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
8715 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
8716 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
8717 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
8718 (mi_cmd_data_list_changed_registers)
8719 (mi_cmd_data_write_register_values)
8720 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8721 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8722 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8723 (mi_cmd_list_features, mi_cmd_list_target_features)
8724 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8725 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8726 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8727 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8728 (mi_cmd_trace_frame_collected): Constify 'command'
8729 parameter.
8730 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8731 'command' parameter.
8732
8733 2017-04-05 Pedro Alves <palves@redhat.com>
8734
8735 * ada-lang.c (ada_completer_word_break_characters): Now a const
8736 array.
8737 (ada_get_gdb_completer_word_break_characters): Constify.
8738 * completer.c (gdb_completer_command_word_break_characters)
8739 (gdb_completer_file_name_break_characters)
8740 (gdb_completer_quote_characters): Now const arrays.
8741 (get_gdb_completer_quote_characters): Constify.
8742 (set_rl_completer_word_break_characters): New function.
8743 (set_gdb_completion_word_break_characters)
8744 (complete_line_internal): Use it.
8745 * completer.h (get_gdb_completer_quote_characters): Constify.
8746 (set_rl_completer_word_break_characters): Declare.
8747 * f-lang.c (f_word_break_characters): Constify.
8748 * language.c (default_word_break_characters): Constify.
8749 * language.h (language_defn::la_word_break_characters): Constify.
8750 (default_word_break_characters): Constify.
8751 * top.c (init_main): Use set_rl_completer_word_break_characters.
8752
8753 2017-04-05 Pedro Alves <palves@redhat.com>
8754
8755 * aix-thread.c (aix_thread_pid_to_str)
8756 (aix_thread_extra_thread_info): Constify.
8757 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8758 * bsd-uthread.c (bsd_uthread_extra_thread_info)
8759 (bsd_uthread_pid_to_str): Constify.
8760 * corelow.c (core_pid_to_str): Constify.
8761 * darwin-nat.c (darwin_pid_to_str): Constify.
8762 * fbsd-nat.c (fbsd_pid_to_str): Constify.
8763 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8764 Constify.
8765 * gnu-nat.c (gnu_pid_to_str): Constify.
8766 * go32-nat.c (go32_pid_to_str): Constify.
8767 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8768 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8769 * inferior.c (inferior_pid_to_str): Constify.
8770 * linux-nat.c (linux_nat_pid_to_str): Constify.
8771 * linux-tdep.c (linux_core_pid_to_str): Constify.
8772 * linux-thread-db.c (thread_db_pid_to_str)
8773 (thread_db_extra_thread_info): Constify.
8774 * nto-tdep.c (nto_extra_thread_info): Constify.
8775 * nto-tdep.h (nto_extra_thread_info): Constify.
8776 * obsd-nat.c (obsd_pid_to_str): Constify.
8777 * procfs.c (procfs_pid_to_str): Constify.
8778 * ravenscar-thread.c (ravenscar_extra_thread_info)
8779 (ravenscar_pid_to_str): Constify.
8780 * remote-sim.c (gdbsim_pid_to_str): Constify.
8781 * remote.c (remote_threads_extra_info, remote_pid_to_str):
8782 Constify.
8783 * sol-thread.c (solaris_pid_to_str): Constify.
8784 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8785 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8786 * target.c (default_pid_to_str, target_pid_to_str)
8787 (normal_pid_to_str, default_pid_to_str): Constify.
8788 * target.h (target_ops::to_pid_to_str)
8789 (target_ops::to_extra_thread_info): Constify.
8790 (target_pid_to_str, normal_pid_to_str): Constify.
8791 * windows-nat.c (windows_pid_to_str): Constify.
8792 * gdbarch.sh (core_pid_to_str): Constify.
8793 * target-delegates.c: Regenerate.
8794 * gdbarch.h, gdbarch.c: Regenerate.
8795
8796 2017-04-05 Pedro Alves <palves@redhat.com>
8797
8798 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8799 the memory of the temporary warning_pre_print override.
8800 * utils.c (warning_pre_print): Constify.
8801 * utils.h (warning_pre_print): Constify.
8802
8803 2017-04-05 Pedro Alves <palves@redhat.com>
8804
8805 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8806 (shell_command): New function.
8807 (make_command): Use std::string.
8808 (init_cli_cmds): Register shell_command instead of shell_escape.
8809
8810 2017-04-05 Pedro Alves <palves@redhat.com>
8811
8812 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
8813 * tracepoint.c (default_collect): Don't initialize.
8814
8815 2017-04-05 Pedro Alves <palves@redhat.com>
8816
8817 * macroexp.c (macro_buffer::shared): Now a bool.
8818 (init_buffer): Update.
8819 (init_shared_buffer): Constify 'addr' parameter.
8820 (substitute_args, expand, macro_expand, macro_expand_next): Remove
8821 casts.
8822
8823 2017-04-05 Pedro Alves <palves@redhat.com>
8824
8825 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
8826 * disasm.c (set_disassembler_options): Constify local.
8827 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
8828
8829 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
8830
8831 PR gdb/21352
8832 * tracefile.c (tsave_command): Fix argument parsing for '-r'
8833 option.
8834
8835 2017-04-05 Yao Qi <yao.qi@linaro.org>
8836
8837 * frame.c (frame_unwind_register_unsigned): Call
8838 frame_unwind_register_value.
8839
8840 2017-04-05 Yao Qi <yao.qi@linaro.org>
8841
8842 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
8843 Use gdb_test_multiple, and don't match anchor.
8844
8845 2017-04-05 Pedro Alves <palves@redhat.com>
8846
8847 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
8848 (Write After Approval): Remove Simon Marchi.
8849
8850 2017-04-05 Pedro Alves <palves@redhat.com>
8851
8852 * common/gdb_optional.h (optional::optional): Make constexpr and
8853 initialize m_dummy.
8854
8855 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8856
8857 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8858 (amd64fbsd_jmp_buf_reg_offset): Remove.
8859 (amd64fbsd_supply_uthread): Remove function.
8860 (amd64fbsd_collect_uthread): Remove function.
8861 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
8862 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
8863 (x86_64-*-freebsd*): Remove bsd-uthread.o.
8864 (fbsd-nat.c): Update comment.
8865 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8866 (i386fbsd_jmp_buf_reg_offset): Remove.
8867 (i386fbsd_supply_uthread): Remove function.
8868 (i386fbsd_collect_uthread): Remove function.
8869 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
8870
8871 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8872
8873 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
8874 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
8875 * NEWS: Mention that support for FreeBSD/alpha was removed.
8876 * alpha-fbsd-tdep.c: Delete file.
8877 * config/alpha/fbsd.mh: Delete file.
8878 * configure.host: Delete alpha*-*-freebsd* and
8879 alpha*-*-kfreebsd*-gnu.
8880 * configure.tgt: Delete alpha*-*-freebsd* and
8881 alpha*-*-kfreebsd*-gnu.
8882
8883 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8884
8885 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
8886 amd64bsd_store_inferior_registers): Use ptid from regcache.
8887
8888 2017-04-04 Pedro Alves <palves@redhat.com>
8889
8890 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
8891 data fields, make them private and add "m_" prefixes.
8892 (lnp_state_machine::lnp_state_machine): New ctor.
8893 (record_line, check_line_address, handle_set_discriminator)
8894 (handle_set_address, handle_advance_pc, handle_special_opcode)
8895 (handle_advance_line, handle_set_file, handle_negate_stmt)
8896 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
8897 (end_sequence, advance_line): New methods.
8898 (m_gdbarch, m_record_lines_p): New fields.
8899 (lnp_reader_state): Delete.
8900 (dwarf_record_line): Rename to ...
8901 (lnp_state_machine::record_line): ... adjust.
8902 (init_lnp_state_machine): Delete.
8903 (lnp_state_machine::lnp_state_machine): New.
8904 (check_line_address): Rename to ...
8905 (lnp_state_machine::check_line_address): This.
8906 (dwarf_decode_lines_1): Remove reference to "reader_state".
8907 Adjust lnp_state_machine having a non-default ctor. Use bool.
8908 State machine internal state manipulation moved to
8909 lnp_state_machine methods.
8910
8911 2017-04-04 Pedro Alves <palves@redhat.com>
8912
8913 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8914 unittests/offset-type-selftests.c.
8915 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
8916 * common/offset-type.h: New file.
8917 * common/preprocessor.h: New file.
8918 * common/traits.h: New file.
8919 * common/valid-expr.h: New file.
8920 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
8921 sect_offset and cu_offset strong typedefs throughout.
8922 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
8923 typedefs throughout.
8924 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
8925 sect_offset and cu_offset strong typedefs throughout.
8926 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
8927 typedefs throughout.
8928 * gdbtypes.h: Include "common/offset-type.h".
8929 (cu_offset): Now an offset type (strong typedef) instead of a
8930 struct.
8931 (sect_offset): Likewise.
8932 (union call_site_parameter_u): Rename "param_offset" field to
8933 "param_cu_off".
8934 * unittests/offset-type-selftests.c: New file.
8935
8936 2017-04-04 Pedro Alves <palves@redhat.com>
8937
8938 * common/underlying.h: New file.
8939 * dwarf2read.c: Include "common/gdb_optional.h" and
8940 "common/underlying.h".
8941 (dir_index, file_name_index): New types.
8942 (file_entry): Use them.
8943 (file_entry::include): Use to_underlying.
8944 (line_header::add_file_name): Use dir_index.
8945 (read_formatted_entries): Use gdb::optional. Read form before
8946 writting to file_entry.
8947 (dwarf_decode_line_header): Use dir_index.
8948 (lnp_state_machine::current_file): Use to_underlying.
8949 (lnp_state_machine::file): Change type to file_name_index.
8950 (dwarf_record_line): Use to_underlying.
8951 (init_lnp_state_machine): Use file_name_index.
8952 (dwarf_decode_lines_1): Use dir_index and file_name_index.
8953
8954 2017-04-04 Pedro Alves <palves@redhat.com>
8955
8956 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
8957 operator bool, has_value and get methods.
8958
8959 2017-04-04 Pedro Alves <palves@redhat.com>
8960
8961 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
8962 fields.
8963 (line_header): Initialize all data fields. Change type of
8964 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
8965 Change type of include_dirs to std::vector<const char *>. Remove
8966 num_include_dirs, include_dirs_size. Change type of file_names to
8967 std::vector<file_entry>. Remove num_file_names, file_names_size.
8968 (line_header::line_header): New.
8969 (line_header::add_include_dir, line_header::add_file_name): New
8970 methods.
8971 (line_header::include_dir_at): Remove NULL check.
8972 (line_header::file_name_at): Add const overload.
8973 (line_header_up): New unique_ptr typedef.
8974 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
8975 std::vector. Remove free_line_header call.
8976 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
8977 free_line_header call.
8978 (free_cu_line_header): Delete.
8979 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
8980 (setup_type_unit_groups): Use line_header_up instead of cleanups.
8981 Adjust to use std::vector.
8982 (free_line_header): Delete.
8983 (free_line_header_voidp): Use delete.
8984 (add_include_dir): Replace with ...
8985 (line_header::add_include_dir): ... this method. Use std::vector.
8986 (add_file_name): Replace with ...
8987 (line_header::add_file_name): ... this method. Use std::vector.
8988 (add_include_dir_stub): Delete.
8989 (read_formatted_entries): Remove memset.
8990 (dwarf_decode_line_header): Return a line_header_up instead of a
8991 raw pointer. Remove cleanup handling. Pass lambdas to
8992 read_formatted_entries. Adjust to use line_header methods.
8993 (dwarf_decode_lines_1): Adjust to use line_header methods.
8994 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
8995 use std::vector.
8996
8997 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
8998
8999 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
9000 instead of struct ptid.
9001
9002 2017-05-04 Alan Hayward <alan.hayward@arm.com>
9003
9004 * frame.c (get_frame_register_bytes): Unwind using value.
9005 (put_frame_register_bytes): Likewise.
9006
9007 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
9008
9009 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
9010 aggregate-like.
9011
9012 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
9013
9014 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
9015
9016 2017-03-29 Yao Qi <yao.qi@linaro.org>
9017
9018 * gdbthread.h (struct thread_info): Declare constructor and
9019 destructor. Add some in-class member initializers.
9020 * thread.c (free_thread): Remove.
9021 (init_thread_list): Call delete instead of free_thread.
9022 (new_thread): Call thread_info constructor.
9023 (thread_info::thread_info): New function.
9024 (thread_info::~thread_info): New function.
9025 (delete_thread_1): Call delete instead of free_thread.
9026 (make_cleanup_restore_current_thread): Move tp and frame to
9027 inner block.
9028
9029 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9030
9031 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
9032 (arc_skip_prologue): Likewise.
9033 (arc_make_frame_cache): Likewise.
9034 (arc_pv_get_operand): New function.
9035 (arc_is_in_prologue): Likewise.
9036 (arc_analyze_prologue): Likewise.
9037 (arc_print_frame_cache): Likewise.
9038 (MAX_PROLOGUE_LENGTH): New constant.
9039
9040 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9041
9042 * configure.tgt: Add arc-insn.o.
9043 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
9044 (dump_arc_instruction_command): New function.
9045 (arc_fprintf_disasm): Likewise.
9046 (arc_disassemble_info): Likewise.
9047 (arc_insn_get_operand_value): Likewise.
9048 (arc_insn_get_operand_value_signed): Likewise.
9049 (arc_insn_get_memory_base_reg): Likewise.
9050 (arc_insn_get_memory_offset): Likewise.
9051 (arc_insn_get_branch_target): Likewise.
9052 (arc_insn_dump): Likewise.
9053 (arc_insn_get_linear_next_pc): Likewise.
9054 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
9055 (arc_disassemble_info): Likewise.
9056 (arc_insn_get_branch_target): Likewise.
9057 (arc_insn_get_linear_next_pc): Likewise.
9058 * NEWS: Mention new "maint print arc arc-instruction".
9059
9060 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9061
9062 * arc-tdep (maintenance_print_arc_list): New variable.
9063 (maintenance_print_arc_command): New function.
9064
9065 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9066
9067 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
9068 Add "limm" and "reserved".
9069 (arc_cannot_fetch_register, arc_cannot_store_register): Add
9070 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
9071 * arc-tdep.h (arc_regnum): Likewise.
9072
9073 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9074
9075 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9076 for THREADPTR register.
9077 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
9078 register.
9079 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
9080 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
9081 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
9082
9083 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9084
9085 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
9086 registers above gdbarch_num_regs (gdbarch) as privileged in
9087 call0 ABI.
9088
9089 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9090
9091 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9092 for a single specified register or for all registers in
9093 a0_base..a0_base + C0_NREGS range.
9094 (supply_gregset_reg): Call regcache_raw_supply for a single
9095 specified register or for all registers in a0_base..a0_base +
9096 C0_NREGS range.
9097
9098 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9099
9100 * arch/xtensa.h (C0_NREGS): Add definition.
9101 * xtensa-tdep.c (C0_NREGS): Remove definition.
9102
9103 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9104
9105 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9106 Drop xtensa_default_isa initialization.
9107 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9108
9109 2017-03-27 Pedro Alves <palves@redhat.com>
9110
9111 * dwarf2read.c (file_entry) <dir_index>: Add comment.
9112 (file_entry::include_dir): New method.
9113 (line_header::include_dir_at, line_header::file_name_at): New
9114 methods.
9115 (setup_type_unit_groups, setup_type_unit_groups)
9116 (psymtab_include_file_name): Simplify using the new methods.
9117 (lnp_state_machine) <the_line_header>: New field.
9118 <file>: Add comment.
9119 (lnp_state_machine::current_file): New method.
9120 (dwarf_record_line): Simplify using the new methods.
9121 (init_lnp_state_machine): Initialize the "the_line_header" field.
9122 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9123 Simplify using the new methods.
9124
9125 2017-03-27 Pedro Alves <palves@redhat.com>
9126
9127 * cp-name-parser.y (make_empty): Delete.
9128 (demangler_special, nested_name, ptr_operator, array_indicator)
9129 (direct_declarator, declarator_1): Use fill_comp instead of
9130 make_empty.
9131
9132 2017-03-27 Pedro Alves <palves@redhat.com>
9133
9134 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9135 to ATTRIBUTE_PRINTF.
9136 * solib-target.c (library_list_start_list): Print "string" not
9137 "version".
9138 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9139 gdb_xml_error call.
9140
9141 2017-03-27 Pedro Alves <palves@redhat.com>
9142
9143 * dwarf2read.c (struct file_and_directory): New.
9144 (dwarf2_get_dwz_file): Adjust to use std::string.
9145 (dw2_get_file_names_reader): Adjust to use file_and_directory.
9146 (find_file_and_directory): Adjust to return a file_and_directory
9147 object.
9148 (read_file_scope): Adjust to use file_and_directory. Remove
9149 make_cleanup/do_cleanups calls.
9150 (open_and_init_dwp_file): Adjust to use std::string. Remove
9151 make_cleanup/do_cleanups calls.
9152 * python/python.c (do_start_initialization): Adjust to ldirname
9153 returning a std::string.
9154 * utils.c (ldirname): Now returns a std::string.
9155 * utils.h (ldirname): Change return type to std::string.
9156 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9157 returning a std::string.
9158 * xml-tdesc.c (file_read_description_xml): Likewise.
9159
9160 2017-03-24 Alan Hayward <alan.hayward@arm.com>
9161
9162 * regcache.c (regcache_debug_print_register): New function.
9163 * regcache.h (regcache_debug_print_register): New declaration.
9164 * target.c (debug_print_register): Remove.
9165 (target_fetch_registers): Call regcache_debug_print_register.
9166 (target_store_registers): Likewise.
9167
9168 2017-03-24 Pádraig Brady <pbrady@fb.com>
9169
9170 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
9171 reference beyond the 'lh->include_dirs' array before accessing to
9172 it.
9173 (psymtab_include_file_name): Likewise.
9174 (dwarf_decode_lines_1): Likewise.
9175 (dwarf_decode_lines): Likewise.
9176 (file_file_name): Likewise.
9177
9178 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
9179
9180 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
9181 inferior_ptid.
9182 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9183 ps_lsetfpregs): Likewise.
9184 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
9185 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9186 ps_lsetfpregs): Likewise.
9187 * target.c (target_fetch_registers, target_store_registers):
9188 Remove asserts.
9189
9190 2017-03-23 Alan Hayward <alan.hayward@arm.com>
9191
9192 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
9193
9194 2017-03-23 Yao Qi <yao.qi@linaro.org>
9195
9196 * aarch64-tdep.c (aarch64_process_record_test): Declare.
9197 (_initialize_aarch64_tdep): Register it.
9198 (aarch64_record_load_store): Handle PRFM instruction.
9199 (aarch64_process_record_test): New function.
9200
9201 2017-03-23 Yao Qi <yao.qi@linaro.org>
9202
9203 * aarch64-tdep.c (aarch64_record_load_store): Fix code
9204 indentation.
9205
9206 2017-03-23 Yao Qi <yao.qi@linaro.org>
9207
9208 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
9209
9210 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9211
9212 python/python.c (do_start_initialization): Fix memory leak.
9213
9214 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9215
9216 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9217 using get_ptrace_pid.
9218 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9219 inferior_ptid.
9220 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9221 inferior_ptid instead of pid.
9222
9223 2017-03-22 Yao Qi <yao.qi@linaro.org>
9224
9225 * aarch64-tdep.c: Wrap locally used classes in anonymous
9226 namespace.
9227 * arm-tdep.c: Likewise.
9228 * linespec.c: Likewise.
9229 * ui-out.c: Likewise.
9230
9231 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
9232
9233 PR gdb/19637
9234 * python/lib/gdb/printer/bound_registers.py: Import sys.
9235
9236 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9237
9238 * windows-nat.c (do_windows_fetch_inferior_registers): Add
9239 windows_thread_info parameter and use it instead of
9240 current_thread.
9241 (windows_fetch_inferior_registers): Don't set current_thread,
9242 pass the thread to do_windows_fetch_inferior_registers. Use
9243 ptid from regcache instead of inferior_ptid.
9244 (do_windows_store_inferior_registers): Add windows_thread_info
9245 parameter and use it instead of current_thread.
9246 (windows_store_inferior_registers): Don't set current_thread,
9247 pass the thread to do_windows_store_inferior_registers. Use
9248 ptid from regcache instead of inferior_ptid.
9249
9250 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9251
9252 * ser-mingw.c (ser_windows_raw): Remove reference to
9253 struct serial::current_timeout.
9254
9255 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
9256
9257 PR tdep/20928
9258 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9259 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9260 (sparc64_fsr_type): Fix %fsr decoding.
9261
9262 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
9263
9264 * python/py-record-btrace.c (btpy_insn_data): Change return type
9265 for Python 2.
9266
9267 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9268
9269 * spu-linux-nat.c (spu_fetch_inferior_registers,
9270 spu_store_inferior_registers): Use ptid from regcache, set and
9271 restore inferior_ptid.
9272 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9273 Likewise.
9274
9275 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9276
9277 * i386-linux-nat.c (fetch_register, store_register,
9278 i386_linux_fetch_inferior_registers,
9279 i386_linux_store_inferior_registers): Use ptid from regcache.
9280 * ia64-linux-nat.c (ia64_linux_fetch_register,
9281 ia64_linux_store_register): Likewise.
9282 * inf-ptrace.c (inf_ptrace_fetch_register,
9283 inf_ptrace_store_register): Likewise.
9284 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
9285 m32r_linux_store_inferior_registers): Likewise.
9286 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
9287 m68kbsd_store_inferior_registers): Likewise.
9288 * m68k-linux-nat.c (fetch_register, store_register,
9289 m68k_linux_fetch_inferior_registers,
9290 m68k_linux_store_inferior_registers): Likewise.
9291 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
9292 m88kbsd_store_inferior_registers): Likewise.
9293 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
9294 mips_fbsd_store_inferior_registers): Likewise.
9295 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
9296 mips64_linux_regsets_store_registers): Likewise.
9297 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
9298 mipsnbsd_store_inferior_registers): Likewise.
9299 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
9300 mips64obsd_store_inferior_registers): Likewise.
9301 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
9302 Likewise.
9303 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
9304 ppcfbsd_store_inferior_registers): Likewise.
9305 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
9306 ppc_linux_store_inferior_registers): Likewise.
9307 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
9308 ppcnbsd_store_inferior_registers): Likewise.
9309 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
9310 ppcobsd_store_registers): Likewise.
9311 * procfs.c (procfs_fetch_registers, procfs_store_registers):
9312 Likewise.
9313 * ravenscar-thread.c (ravenscar_fetch_registers,
9314 ravenscar_store_registers, ravenscar_prepare_to_store):
9315 Likewise.
9316 * record-btrace.c (record_btrace_fetch_registers,
9317 record_btrace_store_registers, record_btrace_prepare_to_store):
9318 Likewise.
9319 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
9320 Lookup inferior using ptid from regcache, instead of
9321 current_inferior.
9322 * remote.c (remote_fetch_registers, remote_store_registers): Use
9323 ptid from regcache.
9324 * rs6000-nat.c (fetch_register, store_register): Likewise.
9325 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
9326 s390_linux_store_inferior_registers): Likewise.
9327 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
9328 shnbsd_store_inferior_registers): Likewise.
9329 * sol-thread.c (sol_thread_fetch_registers,
9330 sol_thread_store_registers): Likewise.
9331 * sparc-nat.c (sparc_fetch_inferior_registers,
9332 sparc_store_inferior_registers): Likewise.
9333 * tilegx-linux-nat.c (fetch_inferior_registers,
9334 store_inferior_registers): Likewise.
9335 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
9336 vaxbsd_store_inferior_registers): Likewise.
9337 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
9338 store_xtregs): Likewise.
9339
9340 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9341
9342 PR gdb/14441
9343 * NEWS: Mention support for rvalue references in GDB and python.
9344 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
9345 supports both lvalue and rvalue references.
9346
9347 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9348
9349 PR gdb/14441
9350 * gdbtypes.c (rank_one_type): Implement overloading
9351 resolution rules regarding rvalue references.
9352
9353 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9354
9355 PR gdb/14441
9356 * aarch64-tdep.c (aarch64_type_align)
9357 (aarch64_extract_return_value, aarch64_store_return_value): Change
9358 lvalue reference type checks to general reference type checks.
9359 * amd64-tdep.c (amd64_classify): Likewise.
9360 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
9361 Likewise.
9362 * arm-tdep.c (arm_type_align, arm_extract_return_value)
9363 (arm_store_return_value): Likewise.
9364 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
9365 * c-typeprint.c (c_print_type): Likewise.
9366 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
9367 (cplus_number_of_children, cplus_describe_child): Likewise.
9368 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
9369 * completer.c (expression_completer): Likewise.
9370 * cp-support.c (make_symbol_overload_list_adl_namespace):
9371 Likewise.
9372 * darwin-nat-info.c (info_mach_region_command): Likewise.
9373 * dwarf2loc.c (entry_data_value_coerce_ref)
9374 (value_of_dwarf_reg_entry): Likewise.
9375 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
9376 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
9377 Likewise.
9378 * findvar.c (extract_typed_address, store_typed_address):
9379 Likewise.
9380 * gdbtypes.c (rank_one_type): Likewise.
9381 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
9382 * infcall.c (value_arg_coerce): Likewise.
9383 * language.c (pointer_type): Likewise.
9384 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
9385 Likewise.
9386 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
9387 * mn10300-tdep.c (mn10300_type_align): Likewise.
9388 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
9389 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
9390 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
9391 Likewise.
9392 * printcmd.c (print_formatted, x_command): Likewise.
9393 * python/py-type.c (typy_get_composite, typy_template_argument):
9394 Likewise.
9395 * python/py-value.c (valpy_referenced_value)
9396 (valpy_get_dynamic_type, value_has_field): Likewise.
9397 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
9398 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
9399 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
9400 * spu-tdep.c (spu_scalar_value_p): Likewise.
9401 * symtab.c (lookup_symbol_aux): Likewise.
9402 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
9403 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
9404 Likewise.
9405 * valops.c (value_cast_pointers, value_cast)
9406 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
9407 (value_struct_elt, value_struct_elt_bitpos)
9408 (value_find_oload_method_list, find_overload_match)
9409 (value_rtti_indirect_type): Likewise.
9410 * valprint.c (val_print_scalar_type_p, generic_val_print):
9411 Likewise.
9412 * value.c (value_actual_type, value_as_address, unpack_long)
9413 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
9414 (coerce_ref): Likewise.
9415 * varobj.c (varobj_get_value_type): Likewise.
9416
9417 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9418
9419 PR gdb/14441
9420 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
9421 table of constants.
9422 * python/lib/gdb/command/explore.py: Support exploring values
9423 of rvalue reference types.
9424 * python/lib/gdb/types.py: Implement get_basic_type() for
9425 rvalue reference types.
9426 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
9427 constant.
9428 * python/py-value.c (valpy_getitem): Add an rvalue reference
9429 check.
9430 (valpy_reference_value): Add new parameter "refcode".
9431 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
9432 New wrappers for valpy_reference_value().
9433 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9434 (gdbpy_invoke_xmethod): Likewise.
9435
9436 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9437
9438 PR gdb/14441
9439 * dwarf2read.c (process_die, read_type_die_1): Handle the
9440 DW_TAG_rvalue_reference_type DIE.
9441 (read_tag_reference_type): Add new parameter "refcode".
9442
9443 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9444
9445 PR gdb/14441
9446 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
9447 (c_type_print_modifier, c_type_print_varspec_suffix)
9448 (c_type_print_base): Support printing rvalue reference types.
9449 * c-valprint.c (c_val_print, c_value_print): Support printing
9450 rvalue reference values.
9451
9452 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9453
9454 PR gdb/14441
9455 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
9456 typename.
9457 * cp-support.c (replace_typedefs): Handle
9458 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
9459 * python/py-type.c (typy_lookup_type): Likewise.
9460
9461 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9462
9463 PR gdb/14441
9464 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
9465 * parse.c (insert_type): Change assert statement.
9466 (follow_types): Handle rvalue reference types.
9467 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
9468 constant.
9469
9470 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9471
9472 PR gdb/14441
9473 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
9474 value_ref() interface.
9475 * c-valprint.c (c_value_print): Likewise.
9476 * infcall.c (value_arg_coerce): Likewise.
9477 * python/py-value.c (valpy_reference_value): Likewise.
9478 * valops.c (value_cast, value_reinterpret_cast)
9479 (value_dynamic_cast, typecmp): Likewise.
9480 (value_ref): Parameterize by kind of return value reference type.
9481 * value.h (value_ref): Add new parameter "refcode".
9482
9483 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9484
9485 PR gdb/14441
9486 * dwarf2read.c (read_tag_reference_type): Use
9487 lookup_lvalue_reference_type() instead of lookup_reference_type().
9488 * eval.c (evaluate_subexp_standard): Likewise.
9489 * f-exp.y: Likewise.
9490 * gdbtypes.c (make_reference_type, lookup_reference_type):
9491 Generalize with rvalue reference types.
9492 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
9493 convenience wrappers for lookup_reference_type().
9494 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
9495 reference kind parameter.
9496 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
9497 wrappers for lookup_reference_type().
9498 * guile/scm-type.c (gdbscm_type_reference): Use
9499 lookup_lvalue_reference_type() instead of lookup_reference_type().
9500 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
9501 * parse.c (follow_types): Likewise.
9502 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
9503 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
9504 Likewise.
9505 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9506 (gdbpy_invoke_xmethod): Likewise.
9507 * stabsread.c: Provide extra argument to make_reference_type()
9508 call.
9509 * valops.c (value_ref, value_rtti_indirect_type): Use
9510 lookup_lvalue_reference_type() instead of lookup_reference_type().
9511
9512 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9513
9514 PR gdb/14441
9515 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
9516 (TYPE_IS_REFERENCE): New macro.
9517 (struct type): Add rvalue_reference_type field.
9518 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
9519
9520 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9521
9522 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
9523 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
9524 New function definition.
9525 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
9526 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
9527 New function declaration.
9528 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
9529 * mi/mi-interp.h: New file.
9530 * solib.c (info_sharedlibrary_command): Replace for loop with
9531 ALL_SO_LIBS macro
9532 * solib.h (update_solib_list): New function declaration.
9533 (so_list_head): Move macro.
9534 * solist.h (ALL_SO_LIBS): New macro.
9535
9536 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9537
9538 * infcmd.c (post_create_inferior): Remove unused argument in
9539 call to solib_add.
9540 * remote.c (remote_start_remote): Likewise.
9541 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
9542 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
9543 (enable_break): Likewise.
9544 * solib.c (update_solib_list): Remove unused target argument
9545 and its documentation.
9546 (solib_add): Remove unused target argument. Remove unused
9547 argument in call to update_solib_list.
9548 (info_sharedlibrary_command): Remove unused argument in call
9549 to update_solib_list.
9550 (sharedlibrary_command): Remove unused argument in call to
9551 solib_add.
9552 (handle_solib_event): Likewise.
9553 (reload_shared_libraries): Likewise.
9554 * solib.h (solib_add): Remove unused target argument.
9555
9556 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
9557
9558 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
9559 (s390_displaced_step_fixup): Cover relative branches with the
9560 default fixup handling. This fixes lack of support for some
9561 relative branch instructions.
9562
9563 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9564
9565 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
9566 ptid from regcache.
9567
9568 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9569
9570 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
9571 i386_darwin_store_inferior_registers): Use ptid from regcache.
9572
9573 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9574
9575 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
9576 i386bsd_store_inferior_registers): Use ptid from regcache.
9577
9578 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9579
9580 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
9581 hppaobsd_store_registers): Use ptid from regcache.
9582
9583 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9584
9585 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
9586 hppanbsd_store_registers): Use ptid from regcache.
9587
9588 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9589
9590 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
9591 from regcache. Use get_ptrace_pid.
9592
9593 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9594
9595 * corelow.c (get_core_register_section): Use ptid from regcache,
9596 update doc.
9597
9598 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9599
9600 * bsd-uthread.c (bsd_uthread_fetch_registers,
9601 bsd_uthread_store_registers): Use ptid from regcache, set and
9602 restore inferior_ptid.
9603
9604 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9605
9606 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
9607 fetch_fp_regs, store_register, store_regs, store_fp_register,
9608 store_fp_regs): Use ptid from regcache.
9609
9610 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9611
9612 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
9613 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
9614 store_vfp_regs): Use ptid from regcache.
9615
9616 2017-03-17 Pedro Alves <palves@redhat.com>
9617
9618 PR remote/21188
9619 * ser-base.c (ser_base_wait_for): Add comment.
9620 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
9621 version.
9622 * ser-unix.c (hardwire_raw): Remove reference to
9623 scb->current_timeout.
9624 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
9625 (hardwire_ops): Install ser_base_readchar instead of
9626 hardwire_readchar.
9627 * serial.h (struct serial) <current_timeout, timeout_remaining>:
9628 Remove fields.
9629
9630 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
9631
9632 PR gdb/19637
9633 * python/lib/gdb/printer/bound_registers.py: Add support for
9634 Python 3.
9635
9636 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
9637
9638 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
9639 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
9640 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
9641 byte_offset to subobj_byte_offset. Fix the handling of
9642 DWARF_VALUE_STACK on big-endian targets when coming via an
9643 implicit pointer.
9644 (dwarf2_evaluate_loc_desc): Adjust call to
9645 dwarf2_evaluate_loc_desc_full.
9646 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
9647 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
9648
9649 2017-03-16 Yao Qi <yao.qi@linaro.org>
9650
9651 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
9652 and REVSH instructions.
9653
9654 2017-03-16 Yao Qi <yao.qi@linaro.org>
9655
9656 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
9657 (arm_record_test): Declare.
9658 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
9659 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
9660 align with the manual.
9661 (thumb_record_misc): Adjust the code order to align with the
9662 manual.
9663 (thumb2_record_decode_insn_handler): Fix instruction matching.
9664 (instruction_reader_thumb): New class.
9665 (arm_record_test): New function.
9666
9667 2017-03-16 Yao Qi <yao.qi@linaro.org>
9668
9669 * arm-tdep.c (abstract_memory_reader): New class.
9670 (instruction_reader): New class.
9671 (extract_arm_insn): Add argument 'reader'. Callers updated.
9672 (decode_insn): Likewise.
9673
9674 2017-03-16 Doug Evans <dje@google.com>
9675
9676 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
9677 member. Change type of TYPE member to SCM. All uses updated.
9678 (lsscm_make_lazy_string_smob): Add assert.
9679 (lsscm_make_lazy_string): Flag bad length values.
9680 (lsscm_elt_type): New function.
9681 (gdbscm_lazy_string_to_value): Rewrite to use
9682 lsscm_safe_lazy_string_to_value.
9683 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
9684 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
9685 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
9686 in incoming type.
9687 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9688 * guile/scm-type.c (tyscm_scm_to_type): New function.
9689
9690 2017-03-15 Doug Evans <dje@google.com>
9691
9692 PR python/17728, python/18439, python/18779
9693 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
9694 member. Change type of TYPE member to PyObject *. All uses updated.
9695 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
9696 (gdbpy_create_lazy_string_object): Flag bad length values.
9697 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
9698 Handle typedefs in incoming type.
9699 (stpy_lazy_string_elt_type): New function.
9700 (gdbpy_extract_lazy_string): Call it.
9701 * python/py-value.c (valpy_lazy_string): Flag bad length values.
9702 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
9703 typedefs in incoming type.
9704
9705 2017-03-16 Doug Evans <dje@google.com>
9706
9707 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9708 * guile/scm-type.c (tyscm_scm_to_type): New function.
9709
9710 2017-03-16 Jiong Wang <jiong.wang@arm.com>
9711
9712 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
9713 "ULONGEST" for "skip".
9714
9715 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9716
9717 PR gdb/21220
9718 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
9719 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
9720 (inf_ptrace_peek_poke): ...here. New function. Now also loop
9721 over ptrace peek/poke until end of buffer or error.
9722
9723 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
9724
9725 * parse.c (length_of_subexp): Make static.
9726 * parser-defs.h (length_of_subexp): Remove.
9727
9728 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9729
9730 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9731 as well.
9732
9733 2017-03-14 Pedro Alves <palves@redhat.com>
9734
9735 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9736 (main): Use std::unique_ptr. Remove calls to
9737 cp_demangled_name_parse_free.
9738
9739 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9740
9741 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9742 alphabsd_store_inferior_registers): Use regcache->ptid instead
9743 of inferior_ptid.
9744
9745 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9746
9747 * aix-thread.c (aix_thread_fetch_registers,
9748 aix_thread_store_registers): Use regcache->ptid instead of
9749 inferior_ptid.
9750
9751 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9752
9753 * aarch64-linux-nat.c (fetch_gregs_from_thread,
9754 store_gregs_to_thread, fetch_fpregs_from_thread,
9755 store_fpregs_to_thread): Use regcache->ptid instead of
9756 inferior_ptid.
9757
9758 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9759
9760 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9761 amd64_linux_fetch_inferior_registers): Use regcache->ptid
9762 instead of inferior_ptid.
9763
9764 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9765
9766 * target.c (target_fetch_registers, target_store_registers): Add
9767 assert.
9768
9769 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9770
9771 * regcache.h (regcache_get_ptid): New function.
9772 * regcache.c (regcache_get_ptid): New function.
9773
9774 2017-03-13 Mark Wielaard <mark@klomp.org>
9775
9776 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9777
9778 2017-03-10 Keith Seitz <keiths@redhat.com>
9779
9780 PR c++/8218
9781 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9782
9783 2017-03-08 Pedro Alves <palves@redhat.com>
9784
9785 PR gdb/18360
9786 * infrun.c (start_step_over, do_target_resume, resume)
9787 (restart_threads): Assert we're not resuming a thread that is
9788 meant to be stopped.
9789 (infrun_thread_stop_requested_callback): Delete.
9790 (infrun_thread_stop_requested): If the thread is internally
9791 stopped, queue a pending stop event and clear the thread's
9792 inline-frame state.
9793 (handle_stop_requested): New function.
9794 (handle_syscall_event, handle_inferior_event_1): Use
9795 handle_stop_requested.
9796 (handle_stop_requested): New function.
9797 (handle_signal_stop): Set the thread's stop_signal here instead of
9798 at caller.
9799 (finish_step_over): Clear step over info unconditionally.
9800 (handle_signal_stop): If the user had interrupted the event
9801 thread, consider the stop a random signal.
9802 (handle_signal_stop) <signal arrived while stepping over
9803 breakpoint>: Don't restart threads here.
9804 (stop_waiting): Don't clear step-over info here.
9805
9806 2017-03-08 Pedro Alves <palves@redhat.com>
9807
9808 PR 21206
9809 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
9810 goes to argument 2, not 1.
9811
9812 2017-03-08 Pedro Alves <palves@redhat.com>
9813
9814 PR cli/21218
9815 * top.c (gdb_readline_wrapper): Avoid passing NULL to
9816 display_gdb_prompt.
9817 (command_line_input): Add comment.
9818
9819 2017-03-08 Pedro Alves <palves@redhat.com>
9820
9821 PR tui/21216
9822 * tui/tui-file.c (tui_file::write): New.
9823 * tui/tui-file.h (tui_file): Override "write".
9824 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
9825 factored out from ...
9826 (tui_puts): ... here.
9827 (tui_putc): Use them.
9828 (tui_write): New function.
9829 * tui/tui-io.h (tui_write): Declare.
9830
9831 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
9832
9833 * Makefile.in (SFILES): Replace "environ.c" with
9834 "common/environ.c".
9835 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
9836 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
9837 to...
9838 * common/environ.c: ... here.
9839 * environ.h: Moved to...
9840 * common/environ.h: ... here.
9841
9842 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9843
9844 * gdbarch.sh (pstring_ptr): New static function.
9845 (gdbarch_disassembler_options): Use it.
9846 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
9847 not valid_disassembler_option->name.
9848 * gdbarch.c: Regenerate.
9849
9850 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9851
9852 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
9853
9854 2017-03-07 Pedro Alves <palves@redhat.com>
9855
9856 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
9857
9858 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
9859
9860 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
9861 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
9862 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
9863 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
9864
9865 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
9866
9867 * xtensa-linux-nat.c (fetch_gregs): Remove const.
9868
9869 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
9870
9871 * remote.c (remote_add_target_side_commands): Use range-based
9872 for loop.
9873
9874 2017-03-03 Yao Qi <yao.qi@linaro.org>
9875
9876 PR gdb/21165
9877 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
9878 value is lazy.
9879 * valprint.c (common_val_print): Likewise.
9880
9881 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
9882
9883 * NEWS: Mention new set/show disassembler-options commands.
9884 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
9885 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
9886 (prospective_options): New static variable.
9887 (gdb_disassembler::gdb_disassembler): Initialize
9888 m_di.disassembler_options.
9889 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
9890 (get_disassembler_options): New function.
9891 (set_disassembler_options): Likewise.
9892 (set_disassembler_options_sfunc): Likewise.
9893 (show_disassembler_options_sfunc): Likewise.
9894 (disassembler_options_completer): Likewise.
9895 (_initialize_disasm): Likewise.
9896 * disasm.h (get_disassembler_options): New prototype.
9897 (set_disassembler_options): Likewise.
9898 * gdbarch.sh (gdbarch_disassembler_options): New variable.
9899 (gdbarch_verify_disassembler_options): Likewise.
9900 * gdbarch.c: Regenerate.
9901 * gdbarch.h: Likewise.
9902 * arm-tdep.c (num_disassembly_options): Delete.
9903 (set_disassembly_style): Likewise.
9904 (arm_disassembler_options): New static variable.
9905 (set_disassembly_style_sfunc): Convert short style name into long
9906 option name. Call set_disassembler_options.
9907 (show_disassembly_style_sfunc): New function.
9908 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
9909 set_gdbarch_verify_disassembler_options.
9910 (_initialize_arm_tdep): Delete regnames variable and update callers.
9911 (arm_disassembler_options): Initialize.
9912 (disasm_options): New variable.
9913 (num_disassembly_options): Rename from this...
9914 (num_disassembly_styles): ...to this. Compute by scanning through
9915 disasm_options.
9916 (valid_disassembly_styles): Initialize using disasm_options.
9917 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
9918 set_arm_regname_option.
9919 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
9920 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
9921 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
9922 set_gdbarch_verify_disassembler_options.
9923 * s390-tdep.c (s390_disassembler_options): New static variable.
9924 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
9925 set_gdbarch_verify_disassembler_options.
9926
9927 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9928
9929 * remote.c (remote_add_target_side_condition): Remove "struct"
9930 keyword from range-based for loop.
9931
9932 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9933
9934 * remote.c (remote_add_target_side_condition): Use range-based
9935 for loop. Update comment.
9936
9937 2017-02-27 Yao Qi <yao.qi@linaro.org>
9938
9939 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
9940
9941 2017-02-26 Alan Hayward <alan.hayward@arm.com>
9942
9943 * regcache.c (regcache_raw_update): New function.
9944 (regcache_raw_read): Move code to regcache_raw_update.
9945 * regcache.h (regcache_raw_update): New declaration.
9946 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
9947
9948 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
9949
9950 * dwarf2read.c (create_debug_type_hash_table): Initialize
9951 header.signature and header.type_offset_in_tu.
9952
9953 2017-02-24 Pedro Alves <palves@redhat.com>
9954
9955 * symtab.c (make_file_symbol_completion_list_1): Use
9956 add_symtab_completions.
9957
9958 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9959
9960 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
9961
9962 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9963
9964 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
9965 I386_MAX_REGISTER_SIZE.
9966 (i386_pseudo_register_write): Likewise.
9967 (i386_process_record): Likewise.
9968 * i387-tdep.c (i387_supply_xsave): Likewise.
9969 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
9970 (store_register): Likewise.
9971
9972 2017-02-23 Pedro Alves <palves@redhat.com>
9973
9974 * ada-lang.c: Include "common/function-view.h".
9975 (ada_iterate_over_symbols): Adjust to use function_view as
9976 callback type.
9977 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
9978 (ada_make_symbol_completion_list): Use a lambda.
9979 (ada_exc_search_name_matches): Delete.
9980 (name_matches_regex): New.
9981 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
9982 * compile/compile-c-support.c: Include "common/function-view.h".
9983 (print_one_macro): Change prototype to accept a ui_file pointer.
9984 (write_macro_definitions): Use a lambda.
9985 * dwarf2read.c: Include "common/function-view.h".
9986 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
9987 (dw2_expand_symtabs_matching): Adjust to use function_view as
9988 callback type.
9989 * language.h: Include "common/function-view.h".
9990 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
9991 function_view as callback type.
9992 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
9993 * linespec.c: Include "common/function-view.h".
9994 (collect_info::add_symbol): New method.
9995 (struct symbol_and_data_callback, iterate_inline_only, struct
9996 symbol_matcher_data, iterate_name_matcher): Delete.
9997 (iterate_over_all_matching_symtabs): Adjust to use function_view
9998 as callback type and lambdas.
9999 (iterate_over_file_blocks): Adjust to use function_view as
10000 callback type.
10001 (decode_compound_collector): Now a class with private fields.
10002 (decode_compound_collector::release_symbols): New method.
10003 (collect_one_symbol): Rename to...
10004 (decode_compound_collector::operator()): ... this and adjust.
10005 (lookup_prefix_sym): decode_compound_collector construction bits
10006 move to decode_compound_collector ctor. Pass the
10007 decode_compound_collector object directly as callback. Remove
10008 cleanups and use decode_compound_collector::release_symbols
10009 instead.
10010 (symtab_collector): Now a class with private fields.
10011 (symtab_collector::release_symtabs): New method.
10012 (add_symtabs_to_list): Rename to...
10013 (symtab_collector::operator()): ... this and adjust.
10014 (collect_symtabs_from_filename): symtab_collector construction
10015 bits move to symtab_collector ctor. Pass the symtab_collector
10016 object directly as callback. Remove cleanups and use
10017 symtab_collector::release_symtabs instead.
10018 (collect_symbols): Delete.
10019 (add_matching_symbols_to_info): Use lambdas.
10020 * macrocmd.c (print_macro_callback): Delete.
10021 (info_macro_command): Use a lambda.
10022 (info_macros_command): Pass print_macro_definition as callable
10023 directly.
10024 (print_one_macro): Remove 'ignore' parameter.
10025 (macro_list_command): Adjust.
10026 * macrotab.c (macro_for_each_data::fn): Now a function_view.
10027 (macro_for_each_data::user_data): Delete field.
10028 (foreach_macro): Adjust to call the function_view.
10029 (macro_for_each): Adjust to use function_view as callback type.
10030 (foreach_macro_in_scope): Adjust to call the function_view.
10031 (macro_for_each_in_scope): Adjust to use function_view as callback
10032 type.
10033 * macrotab.h: Include "common/function-view.h".
10034 (macro_callback_fn): Declare a prototype instead of a pointer.
10035 Remove "user_data" parameter.
10036 (macro_for_each, macro_for_each_in_scope): Adjust to use
10037 function_view as callback type.
10038 * psymtab.c (partial_map_expand_apply)
10039 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
10040 Adjust to use function_view as callback type and to return bool.
10041 (psym_expand_symtabs_matching): Adjust to use function_view as
10042 callback types.
10043 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
10044 to use function_view as callback type and to return bool.
10045 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
10046 callback types.
10047 * symfile.c (expand_symtabs_matching): Adjust to use function_view
10048 as callback types.
10049 * symfile.h: Include "common/function-view.h".
10050 (expand_symtabs_file_matcher_ftype)
10051 (expand_symtabs_symbol_matcher_ftype)
10052 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
10053 return bool.
10054 (quick_symbol_functions::map_symtabs_matching_filename)
10055 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
10056 function_view as callback type and return bool.
10057 (expand_symtabs_matching): Adjust to use function_view as callback
10058 type.
10059 (maintenance_expand_name_matcher)
10060 (maintenance_expand_file_matcher): Delete.
10061 (maintenance_expand_symtabs): Use lambdas.
10062 * symtab.c (iterate_over_some_symtabs): Adjust to use
10063 function_view as callback types and return bool.
10064 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
10065 of a cleanup.
10066 (lookup_symtab_callback): Delete.
10067 (lookup_symtab): Use a lambda.
10068 (iterate_over_symbols): Adjust to use function_view as callback
10069 type.
10070 (struct search_symbols_data, search_symbols_file_matches)
10071 (search_symbols_name_matches): Delete.
10072 (search_symbols): Use a pair of lambdas.
10073 (struct add_name_data, add_macro_name, symbol_completion_matcher)
10074 (symtab_expansion_callback): Delete.
10075 (default_make_symbol_completion_list_break_on_1): Use lambdas.
10076 * symtab.h: Include "common/function-view.h".
10077 (iterate_over_some_symtabs): Adjust to use function_view as
10078 callback type and return bool.
10079 (iterate_over_symtabs): Adjust to use function_view as callback
10080 type.
10081 (symbol_found_callback_ftype): Remove 'data' parameter and return
10082 bool.
10083 (iterate_over_symbols): Adjust to use function_view as callback
10084 type.
10085
10086 2017-02-23 Pedro Alves <palves@redhat.com>
10087
10088 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10089 (%.o) <unittests/%.c>: New pattern.
10090 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10091 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10092 * common/function-view.h: New file.
10093 * unittests/function-view-selftests.c: New file.
10094 * configure: Regenerate.
10095
10096 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
10097
10098 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10099 inferior_ptid.
10100 * go32-nat.c (go32_thread_alive): Likewise.
10101
10102 2017-02-23 Yao Qi <yao.qi@linaro.org>
10103
10104 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10105 delete.
10106
10107 2017-02-23 Yao Qi <yao.qi@linaro.org>
10108
10109 * varobj.c (varobj_clear_saved_item): Use delete instead of
10110 xfree.
10111 (update_dynamic_varobj_children): Likewise.
10112
10113 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10114
10115 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10116
10117 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
10118
10119 * common/enum-flags.h (enum_flags::enum_flags): Initialize
10120 m_enum_value to 0 in default constructor.
10121
10122 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
10123
10124 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10125 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10126 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10127 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10128 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10129 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10130 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10131 IS_STORE_CONDITIONAL_INSN.
10132
10133 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10134
10135 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10136
10137 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10138
10139 * NEWS (Changes since GDB 7.12): Add DWARF-5.
10140
10141 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10142
10143 * dwarf2read.c (skip_one_die, read_attribute_value)
10144 (dwarf2_const_value_attr, dump_die_shallow)
10145 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10146 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10147
10148 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10149
10150 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10151 (dwarf_parse_macro_header): Accept DWARF version 5.
10152 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10153
10154 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10155
10156 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10157 DW_AT_GNU_*.
10158 * common/common-exceptions.h (enum errors): Likewise.
10159 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10160 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10161 (dwarf_expr_context::execute_stack_op): Likewise.
10162 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10163 Likewise.
10164 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10165 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10166 (show_entry_values_debug, call_site_to_target_addr)
10167 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10168 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10169 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10170 (value_of_dwarf_block_entry, indirect_pieced_value)
10171 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
10172 (disassemble_dwarf_expression): Likewise.
10173 * dwarf2read.c (process_die, inherit_abstract_dies)
10174 (read_call_site_scope): Likewise.
10175 * gdbtypes.h (struct func_type, struct call_site_parameter)
10176 (struct call_site): Likewise.
10177 * stack.c (read_frame_arg): Likewise.
10178 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
10179
10180 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10181
10182 * defs.h (read_unsigned_leb128): New declaration.
10183 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
10184 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
10185 (dwarf2_find_location_expression): Call also
10186 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
10187 * dwarf2loc.h (dwarf2_version): New declaration.
10188 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
10189 rnglists.
10190 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
10191 .debug_rnglists.
10192 (struct dwop_section_names): Add loclists_dwo.
10193 (dwop_section_names): Add .debug_loclists.dwo.
10194 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
10195 (struct dwarf2_per_cu_data): Add dwarf_version.
10196 (struct dwo_sections): Add loclists.
10197 (struct attr_abbrev): Add implicit_const.
10198 (read_indirect_line_string): New declaration.
10199 (read_unsigned_leb128): Delete declaration.
10200 (rcuh_kind): New definition.
10201 (read_and_check_comp_unit_head): Change parameter
10202 is_debug_types_section to section_kind.
10203 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
10204 (read_comp_unit_head): Change parameter abfd to section, add parameter
10205 section_kind. Handle DWARF-5.
10206 (error_check_comp_unit_head): Accept also DWARF version 5.
10207 (read_and_check_comp_unit_head): Change parameter
10208 is_debug_types_section to section_kind.
10209 (read_and_check_type_unit_head): Delete function.
10210 (read_abbrev_offset): Handle DWARF-5.
10211 (create_debug_type_hash_table): Add parameter section_kind. Process
10212 only DW_UT_type. Use signature and type_offset_in_tu from struct
10213 comp_unit_head.
10214 (create_debug_types_hash_table): Update create_debug_type_hash_table
10215 caller.
10216 (create_all_type_units): Call create_debug_type_hash_table.
10217 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10218 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10219 caller.
10220 (skip_one_die): Handle DW_FORM_implicit_const.
10221 (dwarf2_rnglists_process): New function.
10222 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10223 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10224 (read_attribute_value): Handle DW_FORM_implicit_const,
10225 DW_FORM_line_strp.
10226 (read_attribute): Handle DW_FORM_implicit_const.
10227 (read_indirect_string_at_offset_from): New function from
10228 read_indirect_string_at_offset.
10229 (read_indirect_string_at_offset): Call
10230 read_indirect_string_at_offset_from.
10231 (read_indirect_line_string_at_offset): New function.
10232 (read_indirect_string): New function comment.
10233 (read_indirect_line_string): New function.
10234 (read_unsigned_leb128): Make it global.
10235 (dwarf2_string_attr): Handle DWARF-5.
10236 (add_include_dir_stub, read_formatted_entries): New functions.
10237 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10238 Handle DWARF-5.
10239 (per_cu_header_read_in): Update read_comp_unit_head caller.
10240 (dwarf2_version): New function.
10241 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10242 rnglists.
10243 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10244 fields.
10245
10246 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10247
10248 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10249
10250 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10251
10252 * dwarf2read.c (dwarf2_ranges_process): New function from
10253 dwarf2_ranges_read.
10254 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10255 dwarf2_ranges_process.
10256
10257 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10258
10259 * dwarf2read.c (create_debug_type_hash_table): New function from
10260 create_debug_types_hash_table.
10261 (create_debug_types_hash_table): Call create_debug_type_hash_table.
10262 (create_all_type_units, open_and_init_dwo_file): Update
10263 create_debug_types_hash_table callers.
10264
10265 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10266
10267 PR gdb/16188
10268 * fork-child.c (trace_start_error): Fix thinko. va_end should
10269 refer to 'ap', not 'args'.
10270
10271 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10272 Pedro Alves <palves@redhat.com>
10273
10274 PR gdb/16188
10275 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
10276 calls succeeded.
10277 * fork-child.c (trace_start_error): New function.
10278 (trace_start_error_with_name): Likewise.
10279 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
10280 * inf-ptrace.c (inf_ptrace_me): Likewise.
10281 * inferior.h (trace_start_error): New prototype.
10282 (trace_start_error_with_name): Likewise.
10283
10284 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
10285
10286 PR gdb/21164
10287 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
10288 NULL before using it.
10289 * symmisc.c (maintenance_print_symbols): Likewise.
10290 (maintenance_print_msymbols): Likewise.
10291
10292 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10293
10294 * NEWS: Add record Python bindings entry.
10295
10296 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10297
10298 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
10299 py-record-full.o.
10300 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
10301 * python/py-record-btrace.c, python/py-record-btrace.h,
10302 python/py-record-full.c, python/py-record-full.h: New file.
10303 * python/py-record.c: Add include for py-record-btrace.h and
10304 py-record-full.h.
10305 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
10306 recpy_instruction_history, recpy_function_call_history, recpy_begin,
10307 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
10308 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
10309 New definition.
10310 (gdbpy_initialize_btrace): New export.
10311 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
10312
10313 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10314
10315 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
10316 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
10317 * python/py-record.c: New file.
10318 * python/python-internal.h (gdbpy_start_recording,
10319 gdbpy_current_recording, gdpy_stop_recording,
10320 gdbpy_initialize_record): New export.
10321 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
10322 (python_GdbMethods): Add gdbpy_start_recording,
10323 gdbpy_current_recording and gdbpy_stop_recording.
10324
10325 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10326
10327 * record-btrace.c (record_btrace_record_method): New function.
10328 (init_record_btrace_ops): Initialize to_record_method.
10329 * record-full.c (record_full_record_method): New function.
10330 (init_record_full_ops, init_record_full_core_ops): Add
10331 record_full_record_method.
10332 * record.h (enum record_method): New enum.
10333 * target-debug.h (target_debug_print_enum_record_method: New define.
10334 * target-delegates.c: Regenerate.
10335 * target.c (target_record_method): New function.
10336 * target.h: Include record.h.
10337 (struct target_ops) <to_record_method>: New field.
10338 (target_record_method): New export.
10339
10340 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10341
10342 * record.h (record_start, record_stop): New export.
10343 * record.c (record_start, record_stop): New function.
10344
10345 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10346
10347 * btrace.c (btrace_fetch): Copy function call segments pointer
10348 into a vector.
10349 (btrace_clear): Clear the vector.
10350 (btrace_find_insn_by_number): Use binary search to find the correct
10351 function call segment.
10352 * btrace.h (brace_fun_p): New typedef.
10353 (struct btrace_thread_info) <functions>: New field.
10354
10355 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10356
10357 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
10358 * btrace.c (btrace_decode_error): ... here. New function.
10359 * btrace.h (btrace_decode_error): New export.
10360
10361 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10362
10363 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
10364 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
10365 btrace_find_insn_by_number): Remove special case for gaps.
10366 * btrace.h (btrace_insn_get_error): New export.
10367 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
10368 * record-btrace.c (btrace_insn_history): Print number for gaps.
10369 (record_btrace_info, record_btrace_goto): Handle gaps.
10370
10371 2017-02-14 Tom Tromey <tom@tromey.com>
10372
10373 PR python/13598:
10374 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
10375 event.
10376 * python/py-evts.c (gdbpy_initialize_py_events): Add
10377 before_prompt registry.
10378 * python/py-events.h (events_object) <before_prompt>: New field.
10379
10380 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
10381
10382 * btrace.c (ftrace_new_switch): Preserve up link and flags.
10383
10384 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
10385
10386 * symfile (_initialize_symfile): Add usage text to the load command's
10387 help text.
10388
10389 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
10390
10391 * utils.c (defaulted_query): Don't query on secondary UIs.
10392
10393 2017-02-10 Tom Tromey <tom@tromey.com>
10394
10395 * rust-lang.c (rust_get_disr_info): Remove unused variable.
10396
10397 2017-02-10 Tom Tromey <tom@tromey.com>
10398
10399 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
10400 "cleanup" local.
10401 * python/py-type.c (typy_legacy_template_argument): Remove
10402 unnecessary "cleanup" local.
10403
10404 2017-02-10 Tom Tromey <tom@tromey.com>
10405
10406 * python/python.c (do_start_initialization): New function, from
10407 _initialize_python.
10408 (_initialize_python): Call do_start_initialization.
10409 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
10410 goto.
10411
10412 2017-02-10 Tom Tromey <tom@tromey.com>
10413
10414 * python/py-prettyprint.c (pretty_print_one_value): Use
10415 gdbpy_ref.
10416
10417 2017-02-10 Tom Tromey <tom@tromey.com>
10418
10419 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
10420 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
10421 gdbpy_ref.
10422 * python/py-type.c (field_new): Use gdbpy_ref.
10423 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
10424 gdbpy_ref.
10425 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
10426 (py_free_pspace): Likewise.
10427 (pspace_to_pspace_object): Likewise.
10428 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
10429 (py_free_objfile): Likewise.
10430 (objfile_to_objfile_object): Likewise.
10431 * python/py-inferior.c (delete_thread_object): Use
10432 gdbpy_ref.
10433 (infpy_read_memory): Likewise.
10434 (py_free_inferior): Likewise.
10435 * python/py-evtregistry.c (create_eventregistry_object): Use
10436 gdbpy_ref.
10437 * python/py-event.c (create_event_object): Use gdbpy_ref.
10438
10439 2017-02-10 Tom Tromey <tom@tromey.com>
10440
10441 * python/py-ref.h (gdbpy_ref_policy): Now a template.
10442 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
10443 used.
10444 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
10445 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
10446 python/py-exitedevent.c, python/py-finishbreakpoint.c,
10447 python/py-framefilter.c, python/py-function.c,
10448 python/py-inferior.c, python/py-infevents.c,
10449 python/py-linetable.c, python/py-newobjfileevent.c,
10450 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
10451 python/py-signalevent.c, python/py-stopevent.c,
10452 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
10453 python/py-unwind.c, python/py-utils.c, python/py-value.c,
10454 python/py-varobj.c, python/py-xmethods.c, python/python.c,
10455 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
10456
10457 2017-02-10 Tom Tromey <tom@tromey.com>
10458
10459 * ui-out.h (ui_out_emit_type): New class.
10460 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
10461 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
10462 and ui_out_emit_tuple.
10463 (enumerate_locals): Likewise.
10464 (py_mi_print_variables, py_print_locals, py_print_args): Use
10465 ui_out_emit_list.
10466 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
10467 ui_out_emit_list.
10468 * common/gdb_optional.h: New file.
10469
10470 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
10471
10472 * MAINTAINERS (Write After Approval): Update my e-mail address.
10473
10474 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
10475
10476 PR gdb/21122
10477 * breakpoint.c (_initialize_breakpoint): Update the help description
10478 of the 'commands' command to indicate that it takes a list argument.
10479
10480 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
10481
10482 * interps.c (current_interp_set_logging): Remove "return".
10483
10484 2017-02-09 Gary Benson <gbenson@redhat.com>
10485
10486 * symtab.c (add_symtab_completions): Prevent NULL pointer
10487 dereference.
10488
10489 2017-02-08 Pedro Alves <palves@redhat.com>
10490
10491 * interps.c (interp::interp): Remove reference to quiet_p.
10492 (interp_set): Make static. Remove dead "Switching to" output
10493 code.
10494 (interp_quiet_p, interp_set_quiet): Delete.
10495 (interpreter_exec_cmd): Don't set the interpreter quiet.
10496 * interps.h (interp_quiet_p): Make static.
10497 (class interp) <quiet_p>: Remove field
10498
10499 2017-02-08 Jerome Guitton <guitton@adacore.com>
10500
10501 * cli/cli-decode.c (find_command_name_length): Make it extern.
10502 * cli/cli-decode.h (find_command_name_length): Declare.
10503 * cli/cli-script.c (command_name_equals, line_first_arg):
10504 New functions.
10505 (process_next_line): Use cli-decode to parse command names.
10506 (build_command_line): Make args a constant pointer.
10507
10508 2017-02-08 Jerome Guitton <guitton@adacore.com>
10509
10510 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
10511 Remove case-insensitive search.
10512
10513 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
10514
10515 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
10516 at the end of the line. Avoids an ARI warning.
10517
10518 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
10519
10520 * NEWS: Mention support for record/replay of Intel 64 rdrand and
10521 rdseed instructions.
10522 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
10523
10524 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
10525
10526 PR tdep/20936
10527 Provide and use sparc32 and sparc64 target description XML files.
10528 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
10529 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
10530 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
10531 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
10532 * features/sparc/sparc32-solaris.xml: New file.
10533 * features/sparc/sparc64-solaris.xml: New file.
10534 * features/sparc/sparc32-solaris.c: Generated.
10535 * features/sparc/sparc64-solaris.c: Generated.
10536 * sparc-tdep.h: Account for differences in target descriptions.
10537 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
10538 (sparc32_register_type): Use target provided registers.
10539 (validate_tdesc_registers): New function.
10540 (sparc32_gdbarch_init): Use tdesc_has_registers.
10541 Set pseudoregister functions.
10542 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
10543 (sparc64_register_type): Use target provided registers.
10544 (sparc64_init_abi): Set pseudoregister functions.
10545
10546 2017-02-03 Tom Tromey <tom@tromey.com>
10547
10548 PR rust/21097:
10549 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
10550 with a single member.
10551
10552 2017-02-03 Pedro Alves <palves@redhat.com>
10553
10554 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
10555 (cli_interp_base::~cli_interp_base): New.
10556 (cli_interp): New struct.
10557 (as_cli_interp): Cast the interp itself to cli_interp.
10558 (cli_interpreter_pre_command_loop): Rename to ...
10559 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
10560 parameter.
10561 (cli_interpreter_init): Rename to ...
10562 (cli_interp::init): ... this. Remove 'self' parameter. Use
10563 boolean. Make extern.
10564 (cli_interpreter_resume): Rename to ...
10565 (cli_interp::resume): ... this. Remove 'data' parameter. Make
10566 extern.
10567 (cli_interpreter_suspend): Rename to ...
10568 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
10569 extern.
10570 (cli_interpreter_exec): Rename to ...
10571 (cli_interp::exec): ... this. Remove 'data' parameter. Make
10572 extern.
10573 (cli_interpreter_supports_command_editing): Rename to ...
10574 (cli_interp_base::supports_command_editing): ... this. Remove
10575 'interp' parameter. Make extern.
10576 (cli_ui_out): Rename to ...
10577 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
10578 Make extern.
10579 (cli_set_logging): Rename to ...
10580 (cli_interp_base::set_logging): ... this. Remove 'interp'
10581 parameter. Make extern.
10582 (cli_interp_procs): Delete.
10583 (cli_interp_factory): Adjust to use "new".
10584 * cli/cli-interp.h: Include "interps.h".
10585 (struct cli_interp_base): New struct.
10586 * interps.c (struct interp): Delete. Fields moved to interps.h.
10587 (interp_new): Delete.
10588 (interp::interp, interp::~interp): New.
10589 (interp_set): Use bool, and return void. Assume the interpreter
10590 has suspend, init and resume methods, and that the all return
10591 void.
10592 (set_top_level_interpreter): interp_set returns void.
10593 (interp_ui_out): Adapt.
10594 (current_interp_set_logging): Adapt.
10595 (interp_data): Delete.
10596 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
10597 (interp_exec): Adapt.
10598 (top_level_interpreter_data): Delete.
10599 * interps.h (interp_init_ftype, interp_resume_ftype)
10600 (interp_suspend_ftype, interp_exec_ftype)
10601 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
10602 (class interp): New.
10603 (interp_new): Delete.
10604 (interp_set): Now returns void. Use bool.
10605 (interp_data, top_level_interpreter_data): Delete.
10606 * mi/mi-common.h: Include interps.h.
10607 (class mi_interp): Inherit from interp. Define a ctor. Declare
10608 init, resume, suspect, exec, interp_ui_out, set_logging and
10609 pre_command_loop methods.
10610 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
10611 (mi_interpreter_init): Rename to ...
10612 (mi_interp::init): ... this. Remove the 'interp' parameter, use
10613 bool, return void and make extern. Adjust.
10614 (mi_interpreter_resume): ... Rename to ...
10615 (mi_interp::resume): ... this. Remove the 'data' parameter,
10616 return void and make extern. Adjust.
10617 (mi_interpreter_suspend): ... Rename to ...
10618 (mi_interp::suspend): ... this. Remove the 'data' parameter,
10619 return void and make extern. Adjust.
10620 (mi_interpreter_exec): ... Rename to ...
10621 (mi_interp::exec): ... this. Remove the 'data' parameter and make
10622 extern. Adjust.
10623 (mi_interpreter_pre_command_loop): ... Rename to ...
10624 (mi_interp::pre_command_loop): ... this. Remove the 'self'
10625 parameter and make extern.
10626 (mi_on_normal_stop_1): Adjust.
10627 (mi_ui_out): Rename to ...
10628 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
10629 parameter and make extern. Adjust.
10630 (mi_set_logging): Rename to ...
10631 (mi_interp::set_logging): ... this. Remove the 'interp'
10632 parameter and make extern. Adjust.
10633 (mi_interp_procs): Delete.
10634 (mi_interp_factory): Adjust to use 'new'.
10635 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
10636 (mi_print_exception, mi_execute_command, mi_load_progress):
10637 Adjust.
10638 * tui/tui-interp.c (tui_interp): New class.
10639 (as_tui_interp): Return a tui_interp pointer.
10640 (tui_on_normal_stop, tui_on_signal_received)
10641 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
10642 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
10643 to use interp::interp_ui_out.
10644 (tui_init): Rename to ...
10645 (tui_interp::init): ... this. Remove the 'self' parameter, use
10646 bool, return void and make extern. Adjust.
10647 (tui_resume): Rename to ...
10648 (tui_interp::resume): ... this. Remove the 'data' parameter,
10649 return void and make extern. Adjust.
10650 (tui_suspend): Rename to ...
10651 (tui_interp::suspend): ... this. Remove the 'data' parameter,
10652 return void and make extern. Adjust.
10653 (tui_ui_out): Rename to ...
10654 (tui_interp::interp_ui_out): ... this. Remove the 'self'
10655 parameter, and make extern. Adjust.
10656 (tui_exec): Rename to ...
10657 (tui_interp::exec): ... this. Remove the 'data' parameter and
10658 make extern.
10659 (tui_interp_procs): Delete.
10660 (tui_interp_factory): Use "new".
10661
10662 2017-02-02 Tom Tromey <tom@tromey.com>
10663
10664 * rust-exp.y (ends_raw_string, space_then_number)
10665 (rust_identifier_start_p): Return bool.
10666 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
10667 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
10668 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
10669 (rust_chartype_p): Return bool.
10670 (val_print_struct, rust_print_struct_def, rust_print_type):
10671 Update.
10672 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
10673 Return bool.
10674
10675 2017-02-02 Tom Tromey <tom@tromey.com>
10676
10677 * rust-lang.c: Reindent.
10678
10679 2017-02-02 Tom Tromey <tom@tromey.com>
10680
10681 * rust-lang.h (rust_crate_for_block): Update.
10682 * rust-lang.c (rust_crate_for_block): Return std::string.
10683 (rust_get_disr_info): Use std:;string, not
10684 gdb::unique_xmalloc_ptr.
10685 * rust-exp.y (crate_name): Update.
10686
10687 2017-02-02 Pedro Alves <palves@redhat.com>
10688
10689 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
10690 field out of gdb_disassembler_test and make it static.
10691
10692 2017-02-02 Pedro Alves <palves@redhat.com>
10693
10694 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
10695 mi1_interp and mi_interp fields.
10696
10697 2017-02-02 Pedro Alves <palves@redhat.com>
10698
10699 * cli/cli-interp.c (struct saved_output_files, saved_output):
10700 Moved from cli/cli-logging.c.
10701 (cli_set_logging): New function.
10702 (cli_interp_procs): Install cli_set_logging.
10703 * cli/cli-interp.h (make_logging_output, cli_set_logging):
10704 Declare.
10705 * cli/cli-logging.c (struct saved_output_files, saved_output):
10706 Moved to cli/cli-interp.c.
10707 (pop_output_files): Don't save outputs here.
10708 (make_logging_output): New function.
10709 (handle_redirections): Don't build tee nor save previous outputs
10710 here.
10711 * interps.c (current_interp_set_logging): Change prototype.
10712 Assume there's always a set_logging_proc method installed.
10713 * interps.h (interp_set_logging_ftype): Change prototype.
10714 (current_interp_set_logging): Change prototype and adjust comment.
10715 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
10716 use make_logging_output.
10717 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
10718 2017-02-02 Pedro Alves <palves@redhat.com>
10719
10720 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10721 from ...
10722 (set_logging_overwrite): ... here.
10723 (logging_no_redirect_file): Delete.
10724 (set_logging_redirect): Don't handle redirection on the fly.
10725 Instead warn that "logging off" / "logging on" is necessary.
10726 (pop_output_files): Delete references to logging_no_redirect_file.
10727 (show_logging_command): Always speak in terms of what will happen
10728 once logging is reenabled.
10729
10730 2017-02-02 Pedro Alves <palves@redhat.com>
10731
10732 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10733
10734 2017-02-02 Pedro Alves <palves@redhat.com>
10735
10736 * disasm.c (gdb_pretty_print_insn): Rename to ...
10737 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10738 Remove gdbarch parameter. Adapt to clear the object's buffers
10739 instead of allocating new buffers, and to print using the object's
10740 gdb_disassembler instead of calling gdb_print_insn.
10741 (dump_insns): Use gdb_pretty_print_disassembler.
10742 * disasm.h (gdb_pretty_print_insn): Delete declaration.
10743 (gdb_pretty_print_disassembler): New class.
10744 * record-btrace.c (btrace_insn_history): Use
10745 gdb_pretty_print_disassembler.
10746
10747 2017-02-02 Pedro Alves <palves@redhat.com>
10748
10749 * ada-lang.c (type_as_string): Use string_file.
10750 * ada-valprint.c (ada_print_floating): Use string_file.
10751 * ada-varobj.c (ada_varobj_scalar_image)
10752 (ada_varobj_get_value_image): Use string_file.
10753 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10754 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10755 * breakpoint.c (update_inserted_breakpoint_locations)
10756 (insert_breakpoint_locations, reattach_breakpoints)
10757 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10758 (print_it_watchpoint): Use string_file.
10759 (save_breakpoints): Use stdio_file.
10760 * c-exp.y (oper): Use string_file.
10761 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10762 tee_file.
10763 (pop_output_files): Use delete.
10764 (handle_redirections): Use stdio_file and tee_file.
10765 * cli/cli-setshow.c (do_show_command): Use string_file.
10766 * compile/compile-c-support.c (c_compute_program): Use
10767 string_file.
10768 * compile/compile-c-symbols.c (generate_vla_size): Take a
10769 'string_file &' instead of a 'ui_file *'.
10770 (generate_c_for_for_one_variable): Take a 'string_file &' instead
10771 of a 'ui_file *'. Use string_file.
10772 (generate_c_for_variable_locations): Take a 'string_file &'
10773 instead of a 'ui_file *'.
10774 * compile/compile-internal.h (generate_c_for_for_one_variable):
10775 Take a 'string_file &' instead of a 'ui_file *'.
10776 * compile/compile-loc2c.c (push, pushf, unary, binary)
10777 (print_label, pushf_register_address, pushf_register)
10778 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10779 'ui_file *'. Adjust.
10780 * compile/compile.c (compile_to_object): Use string_file.
10781 * compile/compile.h (compile_dwarf_expr_to_c)
10782 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10783 'ui_file *'.
10784 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10785 (replace_typedefs_qualified_name): Use string_file and
10786 obstack_copy0.
10787 * disasm.c (gdb_pretty_print_insn): Use string_file.
10788 (gdb_disassembly): Adjust reference the null_stream global.
10789 (do_ui_file_delete): Delete.
10790 (gdb_insn_length): Use null_stream.
10791 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10792 * dwarf2loc.c (dwarf2_compile_property_to_c)
10793 (locexpr_generate_c_location, loclist_generate_c_location): Take a
10794 'string_file &' instead of a 'ui_file *'.
10795 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10796 * dwarf2read.c (do_ui_file_peek_last): Delete.
10797 (dwarf2_compute_name): Use string_file.
10798 * event-top.c (gdb_setup_readline): Use stdio_file.
10799 * gdbarch.sh (verify_gdbarch): Use string_file.
10800 * gdbtypes.c (safe_parse_type): Use null_stream.
10801 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10802 string_file.
10803 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10804 'string_file *' instead of a 'ui_file *'.
10805 (gdbscm_arch_disassemble): Use string_file.
10806 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
10807 * guile/scm-ports.c (class ioscm_file_port): Now a class that
10808 inherits from ui_file.
10809 (ioscm_file_port_delete, ioscm_file_port_rewind)
10810 (ioscm_file_port_put): Delete.
10811 (ioscm_file_port_write): Rename to ...
10812 (ioscm_file_port::write): ... this. Remove file_port_magic
10813 checks.
10814 (ioscm_file_port_new): Delete.
10815 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
10816 ui_file_up.
10817 * guile/scm-type.c (tyscm_type_name): Use string_file.
10818 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
10819 Use string_file.
10820 * infcmd.c (print_return_value_1): Use string_file.
10821 * infrun.c (print_target_wait_results): Use string_file.
10822 * language.c (add_language): Use string_file.
10823 * location.c (explicit_to_string_internal): Use string_file.
10824 * main.c (captured_main_1): Use null_file.
10825 * maint.c (maintenance_print_architecture): Use stdio_file.
10826 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
10827 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
10828 event_channel>: Change type to mi_console_file pointer.
10829 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
10830 (mi_console_file_delete): Delete.
10831 (struct mi_console_file): Delete.
10832 (mi_console_file_magic): Delete.
10833 (mi_console_file_new): Delete.
10834 (mi_console_file::mi_console_file): New.
10835 (mi_console_file_delete): Delete.
10836 (mi_console_file_fputs): Delete.
10837 (mi_console_file::write): New.
10838 (mi_console_raw_packet): Delete.
10839 (mi_console_file::flush): New.
10840 (mi_console_file_flush): Delete.
10841 (mi_console_set_raw): Rename to ...
10842 (mi_console_file::set_raw): ... this.
10843 * mi/mi-console.h (class mi_console_file): New class.
10844 (mi_console_file_new, mi_console_set_raw): Delete.
10845 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
10846 (mi_set_logging): Use delete and tee_file. Adjust.
10847 * mi/mi-main.c (output_register): Use string_file.
10848 (mi_cmd_data_evaluate_expression): Use string_file.
10849 (mi_cmd_data_read_memory): Use string_file.
10850 (mi_cmd_execute, print_variable_or_computed): Use string_file.
10851 * mi/mi-out.c (mi_ui_out::main_stream): New.
10852 (mi_ui_out::rewind): Use main_stream and
10853 string_file.
10854 (mi_ui_out::put): Use main_stream and string_file.
10855 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10856 Allocate a 'string_file' instead.
10857 (mi_out_new): Don't allocate a mem_fileopen stream here.
10858 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10859 (mi_ui_out::main_stream): Declare method.
10860 * printcmd.c (eval_command): Use string_file.
10861 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
10862 * python/py-arch.c (archpy_disassemble): Use string_file.
10863 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
10864 * python/py-frame.c (frapy_str): Use string_file.
10865 * python/py-framefilter.c (py_print_type, py_print_single_arg):
10866 Use string_file.
10867 * python/py-type.c (typy_str): Use string_file.
10868 * python/py-unwind.c (unwind_infopy_str): Use string_file.
10869 * python/py-value.c (valpy_str): Use string_file.
10870 * record-btrace.c (btrace_insn_history): Use string_file.
10871 * regcache.c (regcache_print): Use stdio_file.
10872 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
10873 * remote.c (escape_buffer): Use string_file.
10874 * rust-lang.c (rust_get_disr_info): Use string_file.
10875 * serial.c (serial_open_ops_1): Use stdio_file.
10876 (do_serial_close): Use delete.
10877 * stack.c (print_frame_arg): Use string_file.
10878 (print_frame_args): Remove local mem_fileopen stream, not used.
10879 (print_frame): Use string_file.
10880 * symmisc.c (maintenance_print_symbols): Use stdio_file.
10881 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
10882 Take a 'string_file *' instead of a 'ui_file *'.
10883 * top.c (new_ui): Use stdio_file and stderr_file.
10884 (free_ui): Use delete.
10885 (execute_command_to_string): Use string_file.
10886 (quit_confirm): Use string_file.
10887 * tracepoint.c (collection_list::append_exp): Use string_file.
10888 * tui/tui-disasm.c (tui_disassemble): Use string_file.
10889 * tui/tui-file.c: Don't include "ui-file.h".
10890 (enum streamtype, struct tui_stream): Delete.
10891 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
10892 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
10893 (tui_file::tui_file): New method.
10894 (tui_file_fputs): Delete.
10895 (tui_file_get_strbuf): Delete.
10896 (tui_file::puts): New method.
10897 (tui_file_adjust_strbuf): Delete.
10898 (tui_file_flush): Delete.
10899 (tui_file::flush): New method.
10900 * tui/tui-file.h: Tweak intro comment.
10901 Include ui-file.h.
10902 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
10903 (tui_file_adjust_strbuf): Delete declarations.
10904 (class tui_file): New class.
10905 * tui/tui-io.c (tui_initialize_io): Use tui_file.
10906 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
10907 (tui_register_format): Use string_stream.
10908 * tui/tui-stack.c (tui_make_status_line): Use string_file.
10909 (tui_get_function_from_frame): Use string_file.
10910 * typeprint.c (type_to_string): Use string_file.
10911 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
10912 (null_stream): New global.
10913 (ui_file_delete): Delete.
10914 (ui_file::ui_file): New.
10915 (null_file_isatty): Delete.
10916 (ui_file::~ui_file): New.
10917 (null_file_rewind): Delete.
10918 (ui_file::printf): New.
10919 (null_file_put): Delete.
10920 (null_file_flush): Delete.
10921 (ui_file::putstr): New.
10922 (null_file_write): Delete.
10923 (ui_file::putstrn): New.
10924 (null_file_read): Delete.
10925 (ui_file::putc): New.
10926 (null_file_fputs): Delete.
10927 (null_file_write_async_safe): Delete.
10928 (ui_file::vprintf): New.
10929 (null_file_delete): Delete.
10930 (null_file::write): New.
10931 (null_file_fseek): Delete.
10932 (null_file::puts): New.
10933 (ui_file_data): Delete.
10934 (null_file::write_async_safe): New.
10935 (gdb_flush, ui_file_isatty): Adjust.
10936 (ui_file_put, ui_file_rewind): Delete.
10937 (ui_file_write): Adjust.
10938 (ui_file_write_for_put): Delete.
10939 (ui_file_write_async_safe, ui_file_read): Adjust.
10940 (ui_file_fseek): Delete.
10941 (fputs_unfiltered): Adjust.
10942 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
10943 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
10944 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
10945 (set_ui_file_data): Delete.
10946 (string_file::~string_file, string_file::write)
10947 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
10948 (do_ui_file_as_string, ui_file_as_string): Delete.
10949 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
10950 (struct mem_file): Delete.
10951 (mem_file_new): Delete.
10952 (stdio_file::stdio_file): New.
10953 (mem_file_delete): Delete.
10954 (stdio_file::stdio_file): New.
10955 (mem_fileopen): Delete.
10956 (stdio_file::~stdio_file): New.
10957 (mem_file_rewind): Delete.
10958 (stdio_file::set_stream): New.
10959 (mem_file_put): Delete.
10960 (stdio_file::open): New.
10961 (mem_file_write): Delete.
10962 (stdio_file_magic, struct stdio_file): Delete.
10963 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
10964 (stdio_file::flush): New.
10965 (stdio_file_read): Rename to ...
10966 (stdio_file::read): ... this. Adjust.
10967 (stdio_file_write): Rename to ...
10968 (stdio_file::write): ... this. Adjust.
10969 (stdio_file_write_async_safe): Rename to ...
10970 (stdio_file::write_async_safe) ... this. Adjust.
10971 (stdio_file_fputs): Rename to ...
10972 (stdio_file::puts) ... this. Adjust.
10973 (stdio_file_isatty): Delete.
10974 (stdio_file_fseek): Delete.
10975 (stdio_file::isatty): New.
10976 (stderr_file_write): Rename to ...
10977 (stderr_file::write) ... this. Adjust.
10978 (stderr_file_fputs): Rename to ...
10979 (stderr_file::puts) ... this. Adjust.
10980 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
10981 (stderr_file::stderr_file): New.
10982 (tee_file_magic): Delete.
10983 (struct tee_file): Delete.
10984 (tee_file::tee_file): New.
10985 (tee_file_new): Delete.
10986 (tee_file::~tee_file): New.
10987 (tee_file_delete): Delete.
10988 (tee_file_flush): Rename to ...
10989 (tee_file::flush): ... this. Adjust.
10990 (tee_file_write): Rename to ...
10991 (tee_file::write): ... this. Adjust.
10992 (tee_file::write_async_safe): New.
10993 (tee_file_fputs): Rename to ...
10994 (tee_file::puts): ... this. Adjust.
10995 (tee_file_isatty): Rename to ...
10996 (tee_file::isatty): ... this. Adjust.
10997 * ui-file.h (struct obstack, struct ui_file): Don't
10998 forward-declare.
10999 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
11000 (ui_file_write_ftype)
11001 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
11002 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
11003 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
11004 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
11005 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
11006 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
11007 (set_ui_file_fseek): Delete.
11008 (ui_file_data, ui_file_delete, ui_file_rewind)
11009 (struct ui_file): New.
11010 (ui_file_up): New.
11011 (class null_file): New.
11012 (null_stream): Declare.
11013 (ui_file_write_for_put, ui_file_put): Delete.
11014 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
11015 Delete.
11016 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
11017 (gdb_fopen, tee_file_new): Delete.
11018 (struct string_file): New.
11019 (struct stdio_file): New.
11020 (stdio_file_up): New.
11021 (struct stderr_file): New.
11022 (class tee_file): New.
11023 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
11024 of a 'ui_file *'. Adjust.
11025 * ui-out.h (class ui_out) <field_stream>: Likewise.
11026 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
11027 (null_stream): Delete.
11028 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
11029 Adjust.
11030 * utils.h (struct ui_file): Delete forward declaration..
11031 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
11032 (error_stream): Take a 'string_file &' instead of a
11033 'ui_file *'.
11034 * varobj.c (varobj_value_get_print_value): Use string_file.
11035 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
11036 * gdbarch.c: Regenerate.
11037
11038 2017-02-02 Pedro Alves <palves@redhat.com>
11039
11040 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
11041 (gdb_pretty_print_insn): ... this. Now a free function. Add back
11042 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
11043 Adjust to call gdb_print_insn instead of
11044 gdb_disassembler::print_insn.
11045 (dump_insns, do_mixed_source_and_assembly_deprecated)
11046 (do_mixed_source_and_assembly, do_assembly_only): Add back a
11047 'gdbarch' parameter. Remove gdb_disassembler parameter.
11048 (gdb_disassembly): Don't allocate a gdb_disassembler here.
11049 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
11050 declaration.
11051 (gdb_pretty_print_insn): Re-add declaration.
11052 * record-btrace.c (btrace_insn_history): Don't allocate a
11053 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
11054
11055 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
11056
11057 * disasm.h (gdb_disassembly): Remove file_string parameter.
11058 * disasm.c (gdb_disassembly): Likewise.
11059 * cli/cli-cmds.c (print_disassembly): Adapt.
11060 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
11061 * stack.c (do_gdb_disassembly): Likewise.
11062
11063 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
11064
11065 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
11066 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
11067 targets. And if the implicit value is longer than needed, extract
11068 the first bytes instead of the "least significant" ones.
11069
11070 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
11071
11072 * btrace.c (btrace_enable): Do not call btrace_add_pc for
11073 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
11074 (btrace_fetch): Assert can_access_registers_ptid.
11075 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
11076 validate_registers_access.
11077
11078 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
11079
11080 * gdbthread.h (can_access_registers_ptid): New.
11081 * thread.c (can_access_registers_ptid): New.
11082
11083 2017-02-01 Pedro Alves <palves@redhat.com>
11084
11085 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
11086
11087 2017-01-31 Pedro Alves <palves@redhat.com>
11088
11089 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11090 Fix typos.
11091
11092 2017-01-31 Pedro Alves <palves@redhat.com>
11093
11094 * stack.c (print_frame_args): Remove local mem_fileopen stream,
11095 not used.
11096
11097 2017-01-31 Pedro Alves <palves@redhat.com>
11098
11099 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11100
11101 2017-01-31 Pedro Alves <palves@redhat.com>
11102
11103 * common/scoped_restore.h
11104 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11105 change the value's parameter type to T2.
11106 (make_scoped_restore): Likewise.
11107
11108 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11109 Richard Henderson <rth@redhat.com>
11110
11111 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11112 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11113 GS_BASE for older kernels.
11114 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11115 GS_BASE for older kernels.
11116 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11117 and GS_BASE to the offset table.
11118 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11119 system register group.
11120 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11121 for older kernels.
11122 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11123 amd64 ABI.
11124 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11125 AMD64_GSBASE_REGNUM.
11126 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11127 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11128 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11129 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11130 i386/64bit-segments.xml in those rules.
11131 * features/i386/64bit-segments.xml: New file.
11132 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11133 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11134 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11135 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11136 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11137 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11138 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11139 * features/i386/amd64-avx-linux.c: Regenerated.
11140 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11141 * features/i386/amd64-avx-mpx.c: Regenerated.
11142 * features/i386/amd64-avx512-linux.c: Regenerated.
11143 * features/i386/amd64-linux.c: Regenerated.
11144 * features/i386/amd64-mpx-linux.c: Regenerated.
11145 * features/i386/i386-avx-mpx-linux.c: Regenerated.
11146 * features/i386/i386-avx-mpx.c: Regenerated.
11147 * features/i386/x32-avx-linux.c: Regenerated.
11148 * features/i386/x32-avx512-linux.c: Regenerated.
11149 * regformats/i386/amd64-avx-linux.dat: Regenerated.
11150 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11151 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11152 * regformats/i386/amd64-linux.dat: Regenerated.
11153 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11154 * regformats/i386/x32-avx-linux.dat: Regenerated.
11155 * regformats/i386/x32-avx512-linux.dat: Regenerated.
11156 * regformats/i386/x32-linux.dat: Regenerated.
11157
11158 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11159
11160 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11161 Set to AMD64_NUM_REGS.
11162
11163 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11164
11165 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11166 that checks validity of a register number.
11167
11168 2017-01-27 Kees Cook <keescook@google.com>
11169
11170 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
11171 fetch_fpregs if target has fpa registers.
11172 (arm_linux_store_inferior_registers): Call store_fpregs if target
11173 has fpa registers.
11174
11175 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
11176
11177 * cris-tdep.c (cris_gdbarch_init): Remove check for
11178 info.byte_order and force it to BFD_ENDIAN_LITTLE.
11179
11180 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
11181
11182 * corelow.c (get_core_register_section): Check for regset
11183 existence before checking for REGSET_VARIABLE_SIZE.
11184
11185 2017-01-26 Yao Qi <yao.qi@linaro.org>
11186 Pedro Alves <palves@redhat.com>
11187
11188 PR gdb/20939
11189 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
11190 call memory_error, save memaddr instead.
11191 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
11192 negative, cal memory_error.
11193 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
11194
11195 2017-01-26 Yao Qi <yao.qi@linaro.org>
11196
11197 * disasm-selftests.c (memory_error_test): New function.
11198 (_initialize_disasm_selftests): Register memory_error_test.
11199
11200 2017-01-26 Yao Qi <yao.qi@linaro.org>
11201
11202 * Makefile.in (SFILES): Add disasm-selftests.c and
11203 selftest-arch.c.
11204 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
11205 * disasm-selftests.c: New file.
11206 * selftest-arch.c: New file.
11207 * selftest-arch.h: New file.
11208
11209 2017-01-26 Yao Qi <yao.qi@linaro.org>
11210
11211 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
11212 to bfd_arch_mep. Don't return 0 if section is not
11213 found. Call print_insn_mep.
11214
11215 2017-01-26 Pedro Alves <palves@redhat.com>
11216 Yao Qi <yao.qi@linaro.org>
11217
11218 * arm-tdep.c: Include "disasm.h".
11219 (gdb_print_insn_arm): Update code to get gdbarch.
11220 * disasm.c (dis_asm_read_memory): Change it to
11221 gdb_disassembler::dis_asm_read_memory.
11222 (dis_asm_memory_error): Likewise.
11223 (dis_asm_print_address): Likewise.
11224 (gdb_pretty_print_insn): Change it to
11225 gdb_disassembler::pretty_print_insn.
11226 (dump_insns): Add one argument gdb_disassemlber. All
11227 callers updated.
11228 (do_mixed_source_and_assembly_deprecated): Likewise.
11229 (do_mixed_source_and_assembly): Likewise.
11230 (do_assembly_only): Likewise.
11231 (gdb_disassembler::gdb_disassembler): New.
11232 (gdb_disassembler::print_insn): New.
11233 * disasm.h (class gdb_disassembler): New.
11234 (gdb_pretty_print_insn): Remove declaration.
11235 (gdb_disassemble_info): Likewise.
11236 * guile/scm-disasm.c (class gdbscm_disassembler): New.
11237 (gdbscm_disasm_read_memory_worker): Update.
11238 (gdbscm_disasm_read_memory): Update.
11239 (gdbscm_disasm_memory_error): Remove.
11240 (gdbscm_disasm_print_address): Remove.
11241 (gdbscm_disassembler::gdbscm_disassembler): New.
11242 (gdbscm_print_insn_from_port): Update.
11243 * mips-tdep.c: Include disasm.h.
11244 (gdb_print_insn_mips): Update code to get gdbarch.
11245 * record-btrace.c (btrace_insn_history): Update.
11246 * spu-tdep.c: Include disasm.h.
11247 (struct spu_dis_asm_data): Remove.
11248 (struct spu_dis_asm_info): New.
11249 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11250 SPU id.
11251 (gdb_print_insn_spu): Cast disassemble_info to
11252 spu_dis_asm_info.
11253
11254 2017-01-26 Yao Qi <yao.qi@linaro.org>
11255
11256 * disasm.c (do_ui_file_delete): Delete.
11257 (gdb_insn_length): Move code creating stream to ...
11258 * utils.c (null_stream): ... here. New function.
11259 * utils.h (null_stream): Declare.
11260
11261 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
11262
11263 * python/py-inferior.c (find_thread_object): Return directly
11264 from the loop. Remove "found" variable.
11265
11266 2017-01-21 Joel Brobecker <brobecker@adacore.com>
11267
11268 GDB 7.12.1 released.
11269
11270 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11271
11272 * python/py-function.c (fnpy_call): Reorder declarations to have
11273 the gdbpy_enter object declared first.
11274 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11275
11276 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11277
11278 PR python/21068
11279 * python/python-internal.h (PyMem_RawMalloc): Define for
11280 Python < 3.4.
11281 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
11282 PyMem_RawMalloc instead of PyMem_Malloc.
11283
11284 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
11285 Luis Machado <lgustavo@codesourcery.com>
11286
11287 * NEWS (New commands): Mention flash-erase.
11288 (New MI commands): Mention target-flash-erase.
11289 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
11290 command.
11291 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
11292 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
11293 * target.c (flash_erase_command): New function.
11294 (initialize_targets): Add new flash-erase command.
11295 * target.h (flash_erase_command): New declaration.
11296
11297 2017-01-20 Joel Brobecker <brobecker@adacore.com>
11298
11299 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
11300 HAVE_SYS_PROCFS_H is defined.
11301
11302 2017-01-18 Alan Hayward <alan.hayward@arm.com>
11303
11304 * remote.c (struct cached_reg): Change data into a pointer.
11305 * (stop_reply_dtr): Free data pointers before deleting vector.
11306 (process_stop_reply): Likewise.
11307 (remote_parse_stop_reply): Allocate space for data
11308
11309 2017-01-18 Alan Hayward <alan.hayward@arm.com>
11310
11311 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
11312 MAX_REGISTER_SIZE.
11313 (amd64_pseudo_register_read_value): Likewise.
11314 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
11315 (store_register_using_P): Likewise.
11316 * regcache.c (regcache_xfer_part): Likewise.
11317
11318 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
11319
11320 Split real and pseudo registers.
11321 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
11322 (sparc32_pseudo_regnum): New enum.
11323 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
11324 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
11325 (SPARC32_CP0_REGISTERS): New macro.
11326 (sparc32_pseudo_register_name): New function.
11327 (sparc32_register_name): Use sparc32_pseudo_register_name.
11328 (sparc32_pseudo_register_type): New function.
11329 (sparc32_register_type): Use sparc32_pseudo_register_type.
11330 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
11331 pseudo register numbers.
11332 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
11333 (SPARC64_CP0_REGISTERS): New macro.
11334 (sparc64_pseudo_register_name): New function.
11335 (sparc64_register_name): Use sparc64_pseudo_register_name.
11336 (sparc64_pseudo_register_type): New function.
11337 (sparc64_register_type): Use sparc64_pseudo_register_type.
11338 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
11339 pseudo register numbers.
11340 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
11341 sparc64_store_arguments): Handle pseudo register numbers.
11342
11343 2017-01-13 Yao Qi <yao.qi@linaro.org>
11344
11345 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
11346 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
11347 output.
11348 (getpkt_or_notif_sane_1): Likewise.
11349
11350 2017-01-13 Yao Qi <yao.qi@linaro.org>
11351
11352 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
11353 of CC. Pass "-x c++-header" instead of "-x c".
11354
11355 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11356
11357 * remote.c (remote_can_async_p): Update comment.
11358
11359 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11360
11361 * linux-nat.c (linux_nat_can_async_p): Update comment.
11362
11363 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11364
11365 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
11366
11367 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
11368
11369 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
11370
11371 2017-01-10 Tom Tromey <tom@tromey.com>
11372
11373 * python/py-type.c (typy_legacy_template_argument): Update.
11374 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
11375 ~demangle_parse_info): Declare new members.
11376 (cp_demangled_name_to_comp): Return unique_ptr.
11377 (cp_demangled_name_parse_free)
11378 (make_cleanup_cp_demangled_name_parse_free)
11379 (cp_new_demangle_parse_info): Remove.
11380 * cp-support.c (do_demangled_name_parse_free_cleanup)
11381 (make_cleanup_cp_demangled_name_parse_free): Remove.
11382 (inspect_type, cp_canonicalize_string_full)
11383 (cp_canonicalize_string): Update.
11384 (mangled_name_to_comp): Change return type.
11385 (cp_class_name_from_physname, method_name_from_physname)
11386 (cp_func_name, cp_remove_params): Update.
11387 * cp-name-parser.y (demangle_parse_info): New constructor, from
11388 cp_new_demangle_parse_info.
11389 (~demangle_parse_info): New destructor, from
11390 cp_demangled_name_parse_free.
11391 (cp_merge_demangle_parse_infos): Update.
11392 (cp_demangled_name_to_comp): Change return type.
11393
11394 2017-01-10 Tom Tromey <tom@tromey.com>
11395
11396 * top.c (prevent_dont_repeat): Change return type.
11397 * python/python.c (execute_gdb_command): Use std::string.
11398 Update.
11399 * guile/guile.c (gdbscm_execute_gdb_command): Update.
11400 * command.h (prevent_dont_repeat): Change return type.
11401 * breakpoint.c (bpstat_do_actions_1): Update.
11402
11403 2017-01-10 Tom Tromey <tom@tromey.com>
11404
11405 * value.h (scoped_value_mark::~scoped_value_mark): Call
11406 free_to_mark.
11407 (scoped_value_mark::free_to_mark): New method.
11408 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
11409 scoped_value_mark.
11410
11411 2017-01-10 Tom Tromey <tom@tromey.com>
11412
11413 * python/py-value.c (valpy_dereference, valpy_referenced_value)
11414 (valpy_reference_value, valpy_const_value, valpy_get_address)
11415 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
11416 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
11417 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
11418 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
11419 scoped_value_mark.
11420 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
11421 * value.h (scoped_value_mark): New class.
11422
11423 2017-01-10 Tom Tromey <tom@tromey.com>
11424
11425 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
11426 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
11427 * psymtab.c (discard_psymtabs_upto): Remove.
11428 (make_cleanup_discard_psymtabs): Remove.
11429 (struct psymtab_state): Remove.
11430
11431 2017-01-10 Tom Tromey <tom@tromey.com>
11432
11433 * record-full.c (record_full_save_cleanups): Remove.
11434 (record_full_save): Use gdb::unlinker.
11435 * gcore.c (do_bfd_delete_cleanup): Remove.
11436 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
11437 cleanups.
11438 * dwarf2read.c (unlink_if_set): Remove.
11439 (write_psymtabs_to_index): Use gdb::unlinker.
11440 * common/gdb_unlinker.h: New file.
11441
11442 2017-01-10 Tom Tromey <tom@tromey.com>
11443
11444 * windows-tdep.c (windows_xfer_shared_library): Update.
11445 * windows-nat.c (windows_make_so): Update.
11446 * utils.h (make_cleanup_bfd_unref): Remove.
11447 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
11448 * symfile.h (symfile_bfd_open)
11449 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
11450 * symfile.c (read_symbols, symbol_file_add)
11451 (separate_debug_file_exists): Update.
11452 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
11453 (generic_load, reread_symbols): Update.
11454 * symfile-mem.c (symbol_file_add_from_memory): Update.
11455 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
11456 (spu_symbol_file_add_from_memory): Update.
11457 * solist.h (struct target_so_ops) <bfd_open>: Return
11458 gdb_bfd_ref_ptr.
11459 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
11460 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
11461 gdb_bfd_ref_ptr.
11462 (solib_map_sections, reload_shared_libraries_1): Update.
11463 * solib-svr4.c (enable_break): Update.
11464 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
11465 * solib-frv.c (enable_break2): Update.
11466 * solib-dsbt.c (enable_break): Update.
11467 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
11468 gdb_bfd_ref_ptr.
11469 (darwin_solib_get_all_image_info_addr_at_init): Update.
11470 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
11471 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
11472 * record-full.c (record_full_save): Update.
11473 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
11474 * procfs.c (insert_dbx_link_bpt_in_file): Update.
11475 * minidebug.c (find_separate_debug_file_in_section): Return
11476 gdb_bfd_ref_ptr.
11477 * machoread.c (macho_add_oso_symfile): Change abfd to
11478 gdb_bfd_ref_ptr.
11479 (macho_symfile_read_all_oso): Update.
11480 (macho_check_dsym): Return gdb_bfd_ref_ptr.
11481 (macho_symfile_read): Update.
11482 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
11483 (jit_bfd_try_read_symtab): Update.
11484 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11485 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11486 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11487 gdb_bfd_ref_ptr.
11488 (gdb_bfd_ref_policy): New struct.
11489 (gdb_bfd_ref_ptr): New typedef.
11490 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11491 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11492 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11493 gdb_bfd_ref_ptr.
11494 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11495 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11496 (gcore_command): Update.
11497 * exec.c (exec_file_attach): Update.
11498 * elfread.c (elf_symfile_read): Update.
11499 * dwarf2read.c (dwarf2_get_dwz_file): Update.
11500 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
11501 (open_and_init_dwo_file): Update.
11502 (open_dwp_file): Return gdb_bfd_ref_ptr.
11503 (open_and_init_dwp_file): Update.
11504 * corelow.c (core_open): Update.
11505 * compile/compile-object-load.c (compile_object_load): Update.
11506 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
11507 * coffread.c (coff_symfile_read): Update.
11508 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
11509 gdb_bfd_ref_ptr. Rename.
11510 (dump_bfd_file, restore_command): Update.
11511 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11512 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11513 (find_separate_debug_file_by_buildid): Update.
11514
11515 2017-01-10 Tom Tromey <tom@tromey.com>
11516
11517 * common/gdb_ref_ptr.h: New file.
11518 * python/py-ref.h (struct gdbpy_ref_policy): New.
11519 (gdbpy_ref): Now a typedef.
11520
11521 2017-01-10 Tom Tromey <tom@tromey.com>
11522
11523 * utils.h (make_cleanup_htab_delete): Don't declare.
11524 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
11525 Remove.
11526 * linespec.c (decode_compound_collector): Add constructor,
11527 destructor.
11528 (lookup_prefix_sym): Remove cleanup.
11529 (symtab_collector): Add constructor, destructor.
11530 (collect_symtabs_from_filename): Remove cleanup.
11531 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
11532 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
11533 Use htab_up.
11534 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
11535 * dwarf2read.c (dw2_expand_symtabs_matching)
11536 (dw2_map_symbol_filenames, dwarf_decode_macros)
11537 (write_psymtabs_to_index): Use htab_up.
11538 * dwarf2loc.c (func_verify_no_selftailcall)
11539 (call_site_find_chain_1, func_verify_no_selftailcall)
11540 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
11541 std::vector, gdb::unique_xmalloc_ptr.
11542 (call_sitep): Remove typedef.
11543 (dwarf2_locexpr_baton_eval): Remove unused variable.
11544
11545 2017-01-10 Tom Tromey <tom@tromey.com>
11546
11547 * python/python-internal.h (make_cleanup_py_decref)
11548 (make_cleanup_py_xdecref): Don't declare.
11549 * python/py-utils.c (py_decref, make_cleanup_py_decref)
11550 (py_xdecref, make_cleanup_py_xdecref): Remove.
11551
11552 2017-01-10 Tom Tromey <tom@tromey.com>
11553
11554 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
11555 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
11556
11557 2017-01-10 Tom Tromey <tom@tromey.com>
11558
11559 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
11560
11561 2017-01-10 Tom Tromey <tom@tromey.com>
11562
11563 * python/py-utils.c (unicode_to_encoded_string)
11564 (python_string_to_target_string)
11565 (python_string_to_target_python_string)
11566 (python_string_to_host_string, gdbpy_obj_to_string)
11567 (get_addr_from_python): Use gdbpy_ref.
11568
11569 2017-01-10 Tom Tromey <tom@tromey.com>
11570
11571 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
11572 gdbpy_ref.
11573
11574 2017-01-10 Tom Tromey <tom@tromey.com>
11575
11576 * python/python.c (eval_python_command, gdbpy_decode_line)
11577 (gdbpy_run_events, gdbpy_start_type_printers)
11578 (gdbpy_apply_type_printers): Use gdbpy_ref.
11579
11580 2017-01-10 Tom Tromey <tom@tromey.com>
11581
11582 * python/py-param.c (get_doc_string, compute_enum_values): Use
11583 gdbpy_ref.
11584
11585 2017-01-10 Tom Tromey <tom@tromey.com>
11586
11587 * python/py-inferior.c (find_thread_object, build_inferior_list):
11588 Use gdbpy_ref.
11589
11590 2017-01-10 Tom Tromey <tom@tromey.com>
11591
11592 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11593
11594 2017-01-10 Tom Tromey <tom@tromey.com>
11595
11596 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
11597 gdbpy_ref.
11598
11599 2017-01-10 Tom Tromey <tom@tromey.com>
11600
11601 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
11602 extra incref.
11603 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
11604 Use gdbpy_ref.
11605
11606 2017-01-10 Tom Tromey <tom@tromey.com>
11607
11608 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11609 gdbpy_ref.
11610
11611 2017-01-10 Tom Tromey <tom@tromey.com>
11612
11613 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
11614 decref results of PyArg_ParseTupleAndKeywords.
11615
11616 2017-01-10 Tom Tromey <tom@tromey.com>
11617
11618 * python/python.c (python_run_simple_file): Use
11619 unique_xmalloc_ptr, gdbpy_ref.
11620
11621 2017-01-10 Tom Tromey <tom@tromey.com>
11622
11623 * python/py-prettyprint.c (print_stack_unless_memory_error)
11624 (print_string_repr, print_children): Use gdbpy_ref.
11625 (dummy_python_frame): New class.
11626 (dummy_python_frame::dummy_python_frame): Rename from
11627 push_dummy_python_frame.
11628 (py_restore_tstate): Remove.
11629
11630 2017-01-10 Tom Tromey <tom@tromey.com>
11631
11632 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11633
11634 2017-01-10 Tom Tromey <tom@tromey.com>
11635
11636 * python/python.c (ensure_python_env, restore_python_env):
11637 Remove.
11638 * python/python-internal.h (ensure_python_env): Don't declare.
11639 * varobj.h (varobj_ensure_python_env): Don't declare.
11640 * varobj.c (varobj_ensure_python_env): Remove.
11641
11642 2017-01-10 Tom Tromey <tom@tromey.com>
11643
11644 * varobj.c (varobj_value_get_print_value): Use
11645 gdbpy_enter_varobj.
11646
11647 2017-01-10 Tom Tromey <tom@tromey.com>
11648
11649 * python/py-prettyprint.c (print_string_repr, print_children):
11650 Update.
11651 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
11652 of "encoding".
11653 * varobj.c (varobj_value_get_print_value): Update.
11654 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
11655
11656 2017-01-10 Tom Tromey <tom@tromey.com>
11657
11658 * varobj.c (varobj_get_display_hint)
11659 (dynamic_varobj_has_child_method, install_new_value_visualizer)
11660 (varobj_set_visualizer, free_variable): Use
11661 gdbpy_enter_varobj.
11662
11663 2017-01-10 Tom Tromey <tom@tromey.com>
11664
11665 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
11666 (do_finish_initialization): New function. Use gdbpy_ref.
11667 (gdbpy_finish_initialization): Use gdbpy_enter. Call
11668 do_finish_initialization.
11669
11670 2017-01-10 Tom Tromey <tom@tromey.com>
11671
11672 * python/py-param.c (get_set_value, get_show_value): Use
11673 gdbpy_enter, gdbpy_ref.
11674
11675 2017-01-10 Tom Tromey <tom@tromey.com>
11676
11677 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
11678
11679 2017-01-10 Tom Tromey <tom@tromey.com>
11680
11681 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
11682
11683 2017-01-10 Tom Tromey <tom@tromey.com>
11684
11685 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
11686 Use gdbpy_enter_varobj.
11687
11688 2017-01-10 Tom Tromey <tom@tromey.com>
11689
11690 * varobj.c (gdbpy_enter_varobj): New constructor.
11691 * python/python-internal.h (gdbpy_enter_varobj): New class.
11692 * python/py-varobj.c (py_varobj_get_iterator): Use
11693 gdbpy_enter_varobj.
11694
11695 2017-01-10 Tom Tromey <tom@tromey.com>
11696
11697 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
11698 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11699 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
11700 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
11701 unique_xmalloc_ptr.
11702 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
11703
11704 2017-01-10 Tom Tromey <tom@tromey.com>
11705
11706 * python/py-xmethods.c (invoke_match_method): Use
11707 gdbpy_ref.
11708
11709 2017-01-10 Tom Tromey <tom@tromey.com>
11710
11711 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
11712 gdbpy_enter, gdbpy_ref.
11713
11714 2017-01-10 Tom Tromey <tom@tromey.com>
11715
11716 * python/python.c (python_interactive_command): Use gdbpy_enter.
11717
11718 2017-01-10 Tom Tromey <tom@tromey.com>
11719
11720 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11721 gdbpy_ref.
11722
11723 2017-01-10 Tom Tromey <tom@tromey.com>
11724
11725 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11726 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11727
11728 2017-01-10 Tom Tromey <tom@tromey.com>
11729
11730 * utils.h (htab_deleter): New struct.
11731 (htab_up): New typedef.
11732 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11733 gdbpy_enter, gdbpy_ref, htab_up.
11734
11735 2017-01-10 Tom Tromey <tom@tromey.com>
11736
11737 * python/py-unwind.c (pending_frame_invalidate): Remove.
11738 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11739
11740 2017-01-10 Tom Tromey <tom@tromey.com>
11741
11742 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11743 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11744
11745 2017-01-10 Tom Tromey <tom@tromey.com>
11746
11747 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11748
11749 2017-01-10 Tom Tromey <tom@tromey.com>
11750
11751 * python/python.c (gdbpy_eval_from_control_command)
11752 (gdbpy_source_script, gdbpy_run_events)
11753 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11754 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11755 gdbpy_enter.
11756
11757 2017-01-10 Tom Tromey <tom@tromey.com>
11758
11759 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11760
11761 2017-01-10 Tom Tromey <tom@tromey.com>
11762
11763 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11764
11765 2017-01-10 Tom Tromey <tom@tromey.com>
11766
11767 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11768 (python_on_inferior_call_pre, python_on_inferior_call_post)
11769 (python_on_memory_change, python_on_register_change)
11770 (python_inferior_exit, python_new_objfile, add_thread_object)
11771 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11772
11773 2017-01-10 Tom Tromey <tom@tromey.com>
11774
11775 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11776 (bpfinishpy_handle_exit): Use gdbpy_enter.
11777
11778 2017-01-10 Tom Tromey <tom@tromey.com>
11779
11780 * python/py-cmd.c (cmdpy_destroyer)
11781 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11782 gdbpy_enter.
11783
11784 2017-01-10 Tom Tromey <tom@tromey.com>
11785
11786 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11787 gdbpy_enter.
11788 (gdbpy_breakpoint_has_cond): Likewise.
11789
11790 2017-01-10 Tom Tromey <tom@tromey.com>
11791
11792 * python/python.c (gdbpy_enter): New constructor.
11793 (~gdbpy_enter): New destructor.
11794 (restore_python_env, ensure_python_env): Rewrite.
11795 * python/python-internal.h (gdbpy_enter): New class.
11796
11797 2017-01-10 Tom Tromey <tom@tromey.com>
11798
11799 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11800
11801 2017-01-10 Tom Tromey <tom@tromey.com>
11802
11803 * python/py-value.c (value_has_field, get_field_flag)
11804 (get_field_type, valpy_getitem, convert_value_from_python): Use
11805 gdbpy_ref.
11806
11807 2017-01-10 Tom Tromey <tom@tromey.com>
11808
11809 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
11810 gdbpy_ref.
11811
11812 2017-01-10 Tom Tromey <tom@tromey.com>
11813
11814 * python/py-prettyprint.c (search_pp_list)
11815 (find_pretty_printer_from_objfiles)
11816 (find_pretty_printer_from_progspace)
11817 (find_pretty_printer_from_gdb, find_pretty_printer)
11818 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
11819 gdbpy_ref.
11820
11821 2017-01-10 Tom Tromey <tom@tromey.com>
11822
11823 * python/py-param.c (call_doc_function): Use gdbpy_ref.
11824
11825 2017-01-10 Tom Tromey <tom@tromey.com>
11826
11827 * python/py-linetable.c (build_line_table_tuple_from_pcs)
11828 (ltpy_get_all_source_lines): Use gdbpy_ref.
11829
11830 2017-01-10 Tom Tromey <tom@tromey.com>
11831
11832 * python/py-framefilter.c (extract_sym, extract_value)
11833 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
11834 gdbpy_ref.
11835
11836 2017-01-10 Tom Tromey <tom@tromey.com>
11837
11838 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
11839
11840 2017-01-10 Tom Tromey <tom@tromey.com>
11841
11842 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
11843
11844 2017-01-10 Tom Tromey <tom@tromey.com>
11845
11846 * python/py-function.c (convert_values_to_python, fnpy_init): Use
11847 gdbpy_ref.
11848
11849 2017-01-10 Tom Tromey <tom@tromey.com>
11850
11851 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
11852
11853 2017-01-10 Tom Tromey <tom@tromey.com>
11854
11855 * python/py-type.c (convert_field, make_fielditem, typy_fields)
11856 (typy_range): Use gdbpy_ref.
11857
11858 2017-01-10 Tom Tromey <tom@tromey.com>
11859
11860 * python/py-threadevent.c (create_thread_event_object): Use
11861 gdbpy_ref.
11862 * python/py-stopevent.c (create_stop_event_object): Simplify.
11863 (emit_stop_event): Use gdbpy_ref.
11864 * python/py-signalevent.c (create_signal_event_object): Use
11865 gdbpy_ref.
11866 * python/py-newobjfileevent.c (create_new_objfile_event_object)
11867 (emit_new_objfile_event, create_clear_objfiles_event_object)
11868 (emit_clear_objfiles_event): Use gdbpy_ref.
11869 * python/py-infevents.c (create_inferior_call_event_object)
11870 (create_register_changed_event_object)
11871 (create_memory_changed_event_object, emit_inferior_call_event)
11872 (emit_memory_changed_event, emit_register_changed_event): Use
11873 gdbpy_ref.
11874 * python/py-exitedevent.c (create_exited_event_object)
11875 (emit_exited_event): Use gdbpy_ref.
11876 * python/py-event.h (evpy_emit_event): Remove
11877 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
11878 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
11879 * python/py-continueevent.c (emit_continue_event): Use
11880 gdbpy_ref.
11881 * python/py-breakpoint.c (gdbpy_breakpoint_created)
11882 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
11883 gdbpy_ref.
11884 * python/py-bpevent.c (create_breakpoint_event_object): Use
11885 gdbpy_ref.
11886
11887 2017-01-10 Tom Tromey <tom@tromey.com>
11888
11889 * python/py-ref.h: New file.
11890
11891 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11892
11893 * cli-out.c (cli_ui_out::do_redirect): Change return type to
11894 void.
11895 * cli-out.h (cli_ui_out::do_redirect): Likewise.
11896 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
11897 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
11898 * ui-out.c (ui_out::redirect): Likewise.
11899 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
11900 * cli/cli-logging.c (set_logging_redirect): Update call site of
11901 ui_out::redirect.
11902 (handle_redirections): Likewise.
11903 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
11904 * top.c (execute_command_to_string): Likewise.
11905 * utils.c (do_ui_out_redirect_pop): Likewise.
11906
11907 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11908
11909 * stack.c (_initialize_stack): Update "frame" command help message.
11910
11911 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
11912
11913 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
11914
11915 2017-01-06 Yao Qi <yao.qi@linaro.org>
11916
11917 * x86-linux-nat.h: Include gdb_proc_service.h.
11918
11919 2017-01-06 Yao Qi <yao.qi@linaro.org>
11920
11921 * ser-base.h: Include serial.h.
11922
11923 2017-01-06 Yao Qi <yao.qi@linaro.org>
11924
11925 * ppc-linux-tdep.h: Include ppc-tdep.h.
11926
11927 2017-01-06 Yao Qi <yao.qi@linaro.org>
11928
11929 * nat/amd64-linux-siginfo.h: Include signal.h.
11930
11931 2017-01-06 Yao Qi <yao.qi@linaro.org>
11932
11933 * nat/aarch64-linux-hw-point.h: Include break-common.h.
11934
11935 2017-01-06 Yao Qi <yao.qi@linaro.org>
11936
11937 * mi/mi-parse.h: Include mi-cmds.h.
11938
11939 2017-01-06 Yao Qi <yao.qi@linaro.org>
11940
11941 * inf-loop.c: Don't include "target.h".
11942 * inf-loop.h: Include it here.
11943
11944 2017-01-06 Yao Qi <yao.qi@linaro.org>
11945
11946 * dfp.h: Include "dboulest.h" and "expression.h".
11947
11948 2017-01-06 Yao Qi <yao.qi@linaro.org>
11949
11950 * ax-gdb.h: Include "ax.h".
11951
11952 2017-01-06 Yao Qi <yao.qi@linaro.org>
11953
11954 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
11955 with nat/gdb_ptrace.h.
11956
11957 2017-01-05 Yao Qi <yao.qi@linaro.org>
11958
11959 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
11960 new line.
11961 (mips64_fbsd_sigframe_init): Likewise.
11962
11963 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11964
11965 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
11966 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
11967
11968 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11969
11970 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
11971 * NEWS: Mention new FreeBSD/mips native configuration.
11972 * config/mips/fbsd.mh: New file.
11973 * configure.host: Add mips*-*-freebsd*.
11974 * mips-fbsd-nat.c: New file.
11975
11976 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11977
11978 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
11979 (ALLDEPFILES): Add mips-fbsd-tdep.c.
11980 * NEWS: Mention new FreeBSD/mips target.
11981 * configure.tgt: Add mips*-*-freebsd*.
11982 * mips-fbsd-tdep.c: New file.
11983 * mips-fbsd-tdep.h: New file.
11984
11985 2017-01-04 Yao Qi <yao.qi@linaro.org>
11986
11987 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
11988 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
11989
11990 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11991
11992 Update copyright year range in all GDB files.
11993
11994 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11995
11996 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
11997
11998 For older changes see ChangeLog-2016.
11999 \f
12000 Local Variables:
12001 mode: change-log
12002 left-margin: 8
12003 fill-column: 74
12004 version-control: never
12005 coding: utf-8
12006 End:
This page took 0.29399 seconds and 4 git commands to generate.