Remove cleanups from utils.c
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-09-29 Tom Tromey <tom@tromey.com>
2
3 * utils.c (vfprintf_maybe_filtered): Use std::string.
4 (vfprintf_unfiltered): Likewise.
5
6 2017-09-29 Tom Tromey <tom@tromey.com>
7
8 * event-top.c (top_level_prompt): Return std::string.
9 (display_gdb_prompt): Update.
10
11 2017-09-29 Tom Tromey <tom@tromey.com>
12
13 * unittests/common-utils-selftests.c (format): New function.
14 (string_vprintf_tests): New function.
15 (_initialize_common_utils_selftests): Register new tests.
16 * common/common-utils.c (string_vprintf): New function.
17 * common/common-utils.h (string_vprintf): Declare.
18
19 2017-09-29 Pedro Alves <palves@redhat.com>
20
21 * common/rsp-low.c (unpack_varlen_hex): Constify.
22 * common/rsp-low.h (unpack_varlen_hex): Constify.
23 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
24 Constify.
25 * remote.c (remote_set_permissions, read_ptid)
26 (remote_current_thread, remote_get_threads_with_qthreadinfo)
27 (remote_static_tracepoint_marker_at)
28 (remote_static_tracepoint_markers_by_strid)
29 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
30 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
31 (parse_tracepoint_definition, parse_tsv_definition)
32 (parse_static_tracepoint_marker_definition): Constify.
33 * tracepoint.h (parse_static_tracepoint_marker_definition)
34 (parse_trace_status, parse_tracepoint_status)
35 (parse_tracepoint_definition, parse_tsv_definition): Constify.
36
37 2017-09-29 Pedro Alves <palves@redhat.com>
38
39 * remote.c (target_buf, target_buf_size): Delete.
40 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
41 Use the connection's packet buffer instead.
42 All callers adjusted.
43 (_initialize_remote): Remove references to target_buf and
44 target_buf_size.
45
46 2017-09-28 Pedro Alves <palves@redhat.com>
47
48 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
49 unittests/common-utils-selftests.c.
50 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
51 (COMMON_OBS): Remove utils-selftests.o.
52 * utils-selftests.c: Move to ...
53 * unittests/common-utils-selftests.c: ... here and rename self
54 test to "string_printf".
55
56 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
57
58 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
59 having NULL cus or tus.
60
61 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
62
63 * arm-tdep.c: (convert_from_extended): Remove.
64 (convert_to_extended): Likewise.
65 (arm_extract_return_value): Use convert_typed_floating.
66 (arm_store_return_value): Likewise.
67
68 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
69 * sh-tdep.c: Do not include "floatformat.h".
70 (sh_littlebyte_bigword_type): New function.
71 (sh_register_convert_to_virtual): Use convert_typed_floating.
72 (sh_register_convert_to_raw): Likewise.
73 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
74 (sh64_littlebyte_bigword_type): New function.
75 (sh64_extract_return_value): Use convert_typed_floating.
76 (sh64_register_convert_to_virtual): Likewise.
77 (sh64_register_convert_to_raw): Likewise.
78
79 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
80
81 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
82 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
83
84 * gdbtypes.h (union type_specific): Make field floatformat hold
85 just a single struct floatformat, not an array.
86 (floatformat_from_type): Move here.
87 * gdbtypes.c (floatformat_from_type): Move here. Update to
88 changed TYPE_FLOATFORMAT definition.
89 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
90 (recursive_dump_type): Likewise.
91 (init_float_type): Install correct floatformat for byte order.
92 (arch_float_type): Likewise.
93
94 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
95
96 * gdbtypes.c (init_type): Change incoming argument from
97 length-in-bytes to length-in-bits. Assert length is a
98 multiple of TARGET_CHAR_BITS.
99 (arch_type, arch_flags_type): Likewise.
100 (init_integer_type): Update call to init_type.
101 (init_character_type): Likewise.
102 (init_boolean_type): Likewise.
103 (init_float_type): Likewise.
104 (init_decfloat_type): Likewise.
105 (init_complex_type): Likewise.
106 (init_pointer_type): Likewise.
107 (objfile_type): Likewise.
108 (arch_integer_type): Update call to arch_type.
109 (arch_character_type): Likewise.
110 (arch_boolean_type): Likewise.
111 (arch_float_type): Likewise.
112 (arch_decfloat_type): Likewise.
113 (arch_complex_type): Likewise.
114 (arch_pointer_type): Likewise.
115 (gdbtypes_post_init): Likewise.
116
117 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
118 (read_base_type): Likewise.
119 * mdebugread.c (basic_type): Likewise.
120 * stabsread.c (dbx_init_float_type): Likewise.
121 (rs6000_builtin_type): Likewise.
122 (read_range_type): Likewise. Also, fix call to init_integer_type
123 with erroneous length argument.
124
125 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
126 * d-lang.c (build_d_types): Likewise.
127 * f-lang.c (build_fortran_types): Likewise.
128 * go-lang.c (build_go_types): Likewise.
129 * opencl-lang.c (build_opencl_types): Likewise.
130 * jit.c (finalize_symtab): Likewise.
131 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
132 (build_std_type_info_type): Likewise.
133 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
134 update call to arch_flags_type.
135
136 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
137 arch_type.
138 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
139 * windows-tdep.c (windows_get_tlb_type): Likewise.
140
141 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
142 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
143 * m32c-tdep.c (make_types): Likewise.
144 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
145 (rl78_psw_type): Update call to arch_flags_type.
146 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
147 * rx-tdep.c (rx_psw_type): Likewise.
148 (rx_fpsw_type): Likewise.
149 * sparc-tdep.c (sparc_psr_type): Likewise.
150 (sparc_fsr_type): Likewise.
151 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
152 (sparc64_ccr_type): Likewise.
153 (sparc64_fsr_type): Likewise.
154 (sparc64_fprs_type): Likewise.
155
156 2017-09-27 Tom Tromey <tom@tromey.com>
157
158 * findcmd.c (find_command): Constify.
159
160 2017-09-27 Tom Tromey <tom@tromey.com>
161
162 * ada-tasks.c (task_command_1, task_command): Constify.
163
164 2017-09-27 Tom Tromey <tom@tromey.com>
165
166 * symtab.c (maintenance_print_symbol_cache)
167 (maintenance_flush_symbol_cache)
168 (maintenance_print_symbol_cache_statistics): Constify.
169
170 2017-09-27 Tom Tromey <tom@tromey.com>
171
172 * inferior.c (detach_inferior_command, kill_inferior_command)
173 (inferior_command): Constify.
174
175 2017-09-27 Tom Tromey <tom@tromey.com>
176
177 * regcache.c (regcache_print, maintenance_print_registers)
178 (maintenance_print_raw_registers)
179 (maintenance_print_cooked_registers)
180 (maintenance_print_register_groups)
181 (maintenance_print_remote_registers): Constify.
182
183 2017-09-27 Tom Tromey <tom@tromey.com>
184
185 * printcmd.c (map_display_numbers, undisplay_command)
186 (enable_disable_display_command, enable_display_command)
187 (disable_display_command): Constify.
188
189 2017-09-27 Tom Tromey <tom@tromey.com>
190
191 * breakpoint.h (delete_command): Don't declare.
192 * breakpoint.c (delete_command, enable_once_command)
193 (enable_count_command, enable_delete_command, breakpoint_1)
194 (maintenance_info_breakpoints, stopin_command, stopat_command)
195 (delete_command, delete_trace_command, save_breakpoints)
196 (save_breakpoints_command, save_tracepoints_command): Constify.
197
198 2017-09-27 Tom Tromey <tom@tromey.com>
199
200 * macrocmd.c (macro_expand_command, macro_expand_once_command)
201 (skip_ws, extract_identifier, macro_define_command)
202 (macro_undef_command, macro_list_command): Constify.
203
204 2017-09-27 Tom Tromey <tom@tromey.com>
205
206 * infcmd.c (environment_info, set_environment_command)
207 (unset_environment_command, path_info, info_proc_cmd_1)
208 (info_proc_cmd_mappings, info_proc_cmd_stat)
209 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
210 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
211
212 2017-09-27 Tom Tromey <tom@tromey.com>
213
214 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
215 Constify.
216
217 2017-09-27 Tom Tromey <tom@tromey.com>
218
219 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
220
221 2017-09-27 Tom Tromey <tom@tromey.com>
222
223 * demangle.c (demangle_command): Constify.
224
225 2017-09-27 Tom Tromey <tom@tromey.com>
226
227 * progspace.c (maintenance_info_program_spaces_command):
228 Constify.
229
230 2017-09-27 Tom Tromey <tom@tromey.com>
231
232 * compile/compile.c (check_raw_argument, compile_file_command)
233 (compile_code_command, compile_print_command): Constify.
234
235 2017-09-27 Tom Tromey <tom@tromey.com>
236
237 * reggroups.c (maintenance_print_reggroups): Constify.
238
239 2017-09-27 Tom Tromey <tom@tromey.com>
240
241 * dwarf2read.c (save_gdb_index_command): Constify.
242
243 2017-09-27 Tom Tromey <tom@tromey.com>
244
245 * stap-probe.c (info_probes_stap_command): Constify.
246
247 2017-09-27 Tom Tromey <tom@tromey.com>
248
249 * fork-child.c (unset_exec_wrapper_command): Constify.
250
251 2017-09-27 Tom Tromey <tom@tromey.com>
252
253 * btrace.c (get_uint, get_context_size, no_chunk)
254 (maint_btrace_packet_history_cmd)
255 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
256 (maint_info_btrace_cmd): Constify.
257
258 2017-09-27 Tom Tromey <tom@tromey.com>
259
260 * reverse.c (delete_bookmark_command): Constify.
261
262 2017-09-27 Tom Tromey <tom@tromey.com>
263
264 * remote.c (set_memory_packet_size)
265 (set_memory_write_packet_size, show_memory_write_packet_size)
266 (set_memory_read_packet_size, show_memory_read_packet_size)
267 (compare_sections_command, packet_command, remote_put_command)
268 (remote_get_command, remote_delete_command): Constify.
269
270 2017-09-27 Tom Tromey <tom@tromey.com>
271
272 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
273 (set_mipsfpu_double_command, set_mipsfpu_none_command)
274 (set_mipsfpu_auto_command): Constify.
275
276 2017-09-27 Tom Tromey <tom@tromey.com>
277
278 * cli/cli-cmds.h (cd_command): Constify.
279 * cli/cli-cmds.c (cd_command): Constify.
280
281 2017-09-27 Tom Tromey <tom@tromey.com>
282
283 * thread.c (thread_name_command, thread_find_command): Constify.
284
285 2017-09-27 Tom Tromey <tom@tromey.com>
286
287 * probe.c (enable_probes_command, disable_probes_command):
288 Constify.
289
290 2017-09-27 Tom Tromey <tom@tromey.com>
291
292 * symfile.c (symbol_file_command): Constify.
293 * gdbcore.h (deprecated_file_changed_hook): Constify.
294 * exec.c (deprecated_file_changed_hook, exec_file_command)
295 (file_command): Constify.
296 * defs.h (symbol_file_command): Constify.
297
298 2017-09-27 Tom Tromey <tom@tromey.com>
299
300 * remote-fileio.c (set_system_call_allowed)
301 (show_system_call_allowed): Constify.
302
303 2017-09-27 Tom Tromey <tom@tromey.com>
304
305 * tracepoint.c (delete_trace_variable_command)
306 (tfind_end_command, tfind_start_command, tfind_pc_command)
307 (tfind_tracepoint_command, tfind_line_command)
308 (tfind_range_command, tfind_outside_command): Constify.
309
310 2017-09-27 Tom Tromey <tom@tromey.com>
311
312 * ax-gdb.c (maint_agent_printf_command, agent_command)
313 (agent_eval_command): Constify.
314
315 2017-09-27 Tom Tromey <tom@tromey.com>
316
317 * tracepoint.c (info_scope_command): Constify.
318 * python/python.c (gdbpy_decode_line): Constify.
319 * python/py-breakpoint.c (bppy_init): Constify.
320 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
321 * location.h: (new_linespec_location)
322 (string_to_event_location_basic, string_to_event_location):
323 Constify.
324 * location.c (new_linespec_location)
325 (string_to_event_location_basic, string_to_event_location):
326 Constify.
327 * linespec.h (decode_line_with_current_source)
328 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
329 * linespec.c (linespec_lex_to_end)
330 (decode_line_with_current_source)
331 (decode_line_with_last_displayed): Constify.
332 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
333 Constify.
334 * cli/cli-cmds.c (edit_command, list_command): Constify.
335 * breakpoint.h (until_break_command, watch_command_wrapper)
336 (awatch_command_wrapper, rwatch_command_wrapper)
337 (init_ada_exception_breakpoint): Constify.
338 * breakpoint.c (break_command_1, dprintf_command)
339 (break_range_command, watch_command_wrapper)
340 (rwatch_command_wrapper, awatch_command_wrapper)
341 (until_break_command, init_ada_exception_breakpoint)
342 (strace_marker_create_sals_from_location, trace_command)
343 (ftrace_command, strace_command, struct tracepoint): Constify.
344 * ax-gdb.c (agent_command_1): Constify.
345 * ada-lang.c (ada_exception_sal): Constify.
346
347 2017-09-27 Tom Tromey <tom@tromey.com>
348
349 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
350 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
351 (get_context_size, no_chunk, get_insn_history_modifiers)
352 (cmd_record_insn_history, get_call_history_modifiers)
353 (cmd_record_call_history): Constify.
354
355 2017-09-27 Tom Tromey <tom@tromey.com>
356
357 * source.c (show_substitute_path_command)
358 (unset_substitute_path_command, set_substitute_path_command):
359 Constify.
360
361 2017-09-27 Tom Tromey <tom@tromey.com>
362
363 * typeprint.c (maintenance_print_type): Constify.
364 * maint.c (maintenance_dump_me, maintenance_demangle)
365 (maintenance_time_display, maintenance_info_sections)
366 (maintenance_print_statistics, maintenance_deprecate)
367 (maintenance_undeprecate): Constify.
368 (maintenance_do_deprecate): Constify. Use std::string.
369 (maintenance_selftest): Constify.
370 * gdbtypes.h (maintenance_print_type): Constify.
371
372 2017-09-27 Tom Tromey <tom@tromey.com>
373
374 * hppa-tdep.c (unwind_command): Constify.
375
376 2017-09-27 Tom Tromey <tom@tromey.com>
377
378 * target-descriptions.c (unset_tdesc_filename_cmd)
379 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
380 Constify.
381
382 2017-09-27 Tom Tromey <tom@tromey.com>
383
384 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
385
386 2017-09-27 Tom Tromey <tom@tromey.com>
387
388 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
389
390 2017-09-27 Tom Tromey <tom@tromey.com>
391
392 * tui/tui-regs.c (tui_reg_command): Constify.
393
394 2017-09-27 Tom Tromey <tom@tromey.com>
395
396 * skip.c (skip_file_command, skip_function_command)
397 (skip_enable_command, skip_disable_command, skip_delete_command):
398 Constify.
399
400 2017-09-27 Tom Tromey <tom@tromey.com>
401
402 * record-btrace.c (cmd_record_btrace_bts_start)
403 (cmd_record_btrace_pt_start): Constify.
404
405 2017-09-27 Tom Tromey <tom@tromey.com>
406
407 * symmisc.c (maintenance_print_symbols)
408 (maintenance_print_msymbols, maintenance_print_objfiles)
409 (maintenance_info_symtabs, maintenance_check_symtabs)
410 (maintenance_expand_symtabs, maintenance_info_line_tables):
411 Constify.
412
413 2017-09-27 Tom Tromey <tom@tromey.com>
414
415 * top.c (new_ui_command): Constify.
416
417 2017-09-27 Tom Tromey <tom@tromey.com>
418
419 * symfile.c (add_symbol_file_command)
420 (remove_symbol_file_command, list_overlays_command)
421 (map_overlay_command, unmap_overlay_command)
422 (overlay_auto_command, overlay_manual_command)
423 (overlay_off_command, overlay_load_command): Constify.
424
425 2017-09-27 Tom Tromey <tom@tromey.com>
426
427 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
428 (info_spu_mailbox_command, info_spu_dma_command)
429 (info_spu_proxydma_command): Constify.
430
431 2017-09-27 Tom Tromey <tom@tromey.com>
432
433 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
434
435 2017-09-27 Tom Tromey <tom@tromey.com>
436
437 * cli/cli-script.c (user_defined_command): Constify.
438
439 2017-09-27 Tom Tromey <tom@tromey.com>
440
441 * cli/cli-dump.c (dump_memory_command, dump_value_command)
442 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
443 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
444 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
445 (dump_binary_value, append_binary_memory, append_binary_value):
446 Constify.
447 (struct dump_context) <func>: Constify.
448 (add_dump_command): Update.
449
450 2017-09-27 Tom Tromey <tom@tromey.com>
451
452 * cli/cli-cmds.c (show_version, show_configuration)
453 (source_command, show_user): Constify.
454
455 2017-09-27 Tom Tromey <tom@tromey.com>
456
457 * target.c (maintenance_print_target_stack): Constify.
458
459 2017-09-27 Tom Tromey <tom@tromey.com>
460
461 * interps.c (interpreter_exec_cmd): Constify.
462
463 2017-09-27 Tom Tromey <tom@tromey.com>
464
465 * record-full.c (cmd_record_full_restore): Constify.
466
467 2017-09-27 Tom Tromey <tom@tromey.com>
468
469 * memattr.c (enable_mem_command, disable_mem_command)
470 (delete_mem_command): Constify.
471
472 2017-09-27 Tom Tromey <tom@tromey.com>
473
474 * value.c (show_convenience): Constify.
475
476 2017-09-27 Tom Tromey <tom@tromey.com>
477
478 * gdbcore.h (core_file_command): Update.
479 * corefile.c (core_file_command): Constify.
480
481 2017-09-27 Tom Tromey <tom@tromey.com>
482
483 * user-regs.c (maintenance_print_user_registers): Constify.
484
485 2017-09-27 Tom Tromey <tom@tromey.com>
486
487 * cp-namespace.c (maintenance_cplus_namespace): Constify.
488
489 2017-09-27 Tom Tromey <tom@tromey.com>
490
491 * cp-support.c (first_component_command): Constify.
492
493 2017-09-27 Tom Tromey <tom@tromey.com>
494
495 * psymtab.c (maintenance_print_psymbols)
496 (maintenance_info_psymtabs, maintenance_check_psymtabs):
497 Constify.
498
499 2017-09-27 Tom Tromey <tom@tromey.com>
500
501 * windows-tdep.c (display_tib): Constify.
502
503 2017-09-27 Tom Tromey <tom@tromey.com>
504
505 * linux-fork.c (delete_checkpoint_command)
506 (detach_checkpoint_command): Constify.
507
508 2017-09-27 Tom Tromey <tom@tromey.com>
509
510 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
511
512 2017-09-27 Tom Tromey <tom@tromey.com>
513
514 * arc-tdep.c (dump_arc_instruction_command): Constify.
515
516 2017-09-27 Tom Tromey <tom@tromey.com>
517
518 * valprint.c (set_radix, show_radix): Constify.
519
520 2017-09-27 Tom Tromey <tom@tromey.com>
521
522 * dtrace-probe.c (info_probes_dtrace_command): Constify.
523
524 2017-09-27 Tom Tromey <tom@tromey.com>
525
526 * command.h (not_just_help_class_command): Update.
527 * cli/cli-decode.h (not_just_help_class_command): Update.
528 * cli/cli-decode.c (not_just_help_class_command): Constify.
529
530 2017-09-27 Tom Tromey <tom@tromey.com>
531
532 * gdb_bfd.c (maintenance_info_bfds): Constify.
533
534 2017-09-27 Tom Tromey <tom@tromey.com>
535
536 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
537 overloads.
538 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
539 (do_const_cfunc): New function.
540 (cmd_cfunc_eq): New overload.
541 (cli_user_command_p): Check do_const_cfunc.
542 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
543 const_cfunc.
544 * command.h (add_cmd): Add const overload and no-function
545 overload.
546 (set_cmd_cfunc): Add const overload.
547 (cmd_const_cfunc_ftype): Declare.
548 (cmd_cfunc_eq): Add const overload.
549 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
550 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
551 overload.
552
553 2017-09-27 Tom Tromey <tom@tromey.com>
554
555 * macroexp.c (get_next_token_for_substitution): New function.
556 (substitute_args): Call it. Check for __VA_OPT__.
557
558 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
559 Pedro Alves <palves@redhat.com>
560
561 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
562 producer_is_icc_lt_14.
563 (producer_is_icc_lt_14): New function.
564 (check_producer): Add code for checking version of ICC.
565 (producer_is_icc): Move to producer.c.
566 (read_structure_type): Restrict ICC workaround to ICC<14.
567 * producer.c: Include selftest.h.
568 (producer_is_icc, producer_parsing_tests, _initialize_producer):
569 New functions.
570 * producer.h (producer_is_icc): New declaration.
571
572 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
573
574 * Makefile.in (SFILES): Add producer.c.
575 (COMMON_OBS): Add producer.o
576 * amd64-tdep.c (producer.h): Add new include.
577 * dwarf2read.c (producer.h): Add new include.
578 * producer.c: New file.
579 * producer.h: New file.
580 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
581 producer.c.
582 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
583 producer.h.
584
585 2017-09-26 Matthias Klose <doko@ubuntu.com>
586
587 * configure.ac: Search ncursesw before ncurses.
588 Check ncursesw/ncurses.h before ncurses/ncurses.h.
589 * gdb_curses.h: Include <ncursesw/ncurses.h>
590 * config.in, configure: Regenerate.
591
592 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
593
594 PR gdb/22185
595 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
596 obsolete.
597 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
598 Remove i386sol2 support.
599 * configure.nat <i386sol2>: Remove.
600 <sol2-64>: Fold into ...
601 <sol2>: ... this.
602 Move common settings to default section.
603 Add sol-thread.o.
604 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
605 x86_64-*-solaris2.1[0-9]*>: Rename to ...
606 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
607 <i[34567]86-*-solaris*>: Remove.
608 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
609
610 * configure.ac: Remove wctype in libw check.
611 (_MSE_INT_H): Don't define on Solaris 7-9.
612 <solaris*>: Remove libthread_db.so.1 check.
613 * configure: Regenerate.
614 * config.in: Regenerate.
615
616 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
617 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
618 (gdb_ps_size_t): Remove.
619 Use base types in users.
620 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
621
622 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
623
624 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
625
626 PR build/22206
627 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
628 (adi_is_addr_mapped): Likewise.
629 (PSR_ICC): Don't redefine.
630 (PSR_IMPL): Likewise.
631
632 2017-09-25 Tom Tromey <tom@tromey.com>
633
634 * regcache.c (regcache::dump): Use string_printf.
635
636 2017-09-25 Tom Tromey <tom@tromey.com>
637
638 * regcache.c (class regcache_invalidator): New.
639 (struct register_to_invalidate): Remove.
640 (make_cleanup_regcache_invalidate): Remove.
641 (regcache::raw_write): Use regcache_invalidator.
642
643 2017-09-25 Tom Tromey <tom@tromey.com>
644
645 * spu-tdep.c (spu2ppu_sniffer): Update.
646 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
647 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
648 Remove.
649 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
650 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
651 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
652 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
653 (frame_pop): Update.
654
655 2017-09-25 Tom Tromey <tom@tromey.com>
656
657 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
658 * regcache.h (regcache_xfree): Don't declare.
659 * regcache.c (regcache_xfree): Remove.
660 (do_regcache_xfree): Use delete.
661 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
662 * linux-fork.c (free_fork): Use delete.
663 (fork_save_infrun_state): Likewise.
664 * jit.c (jit_dealloc_cache): Use delete.
665 * infrun.c (discard_infcall_suspend_state): Use delete.
666
667 2017-09-25 Tom Tromey <tom@tromey.com>
668
669 * regcache.h (regcache_xmalloc): Don't declare.
670 (regcache_raw_set_cached_value): Update comment.
671 * regcache.c (regcache_xmalloc): Remove.
672 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
673 * jit.c (jit_frame_sniffer): Use new.
674 * frame.c (frame_save_as_regcache): Use new.
675
676 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
677
678 * NEWS: Advertise support for guarded-storage registers on IBM z.
679
680 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
681
682 * s390-linux-nat.c (have_regset_gs): New static variable.
683 (s390_linux_fetch_inferior_registers): Handle guarded-storage
684 control block and guarded-storage broadcast control regsets.
685 (s390_read_description): Detect whether the target has
686 guarded-storage support, return appropriate tdesc.
687 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
688 (features/s390x-gs-linux64.c): Likewise.
689 (struct gdbarch_tdep) <have_gs>: New field.
690 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
691 (s390_gsbc_regset): New variables.
692 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
693 and s390_gsbc_regset, if applicable.
694 (s390_core_read_description): Check whether core file was from a
695 target with guarded-storage support; include appropriate regsets.
696 (s390_gdbarch_init): Add registers for guarded-storage support.
697 (_initialize_s390_tdep): Initialize new target descriptions that
698 include registers for guarded-storage support.
699 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
700 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
701 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
702 (S390_NUM_REGS): Adjust macro definition.
703 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
704 (tdesc_s390x_gs_linux64): New declarations.
705
706 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
707
708 * features/s390-gs-linux64.xml: New file.
709 * features/s390-gs.xml: New file.
710 * features/s390-gsbc.xml: New file.
711 * features/s390x-gs-linux64.xml: New file.
712 * features/Makefile (WHICH): Add s390-gs-linux64 and
713 s390x-gs-linux64.
714 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
715 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
716 * features/s390-gs-linux64.c: New generated file.
717 * features/s390x-gs-linux64.c: New file.
718 * regformats/s390-gs-linux64.dat: New file.
719 * regformats/s390x-gs-linux64.dat: New file.
720
721 2017-09-23 Tom Tromey <tom@tromey.com>
722
723 * defs.h (make_cleanup_override_quit_handler): Don't declare.
724
725 2017-09-22 Tom Tromey <tom@tromey.com>
726
727 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
728 type to scoped_restore_tmpl.
729 <scoped_input_handler>: Initialize m_quit_handler directly.
730
731 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
732
733 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
734 (cd_command): Likewise. Free "current_directory" before
735 assigning to it.
736 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
737 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
738 * top.c (gdb_dirbuf): Remove global declaration.
739 * top.h (gdb_dirbuf): Likewise.
740
741 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
742
743 * gnulib/aclocal.m4: Regenerate.
744 * gnulib/config.in: Regenerate.
745 * gnulib/configure: Regenerate.
746 * gnulib/import/Makefile.am: Regenerate.
747 * gnulib/import/Makefile.in: Regenerate.
748 * gnulib/import/assure.h: New file.
749 * gnulib/import/at-func.c: Likewise
750 * gnulib/import/chdir-long.c: New file.
751 * gnulib/import/chdir-long.h: New file.
752 * gnulib/import/cloexec.c: New file.
753 * gnulib/import/cloexec.h: New file.
754 * gnulib/import/close.c: New file.
755 * gnulib/import/closedir.c: New file.
756 * gnulib/import/dirent-private.h: New file.
757 * gnulib/import/dup-safer.c: New file.
758 * gnulib/import/dup.c: New file.
759 * gnulib/import/dup2.c: New file.
760 * gnulib/import/error.c: New file.
761 * gnulib/import/error.h: New file.
762 * gnulib/import/exitfail.c: New file.
763 * gnulib/import/exitfail.h: New file.
764 * gnulib/import/fchdir.c: New file.
765 * gnulib/import/fcntl.c: New file.
766 * gnulib/import/fcntl.in.h: New file.
767 * gnulib/import/fd-hook.c: New file.
768 * gnulib/import/fd-hook.h: New file.
769 * gnulib/import/fd-safer.c: New file.
770 * gnulib/import/fdopendir.c: New file.
771 * gnulib/import/filename.h: New file.
772 * gnulib/import/filenamecat-lgpl.c: New file.
773 * gnulib/import/filenamecat.h: New file.
774 * gnulib/import/fstat.c: New file.
775 * gnulib/import/fstatat.c: New file.
776 * gnulib/import/getcwd-lgpl.c: New file.
777 * gnulib/import/getcwd.c: New file.
778 * gnulib/import/getdtablesize.c: New file.
779 * gnulib/import/getlogin_r.c: New file.
780 * gnulib/import/getprogname.c: New file.
781 * gnulib/import/getprogname.h: New file.
782 * gnulib/import/gettext.h: New file.
783 * gnulib/import/glob-libc.h: New file.
784 * gnulib/import/glob.c: New file.
785 * gnulib/import/glob.in.h: New file.
786 * gnulib/import/intprops.h: New file.
787 * gnulib/import/m4/chdir-long.m4: New file.
788 * gnulib/import/m4/close.m4: New file.
789 * gnulib/import/m4/closedir.m4: New file.
790 * gnulib/import/m4/d-ino.m4: New file.
791 * gnulib/import/m4/d-type.m4: New file.
792 * gnulib/import/m4/dup.m4: New file.
793 * gnulib/import/m4/dup2.m4: New file.
794 * gnulib/import/m4/error.m4: New file.
795 * gnulib/import/m4/fchdir.m4: New file.
796 * gnulib/import/m4/fcntl.m4: New file.
797 * gnulib/import/m4/fcntl_h.m4: New file.
798 * gnulib/import/m4/fdopendir.m4: New file.
799 * gnulib/import/m4/filenamecat.m4: New file.
800 * gnulib/import/m4/fstat.m4: New file.
801 * gnulib/import/m4/fstatat.m4: New file.
802 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
803 * gnulib/import/m4/getcwd-path-max.m4: New file.
804 * gnulib/import/m4/getcwd.m4: New file.
805 * gnulib/import/m4/getdtablesize.m4: New file.
806 * gnulib/import/m4/getlogin_r.m4: New file.
807 * gnulib/import/m4/getprogname.m4: New file.
808 * gnulib/import/m4/glob.m4: New file.
809 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
810 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
811 * gnulib/import/m4/mempcpy.m4: New file.
812 * gnulib/import/m4/memrchr.m4: New file.
813 * gnulib/import/m4/mode_t.m4: New file.
814 * gnulib/import/m4/msvc-inval.m4: New file.
815 * gnulib/import/m4/msvc-nothrow.m4: New file.
816 * gnulib/import/m4/open.m4: New file.
817 * gnulib/import/m4/openat.m4: New file.
818 * gnulib/import/m4/opendir.m4: New file.
819 * gnulib/import/m4/readdir.m4: New file.
820 * gnulib/import/m4/realloc.m4: New file.
821 * gnulib/import/m4/rewinddir.m4: New file.
822 * gnulib/import/m4/save-cwd.m4: New file.
823 * gnulib/import/m4/strdup.m4: New file.
824 * gnulib/import/m4/strerror.m4: New file.
825 * gnulib/import/m4/unistd-safer.m4: New file.
826 * gnulib/import/mempcpy.c: New file.
827 * gnulib/import/memrchr.c: New file.
828 * gnulib/import/msvc-inval.c: New file.
829 * gnulib/import/msvc-inval.h: New file.
830 * gnulib/import/msvc-nothrow.c: New file.
831 * gnulib/import/msvc-nothrow.h: New file.
832 * gnulib/import/open.c: New file.
833 * gnulib/import/openat-die.c: New file.
834 * gnulib/import/openat-priv.h: New file.
835 * gnulib/import/openat-proc.c: New file.
836 * gnulib/import/openat.c: New file.
837 * gnulib/import/openat.h: New file.
838 * gnulib/import/opendir.c: New file.
839 * gnulib/import/pipe-safer.c: New file.
840 * gnulib/import/readdir.c: New file.
841 * gnulib/import/realloc.c: New file.
842 * gnulib/import/rewinddir.c: New file.
843 * gnulib/import/save-cwd.c: New file.
844 * gnulib/import/save-cwd.h: New file.
845 * gnulib/import/strdup.c: New file.
846 * gnulib/import/strerror-override.c: New file.
847 * gnulib/import/strerror-override.h: New file.
848 * gnulib/import/strerror.c: New file.
849 * gnulib/import/unistd--.h: New file.
850 * gnulib/import/unistd-safer.h: New file.
851 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
852 "getcwd" and "glob".
853 * ser-tcp.c: Undefine "close" before redefining it.
854
855 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
856
857 * guile/scm-value.c (gdbscm_value_address): Initialize address,
858 get rid of res_val.
859
860 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
861
862 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
863 <sol2,sparc>: Likewise.
864 <sol2-64,i386>: Likewise.
865
866 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
867 -Wdeprecated-declarations on *-*-solaris*.
868 * configure: Regenerate.
869
870 * procfs.c: Include "nat/inferior.h".
871 (procfs_info_proc): Fix typo.
872
873 2017-09-21 Kevin Buettner <kevinb@redhat.com>
874
875 * remote.c (vector): Include.
876 (struct private_thread_info): Add field, thread_handle.
877 (free_private_thread_info): Deallocate storage associated with
878 thread handle.
879 (get_private_info_thread): Initialize `thread_handle' field.
880 (struct thread_item): Add field, thread_handle.
881 (clear_threads_listing_context): Deallocate storage associated
882 with thread handle.
883 (start_thread): Add support for "handle" attribute.
884 (thread_attributes): Add "handle".
885 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
886 field.
887 (remote_update_thread_list): Update thread_handle.
888 (remote_thread_handle_to_thread_info): New function.
889 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
890
891 2017-09-21 Kevin Buettner <kevinb@redhat.com>
892
893 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
894 function.
895 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
896 * python/python-internal.h (thread_object_type): Declare.
897
898 2017-09-21 Kevin Buettner <kevinb@redhat.com>
899
900 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
901 (target_thread_handle_to_thread_info): Declare.
902 * target.c (target_thread_handle_to_thread_info): New function.
903 * target-delegates.c: Regenerate.
904 * gdbthread.h (find_thread_by_handle): Declare.
905 * thread.c (find_thread_by_handle): New function.
906 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
907 function.
908 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
909
910 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
911
912 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
913
914 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
915
916 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
917
918 2017-09-21 Yao Qi <yao.qi@linaro.org>
919
920 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
921 to gdb_target_obs.
922
923 2017-09-20 Tom Tromey <tom@tromey.com>
924
925 * breakpoint.c (struct counted_command_line): Remove.
926 (breakpoint_commands): Update.
927 (alloc_counted_command_line, incref_counted_command_line)
928 (decref_counted_command_line, do_cleanup_counted_command_line)
929 (make_cleanup_decref_counted_command_line): Remove.
930 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
931 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
932 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
933 (save_breakpoints): Update.
934 * breakpoint.h (counted_command_line): Now a typedef to
935 shared_ptr.
936 (struct breakpoint) <commands>: Now a counted_command_line.
937 (struct bpstats) <command>: Likewise.
938
939 2017-09-20 Tom Tromey <tom@tromey.com>
940
941 * breakpoint.c (struct commands_info, do_map_commands_command):
942 Remove.
943 (commands_command_1): Update.
944 (iterate_over_related_breakpoints): Take a function_view.
945 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
946 (delete_command): Update.
947 (map_breakpoint_numbers): Take a function_view.
948 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
949 (disable_command): Update.
950 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
951 (enable_command): Update.
952 (struct disp_data, do_enable_breakpoint_disp)
953 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
954 (do_map_enable_delete_breakpoint): Remove.
955 (enable_once_command, enable_count_command, enable_delete_command)
956 (delete_trace_variable_command): Update.
957
958 2017-09-20 Tom Tromey <tom@tromey.com>
959
960 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
961 (bpstat_clear): Use delete.
962 (bpstats): New constructors.
963 (bpstat_copy, bpstat_stop_status): Use new.
964 (dprintf_after_condition_true): Update.
965 * breakpoint.h (bpstats::bpstats): Add constructors.
966 (bpstats::~bpstats): Add destructor.
967
968 2017-09-20 Pedro Alves <palves@redhat.com>
969
970 * eval.c (make_params): Delete, refactored as ...
971 (class fake_method): ... this new type's ctor.
972 (fake_method::~fake_method): New.
973 (evaluate_subexp_standard): Use 'fake_method'.
974
975 2017-09-20 Tom Tromey <tom@tromey.com>
976
977 * windows-nat.c (get_windows_debug_event, windows_wait)
978 (do_initial_windows_stuff, windows_attach): Update.
979 * utils.c (vwarning, internal_vproblem): Update.
980 (ui_unregister_input_event_handler_cleanup)
981 (prepare_to_handle_input): Remove.
982 (class scoped_input_handler): New.
983 (defaulted_query, prompt_for_continue): Update.
984 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
985 Update.
986 * top.c (undo_terminal_modifications_before_exit): Update.
987 * target/target.h (target_terminal_init, target_terminal_inferior)
988 (target_terminal_ours): Don't declare.
989 (class target_terminal): New.
990 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
991 (target_terminal_ours_for_output)
992 (make_cleanup_restore_target_terminal): Don't declare.
993 (target_terminal_info): Remove.
994 * target.c (enum terminal_state, terminal_state): Remove.
995 (target_terminal::terminal_state): Define.
996 (target_terminal::init): Rename from target_terminal_init.
997 (target_terminal::inferior): Rename from
998 target_terminal_inferior.
999 (target_terminal::ours): Rename from target_terminal_ours.
1000 (target_terminal::ours_for_output): Rename from
1001 target_terminal_ours_for_output.
1002 (target_terminal::info): New method.
1003 (cleanup_restore_target_terminal)
1004 (make_cleanup_restore_target_terminal): Remove.
1005 * solib.c (handle_solib_event): Update.
1006 * remote.c (remote_serial_quit_handler): Update.
1007 (remote_terminal_inferior, remote_wait_as): Update.
1008 * record-full.c (record_full_wait_1): Update.
1009 * nto-procfs.c (procfs_create_inferior): Update.
1010 * nat/fork-inferior.c (startup_inferior): Update.
1011 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
1012 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
1013 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
1014 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
1015 (mi_breakpoint_created, mi_breakpoint_deleted)
1016 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
1017 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1018 (mi_user_selected_context_changed, report_initial_inferior):
1019 Update.
1020 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
1021 (linux_nat_terminal_inferior): Update.
1022 * infrun.c (follow_fork_inferior)
1023 (handle_vfork_child_exec_or_exit, do_target_resume)
1024 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
1025 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
1026 Update.
1027 * inflow.c (child_terminal_init, info_terminal_command): Update.
1028 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
1029 (attach_command): Update.
1030 * infcall.c (call_thread_fsm_should_stop): Update.
1031 * gnu-nat.c (gnu_attach): Update.
1032 * extension.c (struct active_ext_lang_state)
1033 (restore_active_ext_lang): Update.
1034 * exceptions.c (print_flush): Update.
1035 * event-top.c (async_enable_stdin, default_quit_handler): Update.
1036 (struct quit_handler_cleanup_data, restore_quit_handler)
1037 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
1038 Remove.
1039 * cp-support.c (gdb_demangle): Update.
1040 * breakpoint.c (update_inserted_breakpoint_locations)
1041 (insert_breakpoint_locations, handle_jit_event)
1042 (disable_breakpoints_in_unloaded_shlib): Update.
1043 * annotate.c (annotate_breakpoints_invalid)
1044 (annotate_frames_invalid): Update.
1045
1046 2017-09-20 Tom Tromey <tom@tromey.com>
1047
1048 * main.c (catch_command_errors): Rename from
1049 catch_command_errors_const.
1050 (captured_main_1): Update.
1051
1052 2017-09-20 Pedro Alves <palves@redhat.com>
1053
1054 * cli/cli-cmds.c (list_command): Use print_sal_location.
1055 (print_sal_location): New function.
1056 (ambiguous_line_spec): Use print_sal_location.
1057 * linespec.c (symbol_to_sal): Record the symbol in the sal.
1058 * symtab.c (find_function_start_sal): Likewise.
1059 * symtab.h (symtab_and_line::symbol): New field.
1060
1061 2017-09-20 Pedro Alves <palves@redhat.com>
1062
1063 * linespec.c (minsym_found): Handle non-text minsyms.
1064 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1065
1066 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1067
1068 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1069 backslash.
1070
1071 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1072
1073 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1074 vmovups instead vmovaps.
1075 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1076
1077 2017-09-19 John Baldwin <jhb@FreeBSD.org>
1078
1079 * NEWS (Changes since GDB 8.0): Add starti.
1080 * infcmd.c (enum run_break): New.
1081 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1082 case.
1083 (run_command): Use enum run_how.
1084 (start_command): Likewise.
1085 (starti_command): New function.
1086 (RUN_ARGS_HELP): New macro.
1087 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1088 commands. Add starti command.
1089
1090 2017-09-19 Yao Qi <yao.qi@linaro.org>
1091
1092 * Makefile.in (monitor.o): Remove the rule.
1093
1094 2017-09-19 Yao Qi <yao.qi@linaro.org>
1095
1096 * annotate.h (struct annotate_arg_emitter): Use
1097 DISABLE_COPY_AND_ASSIGN.
1098 * common/refcounted-object.h (refcounted_object): Likewise.
1099 * completer.h (struct completion_result): Likewise.
1100 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1101 * filename-seen-cache.h (filename_seen_cache): Likewise.
1102 * gdbcore.h (thread_section_name): Likewise.
1103 * gdb_regex.h (compiled_regex): Likewise.
1104 * gdbthread.h (scoped_restore_current_thread): Likewise.
1105 * inferior.h (scoped_restore_current_inferior): Likewise.
1106 * jit.c (jit_reader): Likewise.
1107 * linespec.h (struct linespec_result): Likewise.
1108 * mi/mi-parse.h (struct mi_parse): Likewise.
1109 * nat/fork-inferior.c (execv_argv): Likewise.
1110 * progspace.h (scoped_restore_current_program_space): Likewise.
1111 * python/python-internal.h (class gdbpy_enter): Likewise.
1112 * regcache.h (regcache): Likewise.
1113 * target-descriptions.c (struct tdesc_reg): Likewise.
1114 (struct tdesc_type): Likewise.
1115 (struct tdesc_feature): Likewise.
1116 * ui-out.h (ui_out_emit_type): Likewise.
1117
1118 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
1119
1120 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1121 label abort_expression.
1122
1123 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1124
1125 * common/buffer.c (buffer_xml_printf): Adjust.
1126 * common/xml-utils.c (xml_escape_text): Change return type to
1127 std::string, update code accordingly.
1128 * common/xml-utils.h (xml_escape_text): Change return type to
1129 std::string.
1130 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
1131 * windows-tdep.c (windows_xfer_shared_library): Adjust.
1132 * unittests/xml-utils-selftests.c (test_xml_escape_text):
1133 Adjust.
1134
1135 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1136
1137 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
1138 (SUBDIR_UNITTESTS_OBS): Add new object file.
1139 * unittests/xml-utils-selftests.c: New file.
1140
1141 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1142
1143 * common/selftest.h (selftest): New struct/interface.
1144 (register_test): Add name parameter, add new overload.
1145 (run_tests): Add filter parameter.
1146 (for_each_selftest_ftype): New typedef.
1147 (for_each_selftest): New declaration.
1148 * common/selftest.c (tests): Change type to
1149 map<string, unique_ptr<selftest>>.
1150 (simple_selftest): New struct.
1151 (register_test): New function.
1152 (register_test): Add name parameter and use it.
1153 (run_tests): Add filter parameter and use it. Add prints.
1154 Adjust to vector -> map change.
1155 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
1156 registering selftests.
1157 * arm-tdep.c (_initialize_arm_tdep): Likewise.
1158 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
1159 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
1160 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
1161 * findvar.c (_initialize_findvar): Likewise.
1162 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
1163 * maint.c (maintenance_selftest): Update call to run_tests.
1164 (maintenance_info_selftests): New function.
1165 (_initialize_maint_cmds): Register "maintenance info selftests"
1166 command. Update "maintenance selftest" doc.
1167 * regcache.c (_initialize_regcache): Add names when registering
1168 selftests.
1169 * rust-exp.y (_initialize_rust_exp): Likewise.
1170 * selftest-arch.c (gdbarch_selftest): New struct.
1171 (gdbarch_tests): Remove.
1172 (register_test_foreach_arch): Add name parameter. Call
1173 register_test.
1174 (tests_with_arch): Remove, move most content to
1175 gdbarch_selftest::operator().
1176 (_initialize_selftests_foreach_arch): Remove.
1177 * selftest-arch.h (register_test_foreach_arch): Add name
1178 parameter.
1179 (run_tests_with_arch): New declaration.
1180 * utils-selftests.c (_initialize_utils_selftests): Add names
1181 when registering selftests.
1182 * utils.c (_initialize_utils): Likewise.
1183 * unittests/array-view-selftests.c
1184 (_initialize_array_view_selftests): Likewise.
1185 * unittests/environ-selftests.c (_initialize_environ_selftests):
1186 Likewise.
1187 * unittests/function-view-selftests.c
1188 (_initialize_function_view_selftests): Likewise.
1189 * unittests/offset-type-selftests.c
1190 (_initialize_offset_type_selftests): Likewise.
1191 * unittests/optional-selftests.c
1192 (_initialize_optional_selftests): Likewise.
1193 * unittests/scoped_restore-selftests.c
1194 (_initialize_scoped_restore_selftests): Likewise.
1195 * NEWS: Document "maintenance selftest" and "maint info
1196 selftests".
1197
1198 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1199
1200 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1201 scoped_restore.
1202
1203 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1204
1205 * mi/mi-main.c (mi_load_progress): Make uiout variable
1206 a unique_ptr.
1207
1208 2017-09-15 Pedro Alves <palves@redhat.com>
1209
1210 * compile/compile-c-types.c (convert_enum, convert_int)
1211 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1212
1213 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1214
1215 * dwarf2read.c (copy_string): Remove.
1216 (parse_macro_definition): Replace copy_string with savestring.
1217
1218 2017-09-15 Yao Qi <yao.qi@linaro.org>
1219
1220 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1221 gdb_target_obs.
1222 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1223 Likewise.
1224 (i[34567]86-*-linux*): Likewise.
1225
1226 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1227
1228 * dwarf2expr.h (dwarf_stack_value): Add constructor.
1229 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1230 <stack>: Change type to std::vector.
1231 <stack_len, stack_allocated>: Remove.
1232 <grow_stack>: Remove.
1233 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1234 (dwarf_expr_context::~dwarf_expr_context): Remove.
1235 (dwarf_expr_context::grow_stack): Remove.
1236 (dwarf_expr_context::push): Adjust.
1237 (dwarf_expr_context::pop): Adjust.
1238 (dwarf_expr_context::fetch): Adjust.
1239 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
1240 (dwarf_expr_context::stack_empty_p): Adjust.
1241 (dwarf_expr_context::execute_stack_op): Adjust.
1242
1243 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1244
1245 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
1246 return type to bool.
1247 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
1248
1249 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1250
1251 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
1252 Change type to bool.
1253 (dwarf_stack_value) <in_stack_memory>: Likewise.
1254 (dwarf_expr_context) <push_address>: Change parameter type to
1255 bool.
1256 <fetch_in_stack_memory>: Change return type to bool.
1257 <push>: Change parameter type to bool.
1258 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
1259 to bool.
1260 (dwarf_expr_context::push_address): Likewise.
1261 (dwarf_expr_context::fetch_in_stack_memory): Change return type
1262 to bool.
1263 (dwarf_expr_context::execute_stack_op): Adjust.
1264 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
1265
1266 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
1267
1268 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
1269 (struct dwarf_expr_context) <n_pieces>: Remove.
1270 <pieces>: Change type to std::vector.
1271 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1272 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
1273 pieces.
1274 (dwarf_expr_context::add_piece): Adjust.
1275 * dwarf2loc.c (struct piece_closure): Initialize fields.
1276 <n_pieces>: Remove.
1277 <pieces>: Change type to std::vector.
1278 (allocate_piece_closure): Adjust, change parameter to
1279 std::vector rvalue and std::move it to piece_closure.
1280 (rw_pieced_value): Adjust.
1281 (check_pieced_synthetic_pointer): Adjust.
1282 (indirect_synthetic_pointer): Adjust.
1283 (coerce_pieced_ref): Adjust.
1284 (free_pieced_value_closure): Adjust. Use delete to free
1285 piece_closure.
1286 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
1287 to allocate_piece_closure.
1288 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
1289
1290 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1291
1292 * probe.h (probe_ops_cp): Remove typedef.
1293 (DEF_VEC_P (probe_ops_cp)): Remove.
1294 (all_probe_ops): Change type to std::vector.
1295 * probe.c (info_probes_for_ops): Adjust to vector change.
1296 (probe_linespec_to_ops): Likewise.
1297 (all_probe_ops): Change type to std::vector.
1298 (_initialize_probe): Adjust to vector change.
1299 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
1300 * elfread.c (elf_get_probes): Likewise.
1301 * stap-probe.c (_initialize_stap_probe): Likewise.
1302
1303 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1304
1305 * probe.h (struct bound_probe): Define constructors.
1306 * probe.c (bound_probe_s): Remove typedef.
1307 (DEF_VEC_O (bound_probe_s)): Remove VEC.
1308 (collect_probes): Change return type to std::vector, remove
1309 cleanup.
1310 (compare_probes): Return bool, change parameter type. Change
1311 semantic to "less than".
1312 (gen_ui_out_table_header_info): Change parameter to std::vector
1313 and update.
1314 (exists_probe_with_pops): Likewise.
1315 (info_probes_for_ops): Update to std::vector change.
1316 (enable_probes_command): Likewise.
1317 (disable_probes_command): Likewise.
1318
1319 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
1320
1321 * probe.h (struct probe_ops) <get_probes>: Change parameter from
1322 vec to std::vector.
1323 * probe.c (parse_probes_in_pspace): Update.
1324 (find_probes_in_objfile): Update.
1325 (find_probe_by_pc): Update.
1326 (collect_probes): Update.
1327 (probe_any_get_probes): Update.
1328 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
1329 return type to reference to std::vector.
1330 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
1331 std::vector and update.
1332 (dtrace_process_dof): Likewise.
1333 (dtrace_get_probes): Likewise.
1334 * elfread.c (elf_get_probes): Change return type to std::vector,
1335 store an std::vector in bfd_data.
1336 (probe_key_free): Update to std::vector.
1337 * stap-probe.c (handle_stap_probe): Change parameter to
1338 std::vector and update.
1339 (stap_get_probes): Likewise.
1340 * symfile-debug.c (debug_sym_get_probes): Change return type to
1341 std::vector and update.
1342
1343 2017-09-11 Tom Tromey <tom@tromey.com>
1344
1345 * breakpoint.c (program_breakpoint_here_p): Update.
1346 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
1347 from make_show_memory_breakpoints_cleanup. Return a
1348 scoped_restore_tmpl<int>.
1349 (restore_show_memory_breakpoints): Remove.
1350 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
1351 * mem-break.c (memory_validate_breakpoint): Update.
1352 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
1353 (ia64_memory_remove_breakpoint): Update.
1354 (ia64_breakpoint_from_pc): Update.
1355 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
1356 from make_show_memory_breakpoints_cleanup.
1357
1358 2017-09-11 Tom Tromey <tom@tromey.com>
1359
1360 * d-namespace.c (d_lookup_symbol): Use std::string.
1361 (find_symbol_in_baseclass): Likewise.
1362
1363 2017-09-11 Tom Tromey <tom@tromey.com>
1364
1365 * ctf.c (ctf_start): Use std::string.
1366
1367 2017-09-11 Tom Tromey <tom@tromey.com>
1368
1369 * ada-lang.c (is_known_support_routine): Update.
1370 (ada_unhandled_exception_name_addr_from_raise): Update.
1371 * guile/scm-frame.c (gdbscm_frame_name): Update.
1372 * python/py-frame.c (frapy_name): Update.
1373 (frapy_function): Update.
1374 * stack.h (find_frame_funname): Update.
1375 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
1376 (print_frame): Update.
1377
1378 2017-09-11 Tom Tromey <tom@tromey.com>
1379
1380 * findcmd.c (put_bits): Take a gdb::byte_vector.
1381 (parse_find_args): Return gdb::byte_vector. "args" now const.
1382 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
1383 cleanups.
1384 (find_command): Update.
1385
1386 2017-09-11 Tom Tromey <tom@tromey.com>
1387
1388 * cli/cli-script.c (class scoped_restore_hook_in): New.
1389 (clear_hook_in_cleanup): Remove.
1390 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
1391 scoped_restore_hook_in.
1392
1393 2017-09-11 Tom Tromey <tom@tromey.com>
1394
1395 * cli/cli-script.c (restore_interp): Remove.
1396 (read_command_lines): Use scoped_restore_interp.
1397 * interps.c (scoped_restore_interp::set_temp): Rename from
1398 interp_set_temp.
1399 * interps.h (class scoped_restore_interp): New.
1400 (interp_set_temp): Remove.
1401
1402 2017-09-11 Tom Tromey <tom@tromey.com>
1403
1404 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1405 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
1406 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
1407 scoped_restore.
1408 (mi_cmd_break_insert_1): Update.
1409 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
1410 scoped_restore.
1411
1412 2017-09-11 Tom Tromey <tom@tromey.com>
1413
1414 * demangle.c (demangle_command): Update.
1415 * breakpoint.c (disable_command): Update.
1416 (enable_command): Update.
1417 (find_location_by_number): Make "number" const. Use
1418 get_number_trailer.
1419 * cli/cli-utils.c (extract_arg): Return std::string.
1420 * probe.c (parse_probe_linespec): Update. Change types.
1421 (collect_probes): Take string arguments.
1422 (parse_probe_linespec): Likewise.
1423 (info_probes_for_ops): Update.
1424 (enable_probes_command): Update.
1425 (disable_probes_command): Update.
1426 * break-catch-sig.c (catch_signal_split_args): Update.
1427 * mi/mi-parse.c (mi_parse): Update.
1428
1429 2017-09-11 Tom Tromey <tom@tromey.com>
1430
1431 * language.h (language_enum): Make argument const.
1432 * language.c (language_enum): Make argument const.
1433
1434 2017-09-11 Tom Tromey <tom@tromey.com>
1435
1436 * common/common-utils.h (skip_to_space): Remove macro, redeclare
1437 as function.
1438 (skip_to_space): Rename from skip_to_space_const.
1439 * common/common-utils.c (skip_to_space): New function.
1440 (skip_to_space): Rename from skip_to_space_const.
1441 * cli/cli-utils.h (get_number): Rename from get_number_const.
1442 (extract_arg): Rename from extract_arg_const.
1443 * cli/cli-utils.c (get_number): Rename from get_number_const.
1444 (extract_arg): Rename from extract_arg_const.
1445 (number_or_range_parser::get_number): Use ::get_number.
1446 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
1447 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
1448 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
1449 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
1450 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
1451 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
1452 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
1453 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
1454
1455 2017-09-11 Tom Tromey <tom@tromey.com>
1456
1457 * python/python.c (do_start_initialization): Use
1458 py-event-types.def to initialize types.
1459 Define all object type structures.
1460 * python/python-internal.h: Don't declare event initialization
1461 functions.
1462 * python/py-threadevent.c (thread_event_object_type): Don't
1463 define.
1464 * python/py-stopevent.c (stop_event_object_type): Don't define.
1465 * python/py-signalevent.c (signal_event_object_type): Don't
1466 declare or define.
1467 * python/py-newobjfileevent.c (new_objfile_event_object_type)
1468 (clear_objfiles_event_object_type): Don't declare or define.
1469 * python/py-infevents.c (inferior_call_pre_event_object_type)
1470 (inferior_call_post_event_object_type)
1471 (register_changed_event_object_type)
1472 (memory_changed_event_object_type): Don't declare or define.
1473 * python/py-inferior.c (new_thread_event_object_type)
1474 (new_inferior_event_object_type)
1475 (inferior_deleted_event_object_type): Don't declare or define.
1476 * python/py-exitedevent.c (exited_event_object_type): Don't
1477 declare or define.
1478 * python/py-evts.c (gdbpy_initialize_py_events): Use
1479 py-all-events.def.
1480 * python/py-events.h (thread_event_object_type): Don't declare.
1481 (events_object): Use py-all-events.def.
1482 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
1483 py-event-types.def.
1484 * python/py-event-types.def: New file.
1485 * python/py-continueevent.c (create_continue_event_object): Don't
1486 declare or define.
1487 * python/py-bpevent.c (breakpoint_event_object_type): Don't
1488 declare or define.
1489 * python/py-all-events.def: New file.
1490
1491 2017-09-11 Tom Tromey <tom@tromey.com>
1492
1493 * python/py-threadevent.c (create_thread_event_object): Return
1494 gdbpy_ref.
1495 * python/py-stopevent.h (create_stop_event_object)
1496 (create_breakpoint_event_object, create_signal_event_object):
1497 Update.
1498 * python/py-stopevent.c (create_stop_event_object): Return
1499 gdbpy_ref.
1500 (emit_stop_event): Update.
1501 * python/py-signalevent.c (create_signal_event_object): Return
1502 gdbpy_ref.
1503 * python/py-infevents.c (create_inferior_call_event_object):
1504 Update.
1505 * python/py-event.h (create_event_object)
1506 (create_thread_event_object): Update.
1507 * python/py-event.c (create_event_object): Return gdbpy_ref.
1508 * python/py-continueevent.c: Return gdbpy_ref.
1509 * python/py-bpevent.c (create_breakpoint_event_object): Return
1510 gdbpy_ref.
1511
1512 2017-09-11 Tom Tromey <tom@tromey.com>
1513
1514 PR python/15622:
1515 * NEWS: Add entry.
1516 * python/python.c (do_start_initialization): Initialize new event
1517 types.
1518 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
1519 (gdbpy_initialize_inferior_deleted_event)
1520 (gdbpy_initialize_new_thread_event): Declare.
1521 * python/py-threadevent.c (create_thread_event_object): Add option
1522 "thread" parameter.
1523 * python/py-inferior.c (new_thread_event_object_type)
1524 (new_inferior_event_object_type)
1525 (inferior_deleted_event_object_type): Declare.
1526 (python_new_inferior, python_inferior_deleted): New functions.
1527 (add_thread_object): Emit new_thread event.
1528 (gdbpy_initialize_inferior): Attach new functions to corresponding
1529 observers.
1530 (new_thread, new_inferior, inferior_deleted): Define new event
1531 types.
1532 * python/py-evts.c (gdbpy_initialize_py_events): Add new
1533 registries.
1534 * python/py-events.h (events_object) <new_inferior,
1535 inferior_deleted, new_thread>: New fields.
1536 * python/py-event.h (create_thread_event_breakpoint): Add optional
1537 "thread" parameter.
1538
1539 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1540
1541 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
1542 check current_ui instead.
1543 (internal_vproblem): Likewise.
1544
1545 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
1546
1547 * thread.c (print_thread_info_1): Remove unnecessary calls to
1548 uiout->is_mi_like_p.
1549
1550 2017-09-09 Tom Tromey <tom@tromey.com>
1551
1552 * namespace.h (add_using_directive): Update.
1553 * namespace.c (add_using_directive): Change type of excludes to
1554 std::vector.
1555 * dwarf2read.c (read_import_statement): Use std::vector.
1556 (read_namespace): Update.
1557 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1558
1559 2017-09-09 Tom Tromey <tom@tromey.com>
1560
1561 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
1562
1563 2017-09-09 Tom Tromey <tom@tromey.com>
1564
1565 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
1566
1567 2017-09-09 Tom Tromey <tom@tromey.com>
1568
1569 * stack.c (func_command): Use gdb::def_vector.
1570
1571 2017-09-09 Tom Tromey <tom@tromey.com>
1572
1573 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
1574 ui_out_emit_list, ui_out_emit_tuple.
1575 (mi_cmd_var_update): Likewise.
1576
1577 2017-09-09 Tom Tromey <tom@tromey.com>
1578
1579 * mi/mi-interp.c (mi_user_selected_context_changed): Use
1580 ui_out_redirect_pop.
1581 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1582 ui_out_redirect_pop.
1583 * utils.c (do_ui_out_redirect_pop)
1584 (make_cleanup_ui_out_redirect_pop): Remove.
1585 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
1586 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
1587 * ui-out.h (ui_out_redirect_pop): New class.
1588
1589 2017-09-09 Tom Tromey <tom@tromey.com>
1590
1591 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
1592 (list_available_thread_groups, mi_cmd_list_thread_groups)
1593 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
1594 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
1595 Likewise.
1596
1597 2017-09-09 Tom Tromey <tom@tromey.com>
1598
1599 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
1600 ui_out_emit_tuple.
1601
1602 2017-09-09 Tom Tromey <tom@tromey.com>
1603
1604 * target.c (flash_erase_command): Use ui_out_emit_tuple.
1605 * stack.c (print_frame): Use ui_out_emit_tuple.
1606 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
1607 (info_spu_mailbox_command, info_spu_dma_command)
1608 (info_spu_proxydma_command): Likewise.
1609 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
1610 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
1611 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
1612 ui_out_emit_tuple.
1613 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
1614
1615 2017-09-09 Tom Tromey <tom@tromey.com>
1616
1617 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
1618 (class ui_out_emit_table): Update comment.
1619 * ui-out.c (do_cleanup_table_end)
1620 (make_cleanup_ui_out_table_begin_end): Remove.
1621 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
1622 (info_spu_dma_cmdlist): Likewise.
1623 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
1624 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
1625 ui_out_emit_table.
1626
1627 2017-09-09 Tom Tromey <tom@tromey.com>
1628
1629 * thread.c (print_thread_info_1): Use ui_out_emit_table,
1630 ui_out_emit_list, gdb::optional.
1631
1632 2017-09-09 John Baldwin <jhb@FreeBSD.org>
1633
1634 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
1635 prototype.
1636 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
1637 prototype.
1638 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
1639 prototype.
1640 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
1641 * ada-exp.y: Remove _initialize_ada_exp prototype.
1642 * ada-lang.c: Remove _initialize_ada_language prototype.
1643 * ada-tasks.c: Remove _initialize_tasks prototype.
1644 * addrmap.c: Remove _initialize_addrmap prototype.
1645 * agent.c: Remove _initialize_agent prototype.
1646 * aix-thread.c: Remove _initialize_aix_thread prototype.
1647 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
1648 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
1649 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
1650 prototype.
1651 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
1652 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
1653 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
1654 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
1655 prototype.
1656 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
1657 prototype.
1658 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
1659 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
1660 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
1661 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
1662 prototype.
1663 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
1664 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
1665 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
1666 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
1667 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1668 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
1669 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
1670 prototype.
1671 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
1672 prototype.
1673 * annotate.c: Remove _initialize_annotate prototype.
1674 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
1675 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
1676 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
1677 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
1678 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1679 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1680 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1681 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1682 prototype.
1683 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1684 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1685 * auto-load.c: Remove _initialize_auto_load prototype.
1686 * auxv.c: Remove _initialize_auxv prototype.
1687 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1688 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1689 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1690 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1691 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1692 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1693 prototype.
1694 * break-catch-throw.c: Remove _initialize_break_catch_throw
1695 prototype.
1696 * breakpoint.c: Remove _initialize_breakpoint prototype.
1697 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1698 * btrace.c: Remove _initialize_btrace prototype.
1699 * charset.c: Remove _initialize_charset prototype.
1700 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1701 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1702 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1703 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1704 * cli/cli-script.c: Remove _initialize_cli_script prototype.
1705 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1706 * coffread.c: Remove _initialize_coffread prototype.
1707 * compile/compile.c: Remove _initialize_compile prototype.
1708 * complaints.c: Remove _initialize_complaints prototype.
1709 * completer.c: Remove _initialize_completer prototype.
1710 * copying.awk: Remove _initialize_copying prototype.
1711 * copying.c: Regenerate.
1712 * core-regset.c: Remove _initialize_core_regset prototype.
1713 * corefile.c: Remove _initialize_core prototype.
1714 * corelow.c: Remove _initialize_corelow prototype.
1715 * cp-abi.c: Remove _initialize_cp_abi prototype.
1716 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1717 * cp-support.c: Remove _initialize_cp_support prototype.
1718 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1719 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1720 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1721 * ctf.c: Remove _initialize_ctf prototype.
1722 * d-lang.c: Remove _initialize_d_language prototype.
1723 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1724 prototype.
1725 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1726 * dbxread.c: Remove _initialize_dbxread prototype.
1727 * dcache.c: Remove _initialize_dcache prototype.
1728 * demangle.c: Remove _initialize_demangler prototype.
1729 * disasm-selftests.c: Remove _initialize_disasm_selftests
1730 prototype.
1731 * disasm.c: Remove _initialize_disasm prototype.
1732 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1733 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1734 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1735 prototype.
1736 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1737 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1738 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1739 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1740 * elfread.c: Remove _initialize_elfread prototype.
1741 * exec.c: Remove _initialize_exec prototype.
1742 * extension.c: Remove _initialize_extension prototype.
1743 * f-lang.c: Remove _initialize_f_language prototype.
1744 * f-valprint.c: Remove _initialize_f_valprint prototype.
1745 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1746 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1747 * filesystem.c: Remove _initialize_filesystem prototype.
1748 * findcmd.c: Remove _initialize_mem_search prototype.
1749 * fork-child.c: Remove _initialize_fork_child prototype.
1750 * frame-base.c: Remove _initialize_frame_base prototype.
1751 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1752 * frame.c: Remove _initialize_frame prototype.
1753 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1754 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1755 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1756 * gcore.c: Remove _initialize_gcore prototype.
1757 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1758 * gdbarch.c: Regenerate.
1759 * gdbarch.sh: Remove _initialize_gdbarch prototype.
1760 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1761 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1762 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1763 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1764 * go-lang.c: Remove _initialize_go_language prototype.
1765 * go32-nat.c: Remove _initialize_go32_nat prototype.
1766 * guile/guile.c: Remove _initialize_guile prototype.
1767 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
1768 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
1769 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
1770 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
1771 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
1772 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
1773 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
1774 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
1775 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
1776 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
1777 prototype.
1778 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
1779 prototype.
1780 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
1781 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
1782 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
1783 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
1784 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
1785 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
1786 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
1787 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
1788 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
1789 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
1790 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
1791 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
1792 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
1793 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1794 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
1795 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
1796 prototype.
1797 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
1798 prototype.
1799 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
1800 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
1801 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
1802 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
1803 * infcall.c: Remove _initialize_infcall prototype.
1804 * infcmd.c: Remove _initialize_infcmd prototype.
1805 * inferior.c: Remove _initialize_inferiors prototype.
1806 * inflow.c: Remove _initialize_inflow prototype.
1807 * infrun.c: Remove _initialize_infrun prototype.
1808 * interps.c: Remove _initialize_interpreter prototype.
1809 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
1810 * jit.c: Remove _initialize_jit prototype.
1811 * language.c: Remove _initialize_language prototype.
1812 * linux-fork.c: Remove _initialize_linux_fork prototype.
1813 * linux-nat.c: Remove _initialize_linux_nat prototype.
1814 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
1815 * linux-thread-db.c: Remove _initialize_thread_db prototype.
1816 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
1817 * m2-lang.c: Remove _initialize_m2_language prototype.
1818 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
1819 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
1820 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
1821 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
1822 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
1823 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1824 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1825 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
1826 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
1827 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
1828 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1829 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1830 * machoread.c: Remove _initialize_machoread prototype.
1831 * macrocmd.c: Remove _initialize_macrocmd prototype.
1832 * macroscope.c: Remove _initialize_macroscope prototype.
1833 * maint.c: Remove _initialize_maint_cmds prototype.
1834 * mdebugread.c: Remove _initialize_mdebugread prototype.
1835 * memattr.c: Remove _initialize_mem prototype.
1836 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
1837 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
1838 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
1839 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
1840 * mi/mi-main.c: Remove _initialize_mi_main prototype.
1841 * microblaze-linux-tdep.c: Remove
1842 _initialize_microblaze_linux_tdep prototype.
1843 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
1844 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
1845 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
1846 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
1847 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
1848 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
1849 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
1850 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
1851 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
1852 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
1853 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
1854 prototype.
1855 * mipsread.c: Remove _initialize_mipsread prototype.
1856 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
1857 prototype.
1858 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
1859 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
1860 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
1861 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
1862 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
1863 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
1864 prototype.
1865 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
1866 * nto-procfs.c: Remove _initialize_procfs prototype.
1867 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
1868 * objc-lang.c: Remove _initialize_objc_language prototype.
1869 * objfiles.c: Remove _initialize_objfiles prototype.
1870 * observer.c: Remove observer_test_first_notification_function,
1871 observer_test_second_notification_function,
1872 observer_test_third_notification_function, and
1873 _initialize_observer prototypes.
1874 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
1875 * osabi.c: Remove _initialize_gdb_osabi prototype.
1876 * osdata.c: Remove _initialize_osdata prototype.
1877 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
1878 * parse.c: Remove _initialize_parse prototype.
1879 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
1880 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
1881 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
1882 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
1883 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
1884 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
1885 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
1886 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
1887 * printcmd.c: Remove _initialize_printcmd prototype.
1888 * probe.c: Remove _initialize_probe prototype.
1889 * proc-api.c: Remove _initialize_proc_api prototype.
1890 * proc-events.c: Remove _initialize_proc_events prototype.
1891 * proc-service.c: Remove _initialize_proc_service prototype.
1892 * procfs.c: Remove _initialize_procfs prototype.
1893 * psymtab.c: Remove _initialize_psymtab prototype.
1894 * python/python.c: Remove _initialize_python prototype.
1895 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
1896 * record-btrace.c: Remove _initialize_record_btrace prototype.
1897 * record-full.c: Remove _initialize_record_full prototype.
1898 * record.c: Remove _initialize_record prototype.
1899 * regcache.c: Remove _initialize_regcache prototype.
1900 * reggroups.c: Remove _initialize_reggroup prototype.
1901 * remote-notif.c: Remove _initialize_notif prototype.
1902 * remote-sim.c: Remove _initialize_remote_sim prototype.
1903 * remote.c: Remove _initialize_remote prototype.
1904 * reverse.c: Remove _initialize_reverse prototype.
1905 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
1906 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
1907 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
1908 prototype.
1909 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
1910 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
1911 * rust-exp.y: Remove _initialize_rust_exp prototype.
1912 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
1913 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
1914 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
1915 * score-tdep.c: Remove _initialize_score_tdep prototype.
1916 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
1917 prototype.
1918 * ser-go32.c: Remove _initialize_ser_dos prototype.
1919 * ser-mingw.c: Remove _initialize_ser_windows prototype.
1920 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
1921 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
1922 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
1923 * serial.c: Remove _initialize_serial prototype.
1924 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
1925 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
1926 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
1927 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
1928 * skip.c: Remove _initialize_step_skip prototype.
1929 * sol-thread.c: Remove _initialize_sol_thread prototype.
1930 * solib-aix.c: Remove _initialize_solib_aix prototype.
1931 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
1932 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
1933 * solib-frv.c: Remove _initialize_frv_solib prototype.
1934 * solib-spu.c: Remove _initialize_spu_solib prototype.
1935 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
1936 * solib-target.c: Remove _initialize_solib_target prototype.
1937 * solib.c: Remove _initialize_solib prototype.
1938 * source.c: Remove _initialize_source prototype.
1939 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
1940 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
1941 prototype.
1942 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
1943 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
1944 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
1945 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
1946 prototype.
1947 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
1948 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
1949 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
1950 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
1951 prototype.
1952 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
1953 prototype.
1954 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
1955 prototype.
1956 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
1957 prototype.
1958 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
1959 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
1960 prototype.
1961 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
1962 prototype.
1963 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
1964 prototype.
1965 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
1966 prototype.
1967 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
1968 prototype.
1969 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
1970 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
1971 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
1972 * stabsread.c: Remove _initialize_stabsread prototype.
1973 * stack.c: Remove _initialize_stack prototype.
1974 * stap-probe.c: Remove _initialize_stap_probe prototype.
1975 * std-regs.c: Remove _initialize_frame_reg prototype.
1976 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
1977 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
1978 * symfile.c: Remove _initialize_symfile prototype.
1979 * symmisc.c: Remove _initialize_symmisc prototype.
1980 * symtab.c: Remove _initialize_symtab prototype.
1981 * target-dcache.c: Remove _initialize_target_dcache prototype.
1982 * target-descriptions.c: Remove _initialize_target_descriptions
1983 prototype.
1984 * thread.c: Remove _initialize_thread prototype.
1985 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
1986 prototype.
1987 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
1988 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
1989 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
1990 prototype.
1991 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
1992 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
1993 * tracefile.c: Remove _initialize_tracefile prototype.
1994 * tracepoint.c: Remove _initialize_tracepoint prototype.
1995 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
1996 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
1997 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
1998 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
1999 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
2000 * tui/tui-win.c: Remove _initialize_tui_win prototype.
2001 * tui/tui.c: Remove _initialize_tui prototype.
2002 * typeprint.c: Remove _initialize_typeprint prototype.
2003 * user-regs.c: Remove _initialize_user_regs prototype.
2004 * utils.c: Remove _initialize_utils prototype.
2005 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
2006 * valarith.c: Remove _initialize_valarith prototype.
2007 * valops.c: Remove _initialize_valops prototype.
2008 * valprint.c: Remove _initialize_valprint prototype.
2009 * value.c: Remove _initialize_values prototype.
2010 * varobj.c: Remove _initialize_varobj prototype.
2011 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
2012 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
2013 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
2014 * windows-nat.c: Remove _initialize_windows_nat,
2015 _initialize_check_for_gdb_ini, and _initialize_loadable
2016 prototypes.
2017 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
2018 * xcoffread.c: Remove _initialize_xcoffread prototype.
2019 * xml-support.c: Remove _initialize_xml_support prototype.
2020 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
2021 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
2022 prototype.
2023 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
2024 prototype.
2025 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2026
2027 2017-09-08 Keith Seitz <keiths@redhat.com>
2028
2029 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
2030 field.
2031
2032 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
2033
2034 * f-valprint.c (f_val_print): Remove check for one byte
2035 sized integers. Remove printing of character type.
2036
2037 2017-09-08 Frank Penczek <frank.penczek@intel.com>
2038 Christoph Weinmann <christoph.t.weinmann@intel.com>
2039 Bernhard Heckel <bernhard.heckel@intel.com>
2040
2041 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
2042 to maintain proper indentation when printing pointers/refs.
2043
2044 2017-09-07 Joel Brobecker <brobecker@adacore.com>
2045
2046 GDB 8.0.1 released.
2047
2048 2017-09-07 Joel Brobecker <brobecker@adacore.com>
2049
2050 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2051
2052 2017-09-05 Tom Tromey <tom@tromey.com>
2053
2054 * parse.c (funcall_chain): Now a std::vector.
2055 (start_arglist, end_arglist): Simplify.
2056 (free_funcalls): Remove.
2057 (parse_exp_in_context_1): Remove cleanup.
2058
2059 2017-09-05 Tom Tromey <tom@tromey.com>
2060
2061 * go-exp.y (go_parse): Don't create a cleanup.
2062
2063 2017-09-05 Tom Tromey <tom@tromey.com>
2064
2065 * d-exp.y (PrimaryExpression): Use std::string.
2066 (d_parse): Don't create a cleanup.
2067
2068 2017-09-05 Tom Tromey <tom@tromey.com>
2069
2070 * utils.c (do_clear_parser_state): Remove.
2071 (make_cleanup_clear_parser_state): Remove.
2072 * p-exp.y (pascal_parse): Use scoped_restore.
2073 * m2-exp.y (m2_parse): Use scoped_restore.
2074 * f-exp.y (f_parse): Use scoped_restore.
2075 * d-exp.y (d_parse): Use scoped_restore.
2076 * c-exp.y (c_parse): Use scoped_restore.
2077 * ada-exp.y (ada_parse): Use scoped_restore.
2078 * utils.h (make_cleanup_clear_parser_state): Remove.
2079
2080 2017-09-06 Keith Seitz <keiths@redhat.com>
2081
2082 * dwarf2read.c (dw2_linkage_name_attr): New function.
2083 (dw2_linkage_name): New function.
2084 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2085 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2086 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2087
2088 2017-09-06 Kamil Rytarowski <n54@gmx.com>
2089
2090 * config/djgpp/djconfig.sh: Correct shell portability issue.
2091
2092 2017-09-06 Kamil Rytarowski <n54@gmx.com>
2093
2094 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2095
2096 2017-09-06 John Baldwin <jhb@FreeBSD.org>
2097
2098 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2099 * NEWS: Mention new FreeBSD/mips native configuration.
2100 * configure.host: Add aarch64*-*-freebsd*.
2101 * configure.nat: Likewise.
2102 * aarch64-fbsd-nat.c: New file.
2103
2104 2017-09-06 John Baldwin <jhb@FreeBSD.org>
2105
2106 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2107 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2108 * NEWS: Mention new FreeBSD/aarch64 target.
2109 * configure.tgt: Add aarch64*-*-freebsd*.
2110 * aarch64-fbsd-tdep.c: New file.
2111 * aarch64-fbsd-tdep.h: New file.
2112
2113 2017-09-06 Kamil Rytarowski <n54@gmx.com>
2114
2115 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2116
2117 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2118
2119 * parse.c (find_minsym_type_and_address): Don't relocate addresses
2120 of TLS symbols.
2121
2122 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2123
2124 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2125 call.
2126
2127 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2128
2129 * infrun.c (follow_exec): Call add_thread after
2130 target_find_description.
2131
2132 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2133
2134 * infrun.c (handle_inferior_event_1): When exec'ing, read
2135 stop_pc after follow_exec.
2136
2137 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2138
2139 * remote.c (process_g_packet): Update error message.
2140
2141 2017-09-05 Yao Qi <yao.qi@linaro.org>
2142
2143 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
2144 targets.
2145
2146 2017-09-05 Pedro Alves <palves@redhat.com>
2147
2148 * eval.c (eval_call, evaluate_funcall): New functions, factored
2149 out from ...
2150 (evaluate_subexp_standard): ... this.
2151
2152 2017-09-05 Yao Qi <yao.qi@linaro.org>
2153
2154 * amd64-tdep.c (amd64_target_description): Create target
2155 descriptions.
2156 (_initialize_amd64_tdep): Don't call functions
2157 initialize_tdesc_amd64_*. Add self tests.
2158 * arch/amd64.c (amd64_create_target_description): Add parameter
2159 is_linux. Call set_tdesc_osabi if is_linux is true.
2160 * arch/amd64.h (amd64_create_target_description): Update the
2161 declaration.
2162 * arch/i386.c (i386_create_target_description): Add parameter
2163 is_linux. Call set_tdesc_osabi if is_linux is true.
2164 * arch/i386.h (i386_create_target_description): Update
2165 declaration.
2166 * configure.tgt: Add i386.o to gdb_target_obs.
2167 * features/Makefile (XMLTOC): Remove i386/*.xml.
2168 * features/i386/amd64-avx-avx512.c: Remove.
2169 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
2170 * features/i386/amd64-avx-mpx.c: Remove.
2171 * features/i386/amd64-avx.c: Remove.
2172 * features/i386/amd64-mpx.c: Remove.
2173 * features/i386/amd64.c: Remove.
2174 * features/i386/i386-avx-avx512.c: Remove.
2175 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2176 * features/i386/i386-avx-mpx.c: Remove.
2177 * features/i386/i386-avx.c: Remove.
2178 * features/i386/i386-mmx.c: Remove.
2179 * features/i386/i386-mpx.c: Remove.
2180 * features/i386/i386.c: Remove.
2181 * i386-tdep.c: Don't include features/i386/i386*.c., include
2182 target-descriptions.h and arch/i386.h.
2183 (i386_target_description): Create target descriptions.
2184 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2185 functions. Do self tests.
2186
2187 2017-09-05 Yao Qi <yao.qi@linaro.org>
2188
2189 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2190 * features/i386/amd64-avx-avx512-linux.c: Removed.
2191 * features/i386/amd64-avx-linux.c: Removed.
2192 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2193 * features/i386/amd64-avx-mpx-linux.c: Removed.
2194 * features/i386/amd64-linux.c: Removed.
2195 * features/i386/amd64-mpx-linux.c: Removed.
2196 * features/i386/x32-avx-avx512-linux.c: Removed.
2197 * features/i386/x32-avx-linux.c: Removed.
2198 * features/i386/x32-linux.c: Removed.
2199
2200 2017-09-05 Yao Qi <yao.qi@linaro.org>
2201
2202 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
2203 features/i386/*.c.
2204 (amd64_linux_read_description): Call
2205 amd64_create_target_description.
2206 * arch/amd64.c: New file.
2207 * arch/amd64.h: New file.
2208 * configure.tgt (x86_64-*-linux*): Append amd64.o.
2209 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2210
2211 2017-09-05 Yao Qi <yao.qi@linaro.org>
2212
2213 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2214 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
2215 (amd64_linux_read_description): Create target descriptions.
2216 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2217 functions. Add unit tests.
2218 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2219 x32-core.xml.
2220 * features/i386/64bit-avx.c: Generated.
2221 * features/i386/64bit-avx512.c: Generated.
2222 * features/i386/64bit-core.c: Generated.
2223 * features/i386/64bit-linux.c: Generated.
2224 * features/i386/64bit-mpx.c: Generated.
2225 * features/i386/64bit-pkeys.c: Generated.
2226 * features/i386/64bit-segments.c: Generated.
2227 * features/i386/64bit-sse.c: Generated.
2228 * features/i386/x32-core.c: Generated.
2229 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2230 c files for amd64-linux and x32-linux.
2231
2232 2017-09-05 Yao Qi <yao.qi@linaro.org>
2233
2234 * amd64-linux-tdep.c (amd64_linux_read_description): New
2235 function.
2236 (amd64_linux_core_read_description): Call
2237 amd64_linux_read_description.
2238 (amd64_linux_init_abi): Likewise.
2239 (amd64_x32_linux_init_abi): Likewise.
2240 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
2241 * x86-linux-nat.c (x86_linux_read_description): Call
2242 amd64_linux_read_description.
2243
2244 2017-09-05 Yao Qi <yao.qi@linaro.org>
2245
2246 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
2247 comments.
2248
2249 2017-09-05 Yao Qi <yao.qi@linaro.org>
2250
2251 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
2252 * features/i386/i386-avx-avx512-linux.c: Remove.
2253 * features/i386/i386-avx-linux.c: Remove.
2254 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
2255 * features/i386/i386-avx-mpx-linux.c: Remove.
2256 * features/i386/i386-linux.c: Remove.
2257 * features/i386/i386-mmx-linux.c: Remove.
2258 * features/i386/i386-mpx-linux.c: Remove.
2259
2260 2017-09-05 Yao Qi <yao.qi@linaro.org>
2261
2262 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
2263 (SFILES): Add arch/i386.c.
2264 (HFILES_NO_SRCDIR): Add arch/i386.h.
2265 * arch/i386.c: New file.
2266 * arch/i386.h: New file.
2267 * arch/tdesc.h (allocate_target_description): Declare.
2268 (set_tdesc_architecture): Declare.
2269 (set_tdesc_osabi): Declare.
2270 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
2271 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
2272 include arch/i386.h.
2273 (i386_linux_read_description): Remove code and call
2274 i386_create_target_description.
2275 (set_tdesc_architecture): New function.
2276 (set_tdesc_osabi): New function.
2277 * target-descriptions.h (allocate_target_description): Remove.
2278
2279 2017-09-05 Yao Qi <yao.qi@linaro.org>
2280
2281 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
2282 * target-descriptions.c (tdesc_create_feature): Likewise, and
2283 adjust code.
2284 * features/i386/32bit-avx.c: Re-generated.
2285 * features/i386/32bit-avx512.c: Re-generated.
2286 * features/i386/32bit-core.c: Re-generated.
2287 * features/i386/32bit-linux.c: Re-generated.
2288 * features/i386/32bit-mpx.c: Re-generated.
2289 * features/i386/32bit-pkeys.c: Re-generated.
2290 * features/i386/32bit-sse.c: Re-generated.
2291
2292 2017-09-05 Yao Qi <yao.qi@linaro.org>
2293
2294 * regformats/regdef.h (struct reg): Override operator == and !=.
2295
2296 2017-09-05 Yao Qi <yao.qi@linaro.org>
2297
2298 * arch/tdesc.h: New file.
2299 * regformats/regdat.sh: Generate code using tdesc_create_reg.
2300 * target-descriptions.c: Update comments.
2301 * target-descriptions.h: Include "arch/tdesc.h". Remove the
2302 declarations.
2303 * features/i386/32bit-avx.c: Re-generated.
2304 * features/i386/32bit-avx512.c: Re-generated.
2305 * features/i386/32bit-core.c: Re-generated.
2306 * features/i386/32bit-linux.c: Re-generated.
2307 * features/i386/32bit-mpx.c: Re-generated.
2308 * features/i386/32bit-pkeys.c: Re-generated.
2309 * features/i386/32bit-sse.c: Re-generated.
2310
2311 2017-09-05 Yao Qi <yao.qi@linaro.org>
2312
2313 * regformats/regdat.sh: Update generated code.
2314
2315 2017-09-05 Yao Qi <yao.qi@linaro.org>
2316
2317 * regformats/regdat.sh: Adjust code order.
2318
2319 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
2320
2321 * expprint.c (dump_subexp_body_standard): Use constant format
2322 string in fprintf_filtered call.
2323
2324 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2325
2326 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
2327 NetBSD/i386.
2328 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
2329
2330 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2331
2332 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
2333
2334 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2335
2336 * bsd-kvm.o: Define _KMEMUSER.
2337 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
2338 * configure: Regenerate.
2339
2340 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2341
2342 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
2343 * i386-fbsd-nat.c: Likewise.
2344
2345 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2346
2347 * unittests/array-view-selftests.c: Add include of <array>.
2348
2349 2017-09-04 John Baldwin <jhb@FreeBSD.org>
2350
2351 * spu-tdep.c (flush_ea_cache): Add missing argument to
2352 call_function_by_hand.
2353
2354 2017-09-04 Pedro Alves <palves@redhat.com>
2355
2356 * NEWS (Safer support for debugging with no debug info): New.
2357
2358 2017-09-04 Pedro Alves <palves@redhat.com>
2359
2360 * c-exp.y (function_method, function_method_void): Add current
2361 instance flags to TYPE_INSTANCE.
2362 * dwarf2read.c (check_modifier): New.
2363 (compute_delayed_physnames): Assert that only C++ adds delayed
2364 physnames. Mark fn_fields as const/volatile depending on
2365 physname.
2366 * eval.c (make_params): New type_instance_flags parameter. Use
2367 it as the new type's instance flags.
2368 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
2369 flags element and pass it to make_params.
2370 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
2371 instance flags element.
2372 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
2373 * gdbtypes.h: Include "enum-flags.h".
2374 (type_instance_flags): New enum-flags type.
2375 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
2376 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
2377 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
2378 (follow_type_instance_flags): New function.
2379 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
2380 * parser-defs.h (follow_type_instance_flags): Declare.
2381 * valops.c (value_struct_elt_for_reference): const/volatile must
2382 match too.
2383
2384 2017-09-04 Pedro Alves <palves@redhat.com>
2385
2386 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
2387 function/method scopes; lookup the nested name as a function local
2388 static variable.
2389
2390 2017-09-04 Pedro Alves <palves@redhat.com>
2391
2392 (%type <voidval>): Add function_method.
2393 * c-exp.y (exp): New production for calls with no arguments.
2394 (function_method, function_method_void_or_typelist): New
2395 productions.
2396 (exp): New production for "method()::static_var".
2397 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
2398 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2399 Handle OP_FUNC_STATIC_VAR.
2400 * parse.c (operator_length_standard):
2401 Handle OP_FUNC_STATIC_VAR.
2402
2403 2017-09-04 Pedro Alves <palves@redhat.com>
2404
2405 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
2406 handling.
2407 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2408 Ditto.
2409 * parse.c (operator_length_standard, operator_check_standard):
2410 Ditto.
2411 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
2412
2413 2017-09-04 Pedro Alves <palves@redhat.com>
2414
2415 * ax-gdb.c: Include "typeprint.h".
2416 (gen_expr_for_cast): New function.
2417 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
2418 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
2419 type is unknown.
2420 * dwarf2read.c (new_symbol_full): Fallback to int instead of
2421 nodebug_data_symbol.
2422 * eval.c: Include "typeprint.h".
2423 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
2424 Error out if symbol has unknown type.
2425 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
2426 evaluate_subexp_for_cast.
2427 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
2428 OP_VAR_MSYM_VALUE.
2429 (evaluate_subexp_for_cast): New function.
2430 * gdbtypes.c (init_nodebug_var_type): New function.
2431 (objfile_type): Use it to initialize types of variables with no
2432 debug info.
2433 * typeprint.c (error_unknown_type): New.
2434 * typeprint.h (error_unknown_type): New declaration.
2435 * compile/compile-c-types.c (convert_type_basic): Handle
2436 TYPE_CODE_ERROR; warn and fallback to int for variables with
2437 unknown type.
2438
2439 2017-09-04 Pedro Alves <palves@redhat.com>
2440
2441 * eval.c (evaluate_var_value): New function, factored out from ...
2442 (evaluate_subexp_standard): ... here.
2443
2444 2017-09-04 Pedro Alves <palves@redhat.com>
2445
2446 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
2447 Remove useless assignments to 'op'.
2448
2449 2017-09-04 Pedro Alves <palves@redhat.com>
2450
2451 * eval.c (eval_skip_value): New function.
2452 (evaluate_subexp_standard): Use it.
2453
2454 2017-09-04 Pedro Alves <palves@redhat.com>
2455
2456 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
2457 function name from symbol/minsym and pass it to
2458 error_call_unknown_return_type.
2459
2460 2017-09-04 Pedro Alves <palves@redhat.com>
2461
2462 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
2463 * ax-gdb.c (gen_msym_var_ref): New function.
2464 (gen_expr): Handle OP_VAR_MSYM_VALUE.
2465 * eval.c (evaluate_var_msym_value): New function.
2466 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
2467 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
2468 to call_function_by_hand.
2469 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2470 Handle OP_VAR_MSYM_VALUE.
2471 (union exp_element) <msymbol>: New field.
2472 * minsyms.h (struct type): Forward declare.
2473 (find_minsym_type_and_address): Declare.
2474 * parse.c (write_exp_elt_msym): New function.
2475 (write_exp_msymbol): Delete, refactored as ...
2476 (find_minsym_type_and_address): ... this new function.
2477 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
2478 (operator_length_standard, operator_check_standard): Handle
2479 OP_VAR_MSYM_VALUE.
2480 * std-operator.def (OP_VAR_MSYM_VALUE): New.
2481
2482 2017-09-04 Pedro Alves <palves@redhat.com>
2483
2484 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
2485 TYPE_GNU_IFUNC specially here. Throw error if return type is
2486 unknown.
2487 * ada-typeprint.c (print_func_type): Handle functions with unknown
2488 return type.
2489 * c-typeprint.c (c_type_print_base): Handle functions and methods
2490 with unknown return type.
2491 * compile/compile-c-symbols.c (convert_symbol_bmsym)
2492 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
2493 * compile/compile-c-types.c: Include "objfiles.h".
2494 (convert_func): For functions with unknown return type, warn and
2495 default to int.
2496 * compile/compile-object-run.c (compile_object_run): Adjust call
2497 to call_function_by_hand_dummy.
2498 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
2499 call_function_by_hand.
2500 * eval.c (evaluate_subexp_standard): Adjust calls to
2501 call_function_by_hand. Handle functions and methods with unknown
2502 return type. Pass expect_type to call_function_by_hand.
2503 * f-typeprint.c (f_type_print_base): Handle functions with unknown
2504 return type.
2505 * gcore.c (call_target_sbrk): Adjust call to
2506 call_function_by_hand.
2507 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
2508 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
2509 an integer address type instead of nodebug.
2510 * guile/scm-value.c (gdbscm_value_call): Adjust call to
2511 call_function_by_hand.
2512 * infcall.c (error_call_unknown_return_type): New function.
2513 (call_function_by_hand): New "default_return_type" parameter.
2514 Pass it down.
2515 (call_function_by_hand_dummy): New "default_return_type"
2516 parameter. Use it instead of defaulting to int. If there's no
2517 default and the return type is unknown, throw an error. If
2518 there's a default return type, and the called function has no
2519 debug info, then assume the function is prototyped.
2520 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
2521 New "default_return_type" parameter.
2522 (error_call_unknown_return_type): New declaration.
2523 * linux-fork.c (call_lseek): Cast return type of lseek.
2524 (inferior_call_waitpid, checkpoint_command): Adjust calls to
2525 call_function_by_hand.
2526 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
2527 calls to call_function_by_hand.
2528 * m2-typeprint.c (m2_procedure): Handle functions with unknown
2529 return type.
2530 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2531 (value_nsstring, print_object_command): Adjust calls to
2532 call_function_by_hand.
2533 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
2534 functions with unknown return type.
2535 (pascal_type_print_func_varspec_suffix): New function.
2536 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
2537 TYPE_CODE_METHOD>: Use it.
2538 * python/py-value.c (valpy_call): Adjust call to
2539 call_function_by_hand.
2540 * rust-lang.c (rust_evaluate_funcall): Adjust call to
2541 call_function_by_hand.
2542 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
2543 call_function_by_hand.
2544 * valops.c (value_allocate_space_in_inferior): Adjust call to
2545 call_function_by_hand.
2546 * typeprint.c (type_print_unknown_return_type): New function.
2547 * typeprint.h (type_print_unknown_return_type): New declaration.
2548
2549 2017-09-04 Pedro Alves <palves@redhat.com>
2550
2551 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
2552 types with more than one parameter as prototyped.
2553
2554 2017-09-04 Pedro Alves <palves@redhat.com>
2555
2556 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
2557 (disassemble_command): Use gdb_disassembly_flags instead of bare
2558 int.
2559 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
2560 (dump_insns, do_mixed_source_and_assembly_deprecated)
2561 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
2562 Use gdb_disassembly_flags instead of bare int.
2563 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
2564 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
2565 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
2566 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
2567 (enum gdb_disassembly_flag): ... values of this new enumeration.
2568 (gdb_disassembly_flags): Define.
2569 (gdb_disassembly)
2570 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
2571 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
2572 gdb_disassembly_flags instead of bare int.
2573 * record-btrace.c (btrace_insn_history)
2574 (record_btrace_insn_history, record_btrace_insn_history_range)
2575 (record_btrace_insn_history_from): Use gdb_disassembly_flags
2576 instead of bare int.
2577 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
2578 Use gdb_disassembly_flags instead of bare int.
2579 * target-debug.h (target_debug_print_gdb_disassembly_flags):
2580 Define.
2581 * target-delegates.c: Regenerate.
2582 * target.c (target_insn_history, target_insn_history_from)
2583 (target_insn_history_range): Use gdb_disassembly_flags instead of
2584 bare int.
2585 * target.h: Include "disasm.h".
2586 (struct target_ops) <to_insn_history, to_insn_history_from,
2587 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
2588 int.
2589 (target_insn_history, target_insn_history_from)
2590 (target_insn_history_range): Use gdb_disassembly_flags instead of
2591 bare int.
2592
2593 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2594
2595 * cli/cli-script.c (build_command_line): For if/while commands,
2596 check whether args is empty.
2597
2598 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2599
2600 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
2601 (enum command_control_type): Likewise.
2602 (struct command_line): Likewise.
2603 (free_command_lines): Likewise.
2604 (struct command_lines_deleter): Likewise.
2605 (command_line_up): Likewise.
2606 (read_command_lines): Likewise.
2607 (read_command_lines_1): Likewise.
2608 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
2609 (enum command_control_type): Likewise.
2610 (struct command_line): Likewise.
2611 (free_command_lines): Likewise.
2612 (struct command_lines_deleter): Likewise.
2613 (command_line_up): Likewise.
2614 (read_command_lines): Likewise.
2615 (read_command_lines_1): Likewise.
2616 * breakpoint.h: Include cli/cli-script.h.
2617 * extension-priv.h: Likewise.
2618 * gdbcmd.h: Likewise.
2619
2620 2017-09-04 Pedro Alves <palves@redhat.com>
2621
2622 * ada-lang.c (is_known_support_routine): Move sal declaration to
2623 where it is initialized.
2624 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
2625 (parse_breakpoint_sals, decode_static_tracepoint_spec)
2626 (clear_command, update_static_tracepoint): Remove init_sal
2627 references. Move declarations closer to initializations.
2628 * cli/cli-cmds.c (list_command): Move sal declarations closer to
2629 initializations.
2630 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
2631 references. Move sal declarations closer to initializations.
2632 * frame.c (find_frame_sal): Return a symtab_and_line via function
2633 return instead of output parameter. Remove init_sal references.
2634 * frame.h (find_frame_sal): Return a symtab_and_line via function
2635 return instead of output parameter.
2636 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
2637 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
2638 instead of memset.
2639 (gdbscm_find_pc_line): Remove init_sal reference.
2640 * infcall.c (call_function_by_hand_dummy): Remove init_sal
2641 references. Move declarations closer to initializations.
2642 * infcmd.c (set_step_frame): Update. Move declarations closer to
2643 initializations.
2644 (finish_backward): Remove init_sal references. Move declarations
2645 closer to initializations.
2646 * infrun.c (process_event_stop_test, handle_step_into_function)
2647 (insert_hp_step_resume_breakpoint_at_frame)
2648 (insert_step_resume_breakpoint_at_caller): Likewise.
2649 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
2650 (symbol_to_sal): Likewise.
2651 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
2652 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
2653 to its initialization.
2654 * reverse.c (save_bookmark_command): Use new/delete. Remove
2655 init_sal references. Move declarations closer to initializations.
2656 * source.c (get_current_source_symtab_and_line): Remove brace
2657 initialization.
2658 (set_current_source_symtab_and_line): Now takes the sal by const
2659 reference. Remove brace initialization.
2660 (line_info): Remove init_sal reference.
2661 * source.h (set_current_source_symtab_and_line): Now takes a
2662 symtab_and_line via const reference.
2663 * stack.c (set_current_sal_from_frame): Adjust.
2664 (print_frame_info): Adjust.
2665 (get_last_displayed_sal): Return the sal via function return
2666 instead of via output parameter. Simplify.
2667 (frame_info): Adjust.
2668 * stack.h (get_last_displayed_sal): Return the sal via function
2669 return instead of via output parameter.
2670 * symtab.c (init_sal): Delete.
2671 (find_pc_sect_line): Remove init_sal references. Move
2672 declarations closer to initializations.
2673 (find_function_start_sal): Remove init_sal references. Move
2674 declarations closer to initializations.
2675 * symtab.h (struct symtab_and_line): In-class initialize all
2676 fields.
2677 * tracepoint.c (set_traceframe_context)
2678 (print_one_static_tracepoint_marker): Remove init_sal references.
2679 Move declarations closer to initializations.
2680 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2681 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
2682 declarations closer to initializations.
2683 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2684 init_sal references. Adjust.
2685
2686 2017-09-04 Pedro Alves <palves@redhat.com>
2687
2688 * ax-gdb.c (agent_command_1): Use range-for.
2689 * break-catch-throw.c (re_set_exception_catchpoint): Update.
2690 * breakpoint.c: Include "common/array-view.h".
2691 (init_breakpoint_sal, create_breakpoint_sal): Change sals
2692 parameter from struct symtabs_and_lines to
2693 array_view<symtab_and_line>. Adjust. Use range-for. Update.
2694 (breakpoint_sals_to_pc): Change sals parameter from struct
2695 symtabs_and_lines to std::vector reference.
2696 (check_fast_tracepoint_sals): Change sals parameter from struct
2697 symtabs_and_lines to std::array_view. Use range-for.
2698 (decode_static_tracepoint_spec): Return a std::vector instead of
2699 symtabs_and_lines. Update.
2700 (create_breakpoint): Update.
2701 (break_range_command, until_break_command, clear_command): Update.
2702 (base_breakpoint_decode_location, bkpt_decode_location)
2703 (bkpt_probe_create_sals_from_location)
2704 (bkpt_probe_decode_location, tracepoint_decode_location)
2705 (tracepoint_probe_decode_location)
2706 (strace_marker_create_sals_from_location): Return a std::vector
2707 instead of symtabs_and_lines.
2708 (strace_marker_create_breakpoints_sal): Update.
2709 (strace_marker_decode_location): Return a std::vector instead of
2710 symtabs_and_lines. Update.
2711 (update_breakpoint_locations): Change struct symtabs_and_lines
2712 parameters to gdb::array_view. Adjust.
2713 (location_to_sals): Return a std::vector instead of
2714 symtabs_and_lines. Update.
2715 (breakpoint_re_set_default): Use std::vector instead of struct
2716 symtabs_and_lines.
2717 (decode_location_default): Return a std::vector instead of
2718 symtabs_and_lines. Update.
2719 * breakpoint.h: Include "common/array-view.h".
2720 (struct breakpoint_ops) <decode_location>: Now returns a
2721 std::vector instead of returning a symtabs_and_lines via output
2722 parameter.
2723 (update_breakpoint_locations): Change sals parameters to use
2724 gdb::array_view.
2725 * cli/cli-cmds.c (edit_command, list_command): Update to use
2726 std::vector and gdb::array_view.
2727 (ambiguous_line_spec): Adjust to use gdb::array_view and
2728 range-for.
2729 (compare_symtabs): Rename to ...
2730 (cmp_symtabs): ... this. Change parameters to symtab_and_line
2731 const reference and adjust.
2732 (filter_sals): Rewrite using std::vector and standard algorithms.
2733 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2734 (jump_command): Update to use std::vector.
2735 * linespec.c (struct linespec_state) <canonical_names>: Update
2736 comment.
2737 (add_sal_to_sals_basic): Delete.
2738 (add_sal_to_sals, filter_results, convert_results_to_lsals)
2739 (decode_line_2, create_sals_line_offset)
2740 (convert_address_location_to_sals, convert_linespec_to_sals)
2741 (convert_explicit_location_to_sals, parse_linespec)
2742 (event_location_to_sals, decode_line_full, decode_line_1)
2743 (decode_line_with_current_source)
2744 (decode_line_with_last_displayed, decode_objc)
2745 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2746 (linespec_result::~linespec_result): Adjust to use std::vector
2747 instead of symtabs_and_lines.
2748 * linespec.h (linespec_sals::sals): Now a std::vector.
2749 (struct linespec_result): Use std::vector, bool, and in-class
2750 initialization.
2751 (decode_line_1, decode_line_with_current_source)
2752 (decode_line_with_last_displayed): Return std::vector.
2753 * macrocmd.c (info_macros_command): Use std::vector.
2754 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2755 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2756 std::vector.
2757 * probe.h (parse_probes): Return a std::vector.
2758 * python/python.c (gdbpy_decode_line): Use std::vector and
2759 gdb::array_view.
2760 * source.c (select_source_symtab, line_info): Use std::vector.
2761 * stack.c (func_command): Use std::vector.
2762 * symtab.h (struct symtabs_and_lines): Delete.
2763 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2764
2765 2017-09-04 Pedro Alves <palves@redhat.com>
2766
2767 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2768 unittests/array-view-selftests.c.
2769 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
2770 * common/array-view.h: New file.
2771 * unittests/array-view-selftests.c: New file.
2772
2773 2017-09-04 Pedro Alves <palves@redhat.com>
2774
2775 * cli/cli-cmds.c (edit_command): Pass message to
2776 ambiguous_line_spec.
2777 (list_command): Pass message to ambiguous_line_spec. Say
2778 "first"/"last" instead of "start" and "end" to be consistent with
2779 the manual.
2780 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
2781 them to print formatted message.
2782
2783 2017-09-04 Pedro Alves <palves@redhat.com>
2784
2785 * btrace.c (ftrace_add_pt): Pass btrace_insn to
2786 ftrace_update_insns by reference instead of pointer.
2787
2788 2017-09-04 Yao Qi <yao.qi@linaro.org>
2789
2790 * i386-go32-tdep.c: Include x86-xstate.h.
2791 (i386_go32_init_abi): Call i386_target_description.
2792 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
2793 if xcr0 is X86_XSTATE_X87_MASK.
2794 * i386-tdep.h (tdesc_i386): Remove the declaration.
2795 (tdesc_i386_mmx): Likewise.
2796
2797 2017-09-04 Yao Qi <yao.qi@linaro.org>
2798
2799 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
2800 X86_XSTATE_SSE_MASK instead of 0.
2801
2802 2017-09-04 Yao Qi <yao.qi@linaro.org>
2803
2804 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
2805 i386_target_description.
2806 * i386-fbsd-nat.c (i386fbsd_read_description): Call
2807 i386_target_description.
2808 * i386-tdep.c (i386_gdbarch_init): Likewise.
2809
2810 2017-09-04 Yao Qi <yao.qi@linaro.org>
2811
2812 * amd64-darwin-tdep.c: Include "x86-xstate.h".
2813 (x86_darwin_init_abi_64): Call amd64_target_description.
2814 * amd64-dicos-tdep.c: Likewise.
2815 * amd64-fbsd-nat.c: Likewise.
2816 * amd64-fbsd-tdep.c: Likewise.
2817 * amd64-nbsd-tdep.c: Likewise.
2818 * amd64-obsd-tdep.c: Likewise.
2819 * amd64-sol2-tdep.c: Likewise.
2820 * amd64-windows-tdep.c: Likewise.
2821 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
2822
2823 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2824
2825 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
2826 (btrace_function) <insn>: Change type to use std::vector.
2827 * btrace.c (ftrace_debug, ftrace_call_num_insn,
2828 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
2829 ftrace_update_insns, ftrace_compute_global_level_offset,
2830 btrace_stitch_bts, btrace_clear, btrace_insn_get,
2831 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
2832 change to std::vector.
2833 (ftrace_update_insns): Adjust to change to std::vector, change
2834 type of INSN parameter.
2835 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
2836 * record-btrace.c (btrace_call_history_insn_range,
2837 btrace_compute_src_line_range,
2838 record_btrace_frame_prev_register): Adjust to change to
2839 std::vector.
2840 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
2841 to change to std::vector.
2842
2843 2017-09-03 Tom Tromey <tom@tromey.com>
2844
2845 * corefile.c (reopen_exec_file): Use std::string.
2846
2847 2017-09-03 Tom Tromey <tom@tromey.com>
2848
2849 * compile/compile.c (compile_register_name_mangled): Return
2850 std::string.
2851 * compile/compile-loc2c.c (pushf_register_address): Update.
2852 (pushf_register): Update.
2853 * compile/compile-c-types.c (convert_array): Update.
2854 * compile/compile-c-symbols.c (generate_vla_size): Update.
2855 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
2856 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
2857 (convert_one_symbol): Update.
2858 (generate_c_for_for_one_variable): Update.
2859 * compile/compile-c-support.c (c_get_range_decl_name): Return a
2860 std::string.
2861 (generate_register_struct): Update.
2862 * compile/compile-internal.h (c_get_range_decl_name): Return a
2863 std::string.
2864 (compile_register_name_mangled): Return std::string.
2865
2866 2017-09-03 Tom Tromey <tom@tromey.com>
2867
2868 * utils.c (perror_string): Return a std::string.
2869 (throw_perror_with_name, perror_warning_with_name): Update.
2870
2871 2017-09-03 Tom Tromey <tom@tromey.com>
2872
2873 * demangle.c (demangle_command): Use std::string,
2874 unique_xmalloc_ptr.
2875
2876 2017-09-03 Tom Tromey <tom@tromey.com>
2877
2878 * cli/cli-setshow.c (do_set_command): Use std::string.
2879
2880 2017-09-03 Tom Tromey <tom@tromey.com>
2881
2882 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
2883
2884 2017-09-03 Tom Tromey <tom@tromey.com>
2885
2886 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
2887
2888 2017-09-03 Tom Tromey <tom@tromey.com>
2889
2890 * mi/mi-cmd-env.c (env_execute_cli_command): Use
2891 gdb::unique_xmalloc_ptr.
2892
2893 2017-09-03 Tom Tromey <tom@tromey.com>
2894
2895 * thread.c (print_thread_info_1): Use string_printf.
2896 (thread_apply_command, thread_apply_all_command): Use
2897 std::string.
2898
2899 2017-09-03 Tom Tromey <tom@tromey.com>
2900
2901 * valprint.c (val_print_string): Update.
2902 * gdbcore.h (memory_error_message): Return std::string.
2903 * corefile.c (memory_error_message): Return std::string.
2904 (memory_error): Update.
2905 * breakpoint.c (insert_bp_location): Update.
2906
2907 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2908
2909 * target/waitstatus.h (target_waitstatus_to_string): Change
2910 return type to std::string.
2911 * target/waitstatus.c (target_waitstatus_to_string): Return
2912 std::string.
2913 * target.h (target_waitstatus_to_string): Remove declaration.
2914 * infrun.c (resume, clear_proceed_status_thread,
2915 print_target_wait_results, do_target_wait, save_waitstatus,
2916 stop_all_threads): Adjust.
2917 * record-btrace.c (record_btrace_wait): Adjust.
2918 * target-debug.h
2919 (target_debug_print_struct_target_waitstatus_p): Adjust.
2920
2921 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2922
2923 PR gdb/22046
2924 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
2925 detection.
2926
2927 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2928
2929 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
2930 for setting/unsetting environment variables on the remote target.
2931 (New remote packets): Add entries for QEnvironmentHexEncoded,
2932 QEnvironmentUnset and QEnvironmentReset.
2933 * common/environ.c (gdb_environ::operator=): Extend method to
2934 handle m_user_set_env_list and m_user_unset_env_list.
2935 (gdb_environ::clear): Likewise.
2936 (match_var_in_string): Change type of first parameter from 'char
2937 *' to 'const char *'.
2938 (gdb_environ::set): Extend method to handle
2939 m_user_set_env_list and m_user_unset_env_list.
2940 (gdb_environ::unset): Likewise.
2941 (gdb_environ::clear_user_set_env): New method.
2942 (gdb_environ::user_set_envp): Likewise.
2943 (gdb_environ::user_unset_envp): Likewise.
2944 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
2945 m_user_unset_env_list on move constructor/assignment.
2946 (unset): Add new default parameter 'update_unset_list = true'.
2947 (clear_user_set_env): New method.
2948 (user_set_envp): Likewise.
2949 (user_unset_envp): Likewise.
2950 (m_user_set_env_list): New std::set.
2951 (m_user_unset_env_list): Likewise.
2952 * common/rsp-low.c (hex2str): New function.
2953 (bin2hex): New overload for bin2hex function.
2954 * common/rsp-low.c (hex2str): New prototype.
2955 (str2hex): New overload prototype.
2956 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
2957 QEnvironmentUnset and QEnvironmentReset.
2958 (remote_protocol_features): Add QEnvironmentHexEncoded,
2959 QEnvironmentUnset and QEnvironmentReset packets.
2960 (send_environment_packet): New function.
2961 (extended_remote_environment_support): Likewise.
2962 (extended_remote_create_inferior): Call
2963 extended_remote_environment_support.
2964 (_initialize_remote): Add QEnvironmentHexEncoded,
2965 QEnvironmentUnset and QEnvironmentReset packet configs.
2966 * unittests/environ-selftests.c (gdb_selftest_env_var):
2967 New variable.
2968 (test_vector_initialization): New function.
2969 (test_init_from_host_environ): Likewise.
2970 (test_reinit_from_host_environ): Likewise.
2971 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
2972 Likewise.
2973 (test_unset_set_empty_vector): Likewise.
2974 (test_vector_clear): Likewise.
2975 (test_std_move): Likewise.
2976 (test_move_constructor):
2977 (test_self_move): Likewise.
2978 (test_set_unset_reset): Likewise.
2979 (run_tests): Rewrite in terms of the functions above.
2980
2981 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
2982
2983 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
2984 (adi_available): Use a temp variable of type CORE_ADDR as argument
2985 3 when calling target_auxv_search.
2986 (adi_normalize_address): Use masks and xor operators to calculate
2987 normalized address.
2988 (adi_read_versions, adi_write_versions, adi_print_versions)
2989 (do_examine, do_assign): Use paddress.
2990
2991 2017-08-29 John Baldwin <jhb@FreeBSD.org>
2992
2993 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
2994 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
2995 out of loop and add supply of FIR.
2996 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
2997 add collect of FIR.
2998
2999 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
3000
3001 PR gdb/21827
3002 * cli/cli-script.c (define_command): Don't convert command name
3003 to lower case.
3004
3005 2017-08-25 Joel Brobecker <brobecker@adacore.com>
3006
3007 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
3008 Update all callers accordingly. Remove all code blocks handling
3009 the case where DISPP is not NULL.
3010
3011 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3012
3013 PR symtab/22003
3014 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
3015 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3016 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
3017
3018 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3019
3020 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
3021 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
3022 (read_comp_units_from_section): New parameter abbrev_section, use
3023 read_and_check_comp_unit_head, allocate signatured_type if needed.
3024 (create_all_comp_units): Update read_comp_units_from_section caller.
3025
3026 2017-08-23 Pedro Alves <palves@redhat.com>
3027
3028 PR remote/21852
3029 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
3030 to null_ptid and switch to thread without reading the registers
3031 after adding the inferior.
3032
3033 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3034
3035 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
3036 compile-gcc.
3037 * compile/compile.c (compile_gcc, show_compile_gcc): New.
3038 (compile_to_object): Implement compile_gcc.
3039 (_initialize_compile): Install "set compile-gcc". Initialize
3040 compile_gcc.
3041
3042 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3043
3044 * compile/compile.c (compile_to_object): Conditionally call
3045 set_verbose. Conditionally call compile or compile_v0.
3046
3047 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
3048
3049 * sparc64-tdep.h: (adi_normalize_address): New export.
3050 * sparc-nat.h: (open_adi_tag_fd): New export.
3051 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3052 * sparc64-linux-tdep.c:
3053 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3054 (sparc64_linux_handle_segmentation_fault): New function.
3055 (sparc64_linux_init_abi): Register
3056 sparc64_linux_handle_segmentation_fault
3057 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3058 (sparc64_addr_bits_remove): New function.
3059 (sparc64_init_abi): Register sparc64_addr_bits_remove.
3060 (MAX_PROC_NAME_SIZE): New macro.
3061 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3062 (sparc64adilist): New variable.
3063 (adi_proc_list): New variable.
3064 (find_adi_info): New function.
3065 (add_adi_info): New function.
3066 (get_adi_info_proc): New function.
3067 (get_adi_info): New function.
3068 (info_adi_command): New function.
3069 (read_maps_entry): New function.
3070 (adi_available): New function.
3071 (adi_normalize_address): New function.
3072 (adi_align_address): New function.
3073 (adi_convert_byte_count): New function.
3074 (adi_tag_fd): New function.
3075 (adi_is_addr_mapped): New function.
3076 (adi_read_versions): New function.
3077 (adi_write_versions): New function.
3078 (adi_print_versions): New function.
3079 (do_examine): New function.
3080 (do_assign): New function.
3081 (adi_examine_command): New function.
3082 (adi_assign_command): New function.
3083 (_initialize_sparc64_adi_tdep): New function.
3084
3085 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
3086
3087 * breakpoint.c (breakpoints_info): Rename to ...
3088 (info_breakpoints_command): ... this.
3089 (watchpoints_info): Rename to ...
3090 (info_watchpoints_command): ... this.
3091 (tracepoints_info): Rename to ...
3092 (info_tracepoints_command): ... this.
3093 (_initialize_breakpoint): Adjust.
3094 * dcache.c (dcache_info): Rename to ...
3095 (info_display_command): ... this.
3096 (_initialize_dcache): Adjust.
3097 * frame.h (args_info): Rename to ...
3098 (info_args_command): ... this.
3099 (locals_info): Rename to ...
3100 (info_locals_command): ... this.
3101 * infcmd.c (nofp_registers_info): Rename to ...
3102 (info_registers_command): ... this.
3103 (float_info): Rename to ...
3104 (info_float_command): ... this.
3105 (program_info): Rename to ...
3106 (info_program_command): ... this.
3107 (all_registers_info): Rename to ...
3108 (info_all_registers_command): ... this.
3109 (vector_info): Rename to ...
3110 (info_vector_command): ... this.
3111 (float_info): Rename to ...
3112 (info_float_command): ... this.
3113 (_initialize_infcmd): Adjust.
3114 * inferior.h (term_info): Rename to ...
3115 (info_terminal_command): ... this.
3116 * inflow.c (term_info): Rename to ...
3117 (info_terminal_command): ... this.
3118 (_initialize_inflow): Adjust.
3119 * infrun.c (signals_info): Rename to ...
3120 (info_signals_command): ... this.
3121 (_initialize_infrun): Adjust.
3122 * objc-lang.c (classes_info): Rename to ...
3123 (info_classes_command): ... this.
3124 (selectors_info): Rename to ...
3125 (info_selectors_command): ... this.
3126 (_initialize_objc_language): Adjust.
3127 * printcmd.c (sym_info): Rename to ...
3128 (info_symbol_command): ... this.
3129 (address_info): Rename to ...
3130 (info_address_command): ... this.
3131 (display_info): Rename to ...
3132 (info_display_command): ... this.
3133 (_initialize_printcmd): Adjust.
3134 * reverse.c (bookmarks_info): Rename to ...
3135 (info_breakpoints_command): ... this.
3136 (_initialize_reverse): Adjust.
3137 * ser-go32.c (dos_info): Rename to ...
3138 (info_serial_command): ... this.
3139 (_initialize_ser_dos): Adjust.
3140 * skip.c (skip_info): Rename to ...
3141 (info_skip_command): ... this.
3142 (_initialize_step_skip): Adjust.
3143 * source.c (line_info): Rename to ...
3144 (info_line_command): ... this.
3145 (source_info): Rename to ...
3146 (info_source_command)
3147 * stack.c (frame_info): Rename to ...
3148 (info_frame_command): ... this.
3149 (locals_info): Rename to ...
3150 (info_locals_command): ... this.
3151 (args_info): Rename to ...
3152 (info_args_command): ... this.
3153 (_initialize_stack): Adjust.
3154 * symtab.c (sources_info): Rename to ...
3155 (info_sources_command): ... this.
3156 (variables_info): Rename to ...
3157 (info_variables_command): ... this.
3158 (functions_info): Rename to ...
3159 (info_functions_command): ... this.
3160 (types_info): Rename to ...
3161 (info_types_command): ... this.
3162 (_initialize_symtab): Adjust.
3163 * target.c (target_info): Rename to ...
3164 (info_target_command): ... this.
3165 (initialize_targets): Adjust.
3166 * tracepoint.c (tvariables_info): Rename to ...
3167 (info_tvariables_command): ... this.
3168 (scope_info): Rename to ...
3169 (info_scope_command): ... this.
3170 (trace_dump_actions): Adjust.
3171 (_initialize_tracepoint): Adjust.
3172
3173 2017-08-22 Tom Tromey <tom@tromey.com>
3174
3175 * breakpoint.h (install_breakpoint): Update.
3176 * breakpoint.c (add_solib_catchpoint): Update.
3177 (install_breakpoint): Change argument to a std::unique_ptr.
3178 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3179 (create_breakpoint_sal, create_breakpoint): Update.
3180 (watch_command_1, catch_exec_command_1)
3181 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3182 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3183 Return the breakpoint.
3184 (set_raw_breakpoint_without_location, set_raw_breakpoint)
3185 (new_single_step_breakpoint): Update.
3186 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3187 std::unique_ptr.
3188 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3189 std::unique_ptr.
3190 * break-catch-sig.c (create_signal_catchpoint): Use
3191 std::unique_ptr.
3192 * ada-lang.c (create_ada_exception_catchpoint): Use
3193 std::unique_ptr.
3194
3195 2017-08-22 Tom Tromey <tom@tromey.com>
3196
3197 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3198
3199 2017-08-22 Tom Tromey <tom@tromey.com>
3200
3201 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3202 (lookup_partial_symbol): Update.
3203
3204 2017-08-22 Tom Tromey <tom@tromey.com>
3205
3206 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3207 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3208 (find_and_open_source, symtab_to_fullname): Update.
3209 * psymtab.c (psymtab_to_fullname): Update.
3210
3211 2017-08-22 Tom Tromey <tom@tromey.com>
3212
3213 * exec.c (exec_file_attach): Update.
3214 * linux-thread-db.c (try_thread_db_load): Update.
3215 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3216 * utils.c (gdb_realpath): Change return type.
3217 (gdb_realpath_keepfile): Update.
3218 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3219 (_initialize_utils): Register the new self test.
3220 * source.c (openp): Update.
3221 (find_and_open_source): Update.
3222 * nto-tdep.c (nto_find_and_open_solib): Update.
3223 * main.c (set_gdb_data_directory): Update.
3224 (captured_main_1): Update.
3225 * dwarf2read.c (dwarf2_get_dwz_file): Update
3226 (dw2_map_symbol_filenames): Update.
3227 * auto-load.c (auto_load_safe_path_vec_update): Update.
3228 (filename_is_in_auto_load_safe_path_vec): Change type of
3229 "filename_realp".
3230 (auto_load_objfile_script): Update.
3231 (file_is_auto_load_safe): Update. Use std::string.
3232 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3233
3234 2017-08-22 Tom Tromey <tom@tromey.com>
3235
3236 * utils.c (gdb_realpath_keepfile): Return a
3237 gdb::unique_xmalloc_ptr.
3238 * exec.c (exec_file_attach): Update.
3239 * utils.h (gdb_realpath_keepfile): Return a
3240 gdb::unique_xmalloc_ptr.
3241
3242 2017-08-22 Tom Tromey <tom@tromey.com>
3243
3244 * compile/compile.c (compile_file_command): Use
3245 gdb::unique_xmalloc_ptr, std::string.
3246 * utils.c (gdb_abspath): Change return type.
3247 * source.c (openp): Update.
3248 * objfiles.c (allocate_objfile): Update.
3249 * main.c (set_gdb_data_directory): Update.
3250 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
3251
3252 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
3253
3254 * cli-cmds.c (list_commands): List actual code around more than
3255 one location.
3256
3257 2017-08-21 John Baldwin <jhb@FreeBSD.org>
3258
3259 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
3260
3261 2017-08-21 Pedro Alves <palves@redhat.com>
3262
3263 PR gdb/19487
3264 * c-exp.y (variable production): Handle function aliases.
3265 * minsyms.c (msymbol_is_text): New function.
3266 * minsyms.h (msymbol_is_text): Declare.
3267 * symtab.c (find_function_alias_target): New function.
3268 * symtab.h (find_function_alias_target): Declare.
3269
3270 2017-08-21 Pedro Alves <palves@redhat.com>
3271
3272 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
3273 typedefs.
3274 * typeprint.c (whatis_exp): If handling "whatis", and expression
3275 is OP_TYPE, strip one typedef level. Otherwise don't strip
3276 typedefs here.
3277 * valops.c (value_cast): Save "to" type before resolving
3278 stubs/typedefs. Use that type as resulting value's type.
3279
3280 2017-08-18 Tom Tromey <tom@tromey.com>
3281 Pedro Alves <palves@redhat.com>
3282
3283 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
3284 * sol-thread.c (sol_thread_resume, sol_thread_wait)
3285 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
3286 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
3287 * proc-service.c (ps_xfer_memory): Use scoped_restore.
3288 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
3289 (linux_get_siginfo_data): Add "thread" argument. Use
3290 scoped_restore.
3291 * linux-nat.c (linux_child_follow_fork)
3292 (check_stopped_by_watchpoint): Use scoped_restore.
3293 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
3294 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
3295 (restore_inferior_ptid, save_inferior_ptid): Remove.
3296 * btrace.c (btrace_fetch): Use scoped_restore.
3297 * bsd-uthread.c (bsd_uthread_fetch_registers)
3298 (bsd_uthread_store_registers): Use scoped_restore.
3299 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
3300 scoped_restore.
3301 * aix-thread.c (aix_thread_resume, aix_thread_wait)
3302 (aix_thread_xfer_partial): Use scoped_restore.
3303 * inferior.h (save_inferior_ptid): Remove.
3304
3305 2017-08-18 Yao Qi <yao.qi@linaro.org>
3306
3307 PR tdep/21818
3308 * arm-tdep.c (gdb_print_insn_arm): Mark
3309 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
3310
3311 2017-08-18 Yao Qi <yao.qi@linaro.org>
3312
3313 * NEWS: Mention GDBserver's new option "--selftest".
3314 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
3315 * selftest.c: Move it to common/selftest.c.
3316 * selftest.h: Move it to common/selftest.h.
3317 * selftest-arch.c (reset): New function.
3318 (tests_with_arch): Call reset.
3319
3320 2017-08-18 Yao Qi <yao.qi@linaro.org>
3321
3322 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
3323 instead of exception_fprintf and printf_filtered.
3324
3325 2017-08-18 Yao Qi <yao.qi@linaro.org>
3326
3327 * selftest.c (register_self_test): Rename it to
3328 selftests::register_test.
3329 (run_self_tests): selftest::run_tests.
3330 * selftest.h: Update declarations.
3331 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
3332 selftests::register_test_foreach_arch.
3333 * selftest-arch.h: Update declaration.
3334 * aarch64-tdep.c: Update.
3335 * arm-tdep.c: Likewise.
3336 * disasm-selftests.c: Likewise.
3337 * dwarf2loc.c: Likewise.
3338 * dwarf2-frame.c: Likewise.
3339 * findvar.c: Likewise.
3340 * gdbarch-selftests.c: Likewise.
3341 * maint.c (maintenance_selftest): Likewise.
3342 * regcache.c: Likewise.
3343 * rust-exp.y: Likewise.
3344 * selftest-arch.c: Likewise.
3345 * unittests/environ-selftests.c: Likewise.
3346 * unittests/function-view-selftests.c: Likewise.
3347 * unittests/offset-type-selftests.c: Likewise.
3348 * unittests/optional-selftests.c: Likewise.
3349 * unittests/scoped_restore-selftests.c: Likewise.
3350 * utils-selftests.c: Likewise.
3351
3352 2017-08-17 Pedro Alves <palves@redhat.com>
3353
3354 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
3355 local.
3356
3357 2017-08-17 Pedro Alves <palves@redhat.com>
3358
3359 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
3360 field.
3361 (reset_die_in_process): Delete, replaced by ...
3362 (process_die_scope): ... this new class. Make it responsible for
3363 freeing cu->line_header too.
3364 (process_die): Use process_die_scope.
3365 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
3366 cu->line_header_die_owner. Don't release the line header if it's
3367 owned by the CU.
3368 (setup_type_unit_groups): Make the CU/DIE own the line header.
3369 Don't release the line header here.
3370
3371 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
3372
3373 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
3374
3375 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
3376
3377 * NEWS: Mention new shortcuts for nexti and stepi in TUI
3378 Single-Key mode
3379
3380 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
3381
3382 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
3383 mode command list.
3384
3385 2017-08-15 Stafford Horne <shorne@gmail.com>
3386
3387 * MAINTAINERS (Write After Approval): Add Stafford Horne.
3388
3389 2017-08-15 Stafford Horne <shorne@gmail.com>
3390
3391 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
3392
3393 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
3394
3395 PR gdb/21954
3396 * infcmd.c (unset_environment_command): Use the 'clear' method on
3397 the environment instead of resetting it.
3398
3399 2017-08-15 John Baldwin <jhb@FreeBSD.org>
3400
3401 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
3402 platforms.
3403
3404 2017-08-14 Tom Tromey <tom@tromey.com>
3405
3406 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
3407 (print_binary_chars): Likewise.
3408 (BITS_IN_BYTES): Remove.
3409
3410 2017-08-14 Tom Tromey <tom@tromey.com>
3411
3412 PR gdb/21675
3413 * valprint.c (LOW_ZERO): Change value to 034.
3414 (print_octal_chars): Add static_asserts for octal constants.
3415 * printcmd.c (print_scalar_formatted): Add 'd' case.
3416
3417 2017-08-11 Tom Tromey <tom@tromey.com>
3418
3419 * symfile.c (add_symbol_file_command): Use std::vector.
3420
3421 2017-08-14 Tom Tromey <tom@tromey.com>
3422
3423 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
3424 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3425 std::move.
3426 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
3427
3428 2017-08-11 Pedro Alves <palves@redhat.com>
3429
3430 * infrun.c (process_event_stop_test): Adjust
3431 function_name_is_marked_for_skip call.
3432 * skip.c: Include <list>.
3433 (skiplist_entry): Make it a class with private fields, and
3434 getters/setters.
3435 (skiplist_entry_chain): Delete.
3436 (skiplist_entries): New.
3437 (skiplist_entry_count): Delete.
3438 (highest_skiplist_entry_num): New.
3439 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
3440 (add_skiplist_entry): Delete.
3441 (skiplist_entry::skiplist_entry): New.
3442 (skiplist_entry::add_entry): New.
3443 (skip_file_command, skip_function): Adjust.
3444 (compile_skip_regexp): Delete.
3445 (skip_command): Don't compile regexp here. Adjust to use
3446 skiplist_entry::add_entry.
3447 (skip_info): Adjust to use range-for and getters.
3448 (skip_enable_command, skip_disable_command): Adjust to use
3449 range-for and setters.
3450 (skip_delete_command): Adjust to use std::list.
3451 (add_skiplist_entry): Delete.
3452 (skip_file_p): Delete, refactored as ...
3453 (skiplist_entry::do_skip_file_p): ... this new method.
3454 (skip_gfile_p): Delete, refactored as ...
3455 (skiplist_entry::do_gskip_file_p): ... this new method.
3456 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
3457 (skiplist_entry::skip_function_p): ... this new method.
3458 (function_name_is_marked_for_skip): Now returns bool, and takes
3459 the function sal by const reference. Adjust to use range-for and
3460 skiplist_entry methods.
3461 (_initialize_step_skip): Remove references to
3462 skiplist_entry_chain, skiplist_entry_count.
3463 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
3464 takes the function sal by const reference.
3465
3466 2017-08-11 Yao Qi <yao.qi@linaro.org>
3467
3468 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
3469 (dwarf2_frame_cache): Remove reset_cache_cleanup.
3470 (dwarf2_frame_cache):
3471 * frame-unwind.c (frame_unwind_try_unwinder): Catch
3472 RETURN_MASK_ALL and set *this_case to NULL.
3473 * frame-unwind.h: Update comments.
3474
3475 2017-08-11 Yao Qi <yao.qi@linaro.org>
3476
3477 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
3478 (dwarf2_frame_state_copy_regs): Remove.
3479 (dwarf2_frame_state_free_regs): Remove.
3480 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
3481 (dwarf2_restore_rule): Call method .alloc_regs instead of
3482 dwarf2_frame_state_alloc_regs.
3483 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
3484 constructor. Call std::move.
3485 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
3486 (dwarf2_frame_cache): Likewise.
3487
3488 [GDB_SELF_TEST]: Include selftest.h and
3489 selftest-arch.h.
3490 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
3491 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
3492 execute_cfa_program_test.
3493
3494 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
3495 copy ctor, assignment operator, move assignment.
3496 <alloc_regs>: New method.
3497 <swap>: New method.
3498 (struct dwarf2_frame_state): Delete dtor.
3499 (dwarf2_frame_state_alloc_regs): Remove declaration.
3500 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
3501 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
3502
3503 2017-08-11 Yao Qi <yao.qi@linaro.org>
3504
3505 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
3506 (dwarf2_frame_state::dwarf2_frame_state): New.
3507 (dwarf2_frame_state::~dwarf2_frame_state): New.
3508 (dwarf2_fetch_cfa_info): Update.
3509 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
3510 rather than a pointer. Update code.
3511 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
3512 dtor.
3513 <data_align, code_align, retaddr_column>: Change them to const.
3514 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
3515 to bool.
3516
3517 2017-08-11 Yao Qi <yao.qi@linaro.org>
3518
3519 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
3520 <loc.exp>: New field.
3521 * dwarf2-frame.c (execute_cfa_program): Update.
3522 (dwarf2_frame_prev_register): Update.
3523
3524 2017-08-10 Pedro Alves <palves@redhat.com>
3525
3526 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
3527
3528 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3529
3530 * fbsd-nat.c (struct fbsd_fork_info): Remove.
3531 (fbsd_pending_children): Use std::list.
3532 (fbsd_remember_child): Likewise.
3533 (fbsd_is_child_pending): Likewise.
3534 (fbsd_pending_vfork_done): Use std::forward_list.
3535 (fbsd_add_vfork_done): Likewise.
3536 (fbsd_is_vfork_done_pending): Likewise.
3537 (fbsd_next_vfork_done): Likewise.
3538
3539 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3540
3541 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
3542 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
3543 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
3544 for `mapfilename'.
3545 (fbsd_xfer_partial): Use gdb::byte_vector.
3546 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
3547
3548 2017-08-09 John Baldwin <jhb@FreeBSD.org>
3549
3550 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
3551 "filestuff.h".
3552 (fbsd_find_memory_regions): Fix `mapfile' initialization.
3553
3554 2017-08-09 Tom Tromey <tom@tromey.com>
3555
3556 * skip.c (skiplist_entry): New constructor.
3557 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
3558 (skiplist_entry::file_is_glob): Now bool.
3559 (skiplist_entry::file, skiplist_entry::function): Now
3560 std::string.
3561 (make_skip_entry): Return a unique_ptr. Use new.
3562 (free_skiplist_entry, free_skiplist_entry_cleanup)
3563 (make_free_skiplist_entry_cleanup): Remove.
3564 (skip_command, skip_disable_command, add_skiplist_entry)
3565 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
3566 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
3567 (function_name_is_marked_for_skip): Update.
3568 (skip_delete_command): Update. Use delete.
3569
3570 2017-08-09 Jiong Wang <jiong.wang@arm.com>
3571
3572 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
3573 (aarch64_linux_core_read_description): New function.
3574 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
3575
3576 2017-08-09 Pedro Alves <palves@redhat.com>
3577
3578 * cp-name-parser.y (cp_comp_to_string): Return a
3579 gdb::unique_xmalloc_ptr<char>.
3580 * cp-support.c (replace_typedefs_qualified_name)
3581 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
3582 (cp_canonicalize_string_full): Use op= instead of explicit
3583 convertion.
3584 (cp_class_name_from_physname, method_name_from_physname)
3585 (cp_func_name, cp_remove_params): Adjust to use
3586 gdb::unique_xmalloc_ptr<char>.
3587 * cp-support.h (cp_comp_to_string): Return a
3588 gdb::unique_xmalloc_ptr<char>.
3589 * python/py-type.c (typy_lookup_type): Adjust to use
3590 gdb::unique_xmalloc_ptr<char>.
3591
3592 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
3593
3594 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
3595
3596 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
3597 Yao Qi <yao.qi@linaro.org>
3598
3599 * cp-support.c (cp_canonicalize_string_full): Use
3600 gdb::unique_xmalloc_ptr<char>.
3601 (cp_canonicalize_string): Likewise.
3602
3603 2017-08-09 Yao Qi <yao.qi@linaro.org>
3604
3605 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
3606 * regformats/i386/amd64-avx-avx512.dat: Remove.
3607 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
3608 * regformats/i386/amd64-avx-mpx.dat:Remove.
3609 * regformats/i386/amd64-avx.dat: Remove.
3610 * regformats/i386/amd64-mpx.dat: Remove.
3611 * regformats/i386/i386-avx-avx512.dat: Remove.
3612 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
3613 * regformats/i386/i386-avx-mpx.dat: Remove.
3614 * regformats/i386/i386-mmx.dat: Remove.
3615 * regformats/i386/i386-mpx.dat: Remove.
3616
3617 2017-08-09 Yao Qi <yao.qi@linaro.org>
3618
3619 * amd64-tdep.h (tdesc_x32): Remove the declaration.
3620 * amd64-tdep.c: Don't include features/i386/x32*.c.
3621 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
3622 functions.
3623 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
3624 and i386/x32-avx-avx512.
3625 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
3626 and i386/x32.xml.
3627 * features/i386/x32-avx-avx512.c: Removed.
3628 * features/i386/x32-avx-avx512.xml: Removed.
3629 * features/i386/x32-avx.c: Removed.
3630 * features/i386/x32-avx.xml: Removed.
3631 * features/i386/x32.c: Removed.
3632 * features/i386/x32.xml: Removed.
3633 * regformats/i386/x32-avx-avx512.dat: Removed.
3634 * regformats/i386/x32-avx.dat: Removed.
3635 * regformats/i386/x32.dat: Removed.
3636
3637 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3638
3639 PR breakpoints/21886
3640 * mem-break.c (default_memory_insert_breakpoint): Use
3641 `->placed_address' rather than `->reqstd_address' for the
3642 breakpoint location.
3643
3644 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3645
3646 * arch-utils.c (default_print_insn): Remove arch/mach/endian
3647 assertions.
3648
3649 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
3650
3651 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
3652 a union of `tdep_info', `tdesc_data' and `id'.
3653 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
3654 rather than `info.tdep_info'.
3655 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
3656 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3657 * i386-tdep.c (i386_gdbarch_init): Likewise.
3658 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
3659 * mips-tdep.c (mips_gdbarch_init): Likewise.
3660 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3661 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3662 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
3663 `info.tdep_info'.
3664 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
3665 `info.tdep_info'.
3666 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3667 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
3668 `info.tdep_info'.
3669 * spu-tdep.c (spu_gdbarch_init): Likewise.
3670 * gdbarch.h: Regenerate.
3671
3672 2017-08-07 Leszek Swirski <leszeks@google.com>
3673
3674 PR symtab/20899
3675 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
3676
3677 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
3678
3679 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3680 (gdbsim_open): Rename gdb_argv args object to argv.
3681
3682 2017-08-05 Tom Tromey <tom@tromey.com>
3683
3684 * compile/compile-object-load.c (compile_object_load): Use
3685 gdb::unique_xmalloc_ptr.
3686 * cli/cli-dump.c (scan_filename): Rename from
3687 scan_filename_with_cleanup. Change return type.
3688 (scan_expression): Rename from scan_expression_with_cleanup.
3689 Change return type.
3690 (dump_memory_to_file, dump_value_to_file, restore_command):
3691 Use gdb::unique_xmalloc_ptr. Update.
3692 * cli/cli-cmds.c (find_and_open_script): Use
3693 gdb::unique_xmalloc_ptr.
3694 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3695 * symmisc.c (maintenance_print_symbols)
3696 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3697 * symfile.c (symfile_bfd_open, generic_load)
3698 (add_symbol_file_command, remove_symbol_file_command): Use
3699 gdb::unique_xmalloc_ptr.
3700 * source.c (openp): Use gdb::unique_xmalloc_ptr.
3701 * psymtab.c (maintenance_print_psymbols): Use
3702 gdb::unique_xmalloc_ptr.
3703 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3704 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3705 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3706 (reload_shared_libraries_1): Likewise.
3707
3708 2017-08-05 Tom Tromey <tom@tromey.com>
3709
3710 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3711 (rust_op_vector, rust_set_vector): New typedefs.
3712 (current_parser): New global.
3713 (work_obstack): Change to pointer type. Update all users.
3714 (rust_ast, pstate): Remove globals.
3715 (struct rust_parser): New.
3716 (%union) <params, field_inits>: Change type.
3717 (start, tuple_expr, unit_expr, struct_expr_list, literal)
3718 (field_expr, expr_list, maybe_expr_list, type_list): Update.
3719 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3720 (convert_params_to_types, convert_params_to_expression): Change
3721 type of "params".
3722 (ast_string): Change type of "fields".
3723 (rust_parse): Make a rust_parser. Remove cleanups.
3724 (rust_lex_tests): Make and install an auto_obstack.
3725
3726 2017-08-04 Yao Qi <yao.qi@linaro.org>
3727
3728 * configure.srv (ipa_x32_linux_regobj): New.
3729 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3730 instead of X86_TDESC_AVX512.
3731 (initialize_low_tracepoint): Call
3732 init_registers_x32_avx_avx512_linux.
3733
3734 2017-08-04 Yao Qi <yao.qi@linaro.org>
3735
3736 * utils.h (gdb_argv): Add namespace std for nullptr_t.
3737
3738 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
3739
3740 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3741
3742 2017-08-03 Tom Tromey <tom@tromey.com>
3743
3744 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3745 Remove.
3746 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3747
3748 2017-08-03 Tom Tromey <tom@tromey.com>
3749
3750 * python/py-param.c (compute_enum_values): Use gdb_argv.
3751
3752 2017-08-03 Tom Tromey <tom@tromey.com>
3753
3754 * utils.h (struct gdb_argv_deleter): New.
3755 (gdb_argv): New class.
3756 * utils.c (gdb_argv::reset): New method.
3757 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3758 * tracefile.c (tsave_command): Use gdb_argv.
3759 * top.c (new_ui_command): Use gdb_argv.
3760 * symmisc.c (maintenance_print_symbols)
3761 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3762 * symfile.c (symbol_file_command, generic_load)
3763 (remove_symbol_file_command): Use gdb_argv.
3764 * stack.c (backtrace_command): Use gdb_argv.
3765 * source.c (add_path, show_substitute_path_command)
3766 (unset_substitute_path_command, set_substitute_path_command):
3767 Use gdb_argv.
3768 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
3769 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
3770 * remote.c (extended_remote_run, remote_put_command)
3771 (remote_get_command, remote_delete_command): Use gdb_argv.
3772 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
3773 (gdbsim_open): Use gdb_argv.
3774 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
3775 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
3776 * procfs.c (procfs_info_proc): Use gdb_argv.
3777 * interps.c (interpreter_exec_cmd): Use gdb_argv.
3778 * infrun.c (handle_command): Use gdb_argv.
3779 * inferior.c (add_inferior_command, clone_inferior_command):
3780 Use gdb_argv.
3781 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
3782 * exec.c (exec_file_command): Use gdb_argv.
3783 * cli/cli-cmds.c (alias_command): Use gdb_argv.
3784 * compile/compile.c (build_argc_argv): Use gdb_argv.
3785
3786 2017-08-03 Tom Tromey <tom@tromey.com>
3787
3788 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
3789
3790 2017-08-03 Tom Tromey <tom@tromey.com>
3791
3792 * python/python.c (compute_python_string): Return std::string.
3793 (gdbpy_eval_from_control_command): Update.
3794 (do_start_initialization): Use std::string.
3795 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
3796 xstrprintf.
3797 * python/py-breakpoint.c (local_setattro): Use string_printf, not
3798 xstrprintf.
3799
3800 2017-08-03 Tom Tromey <tom@tromey.com>
3801
3802 * top.h (do_restore_instream_cleanup): Remove.
3803 * top.c (do_restore_instream_cleanup): Remove.
3804 (read_command_file): Use scoped_restore.
3805 * cli/cli-script.c (execute_user_command): Use scoped_restore.
3806
3807 2017-08-03 Tom Tromey <tom@tromey.com>
3808
3809 * cli/cli-script.c (execute_user_command)
3810 (execute_control_command): Use scoped_restore.
3811
3812 2017-08-03 Tom Tromey <tom@tromey.com>
3813
3814 * cli/cli-script.c (do_restore_user_call_depth): Remove.
3815 (execute_user_command): Remove user_call_depth; use
3816 user_args_stack's size instead.
3817
3818 2017-08-03 Tom Tromey <tom@tromey.com>
3819
3820 * top.h (in_user_command): Remove.
3821 * top.c (in_user_command): Remove.
3822 * cli/cli-script.c (do_restore_user_call_depth)
3823 (execute_user_command): Update.
3824
3825 2017-08-03 Tom Tromey <tom@tromey.com>
3826
3827 * valops.c (search_struct_method): Use gdb::byte_vector.
3828 * valarith.c (value_concat): Use std::vector.
3829 * target.c (memory_xfer_partial): Use gdb::byte_vector.
3830 (simple_search_memory): Likewise.
3831 * printcmd.c (find_string_backward): Use gdb::byte_vector.
3832 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
3833 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
3834 * elfread.c (elf_rel_plt_read): Use std::string.
3835 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
3836 * cli/cli-dump.c (restore_section_callback): Use
3837 gdb::byte_vector.
3838
3839 2017-08-03 Tom Tromey <tom@tromey.com>
3840
3841 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
3842
3843 2017-08-03 Tom Tromey <tom@tromey.com>
3844
3845 * tui/tui-regs.c (tui_restore_gdbout): Remove.
3846 (tui_register_format): Use scoped_restore.
3847
3848 2017-08-03 Tom Tromey <tom@tromey.com>
3849
3850 * reverse.c (exec_direction_default): Remove.
3851 (exec_reverse_once): Use scoped_restore.
3852 * remote.c (restore_remote_timeout): Remove.
3853 (remote_flash_erase, remote_flash_write, remote_flash_done)
3854 (readchar, remote_serial_write): Use scoped_restore.
3855 * cli/cli-script.c (struct source_cleanup_lines_args)
3856 (source_cleanup_lines): Remove.
3857 (script_from_file): Use scoped_restore.
3858 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
3859 (source_command): Use scoped_restore.
3860
3861 2017-08-03 Tom Tromey <tom@tromey.com>
3862
3863 * utils.h (make_cleanup_free_so): Remove.
3864 * utils.c (do_free_so, make_cleanup_free_so): Remove.
3865 * solist.h (struct so_deleter): New.
3866 (so_list_up): New typedef.
3867 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
3868
3869 2017-08-03 Tom Tromey <tom@tromey.com>
3870
3871 * utils.h (make_cleanup_restore_current_language): Remove.
3872 * utils.c (do_restore_current_language)
3873 (make_cleanup_restore_current_language): Remove.
3874 * parse.c (parse_exp_in_context_1)
3875 (parse_expression_with_language): Use
3876 scoped_restore_current_language.
3877 * mi/mi-main.c (mi_cmd_execute): Use
3878 scoped_restore_current_language.
3879 * language.h (scoped_restore_current_language): New class.
3880
3881 2017-08-03 Tom Tromey <tom@tromey.com>
3882
3883 * compile/compile.c (cleanup_unlink_file): Remove.
3884 (compile_to_object): Use gdb::unlinker.
3885 (eval_compile_command): Likewise.
3886
3887 2017-08-03 Tom Tromey <tom@tromey.com>
3888
3889 * utils.h (make_cleanup_fclose): Remove.
3890 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
3891
3892 2017-08-03 Tom Tromey <tom@tromey.com>
3893
3894 * top.c (open_terminal_stream): Return gdb_file_up.
3895 (new_ui_command): Update.
3896
3897 2017-08-03 Tom Tromey <tom@tromey.com>
3898
3899 * source.c (print_source_lines_base, forward_search_command)
3900 (reverse_search_command): Use gdb_file_up.
3901
3902 2017-08-03 Tom Tromey <tom@tromey.com>
3903
3904 * fbsd-nat.c (fbsd_find_memory_regions): Update.
3905
3906 2017-08-03 Tom Tromey <tom@tromey.com>
3907
3908 * cli/cli-cmds.c (find_and_open_script): Change return type.
3909 Remove "streamp" and "full_path" parameters.
3910 (source_script_with_search): Update.
3911 * auto-load.c (source_script_file): Update.
3912 * cli/cli-cmds.h (find_and_open_script): Change type.
3913 (open_script): New struct.
3914
3915 2017-08-03 Tom Tromey <tom@tromey.com>
3916
3917 * xml-support.c (xml_fetch_content_from_file): Update.
3918 * ui-file.c (stdio_file::open): Update.
3919 * tracefile-tfile.c (tfile_start): Update.
3920 * remote.c (remote_file_put, remote_file_get): Update.
3921 * nat/linux-procfs.c (linux_proc_get_int)
3922 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
3923 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
3924 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
3925 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
3926 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
3927 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
3928 * linux-nat.c (linux_proc_pending_signals): Update.
3929 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
3930 (file_closer): Remove.
3931 * compile/compile.c (compile_to_object): Update.
3932 * common/filestuff.h (struct gdb_file_deleter): New.
3933 (gdb_file_up): New typedef.
3934 (gdb_fopen_cloexec): Change return type.
3935 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
3936 * cli/cli-dump.c (fopen_with_cleanup): Remove.
3937 (dump_binary_file, restore_binary_file): Update.
3938 * auto-load.c (auto_load_objfile_script_1): Update.
3939
3940 2017-08-03 Tom Tromey <tom@tromey.com>
3941
3942 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
3943 (info_static_tracepoint_markers_command): Likewise.
3944 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
3945 * skip.c (skip_info): Use ui_out_emit_table.
3946 * progspace.c (print_program_space): Use ui_out_emit_table.
3947 * osdata.c (info_osdata): Use ui_out_emit_table.
3948 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
3949 ui_out_emit_table.
3950 * linux-thread-db.c (info_auto_load_libthread_db): Use
3951 ui_out_emit_table.
3952 * inferior.c (print_inferior): Use ui_out_emit_table.
3953 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
3954 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
3955 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
3956 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
3957 * ui-out.h (class ui_out_emit_table): New.
3958
3959 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
3960
3961 * mips-tdep.c (mips_fpu_type_str): New function.
3962 (mips_dump_tdep): Call it.
3963
3964 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
3965
3966 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
3967 `->mips_fpu_type'.
3968
3969 2017-07-31 Xavier Roirand <roirand@adacore.com>
3970
3971 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
3972
3973 2017-07-27 Xavier Roirand <roirand@adacore.com>
3974
3975 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
3976
3977 2017-07-26 Yao Qi <yao.qi@linaro.org>
3978
3979 * cli/cli-cmds.c (maintenancechecklist): New variable.
3980 * gdbcmd.h (maintenancechecklist): Declare it.
3981 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
3982 Call i386_linux_read_description with different masks.
3983 * maint.c (maintenance_check_command): New function.
3984 (_initialize_maint_cmds): Call add_prefix_cmd.
3985 * target-descriptions.c (tdesc_reg): override operator != and ==.
3986 (tdesc_type): Likewise.
3987 (tdesc_feature): Likewise.
3988 (target_desc): Likewise.
3989 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
3990 (maintenance_check_xml_descriptions): New function.
3991 (_initialize_target_descriptions) Add command "xml-descriptions".
3992 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
3993
3994 2017-07-26 Yao Qi <yao.qi@linaro.org>
3995
3996 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
3997 Include features/i386/32bit-*.c.
3998 (i386_linux_read_description): Generate target description if it
3999 doesn't exist.
4000 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
4001 functions.
4002 * features/i386/32bit-linux.c: Re-generated.
4003 * features/i386/32bit-sse.c: Likewise.
4004 * target-descriptions.c (print_c_feature::visit): Print code to
4005 set register number if needed.
4006 (print_c_feature) <m_next_regnum>: New field.
4007
4008 2017-07-26 Yao Qi <yao.qi@linaro.org>
4009
4010 * features/Makefile (CFILES): Rename with TDESC_CFILES.
4011 (FEATURE_XMLFILES): New.
4012 (FEATURE_CFILES): New.
4013 New rules.
4014 (clean-cfiles): Remove generated c files.
4015 * features/i386/32bit-avx.c: Generated.
4016 * features/i386/32bit-avx512.c: Generated.
4017 * features/i386/32bit-core.c: Generated.
4018 * features/i386/32bit-linux.c: Generated.
4019 * features/i386/32bit-mpx.c: Generated.
4020 * features/i386/32bit-pkeys.c: Generated.
4021 * features/i386/32bit-sse.c: Generated.
4022 * target-descriptions.c: Include algorithm.
4023 (tdesc_element_visitor): Add method visit_end.
4024 (print_c_tdesc): Implement visit_end.
4025 (print_c_tdesc:: m_filename_after_features): Move it to
4026 protected.
4027 (print_c_feature): New class.
4028 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
4029 name starts with "i386/32bit-".
4030
4031 2017-07-26 Yao Qi <yao.qi@linaro.org>
4032
4033 * target-descriptions.c (tdesc_element_visitor): New class.
4034 (tdesc_element): New class.
4035 (tdesc_reg): Inherit from tdesc_element.
4036 (tdesc_reg::accept): New function.
4037 (tdesc_type): Inherit from tdesc_element.
4038 (tdesc_type::accept): New function.
4039 (tdesc_feature): Inherit from tdesc_element.
4040 (tdesc_feature::accept): New function.
4041 (target_desc): Inherit from tdesc_element.
4042 (target_desc::target_desc): New.
4043 (target_desc::~target_desc): New.
4044 (target_desc::accept): New.
4045 (allocate_target_description): Use new.
4046 (free_target_description): Use delete.
4047 (print_c_tdesc): New class.
4048 (maint_print_c_tdesc_cmd): Adjust.
4049
4050 * features/aarch64.c: Re-generated.
4051 * features/arc-arcompact.c: Re-generated.
4052 * features/arc-v2.c: Re-generated.
4053 * features/arm/arm-with-iwmmxt.c: Re-generated.
4054 * features/arm/arm-with-m.c: Re-generated.
4055 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4056 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4057 * features/arm/arm-with-neon.c: Re-generated.
4058 * features/arm/arm-with-vfpv2.c: Re-generated.
4059 * features/arm/arm-with-vfpv3.c: Re-generated.
4060 * features/i386/amd64-avx-avx512.c: Re-generated.
4061 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4062 * features/i386/amd64-avx.c: Re-generated.
4063 * features/i386/amd64-avx-linux.c: Re-generated.
4064 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4065 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4066 * features/i386/amd64-avx-mpx.c: Re-generated.
4067 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4068 * features/i386/amd64.c: Re-generated.
4069 * features/i386/amd64-linux.c: Re-generated.
4070 * features/i386/amd64-mpx.c: Re-generated.
4071 * features/i386/amd64-mpx-linux.c: Re-generated.
4072 * features/i386/i386-avx-avx512.c: Re-generated.
4073 * features/i386/i386-avx-avx512-linux.c: Re-generated.
4074 * features/i386/i386-avx.c: Re-generated.
4075 * features/i386/i386-avx-linux.c: Re-generated.
4076 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4077 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4078 * features/i386/i386-avx-mpx.c: Re-generated.
4079 * features/i386/i386-avx-mpx-linux.c: Re-generated.
4080 * features/i386/i386.c: Re-generated.
4081 * features/i386/i386-linux.c: Re-generated.
4082 * features/i386/i386-mmx.c: Re-generated.
4083 * features/i386/i386-mmx-linux.c: Re-generated.
4084 * features/i386/i386-mpx.c: Re-generated.
4085 * features/i386/i386-mpx-linux.c: Re-generated.
4086 * features/i386/x32-avx-avx512.c: Re-generated.
4087 * features/i386/x32-avx-avx512-linux.c: Re-generated.
4088 * features/i386/x32-avx.c: Re-generated.
4089 * features/i386/x32-avx-linux.c: Re-generated.
4090 * features/i386/x32.c: Re-generated.
4091 * features/i386/x32-linux.c: Re-generated.
4092 * features/microblaze.c: Re-generated.
4093 * features/microblaze-with-stack-protect.c: Re-generated.
4094 * features/mips64-dsp-linux.c: Re-generated.
4095 * features/mips64-linux.c: Re-generated.
4096 * features/mips-dsp-linux.c: Re-generated.
4097 * features/mips-linux.c: Re-generated.
4098 * features/nds32.c: Re-generated.
4099 * features/nios2.c: Re-generated.
4100 * features/nios2-linux.c: Re-generated.
4101 * features/rs6000/powerpc-32.c: Re-generated.
4102 * features/rs6000/powerpc-32l.c: Re-generated.
4103 * features/rs6000/powerpc-403.c: Re-generated.
4104 * features/rs6000/powerpc-403gc.c : Re-generated.
4105 * features/rs6000/powerpc-405.c: Re-generated.
4106 * features/rs6000/powerpc-505.c: Re-generated.
4107 * features/rs6000/powerpc-601.c: Re-generated.
4108 * features/rs6000/powerpc-602.c: Re-generated.
4109 * features/rs6000/powerpc-603.c: Re-generated.
4110 * features/rs6000/powerpc-604.c: Re-generated.
4111 * features/rs6000/powerpc-64.c: Re-generated.
4112 * features/rs6000/powerpc-64l.c: Re-generated.
4113 * features/rs6000/powerpc-7400.c: Re-generated.
4114 * features/rs6000/powerpc-750.c: Re-generated.
4115 * features/rs6000/powerpc-860.c: Re-generated.
4116 * features/rs6000/powerpc-altivec32.c: Re-generated.
4117 * features/rs6000/powerpc-altivec32l.c: Re-generated.
4118 * features/rs6000/powerpc-altivec64.c: Re-generated.
4119 * features/rs6000/powerpc-altivec64l.c: Re-generated.
4120 * features/rs6000/powerpc-cell32l.c: Re-generated.
4121 * features/rs6000/powerpc-cell64l.c: Re-generated.
4122 * features/rs6000/powerpc-e500.c: Re-generated.
4123 * features/rs6000/powerpc-e500l.c: Re-generated.
4124 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4125 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4126 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4127 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4128 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
4129 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
4130 * features/rs6000/powerpc-vsx32.c: Re-generated.
4131 * features/rs6000/powerpc-vsx32l.c: Re-generated.
4132 * features/rs6000/powerpc-vsx64.c: Re-generated.
4133 * features/rs6000/powerpc-vsx64l.c: Re-generated.
4134 * features/rs6000/rs6000.c: Re-generated.
4135 * features/s390-linux32.c: Re-generated.
4136 * features/s390-linux32v1.c: Re-generated.
4137 * features/s390-linux32v2.c: Re-generated.
4138 * features/s390-linux64.c: Re-generated.
4139 * features/s390-linux64v1.c: Re-generated.
4140 * features/s390-linux64v2.c: Re-generated.
4141 * features/s390-te-linux64.c: Re-generated.
4142 * features/s390-tevx-linux64.c: Re-generated.
4143 * features/s390-vx-linux64.c: Re-generated.
4144 * features/s390x-linux64.c: Re-generated.
4145 * features/s390x-linux64v1.c: Re-generated.
4146 * features/s390x-linux64v2.c: Re-generated.
4147 * features/s390x-te-linux64.c: Re-generated.
4148 * features/s390x-tevx-linux64.c: Re-generated.
4149 * features/s390x-vx-linux64.c: Re-generated.
4150 * features/sparc/sparc32-solaris.c: Re-generated.
4151 * features/sparc/sparc64-solaris.c: Re-generated.
4152 * features/tic6x-c62x.c: Re-generated.
4153 * features/tic6x-c62x-linux.c: Re-generated.
4154 * features/tic6x-c64x.c: Re-generated.
4155 * features/tic6x-c64x-linux.c: Re-generated.
4156 * features/tic6x-c64xp.c: Re-generated.
4157 * features/tic6x-c64xp-linux.c: Re-generated.
4158
4159 2017-07-26 Yao Qi <yao.qi@linaro.org>
4160
4161 * i386-linux-tdep.c (i386_linux_read_description): New function.
4162 (i386_linux_core_read_description): Call
4163 i386_linux_read_description.
4164 * i386-linux-tdep.h (i386_linux_read_description): Declare.
4165 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
4166 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
4167 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
4168 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
4169 * x86-linux-nat.c (x86_linux_read_description): Call
4170 i386_linux_read_description.
4171
4172 2017-07-26 Yao Qi <yao.qi@linaro.org>
4173
4174 * NEWS: Mention it.
4175 * features/Makefile (%.c: %.xml): Pass the xml file name to
4176 command "maint print c-tdesc".
4177 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4178 name from 'arg'.
4179
4180 2017-07-26 Yao Qi <yao.qi@linaro.org>
4181
4182 * target-descriptions.c (target_desc): Add ctor and dtor. Do
4183 in-class initialization.
4184 (tdesc_create_feature): Call new instead of XCNEW.
4185 (free_target_description): Ue delete.
4186
4187 2017-07-25 John Baldwin <jhb@FreeBSD.org>
4188
4189 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4190
4191 2017-07-25 Yao Qi <yao.qi@linaro.org>
4192
4193 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4194 constant.
4195 (amd64_x32_init_abi): Likewise.
4196 * amd64-tdep.h (amd64_init_abi): Update declaration.
4197 (amd64_x32_init_abi): Likewise.
4198
4199 2017-07-25 Yao Qi <yao.qi@linaro.org>
4200
4201 PR tdep/21717
4202 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4203 condition for FPSCR.
4204 (arm_linux_store_inferior_registers): Likewise.
4205
4206 2017-07-22 Tom Tromey <tom@tromey.com>
4207
4208 * break-catch-syscall.c (struct catch_syscall_inferior_data)
4209 <syscalls_counts>: Now a std::vector.
4210 (get_catch_syscall_inferior_data): Use "new".
4211 (catch_syscall_inferior_data_cleanup): Use "delete".
4212 (insert_catch_syscall, remove_catch_syscall)
4213 (clear_syscall_counts): Update.
4214
4215 2017-07-22 Tom Tromey <tom@tromey.com>
4216
4217 * break-catch-syscall.c (syscall_catchpoint)
4218 <syscalls_to_be_caught>: Now a std::vector<int>
4219 (~syscall_catchpoint): Remove.
4220 (insert_catch_syscall, remove_catch_syscall)
4221 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4222 (print_mention_catch_syscall, print_recreate_catch_syscall):
4223 Update.
4224 (create_syscall_event_catchpoint): Change type of "filter"
4225 parameter.
4226 (catch_syscall_split_args): Return a std::vector.
4227 (catch_syscall_command_1, catching_syscall_number_1): Update.
4228
4229 2017-07-22 Tom Tromey <tom@tromey.com>
4230
4231 * break-catch-throw.c (struct exception_catchpoint)
4232 <exception_rx>: Now a std::string.
4233 (~exception_catchpoint): Remove.
4234 (print_one_detail_exception_catchpoint): Update.
4235 (handle_gnu_v3_exceptions): Change type of except_rx.
4236 (extract_exception_regexp): Return a std::string.
4237 (catch_exception_command_1): Update.
4238
4239 2017-07-22 Tom Tromey <tom@tromey.com>
4240
4241 * break-catch-sig.c (gdb_signal_type): Remove typedef.
4242 (struct signal_catchpoint) <signals_to_be_caught>: Now a
4243 std::vector.
4244 <catch_all>: Now a bool.
4245 (~signal_catchpoint): Remove.
4246 (signal_catchpoint_insert_location)
4247 (signal_catchpoint_remove_location)
4248 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
4249 (signal_catchpoint_print_mention)
4250 (signal_catchpoint_print_recreate)
4251 (signal_catchpoint_explains_signal): Update.
4252 (create_signal_catchpoint): Change type of "filter" and
4253 "catch_all".
4254 (catch_signal_split_args): Return a std::vector. Change type of
4255 "catch_all".
4256 (catch_signal_command): Update.
4257
4258 2017-07-20 Pedro Alves <palves@redhat.com>
4259
4260 * ada-lang.c (ada_language_defn): Make extern.
4261 (_initialize_ada_language): Remove add_language call.
4262 * c-lang.c (c_language_defn, cplus_language_defn)
4263 (asm_language_defn, minimal_language_defn): Make extern.
4264 (_initialize_c_language): Delete.
4265 * completer.c (compare_cstrings): Delete, moved to utils.h.
4266 * d-lang.c (d_language_defn): Make extern.
4267 (_initialize_d_language): Remove add_language calls.
4268 * defs.h (enum language): Add comment.
4269 * f-lang.c (f_language_defn): Make extern.
4270 (_initialize_f_language): Remove add_language call.
4271 * go-lang.c (go_language_defn): Make extern.
4272 (_initialize_go_language): Remove add_language call.
4273 * language.c: Include <algorithm>.
4274 (languages): Redefine as const array.
4275 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
4276 (set_language_command): Handle "local". Use for-range loop.
4277 (set_language): Remove loop.
4278 (language_enum): Rewrite.
4279 (language_def, language_str): Remove loops.
4280 (add_language): Delete.
4281 (add_set_language_command): New, based on add_languages.
4282 (skip_language_trampoline): Adjust.
4283 (local_language_defn): Delete.
4284 (language_gdbarch_post_init): Adjust.
4285 (_initialize_language): Remove add_language calls. Call
4286 add_set_language_command.
4287 * language.h (add_language): Delete.
4288 (auto_language_defn)
4289 (unknown_language_defn, minimal_language_defn, ada_language_defn)
4290 (asm_language_defn, c_language_defn, cplus_language_defn)
4291 (d_language_defn, f_language_defn, go_language_defn)
4292 (m2_language_defn, objc_language_defn, opencl_language_defn)
4293 (pascal_language_defn, rust_language_defn): Declare.
4294 * m2-lang.c (m2_language_defn): Make extern.
4295 (_initialize_m2_language): Remove add_language call.
4296 * objc-lang.c (objc_language_defn): Make extern.
4297 (_initialize_objc_language): Remove add_language call.
4298 * opencl-lang.c (opencl_language_defn): Make extern.
4299 (_initialize_opencl_language): Remove add_language call.
4300 * p-lang.c (pascal_language_defn): Make extern.
4301 (_initialize_pascal_language): Delete.
4302 * rust-lang.c (rust_language_defn): Make extern.
4303 (_initialize_rust_language): Delete.
4304 * utils.h (compare_cstrings): New static inline function.
4305
4306 2017-07-20 Pedro Alves <palves@redhat.com>
4307
4308 * ada-lang.c (ada_to_fixed_type_1): Adjust.
4309 (get_var_value): Constify parameters.
4310 (get_int_var_value): Change prototype.
4311 (to_fixed_range_type): Adjust.
4312 * ada-lang.h (get_int_var_value): Change prototype.
4313
4314 2017-07-20 Pedro Alves <palves@redhat.com>
4315
4316 * dwarf2read.c (dw2_lookup_symbol): Use
4317 SYMBOL_MATCHES_SEARCH_NAME.
4318 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
4319
4320 2017-07-20 Pedro Alves <palves@redhat.com>
4321
4322 * block.c (block_iter_name_step, block_iter_name_first)
4323 (block_iter_name_next): Delete.
4324 (block_lookup_symbol_primary): Adjust to use
4325 dict_iter_match_first/dict_iter_match_next.
4326 * block.h (block_iter_name_first, block_iter_name_next): Delete
4327 declarations.
4328 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
4329 dict_iter_match_first/dict_iter_match_next.
4330
4331 2017-07-20 Pedro Alves <palves@redhat.com>
4332
4333 * cp-support.c (cp_find_first_component_aux): Add missing case for
4334 end of string.
4335
4336 2017-07-18 David Blaikie <dblaikie@gmail.com>
4337
4338 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
4339 of dwo_cu's dwo_file.
4340
4341 2017-07-18 Yao Qi <yao.qi@linaro.org>
4342
4343 * remote.c (store_registers_using_G): Remove one line comment.
4344
4345 2017-07-18 Yao Qi <yao.qi@linaro.org>
4346
4347 * regcache.c (regcache_cpy): Simplify it.
4348 (regcache::cpy_no_passthrough): Remove it.
4349 * regcache.h (cpy_no_passthrough): Remove it.
4350 (regcache_dup, regcache_cpy): Update comments.
4351
4352 2017-07-18 Pedro Alves <palves@redhat.com>
4353
4354 * remote-sim.c (sim_command_completer): Adjust to work with a
4355 completion_tracker instead of a VEC.
4356
4357 2017-07-17 Pedro Alves <palves@redhat.com>
4358
4359 * completer.c (complete_source_filenames): New function.
4360 (complete_address_and_linespec_locations): New function.
4361 (location_completer): Use complete_address_and_linespec_locations.
4362 (completion_tracker::build_completion_result): Honor the tracker's
4363 request to suppress append.
4364 * completer.h (completion_tracker::suppress_append_ws)
4365 (completion_tracker::set_suppress_append_ws): New methods.
4366 (completion_tracker::m_suppress_append_ws): New field.
4367 (complete_source_filenames): New declaration.
4368 * linespec.c (linespec_complete_what): New.
4369 (struct ls_parser) <complete_what, completion_word,
4370 completion_quote_char, completion_quote_end, completion_tracker>:
4371 New fields.
4372 (string_find_incomplete_keyword_at_end): New.
4373 (linespec_lexer_lex_string): Record quote char. If in completion
4374 mode, don't throw.
4375 (linespec_lexer_consume_token): Advance the completion word point.
4376 (linespec_lexer_peek_token): Save/restore completion info.
4377 (save_stream_and_consume_token): New.
4378 (set_completion_after_number): New.
4379 (linespec_parse_basic): Set what to complete next depending on
4380 token. Handle function and label completions specially.
4381 (parse_linespec): Disable objc shortcut in completion mode. Set
4382 what to complete next depending on token type. Skip keyword if in
4383 completion mode.
4384 (complete_linespec_component, linespec_complete): New.
4385 * linespec.h (linespec_complete): Declare.
4386
4387 2017-07-17 Pedro Alves <palves@redhat.com>
4388
4389 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
4390 Handle 'operator<' / 'operator<<'.
4391
4392 2017-07-17 Pedro Alves <palves@redhat.com>
4393
4394 * completer.c (collect_explicit_location_matches): Handle
4395 MATCH_LABEL.
4396 (convert_explicit_location_to_linespec): New, factored out from
4397 ...
4398 (convert_explicit_location_to_sals): ... this.
4399 (complete_label): New.
4400 (linespec_complete_label, find_label_symbols_in_block): New.
4401 (find_label_symbols): Add completion_mode parameter and adjust to
4402 call find_label_symbols_in_block.
4403 * linespec.h (linespec_complete_label): Declare.
4404
4405 2017-07-17 Pedro Alves <palves@redhat.com>
4406
4407 * ada-lang.c (ada_collect_symbol_completion_matches): Add
4408 complete_symbol_mode parameter.
4409 * cli/cli-cmds.c (complete_command): Get the completion result out
4410 of the handle_brkchars tracker if used a custom word point.
4411 * completer.c: Include "linespec.h".
4412 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
4413 (advance_to_expression_complete_word_point): New.
4414 (completion_tracker::completes_to_completion_word): New.
4415 (complete_files_symbols): Pass down
4416 complete_symbol_mode::EXPRESSION.
4417 (explicit_options, probe_options): New.
4418 (collect_explicit_location_matches): Complete on the
4419 explictit_loc->foo instead of word. Use
4420 linespec_complete_function. Handle MATCH_LINE. Handle offering
4421 keyword and options completions.
4422 (backup_text_ptr): Delete.
4423 (skip_keyword): New.
4424 (complete_explicit_location): Remove 'word' parameter. Add
4425 language, quoted_arg_start and quoted_arg_end parameters.
4426 Rewrite, parsing left to right.
4427 (location_completer): Rewrite.
4428 (location_completer_handle_brkchars): New function.
4429 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
4430 (enum complete_line_internal_reason): Adjust comments.
4431 (completion_tracker::discard_completions): New.
4432 (completer_handle_brkchars_func_for_completer): Handle
4433 location_completer.
4434 (gdb_custom_word_point_brkchars)
4435 (gdb_org_rl_basic_quote_characters): New.
4436 (gdb_completion_word_break_characters_throw)
4437 (completion_find_completion_word): Handle trackers that use a
4438 custom word point.
4439 (completion_tracker::advance_custom_word_point_by): New.
4440 (completion_tracker::build_completion_result): Don't rely on
4441 readline appending the quote char.
4442 (gdb_rl_attempted_completion_function_throw): Handle trackers that
4443 use a custom word point.
4444 (gdb_rl_attempted_completion_function): Restore
4445 rl_basic_quote_characters.
4446 * completer.h (class completion_tracker): Extend intro comment.
4447 (completion_tracker::set_quote_char)
4448 (completion_tracker::quote_char)
4449 (completion_tracker::set_use_custom_word_point)
4450 (completion_tracker::use_custom_word_point)
4451 (completion_tracker::custom_word_point)
4452 (completion_tracker::set_custom_word_point)
4453 (completion_tracker::advance_custom_word_point_by)
4454 (completion_tracker::completes_to_completion_word)
4455 (completion_tracker::discard_completions): New methods.
4456 (completion_tracker::m_quote_char)
4457 (completion_tracker::m_use_custom_word_point)
4458 (completion_tracker::m_custom_word_point): New fields.
4459 (advance_to_expression_complete_word_point): Declare.
4460 * f-lang.c (f_collect_symbol_completion_matches): Add
4461 complete_symbol_mode parameter.
4462 * language.h (struct language_defn)
4463 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
4464 parameter.
4465 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
4466 (linespec_complete_function): New function.
4467 (linespec_lexer_lex_keyword): Adjust.
4468 * linespec.h (linespec_keywords, linespec_complete_function): New
4469 declarations.
4470 * location.c (find_end_quote): New function.
4471 (explicit_location_lex_one): Add explicit_completion_info
4472 parameter. Save quoting info. Don't throw if being called for
4473 completion. Don't handle Ada operators here.
4474 (is_cp_operator, skip_op_false_positives, first_of)
4475 (explicit_location_lex_one_function): New function.
4476 (string_to_explicit_location): Replace 'dont_throw' parameter with
4477 an explicit_completion_info pointer parameter. Handle it. Don't
4478 use explicit_location_lex_one to lex function names. Use
4479 explicit_location_lex_one_function instead.
4480 * location.h (struct explicit_completion_info): New.
4481 (string_to_explicit_location): Replace 'dont_throw' parameter with
4482 an explicit_completion_info pointer parameter.
4483 * symtab.c (default_collect_symbol_completion_matches_break_on):
4484 Add complete_symbol_mode parameter. Handle LINESPEC mode.
4485 (default_collect_symbol_completion_matches)
4486 (collect_symbol_completion_matches): Add complete_symbol_mode
4487 parameter.
4488 (collect_symbol_completion_matches_type): Pass down
4489 complete_symbol_mode::EXPRESSION.
4490 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4491 parameter. Handle LINESPEC mode.
4492 * symtab.h (complete_symbol_mode): New.
4493 (default_collect_symbol_completion_matches_break_on)
4494 (default_collect_symbol_completion_matches)
4495 (collect_symbol_completion_matches)
4496 (collect_file_symbol_completion_matches): Add complete_symbol_mode
4497 parameter.
4498
4499 2017-07-17 Pedro Alves <palves@redhat.com>
4500
4501 * utils.c (enum class strncmp_iw_mode): New.
4502 (strcmp_iw): Rename to ...
4503 (strncmp_iw_with_mode): ... this. Add string2_len and mode
4504 parameters. Handle them.
4505 (strncmp_iw): New.
4506 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
4507 * utils.h (strncmp_iw): Declare.
4508 (strcmp_iw): Move describing comments here.
4509
4510 2017-07-17 Pedro Alves <palves@redhat.com>
4511
4512 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
4513 CP_OPERATOR_STR.
4514 * c-typeprint.c (is_type_conversion_operator): Use
4515 CP_OPERATOR_STR.
4516 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
4517 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
4518 CP_OPERATOR_LEN.
4519 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
4520 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
4521 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
4522 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
4523 CP_OPERATOR_STR.
4524 * location.c: Include "cp-support.h".
4525 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
4526 CP_OPERATOR_STR.
4527 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
4528 CP_OPERATOR_LEN.
4529
4530 2017-07-17 Pedro Alves <palves@redhat.com>
4531
4532 * cli/cli-cmds.c (complete_command): Use a completion tracker
4533 along with completion_find_completion_word for handle_brkchars
4534 phase.
4535 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
4536 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
4537 (struct gdb_rl_completion_word_info): New.
4538 (gdb_rl_find_completion_word): New.
4539 (completion_find_completion_word): New.
4540 * completer.h (completion_find_completion_word): Declare.
4541
4542 2017-07-17 Pedro Alves <palves@redhat.com>
4543
4544 * ada-lang.c (symbol_completion_match): Adjust comments.
4545 (symbol_completion_add): Replace vector parameter with
4546 completion_tracker parameter. Use it.
4547 (ada_make_symbol_completion_list): Rename to...
4548 (ada_collect_symbol_completion_matches): ... this. Add
4549 completion_tracker parameter and use it.
4550 (ada_language_defn): Adjust.
4551 * break-catch-syscall.c (catch_syscall_completer): Adjust
4552 prototype and work with completion_tracker instead of VEC.
4553 * breakpoint.c (condition_completer): Adjust prototype and work
4554 with completion_tracker instead of VEC.
4555 * c-lang.c (c_language_defn, cplus_language_defn)
4556 (asm_language_defn, minimal_language_defn): Adjust to renames.
4557 * cli/cli-cmds.c (complete_command): Rework using
4558 completion_tracker. Catch exceptions when completing.
4559 * cli/cli-decode.c (integer_unlimited_completer)
4560 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
4561 with completion_tracker instead of VEC.
4562 * command.h (struct completion_tracker): Forward declare.
4563 (completer_ftype, completer_handle_brkchars_ftype): Change
4564 types.
4565 (complete_on_cmdlist, complete_on_enum): Adjust.
4566 * completer.c: Include <algorithm>.
4567 (struct gdb_completer_state): New.
4568 (current_completion): New global.
4569 (readline_line_completion_function): Delete.
4570 (noop_completer, filename_completer)
4571 (filename_completer_handle_brkchars, complete_files_symbols)
4572 (linespec_location_completer): Adjust to work with a
4573 completion_tracker instead of a VEC.
4574 (string_or_empty): New.
4575 (collect_explicit_location_matches): Adjust to work with a
4576 completion_tracker instead of a VEC.
4577 (explicit_location_completer): Rename to ...
4578 (complete_explicit_location): ... this and adjust to work with a
4579 completion_tracker instead of a VEC.
4580 (location_completer): Adjust to work with a completion_tracker
4581 instead of a VEC.
4582 (add_struct_fields): Adjust to work with a completion_list instead
4583 of VEC.
4584 (expression_completer): Rename to ...
4585 (complete_expression): ... this and adjust to work with a
4586 completion_tracker instead of a VEC. Use complete_files_symbols.
4587 (expression_completer): Reimplement on top of complete_expression.
4588 (symbol_completer): Adjust to work with a completion_tracker
4589 instead of a VEC.
4590 (enum complete_line_internal_reason): Add describing comments.
4591 (complete_line_internal_normal_command): Adjust to work with a
4592 completion_tracker instead of a VEC.
4593 (complete_line_internal): Rename to ...
4594 (complete_line_internal_1): ... this and adjust to work with a
4595 completion_tracker instead of a VEC. Assert TEXT is NULL in the
4596 handle_brkchars phase.
4597 (new_completion_tracker): Delete.
4598 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
4599 complete_line_internal_1.
4600 (free_completion_tracker): Delete.
4601 (INITIAL_COMPLETION_HTAB_SIZE): New.
4602 (completion_tracker::completion_tracker)
4603 (completion_tracker::~completion_tracker): New.
4604 (maybe_add_completion): Delete.
4605 (completion_tracker::maybe_add_completion)
4606 (completion_tracker::add_completion)
4607 (completion_tracker::add_completions): New.
4608 (throw_max_completions_reached_error): Delete.
4609 (complete_line): Adjust to work with a completion_tracker instead
4610 of a VEC. Don't create a completion_tracker_t or check for max
4611 completions here.
4612 (command_completer, command_completer_handle_brkchars)
4613 (signal_completer, reg_or_group_completer_1)
4614 (reg_or_group_completer, default_completer_handle_brkchars):
4615 Adjust to work with a completion_tracker.
4616 (gdb_completion_word_break_characters_throw): New.
4617 (gdb_completion_word_break_characters): Reimplement.
4618 (line_completion_function): Delete.
4619 (completion_tracker::recompute_lowest_common_denominator)
4620 (expand_preserving_ws)
4621 (completion_tracker::build_completion_result)
4622 (completion_result::completion_result)
4623 (completion_result::completion_result)
4624 (completion_result::~completion_result)
4625 (completion_result::completion_result)
4626 (completion_result::release_match_list, compare_cstrings)
4627 (completion_result::sort_match_list)
4628 (completion_result::reset_match_list)
4629 (gdb_rl_attempted_completion_function_throw)
4630 (gdb_rl_attempted_completion_function): New.
4631 * completer.h (completion_list, struct completion_result)
4632 (class completion_tracker): New.
4633 (complete_line): Add completion_tracker parameter.
4634 (readline_line_completion_function): Delete.
4635 (gdb_rl_attempted_completion_function): New.
4636 (noop_completer, filename_completer, expression_completer)
4637 (location_completer, symbol_completer, command_completer)
4638 (signal_completer, reg_or_group_completer): Update prototypes.
4639 (completion_tracker_t, new_completion_tracker)
4640 (make_cleanup_free_completion_tracker): Delete.
4641 (enum maybe_add_completion_enum): Delete.
4642 (maybe_add_completion): Delete.
4643 (throw_max_completions_reached_error): Delete.
4644 * corefile.c (complete_set_gnutarget): Adjust to work with a
4645 completion_tracker instead of a VEC.
4646 * cp-abi.c (cp_abi_completer): Adjust to work with a
4647 completion_tracker instead of a VEC.
4648 * d-lang.c (d_language_defn): Adjust.
4649 * disasm.c (disassembler_options_completer): Adjust to work with a
4650 completion_tracker instead of a VEC.
4651 * f-lang.c (f_make_symbol_completion_list): Rename to ...
4652 (f_collect_symbol_completion_matches): ... this. Adjust to work
4653 with a completion_tracker instead of a VEC.
4654 (f_language_defn): Adjust.
4655 * go-lang.c (go_language_defn): Adjust.
4656 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
4657 Adjust to work with a completion_tracker instead of a VEC.
4658 * infrun.c (handle_completer): Likewise.
4659 * interps.c (interpreter_completer): Likewise.
4660 * interps.h (interpreter_completer): Likewise.
4661 * language.c (unknown_language_defn, auto_language_defn)
4662 (local_language_defn): Adjust.
4663 * language.h (language_defn::la_make_symbol_completion_list):
4664 Rename to ...
4665 (language_defn::la_collect_symbol_completion_matches): ... this
4666 and adjust to work with a completion_tracker instead of a VEC.
4667 * m2-lang.c (m2_language_defn): Adjust.
4668 * objc-lang.c (objc_language_defn): Adjust.
4669 * opencl-lang.c (opencl_language_defn): Adjust.
4670 * p-lang.c (pascal_language_defn): Adjust.
4671 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
4672 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
4673 with a completion_tracker.
4674 * rust-lang.c (rust_language_defn): Adjust.
4675 * symtab.c (free_completion_list, do_free_completion_list)
4676 (return_val, completion_tracker): Delete.
4677 (completion_list_add_name, completion_list_add_symbol)
4678 (completion_list_add_msymbol, completion_list_objc_symbol)
4679 (completion_list_add_fields, add_symtab_completions): Add
4680 completion_tracker parameter and use it.
4681 (default_make_symbol_completion_list_break_on_1): Rename to...
4682 (default_collect_symbol_completion_matches_break_on): ... this.
4683 Add completion_tracker parameter and use it instead of allocating
4684 a completion tracker here.
4685 (default_make_symbol_completion_list_break_on): Delete old
4686 implementation.
4687 (default_make_symbol_completion_list): Delete.
4688 (default_collect_symbol_completion_matches): New.
4689 (make_symbol_completion_list): Delete.
4690 (collect_symbol_completion_matches): New.
4691 (make_symbol_completion_type): Rename to ...
4692 (collect_symbol_completion_matches_type): ... this. Add
4693 completion_tracker parameter and use it instead of VEC.
4694 (make_file_symbol_completion_list_1): Rename to...
4695 (collect_file_symbol_completion_matches): ... this. Add
4696 completion_tracker parameter and use it instead of VEC.
4697 (make_file_symbol_completion_list): Delete.
4698 (add_filename_to_list): Use completion_list instead of a VEC.
4699 (add_partial_filename_data::list): Now a completion_list.
4700 (make_source_files_completion_list): Work with a completion_list
4701 instead of a VEC.
4702 * symtab.h: Include "completer.h".
4703 (default_make_symbol_completion_list_break_on)
4704 (default_make_symbol_completion_list, make_symbol_completion_list)
4705 (make_symbol_completion_type, make_file_symbol_completion_list)
4706 (make_source_files_completion_list): Delete.
4707 (default_collect_symbol_completion_matches_break_on)
4708 (default_collect_symbol_completion_matches)
4709 (collect_symbol_completion_matches)
4710 (collect_symbol_completion_matches_type)
4711 (collect_file_symbol_completion_matches)
4712 (make_source_files_completion_list): New.
4713 * top.c (init_main): Don't install a rl_completion_entry_function
4714 hook. Install a rl_attempted_completion_function hook instead.
4715 * tui/tui-layout.c (layout_completer): Adjust to work with a
4716 completion_tracker.
4717 * tui/tui-regs.c (tui_reggroup_completer):
4718 * tui/tui-win.c (window_name_completer, focus_completer)
4719 (winheight_completer): Adjust to work with a completion_tracker.
4720 * value.c: Include "completer.h".
4721 (complete_internalvar): Adjust to work with a completion_tracker.
4722 * value.h (complete_internalvar): Likewise.
4723
4724 2017-07-17 Pedro Alves <palves@redhat.com>
4725
4726 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4727 renames.
4728 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4729 comments to completer_ftype's declaration.
4730 <completer_handle_brkchars>: Change type to
4731 completer_handle_brkchars_ftype.
4732 * command.h (completer_ftype): Add describing comment and give
4733 names to parameters.
4734 (completer_ftype_void): Rename to ...
4735 (completer_handle_brkchars_ftype) ... this. Add describing comment.
4736 (set_cmd_completer_handle_brkchars): Adjust.
4737 * completer.c (filename_completer_handle_brkchars): New function.
4738 (complete_line_internal_normal_command): New function, factored
4739 out from ...
4740 (complete_line_internal): ... here.
4741 (command_completer_handle_brkchars)
4742 (default_completer_handle_brkchars)
4743 (completer_handle_brkchars_func_for_completer): New functions.
4744 * completer.h (set_gdb_completion_word_break_characters): Delete
4745 declaration.
4746 (completer_handle_brkchars_func_for_completer): New declaration.
4747 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4748 completer_handle_brkchars_func_for_completer.
4749
4750 2017-07-17 Pedro Alves <palves@redhat.com>
4751
4752 * completer.c (symbol_completer): New function, based on
4753 make_symbol_completion_list_fn.
4754 * completer.h (symbol_completer): New declaration.
4755 * guile/scm-cmd.c (cmdscm_completers): Adjust.
4756 * python/py-cmd.c (completers): Adjust.
4757 * symtab.c (make_symbol_completion_list_fn): Delete.
4758 * symtab.h (make_symbol_completion_list_fn): Delete.
4759 * cli/cli-decode.c (add_cmd): Adjust.
4760
4761 2017-07-17 Pedro Alves <palves@redhat.com>
4762
4763 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4764 * dwarf2read.c: Include "filename-seen-cache.h".
4765 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
4766 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
4767 * filename-seen-cache.c: New file.
4768 * filename-seen-cache.h: New file.
4769 * symtab.c: Include "filename-seen-cache.h".
4770 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
4771 (create_filename_seen_cache, clear_filename_seen_cache)
4772 (delete_filename_seen_cache, filename_seen): Delete, parts moved
4773 to filename-seen-cache.h/filename-seen-cache.c.
4774 (output_source_filename, sources_info)
4775 (maybe_add_partial_symtab_filename)
4776 (make_source_files_completion_list): Adjust to use
4777 filename_seen_cache.
4778
4779 2017-07-17 Pedro Alves <palves@redhat.com>
4780
4781 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
4782 fields.
4783 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
4784 dwarf2_debug_sections*)): New.
4785 (dwarf2_per_objfile::dwarf2_per_objfile(const
4786 dwarf2_per_objfile&)): Declare as deleted.
4787 (dwarf2_per_objfile::operator=): Declare as deleted.
4788 (dwarf2_per_objfile::dwarf2_per_objfile)
4789 (dwarf2_per_objfile::~dwarf2_per_objfile)
4790 (dwarf2_per_objfile::free_cached_comp_units): New.
4791 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
4792 ctor. Call dwarf2_per_objfile's ctor manually.
4793 (dwarf2_locate_sections): Deleted/refactored as ...
4794 (dwarf2_per_objfile::locate_sections): ... this new method.
4795 (free_cached_comp_units): Defer to
4796 dwarf2_per_objfile::free_cached_comp_units.
4797 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
4798
4799 2017-07-14 Tom Tromey <tom@tromey.com>
4800
4801 PR rust/21764:
4802 * rust-exp.y (convert_ast_to_expression): Add "want_type"
4803 parameter.
4804 <UNOP_SIZEOF>: Split into separate case.
4805 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
4806
4807 2017-07-14 Tom Tromey <tom@tromey.com>
4808
4809 PR rust/21763:
4810 * symtab.c (symbol_matches_domain): Add language_rust to special
4811 case.
4812 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
4813 treat LOC_TYPEDEF symbols as variables.
4814
4815 2017-07-14 Pedro Alves <palves@redhat.com>
4816
4817 * symtab.c (make_file_symbol_completion_list_1): Iterate over
4818 symtabs matching all symtabs with SRCFILE as file name instead of
4819 only considering the first hit, with lookup_symtab.
4820
4821 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4822
4823 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
4824 operator_name parameters.
4825 (gen_expr): Update function call.
4826
4827 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4828
4829 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
4830 parameter.
4831 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
4832 Likewise.
4833 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
4834 parameter, use agent_expr::gdbarch instead, update function
4835 calls.
4836 (locexpr_tracepoint_var_ref): Likewise.
4837 (loclist_tracepoint_var_ref): Likewise.
4838 * ax-gdb.c (gen_trace_static_fields): Likewise.
4839 (gen_traced_pop): Likewise.
4840 (gen_frame_args_address): Likewise.
4841 (gen_frame_locals_address): Likewise.
4842 (gen_var_ref): Likewise.
4843 (gen_struct_ref_recursive): Likewise.
4844 (gen_static_field): Likewise.
4845 (gen_maybe_namespace_elt): Likewise.
4846 (gen_expr): Likewise.
4847 (gen_trace_for_var): Likewise.
4848 (gen_trace_for_expr): Likewise.
4849 (gen_trace_for_return_address): Likewise.
4850
4851 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4852
4853 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
4854 parameter.
4855 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
4856
4857 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
4858
4859 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
4860 from ax, update calls.
4861 (gen_usual_arithmetic): Likewise.
4862 (gen_integral_promotions): Likewise.
4863 (gen_bitfield_ref): Likewise.
4864 (gen_primitive_field): Likewise.
4865 (gen_struct_ref_recursive): Likewise.
4866 (gen_struct_ref): Likewise.
4867 (gen_maybe_namespace_elt): Likewise.
4868 (gen_struct_elt_for_reference): Likewise.
4869 (gen_namespace_elt): Likewise.
4870 (gen_aggregate_elt_ref): Likewise.
4871 (gen_expr): Get gdbarch from ax, update calls.
4872 (gen_expr_binop_rest): Likewise.
4873
4874 2017-07-13 Pedro Alves <palves@redhat.com>
4875
4876 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
4877 as default tdesc.
4878 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
4879 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
4880 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
4881 tdesc_amd64_linux as default tdesc. Get final tdesc from the
4882 tdep.
4883 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
4884 Get final tdesc from the tdep.
4885 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
4886 default tdesc.
4887 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4888 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4889 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
4890 Use it as default tdesc.
4891 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
4892 down to amd_init_abi. No longer handle fallback tdesc here.
4893 * amd64-tdep.h (tdesc_x32): Declare.
4894 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
4895 parameter.
4896 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
4897 as default tdesc.
4898
4899 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4900
4901 * s390-linux-tdep.c (s390_process_record): Add support for
4902 instructions new in arch12.
4903
4904 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4905
4906 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
4907 PT_GETFSBASE and PT_GETGSBASE.
4908 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
4909 PT_SETGSBASE.
4910
4911 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4912
4913 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
4914 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
4915 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
4916 those rules.
4917 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
4918 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
4919 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
4920 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
4921 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
4922 * features/i386/amd64.xml: Add 64bit-segments.xml.
4923 * features/i386/amd64-avx-avx512.c: Regenerated.
4924 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
4925 * features/i386/amd64-avx-mpx.c: Regenerated.
4926 * features/i386/amd64-avx.c: Regenerated.
4927 * features/i386/amd64-mpx.c: Regenerated.
4928 * features/i386/amd64.c: Regenerated.
4929 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
4930 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4931 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
4932 * regformats/i386/amd64-avx.dat: Regenerated.
4933 * regformats/i386/amd64-mpx.dat: Regenerated.
4934 * regformats/i386/amd64.dat: Regenerated.
4935
4936 2017-07-10 Yao Qi <yao.qi@linaro.org>
4937
4938 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4939 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4940
4941 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
4942
4943 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
4944 unsetenv.
4945 * gnulib/aclocal.m4: Regenerate.
4946 * gnulib/config.in: Regenerate.
4947 * gnulib/configure: Regenerate.
4948 * gnulib/import/Makefile.am: Regenerate.
4949 * gnulib/import/Makefile.in: Regenerate.
4950 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4951 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4952 * gnulib/import/m4/environ.m4: New file.
4953 * gnulib/import/m4/setenv.m4: New file.
4954 * gnulib/import/setenv.c: New file.
4955 * gnulib/import/unsetenv.c: New file.
4956
4957 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
4958
4959 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
4960 address when op is DW_OP_addr.
4961
4962 2017-07-09 Tom Tromey <tom@tromey.com>
4963
4964 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
4965 check and apply to outer type.
4966
4967 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4968
4969 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
4970 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
4971 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
4972 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
4973
4974 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4975
4976 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
4977
4978 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4979
4980 * corelow.c (get_core_siginfo): Remove.
4981 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
4982 instead of get_core_siginfo.
4983 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
4984 * gdbarch.h: Re-generate.
4985 * gdbarch.c: Re-generate.
4986 * linux-tdep.c (linux_core_xfer_siginfo): New.
4987 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
4988
4989 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4990
4991 * corelow.c (thread_section_name): Move to ...
4992 * gdbcore.h (thread_section_name): ... here.
4993
4994 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4995
4996 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
4997 (struct siginfo32): New.
4998 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
4999 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
5000 via ptrace(PT_LWPINFO).
5001
5002 2017-07-07 John Baldwin <jhb@FreeBSD.org>
5003
5004 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
5005 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
5006 (fbsd_get_siginfo_type): New.
5007 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
5008 (_initialize_fbsd_tdep): New.
5009
5010 2017-07-06 David Blaikie <dblaikie@gmail.com>
5011
5012 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
5013 a singular dwo_unit*) to support multiple CUs in the same way that
5014 multiple TUs are supported.
5015 (create_cus_hash_table): Replace create_dwo_cu with a function for
5016 parsing multiple CUs from a DWO file.
5017 (open_and_init_dwo_file): Use create_cus_hash_table rather than
5018 create_dwo_cu.
5019 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
5020 htab_find, rather than comparing the signature to a singleton CU in
5021 the dwo_file.
5022
5023 2017-07-06 Pedro Alves <palves@redhat.com>
5024
5025 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
5026
5027 2017-07-04 Pedro Alves <palves@redhat.com>
5028
5029 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
5030 * gdbtypes.h (TYPE_STATIC): Delete.
5031 (struct fn_field) <is_public, is_abstract, is_static, is_final,
5032 is_synchronized, is_native>: Delete.
5033 <dummy>: Bump.
5034 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
5035 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
5036 (TYPE_FN_FIELD_ABSTRACT): Delete.
5037
5038 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
5039
5040 * buffer.h (buffer_finish): Fix spelling mistakes.
5041
5042 2017-07-01 Eli Zaretskii <eliz@gnu.org>
5043
5044 * .dir-locals.el: Automatically switch to C-style comments in
5045 versions of Emacs that support the feature.
5046
5047 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5048 Pedro Alves <palves@redhat.com>
5049
5050 PR cli/21688
5051 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5052 (process_next_line): New variable 'inline_cmd'.
5053 Adjust 'if' clauses for "python", "compile" and "guile" to use
5054 'command_name_equals' and check for '!inline_cmd'.
5055
5056 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
5057
5058 PR cli/21688
5059 * cli/cli-script.c (command_name_equals_not_inline): New function.
5060 (process_next_line): Adjust 'if' clauses for "python", "compile"
5061 and "guile" to use command_name_equals_not_inline.
5062
5063 2017-06-29 Pedro Alves <palves@redhat.com>
5064
5065 * completer.c (expression_completer): Call
5066 linespec_location_completer instead of location_completer.
5067
5068 2017-06-29 Pedro Alves <palves@redhat.com>
5069
5070 * completer.c (expression_completer): Remove code that recomputes
5071 'text' from 'word'.
5072
5073 2017-06-29 Yao Qi <yao.qi@linaro.org>
5074
5075 * regformats/regdat.sh: Generate code with
5076 "ifndef IN_PROCESS_AGENT".
5077
5078 2017-06-28 Pedro Alves <palves@redhat.com>
5079
5080 * command.h: Include "common/scoped_restore.h".
5081
5082 2017-06-28 Yao Qi <yao.qi@linaro.org>
5083
5084 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5085 instead of obstack_grow.
5086
5087 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
5088
5089 PR gdb/21337
5090 * symfile.c (reread_symbols): Call objfiles_changed just before
5091 read_symbols.
5092
5093 2017-06-27 Pedro Alves <palves@redhat.com>
5094
5095 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5096 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5097 (completion_list_add_symbol, completion_list_add_msymbol):
5098 ... these new functions.
5099 (add_symtab_completions)
5100 (default_make_symbol_completion_list_break_on_1): Adjust.
5101
5102 2017-06-27 Pedro Alves <palves@redhat.com>
5103
5104 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5105 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
5106 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5107 dtor.
5108 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
5109 'storage_obstack' field an auto_obstack. In-class initialize all
5110 non-bitfield fields. Make minsyms_read bool.
5111 * symfile.c (read_symbols): Adjust.
5112
5113 2017-06-27 Alan Hayward <alan.hayward@arm.com>
5114
5115 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5116 (gdbsim_store_register): Likewise.
5117
5118 2017-06-27 Pedro Alves <palves@redhat.com>
5119
5120 * c-exp.y (name_obstack): Now an auto_obstack.
5121 (yylex): Use auto_obstack::clear.
5122 (c_parse): Use auto_obstack::clear instead of reinitializing and
5123 freeing the obstack.
5124 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5125 * d-exp.y (name_obstack): Now an auto_obstack.
5126 (yylex): Use auto_obstack::clear.
5127 (d_parse): Use auto_obstack::clear instead of reinitializing and
5128 freeing the obstack.
5129 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
5130 auto_obstack.
5131 * dwarf2read.c (create_addrmap_from_index)
5132 (dwarf2_build_psymtabs_hard)
5133 (update_enumeration_type_from_children): Likewise.
5134 * gdb_obstack.h (auto_obstack): New type.
5135 * go-exp.y (name_obstack): Now an auto_obstack.
5136 (build_packaged_name): Use auto_obstack::clear.
5137 (go_parse): Use auto_obstack::clear instead of reinitializing and
5138 freeing the obstack.
5139 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
5140 auto_obstack.
5141 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
5142 * rust-exp.y (work_obstack): Now an auto_obstack.
5143 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
5144 reinitializing and freeing the obstack.
5145 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
5146 (host_char_to_target): Use auto_obstack.
5147 * utils.h (make_cleanup_obstack_free): Delete declaration.
5148 * valprint.c (generic_emit_char, generic_printstr): Use
5149 auto_obstack.
5150
5151 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
5152
5153 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
5154 thread.
5155 (darwin_init_thread_list): Don't update dummy thread.
5156 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
5157
5158 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5159
5160 * record-full.c (netorder16): Remove.
5161
5162 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5163
5164 * common/diagnostics.h: Define macros for GCC.
5165 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
5166 * common/vec.h: Include diagnostics.h.
5167 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
5168 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
5169 warning.
5170
5171 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
5172
5173 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5174 New macro.
5175 * ada-lex.l: Ignore deprecated register warnings.
5176
5177 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5178
5179 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5180 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5181
5182 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5183
5184 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5185 its own line.
5186
5187 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
5188
5189 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5190
5191 2017-06-23 Alan Hayward <alan.hayward@arm.com>
5192
5193 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5194 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5195 (xtensa_register_read_masked): Likewise.
5196
5197 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
5198
5199 * common/environ.c (gdb_environ::unset): Update comment.
5200
5201 2017-06-22 Alan Hayward <alan.hayward@arm.com>
5202
5203 * python/py-unwind.c (pyuw_sniffer): Allocate space for
5204 registers.
5205
5206 2017-06-22 Alan Hayward <alan.hayward@arm.com>
5207
5208 * record-full.c (record_full_exec_insn): Use byte_vector.
5209
5210 2017-06-22 Yao Qi <yao.qi@linaro.org>
5211
5212 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5213 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5214
5215 2017-06-22 Alan Hayward <alan.hayward@arm.com>
5216
5217 * remote.c (cached_reg): Move from here...
5218 * regcache.h (cached_reg): ...to here.
5219 * python/py-unwind.c (struct reg_info): Remove.
5220 (cached_frame_info): Use cached_reg_t.
5221 (pyuw_prev_register): Likewise.
5222 (pyuw_sniffer): Use cached_reg_t and allocate registers.
5223 (pyuw_dealloc_cache): Free all registers.
5224
5225 2017-06-22 Pedro Alves <palves@redhat.com>
5226 Simon Marchi <simon.marchi@ericsson.com>
5227
5228 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5229 warning.
5230 * common/diagnostics.h: New file.
5231
5232 2017-06-22 Pedro Alves <palves@redhat.com>
5233
5234 * common/agent.h: Add include guards.
5235
5236 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
5237
5238 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
5239 talk about addressable units instead of bytes.
5240
5241 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5242
5243 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
5244 of '::const_iterator'.
5245
5246 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
5247
5248 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5249 'unittests/environ-selftests.c'.
5250 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
5251 * charset.c (find_charset_names): Declare object 'iconv_env'.
5252 Update code to use 'iconv_env' object. Remove call to
5253 'free_environ'.
5254 * common/environ.c: Include <utility>.
5255 (make_environ): Delete function.
5256 (free_environ): Delete function.
5257 (gdb_environ::clear): New function.
5258 (gdb_environ::operator=): New function.
5259 (gdb_environ::get): Likewise.
5260 (environ_vector): Delete function.
5261 (set_in_environ): Delete function.
5262 (gdb_environ::set): New function.
5263 (unset_in_environ): Delete function.
5264 (gdb_environ::unset): New function.
5265 (gdb_environ::envp): Likewise.
5266 * common/environ.h: Include <vector>.
5267 (struct gdb_environ): Delete; transform into...
5268 (class gdb_environ): ... this class.
5269 (free_environ): Delete prototype.
5270 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
5271 environ_vector): Likewise.
5272 * infcmd.c (run_command_1): Update code to call
5273 'envp' from 'gdb_environ' class.
5274 (environment_info): Update code to call methods from 'gdb_environ'
5275 class.
5276 (unset_environment_command): Likewise.
5277 (path_info): Likewise.
5278 (path_command): Likewise.
5279 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
5280 (inferior::inferior): Initialize 'environment' using the host's
5281 information.
5282 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
5283 Include "environ.h".
5284 (class inferior) <environment>: Change type from 'struct
5285 gdb_environ' to 'gdb_environ'.
5286 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
5287 methods from 'gdb_environ' class.
5288 * solib.c (solib_find_1): Likewise
5289 * unittests/environ-selftests.c: New file.
5290
5291 2017-06-20 Yao Qi <yao.qi@linaro.org>
5292
5293 * features/i386/i386-linux.xml: Exchange the order of including
5294 32bit-linux.xml and 32bit-sse.xml.
5295 * features/i386/i386-linux.c: Regenerated.
5296
5297 2017-06-20 Yao Qi <yao.qi@linaro.org>
5298
5299 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
5300 Delete copy ctor and assignment operator.
5301 (tdesc_type): Likewise.
5302 (tdesc_feature): Likewise.
5303 (tdesc_free_reg): Remove.
5304 (tdesc_create_reg): Use new.
5305 (tdesc_free_type): Remove.
5306 (tdesc_create_vector): Use new.
5307 (tdesc_create_union): Likewise.
5308 (tdesc_create_flags): Likewise.
5309 (tdesc_create_enum): Likewise.
5310 (tdesc_free_feature): Delete.
5311 (free_target_description): Use delete.
5312
5313 2017-06-19 John Baldwin <jhb@FreeBSD.org>
5314
5315 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
5316 registers.
5317
5318 2017-06-19 Pedro Alves <palves@redhat.com>
5319
5320 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
5321 after gdb::unlinker.
5322
5323 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
5324
5325 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
5326 gdb_environ to access an environment variable.
5327
5328 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
5329
5330 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
5331 gdb_byte*.
5332
5333 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5334
5335 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
5336
5337 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5338
5339 * configure: Re-generate.
5340 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
5341
5342 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5343
5344 * configure: Re-generate.
5345 * warning.m4: Pass -Werror to compiler when checking for
5346 supported warning flags.
5347
5348 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
5349
5350 * Makefile.in (COMPILE.pre): Add "-x c++".
5351
5352 2017-06-16 Alan Hayward <alan.hayward@arm.com>
5353 Pedro Alves <palves@redhat.com>
5354 Yao Qi <yao.qi@linaro.org>
5355
5356 * defs.h (RequireLongest): New.
5357 (extract_integer): Declare function template.
5358 (extract_signed_integer): Remove the declaration, but define it
5359 static inline.
5360 (extract_unsigned_integer): Likewise.
5361 (store_integer): Declare function template.
5362 (store_signed_integer): Remove the declaration, but define it
5363 static inline.
5364 (store_unsigned_integer): Likewise.
5365 * findvar.c (extract_integer): New function template.
5366 (extract_signed_integer): Remove.
5367 (extract_unsigned_integer): Remove.
5368 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
5369 instantiations.
5370 (store_integer): New function template.
5371 (store_signed_integer): Remove.
5372 (store_unsigned_integer): Remove.
5373 (store_integer): Explicit instantiations.
5374 * regcache.c (regcache_raw_read_signed): Update.
5375 (regcache::raw_read): New function.
5376 (regcache::raw_read_signed): Remove.
5377 (regcache::raw_read_unsigned): Remove.
5378 (regcache_raw_read_unsigned): Update.
5379 (regcache_raw_write_unsigned): Update.
5380 (regcache::raw_write_signed): Remove.
5381 (regcache::raw_write): New function.
5382 (regcache_cooked_read_signed): Update.
5383 (regcache::raw_write_unsigned): Remove.
5384 (regcache::cooked_read_signed): Remove.
5385 (regcache_cooked_read_unsigned): Update.
5386 (regcache::cooked_read_unsigned): Remove.
5387 (regcache_cooked_write_signed): Update.
5388 (regcache_cooked_write_unsigned): Update.
5389 * regcache.h (regcache) <raw_read_signed>: Remove.
5390 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
5391 <raw_read, raw_write>: New.
5392 <cooked_read_signed, cooked_write_signed>: Remove.
5393 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
5394 <cooked_read, cooked_write>: New.
5395 * sh64-tdep.c (sh64_pseudo_register_read): Update.
5396 (sh64_pseudo_register_write): Update.
5397
5398 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
5399
5400 * arc-tdep.c (arc_disassembler_options): New variable.
5401 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
5402 of default_print_insn.
5403 (arc_delayed_print_insn): Set info->section when needed,
5404 use default_print_insn to retrieve a disassembler.
5405
5406 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
5407
5408 PR gdb/21574
5409 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
5410 to mention $SHELL and startup-with-shell.
5411
5412 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
5413
5414 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
5415
5416 2017-06-14 Yao Qi <yao.qi@linaro.org>
5417
5418 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
5419 default_print_insn instead of print_insn_aarch64.
5420 * arm-tdep.c (gdb_print_insn_arm): Call
5421 default_print_insn instead of print_insn_big_arm
5422 and print_insn_little_arm.
5423 * i386-tdep.c (i386_print_insn): Call default_print_insn
5424 instead of print_insn_i386.
5425 * ia64-tdep.c (ia64_print_insn): Call
5426 default_print_insn instead of print_insn_ia64.
5427 * mips-tdep.c (gdb_print_insn_mips): Call
5428 default_print_insn instead of print_insn_big_mips
5429 and print_insn_little_mips.
5430 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
5431 instead of print_insn_spu.
5432
5433 2017-06-14 Pedro Alves <palves@redhat.com>
5434
5435 * ada-lang.c: Include "common/byte-vector.h".
5436 (ada_value_primitive_packed_val): Use gdb::byte_vector.
5437 * charset.c (wchar_iterator::iterate): Resize the vector instead
5438 of reserving it.
5439 * common/byte-vector.h: Include "common/def-vector.h".
5440 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
5441 * cli/cli-dump.c: Include "common/byte-vector.h".
5442 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
5443 * common/byte-vector.h: New file.
5444 * common/def-vector.h: New file.
5445 * common/default-init-alloc.h: New file.
5446 * dwarf2loc.c: Include "common/byte-vector.h".
5447 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
5448 instead of reserving it.
5449 * dwarf2read.c: Include "common/byte-vector.h".
5450 (data_buf::m_vec): Now a gdb::byte_vector.
5451 * gdb_regex.c: Include "common/def-vector.h".
5452 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
5453 * mi/mi-main.c: Include "common/byte-vector.h".
5454 (mi_cmd_data_read_memory): Use gdb::byte_vector.
5455 * printcmd.c: Include "common/byte-vector.h".
5456 (print_scalar_formatted): Use gdb::byte_vector.
5457 * valprint.c: Include "common/byte-vector.h".
5458 (maybe_negate_by_bytes, print_decimal_chars): Use
5459 gdb::byte_vector.
5460
5461 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5462
5463 * darwin-nat.c: Include "nat/fork-inferior.h".
5464
5465 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5466
5467 * configure.nat: Factor out Darwin bits that are not
5468 architecture-specific. Add fork-inferior.o.
5469
5470 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
5471
5472 * configure.nat: Factor out AIX bits that are not
5473 architecture-specific. Add fork-inferior.o.
5474
5475 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5476
5477 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
5478 (read_pieced_value, write_pieced_value): ...here. Reduce to
5479 wrappers that just call rw_pieced_value.
5480
5481 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5482
5483 * dwarf2loc.c (write_pieced_value): When writing the data for a
5484 memory piece, use write_memory_with_notification instead of
5485 write_memory.
5486
5487 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5488
5489 * valops.c (read_value_memory): Change embedded_offset to
5490 represent a bit offset instead of a byte offset.
5491 * value.h (read_value_memory): Adjust comment.
5492
5493 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5494
5495 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
5496 dest_offset_bits and source_offset_bits.
5497 (write_pieced_value): Likewise.
5498
5499 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5500
5501 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
5502 given by DW_OP_bit_piece.
5503 (write_pieced_value): Likewise.
5504
5505 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5506
5507 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
5508 some other preparations to the places where sufficient information
5509 is available.
5510 (write_pieced_value): Likewise.
5511
5512 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5513
5514 * dwarf2loc.c (bits_to_bytes): New function.
5515 (read_pieced_value): Fix offset calculations for register pieces
5516 on big-endian targets.
5517 (write_pieced_value): Likewise.
5518
5519 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5520
5521 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
5522 (write_pieced_value): Likewise.
5523
5524 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5525
5526 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
5527 transfer the source value's least significant bits, instead of its
5528 lowest-addressed ones. Rename type_len to max_offset.
5529 (read_pieced_value): Mirror above changes to write_pieced_value as
5530 applicable.
5531
5532 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5533
5534 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
5535 truncate full bytes from dest_offset_bits before using it as an
5536 offset into the buffer.
5537
5538 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5539
5540 * dwarf2loc.c (write_pieced_value): Include transfer size in
5541 byte-wise check.
5542
5543 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5544
5545 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
5546 calculation of this_size.
5547
5548 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5549
5550 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
5551 when targeting a bit-field.
5552 (write_pieced_value): Likewise.
5553
5554 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5555
5556 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
5557 (allocate_piece_closure): Drop addr_size parameter.
5558 (dwarf2_evaluate_loc_desc_full): Adjust call to
5559 allocate_piece_closure.
5560
5561 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5562
5563 PR gdb/21226
5564 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
5565 the LSB end, independent of endianness.
5566
5567 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5568
5569 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
5570 size capping.
5571
5572 2017-06-13 Yao Qi <yao.qi@linaro.org>
5573
5574 * mips-linux-nat.c: Move include features/mips*-linux.c to
5575 mips-linux-tdep.c.
5576 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
5577 to mips-linux-tdep.c.
5578 * mips-linux-tdep.c: Include features/mips*-linux.c
5579 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
5580 functions.
5581 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
5582 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
5583 (tdesc_mips64_dsp_linux): Declare.
5584
5585 2017-06-12 Tom Tromey <tom@tromey.com>
5586
5587 * valprint.h (val_print_type_code_int): Remove.
5588 * valprint.c (generic_val_print_int): Always call
5589 val_print_scalar_formatted.
5590 (val_print_type_code_int): Remove.
5591 * printcmd.c (print_scalar_formatted): Handle options->format==0.
5592 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
5593 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
5594 * ada-valprint.c (ada_val_print_num): Use
5595 val_print_scalar_formatted.
5596
5597 2017-06-12 Tom Tromey <tom@tromey.com>
5598
5599 * printcmd.c (print_scalar_formatted): Unify the two switches.
5600 Don't convert scalars to LONGEST.
5601
5602 2017-06-12 Tom Tromey <tom@tromey.com>
5603
5604 PR exp/16225:
5605 * valprint.h (print_decimal_chars): Update.
5606 * valprint.c (maybe_negate_by_bytes): New function.
5607 (print_decimal_chars): Add "is_signed" argument.
5608 * printcmd.c (print_scalar_formatted): Update.
5609
5610 2017-06-12 Tom Tromey <tom@tromey.com>
5611
5612 PR exp/16225:
5613 * valprint.h (print_binary_chars, print_hex_chars): Update.
5614 * valprint.c (val_print_type_code_int): Update.
5615 (print_binary_chars): Add "zero_pad" argument.
5616 (emit_octal_digit): New function.
5617 (print_octal_chars): Don't zero-pad.
5618 (print_decimal_chars): Likewise.
5619 (print_hex_chars): Add "zero_pad" argument.
5620 * sh64-tdep.c (sh64_do_fp_register): Update.
5621 * regcache.c (regcache::dump): Update.
5622 * printcmd.c (print_scalar_formatted): Update.
5623 * infcmd.c (default_print_one_register_info): Update.
5624
5625 2017-06-12 Pedro Alves <palves@redhat.com>
5626 Alan Hayward <alan.hayward@arm.com>
5627
5628 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
5629 (mips_eabi_push_dummy_call): Rename local 'regsize' to
5630 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
5631 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
5632 Assert that abi_regsize bytes fit in 'ref_valbuf'.
5633
5634 2017-06-12 Pedro Alves <palves@redhat.com>
5635
5636 * dwarf2read.c (mapped_symtab::data): Now a vector of
5637 symtab_index_entry instead of vector of
5638 std::unique_ptr<symtab_index_entry>. All users adjusted to check
5639 whether an element's name is NULL instead of checking whether the
5640 element itself is NULL.
5641 (find_slot): Change return type. Adjust.
5642 (hash_expand, , add_index_entry, uniquify_cu_indices)
5643 (write_hash_table): Adjust.
5644
5645 2017-06-12 Pedro Alves <palves@redhat.com>
5646
5647 * dwarf2read.c (recursively_count_psymbols): New function.
5648 (write_psymtabs_to_index): Call it to compute number of psyms and
5649 pass estimate size of psyms_seen to unordered_set's ctor.
5650
5651 2017-06-12 Pedro Alves <palves@redhat.com>
5652
5653 * dwarf2read.c (write_hash_table): Check if key already exists
5654 before emplacing.
5655
5656 2017-06-12 Pedro Alves <palves@redhat.com>
5657
5658 * dwarf2read.c (data_buf::append_space): Rename to...
5659 (data_buf::grow): ... this, and make private. Adjust all callers.
5660 (data_buf::append_uint): New method.
5661 (add_address_entry, write_one_signatured_type)
5662 (write_psymtabs_to_index): Use it.
5663
5664 2017-06-12 Pedro Alves <palves@redhat.com>
5665
5666 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
5667 (file_write (FILE *, const std::vector<Elem>&)): Delete.
5668 (data_buf::file_write): Call ::fwrite directly.
5669
5670 2017-06-12 Pedro Alves <palves@redhat.com>
5671
5672 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
5673 std::vector::erase.
5674
5675 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5676
5677 Code cleanup: C++ify .gdb_index producer.
5678 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5679 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5680 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5681 (create_strtab, add_string): Remove.
5682 (file_write, data_buf): New.
5683 (struct symtab_index_entry): Use std::vector for cu_indices.
5684 (struct mapped_symtab): Use std::vector for data.
5685 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5686 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5687 Remove.
5688 (find_slot): Change return type. Update it to the new data structures.
5689 (hash_expand, add_index_entry): Update it to the new data structures.
5690 (offset_type_compare): Remove.
5691 (uniquify_cu_indices): Update it to the new data structures.
5692 (c_str_view, c_str_view_hasher, vector_hasher): New.
5693 (add_indices_to_cpool): Remove.
5694 (write_hash_table): Update it to the new data structures.
5695 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5696 (eq_psymtab_cu_index): Remove.
5697 (psym_index_map): New typedef.
5698 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5699 reference and std::unordered_map for cu_index_htab.
5700 (add_address_entry, add_address_entry_worker, write_address_map)
5701 (write_psymbols): Update it to the new data structures.
5702 (write_obstack): Remove.
5703 (struct signatured_type_index_data): Change types_list to a data_buf
5704 reference and psyms_seen to a std::unordered_set reference.
5705 (write_one_signatured_type, recursively_write_psymbols)
5706 (write_psymtabs_to_index): Update it to the new data structures.
5707
5708 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
5709
5710 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5711 separate-debug-file commands.
5712 * symfile.h (separate_debug_file_debug): New global.
5713 * symfile.c (separate_debug_file_debug): New global.
5714 (separate_debug_file_exists, find_separate_debug_file): Add
5715 debug output.
5716 (_initialize_symfile): Add "set debug separate-debug-file"
5717 command.
5718 * build-id.c (build_id_to_debug_bfd,
5719 find_separate_debug_file_by_buildid): Add debug output.
5720
5721 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
5722
5723 * gdbarch.sh (displaced_step_free_closure): Remove.
5724 * gdbarch.h, gdbarch.c: Re-generate.
5725 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5726 displaced_step_free_closure.
5727 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5728 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5729 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5730 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5731 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5732 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5733 * arch-utils.h (simple_displaced_step_free_closure): Remove.
5734 * arch-utils.c (simple_displaced_step_free_closure): Remove.
5735 * infrun.c (displaced_step_clear): Call xfree instead of
5736 gdbarch_displaced_step_free_closure.
5737
5738 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
5739
5740 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5741 NULL".
5742
5743 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5744
5745 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5746 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5747 (mn10300_push_dummy_call): Likewise.
5748
5749 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5750
5751 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5752
5753 2017-06-08 Alan Hayward <alan.hayward@arm.com>
5754
5755 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5756
5757 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5758
5759 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5760 able to start inferiors using a shell.
5761 (New remote packets): Announce new packet "QStartupWithShell".
5762 * remote.c: Add PACKET_QStartupWithShell.
5763 (extended_remote_create_inferior): Handle new
5764 PACKET_QStartupWithShell.
5765 (remote_protocol_features) <QStartupWithShell>: New entry for
5766 PACKET_QStartupWithShell.
5767 (_initialize_remote): Call "add_packet_config_cmd" for
5768 QStartupShell.
5769
5770 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5771 Pedro Alves <palves@redhat.com>
5772
5773 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
5774 and "nat/fork-inferior.h".
5775 * common/common-inferior.h: New file, with contents from
5776 "gdb/inferior.h".
5777 * commom/common-utils.c: Include "common-utils.h".
5778 (stringify_argv): New function.
5779 * common/common-utils.h (stringify_argv): New prototype.
5780 * configure.nat: Add "fork-inferior.o" as a dependency for
5781 "*linux*", "fbsd*" and "nbsd*" hosts.
5782 * corefile.c (get_exec_file): Update comment.
5783 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
5784 instead of "startup_inferior".
5785 (darwin_create_inferior): Call "add_thread_silent" after
5786 "fork_inferior".
5787 * fork-child.c: Cleanup unnecessary includes.
5788 (SHELL_FILE): Move to "common/common-fork-child.c".
5789 (environ): Likewise.
5790 (exec_wrapper): Initialize.
5791 (get_exec_wrapper): New function.
5792 (breakup_args): Move to "common/common-fork-child.c"; rename to
5793 "breakup_args_for_exec".
5794 (escape_bang_in_quoted_argument): Move to
5795 "common/common-fork-child.c".
5796 (saved_ui): New variable.
5797 (prefork_hook): New function.
5798 (postfork_hook): Likewise.
5799 (postfork_child_hook): Likewise.
5800 (gdb_startup_inferior): Likewise.
5801 (fork_inferior): Move to "common/common-fork-child.c". Update
5802 function to support gdbserver.
5803 (startup_inferior): Likewise.
5804 * gdbcore.h (get_exec_file): Remove declaration.
5805 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
5806 instead of "startup_inferior". Call "add_thread_silent" after
5807 "fork_inferior".
5808 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
5809 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
5810 instead of "startup_inferior". Call "add_thread_silent" after
5811 "fork_inferior".
5812 * inferior.h: Include "common-inferior.h".
5813 (trace_start_error): Move to "common/common-utils.h".
5814 (trace_start_error_with_name): Likewise.
5815 (fork_inferior): Move prototype to "nat/fork-inferior.h".
5816 (startup_inferior): Likewise.
5817 (gdb_startup_inferior): New prototype.
5818 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
5819 * nat/fork-inferior.h: New file.
5820 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
5821 instead of "startup_inferior". Call "add_thread_silent" after
5822 "fork_inferior".
5823 * target.h (target_terminal_init): Move prototype to
5824 "target/target.h".
5825 (target_terminal_inferior): Likewise.
5826 (target_terminal_ours): Likewise.
5827 * target/target.h (target_terminal_init): New prototype, moved
5828 from "target.h".
5829 (target_terminal_inferior): Likewise.
5830 (target_terminal_ours): Likewise.
5831 * utils.c (gdb_flush_out_err): New function.
5832
5833 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5834
5835 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
5836 * common/common-gdbthread.h: New file, with parts from
5837 "gdb/gdbthread.h".
5838 * gdbthread.h: Include "common-gdbthread.h".
5839 (switch_to_thread): Moved to "common/common-gdbthread.h".
5840
5841 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
5842
5843 * Makefile.in (SFILES): Add "common/job-control.c".
5844 (HFILES_NO_SRCDIR): Add "common/job-control.h".
5845 (COMMON_OBS): Add "job-control.o".
5846 * common/job-control.c: New file, with contents from
5847 "gdb/inflow.c".
5848 * common/job-control.h: New file, with contents from "terminal.h".
5849 * fork-child.c: Include "job-control.h".
5850 * inflow.c: Include "job-control.h".
5851 (gdb_setpgid): Move to "common/common-inflow.c".
5852 (_initialize_inflow): Move setting of "job_control" to
5853 "handle_job_control".
5854 * terminal.h (job_control): Moved to "common/common-terminal.h".
5855 (gdb_setpgid): Likewise.
5856 * top.c: Include "job_control.h".
5857 * utils.c: Likewise.
5858 (job_control): Moved to "job-control.c".
5859
5860 2017-06-07 Pedro Alves <palves@redhat.com>
5861
5862 * Makefile.in (SFILES): Add gdb_regex.c.
5863 (COMMON_OBS): Add gdb_regex.o.
5864 * ada-lang.c (ada_add_standard_exceptions)
5865 (ada_add_exceptions_from_frame, name_matches_regex)
5866 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
5867 parameter type to compiled_regex. Adjust.
5868 (ada_exceptions_list): Use compiled_regex.
5869 * break-catch-throw.c (exception_catchpoint::pattern): Now a
5870 std::unique_ptr<compiled_regex>.
5871 (exception_catchpoint::~exception_catchpoint): Remove regfree
5872 call.
5873 (check_status_exception_catchpoint): Adjust to use compiled_regex.
5874 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
5875 * breakpoint.c (solib_catchpoint::compiled): Now a
5876 std::unique_ptr<compiled_regex>.
5877 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
5878 (check_status_catch_solib): Adjust to use compiled_regex.
5879 (add_solib_catchpoint): Adjust to use compiled_regex.
5880 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
5881 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
5882 compiled_regex reference. Adjust to use it.
5883 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
5884 declaration. Include "gdb_regex.h".
5885 (apropos_cmd): Change regex parameter to compiled_regex reference.
5886 * gdb_regex.c: New file.
5887 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
5888 declarations.
5889 (class compiled_regex): New.
5890 * linux-tdep.c: Include "common/gdb_optional.h".
5891 (struct mapping_regexes): New, factored out from
5892 mapping_is_anonymous_p, and adjusted to use compiled_regex.
5893 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
5894 gdb::optional and remove cleanups. Adjust to compiled_regex.
5895 * probe.c: Include "common/gdb_optional.h".
5896 (collect_probes): Use compiled_regex and gdb::optional and remove
5897 cleanups.
5898 * skip.c: Include "common/gdb_optional.h".
5899 (skiplist_entry::compiled_function_regexp): Now a
5900 gdb::optional<compiled_regex>.
5901 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
5902 (free_skiplist_entry): Remove regfree call.
5903 (compile_skip_regexp, skip_rfunction_p): Adjust to use
5904 compiled_regex and gdb::optional.
5905 * symtab.c: Include "common/gdb_optional.h".
5906 (search_symbols): Use compiled_regex and gdb::optional.
5907 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
5908 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
5909 to gdb_regex.c.
5910
5911 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5912
5913 * regcache.c (regcache::save): Avoid buffer use.
5914 (regcache::dump): Likewise.
5915
5916 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5917
5918 * sh-tdep.c (sh_pseudo_register_read): Remove
5919 MAX_REGISTER_SIZE.
5920 (sh_pseudo_register_write): Likewise.
5921 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
5922 (sh64_pseudo_register_write): Likewise
5923
5924 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5925
5926 * aarch64-tdep.c (aarch64_store_return_value): Use
5927 V_REGISTER_SIZE.
5928 (aarch64_pseudo_read_value): Likewise.
5929 (aarch64_pseudo_write): Likewise.
5930
5931 2017-06-06 Yao Qi <yao.qi@linaro.org>
5932
5933 * regformats/regdef.h (set_register_cache): Remove the
5934 declaration.
5935
5936 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5937
5938 * frame.c (frame_unwind_register_signed): Use
5939 frame_unwind_register_value.
5940
5941 2017-06-06 Pedro Alves <palves@redhat.com>
5942
5943 PR breakpoints/21553
5944 * breakpoint.c (create_breakpoints_sal_default)
5945 (init_breakpoint_sal, create_breakpoint_sal): Use
5946 gdb::unique_xmalloc_ptr for string parameters.
5947 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5948 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
5949 (base_breakpoint_create_breakpoints_sal)
5950 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
5951 (strace_marker_create_breakpoints_sal)
5952 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
5953 string parameters.
5954 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
5955 gdb::unique_xmalloc_ptr for string parameters.
5956 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5957 parameters.
5958
5959 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5960
5961 * alpha-tdep.c (alpha_register_to_value): Use
5962 get_frame_register_value.
5963 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
5964
5965 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5966
5967 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
5968 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
5969 (ia64_value_to_register): Likewise.
5970 (ia64_extract_return_value): Likewise.
5971 (ia64_store_return_value): Likewise.
5972 (ia64_push_dummy_call): Likewise.
5973
5974 2017-06-04 Joel Brobecker <brobecker@adacore.com>
5975
5976 GDB 8.0 released.
5977
5978 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
5979
5980 * x86-linux-nat.c (struct arch_lwp_info): Remove.
5981
5982 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
5983
5984 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
5985 parameter.
5986 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
5987
5988 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
5989
5990 * event-loop.c (poll_timers): Unallocate timer using delete
5991 instead of xfree.
5992
5993 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5994
5995 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
5996 (struct breakpoint) <~breakpoint>: New.
5997 (struct watchpoint): Inherit from breakpoint.
5998 <~watchpoint>: New.
5999 <base>: Remove.
6000 (struct tracepoint): Inherit from breakpoint.
6001 <base>: Remove.
6002 * breakpoint.c (longjmp_breakpoint_ops): Remove.
6003 (struct longjmp_breakpoint): Inherit from breakpoint.
6004 <~longjmp_breakpoint>: New.
6005 <base>: Remove.
6006 (new_breakpoint_from_type): Remove casts.
6007 (watchpoint_in_thread_scope): Remove reference to base field.
6008 (watchpoint_del_at_next_stop): Likewise.
6009 (update_watchpoint): Likewise.
6010 (watchpoint_check): Likewise.
6011 (bpstat_check_watchpoint): Likewise.
6012 (set_longjmp_breakpoint): Likewise.
6013 (struct fork_catchpoint): Inherit from breakpoint.
6014 <base>: Remove.
6015 (struct solib_catchpoint): Inherit from breakpoint.
6016 <~solib_catchpoint>: New.
6017 <base>: Remove.
6018 (dtor_catch_solib): Change to ...
6019 (solib_catchpoint::~solib_catchpoint): ... this.
6020 (breakpoint_hit_catch_solib): Remove reference to base field.
6021 (add_solib_catchpoint): Likewise.
6022 (create_fork_vfork_event_catchpoint): Likewise.
6023 (struct exec_catchpoint): Inherit from breakpoint.
6024 <~exec_catchpoint>: New.
6025 <base>: Remove.
6026 (dtor_catch_exec): Change to ...
6027 (exec_catchpoint::~exec_catchpoint): ... this.
6028 (dtor_watchpoint): Change to ...
6029 (watchpoint::~watchpoint): ... this.
6030 (watch_command_1): Remove reference to base field.
6031 (catch_exec_command_1): Likewise.
6032 (base_breakpoint_dtor): Change to ...
6033 (breakpoint::~breakpoint): ... this.
6034 (base_breakpoint_ops): Remove dtor field value.
6035 (longjmp_bkpt_dtor): Change to ...
6036 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
6037 (strace_marker_create_breakpoints_sal): Remove reference to base
6038 field.
6039 (delete_breakpoint): Don't manually call breakpoint destructor.
6040 (create_tracepoint_from_upload): Remove reference to base field.
6041 (trace_pass_set_count): Likewise.
6042 (initialize_breakpoint_ops): Don't initialize
6043 momentary_breakpoint_ops, don't set dtors.
6044 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6045 <~ada_catchpoint>: New.
6046 <base>: Remove.
6047 (create_excep_cond_exprs): Remove reference to base field.
6048 (dtor_exception): Change to ...
6049 (ada_catchpoint::~ada_catchpoint): ... this.
6050 (dtor_catch_exception): Remove.
6051 (dtor_catch_exception_unhandled): Remove.
6052 (dtor_catch_assert): Remove.
6053 (create_ada_exception_catchpoint): Remove reference to base
6054 field.
6055 (initialize_ada_catchpoint_ops): Don't set dtors.
6056 * break-catch-sig.c (struct signal_catchpoint): Inherit from
6057 breakpoint.
6058 <~signal_catchpoint>: New.
6059 <base>: Remove.
6060 (signal_catchpoint_dtor): Change to ...
6061 (signal_catchpoint::~signal_catchpoint): ... this.
6062 (create_signal_catchpoint): Remove reference to base field.
6063 (initialize_signal_catchpoint_ops): Don't set dtor.
6064 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6065 from breakpoint.
6066 <~syscall_catchpoint>: New.
6067 <base>: Remove.
6068 (dtor_catch_syscall): Change to ...
6069 (syscall_catchpoint::~syscall_catchpoint): ... this.
6070 (create_syscall_event_catchpoint): Remove reference to base
6071 field.
6072 (initialize_syscall_catchpoint_ops): Don't set dtor.
6073 * break-catch-throw.c (struct exception_catchpoint): Inherit
6074 from breakpoint.
6075 <~exception_catchpoint>: New.
6076 <base>: Remove.
6077 (dtor_exception_catchpoint): Change to ...
6078 (exception_catchpoint::~exception_catchpoint): ... this.
6079 (handle_gnu_v3_exceptions): Remove reference to base field.
6080 (initialize_throw_catchpoint_ops): Don't set dtor.
6081 * ctf.c (ctf_get_traceframe_address): Remove reference to base
6082 field.
6083 * remote.c (remote_get_tracepoint_status): Likewise.
6084 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6085 * tracefile.c (tracefile_fetch_registers): Likewise.
6086 * tracepoint.c (actions_command): Likewise.
6087 (validate_actionline): Likewise.
6088 (tfind_1): Likewise.
6089 (get_traceframe_location): Likewise.
6090 (find_matching_tracepoint_location): Likewise.
6091 (parse_tracepoint_status): Likewise.
6092 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6093
6094 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6095
6096 * breakpoint.c (struct longjmp_breakpoint): New struct.
6097 (is_tracepoint_type): Change return type to bool.
6098 (is_longjmp_type): New function.
6099 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6100 (set_raw_breakpoint_without_location): Use
6101 new_breakpoint_from_type.
6102 (set_raw_breakpoint): Likewise.
6103
6104 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
6105
6106 * breakpoint.c (new_breakpoint_from_type): New function.
6107 (create_breakpoint_sal): Use new_breakpoint_from_type and
6108 unique_ptr.
6109 (create_breakpoint): Likewise.
6110
6111 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
6112
6113 * memattr.c (mem_info_command): Rename to ...
6114 (info_mem_command): ... this.
6115 (mem_enable_command): Rename to ...
6116 (enable_mem_command): ... this.
6117 (mem_disable_command): Rename to ...
6118 (disable_mem_command): ... this.
6119 (mem_delete_command): Rename to ...
6120 (delete_mem_command): ... this.
6121 (_initialize_mem): Adjust function names.
6122
6123 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6124
6125 * btrace.c (handle_pt_insn_events): New.
6126 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
6127 STATUS. Split into this and ...
6128 (handle_pt_insn_event_flags): ... this.
6129
6130 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
6131
6132 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
6133 and struct pt_insn.resynced.
6134 * configure: Regenerated.
6135 * config.in: Regenerated.
6136
6137 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6138
6139 * btrace.c (ftrace_find_call_by_number): New function.
6140 (ftrace_new_function): Store objects, not pointers.
6141 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
6142 ftrace_new_gap, ftrace_update_function,
6143 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
6144 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
6145 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
6146 btrace_ends_with_single_insn, btrace_call_get): Account for
6147 btrace_thread_info::functions now storing objects.
6148 * btrace.h (struct btrace_thread_info): Add constructor.
6149 (struct btrace_thread_info) <functions>: Make std::vector.
6150 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
6151 Initialize with default values.
6152 * record-btrace.c (record_btrace_frame_sniffer): Account for
6153 btrace_thread_info::functions now storing objects.
6154
6155 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6156
6157 * btrace.c: Remove typedef bfun_s.
6158 (ftrace_new_gap): Directly add gaps to the list of gaps.
6159 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
6160 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
6161 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
6162 instead of gdb VEC.
6163
6164 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6165
6166 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
6167 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
6168 with btrace_thread_info::next_segment and
6169 btrace_thread_info::prev_segment.
6170 * btrace.h: Remove struct btrace_func_link.
6171 (struct btrace_function): Replace pair of function segment pointers
6172 with pair of indices.
6173 * python/py-record-btrace.c (btpy_call_prev_sibling,
6174 btpy_call_next_sibling): Replace references to
6175 btrace_thread_info::segment with btrace_thread_info::next_segment and
6176 btrace_thread_info::prev_segment.
6177 * record-btrace.c (record_btrace_frame_this_id): Use
6178 btrace_find_call_by_number.
6179
6180 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6181
6182 * btrace.c (ftrace_new_function, ftrace_fixup_level,
6183 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6184 btrace_insn_next, btrace_insn_prev): Remove references to
6185 btrace_thread_info::flow.
6186 * btrace.h (struct btrace_function): Remove FLOW.
6187
6188 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6189
6190 * btrace.c (ftrace_find_call_by_number): New function.
6191 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6192 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6193 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6194 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6195 index.
6196 * btrace.h (struct btrace_function): Turn UP into an index.
6197 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6198 as an index.
6199 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6200 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6201 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6202
6203 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6204
6205 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6206 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6207 ftrace_update_function, ftrace_compute_global_level_offset,
6208 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6209 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6210 btrace_insn_end, btrace_is_empty): Remove references to
6211 btrace_thread_info::begin and btrace_thread_info::end.
6212 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6213 (struct btrace_thread_info) <functions>: Adjust comment.
6214 * record-btrace.c (record_btrace_start_replaying): Remove reference to
6215 btrace_thread_info::begin.
6216
6217 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6218
6219 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6220 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6221 ftrace_update_function): Remove arguments that implicitly were always
6222 BTINFO->END.
6223 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6224 Don't pass BTINFO->END.
6225
6226 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6227
6228 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6229 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6230 btrace_find_insn_by_number): Replace function segment pointer with
6231 index.
6232 (btrace_insn_cmp): Simplify.
6233 * btrace.h: (struct btrace_insn_iterator) Rename index to
6234 insn_index. Replace function segment pointer with index into function
6235 segment vector.
6236 * record-btrace.c (record_btrace_call_history): Replace function
6237 segment pointer use with index.
6238 (record_btrace_frame_sniffer): Retrieve function call segment through
6239 vector.
6240 (record_btrace_set_replay): Remove defunc't safety check.
6241
6242 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6243
6244 * btrace.c (btrace_ends_with_single_insn): New function.
6245 (btrace_call_get, btrace_call_number, btrace_call_begin,
6246 btrace_call_end, btrace_call_next, btrace_call_prev,
6247 btrace_find_call_by_number): Use index into call segment vector
6248 instead of pointer.
6249 (btrace_call_cmp): Simplify.
6250 * btrace.h (struct btrace_call_iterator): Replace function call segment
6251 pointer with index into vector.
6252 * record-btrace.c (record_btrace_call_history): Use index instead of
6253 pointer.
6254
6255 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6256
6257 * btrace.c (btrace_insn_begin, btrace_insn_end,
6258 btrace_find_insn_by_number): Add btinfo to iterator.
6259 * btrace.h (struct btrace_insn_iterator): Add btinfo.
6260
6261 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6262
6263 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
6264 and save pointers directly.
6265 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
6266 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
6267 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
6268 changed signature of functions.
6269 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
6270 (btrace_fetch): Remove code that adds btrace_function pointers to
6271 vector of btrace_functions.
6272 (btrace_clear): Simplify freeing vector of btrace_functions.
6273
6274 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
6275
6276 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
6277 Replace VEC_* with std::vector functions.
6278 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
6279 (struct btrace_thread_info)<functions>: Change type to std::vector.
6280
6281 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
6282
6283 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
6284 "Removed targets and native configurations" up. Merge duplicate
6285 "New commands" sub-sections. Add "New options" sub-sections.
6286
6287 2017-05-26 Alan Hayward <alan.hayward@arm.com>
6288
6289 * defs.h (copy_integer_to_size): New declaration.
6290 * findvar.c (copy_integer_to_size): New function.
6291 (do_cint_test): New selftest function.
6292 (copy_integer_to_size_test): Likewise.
6293 (_initialize_findvar): Likewise.
6294 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
6295 (mips_fbsd_collect_reg): Use raw_collect_integer.
6296 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
6297 (mips64_fill_gregset): Use raw_collect_integer
6298 (mips64_fill_fpregset): Use raw_supply_integer.
6299 * regcache.c (regcache::raw_supply_integer): New function.
6300 (regcache::raw_collect_integer): Likewise.
6301 * regcache.h: (regcache::raw_supply_integer): New declaration.
6302 (regcache::raw_collect_integer): Likewise.
6303
6304 2017-05-24 Yao Qi <yao.qi@linaro.org>
6305
6306 * Makefile.in (SFILES): Add gdbarch-selftests.c.
6307 (COMMON_OBS): Add gdbarch-selftests.o.
6308 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
6309 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
6310 * gdbarch-selftests.c: New file.
6311 * regcache.h (regcache) <~regcache>: Mark it virtual if
6312 GDB_SELF_TEST.
6313 <raw_write>: Likewise.
6314
6315 2017-05-24 Yao Qi <yao.qi@linaro.org>
6316
6317 * regcache.c (current_regcache): Change it to
6318 regcache::current_regcache.
6319 (regcache_observer_target_changed): Update.
6320 (regcache_thread_ptid_changed): Make it a regcache static
6321 method.
6322 (regcache_thread_ptid_changed): Update.
6323 (class regcache_access): New.
6324 (current_regcache_test): Update.
6325 (_initialize_regcache): Update.
6326 * regcache.h: Include forward_list.
6327 (regcache): Declare regcache_thread_ptid_changed and declare
6328 registers_changed_ptid as friend.
6329
6330 2017-05-24 Yao Qi <yao.qi@linaro.org>
6331
6332 * i387-tdep.c (i387_register_to_value): Use register_size
6333 instead of TYPE_LENGTH.
6334 * m68k-tdep.c (m68k_register_to_value): Likewise.
6335
6336 2017-05-24 Yao Qi <yao.qi@linaro.org>
6337
6338 * i387-tdep.c (i387_convert_register_p): Return false if type
6339 code isn't TYPE_CODE_FLT.
6340
6341 2017-05-24 Yao Qi <yao.qi@linaro.org>
6342
6343 * alpha-tdep.c (alpha_convert_register_p): Return true if type
6344 length is 4.
6345 (alpha_register_to_value): Remove type length check.
6346 (alpha_value_to_register): Likewise.
6347
6348 2017-05-24 Yao Qi <yao.qi@linaro.org>
6349
6350 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
6351 TYPE_CODE_FLT.
6352
6353 2017-05-24 Yao Qi <yao.qi@linaro.org>
6354
6355 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
6356 TYPE_CODE_FLT or not.
6357
6358 2017-05-24 Yao Qi <yao.qi@linaro.org>
6359
6360 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
6361 * avr-tdep.c (avr_gdbarch_init): Likewise.
6362 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6363 * cris-tdep.c (cris_gdbarch_init): Likewise.
6364 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6365 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6366 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6367 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
6368 * mep-tdep.c (mep_gdbarch_init): Likewise.
6369 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6370 * mips-tdep.c (mips_gdbarch_init): Likewise.
6371 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6372 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6373 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6374 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6375 * v850-tdep.c (v850_gdbarch_init): Likewise.
6376
6377 2017-05-24 Yao Qi <yao.qi@linaro.org>
6378
6379 * selftest-arch.c (tests_with_arch): Call registers_changed
6380 and reinit_frame_cache.
6381 * selftest.c (run_self_tests): Likewise.
6382
6383 2017-05-24 Yao Qi <yao.qi@linaro.org>
6384
6385 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
6386 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
6387
6388 2017-05-24 Yao Qi <yao.qi@linaro.org>
6389
6390 * rl78-tdep.c (rl78_gdbarch_init): Don't call
6391 set_gdbarch_print_insn.
6392
6393 2017-05-24 Yao Qi <yao.qi@linaro.org>
6394
6395 * h8300-tdep.c (h8300_gdbarch_init): Don't call
6396 set_gdbarch_print_insn.
6397
6398 2017-05-24 Yao Qi <yao.qi@linaro.org>
6399
6400 * alpha-tdep.c (alpha_gdbarch_init): Don't call
6401 set_gdbarch_print_insn.
6402 * arc-tdep.c (arc_gdbarch_init): Likewise.
6403 * arch-utils.c: include dis-asm.h.
6404 (default_print_insn): New function.
6405 * arch-utils.h (default_print_insn): Declare.
6406 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
6407 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6408 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
6409 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
6410 * frv-tdep.c (frv_gdbarch_init): Likewise.
6411 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6412 * gdbarch.sh (print_insn): Use default_print_insn.
6413 * gdbarch.c: Regenerated.
6414 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
6415 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
6416 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6417 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
6418 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6419 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
6420 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
6421 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
6422 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
6423 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6424 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6425 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6426 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6427 * mt-tdep.c (mt_gdbarch_init): Likewise.
6428 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6429 * nios2-tdep.c (nios2_print_insn): Remove.
6430 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
6431 * rx-tdep.c (rx_gdbarch_init): Likewise.
6432 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6433 * score-tdep.c (score_print_insn): Remove.
6434 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
6435 * sh-tdep.c (sh_gdbarch_init): Likewise.
6436 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6437 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6438 * tic6x-tdep.c (tic6x_print_insn): Remove.
6439 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
6440 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
6441 * v850-tdep.c (v850_gdbarch_init): Likewise.
6442 * vax-tdep.c (vax_gdbarch_init): Likewise.
6443 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6444 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
6445
6446 2017-05-23 John Baldwin <jhb@FreeBSD.org>
6447
6448 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
6449 (MIPS_FP0_REGNUM): Remove.
6450 (MIPS_FSR_REGNUM): Remove.
6451 (mips_fbsd_supply_fpregs): Use mips_regnum.
6452 (mips_fbsd_supply_gregs): Likewise.
6453 (mips_fbsd_collect_fpregs): Likewise.
6454 (mips_fbsd_collect_gregs): Likewise.
6455
6456 2017-05-23 John Baldwin <jhb@FreeBSD.org>
6457
6458 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
6459 (getpfpregs_supplies): New function.
6460 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
6461 getfpregs_supplies.
6462 (mips_fbsd_store_inferior_registers): Likewise.
6463
6464 2017-05-22 Pedro Alves <palves@redhat.com>
6465
6466 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
6467 maintainer.
6468
6469 2017-05-22 Alan Hayward <alan.hayward@arm.com>
6470
6471 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
6472 (store_register): Likewise.
6473 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
6474 (get_decimal_float_return_value): Likewise.
6475 (do_ppc_sysv_return_value): Likewise.
6476 (ppc64_sysv_abi_push_integer): Likewise.
6477 (ppc64_sysv_abi_push_freg): Likewise.
6478 (ppc64_sysv_abi_return_value_base): Likewise.
6479 (ppc64_sysv_abi_return_value): Likewise.
6480 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
6481 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
6482 * rs6000-nat.c: Likewise.
6483 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
6484 (rs6000_value_to_register): Likewise.
6485 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
6486
6487 2017-05-21 Tom Tromey <tom@tromey.com>
6488
6489 PR rust/21466:
6490 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
6491 arrays as "[T]", not "[T; ]".
6492
6493 2017-05-19 Tom Tromey <tom@tromey.com>
6494
6495 PR rust/21484:
6496 * rust-lang.c (exp_descriptor_rust): New function.
6497 (rust_language_defn): Use it.
6498 * p-lang.c (pascal_language_defn): Update.
6499 * opencl-lang.c (opencl_language_defn): Update.
6500 * objc-lang.c (objc_language_defn): Update.
6501 * m2-lang.c (m2_language_defn): Update.
6502 * language.h (struct language_defn)
6503 <la_watch_location_expression>: New member.
6504 * language.c (unknown_language_defn, auto_language_defn)
6505 (local_language_defn): Update.
6506 * go-lang.c (go_language_defn): Update.
6507 * f-lang.c (f_language_defn): Update.
6508 * d-lang.c (d_language_defn): Update.
6509 * c-lang.h (c_watch_location_expression): Declare.
6510 * c-lang.c (c_watch_location_expression): New function.
6511 (c_language_defn, cplus_language_defn, asm_language_defn)
6512 (minimal_language_defn): Use it.
6513 * breakpoint.c (watch_command_1): Call
6514 la_watch_location_expression.
6515 * ada-lang.c (ada_language_defn): Update.
6516
6517 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6518
6519 PR tui/21482
6520 * gdb_curses.h (NOMACROS): Define.
6521 (NCURSES_NOMACROS): Define.
6522
6523 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6524
6525 PR tui/21482
6526 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
6527 arg to char *.
6528 * tui/tui-wingeneral.c (box_win): Likewise.
6529 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
6530 (tui_show_source_line): Likewise.
6531 (tui_show_exec_info_content): Likewise.
6532
6533 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6534
6535 * sparc-tdep.c (sparc_structure_return_p)
6536 (sparc_arg_on_registers_p): New functions.
6537 (sparc32_store_arguments): Use them.
6538 * sparc64-tdep.c (sparc64_16_byte_align_p)
6539 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
6540 Handle TYPE_CODE_ARRAY.
6541
6542 2017-05-17 Yao Qi <yao.qi@linaro.org>
6543
6544 * cli/cli-decode.c (add_alias_cmd): New function.
6545 * command.h (add_alias_cmd): Declare.
6546 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
6547 instead call add_alias_cmd.
6548
6549 2017-05-17 Pedro Alves <palves@redhat.com>
6550
6551 * Makefile.in (nat_extra_makefile_frag): Rename to ...
6552 (nat_makefile_frag): ... this. All references updated.
6553 * configure.ac: Likewise.
6554 * configure.nat: Likewise. Enhance comments.
6555 * configure: Regenerate.
6556
6557 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6558
6559 * procfs.c (procfs_create_inferior): Change prototype to match
6560 definition.
6561
6562 2017-05-13 Eli Zaretskii <eliz@gnu.org>
6563
6564 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
6565 C++ compiler warning.
6566
6567 2017-05-12 Tom Tromey <tom@tromey.com>
6568
6569 PR rust/21483:
6570 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
6571 recurse, just call value_struct_elt directly.
6572
6573 2017-05-12 Tom Tromey <tom@tromey.com>
6574
6575 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
6576 OP_RUST_ARRAY>: Fix.
6577
6578 2017-05-12 Tom Tromey <tom@tromey.com>
6579
6580 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
6581
6582 2017-05-09 Yao Qi <yao.qi@linaro.org>
6583
6584 * regcache.c: Include <forward_list>.
6585 (struct regcache_list): Remove.
6586 (current_regcache): Update.
6587 (get_thread_arch_aspace_regcache): Update for std::forward_list.
6588 (regcache_thread_ptid_changed): Likewise.
6589 (registers_changed_ptid): Likewise.
6590 (current_regcache_size): Likewise.
6591
6592 2017-05-09 Yao Qi <yao.qi@linaro.org>
6593
6594 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
6595 (current_regcache_size): New function.
6596 (current_regcache_test): New function.
6597 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
6598
6599 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6600
6601 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
6602 (print_gp_register_row): Use get_frame_register_value.
6603
6604 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6605
6606 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
6607 (mips_supply_fpregset): Likewise.
6608 (mips64_supply_gregset): Likewise.
6609
6610 2017-05-08 Alan Hayward <alan.hayward@arm.com>
6611
6612 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
6613 regcache->raw_supply_zeroed.
6614
6615 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6616
6617 * configure.nat: Rearrange 'case' statements to match
6618 host before cpu.
6619
6620 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
6621
6622 * Makefile.in: Remove "@host_makefile_frag@". Add variables
6623 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
6624 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
6625 "@nat_extra_makefile_frag@".
6626 (Makefile): Remove dependency on "@frags@".
6627 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
6628 (data-directory/Makefile): Likewise.
6629 * config/aarch64/linux.mh: Deleted; moved contents to
6630 "gdb/configure.nat".
6631 * config/alpha/alpha-linux.mh: Likewise.
6632 * config/alpha/nbsd.mh: Likewise.
6633 * config/arm/linux.mh: Likewise.
6634 * config/arm/nbsdelf.mh: Likewise.
6635 * config/i386/cygwin.mh: Likewise.
6636 * config/i386/cygwin64.mh: Likewise.
6637 * config/i386/darwin.mh: Likewise.
6638 * config/i386/fbsd.mh: Likewise.
6639 * config/i386/fbsd64.mh: Likewise.
6640 * config/i386/go32.mh: Likewise.
6641 * config/i386/i386gnu.mh: Likewise.
6642 * config/i386/i386sol2.mh: Likewise.
6643 * config/i386/linux.mh: Likewise.
6644 * config/i386/linux64.mh: Likewise.
6645 * config/i386/mingw.mh: Likewise.
6646 * config/i386/mingw64.mh: Likewise.
6647 * config/i386/nbsd64.mh: Likewise.
6648 * config/i386/nbsdelf.mh: Likewise.
6649 * config/i386/nto.mh: Likewise.
6650 * config/i386/obsd.mh: Likewise.
6651 * config/i386/obsd64.mh: Likewise.
6652 * config/i386/sol2-64.mh: Likewise.
6653 * config/ia64/linux.mh: Likewise.
6654 * config/m32r/linux.mh: Likewise.
6655 * config/m68k/linux.mh: Likewise.
6656 * config/m68k/nbsdelf.mh: Likewise.
6657 * config/m68k/obsd.mh: Likewise.
6658 * config/m88k/obsd.mh: Likewise.
6659 * config/mips/fbsd.mh: Likewise.
6660 * config/mips/linux.mh: Likewise.
6661 * config/mips/nbsd.mh: Likewise.
6662 * config/mips/obsd64.mh: Likewise.
6663 * config/pa/linux.mh: Likewise.
6664 * config/pa/nbsd.mh: Likewise.
6665 * config/pa/obsd.mh: Likewise.
6666 * config/powerpc/aix.mh: Likewise.
6667 * config/powerpc/fbsd.mh: Likewise.
6668 * config/powerpc/linux.mh: Likewise.
6669 * config/powerpc/nbsd.mh: Likewise.
6670 * config/powerpc/obsd.mh: Likewise.
6671 * config/powerpc/ppc64-linux.mh: Likewise.
6672 * config/powerpc/spu-linux.mh: Likewise.
6673 * config/s390/linux.mh: Likewise.
6674 * config/sh/nbsd.mh: Likewise.
6675 * config/sparc/fbsd.mh: Likewise.
6676 * config/sparc/linux.mh: Likewise.
6677 * config/sparc/linux64.mh: Likewise.
6678 * config/sparc/nbsd64.mh: Likewise.
6679 * config/sparc/nbsdelf.mh: Likewise.
6680 * config/sparc/obsd64.mh: Likewise.
6681 * config/sparc/sol2.mh: Likewise.
6682 * config/tilegx/linux.mh: Likewise.
6683 * config/vax/nbsdelf.mh: Likewise.
6684 * config/vax/obsd.mh: Likewise.
6685 * config/xtensa/linux.mh: Likewise.
6686 * config/i386/i386gnu.mn: New file, with excerpts from
6687 "config/i386/i386gnu.mh".
6688 * configure: Regenerate.
6689 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6690 *.mh files under "gdb/config".
6691 * configure.nat: New file, with contents from the
6692 "gdb/config/*/*.mh" files.
6693
6694 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
6695
6696 * btrace.c (btrace_clear): Free insn vector.
6697
6698 2017-05-05 Pedro Alves <palves@redhat.com>
6699
6700 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6701 * configure: Regenerate.
6702
6703 2017-05-04 Pedro Alves <palves@redhat.com>
6704
6705 * Makefile.in (SFILES): Add progspace-and-thread.c.
6706 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6707 (COMMON_OBS): Add progspace-and-thread.o.
6708 * breakpoint.c: Include "progspace-and-thread.h".
6709 (update_inserted_breakpoint_locations)
6710 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6711 Use scoped_restore_current_pspace_and_thread.
6712 (create_std_terminate_master_breakpoint): Use
6713 scoped_restore_current_program_space.
6714 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6715 (print_breakpoint_location): Use
6716 scoped_restore_current_program_space.
6717 (bp_loc_is_permanent): Use
6718 scoped_restore_current_pspace_and_thread.
6719 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6720 (download_tracepoint_locations): Use
6721 scoped_restore_current_pspace_and_thread.
6722 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6723 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6724 (enum step_over_calls_kind): Moved from inferior.h.
6725 (class scoped_restore_current_thread): New class.
6726 * gdbthread.h (make_cleanup_restore_current_thread): Delete
6727 declaration.
6728 (scoped_restore_current_thread): New class.
6729 * infcmd.c: Include "common/gdb_optional.h".
6730 (continue_1, proceed_after_attach): Use
6731 scoped_restore_current_thread.
6732 (notice_new_inferior): Use scoped_restore_current_thread.
6733 * inferior.c: Include "progspace-and-thread.h".
6734 (restore_inferior, save_current_inferior): Delete.
6735 (add_inferior_command, clone_inferior_command): Use
6736 scoped_restore_current_pspace_and_thread.
6737 * inferior.h (scoped_restore_current_inferior): New class.
6738 * infrun.c: Include "progspace-and-thread.h" and
6739 "common/gdb_optional.h".
6740 (follow_fork_inferior): Use
6741 scoped_restore_current_pspace_and_thread.
6742 (scoped_restore_exited_inferior): New class.
6743 (handle_vfork_child_exec_or_exit): Use
6744 scoped_restore_exited_inferior,
6745 scoped_restore_current_pspace_and_thread,
6746 scoped_restore_current_thread and scoped_restore.
6747 (fetch_inferior_event): Use scoped_restore_current_thread.
6748 * linespec.c (decode_line_full, decode_line_1): Use
6749 scoped_restore_current_program_space.
6750 * mi/mi-main.c: Include "progspace-and-thread.h".
6751 (exec_continue): Use scoped_restore_current_thread.
6752 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6753 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6754 * proc-service.c (ps_pglobal_lookup): Use
6755 scoped_restore_current_program_space.
6756 * progspace-and-thread.c: New file.
6757 * progspace-and-thread.h: New file.
6758 * progspace.c (release_program_space, clone_program_space): Use
6759 scoped_restore_current_program_space.
6760 (restore_program_space, save_current_program_space)
6761 (save_current_space_and_thread): Delete.
6762 (switch_to_program_space_and_thread): Moved to
6763 progspace-and-thread.c.
6764 * progspace.h (save_current_program_space)
6765 (save_current_space_and_thread): Delete declarations.
6766 (scoped_restore_current_program_space): New class.
6767 * remote.c (remote_btrace_maybe_reopen): Use
6768 scoped_restore_current_thread.
6769 * symtab.c: Include "progspace-and-thread.h".
6770 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
6771 * thread.c (print_thread_info_1): Use
6772 scoped_restore_current_thread.
6773 (struct current_thread_cleanup): Delete.
6774 (do_restore_current_thread_cleanup)
6775 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
6776 (scoped_restore_current_thread::~scoped_restore_current_thread):
6777 ... this new dtor.
6778 (make_cleanup_restore_current_thread): Rename/convert to ...
6779 (scoped_restore_current_thread::scoped_restore_current_thread):
6780 ... this new ctor.
6781 (thread_apply_all_command): Use scoped_restore_current_thread.
6782 (thread_apply_command): Use scoped_restore_current_thread.
6783 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
6784 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
6785
6786 2017-05-04 Pedro Alves <palves@redhat.com>
6787
6788 * thread.c (make_cleanup_restore_current_thread): Move
6789 find_thread_ptid call before the is_stopped call. Assert that the
6790 thread is found. Replace is_stopped call by checking the thread's
6791 state directly. Remove unnecessary NULL-thread check.
6792
6793 2017-05-04 Pedro Alves <palves@redhat.com>
6794
6795 * corelow.c (thread_section_name): New class.
6796 (get_core_register_section, get_core_siginfo): Use it.
6797
6798 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
6799
6800 * corelow.c (sniff_core_bfd): Remove extra semicolon.
6801 (get_core_register_section): Remove xfree of NULL pointer.
6802
6803 2017-05-03 Alan Hayward <alan.hayward@arm.com>
6804
6805 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
6806 * regcache.c (regcache::raw_supply_zeroed): New function.
6807 * regcache.h (regcache::raw_supply_zeroed): New declaration.
6808
6809 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
6810
6811 * gdbarch.sh: Remove commented out definition of
6812 TARGET_CHAR_BIT.
6813 * gdbarch.h: Re-generate.
6814
6815 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6816
6817 * configure: Regenerate.
6818
6819 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
6820
6821 * solib-target.c (solib_target_relocate_section_addresses):
6822 Remove num_section_bases, num_bases, segment_bases variables.
6823
6824 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6825
6826 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
6827
6828 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6829
6830 * solib-target.c: Include <vector>
6831 (struct lm_info_target) <~lm_info_target>: Remove.
6832 <segment_bases, section_bases>: Change type to
6833 std::vector<CORE_ADDR>.
6834 (library_list_start_segment, library_list_start_section,
6835 library_list_end_library,
6836 solib_target_relocate_section_addresses): Adjust.
6837
6838 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6839
6840 * gdbarch.sh (software_single_step): Change return type to
6841 std::vector<CORE_ADDR>.
6842 * gdbarch.c, gdbarch.h: Re-generate.
6843 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
6844 Adjust.
6845 (arm_deal_with_atomic_sequence_raw): Adjust.
6846 (thumb_get_next_pcs_raw): Adjust.
6847 (arm_get_next_pcs_raw): Adjust.
6848 (arm_get_next_pcs): Adjust.
6849 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
6850 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
6851 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
6852 (alpha_software_single_step): Adjust.
6853 * alpha-tdep.h (alpha_software_single_step): Adjust.
6854 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
6855 * arm-tdep.c (arm_software_single_step): Adjust.
6856 (arm_breakpoint_kind_from_current_state): Adjust.
6857 * arm-tdep.h (arm_software_single_step): Adjust.
6858 * breakpoint.c (insert_single_step_breakpoint): Adjust.
6859 * cris-tdep.c (cris_software_single_step): Adjust.
6860 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
6861 (micromips_deal_with_atomic_sequence): Adjust.
6862 (deal_with_atomic_sequence): Adjust.
6863 (mips_software_single_step): Adjust.
6864 * mips-tdep.h (mips_software_single_step): Adjust.
6865 * moxie-tdep.c (moxie_software_single_step): Adjust.
6866 * nios2-tdep.c (nios2_software_single_step): Adjust.
6867 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
6868 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
6869 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
6870 * s390-linux-tdep.c (s390_software_single_step): Adjust.
6871 * sparc-tdep.c (sparc_software_single_step): Adjust.
6872 * spu-tdep.c (spu_software_single_step): Adjust.
6873 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
6874
6875 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6876
6877 * gdbarch.sh: Use semi-colon as field separator instead of colon.
6878 * gdbarch.h: Re-generate.
6879
6880 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6881
6882 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
6883 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
6884 * python/py-instruction.c, python/py-instruction.h: New file.
6885 * python/py-record.c: Add py-instruction.h include.
6886 (gdbpy_initialize_record): Make gdb.Instruction a super class of
6887 gdb.RecordInstruction.
6888 * python/python-internal.h: Add gdbpy_initialize_instruction
6889 declaration.
6890 * python/python.c (do_start_initialization): Add
6891 gdbpy_initialize_instruction.
6892
6893 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6894
6895 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
6896 Remove.
6897 (btrace_func_from_recpy_func): New function.
6898 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
6899 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
6900 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
6901 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
6902 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
6903 Also, use new helper functions.
6904 (btpy_list_item): Use new helper functions.
6905 (recpy_bt_function_call_history): Use new type name.
6906 (btpy_call_getset): Remove.
6907 (gdbpy_initialize_btrace): Remove code to initialize
6908 gdb.BtraceFunctionCall.
6909 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
6910 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
6911 recpy_bt_func_prev, recpy_bt_func_next): New export.
6912 * python/py-record.c (recpy_func_type): New static object.
6913 (recpy_func_new, recpy_func_level, recpy_func_symbol,
6914 recpy_func_instructions, recpy_func_up, recpy_func_prev,
6915 recpy_func_next): New function.
6916 (recpy_element_hash, recpy_element_richcompare): Updated comment.
6917 (recpy_func_getset): New static object.
6918 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
6919 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
6920
6921 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6922
6923 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
6924 (btpy_object, btpy_insn_type, btpy_new): Remove.
6925 (btpy_list_object): Use gdb.RecordInstruction type instead of
6926 gdb.BtraceInstruction type.
6927 (btrace_insn_from_recpy_insn): New function.
6928 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
6929 btpy_new.
6930 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
6931 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
6932 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
6933 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
6934 instead of btpy_object.
6935 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6936 btpy_insn_data, btpy_insn_decode): Rename to ...
6937 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
6938 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
6939 recpy_bt_insn_decode): This. Also, use new helper functions.
6940 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
6941 recpy_insn_type.
6942 (btpy_insn_getset): Remove.
6943 (gdbpy_initialize_btrace): Remove code to initialize
6944 gdb.BtraceInstruction. Use recpy_element_object.
6945 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
6946 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
6947 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
6948 * python/py-record.c (recpy_insn_type): New static object.
6949 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
6950 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
6951 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
6952 New function.
6953 (recpy_insn_getset): New static object.
6954 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
6955 * python/py-record.h (recpy_element_object): New typedef.
6956 (recpy_insn_type, recpy_insn_new): New export.
6957
6958 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6959
6960 * py-record-btrace.c (btpy_insn_new): Removed.
6961 (btpy_insn_or_gap_new): New function.
6962 (btpy_insn_error): Removed.
6963 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6964 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
6965 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
6966 btpy_insn_or_gap_new instead of btpy_insn_new.
6967 (btpy_insn_getset): Remove btpy_insn_error.
6968 * py-record.c (recpy_gap_type): New static object.
6969 (recpy_gap_object): New typedef.
6970 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
6971 recpy_gap_reason_string): New function.
6972 (recpy_gap_getset): New static object.
6973 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
6974 * py-record.h (recpy_gap_new): New export.
6975
6976 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6977
6978 * python/py-record.c (recpy_ptid): Remove.
6979 (recpy_record_getset): Remove recpy_ptid.
6980
6981 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6982
6983 * btrace.c (btrace_fetch): Set inferior_ptid.
6984 * python/py-record-btrace.c: Add "py-record.h" include.
6985 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
6986 recpy_bt_end, recpy_bt_instruction_history,
6987 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
6988 in gdb.Record object instead of current ptid.
6989 * python/py-record.c: Include new "py-record.h" file.
6990 (recpy_record_object): Moved to py-record.h.
6991 * python/py-record.h: New file.
6992
6993 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6994
6995 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
6996 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
6997 indentation.
6998
6999 2017-05-01 Joel Brobecker <brobecker@adacore.com>
7000
7001 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
7002 the past maintainers section.
7003
7004 2017-04-28 Yao Qi <yao.qi@linaro.org>
7005
7006 * infcmd.c (get_return_value): Use regcache ctor, and remove
7007 cleanup.
7008
7009 2017-04-28 Yao Qi <yao.qi@linaro.org>
7010 Pedro Alves <palves@redhat.com>
7011
7012 * regcache.c (regcache::regcache): New tag dispatch ctor.
7013 (do_cooked_read): Moved above.
7014 (regcache_dup): Use the tag dispatch ctor..
7015 * regcache.h (regcache): Declare ctor, delete copy ctor and
7016 assignment operator, remove friend regcache_dup.
7017
7018 2017-04-28 Yao Qi <yao.qi@linaro.org>
7019
7020 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
7021 call method save instead of regcache_cpy.
7022 * regcache.h (struct regcache): Make regcache_dup a friend.
7023
7024 2017-04-28 Yao Qi <yao.qi@linaro.org>
7025
7026 * regcache.c (struct regcache): Move to regcache.h
7027 (regcache::arch): New method.
7028 (regcache_get_ptid): Update.
7029 (get_regcache_arch): Call arch method.
7030 (get_regcache_aspace): Call method aspace.
7031 (register_buffer): Change it to method.
7032 (regcache_save): Change it to regcache::save.
7033 (regcache_restore): Likewise.
7034 (regcache_cpy_no_passthrough): Remove the declaration.
7035 (regcache_cpy): Call methods restore and cpy_no_passthrough.
7036 (regcache_cpy_no_passthrough): Change it to method
7037 cpy_no_passthrough.
7038 (regcache_register_status): Change it to method
7039 get_register_status.
7040 (regcache_invalidate): Change it to method invalidate.
7041 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
7042 (regcache_raw_update): Change it to method raw_update.
7043 (regcache_raw_read): Likewise.
7044 (regcache_raw_read_signed): Likewise.
7045 (regcache_raw_read_unsigned): Likewise.
7046 (regcache_raw_write_signed): Likewise.
7047 (regcache_raw_write_unsigned): Likewise.
7048 (regcache_cooked_read): Likewise.
7049 (regcache_cooked_read_value): Likewise.
7050 (regcache_cooked_read_signed): Likewise.
7051 (regcache_cooked_read_unsigned): Likewise.
7052 (regcache_cooked_write_signed): Likewise.
7053 (regcache_cooked_write_unsigned): Likewise.
7054 (regcache_raw_set_cached_value): Likewise.
7055 (regcache_raw_write): Likewise.
7056 (regcache_cooked_write): Likewise.
7057 (regcache_xfer_part): Likewise.
7058 (regcache_raw_read_part): Likewise.
7059 (regcache_raw_write_part): Likewise.
7060 (regcache_cooked_read_part): Likewise.
7061 (regcache_cooked_write_part): Likewise.
7062 (regcache_raw_supply): Likewise.
7063 (regcache_raw_collect): Likewise.
7064 (regcache_transfer_regset): Likewise.
7065 (regcache_supply_regset): Likewise.
7066 (regcache_collect_regset): Likewise.
7067 (regcache_debug_print_register): Likewise.
7068 (enum regcache_dump_what): Move it to regcache.h.
7069 (regcache_dump): Change it to method dump.
7070 * regcache.h (enum regcache_dump_what): New.
7071 (class regcache): New.
7072 * target.c (target_fetch_registers): Call method
7073 debug_print_register.
7074 (target_store_registers): Likewise.
7075
7076 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7077
7078 * windows-nat.c (struct lm_info_windows): Initialize field.
7079 (windows_make_so): Allocate lm_info_windows with new.
7080 (windows_free_so): Free lm_info_windows with delete.
7081
7082 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7083
7084 * solib-darwin.c (struct lm_info_darwin): Initialize field.
7085 (darwin_current_sos): Allocate lm_info_darwin with new, remove
7086 cleanup.
7087 (darwin_free_so): Free lm_info_darwin with delete.
7088
7089 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7090
7091 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7092 <l_addr_p>: Change type to bool.
7093 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7094 (svr4_free_so): Free lm_info_svr4 with delete.
7095 (svr4_copy_library_list): Replace memcpy with call to copy
7096 constructor.
7097 (library_list_start_library, svr4_default_sos): Allocate
7098 lm_info_svr4 with new.
7099
7100 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7101
7102 * solib-target.c (struct lm_info_target): Add destructor,
7103 initialize fields.
7104 <name>: Change type to std::string.
7105 (library_list_start_library): Allocate lm_info_target with new.
7106 (solib_target_free_library_list): Free lm_info_target with
7107 delete.
7108 (solib_target_current_sos): Adapt to std::string.
7109 (solib_target_free_so): Free lm_info_target with delete.
7110
7111 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7112
7113 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7114 fields.
7115 (frv_current_sos): Allocate lm_info_frv with new.
7116 (frv_relocate_main_executable): Free lm_info_frv with delete,
7117 allocate with new.
7118 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7119
7120 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7121
7122 * solib-frv.c (struct lm_info_frv): Fix indentation.
7123
7124 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7125
7126 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7127 map field.
7128 (dsbt_current_sos): Allocate lm_info_dsbt with new.
7129 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
7130 and allocate with new.
7131 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
7132
7133 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7134
7135 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
7136 <filename, member_name>: Change type to std::string.
7137 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
7138 (library_list_start_library): Allocate lm_info_aix with new.
7139 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
7140 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
7141 with copy constructor.
7142
7143 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7144
7145 * solist.h (struct lm_info): Remove.
7146 (struct lm_info_base): New class.
7147 (struct so_list) <lm_info>: Change type to lm_info_base *.
7148 * nto-tdep.c (struct lm_info): Remove.
7149 (lm_addr): Adjust.
7150 * solib-aix.c (struct lm_info): Rename to ...
7151 (struct lm_info_aix): ... this. Extend lm_info_base.
7152 (lm_info_p): Rename to ...
7153 (lm_info_aix_p): ... this, and adjust.
7154 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
7155 solib_aix_parse_libraries, library_list_start_library,
7156 solib_aix_free_library_list, solib_aix_parse_libraries,
7157 solib_aix_get_library_list,
7158 solib_aix_relocate_section_addresses, solib_aix_free_so,
7159 solib_aix_get_section_offsets,
7160 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
7161 Adjust.
7162 (struct solib_aix_inferior_data) <library_list>: Adjust.
7163 * solib-darwin.c (struct lm_info): Rename to ...
7164 (struct lm_info_darwin): ... this. Extend lm_info_base.
7165 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
7166 * solib-dsbt.c (struct lm_info): Rename to ...
7167 (struct lm_info_dsbt): ... this. Extend lm_info_base.
7168 (struct dsbt_info) <main_executable_lm_info): Adjust.
7169 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
7170 dsbt_relocate_section_addresses): Adjust.
7171 * solib-frv.c (struct lm_info): Rename to ...
7172 (struct lm_info_frv): ... this. Extend lm_info_base.
7173 (main_executable_lm_info): Adjust.
7174 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7175 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7176 find_canonical_descriptor_in_load_object,
7177 frv_fdpic_find_canonical_descriptor): Adjust.
7178 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7179 to lm_info_svr4.
7180 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7181 svr4_clear_so, svr4_copy_library_list,
7182 library_list_start_library, svr4_default_sos, svr4_read_so_list,
7183 svr4_current_sos, svr4_fetch_objfile_link_map,
7184 solist_update_incremental): Adjust.
7185 * solib-svr4.h (struct lm_info_svr4): Move here from
7186 solib-svr4.c.
7187 * solib-target.c (struct lm_info): Rename to ...
7188 (struct lm_info_target): ... this. Extend lm_info_base.
7189 (lm_info_p): Rename to ...
7190 (lm_info_target_p): ... this.
7191 (solib_target_parse_libraries, library_list_start_segment,
7192 library_list_start_section, library_list_start_library,
7193 library_list_end_library, solib_target_free_library_list,
7194 solib_target_current_sos, solib_target_free_so,
7195 solib_target_relocate_section_addresses): Adjust.
7196 * windows-nat.c (struct lm_info): Rename to ...
7197 (struct lm_info_windows): ... this. Extend lm_info_base.
7198 (windows_make_so, handle_load_dll, handle_unload_dll,
7199 windows_xfer_shared_libraries): Adjust.
7200
7201 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
7202
7203 * solib-darwin.c (struct darwin_so_list): Remove.
7204 (darwin_current_sos): Allocate an so_list object instead of a
7205 darwin_so_list, separately allocate an lm_info object.
7206 (darwin_free_so): Free lm_info.
7207
7208 2017-04-28 John Baldwin <jhb@FreeBSD.org>
7209
7210 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7211 with fprintf_filtered.
7212
7213 2017-04-28 Yao Qi <yao.qi@linaro.org>
7214
7215 * regcache.c (regcache::regcache): New function.
7216 (regcache::~regcache): New function.
7217 (regcache_xmalloc_1): Remove.
7218 (regcache_xmalloc): Call new regcache.
7219 (regcache_xfree): Call delete regcache.
7220 (get_thread_arch_aspace_regcache): Call new regcache.
7221
7222 2017-04-28 Yao Qi <yao.qi@linaro.org>
7223
7224 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7225 lwp instead of ptid_get_lwp.
7226
7227 2017-04-28 Yao Qi <yao.qi@linaro.org>
7228
7229 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7230 lwp_info instead of getting from inferior_ptid.
7231
7232 2017-04-27 Keith Seitz <keiths@redhat.com>
7233
7234 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
7235 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
7236 (CV_CONVERSION_BADNESS): Define.
7237 (rank_one_type): Remove overly restrictive rvalue reference
7238 rank checks.
7239 Add cv-qualifier checks and subranks for type equality.
7240 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
7241 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
7242 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
7243
7244 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
7245
7246 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
7247 count when creating the object.
7248
7249 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
7250 Ulrich Weigand <uweigand@de.ibm.com>
7251
7252 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
7253 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
7254 is used in AIX.
7255 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
7256 (process_xcoff_symbol): Likewise.
7257 (scan_xcoff_symtab): Likewise.
7258
7259 2017-04-26 Alan Hayward <alan.hayward@arm.com>
7260
7261 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
7262 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
7263 (ia64_access_reg): Use get_frame_register_unsigned.
7264 (ia64_access_rse_reg): Likewise.
7265 (ia64_libunwind_frame_prev_register): Likewise.
7266
7267 2017-04-26 Jiong Wang <jiong.wang@arm.com>
7268
7269 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
7270 * gdbarch.c: Regenerated.
7271 * gdbarch.h: Regenerated.
7272 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
7273 visibility external.
7274 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
7275 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
7276 (enum cfa_how_kind): Move to ...
7277 (struct dwarf2_frame_state_reg_info): Likewise.
7278 (struct dwarf2_frame_state): Likewise.
7279 * dwarf2-frame.h: ... here.
7280 (dwarf2_frame_state_alloc_regs): New declaration.
7281 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
7282 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
7283
7284 2017-04-26 Alan Hayward <alan.hayward@arm.com>
7285
7286 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
7287 regcache_raw_read_unsigned.
7288 (xtensa_pseudo_register_write): Likewise.
7289
7290 2017-04-26 Alan Hayward <alan.hayward@arm.com>
7291
7292 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
7293 (nds32_pseudo_register_write): Likewise.
7294
7295 2017-04-25 Yao Qi <yao.qi@linaro.org>
7296
7297 * regcache.c (struct regcache) <readonly_p>: Change its type
7298 to bool.
7299 (regcache_xmalloc_1): Update parameter type and callers update.
7300
7301 2017-04-25 Yao Qi <yao.qi@linaro.org>
7302
7303 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
7304 set_gdbarch_wchar_bit.
7305 * arm-tdep.c (arm_gdbarch_init): Likewise.
7306
7307 2017-04-25 Pedro Alves <palves@redhat.com>
7308
7309 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
7310 (BothAreRelocatable, memcopy, memmove): Don't define.
7311 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
7312 macros.
7313
7314 2017-04-25 Pedro Alves <palves@redhat.com>
7315
7316 * common/common-defs.h: Include "common/poison.h".
7317 * common/function-view.h: (Not, Or, Requires): Move to traits.h
7318 and adjust.
7319 * common/poison.h: New file.
7320 * common/traits.h: Include <type_traits>.
7321 (Not, Or, Requires): New, moved from common/function-view.h.
7322
7323 2017-04-25 Pedro Alves <palves@redhat.com>
7324
7325 * breakpoint.h (struct breakpoint): In-class initialize all
7326 fields. Make boolean fields "bool".
7327 * breakpoint.c (init_raw_breakpoint_without_location): Remove
7328 memset call and initializations no longer necessary.
7329
7330 2017-04-25 Pedro Alves <palves@redhat.com>
7331
7332 * btrace.c (pt_btrace_insn_flags): Change parameter type to
7333 reference.
7334 (pt_btrace_insn): New function.
7335 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
7336
7337 2017-04-25 Pedro Alves <palves@redhat.com>
7338
7339 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
7340 "base" field and inherit from "bp_location" instead. Add
7341 non-default ctor.
7342 (allocate_location_exception): Use new non-default ctor.
7343 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
7344 (init_bp_location): Convert to ...
7345 (bp_location::bp_location): ... this new ctor, and remove memset
7346 call.
7347 (base_breakpoint_allocate_location): Use the new non-default ctor.
7348 * breakpoint.h (bp_location): Now a class. Declare default and
7349 non-default ctors. In-class initialize all members.
7350 (init_bp_location): Remove declaration.
7351
7352 2017-04-25 Pedro Alves <palves@redhat.com>
7353
7354 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
7355 assignment operator.
7356
7357 2017-04-24 Yao Qi <yao.qi@linaro.org>
7358
7359 * doublest.c (convert_doublest_to_floatformat): Call
7360 floatformat_totalsize_bytes.
7361
7362 2017-04-22 Tom Tromey <tom@tromey.com>
7363
7364 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7365 ui_out_emit_list.
7366 * stack.c (print_frame): Use ui_out_emit_list.
7367 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7368 ui_out_emit_list.
7369 * mi/mi-main.c (print_one_inferior)
7370 (mi_cmd_data_list_register_names)
7371 (mi_cmd_data_list_register_values, mi_cmd_list_features)
7372 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
7373 ui_out_emit_list.
7374 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
7375 (mi_output_solib_attribs): Use ui_out_emit_list,
7376 ui_out_emit_tuple.
7377 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
7378 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
7379 (mi_cmd_stack_list_args, list_args_or_locals): Use
7380 ui_out_emit_list.
7381 * disasm.c (do_assembly_only): Use ui_out_emit_list.
7382 * breakpoint.c (print_solib_event, output_thread_groups): Use
7383 ui_out_emit_list.
7384
7385 2017-04-22 Tom Tromey <tom@tromey.com>
7386
7387 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
7388 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
7389 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
7390
7391 2017-04-22 Tom Tromey <tom@tromey.com>
7392
7393 * tracepoint.c (tvariables_info_1)
7394 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
7395
7396 2017-04-22 Tom Tromey <tom@tromey.com>
7397
7398 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
7399 annotate_arg_emitter.
7400 * breakpoint.c (print_mention_watchpoint)
7401 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
7402 * annotate.h (struct annotate_arg_emitter): New.
7403
7404 2017-04-22 Tom Tromey <tom@tromey.com>
7405
7406 * record-btrace.c (record_btrace_insn_history)
7407 (record_btrace_insn_history_range, record_btrace_call_history)
7408 (record_btrace_call_history_range): Use ui_out_emit_tuple.
7409 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
7410 ui_out_emit_tuple.
7411 * stack.c (print_frame_info): Use ui_out_emit_tuple.
7412 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
7413 * skip.c (skip_info): Use ui_out_emit_tuple.
7414 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
7415 * progspace.c (print_program_space): Use ui_out_emit_tuple.
7416 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
7417 * osdata.c (info_osdata): Use ui_out_emit_tuple.
7418 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7419 ui_out_emit_tuple.
7420 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
7421 (output_register, mi_cmd_data_read_memory)
7422 (mi_cmd_data_read_memory_bytes, mi_load_progress)
7423 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
7424 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
7425 Use ui_out_emit_tuple.
7426 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
7427 ui_out_emit_tuple.
7428 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7429 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
7430 * linux-thread-db.c (info_auto_load_libthread_db): Use
7431 ui_out_emit_tuple.
7432 * inferior.c (print_inferior): Use ui_out_emit_tuple.
7433 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
7434 * disasm.c (do_mixed_source_and_assembly_deprecated)
7435 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
7436 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
7437 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
7438 * breakpoint.c (print_one_breakpoint_location)
7439 (print_one_breakpoint): Use ui_out_emit_tuple.
7440 * auto-load.c (print_script, info_auto_load_cmd): Use
7441 ui_out_emit_tuple.
7442 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
7443
7444 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
7445
7446 * thread.c (print_thread_info_1): Remove dead code.
7447
7448 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7449
7450 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
7451 GDB_SELF_TEST.
7452 * arm-tdep.c (selftests::arm_record_test): Likewise.
7453
7454 2017-04-21 Yao Qi <yao.qi@linaro.org>
7455
7456 * regcache.c (regcache_restore): Remove argument 2. Replace
7457 argument 3 with regcache. Get register status from
7458 src->register_status and get register contents from
7459 register_buffer (src, regnum).
7460 (regcache_cpy): Update.
7461
7462 2017-04-19 Pedro Alves <palves@redhat.com>
7463
7464 * gdbthread.h (thread): Add missing closing parenthesis in
7465 comment.
7466
7467 2017-04-19 Pedro Alves <palves@redhat.com>
7468
7469 * common/refcounted-object.h: New file.
7470 * gdbthread.h: Include "common/refcounted-object.h".
7471 (thread_info): Inherit from refcounted_object and add comments.
7472 (thread_info::incref, thread_info::decref)
7473 (thread_info::m_refcount): Delete.
7474 (thread_info::deletable): Use the refcounted_object::refcount()
7475 method.
7476 * inferior.c (current_inferior_): Add comment.
7477 (set_current_inferior): Increment/decrement refcounts.
7478 (prune_inferiors, remove_inferior_command): Skip inferiors marked
7479 not-deletable instead of comparing with the current inferior.
7480 (initialize_inferiors): Increment the initial inferior's refcount.
7481 * inferior.h (struct inferior): Forward declare.
7482 Include "common/refcounted-object.h".
7483 (current_inferior, set_current_inferior): Move declaration to
7484 before struct inferior's definition, and fix comment.
7485 (inferior): Inherit from refcounted_object. Add comments.
7486 * thread.c (switch_to_thread_no_regs): Reference the thread's
7487 inferior pointer directly instead of doing a ptid lookup.
7488 (switch_to_no_thread): New function.
7489 (switch_to_thread(thread_info *)): New function, factored out
7490 from ...
7491 (switch_to_thread(ptid_t)): ... this.
7492 (restore_current_thread): Delete.
7493 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
7494 fields, and add 'inf' field.
7495 (do_restore_current_thread_cleanup): Check whether old->inf is
7496 alive instead of looking up an inferior by ptid. Use
7497 switch_to_thread and switch_to_no_thread.
7498 (restore_current_thread_cleanup_dtor): Use old->inf directly
7499 instead of lookup up an inferior by id. Decref the inferior.
7500 Don't restore 'removable'.
7501 (make_cleanup_restore_current_thread): Same the inferior pointer
7502 in old, instead of the inferior number. Incref the inferior.
7503 Don't save/clear 'removable'.
7504
7505 2017-04-19 Pedro Alves <palves@redhat.com>
7506
7507 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7508 unittests/scoped_restore-selftests.c.
7509 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
7510 * common/scoped_restore.h (scoped_restore_base): Make "class".
7511 (scoped_restore_base::release): New public method.
7512 (scoped_restore_base::scoped_restore_base): New protected ctor.
7513 (scoped_restore_base::m_saved_var): New protected field.
7514 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
7515 scoped_restore_base base class instead of m_saved_var directly.
7516 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
7517 (scoped_restore_tmpl::scoped_restore_tmpl(const
7518 scoped_restore_tmpl<T>&)): Likewise.
7519 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
7520 method.
7521 (scoped_restore_tmpl::saved_var): New method.
7522 (scoped_restore_tmpl::m_saved_var): Delete.
7523 * inferior.h (inferior::detaching): Now a bool.
7524 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
7525 cleanup.
7526 * unittests/scoped_restore-selftests.c: New file.
7527
7528 2017-04-19 Pedro Alves <palves@redhat.com>
7529
7530 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
7531 Re-sort in alphabetic order.
7532
7533 2017-04-18 Pedro Alves <palves@redhat.com>
7534
7535 * xml-support.c (obstack_xml_printf): Delete.
7536 * xml-support.h (obstack_xml_printf): Delete.
7537
7538 2017-04-18 Pedro Alves <palves@redhat.com>
7539
7540 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
7541 vdebug, verror, body_text, start_element, end_element, name,
7542 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
7543 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
7544 is_xinclude>: Make private and add m_ prefix.
7545 (gdb_xml_parser::body_text): New method, based on ...
7546 (gdb_xml_body_text): ... this. Adjust.
7547 (gdb_xml_parser::vdebug): New method, based on ...
7548 (gdb_xml_debug): ... this. Adjust.
7549 (gdb_xml_parser::verror): New method, based on ...
7550 (gdb_xml_error): ... this. Adjust.
7551 (gdb_xml_parser::start_element): New method, based on ...
7552 (gdb_xml_start_element): ... this. Adjust.
7553 (gdb_xml_start_element_wrapper): Defer to
7554 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
7555 (gdb_xml_parser::end_element): New method, based on ...
7556 (gdb_xml_end_element_wrapper): ... this. Adjust.
7557 (gdb_xml_parser::~gdb_xml_parser): Adjust.
7558 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
7559 (gdb_xml_parser::use_dtd): New method, based on ...
7560 (gdb_xml_use_dtd): ... this. Adjust.
7561 (gdb_xml_parser::parse): New method, based on ...
7562 (gdb_xml_parse): ... this. Adjust.
7563 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
7564 (xinclude_start_include): Adjust to call the parser's name method.
7565 (xml_xinclude_default, xml_xinclude_start_doctype)
7566 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
7567 method.
7568 (xml_process_xincludes): Adjust to call parser methods.
7569 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
7570 declarations.
7571
7572 2017-04-18 Pedro Alves <palves@redhat.com>
7573
7574 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
7575 gdb::optional<std::string>.
7576 * xml-support.c: Include <string>.
7577 (scope_level::scope_level(scope_level &&))
7578 (scope_level::~scope_level): Delete.
7579 (scope_level::body): Now a std::string.
7580 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
7581 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
7582 parameter.
7583 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
7584 (xinclude_parsing_data::output): Now a std::string reference.
7585 (xinclude_start_include): Adjust.
7586 (xml_xinclude_default): Adjust.
7587 (xml_process_xincludes): Add 'output' parameter, and return bool.
7588 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
7589 and return bool.
7590 * xml-tdesc.c: Include <unordered_map> and <string>.
7591 (tdesc_xml_cache): Delete.
7592 (tdesc_xml_cache_s): Delete.
7593 (xml_cache): Now an std::unordered_map.
7594 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
7595 (target_fetch_description_xml): Change return type to
7596 gdb::optional<std::string>, and adjust.
7597 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
7598 (target_fetch_description_xml): Change return type to
7599 gdb::optional<std::string>.
7600
7601 2017-04-18 Pedro Alves <palves@redhat.com>
7602
7603 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7604 unittests/optional-selftests.c.
7605 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
7606 * unittests/optional-selftests.c: New file.
7607 * unittests/optional/assignment/1.cc: New file.
7608 * unittests/optional/assignment/2.cc: New file.
7609 * unittests/optional/assignment/3.cc: New file.
7610 * unittests/optional/assignment/4.cc: New file.
7611 * unittests/optional/assignment/5.cc: New file.
7612 * unittests/optional/assignment/6.cc: New file.
7613 * unittests/optional/assignment/7.cc: New file.
7614 * unittests/optional/cons/copy.cc: New file.
7615 * unittests/optional/cons/default.cc: New file.
7616 * unittests/optional/cons/move.cc: New file.
7617 * unittests/optional/cons/value.cc: New file.
7618 * unittests/optional/in_place.cc: New file.
7619 * unittests/optional/observers/1.cc: New file.
7620 * unittests/optional/observers/2.cc: New file.
7621
7622 2017-04-18 Pedro Alves <palves@redhat.com>
7623
7624 * common/gdb_optional.h: Include common/traits.h.
7625 (in_place_t): New type.
7626 (in_place): New constexpr variable.
7627 (optional::optional): Remove member initialization of
7628 m_instantiated.
7629 (optional::optional(in_place_t...)): New constructor.
7630 (optional::~optional): Use reset.
7631 (optional::optional(const optional&)): New.
7632 (optional::optional(const optional&&)): New.
7633 (optional::optional(T &)): New.
7634 (optional::optional(T &&)): New.
7635 (operator::operator=(const optional &)): New.
7636 (operator::operator=(optional &&)): New.
7637 (operator::operator= (const T &))
7638 (operator::operator= (T &&))
7639 (operator::emplace (Args &&... args)): Return a T&. Use reset.
7640 (operator::reset): New.
7641 (operator::m_instantiated):: Add in-class initializer.
7642 * common/traits.h: Include <type_traits>.
7643 (struct And): New types.
7644
7645 2017-04-18 Pedro Alves <palves@redhat.com>
7646
7647 * xml-support.c: Include <vector>.
7648 (scope_level::scope_level(const gdb_xml_element *))
7649 (scope_level::scope_level(scope_level&&)): New.
7650 (scope_level::~scope_level): New.
7651 (scope_level_s): Delete.
7652 (gdb_xml_parser::scopes): Now a std::vector.
7653 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
7654 Use std::vector.
7655 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
7656 scope cleanup code.
7657 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
7658 of the scopes member. Use std::vector::emplace_back.
7659
7660 2017-04-18 Pedro Alves <palves@redhat.com>
7661
7662 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
7663 a bool.
7664 (gdb_xml_end_element): Change type of first parameter.
7665 (gdb_xml_cleanup): Rename to ...
7666 (gdb_xml_parser::~gdb_xml_parser): ... this.
7667 (gdb_xml_create_parser_and_cleanup): Delete with ...
7668 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
7669 to this new ctor.
7670 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
7671 using gdb_xml_create_parser_and_cleanup.
7672 (xinclude_parsing_data): Add ctor/dtor.
7673 (xml_xinclude_cleanup): Delete.
7674 (xml_process_xincludes): Create a local xinclude_parsing_data
7675 instead of heap-allocating one. Create a local gdb_xml_parser
7676 instead of heap-allocating one with
7677 gdb_xml_create_parser_and_cleanup.
7678
7679 2017-04-18 John Baldwin <jhb@FreeBSD.org>
7680
7681 PR threads/20743
7682 * fbsd-nat.c (resume_one_thread_cb): Remove.
7683 (resume_all_threads_cb): Remove.
7684 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7685 iterate_over_threads.
7686
7687 2017-04-17 Joel Brobecker <brobecker@adacore.com>
7688
7689 * NEWS: Create a new section for the next release branch.
7690 Rename the section of the current branch, now that it has
7691 been cut.
7692
7693 2017-04-17 Joel Brobecker <brobecker@adacore.com>
7694
7695 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7696 * version.in: Bump version to 8.0.50.DATE-git.
7697
7698 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
7699
7700 PR gdb/21385
7701 * windows-nat.c (windows_create_inferior): Declare 'allargs'
7702 independently of the host, and fix build breakage on Cygwin.
7703
7704 2017-04-13 Pedro Alves <palves@redhat.com>
7705
7706 * inferior.c (free_inferior): Convert to ...
7707 (inferior::~inferior): ... this dtor.
7708 (inferior::inferior): New ctor, factored out from ...
7709 (add_inferior_silent): ... here. Allocate the inferior with a new
7710 expression.
7711 (delete_inferior): Call delete instead of free_inferior.
7712 * inferior.h (gdb_environ, continuation): Forward declare.
7713 (inferior): Now a class. Add in-class initialization to all
7714 members. Make boolean fields bool, except 'detaching'.
7715 (inferior::inferior): New explicit ctor.
7716 (inferior::~inferior): New.
7717
7718 2017-04-13 Pedro Alves <palves@redhat.com>
7719
7720 * inferior.c (init_inferior_list): Delete.
7721 * inferior.h (init_inferior_list): Delete.
7722
7723 2017-04-13 Pedro Alves <palves@redhat.com>
7724
7725 PR threads/13217
7726 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7727 (top level): Call it twice, with different thread sets.
7728
7729 2017-04-13 Pedro Alves <palves@redhat.com>
7730
7731 * thread.c: Include <algorithm>.
7732 (thread_array_cleanup): Delete.
7733 (scoped_inc_dec_ref): New class.
7734 (live_threads_count): New function.
7735 (set_thread_refcount): Delete.
7736 (tp_array_compar_ascending): Now a bool.
7737 (tp_array_compar): Convert to a std::sort comparison function.
7738 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7739 and live_threads_count.
7740
7741 2017-04-13 Pedro Alves <palves@redhat.com>
7742
7743 * infrun.c (follow_fork_inferior): Also switch the current
7744 inferior.
7745
7746 2017-04-13 Pedro Alves <palves@redhat.com>
7747
7748 * breakpoint.c (watch_command_1): Save watchpoint-frame info
7749 before calling create_internal_breakpoint.
7750
7751 2017-04-13 Pedro Alves <palves@redhat.com>
7752
7753 * fork-child.c (execv_argv): New class.
7754 (breakup_args): Refactored as ...
7755 (execv_argv::init_for_no_shell): .. this method of execv_argv.
7756 Copy arguments to storage and replace separators with NULL
7757 terminators in place.
7758 (escape_bang_in_quoted_argument): Adjust to return bool.
7759 (execv_argv::execv_argv): New ctor.
7760 (execv_argv::init_for_shell): New method, factored out from
7761 fork_inferior. Don't strdup strings into the vector.
7762 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
7763 Remove free_vector_argv call.
7764
7765 2017-04-13 Yao Qi <yao.qi@linaro.org>
7766
7767 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
7768 tdep->rx_psw_type.
7769
7770 2017-04-13 Yao Qi <yao.qi@linaro.org>
7771
7772 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
7773 * rx-tdep.c (rx_gdbarch_init): Likewise.
7774
7775 2017-04-13 Pedro Alves <palves@redhat.com>
7776
7777 * breakpoint.h (struct breakpoint): Reindent.
7778
7779 2017-04-13 Pedro Alves <palves@redhat.com>
7780
7781 * breakpoint.c (bp_location): Rename to ...
7782 (bp_locations): ... this. All references updated.
7783 (bp_location_count): Rename to ...
7784 (bp_locations_count): ... this. All references updated.
7785 (bp_location_placed_address_before_address_max): Rename to ...
7786 (bp_locations_placed_address_before_address_max): ... this. All
7787 references updated.
7788 (bp_location_shadow_len_after_address_max): Rename to ...
7789 (bp_locations_shadow_len_after_address_max): ... this. All
7790 references updated.
7791 (bp_location_compare_addrs): Rename to ...
7792 (bp_locations_compare_addrs): ... this. All references updated.
7793 (bp_location_compare):Rename to ...
7794 (bp_locations_compare): ... this. All references updated.
7795 (bp_location_target_extensions_update): Rename to ...
7796 (bp_locations_target_extensions_update): ... this. All references
7797 updated.
7798
7799 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7800
7801 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
7802 * common/common.m4: Check headers 'termios.h', 'termio.h' and
7803 'sgtty.h'.
7804 * common/gdb_termios.h: New file, with parts of "terminal.h".
7805 * inflow.c: Include "gdb_termios.h".
7806 * ser-unix.c: Include "gdb_termios.h".
7807 * terminal.h: Move terminal-related defines to
7808 "common/gdb_termios.h".
7809
7810 2017-04-12 Tom Tromey <tom@tromey.com>
7811
7812 * probe.c (parse_probes): Update.
7813 * location.h (delete_event_location): Don't declare.
7814 (event_location_deleter::operator()): Update.
7815 * location.c (event_location_deleter::operator()): Rename from
7816 delete_event_location.
7817 * linespec.h (linespec_result) <location>: Change type to
7818 event_location_up.
7819 * linespec.c (canonicalize_linespec, event_location_to_sals)
7820 (decode_objc): Update.
7821 (linespec_result): Don't call delete_event_location.
7822 * breakpoint.c (create_breakpoints_sal)
7823 (bkpt_probe_create_sals_from_location)
7824 (strace_marker_create_sals_from_location): Update.
7825
7826 2017-04-12 Tom Tromey <tom@tromey.com>
7827
7828 * linespec.h (struct linespec_result): Add constructor and
7829 destructor.
7830 (init_linespec_result, destroy_linespec_result)
7831 (make_cleanup_destroy_linespec_result): Don't declare.
7832 * linespec.c (init_linespec_result): Remove.
7833 (linespec_result::~linespec_result): Rename from
7834 destroy_linespec_result. Update.
7835 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
7836 Remove.
7837 * breakpoint.c (create_breakpoint, break_range_command)
7838 (decode_location_default): Update.
7839 * ax-gdb.c (agent_command_1): Update.
7840
7841 2017-04-12 Tom Tromey <tom@tromey.com>
7842
7843 * remote.c (remote_download_tracepoint): Update.
7844 * python/py-breakpoint.c (bppy_get_location): Update.
7845 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
7846 (gdbscm_breakpoint_location): Update.
7847 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
7848 * breakpoint.h (struct breakpoint) <location, location_range_end>:
7849 Change type to event_location_up.
7850 * breakpoint.c (create_overlay_event_breakpoint)
7851 (create_longjmp_master_breakpoint)
7852 (create_std_terminate_master_breakpoint)
7853 (create_exception_master_breakpoint)
7854 (breakpoint_event_location_empty_p, print_breakpoint_location)
7855 (print_one_breakpoint_location, create_thread_event_breakpoint)
7856 (init_breakpoint_sal, create_breakpoint)
7857 (print_recreate_ranged_breakpoint, break_range_command)
7858 (init_ada_exception_breakpoint, say_where): Update.
7859 (base_breakpoint_dtor): Don't call delete_event_location.
7860 (bkpt_print_recreate, tracepoint_print_recreate)
7861 (dprintf_print_recreate, update_static_tracepoint)
7862 (breakpoint_re_set_default): Update.
7863
7864 2017-04-12 Tom Tromey <tom@tromey.com>
7865
7866 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
7867 type of "to_do". Update.
7868 (compute_stack_depth): Use std::vector.
7869
7870 2017-04-12 Tom Tromey <tom@tromey.com>
7871
7872 * printcmd.c (find_instruction_backward): Use std::vector.
7873
7874 2017-04-12 Tom Tromey <tom@tromey.com>
7875
7876 * symfile.c (objfilep): Remove typedef.
7877 (reread_symbols): Use a std::vector.
7878
7879 2017-04-12 Tom Tromey <tom@tromey.com>
7880
7881 * mi/mi-main.c (exec_direction_forward): Remove.
7882 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
7883 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7884 scoped_restore.
7885 * guile/guile.c (guile_repl_command, guile_command)
7886 (gdbscm_execute_gdb_command): Use scoped_restore.
7887 * go-exp.y (go_parse): Use scoped_restore.
7888 * d-exp.y (d_parse): Use scoped_restore.
7889 * cli/cli-decode.c (cmd_func): Use scoped_restore.
7890 * c-exp.y (c_parse): Use scoped_restore.
7891
7892 2017-04-12 Tom Tromey <tom@tromey.com>
7893
7894 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
7895 (mi_parse): Update return type.
7896 (mi_parse_free): Remove.
7897 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
7898 (mi_parse::~mi_parse): Rename from mi_parse_free.
7899 (mi_parse_cleanup): Remove.
7900 (mi_parse): Return a unique_ptr. Use new.
7901 * mi/mi-main.c (mi_execute_command): Update.
7902
7903 2017-04-12 Tom Tromey <tom@tromey.com>
7904
7905 * location.c (explicit_location_lex_one): Return a
7906 unique_xmalloc_ptr.
7907 (string_to_explicit_location): Update. Remove cleanups.
7908
7909 2017-04-12 Tom Tromey <tom@tromey.com>
7910
7911 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
7912 (compare_value_and_voffset): Change type. Update.
7913 (compute_vtable_size): Change type of "offset_vec".
7914 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
7915 (gnuv3_get_typeid): Remove extraneous declaration.
7916
7917 2017-04-12 Tom Tromey <tom@tromey.com>
7918
7919 * charset.h (wchar_iterator): Fix comment.
7920
7921 2017-04-12 Tom Tromey <tom@tromey.com>
7922
7923 * charset.c (iconv_wrapper): New class.
7924 (cleanup_iconv): Remove.
7925 (convert_between_encodings): Use it.
7926
7927 2017-04-12 Tom Tromey <tom@tromey.com>
7928
7929 * symfile.h (increment_reading_symtab): Update type.
7930 * symfile.c (decrement_reading_symtab): Remove.
7931 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
7932 * psymtab.c (psymtab_to_symtab): Update.
7933 * dwarf2read.c (dw2_instantiate_symtab): Update.
7934
7935 2017-04-12 Tom Tromey <tom@tromey.com>
7936
7937 * jit.c (struct jit_reader): Declare separately. Add constructor
7938 and destructor. Change type of "handle".
7939 (loaded_jit_reader): Define separately.
7940 (jit_reader_load): Update. New "new".
7941 (jit_reader_unload_command): Use "delete".
7942 * gdb-dlfcn.h (struct dlclose_deleter): New.
7943 (gdb_dlhandle_up): New typedef.
7944 (gdb_dlopen, gdb_dlsym): Update types.
7945 (gdb_dlclose): Remove.
7946 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
7947 (gdb_dlsym): Change type of "handle".
7948 (make_cleanup_dlclose): Remove.
7949 (dlclose_deleter::operator()): Rename from gdb_dlclose.
7950 * compile/compile-c-support.c (load_libcc): Update.
7951
7952 2017-04-12 Tom Tromey <tom@tromey.com>
7953
7954 * symtab.h (find_pcs_for_symtab_line): Change return type.
7955 * symtab.c (find_pcs_for_symtab_line): Change return type.
7956 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
7957 type of "vec". Update.
7958 (ltpy_get_pcs_for_line): Update.
7959 * linespec.c (decode_digits_ordinary): Update.
7960
7961 2017-04-12 Tom Tromey <tom@tromey.com>
7962
7963 * tracepoint.c (actions_command): Update.
7964 * python/python.c (python_command, python_interactive_command):
7965 Update.
7966 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7967 * guile/guile.c (guile_command): Update.
7968 * defs.h (read_command_lines, read_command_lines_1): Return
7969 command_line_up.
7970 (command_lines_deleter): New struct.
7971 (command_line_up): New typedef.
7972 * compile/compile.c (compile_code_command)
7973 (compile_print_command): Update.
7974 * cli/cli-script.h (get_command_line, copy_command_lines): Return
7975 command_line_up.
7976 (make_cleanup_free_command_lines): Remove.
7977 * cli/cli-script.c (get_command_line, read_command_lines_1)
7978 (copy_command_lines): Return command_line_up.
7979 (while_command, if_command, read_command_lines, define_command)
7980 (document_command): Update.
7981 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
7982 Remove.
7983 * breakpoint.h (breakpoint_set_commands): Change type of
7984 "commands".
7985 * breakpoint.c (breakpoint_set_commands): Change type of
7986 "commands". Update.
7987 (do_map_commands_command, update_dprintf_command_list)
7988 (create_tracepoint_from_upload): Update.
7989
7990 2017-04-12 Tom Tromey <tom@tromey.com>
7991
7992 * tracepoint.c (scope_info): Update.
7993 * spu-tdep.c (spu_catch_start): Update.
7994 * python/python.c (gdbpy_decode_line): Update.
7995 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
7996 * python/py-breakpoint.c (bppy_init): Update.
7997 * probe.c (parse_probes): Update.
7998 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
7999 * location.h (event_location_deleter): New struct.
8000 (event_location_up): New typedef.
8001 (new_linespec_location, new_address_location, new_probe_location)
8002 (new_explicit_location, copy_event_location)
8003 (string_to_event_location, string_to_event_location_basic)
8004 (string_to_explicit_location): Update return type.
8005 (make_cleanup_delete_event_location): Remove.
8006 * location.c (new_linespec_location, new_address_location)
8007 (new_probe_location, new_explicit_location, copy_event_location):
8008 Return event_location_up.
8009 (delete_event_location_cleanup)
8010 (make_cleanup_delete_event_location): Remove.
8011 (string_to_explicit_location, string_to_event_location_basic)
8012 (string_to_event_location): Return event_location_up.
8013 * linespec.c (canonicalize_linespec, event_location_to_sals)
8014 (decode_line_with_current_source)
8015 (decode_line_with_last_displayed, decode_objc): Update.
8016 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
8017 * completer.c (location_completer): Update.
8018 * cli/cli-cmds.c (edit_command, list_command): Update.
8019 * breakpoint.c (create_overlay_event_breakpoint)
8020 (create_longjmp_master_breakpoint)
8021 (create_std_terminate_master_breakpoint)
8022 (create_exception_master_breakpoint)
8023 (create_thread_event_breakpoint): Update.
8024 (init_breakpoint_sal): Update. Remove some dead code.
8025 (create_breakpoint_sal): Change type of "location". Update.
8026 (create_breakpoints_sal, create_breakpoint, break_command_1)
8027 (dprintf_command, break_range_command, until_break_command)
8028 (init_ada_exception_breakpoint)
8029 (strace_marker_create_sals_from_location)
8030 (update_static_tracepoint, trace_command, ftrace_command)
8031 (strace_command, create_tracepoint_from_upload): Update.
8032 * break-catch-throw.c (re_set_exception_catchpoint): Update.
8033 * ax-gdb.c (agent_command_1): Update.
8034
8035 2017-04-12 Pedro Alves <palves@redhat.com>
8036
8037 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
8038 * configure.tgt: Handle i[34567]86-*-go32* and
8039 i[34567]86-*-msdosdjgpp*.
8040 * i386-tdep.c (i386_svr4_reg_to_regnum):
8041 Make extern.
8042 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
8043 i386-go32-tdep.c.
8044 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8045 * i386-go32-tdep.c: New file.
8046 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8047 declarations.
8048
8049 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
8050
8051 * aix-thread.c (pd_status2str): Change return type to const char *.
8052
8053 2017-04-12 Pedro Alves <palves@redhat.com>
8054
8055 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8056 calls to set_gdbarch_gnu_triplet_regexp.
8057
8058 2017-04-12 Pedro Alves <palves@redhat.com>
8059
8060 PR gdb/21323
8061 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8062 New enum value.
8063 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8064 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8065 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8066 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8067 * gdbarch.h, gdbarch.c: Regenerate.
8068 * aarch64-tdep.c (aarch64_gdbarch_init): Override
8069 gdbarch_wchar_bit and gdbarch_wchar_signed.
8070 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8071 * arm-tdep.c (arm_gdbarch_init): Likewise.
8072 * avr-tdep.c (avr_gdbarch_init): Likewise.
8073 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8074 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8075 * i386-tdep.c (i386_go32_init_abi): Likewise.
8076 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8077 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8078 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8079 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8080 * sh-tdep.c (sh_gdbarch_init): Likewise.
8081 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8082 * sparc64-tdep.c (sparc64_init_abi): Likewise.
8083 * windows-tdep.c (windows_init_abi): Likewise.
8084 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8085
8086 2017-04-12 Pedro Alves <palves@redhat.com>
8087
8088 PR c++/21323
8089 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8090 cplus_primitive_type_char32_t>: New enum values.
8091 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8092 and cplus_primitive_type_char32_t.
8093 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8094 32, use the archtecture's built-in type for char16_t and char32_t,
8095 respectively. Otherwise, fallback to init_integer_type as before,
8096 but make the type unsigned, and issue a complaint.
8097 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8098
8099 2017-04-12 Alan Hayward <alan.hayward@arm.com>
8100
8101 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
8102 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8103
8104 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8105
8106 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8107 'const char *'.
8108
8109 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
8110
8111 * common/common-utils.c (free_vector_argv): New function.
8112 * common/common-utils.h: Include <vector>.
8113 (free_vector_argv): New prototype.
8114 * darwin-nat.c (darwin_create_inferior): Rewrite function
8115 prototype in order to constify "exec_file" and accept a
8116 "std::string" for "allargs".
8117 * fork-child.c: Include <vector>.
8118 (breakup_args): Rewrite function, using C++.
8119 (fork_inferior): Rewrite function header, constify "exec_file_arg"
8120 and accept "std::string" for "allargs". Update the code to
8121 calculate "argv" based on "allargs". Update calls to "exec_fun"
8122 and "execvp".
8123 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8124 order to constify "exec_file" and accept a "std::string" for
8125 "allargs".
8126 * go32-nat.c (go32_create_inferior): Likewise.
8127 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8128 * infcmd.c (run_command_1): Constify "exec_file". Use
8129 "std::string" for inferior arguments.
8130 * inferior.h (fork_inferior): Update prototype.
8131 * linux-nat.c (linux_nat_create_inferior): Rewrite function
8132 prototype in order to constify "exec_file" and accept a
8133 "std::string" for "allargs".
8134 * nto-procfs.c (procfs_create_inferior): Likewise.
8135 * procfs.c (procfs_create_inferior): Likewise.
8136 * remote-sim.c (gdbsim_create_inferior): Likewise.
8137 * remote.c (extended_remote_run): Update code to accept
8138 "std::string" as argument.
8139 (extended_remote_create_inferior): Rewrite function prototype in
8140 order to constify "exec_file" and accept a "std::string" for
8141 "allargs".
8142 * rs6000-nat.c (super_create_inferior): Likewise.
8143 (rs6000_create_inferior): Likewise.
8144 * target.h (struct target_ops) <to_create_inferior>: Likewise.
8145 * windows-nat.c (windows_create_inferior): Likewise.
8146
8147 2017-04-11 Pedro Alves <palves@redhat.com>
8148
8149 * thread.c: Fix whitespace throughout.
8150
8151 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
8152
8153 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
8154
8155 2017-04-11 Alan Hayward <alan.hayward@arm.com>
8156
8157 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
8158
8159 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
8160
8161 PR gdb/21364
8162 * osdata.c (info_osdata): Check if 'type' is an empty string
8163 instead of NULL.
8164
8165 2017-04-10 Pedro Alves <palves@redhat.com>
8166
8167 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
8168 (ptid_to_global_thread_id, in_thread_list)
8169 (do_captured_list_thread_ids, set_resumed, set_running)
8170 (set_executing, set_stop_requested, finish_thread_state)
8171 (validate_registers_access, can_access_registers_ptid)
8172 (print_thread_info_1, switch_to_thread)
8173 (do_restore_current_thread_cleanup)
8174 (make_cleanup_restore_current_thread, thread_command)
8175 (thread_name_command): Use operator== instead of ptid_equal.
8176
8177 2017-04-10 Pedro Alves <palves@redhat.com>
8178
8179 * thread.c (struct current_thread_cleanup) <next>: Delete field.
8180 (current_thread_cleanup_chain): Delete.
8181 (restore_current_thread_cleanup_dtor)
8182 (make_cleanup_restore_current_thread): Remove references to
8183 current_thread_cleanup_chain.
8184
8185 2017-04-10 Alan Hayward <alan.hayward@arm.com>
8186
8187 * msp430-tdep.c (msp430_pseudo_register_read): Never return
8188 REG_UNKNOWN.
8189
8190 2017-04-10 Yao Qi <yao.qi@linaro.org>
8191
8192 PR gdb/19942
8193 * gdbthread.h (thread_info::deletable): New method.
8194 (thread_info::incref): New method.
8195 (thread_info::decref): New method.
8196 (thread_info::refcount): Move it to private.
8197 * infrun.c (save_stop_context): Call inc_refcount.
8198 (release_stop_context_cleanup): Likewise.
8199 * thread.c (set_thread_exited): New function.
8200 (init_thread_list): Delete "tp" only it is deletable, otherwise
8201 call set_thread_exited.
8202 (delete_thread_1): Call set_thread_exited.
8203 (current_thread_cleanup) <inferior_pid>: Remove.
8204 <thread>: New field.
8205 (restore_current_thread_ptid_changed): Removed.
8206 (do_restore_current_thread_cleanup): Adjust.
8207 (restore_current_thread_cleanup_dtor): Don't call
8208 find_thread_ptid.
8209 (set_thread_refcount): Use dec_refcount.
8210 (make_cleanup_restore_current_thread): Adjust.
8211 (thread_apply_all_command): Call inc_refcount.
8212 (_initialize_thread): Don't call
8213 observer_attach_thread_ptid_changed.
8214
8215 2017-04-10 Yao Qi <yao.qi@linaro.org>
8216
8217 * thread.c (delete_thread_1): Hoist code on marking thread as
8218 exited.
8219
8220 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8221
8222 * windows-nat.c (windows_detach): Initialize ptid with
8223 minus_one_ptid.
8224
8225 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
8226
8227 * unittests/ptid-selftests.c: Fix erroneous assert messages.
8228
8229 2017-04-07 Alan Hayward <alan.hayward@arm.com>
8230
8231 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8232 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8233 (bfin_pseudo_register_write): Likewise
8234
8235 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
8236
8237 * common/ptid.h (struct ptid): Change to...
8238 (class ptid_t): ... this.
8239 <ptid_t>: New constructors.
8240 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
8241 matches>: New methods.
8242 <make_null, make_minus_one>: New static methods.
8243 <pid>: Rename to...
8244 <m_pid>: ...this.
8245 <lwp>: Rename to...
8246 <m_lwp>: ...this.
8247 <tid>: Rename to...
8248 <m_tid>: ...this.
8249 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
8250 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
8251 as references, move comment to class ptid_t.
8252 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
8253 ptid_t static methods.
8254 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
8255 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
8256 Take ptid arguments as references, implement using ptid_t methods.
8257 * unittests/ptid-selftests.c: New file.
8258 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8259 unittests/ptid-selftests.c.
8260 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
8261
8262 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
8263
8264 * python/python.c (python_run_simple_file): Cast mode literal to
8265 non-const char pointer as expected by PyFile_FromString.
8266
8267 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
8268
8269 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
8270 minus_one_ptid and null_ptid.
8271
8272 2017-04-05 Pedro Alves <palves@redhat.com>
8273
8274 * warning.m4 (build_warnings): Remove -Wno-write-strings.
8275 * configure: Regenerate.
8276
8277 2017-04-05 Pedro Alves <palves@redhat.com>
8278
8279 * ada-exp.y (yyerror): Constify.
8280 * ada-lang.c (bound_name, get_selections)
8281 (ada_variant_discrim_type)
8282 (ada_variant_discrim_name, ada_value_struct_elt)
8283 (ada_lookup_struct_elt_type, is_unchecked_variant)
8284 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
8285 (catch_ada_exception_command_split)
8286 (catch_ada_assert_command_split, catch_assert_command)
8287 (ada_op_name): Constify.
8288 * ada-lang.h (ada_yyerror, get_selections)
8289 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
8290 * arc-tdep.c (arc_print_frame_cache): Constify.
8291 * arm-tdep.c (arm_skip_stub): Constify.
8292 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
8293 (gen_aggregate_elt_ref): Constify.
8294 * bcache.c (print_bcache_statistics): Constify.
8295 * bcache.h (print_bcache_statistics): Constify.
8296 * break-catch-throw.c (catch_exception_command_1):
8297 * breakpoint.c (struct ep_type_description::description):
8298 Constify.
8299 (add_solib_catchpoint): Constify.
8300 (catch_fork_command_1): Add cast.
8301 (add_catch_command): Constify.
8302 * breakpoint.h (add_catch_command, add_solib_catchpoint):
8303 Constify.
8304 * bsd-uthread.c (bsd_uthread_state): Constify.
8305 * buildsym.c (patch_subfile_names): Constify.
8306 * buildsym.h (next_symbol_text_func, patch_subfile_names):
8307 Constify.
8308 * c-exp.y (yyerror): Constify.
8309 (token::oper): Constify.
8310 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
8311 * c-varobj.c (cplus_describe_child): Constify.
8312 * charset.c (find_charset_names): Add cast.
8313 (find_charset_names): Constify array and add const_cast.
8314 * cli/cli-cmds.c (complete_command, cd_command): Constify.
8315 (edit_command): Constify.
8316 * cli/cli-decode.c (lookup_cmd): Constify.
8317 * cli/cli-dump.c (dump_memory_command, dump_value_command):
8318 Constify.
8319 (struct dump_context): Constify.
8320 (add_dump_command, restore_command): Constify.
8321 * cli/cli-script.c (get_command_line): Constify.
8322 * cli/cli-script.h (get_command_line): Constify.
8323 * cli/cli-utils.c (check_for_argument): Constify.
8324 * cli/cli-utils.h (check_for_argument): Constify.
8325 * coff-pe-read.c (struct read_pe_section_data): Constify.
8326 * command.h (lookup_cmd): Constify.
8327 * common/print-utils.c (decimal2str): Constify.
8328 * completer.c (gdb_print_filename): Constify.
8329 * corefile.c (set_gnutarget): Constify.
8330 * cp-name-parser.y (yyerror): Constify.
8331 * cp-valprint.c (cp_print_class_member): Constify.
8332 * cris-tdep.c (cris_register_name, crisv32_register_name):
8333 Constify.
8334 * d-exp.y (yyerror): Constify.
8335 (struct token::oper): Constify.
8336 * d-lang.h (d_yyerror): Constify.
8337 * dbxread.c (struct header_file_location::name): Constify.
8338 (add_old_header_file, add_new_header_file, last_function_name)
8339 (dbx_next_symbol_text, add_bincl_to_list)
8340 (find_corresponding_bincl_psymtab, set_namestring)
8341 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
8342 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
8343 * defs.h (command_line_input, print_address_symbolic)
8344 (deprecated_readline_begin_hook): Constify.
8345 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
8346 Constify.
8347 * event-top.c (handle_line_of_input): Constify and add cast.
8348 * exceptions.c (catch_errors): Constify.
8349 * exceptions.h (catch_errors): Constify.
8350 * expprint.c (print_subexp_standard, op_string, op_name)
8351 (op_name_standard, dump_raw_expression, dump_raw_expression):
8352 * expression.h (op_name, op_string, dump_raw_expression):
8353 Constify.
8354 * f-exp.y (yyerror): Constify.
8355 (struct token::oper): Constify.
8356 (struct f77_boolean_val::name): Constify.
8357 * f-lang.c (f_word_break_characters): Constify.
8358 * f-lang.h (f_yyerror): Constify.
8359 * fork-child.c (fork_inferior): Add cast.
8360 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
8361 (new_variant): Constify.
8362 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
8363 * gdbarch.c: Regenerate.
8364 * gdbcore.h (set_gnutarget): Constify.
8365 * go-exp.y (yyerror): Constify.
8366 (token::oper): Constify.
8367 * go-lang.h (go_yyerror): Constify.
8368 * go32-nat.c (go32_sysinfo): Constify.
8369 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
8370 * guile/scm-cmd.c (cmdscm_function): Constify.
8371 * guile/scm-param.c (pascm_param_value): Constify.
8372 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
8373 (h8300sx_register_name): Constify.
8374 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
8375 Constify.
8376 * ia64-tdep.c (ia64_register_names): Constify.
8377 * infcmd.c (construct_inferior_arguments): Constify.
8378 (path_command, attach_post_wait): Constify.
8379 * language.c (show_range_command, show_case_command)
8380 (unk_lang_error): Constify.
8381 * language.h (language_defn::la_error)
8382 (language_defn::la_name_of_this): Constify.
8383 * linespec.c (decode_line_2): Constify.
8384 * linux-thread-db.c (thread_db_err_str): Constify.
8385 * lm32-tdep.c (lm32_register_name): Constify.
8386 * m2-exp.y (yyerror): Constify.
8387 * m2-lang.h (m2_yyerror): Constify.
8388 * m32r-tdep.c (m32r_register_names): Constify and make static.
8389 * m68hc11-tdep.c (m68hc11_register_names): Constify.
8390 * m88k-tdep.c (m88k_register_name): Constify.
8391 * macroexp.c (appendmem): Constify.
8392 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
8393 (upgrade_type, parse_external, parse_partial_symbols)
8394 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
8395 (new_symbol): Constify.
8396 * memattr.c (mem_info_command): Constify.
8397 * mep-tdep.c (register_name_from_keyword): Constify.
8398 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
8399 Constify.
8400 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
8401 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
8402 * mi/mi-main.c (captured_mi_execute_command): Constify and add
8403 cast.
8404 (mi_execute_async_cli_command): Constify.
8405 * mips-tdep.c (mips_register_name): Constify.
8406 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
8407 (am33_register_name, am33_2_register_name)
8408 * moxie-tdep.c (moxie_register_names): Constify.
8409 * nat/linux-osdata.c (osdata_type): Constify fields.
8410 * nto-tdep.c (nto_parse_redirection): Constify.
8411 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
8412 (lookup_child_selector): Constify.
8413 (objc_methcall::name): Constify.
8414 * objc-lang.h (lookup_objc_class, lookup_child_selector)
8415 (lookup_struct_typedef): Constify.
8416 * objfiles.c (pc_in_section): Constify.
8417 * objfiles.h (pc_in_section): Constify.
8418 * p-exp.y (struct token::oper): Constify.
8419 (yyerror): Constify.
8420 * p-lang.h (pascal_yyerror): Constify.
8421 * parser-defs.h (op_name_standard): Constify.
8422 (op_print::string): Constify.
8423 (exp_descriptor::op_name): Constify.
8424 * printcmd.c (print_address_symbolic): Constify.
8425 * psymtab.c (print_partial_symbols): Constify.
8426 * python/py-breakpoint.c (stop_func): Constify.
8427 (bppy_get_expression): Constify.
8428 * python/py-cmd.c (cmdpy_completer::name): Constify.
8429 (cmdpy_function): Constify.
8430 * python/py-event.c (evpy_add_attribute)
8431 (gdbpy_initialize_event_generic): Constify.
8432 * python/py-event.h (evpy_add_attribute)
8433 (gdbpy_initialize_event_generic): Constify.
8434 * python/py-evts.c (add_new_registry): Constify.
8435 * python/py-finishbreakpoint.c (outofscope_func): Constify.
8436 * python/py-framefilter.c (get_py_iter_from_func): Constify.
8437 * python/py-inferior.c (get_buffer): Add cast.
8438 * python/py-param.c (parm_constant::name): Constify.
8439 * python/py-unwind.c (fprint_frame_id): Constify.
8440 * python/python.c (gdbpy_parameter_value): Constify.
8441 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
8442 * remote.c (memory_packet_config::name): Constify.
8443 (show_packet_config_cmd, remote_write_bytes)
8444 (remote_buffer_add_string):
8445 * reverse.c (exec_reverse_once): Constify.
8446 * rs6000-tdep.c (variant::name, variant::description): Constify.
8447 * rust-exp.y (rustyyerror): Constify.
8448 * rust-lang.c (rust_op_name): Constify.
8449 * rust-lang.h (rustyyerror): Constify.
8450 * serial.h (serial_ops::name): Constify.
8451 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
8452 (sh_sh3e_register_name, sh_sh2e_register_name)
8453 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
8454 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
8455 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
8456 (sh_sh4al_dsp_register_name): Constify.
8457 * sh64-tdep.c (sh64_register_name): Constify.
8458 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
8459 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
8460 * stabsread.c (patch_block_stabs, read_type_number)
8461 (ref_map::stabs, ref_add, process_reference)
8462 (symbol_reference_defined, define_symbol, define_symbol)
8463 (error_type, read_type, read_member_functions, read_cpp_abbrev)
8464 (read_one_struct_field, read_struct_fields, read_baseclasses)
8465 (read_tilde_fields, read_struct_type, read_array_type)
8466 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
8467 (read_huge_number, read_range_type, read_args, common_block_start)
8468 (find_name_end): Constify.
8469 * stabsread.h (common_block_start, define_symbol)
8470 (process_one_symbol, symbol_reference_defined, ref_add):
8471 * symfile.c (get_section_index, add_symbol_file_command):
8472 * symfile.h (get_section_index): Constify.
8473 * target-descriptions.c (tdesc_type::name): Constify.
8474 (tdesc_free_type): Add cast.
8475 * target.c (find_default_run_target):
8476 (add_deprecated_target_alias, find_default_run_target)
8477 (target_announce_detach): Constify.
8478 (do_option): Constify.
8479 * target.h (add_deprecated_target_alias): Constify.
8480 * thread.c (print_thread_info_1): Constify.
8481 * top.c (deprecated_readline_begin_hook, command_line_input):
8482 Constify.
8483 (init_main): Add casts.
8484 * top.h (handle_line_of_input): Constify.
8485 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
8486 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
8487 (tfind_command): Rename to ...
8488 (tfind_command_1): ... this and constify.
8489 (tfind_command): New function.
8490 (tfind_end_command, tfind_start_command): Adjust.
8491 (encode_source_string): Constify.
8492 * tracepoint.h (encode_source_string): Constify.
8493 * tui/tui-data.c (tui_partial_win_by_name): Constify.
8494 * tui/tui-data.h (tui_partial_win_by_name): Constify.
8495 * tui/tui-source.c (tui_set_source_content_nil): Constify.
8496 * tui/tui-source.h (tui_set_source_content_nil): Constify.
8497 * tui/tui-win.c (parse_scrolling_args): Constify.
8498 * tui/tui-windata.c (tui_erase_data_content): Constify.
8499 * tui/tui-windata.h (tui_erase_data_content): Constify.
8500 * tui/tui-winsource.c (tui_erase_source_content): Constify.
8501 * tui/tui.c (tui_enable): Add cast.
8502 * utils.c (defaulted_query): Constify.
8503 (init_page_info): Add cast.
8504 (puts_debug, subset_compare): Constify.
8505 * utils.h (subset_compare): Constify.
8506 * varobj.c (varobj_format_string): Constify.
8507 * varobj.h (varobj_format_string): Constify.
8508 * vax-tdep.c (vax_register_name): Constify.
8509 * windows-nat.c (windows_detach): Constify.
8510 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
8511 * xml-support.c (gdb_xml_end_element): Constify.
8512 * xml-tdesc.c (tdesc_start_reg): Constify.
8513 * xstormy16-tdep.c (xstormy16_register_name): Constify.
8514 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
8515 * xtensa-tdep.h (xtensa_register_t::name): Constify.
8516
8517 2017-04-05 Pedro Alves <palves@redhat.com>
8518
8519 * proc-api.c (struct trans): Constify.
8520 (procfs_note): Constify.
8521 * proc-events.c (struct trans, syscall_table):
8522 * proc-flags.c (struct trans): Constify.
8523 * proc-utils.h (procfs_note): Constify.
8524 * proc-why.c (struct trans): Constify.
8525 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
8526 (procfs_detach): Constify.
8527 * sol-thread.c (struct string_map): Constify.
8528 (td_err_string, td_state_string): Constify.
8529
8530 2017-04-05 Pedro Alves <palves@redhat.com>
8531
8532 * proc-api.c (procfs_filename): Don't initialize
8533 procfs_filename.
8534 (prepare_to_trace): Assume procfs_filename is non-NULL.
8535 (_initialize_proc_api): Give procfs_filename a default value here.
8536
8537 2017-04-05 Pedro Alves <palves@redhat.com>
8538
8539 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
8540 'cond_string' parameter.
8541 (extract_exception_regexp): Constify 'string' parameter.
8542 (catch_exception_command_1): Constify.
8543 * breakpoint.c (init_catchpoint)
8544 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
8545 parameter.
8546 (ep_parse_optional_if_clause, catch_fork_command_1)
8547 (catch_exec_command_1): Constify.
8548 * breakpoint.h (init_catchpoint): Constify 'cond_string'
8549 parameter.
8550 (ep_parse_optional_if_clause): Constify.
8551 * cli/cli-utils.c (remove_trailing_whitespace)
8552 (check_for_argument): Constify.
8553 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
8554 non-const overload.
8555 (check_for_argument): Likewise.
8556
8557 2017-04-05 Pedro Alves <palves@redhat.com>
8558
8559 * event-top.c (command_line_handler): Add cast to execute_command
8560 call.
8561 * record-btrace.c (cmd_record_btrace_bts_start)
8562 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
8563 (cmd_record_btrace_start): Add cast to execute_command call.
8564 * record-full.c (record_full_goto_insn):
8565 * record.c (record_start, record_stop): Add cast to
8566 execute_command_to_string calls.
8567 (cmd_record_start): Add cast to execute_command calls.
8568
8569 2017-04-05 Pedro Alves <palves@redhat.com>
8570
8571 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
8572 static inline function.
8573 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
8574 array and use gdb_PyArg_ParseTupleAndKeywords.
8575 * python/py-cmd.c (cmdpy_init): Likewise.
8576 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
8577 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
8578 (infpy_search_memory): Likewise.
8579 * python/py-objfile.c (objfpy_add_separate_debug_file)
8580 (gdbpy_lookup_objfile): Likewise.
8581 * python/py-symbol.c (gdbpy_lookup_symbol)
8582 (gdbpy_lookup_global_symbol): Likewise.
8583 * python/py-type.c (gdbpy_lookup_type): Likewise.
8584 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
8585 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
8586 Likewise.
8587
8588 2017-04-05 Pedro Alves <palves@redhat.com>
8589
8590 * python/python-internal.h (gdb_PyGetSetDef): New type.
8591 * python/py-block.c (block_object_getset)
8592 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
8593 * python/py-event.c (event_object_getset)
8594 (finish_breakpoint_object_getset): Likewise.
8595 * python/py-inferior.c (inferior_object_getset): Likewise.
8596 * python/py-infthread.c (thread_object_getset): Likewise.
8597 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
8598 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
8599 * python/py-objfile.c (objfile_getset): Likewise.
8600 * python/py-progspace.c (pspace_getset): Likewise.
8601 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
8602 Likewise.
8603 * python/py-record.c (recpy_record_getset): Likewise.
8604 * python/py-symbol.c (symbol_object_getset): Likewise.
8605 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
8606 Likewise.
8607 * python/py-type.c (type_object_getset, field_object_getset):
8608 Likewise.
8609 * python/py-value.c (value_object_getset): Likewise.
8610
8611 2017-04-05 Pedro Alves <palves@redhat.com>
8612
8613 * python/python-internal.h (gdb_PyObject_CallMethod)
8614 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
8615 New functions.
8616 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
8617 (PySys_GetObject, PySys_SetPath): New macros.
8618
8619 2017-04-05 Pedro Alves <palves@redhat.com>
8620
8621 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
8622 info_osdata_command.
8623 * osdata.c (info_osdata_command): Rename to ...
8624 (info_osdata): ... this. Constify 'type' parameter, and remove
8625 the 'from_tty' parameter. Accept NULL TYPE.
8626 (info_osdata_command): New function.
8627 * osdata.h (info_osdata_command): Remove declaration.
8628 (info_osdata): New declaration.
8629
8630 2017-04-05 Pedro Alves <palves@redhat.com>
8631
8632 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
8633 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
8634 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
8635 parameter.
8636 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
8637 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
8638 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
8639 parameter.
8640 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
8641 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
8642 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
8643 (mi_cmd_file_list_exec_source_files)
8644 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
8645 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8646 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
8647 parameter.
8648 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
8649 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
8650 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
8651 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
8652 (mi_cmd_stack_info_frame): Constify 'command' parameter.
8653 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
8654 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
8655 'command' parameter.
8656 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
8657 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
8658 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
8659 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
8660 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
8661 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
8662 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
8663 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
8664 (mi_cmd_var_set_update_range): Constify 'command' parameter.
8665 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
8666 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
8667 parameter.
8668 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
8669 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
8670 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
8671 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
8672 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
8673 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
8674 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
8675 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
8676 (mi_cmd_data_list_changed_registers)
8677 (mi_cmd_data_write_register_values)
8678 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8679 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8680 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8681 (mi_cmd_list_features, mi_cmd_list_target_features)
8682 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8683 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8684 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8685 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8686 (mi_cmd_trace_frame_collected): Constify 'command'
8687 parameter.
8688 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8689 'command' parameter.
8690
8691 2017-04-05 Pedro Alves <palves@redhat.com>
8692
8693 * ada-lang.c (ada_completer_word_break_characters): Now a const
8694 array.
8695 (ada_get_gdb_completer_word_break_characters): Constify.
8696 * completer.c (gdb_completer_command_word_break_characters)
8697 (gdb_completer_file_name_break_characters)
8698 (gdb_completer_quote_characters): Now const arrays.
8699 (get_gdb_completer_quote_characters): Constify.
8700 (set_rl_completer_word_break_characters): New function.
8701 (set_gdb_completion_word_break_characters)
8702 (complete_line_internal): Use it.
8703 * completer.h (get_gdb_completer_quote_characters): Constify.
8704 (set_rl_completer_word_break_characters): Declare.
8705 * f-lang.c (f_word_break_characters): Constify.
8706 * language.c (default_word_break_characters): Constify.
8707 * language.h (language_defn::la_word_break_characters): Constify.
8708 (default_word_break_characters): Constify.
8709 * top.c (init_main): Use set_rl_completer_word_break_characters.
8710
8711 2017-04-05 Pedro Alves <palves@redhat.com>
8712
8713 * aix-thread.c (aix_thread_pid_to_str)
8714 (aix_thread_extra_thread_info): Constify.
8715 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8716 * bsd-uthread.c (bsd_uthread_extra_thread_info)
8717 (bsd_uthread_pid_to_str): Constify.
8718 * corelow.c (core_pid_to_str): Constify.
8719 * darwin-nat.c (darwin_pid_to_str): Constify.
8720 * fbsd-nat.c (fbsd_pid_to_str): Constify.
8721 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8722 Constify.
8723 * gnu-nat.c (gnu_pid_to_str): Constify.
8724 * go32-nat.c (go32_pid_to_str): Constify.
8725 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8726 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8727 * inferior.c (inferior_pid_to_str): Constify.
8728 * linux-nat.c (linux_nat_pid_to_str): Constify.
8729 * linux-tdep.c (linux_core_pid_to_str): Constify.
8730 * linux-thread-db.c (thread_db_pid_to_str)
8731 (thread_db_extra_thread_info): Constify.
8732 * nto-tdep.c (nto_extra_thread_info): Constify.
8733 * nto-tdep.h (nto_extra_thread_info): Constify.
8734 * obsd-nat.c (obsd_pid_to_str): Constify.
8735 * procfs.c (procfs_pid_to_str): Constify.
8736 * ravenscar-thread.c (ravenscar_extra_thread_info)
8737 (ravenscar_pid_to_str): Constify.
8738 * remote-sim.c (gdbsim_pid_to_str): Constify.
8739 * remote.c (remote_threads_extra_info, remote_pid_to_str):
8740 Constify.
8741 * sol-thread.c (solaris_pid_to_str): Constify.
8742 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8743 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8744 * target.c (default_pid_to_str, target_pid_to_str)
8745 (normal_pid_to_str, default_pid_to_str): Constify.
8746 * target.h (target_ops::to_pid_to_str)
8747 (target_ops::to_extra_thread_info): Constify.
8748 (target_pid_to_str, normal_pid_to_str): Constify.
8749 * windows-nat.c (windows_pid_to_str): Constify.
8750 * gdbarch.sh (core_pid_to_str): Constify.
8751 * target-delegates.c: Regenerate.
8752 * gdbarch.h, gdbarch.c: Regenerate.
8753
8754 2017-04-05 Pedro Alves <palves@redhat.com>
8755
8756 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8757 the memory of the temporary warning_pre_print override.
8758 * utils.c (warning_pre_print): Constify.
8759 * utils.h (warning_pre_print): Constify.
8760
8761 2017-04-05 Pedro Alves <palves@redhat.com>
8762
8763 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8764 (shell_command): New function.
8765 (make_command): Use std::string.
8766 (init_cli_cmds): Register shell_command instead of shell_escape.
8767
8768 2017-04-05 Pedro Alves <palves@redhat.com>
8769
8770 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
8771 * tracepoint.c (default_collect): Don't initialize.
8772
8773 2017-04-05 Pedro Alves <palves@redhat.com>
8774
8775 * macroexp.c (macro_buffer::shared): Now a bool.
8776 (init_buffer): Update.
8777 (init_shared_buffer): Constify 'addr' parameter.
8778 (substitute_args, expand, macro_expand, macro_expand_next): Remove
8779 casts.
8780
8781 2017-04-05 Pedro Alves <palves@redhat.com>
8782
8783 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
8784 * disasm.c (set_disassembler_options): Constify local.
8785 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
8786
8787 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
8788
8789 PR gdb/21352
8790 * tracefile.c (tsave_command): Fix argument parsing for '-r'
8791 option.
8792
8793 2017-04-05 Yao Qi <yao.qi@linaro.org>
8794
8795 * frame.c (frame_unwind_register_unsigned): Call
8796 frame_unwind_register_value.
8797
8798 2017-04-05 Yao Qi <yao.qi@linaro.org>
8799
8800 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
8801 Use gdb_test_multiple, and don't match anchor.
8802
8803 2017-04-05 Pedro Alves <palves@redhat.com>
8804
8805 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
8806 (Write After Approval): Remove Simon Marchi.
8807
8808 2017-04-05 Pedro Alves <palves@redhat.com>
8809
8810 * common/gdb_optional.h (optional::optional): Make constexpr and
8811 initialize m_dummy.
8812
8813 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8814
8815 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8816 (amd64fbsd_jmp_buf_reg_offset): Remove.
8817 (amd64fbsd_supply_uthread): Remove function.
8818 (amd64fbsd_collect_uthread): Remove function.
8819 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
8820 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
8821 (x86_64-*-freebsd*): Remove bsd-uthread.o.
8822 (fbsd-nat.c): Update comment.
8823 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8824 (i386fbsd_jmp_buf_reg_offset): Remove.
8825 (i386fbsd_supply_uthread): Remove function.
8826 (i386fbsd_collect_uthread): Remove function.
8827 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
8828
8829 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8830
8831 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
8832 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
8833 * NEWS: Mention that support for FreeBSD/alpha was removed.
8834 * alpha-fbsd-tdep.c: Delete file.
8835 * config/alpha/fbsd.mh: Delete file.
8836 * configure.host: Delete alpha*-*-freebsd* and
8837 alpha*-*-kfreebsd*-gnu.
8838 * configure.tgt: Delete alpha*-*-freebsd* and
8839 alpha*-*-kfreebsd*-gnu.
8840
8841 2017-04-04 John Baldwin <jhb@FreeBSD.org>
8842
8843 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
8844 amd64bsd_store_inferior_registers): Use ptid from regcache.
8845
8846 2017-04-04 Pedro Alves <palves@redhat.com>
8847
8848 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
8849 data fields, make them private and add "m_" prefixes.
8850 (lnp_state_machine::lnp_state_machine): New ctor.
8851 (record_line, check_line_address, handle_set_discriminator)
8852 (handle_set_address, handle_advance_pc, handle_special_opcode)
8853 (handle_advance_line, handle_set_file, handle_negate_stmt)
8854 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
8855 (end_sequence, advance_line): New methods.
8856 (m_gdbarch, m_record_lines_p): New fields.
8857 (lnp_reader_state): Delete.
8858 (dwarf_record_line): Rename to ...
8859 (lnp_state_machine::record_line): ... adjust.
8860 (init_lnp_state_machine): Delete.
8861 (lnp_state_machine::lnp_state_machine): New.
8862 (check_line_address): Rename to ...
8863 (lnp_state_machine::check_line_address): This.
8864 (dwarf_decode_lines_1): Remove reference to "reader_state".
8865 Adjust lnp_state_machine having a non-default ctor. Use bool.
8866 State machine internal state manipulation moved to
8867 lnp_state_machine methods.
8868
8869 2017-04-04 Pedro Alves <palves@redhat.com>
8870
8871 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8872 unittests/offset-type-selftests.c.
8873 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
8874 * common/offset-type.h: New file.
8875 * common/preprocessor.h: New file.
8876 * common/traits.h: New file.
8877 * common/valid-expr.h: New file.
8878 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
8879 sect_offset and cu_offset strong typedefs throughout.
8880 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
8881 typedefs throughout.
8882 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
8883 sect_offset and cu_offset strong typedefs throughout.
8884 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
8885 typedefs throughout.
8886 * gdbtypes.h: Include "common/offset-type.h".
8887 (cu_offset): Now an offset type (strong typedef) instead of a
8888 struct.
8889 (sect_offset): Likewise.
8890 (union call_site_parameter_u): Rename "param_offset" field to
8891 "param_cu_off".
8892 * unittests/offset-type-selftests.c: New file.
8893
8894 2017-04-04 Pedro Alves <palves@redhat.com>
8895
8896 * common/underlying.h: New file.
8897 * dwarf2read.c: Include "common/gdb_optional.h" and
8898 "common/underlying.h".
8899 (dir_index, file_name_index): New types.
8900 (file_entry): Use them.
8901 (file_entry::include): Use to_underlying.
8902 (line_header::add_file_name): Use dir_index.
8903 (read_formatted_entries): Use gdb::optional. Read form before
8904 writting to file_entry.
8905 (dwarf_decode_line_header): Use dir_index.
8906 (lnp_state_machine::current_file): Use to_underlying.
8907 (lnp_state_machine::file): Change type to file_name_index.
8908 (dwarf_record_line): Use to_underlying.
8909 (init_lnp_state_machine): Use file_name_index.
8910 (dwarf_decode_lines_1): Use dir_index and file_name_index.
8911
8912 2017-04-04 Pedro Alves <palves@redhat.com>
8913
8914 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
8915 operator bool, has_value and get methods.
8916
8917 2017-04-04 Pedro Alves <palves@redhat.com>
8918
8919 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
8920 fields.
8921 (line_header): Initialize all data fields. Change type of
8922 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
8923 Change type of include_dirs to std::vector<const char *>. Remove
8924 num_include_dirs, include_dirs_size. Change type of file_names to
8925 std::vector<file_entry>. Remove num_file_names, file_names_size.
8926 (line_header::line_header): New.
8927 (line_header::add_include_dir, line_header::add_file_name): New
8928 methods.
8929 (line_header::include_dir_at): Remove NULL check.
8930 (line_header::file_name_at): Add const overload.
8931 (line_header_up): New unique_ptr typedef.
8932 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
8933 std::vector. Remove free_line_header call.
8934 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
8935 free_line_header call.
8936 (free_cu_line_header): Delete.
8937 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
8938 (setup_type_unit_groups): Use line_header_up instead of cleanups.
8939 Adjust to use std::vector.
8940 (free_line_header): Delete.
8941 (free_line_header_voidp): Use delete.
8942 (add_include_dir): Replace with ...
8943 (line_header::add_include_dir): ... this method. Use std::vector.
8944 (add_file_name): Replace with ...
8945 (line_header::add_file_name): ... this method. Use std::vector.
8946 (add_include_dir_stub): Delete.
8947 (read_formatted_entries): Remove memset.
8948 (dwarf_decode_line_header): Return a line_header_up instead of a
8949 raw pointer. Remove cleanup handling. Pass lambdas to
8950 read_formatted_entries. Adjust to use line_header methods.
8951 (dwarf_decode_lines_1): Adjust to use line_header methods.
8952 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
8953 use std::vector.
8954
8955 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
8956
8957 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
8958 instead of struct ptid.
8959
8960 2017-05-04 Alan Hayward <alan.hayward@arm.com>
8961
8962 * frame.c (get_frame_register_bytes): Unwind using value.
8963 (put_frame_register_bytes): Likewise.
8964
8965 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
8966
8967 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
8968 aggregate-like.
8969
8970 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
8971
8972 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
8973
8974 2017-03-29 Yao Qi <yao.qi@linaro.org>
8975
8976 * gdbthread.h (struct thread_info): Declare constructor and
8977 destructor. Add some in-class member initializers.
8978 * thread.c (free_thread): Remove.
8979 (init_thread_list): Call delete instead of free_thread.
8980 (new_thread): Call thread_info constructor.
8981 (thread_info::thread_info): New function.
8982 (thread_info::~thread_info): New function.
8983 (delete_thread_1): Call delete instead of free_thread.
8984 (make_cleanup_restore_current_thread): Move tp and frame to
8985 inner block.
8986
8987 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8988
8989 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
8990 (arc_skip_prologue): Likewise.
8991 (arc_make_frame_cache): Likewise.
8992 (arc_pv_get_operand): New function.
8993 (arc_is_in_prologue): Likewise.
8994 (arc_analyze_prologue): Likewise.
8995 (arc_print_frame_cache): Likewise.
8996 (MAX_PROLOGUE_LENGTH): New constant.
8997
8998 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8999
9000 * configure.tgt: Add arc-insn.o.
9001 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
9002 (dump_arc_instruction_command): New function.
9003 (arc_fprintf_disasm): Likewise.
9004 (arc_disassemble_info): Likewise.
9005 (arc_insn_get_operand_value): Likewise.
9006 (arc_insn_get_operand_value_signed): Likewise.
9007 (arc_insn_get_memory_base_reg): Likewise.
9008 (arc_insn_get_memory_offset): Likewise.
9009 (arc_insn_get_branch_target): Likewise.
9010 (arc_insn_dump): Likewise.
9011 (arc_insn_get_linear_next_pc): Likewise.
9012 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
9013 (arc_disassemble_info): Likewise.
9014 (arc_insn_get_branch_target): Likewise.
9015 (arc_insn_get_linear_next_pc): Likewise.
9016 * NEWS: Mention new "maint print arc arc-instruction".
9017
9018 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9019
9020 * arc-tdep (maintenance_print_arc_list): New variable.
9021 (maintenance_print_arc_command): New function.
9022
9023 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
9024
9025 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
9026 Add "limm" and "reserved".
9027 (arc_cannot_fetch_register, arc_cannot_store_register): Add
9028 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
9029 * arc-tdep.h (arc_regnum): Likewise.
9030
9031 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9032
9033 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9034 for THREADPTR register.
9035 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
9036 register.
9037 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
9038 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
9039 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
9040
9041 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9042
9043 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
9044 registers above gdbarch_num_regs (gdbarch) as privileged in
9045 call0 ABI.
9046
9047 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9048
9049 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9050 for a single specified register or for all registers in
9051 a0_base..a0_base + C0_NREGS range.
9052 (supply_gregset_reg): Call regcache_raw_supply for a single
9053 specified register or for all registers in a0_base..a0_base +
9054 C0_NREGS range.
9055
9056 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9057
9058 * arch/xtensa.h (C0_NREGS): Add definition.
9059 * xtensa-tdep.c (C0_NREGS): Remove definition.
9060
9061 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
9062
9063 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9064 Drop xtensa_default_isa initialization.
9065 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9066
9067 2017-03-27 Pedro Alves <palves@redhat.com>
9068
9069 * dwarf2read.c (file_entry) <dir_index>: Add comment.
9070 (file_entry::include_dir): New method.
9071 (line_header::include_dir_at, line_header::file_name_at): New
9072 methods.
9073 (setup_type_unit_groups, setup_type_unit_groups)
9074 (psymtab_include_file_name): Simplify using the new methods.
9075 (lnp_state_machine) <the_line_header>: New field.
9076 <file>: Add comment.
9077 (lnp_state_machine::current_file): New method.
9078 (dwarf_record_line): Simplify using the new methods.
9079 (init_lnp_state_machine): Initialize the "the_line_header" field.
9080 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9081 Simplify using the new methods.
9082
9083 2017-03-27 Pedro Alves <palves@redhat.com>
9084
9085 * cp-name-parser.y (make_empty): Delete.
9086 (demangler_special, nested_name, ptr_operator, array_indicator)
9087 (direct_declarator, declarator_1): Use fill_comp instead of
9088 make_empty.
9089
9090 2017-03-27 Pedro Alves <palves@redhat.com>
9091
9092 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9093 to ATTRIBUTE_PRINTF.
9094 * solib-target.c (library_list_start_list): Print "string" not
9095 "version".
9096 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9097 gdb_xml_error call.
9098
9099 2017-03-27 Pedro Alves <palves@redhat.com>
9100
9101 * dwarf2read.c (struct file_and_directory): New.
9102 (dwarf2_get_dwz_file): Adjust to use std::string.
9103 (dw2_get_file_names_reader): Adjust to use file_and_directory.
9104 (find_file_and_directory): Adjust to return a file_and_directory
9105 object.
9106 (read_file_scope): Adjust to use file_and_directory. Remove
9107 make_cleanup/do_cleanups calls.
9108 (open_and_init_dwp_file): Adjust to use std::string. Remove
9109 make_cleanup/do_cleanups calls.
9110 * python/python.c (do_start_initialization): Adjust to ldirname
9111 returning a std::string.
9112 * utils.c (ldirname): Now returns a std::string.
9113 * utils.h (ldirname): Change return type to std::string.
9114 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9115 returning a std::string.
9116 * xml-tdesc.c (file_read_description_xml): Likewise.
9117
9118 2017-03-24 Alan Hayward <alan.hayward@arm.com>
9119
9120 * regcache.c (regcache_debug_print_register): New function.
9121 * regcache.h (regcache_debug_print_register): New declaration.
9122 * target.c (debug_print_register): Remove.
9123 (target_fetch_registers): Call regcache_debug_print_register.
9124 (target_store_registers): Likewise.
9125
9126 2017-03-24 Pádraig Brady <pbrady@fb.com>
9127
9128 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
9129 reference beyond the 'lh->include_dirs' array before accessing to
9130 it.
9131 (psymtab_include_file_name): Likewise.
9132 (dwarf_decode_lines_1): Likewise.
9133 (dwarf_decode_lines): Likewise.
9134 (file_file_name): Likewise.
9135
9136 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
9137
9138 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
9139 inferior_ptid.
9140 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9141 ps_lsetfpregs): Likewise.
9142 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
9143 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9144 ps_lsetfpregs): Likewise.
9145 * target.c (target_fetch_registers, target_store_registers):
9146 Remove asserts.
9147
9148 2017-03-23 Alan Hayward <alan.hayward@arm.com>
9149
9150 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
9151
9152 2017-03-23 Yao Qi <yao.qi@linaro.org>
9153
9154 * aarch64-tdep.c (aarch64_process_record_test): Declare.
9155 (_initialize_aarch64_tdep): Register it.
9156 (aarch64_record_load_store): Handle PRFM instruction.
9157 (aarch64_process_record_test): New function.
9158
9159 2017-03-23 Yao Qi <yao.qi@linaro.org>
9160
9161 * aarch64-tdep.c (aarch64_record_load_store): Fix code
9162 indentation.
9163
9164 2017-03-23 Yao Qi <yao.qi@linaro.org>
9165
9166 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
9167
9168 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9169
9170 python/python.c (do_start_initialization): Fix memory leak.
9171
9172 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9173
9174 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9175 using get_ptrace_pid.
9176 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9177 inferior_ptid.
9178 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9179 inferior_ptid instead of pid.
9180
9181 2017-03-22 Yao Qi <yao.qi@linaro.org>
9182
9183 * aarch64-tdep.c: Wrap locally used classes in anonymous
9184 namespace.
9185 * arm-tdep.c: Likewise.
9186 * linespec.c: Likewise.
9187 * ui-out.c: Likewise.
9188
9189 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
9190
9191 PR gdb/19637
9192 * python/lib/gdb/printer/bound_registers.py: Import sys.
9193
9194 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9195
9196 * windows-nat.c (do_windows_fetch_inferior_registers): Add
9197 windows_thread_info parameter and use it instead of
9198 current_thread.
9199 (windows_fetch_inferior_registers): Don't set current_thread,
9200 pass the thread to do_windows_fetch_inferior_registers. Use
9201 ptid from regcache instead of inferior_ptid.
9202 (do_windows_store_inferior_registers): Add windows_thread_info
9203 parameter and use it instead of current_thread.
9204 (windows_store_inferior_registers): Don't set current_thread,
9205 pass the thread to do_windows_store_inferior_registers. Use
9206 ptid from regcache instead of inferior_ptid.
9207
9208 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
9209
9210 * ser-mingw.c (ser_windows_raw): Remove reference to
9211 struct serial::current_timeout.
9212
9213 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
9214
9215 PR tdep/20928
9216 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9217 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9218 (sparc64_fsr_type): Fix %fsr decoding.
9219
9220 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
9221
9222 * python/py-record-btrace.c (btpy_insn_data): Change return type
9223 for Python 2.
9224
9225 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9226
9227 * spu-linux-nat.c (spu_fetch_inferior_registers,
9228 spu_store_inferior_registers): Use ptid from regcache, set and
9229 restore inferior_ptid.
9230 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9231 Likewise.
9232
9233 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
9234
9235 * i386-linux-nat.c (fetch_register, store_register,
9236 i386_linux_fetch_inferior_registers,
9237 i386_linux_store_inferior_registers): Use ptid from regcache.
9238 * ia64-linux-nat.c (ia64_linux_fetch_register,
9239 ia64_linux_store_register): Likewise.
9240 * inf-ptrace.c (inf_ptrace_fetch_register,
9241 inf_ptrace_store_register): Likewise.
9242 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
9243 m32r_linux_store_inferior_registers): Likewise.
9244 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
9245 m68kbsd_store_inferior_registers): Likewise.
9246 * m68k-linux-nat.c (fetch_register, store_register,
9247 m68k_linux_fetch_inferior_registers,
9248 m68k_linux_store_inferior_registers): Likewise.
9249 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
9250 m88kbsd_store_inferior_registers): Likewise.
9251 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
9252 mips_fbsd_store_inferior_registers): Likewise.
9253 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
9254 mips64_linux_regsets_store_registers): Likewise.
9255 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
9256 mipsnbsd_store_inferior_registers): Likewise.
9257 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
9258 mips64obsd_store_inferior_registers): Likewise.
9259 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
9260 Likewise.
9261 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
9262 ppcfbsd_store_inferior_registers): Likewise.
9263 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
9264 ppc_linux_store_inferior_registers): Likewise.
9265 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
9266 ppcnbsd_store_inferior_registers): Likewise.
9267 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
9268 ppcobsd_store_registers): Likewise.
9269 * procfs.c (procfs_fetch_registers, procfs_store_registers):
9270 Likewise.
9271 * ravenscar-thread.c (ravenscar_fetch_registers,
9272 ravenscar_store_registers, ravenscar_prepare_to_store):
9273 Likewise.
9274 * record-btrace.c (record_btrace_fetch_registers,
9275 record_btrace_store_registers, record_btrace_prepare_to_store):
9276 Likewise.
9277 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
9278 Lookup inferior using ptid from regcache, instead of
9279 current_inferior.
9280 * remote.c (remote_fetch_registers, remote_store_registers): Use
9281 ptid from regcache.
9282 * rs6000-nat.c (fetch_register, store_register): Likewise.
9283 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
9284 s390_linux_store_inferior_registers): Likewise.
9285 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
9286 shnbsd_store_inferior_registers): Likewise.
9287 * sol-thread.c (sol_thread_fetch_registers,
9288 sol_thread_store_registers): Likewise.
9289 * sparc-nat.c (sparc_fetch_inferior_registers,
9290 sparc_store_inferior_registers): Likewise.
9291 * tilegx-linux-nat.c (fetch_inferior_registers,
9292 store_inferior_registers): Likewise.
9293 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
9294 vaxbsd_store_inferior_registers): Likewise.
9295 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
9296 store_xtregs): Likewise.
9297
9298 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9299
9300 PR gdb/14441
9301 * NEWS: Mention support for rvalue references in GDB and python.
9302 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
9303 supports both lvalue and rvalue references.
9304
9305 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9306
9307 PR gdb/14441
9308 * gdbtypes.c (rank_one_type): Implement overloading
9309 resolution rules regarding rvalue references.
9310
9311 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9312
9313 PR gdb/14441
9314 * aarch64-tdep.c (aarch64_type_align)
9315 (aarch64_extract_return_value, aarch64_store_return_value): Change
9316 lvalue reference type checks to general reference type checks.
9317 * amd64-tdep.c (amd64_classify): Likewise.
9318 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
9319 Likewise.
9320 * arm-tdep.c (arm_type_align, arm_extract_return_value)
9321 (arm_store_return_value): Likewise.
9322 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
9323 * c-typeprint.c (c_print_type): Likewise.
9324 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
9325 (cplus_number_of_children, cplus_describe_child): Likewise.
9326 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
9327 * completer.c (expression_completer): Likewise.
9328 * cp-support.c (make_symbol_overload_list_adl_namespace):
9329 Likewise.
9330 * darwin-nat-info.c (info_mach_region_command): Likewise.
9331 * dwarf2loc.c (entry_data_value_coerce_ref)
9332 (value_of_dwarf_reg_entry): Likewise.
9333 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
9334 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
9335 Likewise.
9336 * findvar.c (extract_typed_address, store_typed_address):
9337 Likewise.
9338 * gdbtypes.c (rank_one_type): Likewise.
9339 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
9340 * infcall.c (value_arg_coerce): Likewise.
9341 * language.c (pointer_type): Likewise.
9342 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
9343 Likewise.
9344 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
9345 * mn10300-tdep.c (mn10300_type_align): Likewise.
9346 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
9347 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
9348 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
9349 Likewise.
9350 * printcmd.c (print_formatted, x_command): Likewise.
9351 * python/py-type.c (typy_get_composite, typy_template_argument):
9352 Likewise.
9353 * python/py-value.c (valpy_referenced_value)
9354 (valpy_get_dynamic_type, value_has_field): Likewise.
9355 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
9356 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
9357 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
9358 * spu-tdep.c (spu_scalar_value_p): Likewise.
9359 * symtab.c (lookup_symbol_aux): Likewise.
9360 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
9361 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
9362 Likewise.
9363 * valops.c (value_cast_pointers, value_cast)
9364 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
9365 (value_struct_elt, value_struct_elt_bitpos)
9366 (value_find_oload_method_list, find_overload_match)
9367 (value_rtti_indirect_type): Likewise.
9368 * valprint.c (val_print_scalar_type_p, generic_val_print):
9369 Likewise.
9370 * value.c (value_actual_type, value_as_address, unpack_long)
9371 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
9372 (coerce_ref): Likewise.
9373 * varobj.c (varobj_get_value_type): Likewise.
9374
9375 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9376
9377 PR gdb/14441
9378 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
9379 table of constants.
9380 * python/lib/gdb/command/explore.py: Support exploring values
9381 of rvalue reference types.
9382 * python/lib/gdb/types.py: Implement get_basic_type() for
9383 rvalue reference types.
9384 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
9385 constant.
9386 * python/py-value.c (valpy_getitem): Add an rvalue reference
9387 check.
9388 (valpy_reference_value): Add new parameter "refcode".
9389 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
9390 New wrappers for valpy_reference_value().
9391 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9392 (gdbpy_invoke_xmethod): Likewise.
9393
9394 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9395
9396 PR gdb/14441
9397 * dwarf2read.c (process_die, read_type_die_1): Handle the
9398 DW_TAG_rvalue_reference_type DIE.
9399 (read_tag_reference_type): Add new parameter "refcode".
9400
9401 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9402
9403 PR gdb/14441
9404 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
9405 (c_type_print_modifier, c_type_print_varspec_suffix)
9406 (c_type_print_base): Support printing rvalue reference types.
9407 * c-valprint.c (c_val_print, c_value_print): Support printing
9408 rvalue reference values.
9409
9410 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9411
9412 PR gdb/14441
9413 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
9414 typename.
9415 * cp-support.c (replace_typedefs): Handle
9416 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
9417 * python/py-type.c (typy_lookup_type): Likewise.
9418
9419 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9420
9421 PR gdb/14441
9422 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
9423 * parse.c (insert_type): Change assert statement.
9424 (follow_types): Handle rvalue reference types.
9425 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
9426 constant.
9427
9428 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9429
9430 PR gdb/14441
9431 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
9432 value_ref() interface.
9433 * c-valprint.c (c_value_print): Likewise.
9434 * infcall.c (value_arg_coerce): Likewise.
9435 * python/py-value.c (valpy_reference_value): Likewise.
9436 * valops.c (value_cast, value_reinterpret_cast)
9437 (value_dynamic_cast, typecmp): Likewise.
9438 (value_ref): Parameterize by kind of return value reference type.
9439 * value.h (value_ref): Add new parameter "refcode".
9440
9441 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9442
9443 PR gdb/14441
9444 * dwarf2read.c (read_tag_reference_type): Use
9445 lookup_lvalue_reference_type() instead of lookup_reference_type().
9446 * eval.c (evaluate_subexp_standard): Likewise.
9447 * f-exp.y: Likewise.
9448 * gdbtypes.c (make_reference_type, lookup_reference_type):
9449 Generalize with rvalue reference types.
9450 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
9451 convenience wrappers for lookup_reference_type().
9452 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
9453 reference kind parameter.
9454 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
9455 wrappers for lookup_reference_type().
9456 * guile/scm-type.c (gdbscm_type_reference): Use
9457 lookup_lvalue_reference_type() instead of lookup_reference_type().
9458 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
9459 * parse.c (follow_types): Likewise.
9460 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
9461 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
9462 Likewise.
9463 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9464 (gdbpy_invoke_xmethod): Likewise.
9465 * stabsread.c: Provide extra argument to make_reference_type()
9466 call.
9467 * valops.c (value_ref, value_rtti_indirect_type): Use
9468 lookup_lvalue_reference_type() instead of lookup_reference_type().
9469
9470 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
9471
9472 PR gdb/14441
9473 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
9474 (TYPE_IS_REFERENCE): New macro.
9475 (struct type): Add rvalue_reference_type field.
9476 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
9477
9478 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9479
9480 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
9481 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
9482 New function definition.
9483 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
9484 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
9485 New function declaration.
9486 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
9487 * mi/mi-interp.h: New file.
9488 * solib.c (info_sharedlibrary_command): Replace for loop with
9489 ALL_SO_LIBS macro
9490 * solib.h (update_solib_list): New function declaration.
9491 (so_list_head): Move macro.
9492 * solist.h (ALL_SO_LIBS): New macro.
9493
9494 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
9495
9496 * infcmd.c (post_create_inferior): Remove unused argument in
9497 call to solib_add.
9498 * remote.c (remote_start_remote): Likewise.
9499 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
9500 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
9501 (enable_break): Likewise.
9502 * solib.c (update_solib_list): Remove unused target argument
9503 and its documentation.
9504 (solib_add): Remove unused target argument. Remove unused
9505 argument in call to update_solib_list.
9506 (info_sharedlibrary_command): Remove unused argument in call
9507 to update_solib_list.
9508 (sharedlibrary_command): Remove unused argument in call to
9509 solib_add.
9510 (handle_solib_event): Likewise.
9511 (reload_shared_libraries): Likewise.
9512 * solib.h (solib_add): Remove unused target argument.
9513
9514 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
9515
9516 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
9517 (s390_displaced_step_fixup): Cover relative branches with the
9518 default fixup handling. This fixes lack of support for some
9519 relative branch instructions.
9520
9521 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9522
9523 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
9524 ptid from regcache.
9525
9526 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9527
9528 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
9529 i386_darwin_store_inferior_registers): Use ptid from regcache.
9530
9531 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9532
9533 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
9534 i386bsd_store_inferior_registers): Use ptid from regcache.
9535
9536 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9537
9538 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
9539 hppaobsd_store_registers): Use ptid from regcache.
9540
9541 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9542
9543 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
9544 hppanbsd_store_registers): Use ptid from regcache.
9545
9546 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9547
9548 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
9549 from regcache. Use get_ptrace_pid.
9550
9551 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9552
9553 * corelow.c (get_core_register_section): Use ptid from regcache,
9554 update doc.
9555
9556 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9557
9558 * bsd-uthread.c (bsd_uthread_fetch_registers,
9559 bsd_uthread_store_registers): Use ptid from regcache, set and
9560 restore inferior_ptid.
9561
9562 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9563
9564 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
9565 fetch_fp_regs, store_register, store_regs, store_fp_register,
9566 store_fp_regs): Use ptid from regcache.
9567
9568 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
9569
9570 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
9571 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
9572 store_vfp_regs): Use ptid from regcache.
9573
9574 2017-03-17 Pedro Alves <palves@redhat.com>
9575
9576 PR remote/21188
9577 * ser-base.c (ser_base_wait_for): Add comment.
9578 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
9579 version.
9580 * ser-unix.c (hardwire_raw): Remove reference to
9581 scb->current_timeout.
9582 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
9583 (hardwire_ops): Install ser_base_readchar instead of
9584 hardwire_readchar.
9585 * serial.h (struct serial) <current_timeout, timeout_remaining>:
9586 Remove fields.
9587
9588 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
9589
9590 PR gdb/19637
9591 * python/lib/gdb/printer/bound_registers.py: Add support for
9592 Python 3.
9593
9594 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
9595
9596 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
9597 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
9598 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
9599 byte_offset to subobj_byte_offset. Fix the handling of
9600 DWARF_VALUE_STACK on big-endian targets when coming via an
9601 implicit pointer.
9602 (dwarf2_evaluate_loc_desc): Adjust call to
9603 dwarf2_evaluate_loc_desc_full.
9604 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
9605 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
9606
9607 2017-03-16 Yao Qi <yao.qi@linaro.org>
9608
9609 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
9610 and REVSH instructions.
9611
9612 2017-03-16 Yao Qi <yao.qi@linaro.org>
9613
9614 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
9615 (arm_record_test): Declare.
9616 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
9617 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
9618 align with the manual.
9619 (thumb_record_misc): Adjust the code order to align with the
9620 manual.
9621 (thumb2_record_decode_insn_handler): Fix instruction matching.
9622 (instruction_reader_thumb): New class.
9623 (arm_record_test): New function.
9624
9625 2017-03-16 Yao Qi <yao.qi@linaro.org>
9626
9627 * arm-tdep.c (abstract_memory_reader): New class.
9628 (instruction_reader): New class.
9629 (extract_arm_insn): Add argument 'reader'. Callers updated.
9630 (decode_insn): Likewise.
9631
9632 2017-03-16 Doug Evans <dje@google.com>
9633
9634 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
9635 member. Change type of TYPE member to SCM. All uses updated.
9636 (lsscm_make_lazy_string_smob): Add assert.
9637 (lsscm_make_lazy_string): Flag bad length values.
9638 (lsscm_elt_type): New function.
9639 (gdbscm_lazy_string_to_value): Rewrite to use
9640 lsscm_safe_lazy_string_to_value.
9641 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
9642 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
9643 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
9644 in incoming type.
9645 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9646 * guile/scm-type.c (tyscm_scm_to_type): New function.
9647
9648 2017-03-15 Doug Evans <dje@google.com>
9649
9650 PR python/17728, python/18439, python/18779
9651 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
9652 member. Change type of TYPE member to PyObject *. All uses updated.
9653 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
9654 (gdbpy_create_lazy_string_object): Flag bad length values.
9655 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
9656 Handle typedefs in incoming type.
9657 (stpy_lazy_string_elt_type): New function.
9658 (gdbpy_extract_lazy_string): Call it.
9659 * python/py-value.c (valpy_lazy_string): Flag bad length values.
9660 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
9661 typedefs in incoming type.
9662
9663 2017-03-16 Doug Evans <dje@google.com>
9664
9665 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9666 * guile/scm-type.c (tyscm_scm_to_type): New function.
9667
9668 2017-03-16 Jiong Wang <jiong.wang@arm.com>
9669
9670 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
9671 "ULONGEST" for "skip".
9672
9673 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9674
9675 PR gdb/21220
9676 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
9677 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
9678 (inf_ptrace_peek_poke): ...here. New function. Now also loop
9679 over ptrace peek/poke until end of buffer or error.
9680
9681 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
9682
9683 * parse.c (length_of_subexp): Make static.
9684 * parser-defs.h (length_of_subexp): Remove.
9685
9686 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
9687
9688 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9689 as well.
9690
9691 2017-03-14 Pedro Alves <palves@redhat.com>
9692
9693 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9694 (main): Use std::unique_ptr. Remove calls to
9695 cp_demangled_name_parse_free.
9696
9697 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9698
9699 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9700 alphabsd_store_inferior_registers): Use regcache->ptid instead
9701 of inferior_ptid.
9702
9703 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9704
9705 * aix-thread.c (aix_thread_fetch_registers,
9706 aix_thread_store_registers): Use regcache->ptid instead of
9707 inferior_ptid.
9708
9709 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9710
9711 * aarch64-linux-nat.c (fetch_gregs_from_thread,
9712 store_gregs_to_thread, fetch_fpregs_from_thread,
9713 store_fpregs_to_thread): Use regcache->ptid instead of
9714 inferior_ptid.
9715
9716 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9717
9718 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9719 amd64_linux_fetch_inferior_registers): Use regcache->ptid
9720 instead of inferior_ptid.
9721
9722 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9723
9724 * target.c (target_fetch_registers, target_store_registers): Add
9725 assert.
9726
9727 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
9728
9729 * regcache.h (regcache_get_ptid): New function.
9730 * regcache.c (regcache_get_ptid): New function.
9731
9732 2017-03-13 Mark Wielaard <mark@klomp.org>
9733
9734 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9735
9736 2017-03-10 Keith Seitz <keiths@redhat.com>
9737
9738 PR c++/8218
9739 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9740
9741 2017-03-08 Pedro Alves <palves@redhat.com>
9742
9743 PR gdb/18360
9744 * infrun.c (start_step_over, do_target_resume, resume)
9745 (restart_threads): Assert we're not resuming a thread that is
9746 meant to be stopped.
9747 (infrun_thread_stop_requested_callback): Delete.
9748 (infrun_thread_stop_requested): If the thread is internally
9749 stopped, queue a pending stop event and clear the thread's
9750 inline-frame state.
9751 (handle_stop_requested): New function.
9752 (handle_syscall_event, handle_inferior_event_1): Use
9753 handle_stop_requested.
9754 (handle_stop_requested): New function.
9755 (handle_signal_stop): Set the thread's stop_signal here instead of
9756 at caller.
9757 (finish_step_over): Clear step over info unconditionally.
9758 (handle_signal_stop): If the user had interrupted the event
9759 thread, consider the stop a random signal.
9760 (handle_signal_stop) <signal arrived while stepping over
9761 breakpoint>: Don't restart threads here.
9762 (stop_waiting): Don't clear step-over info here.
9763
9764 2017-03-08 Pedro Alves <palves@redhat.com>
9765
9766 PR 21206
9767 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
9768 goes to argument 2, not 1.
9769
9770 2017-03-08 Pedro Alves <palves@redhat.com>
9771
9772 PR cli/21218
9773 * top.c (gdb_readline_wrapper): Avoid passing NULL to
9774 display_gdb_prompt.
9775 (command_line_input): Add comment.
9776
9777 2017-03-08 Pedro Alves <palves@redhat.com>
9778
9779 PR tui/21216
9780 * tui/tui-file.c (tui_file::write): New.
9781 * tui/tui-file.h (tui_file): Override "write".
9782 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
9783 factored out from ...
9784 (tui_puts): ... here.
9785 (tui_putc): Use them.
9786 (tui_write): New function.
9787 * tui/tui-io.h (tui_write): Declare.
9788
9789 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
9790
9791 * Makefile.in (SFILES): Replace "environ.c" with
9792 "common/environ.c".
9793 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
9794 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
9795 to...
9796 * common/environ.c: ... here.
9797 * environ.h: Moved to...
9798 * common/environ.h: ... here.
9799
9800 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9801
9802 * gdbarch.sh (pstring_ptr): New static function.
9803 (gdbarch_disassembler_options): Use it.
9804 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
9805 not valid_disassembler_option->name.
9806 * gdbarch.c: Regenerate.
9807
9808 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
9809
9810 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
9811
9812 2017-03-07 Pedro Alves <palves@redhat.com>
9813
9814 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
9815
9816 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
9817
9818 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
9819 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
9820 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
9821 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
9822
9823 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
9824
9825 * xtensa-linux-nat.c (fetch_gregs): Remove const.
9826
9827 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
9828
9829 * remote.c (remote_add_target_side_commands): Use range-based
9830 for loop.
9831
9832 2017-03-03 Yao Qi <yao.qi@linaro.org>
9833
9834 PR gdb/21165
9835 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
9836 value is lazy.
9837 * valprint.c (common_val_print): Likewise.
9838
9839 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
9840
9841 * NEWS: Mention new set/show disassembler-options commands.
9842 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
9843 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
9844 (prospective_options): New static variable.
9845 (gdb_disassembler::gdb_disassembler): Initialize
9846 m_di.disassembler_options.
9847 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
9848 (get_disassembler_options): New function.
9849 (set_disassembler_options): Likewise.
9850 (set_disassembler_options_sfunc): Likewise.
9851 (show_disassembler_options_sfunc): Likewise.
9852 (disassembler_options_completer): Likewise.
9853 (_initialize_disasm): Likewise.
9854 * disasm.h (get_disassembler_options): New prototype.
9855 (set_disassembler_options): Likewise.
9856 * gdbarch.sh (gdbarch_disassembler_options): New variable.
9857 (gdbarch_verify_disassembler_options): Likewise.
9858 * gdbarch.c: Regenerate.
9859 * gdbarch.h: Likewise.
9860 * arm-tdep.c (num_disassembly_options): Delete.
9861 (set_disassembly_style): Likewise.
9862 (arm_disassembler_options): New static variable.
9863 (set_disassembly_style_sfunc): Convert short style name into long
9864 option name. Call set_disassembler_options.
9865 (show_disassembly_style_sfunc): New function.
9866 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
9867 set_gdbarch_verify_disassembler_options.
9868 (_initialize_arm_tdep): Delete regnames variable and update callers.
9869 (arm_disassembler_options): Initialize.
9870 (disasm_options): New variable.
9871 (num_disassembly_options): Rename from this...
9872 (num_disassembly_styles): ...to this. Compute by scanning through
9873 disasm_options.
9874 (valid_disassembly_styles): Initialize using disasm_options.
9875 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
9876 set_arm_regname_option.
9877 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
9878 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
9879 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
9880 set_gdbarch_verify_disassembler_options.
9881 * s390-tdep.c (s390_disassembler_options): New static variable.
9882 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
9883 set_gdbarch_verify_disassembler_options.
9884
9885 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9886
9887 * remote.c (remote_add_target_side_condition): Remove "struct"
9888 keyword from range-based for loop.
9889
9890 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9891
9892 * remote.c (remote_add_target_side_condition): Use range-based
9893 for loop. Update comment.
9894
9895 2017-02-27 Yao Qi <yao.qi@linaro.org>
9896
9897 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
9898
9899 2017-02-26 Alan Hayward <alan.hayward@arm.com>
9900
9901 * regcache.c (regcache_raw_update): New function.
9902 (regcache_raw_read): Move code to regcache_raw_update.
9903 * regcache.h (regcache_raw_update): New declaration.
9904 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
9905
9906 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
9907
9908 * dwarf2read.c (create_debug_type_hash_table): Initialize
9909 header.signature and header.type_offset_in_tu.
9910
9911 2017-02-24 Pedro Alves <palves@redhat.com>
9912
9913 * symtab.c (make_file_symbol_completion_list_1): Use
9914 add_symtab_completions.
9915
9916 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9917
9918 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
9919
9920 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9921
9922 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
9923 I386_MAX_REGISTER_SIZE.
9924 (i386_pseudo_register_write): Likewise.
9925 (i386_process_record): Likewise.
9926 * i387-tdep.c (i387_supply_xsave): Likewise.
9927 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
9928 (store_register): Likewise.
9929
9930 2017-02-23 Pedro Alves <palves@redhat.com>
9931
9932 * ada-lang.c: Include "common/function-view.h".
9933 (ada_iterate_over_symbols): Adjust to use function_view as
9934 callback type.
9935 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
9936 (ada_make_symbol_completion_list): Use a lambda.
9937 (ada_exc_search_name_matches): Delete.
9938 (name_matches_regex): New.
9939 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
9940 * compile/compile-c-support.c: Include "common/function-view.h".
9941 (print_one_macro): Change prototype to accept a ui_file pointer.
9942 (write_macro_definitions): Use a lambda.
9943 * dwarf2read.c: Include "common/function-view.h".
9944 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
9945 (dw2_expand_symtabs_matching): Adjust to use function_view as
9946 callback type.
9947 * language.h: Include "common/function-view.h".
9948 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
9949 function_view as callback type.
9950 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
9951 * linespec.c: Include "common/function-view.h".
9952 (collect_info::add_symbol): New method.
9953 (struct symbol_and_data_callback, iterate_inline_only, struct
9954 symbol_matcher_data, iterate_name_matcher): Delete.
9955 (iterate_over_all_matching_symtabs): Adjust to use function_view
9956 as callback type and lambdas.
9957 (iterate_over_file_blocks): Adjust to use function_view as
9958 callback type.
9959 (decode_compound_collector): Now a class with private fields.
9960 (decode_compound_collector::release_symbols): New method.
9961 (collect_one_symbol): Rename to...
9962 (decode_compound_collector::operator()): ... this and adjust.
9963 (lookup_prefix_sym): decode_compound_collector construction bits
9964 move to decode_compound_collector ctor. Pass the
9965 decode_compound_collector object directly as callback. Remove
9966 cleanups and use decode_compound_collector::release_symbols
9967 instead.
9968 (symtab_collector): Now a class with private fields.
9969 (symtab_collector::release_symtabs): New method.
9970 (add_symtabs_to_list): Rename to...
9971 (symtab_collector::operator()): ... this and adjust.
9972 (collect_symtabs_from_filename): symtab_collector construction
9973 bits move to symtab_collector ctor. Pass the symtab_collector
9974 object directly as callback. Remove cleanups and use
9975 symtab_collector::release_symtabs instead.
9976 (collect_symbols): Delete.
9977 (add_matching_symbols_to_info): Use lambdas.
9978 * macrocmd.c (print_macro_callback): Delete.
9979 (info_macro_command): Use a lambda.
9980 (info_macros_command): Pass print_macro_definition as callable
9981 directly.
9982 (print_one_macro): Remove 'ignore' parameter.
9983 (macro_list_command): Adjust.
9984 * macrotab.c (macro_for_each_data::fn): Now a function_view.
9985 (macro_for_each_data::user_data): Delete field.
9986 (foreach_macro): Adjust to call the function_view.
9987 (macro_for_each): Adjust to use function_view as callback type.
9988 (foreach_macro_in_scope): Adjust to call the function_view.
9989 (macro_for_each_in_scope): Adjust to use function_view as callback
9990 type.
9991 * macrotab.h: Include "common/function-view.h".
9992 (macro_callback_fn): Declare a prototype instead of a pointer.
9993 Remove "user_data" parameter.
9994 (macro_for_each, macro_for_each_in_scope): Adjust to use
9995 function_view as callback type.
9996 * psymtab.c (partial_map_expand_apply)
9997 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
9998 Adjust to use function_view as callback type and to return bool.
9999 (psym_expand_symtabs_matching): Adjust to use function_view as
10000 callback types.
10001 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
10002 to use function_view as callback type and to return bool.
10003 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
10004 callback types.
10005 * symfile.c (expand_symtabs_matching): Adjust to use function_view
10006 as callback types.
10007 * symfile.h: Include "common/function-view.h".
10008 (expand_symtabs_file_matcher_ftype)
10009 (expand_symtabs_symbol_matcher_ftype)
10010 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
10011 return bool.
10012 (quick_symbol_functions::map_symtabs_matching_filename)
10013 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
10014 function_view as callback type and return bool.
10015 (expand_symtabs_matching): Adjust to use function_view as callback
10016 type.
10017 (maintenance_expand_name_matcher)
10018 (maintenance_expand_file_matcher): Delete.
10019 (maintenance_expand_symtabs): Use lambdas.
10020 * symtab.c (iterate_over_some_symtabs): Adjust to use
10021 function_view as callback types and return bool.
10022 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
10023 of a cleanup.
10024 (lookup_symtab_callback): Delete.
10025 (lookup_symtab): Use a lambda.
10026 (iterate_over_symbols): Adjust to use function_view as callback
10027 type.
10028 (struct search_symbols_data, search_symbols_file_matches)
10029 (search_symbols_name_matches): Delete.
10030 (search_symbols): Use a pair of lambdas.
10031 (struct add_name_data, add_macro_name, symbol_completion_matcher)
10032 (symtab_expansion_callback): Delete.
10033 (default_make_symbol_completion_list_break_on_1): Use lambdas.
10034 * symtab.h: Include "common/function-view.h".
10035 (iterate_over_some_symtabs): Adjust to use function_view as
10036 callback type and return bool.
10037 (iterate_over_symtabs): Adjust to use function_view as callback
10038 type.
10039 (symbol_found_callback_ftype): Remove 'data' parameter and return
10040 bool.
10041 (iterate_over_symbols): Adjust to use function_view as callback
10042 type.
10043
10044 2017-02-23 Pedro Alves <palves@redhat.com>
10045
10046 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10047 (%.o) <unittests/%.c>: New pattern.
10048 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10049 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10050 * common/function-view.h: New file.
10051 * unittests/function-view-selftests.c: New file.
10052 * configure: Regenerate.
10053
10054 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
10055
10056 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10057 inferior_ptid.
10058 * go32-nat.c (go32_thread_alive): Likewise.
10059
10060 2017-02-23 Yao Qi <yao.qi@linaro.org>
10061
10062 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10063 delete.
10064
10065 2017-02-23 Yao Qi <yao.qi@linaro.org>
10066
10067 * varobj.c (varobj_clear_saved_item): Use delete instead of
10068 xfree.
10069 (update_dynamic_varobj_children): Likewise.
10070
10071 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10072
10073 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10074
10075 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
10076
10077 * common/enum-flags.h (enum_flags::enum_flags): Initialize
10078 m_enum_value to 0 in default constructor.
10079
10080 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
10081
10082 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10083 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10084 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10085 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10086 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10087 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10088 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10089 IS_STORE_CONDITIONAL_INSN.
10090
10091 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10092
10093 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10094
10095 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10096
10097 * NEWS (Changes since GDB 7.12): Add DWARF-5.
10098
10099 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10100
10101 * dwarf2read.c (skip_one_die, read_attribute_value)
10102 (dwarf2_const_value_attr, dump_die_shallow)
10103 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10104 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10105
10106 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10107
10108 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10109 (dwarf_parse_macro_header): Accept DWARF version 5.
10110 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10111
10112 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10113
10114 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10115 DW_AT_GNU_*.
10116 * common/common-exceptions.h (enum errors): Likewise.
10117 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10118 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10119 (dwarf_expr_context::execute_stack_op): Likewise.
10120 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10121 Likewise.
10122 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10123 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10124 (show_entry_values_debug, call_site_to_target_addr)
10125 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10126 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10127 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10128 (value_of_dwarf_block_entry, indirect_pieced_value)
10129 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
10130 (disassemble_dwarf_expression): Likewise.
10131 * dwarf2read.c (process_die, inherit_abstract_dies)
10132 (read_call_site_scope): Likewise.
10133 * gdbtypes.h (struct func_type, struct call_site_parameter)
10134 (struct call_site): Likewise.
10135 * stack.c (read_frame_arg): Likewise.
10136 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
10137
10138 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10139
10140 * defs.h (read_unsigned_leb128): New declaration.
10141 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
10142 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
10143 (dwarf2_find_location_expression): Call also
10144 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
10145 * dwarf2loc.h (dwarf2_version): New declaration.
10146 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
10147 rnglists.
10148 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
10149 .debug_rnglists.
10150 (struct dwop_section_names): Add loclists_dwo.
10151 (dwop_section_names): Add .debug_loclists.dwo.
10152 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
10153 (struct dwarf2_per_cu_data): Add dwarf_version.
10154 (struct dwo_sections): Add loclists.
10155 (struct attr_abbrev): Add implicit_const.
10156 (read_indirect_line_string): New declaration.
10157 (read_unsigned_leb128): Delete declaration.
10158 (rcuh_kind): New definition.
10159 (read_and_check_comp_unit_head): Change parameter
10160 is_debug_types_section to section_kind.
10161 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
10162 (read_comp_unit_head): Change parameter abfd to section, add parameter
10163 section_kind. Handle DWARF-5.
10164 (error_check_comp_unit_head): Accept also DWARF version 5.
10165 (read_and_check_comp_unit_head): Change parameter
10166 is_debug_types_section to section_kind.
10167 (read_and_check_type_unit_head): Delete function.
10168 (read_abbrev_offset): Handle DWARF-5.
10169 (create_debug_type_hash_table): Add parameter section_kind. Process
10170 only DW_UT_type. Use signature and type_offset_in_tu from struct
10171 comp_unit_head.
10172 (create_debug_types_hash_table): Update create_debug_type_hash_table
10173 caller.
10174 (create_all_type_units): Call create_debug_type_hash_table.
10175 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10176 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10177 caller.
10178 (skip_one_die): Handle DW_FORM_implicit_const.
10179 (dwarf2_rnglists_process): New function.
10180 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10181 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10182 (read_attribute_value): Handle DW_FORM_implicit_const,
10183 DW_FORM_line_strp.
10184 (read_attribute): Handle DW_FORM_implicit_const.
10185 (read_indirect_string_at_offset_from): New function from
10186 read_indirect_string_at_offset.
10187 (read_indirect_string_at_offset): Call
10188 read_indirect_string_at_offset_from.
10189 (read_indirect_line_string_at_offset): New function.
10190 (read_indirect_string): New function comment.
10191 (read_indirect_line_string): New function.
10192 (read_unsigned_leb128): Make it global.
10193 (dwarf2_string_attr): Handle DWARF-5.
10194 (add_include_dir_stub, read_formatted_entries): New functions.
10195 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10196 Handle DWARF-5.
10197 (per_cu_header_read_in): Update read_comp_unit_head caller.
10198 (dwarf2_version): New function.
10199 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10200 rnglists.
10201 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10202 fields.
10203
10204 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10205
10206 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10207
10208 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10209
10210 * dwarf2read.c (dwarf2_ranges_process): New function from
10211 dwarf2_ranges_read.
10212 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10213 dwarf2_ranges_process.
10214
10215 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10216
10217 * dwarf2read.c (create_debug_type_hash_table): New function from
10218 create_debug_types_hash_table.
10219 (create_debug_types_hash_table): Call create_debug_type_hash_table.
10220 (create_all_type_units, open_and_init_dwo_file): Update
10221 create_debug_types_hash_table callers.
10222
10223 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10224
10225 PR gdb/16188
10226 * fork-child.c (trace_start_error): Fix thinko. va_end should
10227 refer to 'ap', not 'args'.
10228
10229 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
10230 Pedro Alves <palves@redhat.com>
10231
10232 PR gdb/16188
10233 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
10234 calls succeeded.
10235 * fork-child.c (trace_start_error): New function.
10236 (trace_start_error_with_name): Likewise.
10237 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
10238 * inf-ptrace.c (inf_ptrace_me): Likewise.
10239 * inferior.h (trace_start_error): New prototype.
10240 (trace_start_error_with_name): Likewise.
10241
10242 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
10243
10244 PR gdb/21164
10245 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
10246 NULL before using it.
10247 * symmisc.c (maintenance_print_symbols): Likewise.
10248 (maintenance_print_msymbols): Likewise.
10249
10250 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10251
10252 * NEWS: Add record Python bindings entry.
10253
10254 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10255
10256 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
10257 py-record-full.o.
10258 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
10259 * python/py-record-btrace.c, python/py-record-btrace.h,
10260 python/py-record-full.c, python/py-record-full.h: New file.
10261 * python/py-record.c: Add include for py-record-btrace.h and
10262 py-record-full.h.
10263 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
10264 recpy_instruction_history, recpy_function_call_history, recpy_begin,
10265 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
10266 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
10267 New definition.
10268 (gdbpy_initialize_btrace): New export.
10269 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
10270
10271 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10272
10273 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
10274 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
10275 * python/py-record.c: New file.
10276 * python/python-internal.h (gdbpy_start_recording,
10277 gdbpy_current_recording, gdpy_stop_recording,
10278 gdbpy_initialize_record): New export.
10279 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
10280 (python_GdbMethods): Add gdbpy_start_recording,
10281 gdbpy_current_recording and gdbpy_stop_recording.
10282
10283 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10284
10285 * record-btrace.c (record_btrace_record_method): New function.
10286 (init_record_btrace_ops): Initialize to_record_method.
10287 * record-full.c (record_full_record_method): New function.
10288 (init_record_full_ops, init_record_full_core_ops): Add
10289 record_full_record_method.
10290 * record.h (enum record_method): New enum.
10291 * target-debug.h (target_debug_print_enum_record_method: New define.
10292 * target-delegates.c: Regenerate.
10293 * target.c (target_record_method): New function.
10294 * target.h: Include record.h.
10295 (struct target_ops) <to_record_method>: New field.
10296 (target_record_method): New export.
10297
10298 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10299
10300 * record.h (record_start, record_stop): New export.
10301 * record.c (record_start, record_stop): New function.
10302
10303 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10304
10305 * btrace.c (btrace_fetch): Copy function call segments pointer
10306 into a vector.
10307 (btrace_clear): Clear the vector.
10308 (btrace_find_insn_by_number): Use binary search to find the correct
10309 function call segment.
10310 * btrace.h (brace_fun_p): New typedef.
10311 (struct btrace_thread_info) <functions>: New field.
10312
10313 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10314
10315 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
10316 * btrace.c (btrace_decode_error): ... here. New function.
10317 * btrace.h (btrace_decode_error): New export.
10318
10319 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
10320
10321 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
10322 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
10323 btrace_find_insn_by_number): Remove special case for gaps.
10324 * btrace.h (btrace_insn_get_error): New export.
10325 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
10326 * record-btrace.c (btrace_insn_history): Print number for gaps.
10327 (record_btrace_info, record_btrace_goto): Handle gaps.
10328
10329 2017-02-14 Tom Tromey <tom@tromey.com>
10330
10331 PR python/13598:
10332 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
10333 event.
10334 * python/py-evts.c (gdbpy_initialize_py_events): Add
10335 before_prompt registry.
10336 * python/py-events.h (events_object) <before_prompt>: New field.
10337
10338 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
10339
10340 * btrace.c (ftrace_new_switch): Preserve up link and flags.
10341
10342 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
10343
10344 * symfile (_initialize_symfile): Add usage text to the load command's
10345 help text.
10346
10347 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
10348
10349 * utils.c (defaulted_query): Don't query on secondary UIs.
10350
10351 2017-02-10 Tom Tromey <tom@tromey.com>
10352
10353 * rust-lang.c (rust_get_disr_info): Remove unused variable.
10354
10355 2017-02-10 Tom Tromey <tom@tromey.com>
10356
10357 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
10358 "cleanup" local.
10359 * python/py-type.c (typy_legacy_template_argument): Remove
10360 unnecessary "cleanup" local.
10361
10362 2017-02-10 Tom Tromey <tom@tromey.com>
10363
10364 * python/python.c (do_start_initialization): New function, from
10365 _initialize_python.
10366 (_initialize_python): Call do_start_initialization.
10367 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
10368 goto.
10369
10370 2017-02-10 Tom Tromey <tom@tromey.com>
10371
10372 * python/py-prettyprint.c (pretty_print_one_value): Use
10373 gdbpy_ref.
10374
10375 2017-02-10 Tom Tromey <tom@tromey.com>
10376
10377 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
10378 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
10379 gdbpy_ref.
10380 * python/py-type.c (field_new): Use gdbpy_ref.
10381 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
10382 gdbpy_ref.
10383 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
10384 (py_free_pspace): Likewise.
10385 (pspace_to_pspace_object): Likewise.
10386 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
10387 (py_free_objfile): Likewise.
10388 (objfile_to_objfile_object): Likewise.
10389 * python/py-inferior.c (delete_thread_object): Use
10390 gdbpy_ref.
10391 (infpy_read_memory): Likewise.
10392 (py_free_inferior): Likewise.
10393 * python/py-evtregistry.c (create_eventregistry_object): Use
10394 gdbpy_ref.
10395 * python/py-event.c (create_event_object): Use gdbpy_ref.
10396
10397 2017-02-10 Tom Tromey <tom@tromey.com>
10398
10399 * python/py-ref.h (gdbpy_ref_policy): Now a template.
10400 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
10401 used.
10402 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
10403 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
10404 python/py-exitedevent.c, python/py-finishbreakpoint.c,
10405 python/py-framefilter.c, python/py-function.c,
10406 python/py-inferior.c, python/py-infevents.c,
10407 python/py-linetable.c, python/py-newobjfileevent.c,
10408 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
10409 python/py-signalevent.c, python/py-stopevent.c,
10410 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
10411 python/py-unwind.c, python/py-utils.c, python/py-value.c,
10412 python/py-varobj.c, python/py-xmethods.c, python/python.c,
10413 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
10414
10415 2017-02-10 Tom Tromey <tom@tromey.com>
10416
10417 * ui-out.h (ui_out_emit_type): New class.
10418 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
10419 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
10420 and ui_out_emit_tuple.
10421 (enumerate_locals): Likewise.
10422 (py_mi_print_variables, py_print_locals, py_print_args): Use
10423 ui_out_emit_list.
10424 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
10425 ui_out_emit_list.
10426 * common/gdb_optional.h: New file.
10427
10428 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
10429
10430 * MAINTAINERS (Write After Approval): Update my e-mail address.
10431
10432 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
10433
10434 PR gdb/21122
10435 * breakpoint.c (_initialize_breakpoint): Update the help description
10436 of the 'commands' command to indicate that it takes a list argument.
10437
10438 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
10439
10440 * interps.c (current_interp_set_logging): Remove "return".
10441
10442 2017-02-09 Gary Benson <gbenson@redhat.com>
10443
10444 * symtab.c (add_symtab_completions): Prevent NULL pointer
10445 dereference.
10446
10447 2017-02-08 Pedro Alves <palves@redhat.com>
10448
10449 * interps.c (interp::interp): Remove reference to quiet_p.
10450 (interp_set): Make static. Remove dead "Switching to" output
10451 code.
10452 (interp_quiet_p, interp_set_quiet): Delete.
10453 (interpreter_exec_cmd): Don't set the interpreter quiet.
10454 * interps.h (interp_quiet_p): Make static.
10455 (class interp) <quiet_p>: Remove field
10456
10457 2017-02-08 Jerome Guitton <guitton@adacore.com>
10458
10459 * cli/cli-decode.c (find_command_name_length): Make it extern.
10460 * cli/cli-decode.h (find_command_name_length): Declare.
10461 * cli/cli-script.c (command_name_equals, line_first_arg):
10462 New functions.
10463 (process_next_line): Use cli-decode to parse command names.
10464 (build_command_line): Make args a constant pointer.
10465
10466 2017-02-08 Jerome Guitton <guitton@adacore.com>
10467
10468 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
10469 Remove case-insensitive search.
10470
10471 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
10472
10473 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
10474 at the end of the line. Avoids an ARI warning.
10475
10476 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
10477
10478 * NEWS: Mention support for record/replay of Intel 64 rdrand and
10479 rdseed instructions.
10480 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
10481
10482 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
10483
10484 PR tdep/20936
10485 Provide and use sparc32 and sparc64 target description XML files.
10486 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
10487 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
10488 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
10489 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
10490 * features/sparc/sparc32-solaris.xml: New file.
10491 * features/sparc/sparc64-solaris.xml: New file.
10492 * features/sparc/sparc32-solaris.c: Generated.
10493 * features/sparc/sparc64-solaris.c: Generated.
10494 * sparc-tdep.h: Account for differences in target descriptions.
10495 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
10496 (sparc32_register_type): Use target provided registers.
10497 (validate_tdesc_registers): New function.
10498 (sparc32_gdbarch_init): Use tdesc_has_registers.
10499 Set pseudoregister functions.
10500 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
10501 (sparc64_register_type): Use target provided registers.
10502 (sparc64_init_abi): Set pseudoregister functions.
10503
10504 2017-02-03 Tom Tromey <tom@tromey.com>
10505
10506 PR rust/21097:
10507 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
10508 with a single member.
10509
10510 2017-02-03 Pedro Alves <palves@redhat.com>
10511
10512 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
10513 (cli_interp_base::~cli_interp_base): New.
10514 (cli_interp): New struct.
10515 (as_cli_interp): Cast the interp itself to cli_interp.
10516 (cli_interpreter_pre_command_loop): Rename to ...
10517 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
10518 parameter.
10519 (cli_interpreter_init): Rename to ...
10520 (cli_interp::init): ... this. Remove 'self' parameter. Use
10521 boolean. Make extern.
10522 (cli_interpreter_resume): Rename to ...
10523 (cli_interp::resume): ... this. Remove 'data' parameter. Make
10524 extern.
10525 (cli_interpreter_suspend): Rename to ...
10526 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
10527 extern.
10528 (cli_interpreter_exec): Rename to ...
10529 (cli_interp::exec): ... this. Remove 'data' parameter. Make
10530 extern.
10531 (cli_interpreter_supports_command_editing): Rename to ...
10532 (cli_interp_base::supports_command_editing): ... this. Remove
10533 'interp' parameter. Make extern.
10534 (cli_ui_out): Rename to ...
10535 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
10536 Make extern.
10537 (cli_set_logging): Rename to ...
10538 (cli_interp_base::set_logging): ... this. Remove 'interp'
10539 parameter. Make extern.
10540 (cli_interp_procs): Delete.
10541 (cli_interp_factory): Adjust to use "new".
10542 * cli/cli-interp.h: Include "interps.h".
10543 (struct cli_interp_base): New struct.
10544 * interps.c (struct interp): Delete. Fields moved to interps.h.
10545 (interp_new): Delete.
10546 (interp::interp, interp::~interp): New.
10547 (interp_set): Use bool, and return void. Assume the interpreter
10548 has suspend, init and resume methods, and that the all return
10549 void.
10550 (set_top_level_interpreter): interp_set returns void.
10551 (interp_ui_out): Adapt.
10552 (current_interp_set_logging): Adapt.
10553 (interp_data): Delete.
10554 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
10555 (interp_exec): Adapt.
10556 (top_level_interpreter_data): Delete.
10557 * interps.h (interp_init_ftype, interp_resume_ftype)
10558 (interp_suspend_ftype, interp_exec_ftype)
10559 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
10560 (class interp): New.
10561 (interp_new): Delete.
10562 (interp_set): Now returns void. Use bool.
10563 (interp_data, top_level_interpreter_data): Delete.
10564 * mi/mi-common.h: Include interps.h.
10565 (class mi_interp): Inherit from interp. Define a ctor. Declare
10566 init, resume, suspect, exec, interp_ui_out, set_logging and
10567 pre_command_loop methods.
10568 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
10569 (mi_interpreter_init): Rename to ...
10570 (mi_interp::init): ... this. Remove the 'interp' parameter, use
10571 bool, return void and make extern. Adjust.
10572 (mi_interpreter_resume): ... Rename to ...
10573 (mi_interp::resume): ... this. Remove the 'data' parameter,
10574 return void and make extern. Adjust.
10575 (mi_interpreter_suspend): ... Rename to ...
10576 (mi_interp::suspend): ... this. Remove the 'data' parameter,
10577 return void and make extern. Adjust.
10578 (mi_interpreter_exec): ... Rename to ...
10579 (mi_interp::exec): ... this. Remove the 'data' parameter and make
10580 extern. Adjust.
10581 (mi_interpreter_pre_command_loop): ... Rename to ...
10582 (mi_interp::pre_command_loop): ... this. Remove the 'self'
10583 parameter and make extern.
10584 (mi_on_normal_stop_1): Adjust.
10585 (mi_ui_out): Rename to ...
10586 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
10587 parameter and make extern. Adjust.
10588 (mi_set_logging): Rename to ...
10589 (mi_interp::set_logging): ... this. Remove the 'interp'
10590 parameter and make extern. Adjust.
10591 (mi_interp_procs): Delete.
10592 (mi_interp_factory): Adjust to use 'new'.
10593 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
10594 (mi_print_exception, mi_execute_command, mi_load_progress):
10595 Adjust.
10596 * tui/tui-interp.c (tui_interp): New class.
10597 (as_tui_interp): Return a tui_interp pointer.
10598 (tui_on_normal_stop, tui_on_signal_received)
10599 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
10600 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
10601 to use interp::interp_ui_out.
10602 (tui_init): Rename to ...
10603 (tui_interp::init): ... this. Remove the 'self' parameter, use
10604 bool, return void and make extern. Adjust.
10605 (tui_resume): Rename to ...
10606 (tui_interp::resume): ... this. Remove the 'data' parameter,
10607 return void and make extern. Adjust.
10608 (tui_suspend): Rename to ...
10609 (tui_interp::suspend): ... this. Remove the 'data' parameter,
10610 return void and make extern. Adjust.
10611 (tui_ui_out): Rename to ...
10612 (tui_interp::interp_ui_out): ... this. Remove the 'self'
10613 parameter, and make extern. Adjust.
10614 (tui_exec): Rename to ...
10615 (tui_interp::exec): ... this. Remove the 'data' parameter and
10616 make extern.
10617 (tui_interp_procs): Delete.
10618 (tui_interp_factory): Use "new".
10619
10620 2017-02-02 Tom Tromey <tom@tromey.com>
10621
10622 * rust-exp.y (ends_raw_string, space_then_number)
10623 (rust_identifier_start_p): Return bool.
10624 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
10625 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
10626 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
10627 (rust_chartype_p): Return bool.
10628 (val_print_struct, rust_print_struct_def, rust_print_type):
10629 Update.
10630 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
10631 Return bool.
10632
10633 2017-02-02 Tom Tromey <tom@tromey.com>
10634
10635 * rust-lang.c: Reindent.
10636
10637 2017-02-02 Tom Tromey <tom@tromey.com>
10638
10639 * rust-lang.h (rust_crate_for_block): Update.
10640 * rust-lang.c (rust_crate_for_block): Return std::string.
10641 (rust_get_disr_info): Use std:;string, not
10642 gdb::unique_xmalloc_ptr.
10643 * rust-exp.y (crate_name): Update.
10644
10645 2017-02-02 Pedro Alves <palves@redhat.com>
10646
10647 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
10648 field out of gdb_disassembler_test and make it static.
10649
10650 2017-02-02 Pedro Alves <palves@redhat.com>
10651
10652 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
10653 mi1_interp and mi_interp fields.
10654
10655 2017-02-02 Pedro Alves <palves@redhat.com>
10656
10657 * cli/cli-interp.c (struct saved_output_files, saved_output):
10658 Moved from cli/cli-logging.c.
10659 (cli_set_logging): New function.
10660 (cli_interp_procs): Install cli_set_logging.
10661 * cli/cli-interp.h (make_logging_output, cli_set_logging):
10662 Declare.
10663 * cli/cli-logging.c (struct saved_output_files, saved_output):
10664 Moved to cli/cli-interp.c.
10665 (pop_output_files): Don't save outputs here.
10666 (make_logging_output): New function.
10667 (handle_redirections): Don't build tee nor save previous outputs
10668 here.
10669 * interps.c (current_interp_set_logging): Change prototype.
10670 Assume there's always a set_logging_proc method installed.
10671 * interps.h (interp_set_logging_ftype): Change prototype.
10672 (current_interp_set_logging): Change prototype and adjust comment.
10673 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
10674 use make_logging_output.
10675 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
10676 2017-02-02 Pedro Alves <palves@redhat.com>
10677
10678 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10679 from ...
10680 (set_logging_overwrite): ... here.
10681 (logging_no_redirect_file): Delete.
10682 (set_logging_redirect): Don't handle redirection on the fly.
10683 Instead warn that "logging off" / "logging on" is necessary.
10684 (pop_output_files): Delete references to logging_no_redirect_file.
10685 (show_logging_command): Always speak in terms of what will happen
10686 once logging is reenabled.
10687
10688 2017-02-02 Pedro Alves <palves@redhat.com>
10689
10690 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10691
10692 2017-02-02 Pedro Alves <palves@redhat.com>
10693
10694 * disasm.c (gdb_pretty_print_insn): Rename to ...
10695 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10696 Remove gdbarch parameter. Adapt to clear the object's buffers
10697 instead of allocating new buffers, and to print using the object's
10698 gdb_disassembler instead of calling gdb_print_insn.
10699 (dump_insns): Use gdb_pretty_print_disassembler.
10700 * disasm.h (gdb_pretty_print_insn): Delete declaration.
10701 (gdb_pretty_print_disassembler): New class.
10702 * record-btrace.c (btrace_insn_history): Use
10703 gdb_pretty_print_disassembler.
10704
10705 2017-02-02 Pedro Alves <palves@redhat.com>
10706
10707 * ada-lang.c (type_as_string): Use string_file.
10708 * ada-valprint.c (ada_print_floating): Use string_file.
10709 * ada-varobj.c (ada_varobj_scalar_image)
10710 (ada_varobj_get_value_image): Use string_file.
10711 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10712 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10713 * breakpoint.c (update_inserted_breakpoint_locations)
10714 (insert_breakpoint_locations, reattach_breakpoints)
10715 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10716 (print_it_watchpoint): Use string_file.
10717 (save_breakpoints): Use stdio_file.
10718 * c-exp.y (oper): Use string_file.
10719 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10720 tee_file.
10721 (pop_output_files): Use delete.
10722 (handle_redirections): Use stdio_file and tee_file.
10723 * cli/cli-setshow.c (do_show_command): Use string_file.
10724 * compile/compile-c-support.c (c_compute_program): Use
10725 string_file.
10726 * compile/compile-c-symbols.c (generate_vla_size): Take a
10727 'string_file &' instead of a 'ui_file *'.
10728 (generate_c_for_for_one_variable): Take a 'string_file &' instead
10729 of a 'ui_file *'. Use string_file.
10730 (generate_c_for_variable_locations): Take a 'string_file &'
10731 instead of a 'ui_file *'.
10732 * compile/compile-internal.h (generate_c_for_for_one_variable):
10733 Take a 'string_file &' instead of a 'ui_file *'.
10734 * compile/compile-loc2c.c (push, pushf, unary, binary)
10735 (print_label, pushf_register_address, pushf_register)
10736 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10737 'ui_file *'. Adjust.
10738 * compile/compile.c (compile_to_object): Use string_file.
10739 * compile/compile.h (compile_dwarf_expr_to_c)
10740 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10741 'ui_file *'.
10742 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10743 (replace_typedefs_qualified_name): Use string_file and
10744 obstack_copy0.
10745 * disasm.c (gdb_pretty_print_insn): Use string_file.
10746 (gdb_disassembly): Adjust reference the null_stream global.
10747 (do_ui_file_delete): Delete.
10748 (gdb_insn_length): Use null_stream.
10749 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10750 * dwarf2loc.c (dwarf2_compile_property_to_c)
10751 (locexpr_generate_c_location, loclist_generate_c_location): Take a
10752 'string_file &' instead of a 'ui_file *'.
10753 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10754 * dwarf2read.c (do_ui_file_peek_last): Delete.
10755 (dwarf2_compute_name): Use string_file.
10756 * event-top.c (gdb_setup_readline): Use stdio_file.
10757 * gdbarch.sh (verify_gdbarch): Use string_file.
10758 * gdbtypes.c (safe_parse_type): Use null_stream.
10759 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10760 string_file.
10761 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10762 'string_file *' instead of a 'ui_file *'.
10763 (gdbscm_arch_disassemble): Use string_file.
10764 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
10765 * guile/scm-ports.c (class ioscm_file_port): Now a class that
10766 inherits from ui_file.
10767 (ioscm_file_port_delete, ioscm_file_port_rewind)
10768 (ioscm_file_port_put): Delete.
10769 (ioscm_file_port_write): Rename to ...
10770 (ioscm_file_port::write): ... this. Remove file_port_magic
10771 checks.
10772 (ioscm_file_port_new): Delete.
10773 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
10774 ui_file_up.
10775 * guile/scm-type.c (tyscm_type_name): Use string_file.
10776 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
10777 Use string_file.
10778 * infcmd.c (print_return_value_1): Use string_file.
10779 * infrun.c (print_target_wait_results): Use string_file.
10780 * language.c (add_language): Use string_file.
10781 * location.c (explicit_to_string_internal): Use string_file.
10782 * main.c (captured_main_1): Use null_file.
10783 * maint.c (maintenance_print_architecture): Use stdio_file.
10784 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
10785 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
10786 event_channel>: Change type to mi_console_file pointer.
10787 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
10788 (mi_console_file_delete): Delete.
10789 (struct mi_console_file): Delete.
10790 (mi_console_file_magic): Delete.
10791 (mi_console_file_new): Delete.
10792 (mi_console_file::mi_console_file): New.
10793 (mi_console_file_delete): Delete.
10794 (mi_console_file_fputs): Delete.
10795 (mi_console_file::write): New.
10796 (mi_console_raw_packet): Delete.
10797 (mi_console_file::flush): New.
10798 (mi_console_file_flush): Delete.
10799 (mi_console_set_raw): Rename to ...
10800 (mi_console_file::set_raw): ... this.
10801 * mi/mi-console.h (class mi_console_file): New class.
10802 (mi_console_file_new, mi_console_set_raw): Delete.
10803 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
10804 (mi_set_logging): Use delete and tee_file. Adjust.
10805 * mi/mi-main.c (output_register): Use string_file.
10806 (mi_cmd_data_evaluate_expression): Use string_file.
10807 (mi_cmd_data_read_memory): Use string_file.
10808 (mi_cmd_execute, print_variable_or_computed): Use string_file.
10809 * mi/mi-out.c (mi_ui_out::main_stream): New.
10810 (mi_ui_out::rewind): Use main_stream and
10811 string_file.
10812 (mi_ui_out::put): Use main_stream and string_file.
10813 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10814 Allocate a 'string_file' instead.
10815 (mi_out_new): Don't allocate a mem_fileopen stream here.
10816 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10817 (mi_ui_out::main_stream): Declare method.
10818 * printcmd.c (eval_command): Use string_file.
10819 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
10820 * python/py-arch.c (archpy_disassemble): Use string_file.
10821 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
10822 * python/py-frame.c (frapy_str): Use string_file.
10823 * python/py-framefilter.c (py_print_type, py_print_single_arg):
10824 Use string_file.
10825 * python/py-type.c (typy_str): Use string_file.
10826 * python/py-unwind.c (unwind_infopy_str): Use string_file.
10827 * python/py-value.c (valpy_str): Use string_file.
10828 * record-btrace.c (btrace_insn_history): Use string_file.
10829 * regcache.c (regcache_print): Use stdio_file.
10830 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
10831 * remote.c (escape_buffer): Use string_file.
10832 * rust-lang.c (rust_get_disr_info): Use string_file.
10833 * serial.c (serial_open_ops_1): Use stdio_file.
10834 (do_serial_close): Use delete.
10835 * stack.c (print_frame_arg): Use string_file.
10836 (print_frame_args): Remove local mem_fileopen stream, not used.
10837 (print_frame): Use string_file.
10838 * symmisc.c (maintenance_print_symbols): Use stdio_file.
10839 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
10840 Take a 'string_file *' instead of a 'ui_file *'.
10841 * top.c (new_ui): Use stdio_file and stderr_file.
10842 (free_ui): Use delete.
10843 (execute_command_to_string): Use string_file.
10844 (quit_confirm): Use string_file.
10845 * tracepoint.c (collection_list::append_exp): Use string_file.
10846 * tui/tui-disasm.c (tui_disassemble): Use string_file.
10847 * tui/tui-file.c: Don't include "ui-file.h".
10848 (enum streamtype, struct tui_stream): Delete.
10849 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
10850 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
10851 (tui_file::tui_file): New method.
10852 (tui_file_fputs): Delete.
10853 (tui_file_get_strbuf): Delete.
10854 (tui_file::puts): New method.
10855 (tui_file_adjust_strbuf): Delete.
10856 (tui_file_flush): Delete.
10857 (tui_file::flush): New method.
10858 * tui/tui-file.h: Tweak intro comment.
10859 Include ui-file.h.
10860 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
10861 (tui_file_adjust_strbuf): Delete declarations.
10862 (class tui_file): New class.
10863 * tui/tui-io.c (tui_initialize_io): Use tui_file.
10864 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
10865 (tui_register_format): Use string_stream.
10866 * tui/tui-stack.c (tui_make_status_line): Use string_file.
10867 (tui_get_function_from_frame): Use string_file.
10868 * typeprint.c (type_to_string): Use string_file.
10869 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
10870 (null_stream): New global.
10871 (ui_file_delete): Delete.
10872 (ui_file::ui_file): New.
10873 (null_file_isatty): Delete.
10874 (ui_file::~ui_file): New.
10875 (null_file_rewind): Delete.
10876 (ui_file::printf): New.
10877 (null_file_put): Delete.
10878 (null_file_flush): Delete.
10879 (ui_file::putstr): New.
10880 (null_file_write): Delete.
10881 (ui_file::putstrn): New.
10882 (null_file_read): Delete.
10883 (ui_file::putc): New.
10884 (null_file_fputs): Delete.
10885 (null_file_write_async_safe): Delete.
10886 (ui_file::vprintf): New.
10887 (null_file_delete): Delete.
10888 (null_file::write): New.
10889 (null_file_fseek): Delete.
10890 (null_file::puts): New.
10891 (ui_file_data): Delete.
10892 (null_file::write_async_safe): New.
10893 (gdb_flush, ui_file_isatty): Adjust.
10894 (ui_file_put, ui_file_rewind): Delete.
10895 (ui_file_write): Adjust.
10896 (ui_file_write_for_put): Delete.
10897 (ui_file_write_async_safe, ui_file_read): Adjust.
10898 (ui_file_fseek): Delete.
10899 (fputs_unfiltered): Adjust.
10900 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
10901 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
10902 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
10903 (set_ui_file_data): Delete.
10904 (string_file::~string_file, string_file::write)
10905 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
10906 (do_ui_file_as_string, ui_file_as_string): Delete.
10907 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
10908 (struct mem_file): Delete.
10909 (mem_file_new): Delete.
10910 (stdio_file::stdio_file): New.
10911 (mem_file_delete): Delete.
10912 (stdio_file::stdio_file): New.
10913 (mem_fileopen): Delete.
10914 (stdio_file::~stdio_file): New.
10915 (mem_file_rewind): Delete.
10916 (stdio_file::set_stream): New.
10917 (mem_file_put): Delete.
10918 (stdio_file::open): New.
10919 (mem_file_write): Delete.
10920 (stdio_file_magic, struct stdio_file): Delete.
10921 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
10922 (stdio_file::flush): New.
10923 (stdio_file_read): Rename to ...
10924 (stdio_file::read): ... this. Adjust.
10925 (stdio_file_write): Rename to ...
10926 (stdio_file::write): ... this. Adjust.
10927 (stdio_file_write_async_safe): Rename to ...
10928 (stdio_file::write_async_safe) ... this. Adjust.
10929 (stdio_file_fputs): Rename to ...
10930 (stdio_file::puts) ... this. Adjust.
10931 (stdio_file_isatty): Delete.
10932 (stdio_file_fseek): Delete.
10933 (stdio_file::isatty): New.
10934 (stderr_file_write): Rename to ...
10935 (stderr_file::write) ... this. Adjust.
10936 (stderr_file_fputs): Rename to ...
10937 (stderr_file::puts) ... this. Adjust.
10938 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
10939 (stderr_file::stderr_file): New.
10940 (tee_file_magic): Delete.
10941 (struct tee_file): Delete.
10942 (tee_file::tee_file): New.
10943 (tee_file_new): Delete.
10944 (tee_file::~tee_file): New.
10945 (tee_file_delete): Delete.
10946 (tee_file_flush): Rename to ...
10947 (tee_file::flush): ... this. Adjust.
10948 (tee_file_write): Rename to ...
10949 (tee_file::write): ... this. Adjust.
10950 (tee_file::write_async_safe): New.
10951 (tee_file_fputs): Rename to ...
10952 (tee_file::puts): ... this. Adjust.
10953 (tee_file_isatty): Rename to ...
10954 (tee_file::isatty): ... this. Adjust.
10955 * ui-file.h (struct obstack, struct ui_file): Don't
10956 forward-declare.
10957 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
10958 (ui_file_write_ftype)
10959 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
10960 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
10961 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
10962 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
10963 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
10964 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
10965 (set_ui_file_fseek): Delete.
10966 (ui_file_data, ui_file_delete, ui_file_rewind)
10967 (struct ui_file): New.
10968 (ui_file_up): New.
10969 (class null_file): New.
10970 (null_stream): Declare.
10971 (ui_file_write_for_put, ui_file_put): Delete.
10972 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
10973 Delete.
10974 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
10975 (gdb_fopen, tee_file_new): Delete.
10976 (struct string_file): New.
10977 (struct stdio_file): New.
10978 (stdio_file_up): New.
10979 (struct stderr_file): New.
10980 (class tee_file): New.
10981 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
10982 of a 'ui_file *'. Adjust.
10983 * ui-out.h (class ui_out) <field_stream>: Likewise.
10984 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
10985 (null_stream): Delete.
10986 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
10987 Adjust.
10988 * utils.h (struct ui_file): Delete forward declaration..
10989 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
10990 (error_stream): Take a 'string_file &' instead of a
10991 'ui_file *'.
10992 * varobj.c (varobj_value_get_print_value): Use string_file.
10993 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
10994 * gdbarch.c: Regenerate.
10995
10996 2017-02-02 Pedro Alves <palves@redhat.com>
10997
10998 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
10999 (gdb_pretty_print_insn): ... this. Now a free function. Add back
11000 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
11001 Adjust to call gdb_print_insn instead of
11002 gdb_disassembler::print_insn.
11003 (dump_insns, do_mixed_source_and_assembly_deprecated)
11004 (do_mixed_source_and_assembly, do_assembly_only): Add back a
11005 'gdbarch' parameter. Remove gdb_disassembler parameter.
11006 (gdb_disassembly): Don't allocate a gdb_disassembler here.
11007 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
11008 declaration.
11009 (gdb_pretty_print_insn): Re-add declaration.
11010 * record-btrace.c (btrace_insn_history): Don't allocate a
11011 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
11012
11013 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
11014
11015 * disasm.h (gdb_disassembly): Remove file_string parameter.
11016 * disasm.c (gdb_disassembly): Likewise.
11017 * cli/cli-cmds.c (print_disassembly): Adapt.
11018 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
11019 * stack.c (do_gdb_disassembly): Likewise.
11020
11021 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
11022
11023 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
11024 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
11025 targets. And if the implicit value is longer than needed, extract
11026 the first bytes instead of the "least significant" ones.
11027
11028 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
11029
11030 * btrace.c (btrace_enable): Do not call btrace_add_pc for
11031 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
11032 (btrace_fetch): Assert can_access_registers_ptid.
11033 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
11034 validate_registers_access.
11035
11036 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
11037
11038 * gdbthread.h (can_access_registers_ptid): New.
11039 * thread.c (can_access_registers_ptid): New.
11040
11041 2017-02-01 Pedro Alves <palves@redhat.com>
11042
11043 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
11044
11045 2017-01-31 Pedro Alves <palves@redhat.com>
11046
11047 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11048 Fix typos.
11049
11050 2017-01-31 Pedro Alves <palves@redhat.com>
11051
11052 * stack.c (print_frame_args): Remove local mem_fileopen stream,
11053 not used.
11054
11055 2017-01-31 Pedro Alves <palves@redhat.com>
11056
11057 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11058
11059 2017-01-31 Pedro Alves <palves@redhat.com>
11060
11061 * common/scoped_restore.h
11062 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11063 change the value's parameter type to T2.
11064 (make_scoped_restore): Likewise.
11065
11066 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11067 Richard Henderson <rth@redhat.com>
11068
11069 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11070 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11071 GS_BASE for older kernels.
11072 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11073 GS_BASE for older kernels.
11074 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11075 and GS_BASE to the offset table.
11076 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11077 system register group.
11078 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11079 for older kernels.
11080 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11081 amd64 ABI.
11082 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11083 AMD64_GSBASE_REGNUM.
11084 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11085 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11086 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11087 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11088 i386/64bit-segments.xml in those rules.
11089 * features/i386/64bit-segments.xml: New file.
11090 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11091 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11092 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11093 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11094 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11095 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11096 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11097 * features/i386/amd64-avx-linux.c: Regenerated.
11098 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11099 * features/i386/amd64-avx-mpx.c: Regenerated.
11100 * features/i386/amd64-avx512-linux.c: Regenerated.
11101 * features/i386/amd64-linux.c: Regenerated.
11102 * features/i386/amd64-mpx-linux.c: Regenerated.
11103 * features/i386/i386-avx-mpx-linux.c: Regenerated.
11104 * features/i386/i386-avx-mpx.c: Regenerated.
11105 * features/i386/x32-avx-linux.c: Regenerated.
11106 * features/i386/x32-avx512-linux.c: Regenerated.
11107 * regformats/i386/amd64-avx-linux.dat: Regenerated.
11108 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11109 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11110 * regformats/i386/amd64-linux.dat: Regenerated.
11111 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11112 * regformats/i386/x32-avx-linux.dat: Regenerated.
11113 * regformats/i386/x32-avx512-linux.dat: Regenerated.
11114 * regformats/i386/x32-linux.dat: Regenerated.
11115
11116 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11117
11118 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11119 Set to AMD64_NUM_REGS.
11120
11121 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
11122
11123 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11124 that checks validity of a register number.
11125
11126 2017-01-27 Kees Cook <keescook@google.com>
11127
11128 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
11129 fetch_fpregs if target has fpa registers.
11130 (arm_linux_store_inferior_registers): Call store_fpregs if target
11131 has fpa registers.
11132
11133 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
11134
11135 * cris-tdep.c (cris_gdbarch_init): Remove check for
11136 info.byte_order and force it to BFD_ENDIAN_LITTLE.
11137
11138 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
11139
11140 * corelow.c (get_core_register_section): Check for regset
11141 existence before checking for REGSET_VARIABLE_SIZE.
11142
11143 2017-01-26 Yao Qi <yao.qi@linaro.org>
11144 Pedro Alves <palves@redhat.com>
11145
11146 PR gdb/20939
11147 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
11148 call memory_error, save memaddr instead.
11149 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
11150 negative, cal memory_error.
11151 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
11152
11153 2017-01-26 Yao Qi <yao.qi@linaro.org>
11154
11155 * disasm-selftests.c (memory_error_test): New function.
11156 (_initialize_disasm_selftests): Register memory_error_test.
11157
11158 2017-01-26 Yao Qi <yao.qi@linaro.org>
11159
11160 * Makefile.in (SFILES): Add disasm-selftests.c and
11161 selftest-arch.c.
11162 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
11163 * disasm-selftests.c: New file.
11164 * selftest-arch.c: New file.
11165 * selftest-arch.h: New file.
11166
11167 2017-01-26 Yao Qi <yao.qi@linaro.org>
11168
11169 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
11170 to bfd_arch_mep. Don't return 0 if section is not
11171 found. Call print_insn_mep.
11172
11173 2017-01-26 Pedro Alves <palves@redhat.com>
11174 Yao Qi <yao.qi@linaro.org>
11175
11176 * arm-tdep.c: Include "disasm.h".
11177 (gdb_print_insn_arm): Update code to get gdbarch.
11178 * disasm.c (dis_asm_read_memory): Change it to
11179 gdb_disassembler::dis_asm_read_memory.
11180 (dis_asm_memory_error): Likewise.
11181 (dis_asm_print_address): Likewise.
11182 (gdb_pretty_print_insn): Change it to
11183 gdb_disassembler::pretty_print_insn.
11184 (dump_insns): Add one argument gdb_disassemlber. All
11185 callers updated.
11186 (do_mixed_source_and_assembly_deprecated): Likewise.
11187 (do_mixed_source_and_assembly): Likewise.
11188 (do_assembly_only): Likewise.
11189 (gdb_disassembler::gdb_disassembler): New.
11190 (gdb_disassembler::print_insn): New.
11191 * disasm.h (class gdb_disassembler): New.
11192 (gdb_pretty_print_insn): Remove declaration.
11193 (gdb_disassemble_info): Likewise.
11194 * guile/scm-disasm.c (class gdbscm_disassembler): New.
11195 (gdbscm_disasm_read_memory_worker): Update.
11196 (gdbscm_disasm_read_memory): Update.
11197 (gdbscm_disasm_memory_error): Remove.
11198 (gdbscm_disasm_print_address): Remove.
11199 (gdbscm_disassembler::gdbscm_disassembler): New.
11200 (gdbscm_print_insn_from_port): Update.
11201 * mips-tdep.c: Include disasm.h.
11202 (gdb_print_insn_mips): Update code to get gdbarch.
11203 * record-btrace.c (btrace_insn_history): Update.
11204 * spu-tdep.c: Include disasm.h.
11205 (struct spu_dis_asm_data): Remove.
11206 (struct spu_dis_asm_info): New.
11207 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11208 SPU id.
11209 (gdb_print_insn_spu): Cast disassemble_info to
11210 spu_dis_asm_info.
11211
11212 2017-01-26 Yao Qi <yao.qi@linaro.org>
11213
11214 * disasm.c (do_ui_file_delete): Delete.
11215 (gdb_insn_length): Move code creating stream to ...
11216 * utils.c (null_stream): ... here. New function.
11217 * utils.h (null_stream): Declare.
11218
11219 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
11220
11221 * python/py-inferior.c (find_thread_object): Return directly
11222 from the loop. Remove "found" variable.
11223
11224 2017-01-21 Joel Brobecker <brobecker@adacore.com>
11225
11226 GDB 7.12.1 released.
11227
11228 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11229
11230 * python/py-function.c (fnpy_call): Reorder declarations to have
11231 the gdbpy_enter object declared first.
11232 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11233
11234 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
11235
11236 PR python/21068
11237 * python/python-internal.h (PyMem_RawMalloc): Define for
11238 Python < 3.4.
11239 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
11240 PyMem_RawMalloc instead of PyMem_Malloc.
11241
11242 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
11243 Luis Machado <lgustavo@codesourcery.com>
11244
11245 * NEWS (New commands): Mention flash-erase.
11246 (New MI commands): Mention target-flash-erase.
11247 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
11248 command.
11249 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
11250 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
11251 * target.c (flash_erase_command): New function.
11252 (initialize_targets): Add new flash-erase command.
11253 * target.h (flash_erase_command): New declaration.
11254
11255 2017-01-20 Joel Brobecker <brobecker@adacore.com>
11256
11257 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
11258 HAVE_SYS_PROCFS_H is defined.
11259
11260 2017-01-18 Alan Hayward <alan.hayward@arm.com>
11261
11262 * remote.c (struct cached_reg): Change data into a pointer.
11263 * (stop_reply_dtr): Free data pointers before deleting vector.
11264 (process_stop_reply): Likewise.
11265 (remote_parse_stop_reply): Allocate space for data
11266
11267 2017-01-18 Alan Hayward <alan.hayward@arm.com>
11268
11269 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
11270 MAX_REGISTER_SIZE.
11271 (amd64_pseudo_register_read_value): Likewise.
11272 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
11273 (store_register_using_P): Likewise.
11274 * regcache.c (regcache_xfer_part): Likewise.
11275
11276 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
11277
11278 Split real and pseudo registers.
11279 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
11280 (sparc32_pseudo_regnum): New enum.
11281 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
11282 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
11283 (SPARC32_CP0_REGISTERS): New macro.
11284 (sparc32_pseudo_register_name): New function.
11285 (sparc32_register_name): Use sparc32_pseudo_register_name.
11286 (sparc32_pseudo_register_type): New function.
11287 (sparc32_register_type): Use sparc32_pseudo_register_type.
11288 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
11289 pseudo register numbers.
11290 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
11291 (SPARC64_CP0_REGISTERS): New macro.
11292 (sparc64_pseudo_register_name): New function.
11293 (sparc64_register_name): Use sparc64_pseudo_register_name.
11294 (sparc64_pseudo_register_type): New function.
11295 (sparc64_register_type): Use sparc64_pseudo_register_type.
11296 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
11297 pseudo register numbers.
11298 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
11299 sparc64_store_arguments): Handle pseudo register numbers.
11300
11301 2017-01-13 Yao Qi <yao.qi@linaro.org>
11302
11303 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
11304 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
11305 output.
11306 (getpkt_or_notif_sane_1): Likewise.
11307
11308 2017-01-13 Yao Qi <yao.qi@linaro.org>
11309
11310 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
11311 of CC. Pass "-x c++-header" instead of "-x c".
11312
11313 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11314
11315 * remote.c (remote_can_async_p): Update comment.
11316
11317 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11318
11319 * linux-nat.c (linux_nat_can_async_p): Update comment.
11320
11321 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
11322
11323 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
11324
11325 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
11326
11327 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
11328
11329 2017-01-10 Tom Tromey <tom@tromey.com>
11330
11331 * python/py-type.c (typy_legacy_template_argument): Update.
11332 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
11333 ~demangle_parse_info): Declare new members.
11334 (cp_demangled_name_to_comp): Return unique_ptr.
11335 (cp_demangled_name_parse_free)
11336 (make_cleanup_cp_demangled_name_parse_free)
11337 (cp_new_demangle_parse_info): Remove.
11338 * cp-support.c (do_demangled_name_parse_free_cleanup)
11339 (make_cleanup_cp_demangled_name_parse_free): Remove.
11340 (inspect_type, cp_canonicalize_string_full)
11341 (cp_canonicalize_string): Update.
11342 (mangled_name_to_comp): Change return type.
11343 (cp_class_name_from_physname, method_name_from_physname)
11344 (cp_func_name, cp_remove_params): Update.
11345 * cp-name-parser.y (demangle_parse_info): New constructor, from
11346 cp_new_demangle_parse_info.
11347 (~demangle_parse_info): New destructor, from
11348 cp_demangled_name_parse_free.
11349 (cp_merge_demangle_parse_infos): Update.
11350 (cp_demangled_name_to_comp): Change return type.
11351
11352 2017-01-10 Tom Tromey <tom@tromey.com>
11353
11354 * top.c (prevent_dont_repeat): Change return type.
11355 * python/python.c (execute_gdb_command): Use std::string.
11356 Update.
11357 * guile/guile.c (gdbscm_execute_gdb_command): Update.
11358 * command.h (prevent_dont_repeat): Change return type.
11359 * breakpoint.c (bpstat_do_actions_1): Update.
11360
11361 2017-01-10 Tom Tromey <tom@tromey.com>
11362
11363 * value.h (scoped_value_mark::~scoped_value_mark): Call
11364 free_to_mark.
11365 (scoped_value_mark::free_to_mark): New method.
11366 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
11367 scoped_value_mark.
11368
11369 2017-01-10 Tom Tromey <tom@tromey.com>
11370
11371 * python/py-value.c (valpy_dereference, valpy_referenced_value)
11372 (valpy_reference_value, valpy_const_value, valpy_get_address)
11373 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
11374 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
11375 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
11376 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
11377 scoped_value_mark.
11378 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
11379 * value.h (scoped_value_mark): New class.
11380
11381 2017-01-10 Tom Tromey <tom@tromey.com>
11382
11383 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
11384 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
11385 * psymtab.c (discard_psymtabs_upto): Remove.
11386 (make_cleanup_discard_psymtabs): Remove.
11387 (struct psymtab_state): Remove.
11388
11389 2017-01-10 Tom Tromey <tom@tromey.com>
11390
11391 * record-full.c (record_full_save_cleanups): Remove.
11392 (record_full_save): Use gdb::unlinker.
11393 * gcore.c (do_bfd_delete_cleanup): Remove.
11394 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
11395 cleanups.
11396 * dwarf2read.c (unlink_if_set): Remove.
11397 (write_psymtabs_to_index): Use gdb::unlinker.
11398 * common/gdb_unlinker.h: New file.
11399
11400 2017-01-10 Tom Tromey <tom@tromey.com>
11401
11402 * windows-tdep.c (windows_xfer_shared_library): Update.
11403 * windows-nat.c (windows_make_so): Update.
11404 * utils.h (make_cleanup_bfd_unref): Remove.
11405 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
11406 * symfile.h (symfile_bfd_open)
11407 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
11408 * symfile.c (read_symbols, symbol_file_add)
11409 (separate_debug_file_exists): Update.
11410 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
11411 (generic_load, reread_symbols): Update.
11412 * symfile-mem.c (symbol_file_add_from_memory): Update.
11413 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
11414 (spu_symbol_file_add_from_memory): Update.
11415 * solist.h (struct target_so_ops) <bfd_open>: Return
11416 gdb_bfd_ref_ptr.
11417 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
11418 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
11419 gdb_bfd_ref_ptr.
11420 (solib_map_sections, reload_shared_libraries_1): Update.
11421 * solib-svr4.c (enable_break): Update.
11422 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
11423 * solib-frv.c (enable_break2): Update.
11424 * solib-dsbt.c (enable_break): Update.
11425 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
11426 gdb_bfd_ref_ptr.
11427 (darwin_solib_get_all_image_info_addr_at_init): Update.
11428 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
11429 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
11430 * record-full.c (record_full_save): Update.
11431 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
11432 * procfs.c (insert_dbx_link_bpt_in_file): Update.
11433 * minidebug.c (find_separate_debug_file_in_section): Return
11434 gdb_bfd_ref_ptr.
11435 * machoread.c (macho_add_oso_symfile): Change abfd to
11436 gdb_bfd_ref_ptr.
11437 (macho_symfile_read_all_oso): Update.
11438 (macho_check_dsym): Return gdb_bfd_ref_ptr.
11439 (macho_symfile_read): Update.
11440 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
11441 (jit_bfd_try_read_symtab): Update.
11442 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11443 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11444 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11445 gdb_bfd_ref_ptr.
11446 (gdb_bfd_ref_policy): New struct.
11447 (gdb_bfd_ref_ptr): New typedef.
11448 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11449 (gdb_bfd_openw, gdb_bfd_openr_iovec)
11450 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11451 gdb_bfd_ref_ptr.
11452 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11453 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11454 (gcore_command): Update.
11455 * exec.c (exec_file_attach): Update.
11456 * elfread.c (elf_symfile_read): Update.
11457 * dwarf2read.c (dwarf2_get_dwz_file): Update.
11458 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
11459 (open_and_init_dwo_file): Update.
11460 (open_dwp_file): Return gdb_bfd_ref_ptr.
11461 (open_and_init_dwp_file): Update.
11462 * corelow.c (core_open): Update.
11463 * compile/compile-object-load.c (compile_object_load): Update.
11464 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
11465 * coffread.c (coff_symfile_read): Update.
11466 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
11467 gdb_bfd_ref_ptr. Rename.
11468 (dump_bfd_file, restore_command): Update.
11469 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11470 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11471 (find_separate_debug_file_by_buildid): Update.
11472
11473 2017-01-10 Tom Tromey <tom@tromey.com>
11474
11475 * common/gdb_ref_ptr.h: New file.
11476 * python/py-ref.h (struct gdbpy_ref_policy): New.
11477 (gdbpy_ref): Now a typedef.
11478
11479 2017-01-10 Tom Tromey <tom@tromey.com>
11480
11481 * utils.h (make_cleanup_htab_delete): Don't declare.
11482 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
11483 Remove.
11484 * linespec.c (decode_compound_collector): Add constructor,
11485 destructor.
11486 (lookup_prefix_sym): Remove cleanup.
11487 (symtab_collector): Add constructor, destructor.
11488 (collect_symtabs_from_filename): Remove cleanup.
11489 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
11490 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
11491 Use htab_up.
11492 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
11493 * dwarf2read.c (dw2_expand_symtabs_matching)
11494 (dw2_map_symbol_filenames, dwarf_decode_macros)
11495 (write_psymtabs_to_index): Use htab_up.
11496 * dwarf2loc.c (func_verify_no_selftailcall)
11497 (call_site_find_chain_1, func_verify_no_selftailcall)
11498 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
11499 std::vector, gdb::unique_xmalloc_ptr.
11500 (call_sitep): Remove typedef.
11501 (dwarf2_locexpr_baton_eval): Remove unused variable.
11502
11503 2017-01-10 Tom Tromey <tom@tromey.com>
11504
11505 * python/python-internal.h (make_cleanup_py_decref)
11506 (make_cleanup_py_xdecref): Don't declare.
11507 * python/py-utils.c (py_decref, make_cleanup_py_decref)
11508 (py_xdecref, make_cleanup_py_xdecref): Remove.
11509
11510 2017-01-10 Tom Tromey <tom@tromey.com>
11511
11512 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
11513 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
11514
11515 2017-01-10 Tom Tromey <tom@tromey.com>
11516
11517 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
11518
11519 2017-01-10 Tom Tromey <tom@tromey.com>
11520
11521 * python/py-utils.c (unicode_to_encoded_string)
11522 (python_string_to_target_string)
11523 (python_string_to_target_python_string)
11524 (python_string_to_host_string, gdbpy_obj_to_string)
11525 (get_addr_from_python): Use gdbpy_ref.
11526
11527 2017-01-10 Tom Tromey <tom@tromey.com>
11528
11529 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
11530 gdbpy_ref.
11531
11532 2017-01-10 Tom Tromey <tom@tromey.com>
11533
11534 * python/python.c (eval_python_command, gdbpy_decode_line)
11535 (gdbpy_run_events, gdbpy_start_type_printers)
11536 (gdbpy_apply_type_printers): Use gdbpy_ref.
11537
11538 2017-01-10 Tom Tromey <tom@tromey.com>
11539
11540 * python/py-param.c (get_doc_string, compute_enum_values): Use
11541 gdbpy_ref.
11542
11543 2017-01-10 Tom Tromey <tom@tromey.com>
11544
11545 * python/py-inferior.c (find_thread_object, build_inferior_list):
11546 Use gdbpy_ref.
11547
11548 2017-01-10 Tom Tromey <tom@tromey.com>
11549
11550 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11551
11552 2017-01-10 Tom Tromey <tom@tromey.com>
11553
11554 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
11555 gdbpy_ref.
11556
11557 2017-01-10 Tom Tromey <tom@tromey.com>
11558
11559 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
11560 extra incref.
11561 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
11562 Use gdbpy_ref.
11563
11564 2017-01-10 Tom Tromey <tom@tromey.com>
11565
11566 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11567 gdbpy_ref.
11568
11569 2017-01-10 Tom Tromey <tom@tromey.com>
11570
11571 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
11572 decref results of PyArg_ParseTupleAndKeywords.
11573
11574 2017-01-10 Tom Tromey <tom@tromey.com>
11575
11576 * python/python.c (python_run_simple_file): Use
11577 unique_xmalloc_ptr, gdbpy_ref.
11578
11579 2017-01-10 Tom Tromey <tom@tromey.com>
11580
11581 * python/py-prettyprint.c (print_stack_unless_memory_error)
11582 (print_string_repr, print_children): Use gdbpy_ref.
11583 (dummy_python_frame): New class.
11584 (dummy_python_frame::dummy_python_frame): Rename from
11585 push_dummy_python_frame.
11586 (py_restore_tstate): Remove.
11587
11588 2017-01-10 Tom Tromey <tom@tromey.com>
11589
11590 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11591
11592 2017-01-10 Tom Tromey <tom@tromey.com>
11593
11594 * python/python.c (ensure_python_env, restore_python_env):
11595 Remove.
11596 * python/python-internal.h (ensure_python_env): Don't declare.
11597 * varobj.h (varobj_ensure_python_env): Don't declare.
11598 * varobj.c (varobj_ensure_python_env): Remove.
11599
11600 2017-01-10 Tom Tromey <tom@tromey.com>
11601
11602 * varobj.c (varobj_value_get_print_value): Use
11603 gdbpy_enter_varobj.
11604
11605 2017-01-10 Tom Tromey <tom@tromey.com>
11606
11607 * python/py-prettyprint.c (print_string_repr, print_children):
11608 Update.
11609 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
11610 of "encoding".
11611 * varobj.c (varobj_value_get_print_value): Update.
11612 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
11613
11614 2017-01-10 Tom Tromey <tom@tromey.com>
11615
11616 * varobj.c (varobj_get_display_hint)
11617 (dynamic_varobj_has_child_method, install_new_value_visualizer)
11618 (varobj_set_visualizer, free_variable): Use
11619 gdbpy_enter_varobj.
11620
11621 2017-01-10 Tom Tromey <tom@tromey.com>
11622
11623 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
11624 (do_finish_initialization): New function. Use gdbpy_ref.
11625 (gdbpy_finish_initialization): Use gdbpy_enter. Call
11626 do_finish_initialization.
11627
11628 2017-01-10 Tom Tromey <tom@tromey.com>
11629
11630 * python/py-param.c (get_set_value, get_show_value): Use
11631 gdbpy_enter, gdbpy_ref.
11632
11633 2017-01-10 Tom Tromey <tom@tromey.com>
11634
11635 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
11636
11637 2017-01-10 Tom Tromey <tom@tromey.com>
11638
11639 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
11640
11641 2017-01-10 Tom Tromey <tom@tromey.com>
11642
11643 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
11644 Use gdbpy_enter_varobj.
11645
11646 2017-01-10 Tom Tromey <tom@tromey.com>
11647
11648 * varobj.c (gdbpy_enter_varobj): New constructor.
11649 * python/python-internal.h (gdbpy_enter_varobj): New class.
11650 * python/py-varobj.c (py_varobj_get_iterator): Use
11651 gdbpy_enter_varobj.
11652
11653 2017-01-10 Tom Tromey <tom@tromey.com>
11654
11655 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
11656 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11657 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
11658 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
11659 unique_xmalloc_ptr.
11660 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
11661
11662 2017-01-10 Tom Tromey <tom@tromey.com>
11663
11664 * python/py-xmethods.c (invoke_match_method): Use
11665 gdbpy_ref.
11666
11667 2017-01-10 Tom Tromey <tom@tromey.com>
11668
11669 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
11670 gdbpy_enter, gdbpy_ref.
11671
11672 2017-01-10 Tom Tromey <tom@tromey.com>
11673
11674 * python/python.c (python_interactive_command): Use gdbpy_enter.
11675
11676 2017-01-10 Tom Tromey <tom@tromey.com>
11677
11678 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11679 gdbpy_ref.
11680
11681 2017-01-10 Tom Tromey <tom@tromey.com>
11682
11683 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11684 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11685
11686 2017-01-10 Tom Tromey <tom@tromey.com>
11687
11688 * utils.h (htab_deleter): New struct.
11689 (htab_up): New typedef.
11690 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11691 gdbpy_enter, gdbpy_ref, htab_up.
11692
11693 2017-01-10 Tom Tromey <tom@tromey.com>
11694
11695 * python/py-unwind.c (pending_frame_invalidate): Remove.
11696 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11697
11698 2017-01-10 Tom Tromey <tom@tromey.com>
11699
11700 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11701 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11702
11703 2017-01-10 Tom Tromey <tom@tromey.com>
11704
11705 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11706
11707 2017-01-10 Tom Tromey <tom@tromey.com>
11708
11709 * python/python.c (gdbpy_eval_from_control_command)
11710 (gdbpy_source_script, gdbpy_run_events)
11711 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11712 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11713 gdbpy_enter.
11714
11715 2017-01-10 Tom Tromey <tom@tromey.com>
11716
11717 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11718
11719 2017-01-10 Tom Tromey <tom@tromey.com>
11720
11721 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11722
11723 2017-01-10 Tom Tromey <tom@tromey.com>
11724
11725 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11726 (python_on_inferior_call_pre, python_on_inferior_call_post)
11727 (python_on_memory_change, python_on_register_change)
11728 (python_inferior_exit, python_new_objfile, add_thread_object)
11729 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11730
11731 2017-01-10 Tom Tromey <tom@tromey.com>
11732
11733 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11734 (bpfinishpy_handle_exit): Use gdbpy_enter.
11735
11736 2017-01-10 Tom Tromey <tom@tromey.com>
11737
11738 * python/py-cmd.c (cmdpy_destroyer)
11739 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11740 gdbpy_enter.
11741
11742 2017-01-10 Tom Tromey <tom@tromey.com>
11743
11744 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11745 gdbpy_enter.
11746 (gdbpy_breakpoint_has_cond): Likewise.
11747
11748 2017-01-10 Tom Tromey <tom@tromey.com>
11749
11750 * python/python.c (gdbpy_enter): New constructor.
11751 (~gdbpy_enter): New destructor.
11752 (restore_python_env, ensure_python_env): Rewrite.
11753 * python/python-internal.h (gdbpy_enter): New class.
11754
11755 2017-01-10 Tom Tromey <tom@tromey.com>
11756
11757 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11758
11759 2017-01-10 Tom Tromey <tom@tromey.com>
11760
11761 * python/py-value.c (value_has_field, get_field_flag)
11762 (get_field_type, valpy_getitem, convert_value_from_python): Use
11763 gdbpy_ref.
11764
11765 2017-01-10 Tom Tromey <tom@tromey.com>
11766
11767 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
11768 gdbpy_ref.
11769
11770 2017-01-10 Tom Tromey <tom@tromey.com>
11771
11772 * python/py-prettyprint.c (search_pp_list)
11773 (find_pretty_printer_from_objfiles)
11774 (find_pretty_printer_from_progspace)
11775 (find_pretty_printer_from_gdb, find_pretty_printer)
11776 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
11777 gdbpy_ref.
11778
11779 2017-01-10 Tom Tromey <tom@tromey.com>
11780
11781 * python/py-param.c (call_doc_function): Use gdbpy_ref.
11782
11783 2017-01-10 Tom Tromey <tom@tromey.com>
11784
11785 * python/py-linetable.c (build_line_table_tuple_from_pcs)
11786 (ltpy_get_all_source_lines): Use gdbpy_ref.
11787
11788 2017-01-10 Tom Tromey <tom@tromey.com>
11789
11790 * python/py-framefilter.c (extract_sym, extract_value)
11791 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
11792 gdbpy_ref.
11793
11794 2017-01-10 Tom Tromey <tom@tromey.com>
11795
11796 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
11797
11798 2017-01-10 Tom Tromey <tom@tromey.com>
11799
11800 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
11801
11802 2017-01-10 Tom Tromey <tom@tromey.com>
11803
11804 * python/py-function.c (convert_values_to_python, fnpy_init): Use
11805 gdbpy_ref.
11806
11807 2017-01-10 Tom Tromey <tom@tromey.com>
11808
11809 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
11810
11811 2017-01-10 Tom Tromey <tom@tromey.com>
11812
11813 * python/py-type.c (convert_field, make_fielditem, typy_fields)
11814 (typy_range): Use gdbpy_ref.
11815
11816 2017-01-10 Tom Tromey <tom@tromey.com>
11817
11818 * python/py-threadevent.c (create_thread_event_object): Use
11819 gdbpy_ref.
11820 * python/py-stopevent.c (create_stop_event_object): Simplify.
11821 (emit_stop_event): Use gdbpy_ref.
11822 * python/py-signalevent.c (create_signal_event_object): Use
11823 gdbpy_ref.
11824 * python/py-newobjfileevent.c (create_new_objfile_event_object)
11825 (emit_new_objfile_event, create_clear_objfiles_event_object)
11826 (emit_clear_objfiles_event): Use gdbpy_ref.
11827 * python/py-infevents.c (create_inferior_call_event_object)
11828 (create_register_changed_event_object)
11829 (create_memory_changed_event_object, emit_inferior_call_event)
11830 (emit_memory_changed_event, emit_register_changed_event): Use
11831 gdbpy_ref.
11832 * python/py-exitedevent.c (create_exited_event_object)
11833 (emit_exited_event): Use gdbpy_ref.
11834 * python/py-event.h (evpy_emit_event): Remove
11835 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
11836 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
11837 * python/py-continueevent.c (emit_continue_event): Use
11838 gdbpy_ref.
11839 * python/py-breakpoint.c (gdbpy_breakpoint_created)
11840 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
11841 gdbpy_ref.
11842 * python/py-bpevent.c (create_breakpoint_event_object): Use
11843 gdbpy_ref.
11844
11845 2017-01-10 Tom Tromey <tom@tromey.com>
11846
11847 * python/py-ref.h: New file.
11848
11849 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11850
11851 * cli-out.c (cli_ui_out::do_redirect): Change return type to
11852 void.
11853 * cli-out.h (cli_ui_out::do_redirect): Likewise.
11854 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
11855 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
11856 * ui-out.c (ui_out::redirect): Likewise.
11857 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
11858 * cli/cli-logging.c (set_logging_redirect): Update call site of
11859 ui_out::redirect.
11860 (handle_redirections): Likewise.
11861 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
11862 * top.c (execute_command_to_string): Likewise.
11863 * utils.c (do_ui_out_redirect_pop): Likewise.
11864
11865 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11866
11867 * stack.c (_initialize_stack): Update "frame" command help message.
11868
11869 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
11870
11871 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
11872
11873 2017-01-06 Yao Qi <yao.qi@linaro.org>
11874
11875 * x86-linux-nat.h: Include gdb_proc_service.h.
11876
11877 2017-01-06 Yao Qi <yao.qi@linaro.org>
11878
11879 * ser-base.h: Include serial.h.
11880
11881 2017-01-06 Yao Qi <yao.qi@linaro.org>
11882
11883 * ppc-linux-tdep.h: Include ppc-tdep.h.
11884
11885 2017-01-06 Yao Qi <yao.qi@linaro.org>
11886
11887 * nat/amd64-linux-siginfo.h: Include signal.h.
11888
11889 2017-01-06 Yao Qi <yao.qi@linaro.org>
11890
11891 * nat/aarch64-linux-hw-point.h: Include break-common.h.
11892
11893 2017-01-06 Yao Qi <yao.qi@linaro.org>
11894
11895 * mi/mi-parse.h: Include mi-cmds.h.
11896
11897 2017-01-06 Yao Qi <yao.qi@linaro.org>
11898
11899 * inf-loop.c: Don't include "target.h".
11900 * inf-loop.h: Include it here.
11901
11902 2017-01-06 Yao Qi <yao.qi@linaro.org>
11903
11904 * dfp.h: Include "dboulest.h" and "expression.h".
11905
11906 2017-01-06 Yao Qi <yao.qi@linaro.org>
11907
11908 * ax-gdb.h: Include "ax.h".
11909
11910 2017-01-06 Yao Qi <yao.qi@linaro.org>
11911
11912 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
11913 with nat/gdb_ptrace.h.
11914
11915 2017-01-05 Yao Qi <yao.qi@linaro.org>
11916
11917 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
11918 new line.
11919 (mips64_fbsd_sigframe_init): Likewise.
11920
11921 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11922
11923 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
11924 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
11925
11926 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11927
11928 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
11929 * NEWS: Mention new FreeBSD/mips native configuration.
11930 * config/mips/fbsd.mh: New file.
11931 * configure.host: Add mips*-*-freebsd*.
11932 * mips-fbsd-nat.c: New file.
11933
11934 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11935
11936 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
11937 (ALLDEPFILES): Add mips-fbsd-tdep.c.
11938 * NEWS: Mention new FreeBSD/mips target.
11939 * configure.tgt: Add mips*-*-freebsd*.
11940 * mips-fbsd-tdep.c: New file.
11941 * mips-fbsd-tdep.h: New file.
11942
11943 2017-01-04 Yao Qi <yao.qi@linaro.org>
11944
11945 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
11946 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
11947
11948 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11949
11950 Update copyright year range in all GDB files.
11951
11952 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11953
11954 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
11955
11956 For older changes see ChangeLog-2016.
11957 \f
11958 Local Variables:
11959 mode: change-log
11960 left-margin: 8
11961 fill-column: 74
11962 version-control: never
11963 coding: utf-8
11964 End:
This page took 0.282724 seconds and 5 git commands to generate.