]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/ChangeLog
microblaze-tdep: Add ATTRIBUTE_PRINTF to microblaze_debug
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
1 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
2
3 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4
5 2017-09-21 Yao Qi <yao.qi@linaro.org>
6
7 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
8 to gdb_target_obs.
9
10 2017-09-20 Tom Tromey <tom@tromey.com>
11
12 * breakpoint.c (struct counted_command_line): Remove.
13 (breakpoint_commands): Update.
14 (alloc_counted_command_line, incref_counted_command_line)
15 (decref_counted_command_line, do_cleanup_counted_command_line)
16 (make_cleanup_decref_counted_command_line): Remove.
17 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
18 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
19 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
20 (save_breakpoints): Update.
21 * breakpoint.h (counted_command_line): Now a typedef to
22 shared_ptr.
23 (struct breakpoint) <commands>: Now a counted_command_line.
24 (struct bpstats) <command>: Likewise.
25
26 2017-09-20 Tom Tromey <tom@tromey.com>
27
28 * breakpoint.c (struct commands_info, do_map_commands_command):
29 Remove.
30 (commands_command_1): Update.
31 (iterate_over_related_breakpoints): Take a function_view.
32 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
33 (delete_command): Update.
34 (map_breakpoint_numbers): Take a function_view.
35 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
36 (disable_command): Update.
37 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
38 (enable_command): Update.
39 (struct disp_data, do_enable_breakpoint_disp)
40 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
41 (do_map_enable_delete_breakpoint): Remove.
42 (enable_once_command, enable_count_command, enable_delete_command)
43 (delete_trace_variable_command): Update.
44
45 2017-09-20 Tom Tromey <tom@tromey.com>
46
47 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
48 (bpstat_clear): Use delete.
49 (bpstats): New constructors.
50 (bpstat_copy, bpstat_stop_status): Use new.
51 (dprintf_after_condition_true): Update.
52 * breakpoint.h (bpstats::bpstats): Add constructors.
53 (bpstats::~bpstats): Add destructor.
54
55 2017-09-20 Pedro Alves <palves@redhat.com>
56
57 * eval.c (make_params): Delete, refactored as ...
58 (class fake_method): ... this new type's ctor.
59 (fake_method::~fake_method): New.
60 (evaluate_subexp_standard): Use 'fake_method'.
61
62 2017-09-20 Tom Tromey <tom@tromey.com>
63
64 * windows-nat.c (get_windows_debug_event, windows_wait)
65 (do_initial_windows_stuff, windows_attach): Update.
66 * utils.c (vwarning, internal_vproblem): Update.
67 (ui_unregister_input_event_handler_cleanup)
68 (prepare_to_handle_input): Remove.
69 (class scoped_input_handler): New.
70 (defaulted_query, prompt_for_continue): Update.
71 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
72 Update.
73 * top.c (undo_terminal_modifications_before_exit): Update.
74 * target/target.h (target_terminal_init, target_terminal_inferior)
75 (target_terminal_ours): Don't declare.
76 (class target_terminal): New.
77 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
78 (target_terminal_ours_for_output)
79 (make_cleanup_restore_target_terminal): Don't declare.
80 (target_terminal_info): Remove.
81 * target.c (enum terminal_state, terminal_state): Remove.
82 (target_terminal::terminal_state): Define.
83 (target_terminal::init): Rename from target_terminal_init.
84 (target_terminal::inferior): Rename from
85 target_terminal_inferior.
86 (target_terminal::ours): Rename from target_terminal_ours.
87 (target_terminal::ours_for_output): Rename from
88 target_terminal_ours_for_output.
89 (target_terminal::info): New method.
90 (cleanup_restore_target_terminal)
91 (make_cleanup_restore_target_terminal): Remove.
92 * solib.c (handle_solib_event): Update.
93 * remote.c (remote_serial_quit_handler): Update.
94 (remote_terminal_inferior, remote_wait_as): Update.
95 * record-full.c (record_full_wait_1): Update.
96 * nto-procfs.c (procfs_create_inferior): Update.
97 * nat/fork-inferior.c (startup_inferior): Update.
98 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
99 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
100 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
101 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
102 (mi_breakpoint_created, mi_breakpoint_deleted)
103 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
104 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
105 (mi_user_selected_context_changed, report_initial_inferior):
106 Update.
107 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
108 (linux_nat_terminal_inferior): Update.
109 * infrun.c (follow_fork_inferior)
110 (handle_vfork_child_exec_or_exit, do_target_resume)
111 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
112 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
113 Update.
114 * inflow.c (child_terminal_init, info_terminal_command): Update.
115 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
116 (attach_command): Update.
117 * infcall.c (call_thread_fsm_should_stop): Update.
118 * gnu-nat.c (gnu_attach): Update.
119 * extension.c (struct active_ext_lang_state)
120 (restore_active_ext_lang): Update.
121 * exceptions.c (print_flush): Update.
122 * event-top.c (async_enable_stdin, default_quit_handler): Update.
123 (struct quit_handler_cleanup_data, restore_quit_handler)
124 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
125 Remove.
126 * cp-support.c (gdb_demangle): Update.
127 * breakpoint.c (update_inserted_breakpoint_locations)
128 (insert_breakpoint_locations, handle_jit_event)
129 (disable_breakpoints_in_unloaded_shlib): Update.
130 * annotate.c (annotate_breakpoints_invalid)
131 (annotate_frames_invalid): Update.
132
133 2017-09-20 Tom Tromey <tom@tromey.com>
134
135 * main.c (catch_command_errors): Rename from
136 catch_command_errors_const.
137 (captured_main_1): Update.
138
139 2017-09-20 Pedro Alves <palves@redhat.com>
140
141 * cli/cli-cmds.c (list_command): Use print_sal_location.
142 (print_sal_location): New function.
143 (ambiguous_line_spec): Use print_sal_location.
144 * linespec.c (symbol_to_sal): Record the symbol in the sal.
145 * symtab.c (find_function_start_sal): Likewise.
146 * symtab.h (symtab_and_line::symbol): New field.
147
148 2017-09-20 Pedro Alves <palves@redhat.com>
149
150 * linespec.c (minsym_found): Handle non-text minsyms.
151 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
152
153 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
154
155 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
156 backslash.
157
158 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
159
160 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
161 vmovups instead vmovaps.
162 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
163
164 2017-09-19 John Baldwin <jhb@FreeBSD.org>
165
166 * NEWS (Changes since GDB 8.0): Add starti.
167 * infcmd.c (enum run_break): New.
168 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
169 case.
170 (run_command): Use enum run_how.
171 (start_command): Likewise.
172 (starti_command): New function.
173 (RUN_ARGS_HELP): New macro.
174 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
175 commands. Add starti command.
176
177 2017-09-19 Yao Qi <yao.qi@linaro.org>
178
179 * Makefile.in (monitor.o): Remove the rule.
180
181 2017-09-19 Yao Qi <yao.qi@linaro.org>
182
183 * annotate.h (struct annotate_arg_emitter): Use
184 DISABLE_COPY_AND_ASSIGN.
185 * common/refcounted-object.h (refcounted_object): Likewise.
186 * completer.h (struct completion_result): Likewise.
187 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
188 * filename-seen-cache.h (filename_seen_cache): Likewise.
189 * gdbcore.h (thread_section_name): Likewise.
190 * gdb_regex.h (compiled_regex): Likewise.
191 * gdbthread.h (scoped_restore_current_thread): Likewise.
192 * inferior.h (scoped_restore_current_inferior): Likewise.
193 * jit.c (jit_reader): Likewise.
194 * linespec.h (struct linespec_result): Likewise.
195 * mi/mi-parse.h (struct mi_parse): Likewise.
196 * nat/fork-inferior.c (execv_argv): Likewise.
197 * progspace.h (scoped_restore_current_program_space): Likewise.
198 * python/python-internal.h (class gdbpy_enter): Likewise.
199 * regcache.h (regcache): Likewise.
200 * target-descriptions.c (struct tdesc_reg): Likewise.
201 (struct tdesc_type): Likewise.
202 (struct tdesc_feature): Likewise.
203 * ui-out.h (ui_out_emit_type): Likewise.
204
205 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
206
207 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
208 label abort_expression.
209
210 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
211
212 * common/buffer.c (buffer_xml_printf): Adjust.
213 * common/xml-utils.c (xml_escape_text): Change return type to
214 std::string, update code accordingly.
215 * common/xml-utils.h (xml_escape_text): Change return type to
216 std::string.
217 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
218 * windows-tdep.c (windows_xfer_shared_library): Adjust.
219 * unittests/xml-utils-selftests.c (test_xml_escape_text):
220 Adjust.
221
222 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
223
224 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
225 (SUBDIR_UNITTESTS_OBS): Add new object file.
226 * unittests/xml-utils-selftests.c: New file.
227
228 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
229
230 * common/selftest.h (selftest): New struct/interface.
231 (register_test): Add name parameter, add new overload.
232 (run_tests): Add filter parameter.
233 (for_each_selftest_ftype): New typedef.
234 (for_each_selftest): New declaration.
235 * common/selftest.c (tests): Change type to
236 map<string, unique_ptr<selftest>>.
237 (simple_selftest): New struct.
238 (register_test): New function.
239 (register_test): Add name parameter and use it.
240 (run_tests): Add filter parameter and use it. Add prints.
241 Adjust to vector -> map change.
242 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
243 registering selftests.
244 * arm-tdep.c (_initialize_arm_tdep): Likewise.
245 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
246 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
247 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
248 * findvar.c (_initialize_findvar): Likewise.
249 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
250 * maint.c (maintenance_selftest): Update call to run_tests.
251 (maintenance_info_selftests): New function.
252 (_initialize_maint_cmds): Register "maintenance info selftests"
253 command. Update "maintenance selftest" doc.
254 * regcache.c (_initialize_regcache): Add names when registering
255 selftests.
256 * rust-exp.y (_initialize_rust_exp): Likewise.
257 * selftest-arch.c (gdbarch_selftest): New struct.
258 (gdbarch_tests): Remove.
259 (register_test_foreach_arch): Add name parameter. Call
260 register_test.
261 (tests_with_arch): Remove, move most content to
262 gdbarch_selftest::operator().
263 (_initialize_selftests_foreach_arch): Remove.
264 * selftest-arch.h (register_test_foreach_arch): Add name
265 parameter.
266 (run_tests_with_arch): New declaration.
267 * utils-selftests.c (_initialize_utils_selftests): Add names
268 when registering selftests.
269 * utils.c (_initialize_utils): Likewise.
270 * unittests/array-view-selftests.c
271 (_initialize_array_view_selftests): Likewise.
272 * unittests/environ-selftests.c (_initialize_environ_selftests):
273 Likewise.
274 * unittests/function-view-selftests.c
275 (_initialize_function_view_selftests): Likewise.
276 * unittests/offset-type-selftests.c
277 (_initialize_offset_type_selftests): Likewise.
278 * unittests/optional-selftests.c
279 (_initialize_optional_selftests): Likewise.
280 * unittests/scoped_restore-selftests.c
281 (_initialize_scoped_restore_selftests): Likewise.
282 * NEWS: Document "maintenance selftest" and "maint info
283 selftests".
284
285 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
286
287 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
288 scoped_restore.
289
290 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
291
292 * mi/mi-main.c (mi_load_progress): Make uiout variable
293 a unique_ptr.
294
295 2017-09-15 Pedro Alves <palves@redhat.com>
296
297 * compile/compile-c-types.c (convert_enum, convert_int)
298 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
299
300 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
301
302 * dwarf2read.c (copy_string): Remove.
303 (parse_macro_definition): Replace copy_string with savestring.
304
305 2017-09-15 Yao Qi <yao.qi@linaro.org>
306
307 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
308 gdb_target_obs.
309 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
310 Likewise.
311 (i[34567]86-*-linux*): Likewise.
312
313 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
314
315 * dwarf2expr.h (dwarf_stack_value): Add constructor.
316 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
317 <stack>: Change type to std::vector.
318 <stack_len, stack_allocated>: Remove.
319 <grow_stack>: Remove.
320 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
321 (dwarf_expr_context::~dwarf_expr_context): Remove.
322 (dwarf_expr_context::grow_stack): Remove.
323 (dwarf_expr_context::push): Adjust.
324 (dwarf_expr_context::pop): Adjust.
325 (dwarf_expr_context::fetch): Adjust.
326 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
327 (dwarf_expr_context::stack_empty_p): Adjust.
328 (dwarf_expr_context::execute_stack_op): Adjust.
329
330 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
331
332 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
333 return type to bool.
334 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
335
336 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
337
338 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
339 Change type to bool.
340 (dwarf_stack_value) <in_stack_memory>: Likewise.
341 (dwarf_expr_context) <push_address>: Change parameter type to
342 bool.
343 <fetch_in_stack_memory>: Change return type to bool.
344 <push>: Change parameter type to bool.
345 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
346 to bool.
347 (dwarf_expr_context::push_address): Likewise.
348 (dwarf_expr_context::fetch_in_stack_memory): Change return type
349 to bool.
350 (dwarf_expr_context::execute_stack_op): Adjust.
351 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
352
353 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
354
355 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
356 (struct dwarf_expr_context) <n_pieces>: Remove.
357 <pieces>: Change type to std::vector.
358 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
359 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
360 pieces.
361 (dwarf_expr_context::add_piece): Adjust.
362 * dwarf2loc.c (struct piece_closure): Initialize fields.
363 <n_pieces>: Remove.
364 <pieces>: Change type to std::vector.
365 (allocate_piece_closure): Adjust, change parameter to
366 std::vector rvalue and std::move it to piece_closure.
367 (rw_pieced_value): Adjust.
368 (check_pieced_synthetic_pointer): Adjust.
369 (indirect_synthetic_pointer): Adjust.
370 (coerce_pieced_ref): Adjust.
371 (free_pieced_value_closure): Adjust. Use delete to free
372 piece_closure.
373 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
374 to allocate_piece_closure.
375 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
376
377 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
378
379 * probe.h (probe_ops_cp): Remove typedef.
380 (DEF_VEC_P (probe_ops_cp)): Remove.
381 (all_probe_ops): Change type to std::vector.
382 * probe.c (info_probes_for_ops): Adjust to vector change.
383 (probe_linespec_to_ops): Likewise.
384 (all_probe_ops): Change type to std::vector.
385 (_initialize_probe): Adjust to vector change.
386 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
387 * elfread.c (elf_get_probes): Likewise.
388 * stap-probe.c (_initialize_stap_probe): Likewise.
389
390 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
391
392 * probe.h (struct bound_probe): Define constructors.
393 * probe.c (bound_probe_s): Remove typedef.
394 (DEF_VEC_O (bound_probe_s)): Remove VEC.
395 (collect_probes): Change return type to std::vector, remove
396 cleanup.
397 (compare_probes): Return bool, change parameter type. Change
398 semantic to "less than".
399 (gen_ui_out_table_header_info): Change parameter to std::vector
400 and update.
401 (exists_probe_with_pops): Likewise.
402 (info_probes_for_ops): Update to std::vector change.
403 (enable_probes_command): Likewise.
404 (disable_probes_command): Likewise.
405
406 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
407
408 * probe.h (struct probe_ops) <get_probes>: Change parameter from
409 vec to std::vector.
410 * probe.c (parse_probes_in_pspace): Update.
411 (find_probes_in_objfile): Update.
412 (find_probe_by_pc): Update.
413 (collect_probes): Update.
414 (probe_any_get_probes): Update.
415 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
416 return type to reference to std::vector.
417 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
418 std::vector and update.
419 (dtrace_process_dof): Likewise.
420 (dtrace_get_probes): Likewise.
421 * elfread.c (elf_get_probes): Change return type to std::vector,
422 store an std::vector in bfd_data.
423 (probe_key_free): Update to std::vector.
424 * stap-probe.c (handle_stap_probe): Change parameter to
425 std::vector and update.
426 (stap_get_probes): Likewise.
427 * symfile-debug.c (debug_sym_get_probes): Change return type to
428 std::vector and update.
429
430 2017-09-11 Tom Tromey <tom@tromey.com>
431
432 * breakpoint.c (program_breakpoint_here_p): Update.
433 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
434 from make_show_memory_breakpoints_cleanup. Return a
435 scoped_restore_tmpl<int>.
436 (restore_show_memory_breakpoints): Remove.
437 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
438 * mem-break.c (memory_validate_breakpoint): Update.
439 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
440 (ia64_memory_remove_breakpoint): Update.
441 (ia64_breakpoint_from_pc): Update.
442 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
443 from make_show_memory_breakpoints_cleanup.
444
445 2017-09-11 Tom Tromey <tom@tromey.com>
446
447 * d-namespace.c (d_lookup_symbol): Use std::string.
448 (find_symbol_in_baseclass): Likewise.
449
450 2017-09-11 Tom Tromey <tom@tromey.com>
451
452 * ctf.c (ctf_start): Use std::string.
453
454 2017-09-11 Tom Tromey <tom@tromey.com>
455
456 * ada-lang.c (is_known_support_routine): Update.
457 (ada_unhandled_exception_name_addr_from_raise): Update.
458 * guile/scm-frame.c (gdbscm_frame_name): Update.
459 * python/py-frame.c (frapy_name): Update.
460 (frapy_function): Update.
461 * stack.h (find_frame_funname): Update.
462 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
463 (print_frame): Update.
464
465 2017-09-11 Tom Tromey <tom@tromey.com>
466
467 * findcmd.c (put_bits): Take a gdb::byte_vector.
468 (parse_find_args): Return gdb::byte_vector. "args" now const.
469 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
470 cleanups.
471 (find_command): Update.
472
473 2017-09-11 Tom Tromey <tom@tromey.com>
474
475 * cli/cli-script.c (class scoped_restore_hook_in): New.
476 (clear_hook_in_cleanup): Remove.
477 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
478 scoped_restore_hook_in.
479
480 2017-09-11 Tom Tromey <tom@tromey.com>
481
482 * cli/cli-script.c (restore_interp): Remove.
483 (read_command_lines): Use scoped_restore_interp.
484 * interps.c (scoped_restore_interp::set_temp): Rename from
485 interp_set_temp.
486 * interps.h (class scoped_restore_interp): New.
487 (interp_set_temp): Remove.
488
489 2017-09-11 Tom Tromey <tom@tromey.com>
490
491 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
492 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
493 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
494 scoped_restore.
495 (mi_cmd_break_insert_1): Update.
496 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
497 scoped_restore.
498
499 2017-09-11 Tom Tromey <tom@tromey.com>
500
501 * demangle.c (demangle_command): Update.
502 * breakpoint.c (disable_command): Update.
503 (enable_command): Update.
504 (find_location_by_number): Make "number" const. Use
505 get_number_trailer.
506 * cli/cli-utils.c (extract_arg): Return std::string.
507 * probe.c (parse_probe_linespec): Update. Change types.
508 (collect_probes): Take string arguments.
509 (parse_probe_linespec): Likewise.
510 (info_probes_for_ops): Update.
511 (enable_probes_command): Update.
512 (disable_probes_command): Update.
513 * break-catch-sig.c (catch_signal_split_args): Update.
514 * mi/mi-parse.c (mi_parse): Update.
515
516 2017-09-11 Tom Tromey <tom@tromey.com>
517
518 * language.h (language_enum): Make argument const.
519 * language.c (language_enum): Make argument const.
520
521 2017-09-11 Tom Tromey <tom@tromey.com>
522
523 * common/common-utils.h (skip_to_space): Remove macro, redeclare
524 as function.
525 (skip_to_space): Rename from skip_to_space_const.
526 * common/common-utils.c (skip_to_space): New function.
527 (skip_to_space): Rename from skip_to_space_const.
528 * cli/cli-utils.h (get_number): Rename from get_number_const.
529 (extract_arg): Rename from extract_arg_const.
530 * cli/cli-utils.c (get_number): Rename from get_number_const.
531 (extract_arg): Rename from extract_arg_const.
532 (number_or_range_parser::get_number): Use ::get_number.
533 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
534 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
535 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
536 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
537 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
538 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
539 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
540 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
541
542 2017-09-11 Tom Tromey <tom@tromey.com>
543
544 * python/python.c (do_start_initialization): Use
545 py-event-types.def to initialize types.
546 Define all object type structures.
547 * python/python-internal.h: Don't declare event initialization
548 functions.
549 * python/py-threadevent.c (thread_event_object_type): Don't
550 define.
551 * python/py-stopevent.c (stop_event_object_type): Don't define.
552 * python/py-signalevent.c (signal_event_object_type): Don't
553 declare or define.
554 * python/py-newobjfileevent.c (new_objfile_event_object_type)
555 (clear_objfiles_event_object_type): Don't declare or define.
556 * python/py-infevents.c (inferior_call_pre_event_object_type)
557 (inferior_call_post_event_object_type)
558 (register_changed_event_object_type)
559 (memory_changed_event_object_type): Don't declare or define.
560 * python/py-inferior.c (new_thread_event_object_type)
561 (new_inferior_event_object_type)
562 (inferior_deleted_event_object_type): Don't declare or define.
563 * python/py-exitedevent.c (exited_event_object_type): Don't
564 declare or define.
565 * python/py-evts.c (gdbpy_initialize_py_events): Use
566 py-all-events.def.
567 * python/py-events.h (thread_event_object_type): Don't declare.
568 (events_object): Use py-all-events.def.
569 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
570 py-event-types.def.
571 * python/py-event-types.def: New file.
572 * python/py-continueevent.c (create_continue_event_object): Don't
573 declare or define.
574 * python/py-bpevent.c (breakpoint_event_object_type): Don't
575 declare or define.
576 * python/py-all-events.def: New file.
577
578 2017-09-11 Tom Tromey <tom@tromey.com>
579
580 * python/py-threadevent.c (create_thread_event_object): Return
581 gdbpy_ref.
582 * python/py-stopevent.h (create_stop_event_object)
583 (create_breakpoint_event_object, create_signal_event_object):
584 Update.
585 * python/py-stopevent.c (create_stop_event_object): Return
586 gdbpy_ref.
587 (emit_stop_event): Update.
588 * python/py-signalevent.c (create_signal_event_object): Return
589 gdbpy_ref.
590 * python/py-infevents.c (create_inferior_call_event_object):
591 Update.
592 * python/py-event.h (create_event_object)
593 (create_thread_event_object): Update.
594 * python/py-event.c (create_event_object): Return gdbpy_ref.
595 * python/py-continueevent.c: Return gdbpy_ref.
596 * python/py-bpevent.c (create_breakpoint_event_object): Return
597 gdbpy_ref.
598
599 2017-09-11 Tom Tromey <tom@tromey.com>
600
601 PR python/15622:
602 * NEWS: Add entry.
603 * python/python.c (do_start_initialization): Initialize new event
604 types.
605 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
606 (gdbpy_initialize_inferior_deleted_event)
607 (gdbpy_initialize_new_thread_event): Declare.
608 * python/py-threadevent.c (create_thread_event_object): Add option
609 "thread" parameter.
610 * python/py-inferior.c (new_thread_event_object_type)
611 (new_inferior_event_object_type)
612 (inferior_deleted_event_object_type): Declare.
613 (python_new_inferior, python_inferior_deleted): New functions.
614 (add_thread_object): Emit new_thread event.
615 (gdbpy_initialize_inferior): Attach new functions to corresponding
616 observers.
617 (new_thread, new_inferior, inferior_deleted): Define new event
618 types.
619 * python/py-evts.c (gdbpy_initialize_py_events): Add new
620 registries.
621 * python/py-events.h (events_object) <new_inferior,
622 inferior_deleted, new_thread>: New fields.
623 * python/py-event.h (create_thread_event_breakpoint): Add optional
624 "thread" parameter.
625
626 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
627
628 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
629 check current_ui instead.
630 (internal_vproblem): Likewise.
631
632 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
633
634 * thread.c (print_thread_info_1): Remove unnecessary calls to
635 uiout->is_mi_like_p.
636
637 2017-09-09 Tom Tromey <tom@tromey.com>
638
639 * namespace.h (add_using_directive): Update.
640 * namespace.c (add_using_directive): Change type of excludes to
641 std::vector.
642 * dwarf2read.c (read_import_statement): Use std::vector.
643 (read_namespace): Update.
644 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
645
646 2017-09-09 Tom Tromey <tom@tromey.com>
647
648 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
649
650 2017-09-09 Tom Tromey <tom@tromey.com>
651
652 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
653
654 2017-09-09 Tom Tromey <tom@tromey.com>
655
656 * stack.c (func_command): Use gdb::def_vector.
657
658 2017-09-09 Tom Tromey <tom@tromey.com>
659
660 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
661 ui_out_emit_list, ui_out_emit_tuple.
662 (mi_cmd_var_update): Likewise.
663
664 2017-09-09 Tom Tromey <tom@tromey.com>
665
666 * mi/mi-interp.c (mi_user_selected_context_changed): Use
667 ui_out_redirect_pop.
668 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
669 ui_out_redirect_pop.
670 * utils.c (do_ui_out_redirect_pop)
671 (make_cleanup_ui_out_redirect_pop): Remove.
672 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
673 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
674 * ui-out.h (ui_out_redirect_pop): New class.
675
676 2017-09-09 Tom Tromey <tom@tromey.com>
677
678 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
679 (list_available_thread_groups, mi_cmd_list_thread_groups)
680 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
681 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
682 Likewise.
683
684 2017-09-09 Tom Tromey <tom@tromey.com>
685
686 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
687 ui_out_emit_tuple.
688
689 2017-09-09 Tom Tromey <tom@tromey.com>
690
691 * target.c (flash_erase_command): Use ui_out_emit_tuple.
692 * stack.c (print_frame): Use ui_out_emit_tuple.
693 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
694 (info_spu_mailbox_command, info_spu_dma_command)
695 (info_spu_proxydma_command): Likewise.
696 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
697 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
698 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
699 ui_out_emit_tuple.
700 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
701
702 2017-09-09 Tom Tromey <tom@tromey.com>
703
704 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
705 (class ui_out_emit_table): Update comment.
706 * ui-out.c (do_cleanup_table_end)
707 (make_cleanup_ui_out_table_begin_end): Remove.
708 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
709 (info_spu_dma_cmdlist): Likewise.
710 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
711 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
712 ui_out_emit_table.
713
714 2017-09-09 Tom Tromey <tom@tromey.com>
715
716 * thread.c (print_thread_info_1): Use ui_out_emit_table,
717 ui_out_emit_list, gdb::optional.
718
719 2017-09-09 John Baldwin <jhb@FreeBSD.org>
720
721 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
722 prototype.
723 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
724 prototype.
725 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
726 prototype.
727 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
728 * ada-exp.y: Remove _initialize_ada_exp prototype.
729 * ada-lang.c: Remove _initialize_ada_language prototype.
730 * ada-tasks.c: Remove _initialize_tasks prototype.
731 * addrmap.c: Remove _initialize_addrmap prototype.
732 * agent.c: Remove _initialize_agent prototype.
733 * aix-thread.c: Remove _initialize_aix_thread prototype.
734 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
735 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
736 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
737 prototype.
738 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
739 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
740 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
741 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
742 prototype.
743 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
744 prototype.
745 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
746 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
747 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
748 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
749 prototype.
750 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
751 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
752 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
753 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
754 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
755 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
756 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
757 prototype.
758 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
759 prototype.
760 * annotate.c: Remove _initialize_annotate prototype.
761 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
762 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
763 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
764 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
765 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
766 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
767 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
768 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
769 prototype.
770 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
771 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
772 * auto-load.c: Remove _initialize_auto_load prototype.
773 * auxv.c: Remove _initialize_auxv prototype.
774 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
775 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
776 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
777 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
778 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
779 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
780 prototype.
781 * break-catch-throw.c: Remove _initialize_break_catch_throw
782 prototype.
783 * breakpoint.c: Remove _initialize_breakpoint prototype.
784 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
785 * btrace.c: Remove _initialize_btrace prototype.
786 * charset.c: Remove _initialize_charset prototype.
787 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
788 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
789 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
790 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
791 * cli/cli-script.c: Remove _initialize_cli_script prototype.
792 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
793 * coffread.c: Remove _initialize_coffread prototype.
794 * compile/compile.c: Remove _initialize_compile prototype.
795 * complaints.c: Remove _initialize_complaints prototype.
796 * completer.c: Remove _initialize_completer prototype.
797 * copying.awk: Remove _initialize_copying prototype.
798 * copying.c: Regenerate.
799 * core-regset.c: Remove _initialize_core_regset prototype.
800 * corefile.c: Remove _initialize_core prototype.
801 * corelow.c: Remove _initialize_corelow prototype.
802 * cp-abi.c: Remove _initialize_cp_abi prototype.
803 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
804 * cp-support.c: Remove _initialize_cp_support prototype.
805 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
806 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
807 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
808 * ctf.c: Remove _initialize_ctf prototype.
809 * d-lang.c: Remove _initialize_d_language prototype.
810 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
811 prototype.
812 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
813 * dbxread.c: Remove _initialize_dbxread prototype.
814 * dcache.c: Remove _initialize_dcache prototype.
815 * demangle.c: Remove _initialize_demangler prototype.
816 * disasm-selftests.c: Remove _initialize_disasm_selftests
817 prototype.
818 * disasm.c: Remove _initialize_disasm prototype.
819 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
820 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
821 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
822 prototype.
823 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
824 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
825 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
826 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
827 * elfread.c: Remove _initialize_elfread prototype.
828 * exec.c: Remove _initialize_exec prototype.
829 * extension.c: Remove _initialize_extension prototype.
830 * f-lang.c: Remove _initialize_f_language prototype.
831 * f-valprint.c: Remove _initialize_f_valprint prototype.
832 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
833 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
834 * filesystem.c: Remove _initialize_filesystem prototype.
835 * findcmd.c: Remove _initialize_mem_search prototype.
836 * fork-child.c: Remove _initialize_fork_child prototype.
837 * frame-base.c: Remove _initialize_frame_base prototype.
838 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
839 * frame.c: Remove _initialize_frame prototype.
840 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
841 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
842 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
843 * gcore.c: Remove _initialize_gcore prototype.
844 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
845 * gdbarch.c: Regenerate.
846 * gdbarch.sh: Remove _initialize_gdbarch prototype.
847 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
848 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
849 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
850 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
851 * go-lang.c: Remove _initialize_go_language prototype.
852 * go32-nat.c: Remove _initialize_go32_nat prototype.
853 * guile/guile.c: Remove _initialize_guile prototype.
854 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
855 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
856 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
857 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
858 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
859 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
860 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
861 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
862 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
863 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
864 prototype.
865 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
866 prototype.
867 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
868 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
869 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
870 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
871 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
872 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
873 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
874 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
875 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
876 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
877 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
878 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
879 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
880 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
881 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
882 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
883 prototype.
884 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
885 prototype.
886 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
887 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
888 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
889 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
890 * infcall.c: Remove _initialize_infcall prototype.
891 * infcmd.c: Remove _initialize_infcmd prototype.
892 * inferior.c: Remove _initialize_inferiors prototype.
893 * inflow.c: Remove _initialize_inflow prototype.
894 * infrun.c: Remove _initialize_infrun prototype.
895 * interps.c: Remove _initialize_interpreter prototype.
896 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
897 * jit.c: Remove _initialize_jit prototype.
898 * language.c: Remove _initialize_language prototype.
899 * linux-fork.c: Remove _initialize_linux_fork prototype.
900 * linux-nat.c: Remove _initialize_linux_nat prototype.
901 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
902 * linux-thread-db.c: Remove _initialize_thread_db prototype.
903 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
904 * m2-lang.c: Remove _initialize_m2_language prototype.
905 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
906 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
907 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
908 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
909 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
910 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
911 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
912 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
913 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
914 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
915 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
916 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
917 * machoread.c: Remove _initialize_machoread prototype.
918 * macrocmd.c: Remove _initialize_macrocmd prototype.
919 * macroscope.c: Remove _initialize_macroscope prototype.
920 * maint.c: Remove _initialize_maint_cmds prototype.
921 * mdebugread.c: Remove _initialize_mdebugread prototype.
922 * memattr.c: Remove _initialize_mem prototype.
923 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
924 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
925 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
926 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
927 * mi/mi-main.c: Remove _initialize_mi_main prototype.
928 * microblaze-linux-tdep.c: Remove
929 _initialize_microblaze_linux_tdep prototype.
930 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
931 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
932 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
933 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
934 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
935 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
936 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
937 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
938 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
939 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
940 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
941 prototype.
942 * mipsread.c: Remove _initialize_mipsread prototype.
943 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
944 prototype.
945 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
946 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
947 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
948 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
949 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
950 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
951 prototype.
952 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
953 * nto-procfs.c: Remove _initialize_procfs prototype.
954 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
955 * objc-lang.c: Remove _initialize_objc_language prototype.
956 * objfiles.c: Remove _initialize_objfiles prototype.
957 * observer.c: Remove observer_test_first_notification_function,
958 observer_test_second_notification_function,
959 observer_test_third_notification_function, and
960 _initialize_observer prototypes.
961 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
962 * osabi.c: Remove _initialize_gdb_osabi prototype.
963 * osdata.c: Remove _initialize_osdata prototype.
964 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
965 * parse.c: Remove _initialize_parse prototype.
966 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
967 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
968 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
969 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
970 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
971 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
972 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
973 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
974 * printcmd.c: Remove _initialize_printcmd prototype.
975 * probe.c: Remove _initialize_probe prototype.
976 * proc-api.c: Remove _initialize_proc_api prototype.
977 * proc-events.c: Remove _initialize_proc_events prototype.
978 * proc-service.c: Remove _initialize_proc_service prototype.
979 * procfs.c: Remove _initialize_procfs prototype.
980 * psymtab.c: Remove _initialize_psymtab prototype.
981 * python/python.c: Remove _initialize_python prototype.
982 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
983 * record-btrace.c: Remove _initialize_record_btrace prototype.
984 * record-full.c: Remove _initialize_record_full prototype.
985 * record.c: Remove _initialize_record prototype.
986 * regcache.c: Remove _initialize_regcache prototype.
987 * reggroups.c: Remove _initialize_reggroup prototype.
988 * remote-notif.c: Remove _initialize_notif prototype.
989 * remote-sim.c: Remove _initialize_remote_sim prototype.
990 * remote.c: Remove _initialize_remote prototype.
991 * reverse.c: Remove _initialize_reverse prototype.
992 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
993 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
994 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
995 prototype.
996 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
997 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
998 * rust-exp.y: Remove _initialize_rust_exp prototype.
999 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
1000 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
1001 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
1002 * score-tdep.c: Remove _initialize_score_tdep prototype.
1003 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
1004 prototype.
1005 * ser-go32.c: Remove _initialize_ser_dos prototype.
1006 * ser-mingw.c: Remove _initialize_ser_windows prototype.
1007 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
1008 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
1009 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
1010 * serial.c: Remove _initialize_serial prototype.
1011 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
1012 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
1013 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
1014 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
1015 * skip.c: Remove _initialize_step_skip prototype.
1016 * sol-thread.c: Remove _initialize_sol_thread prototype.
1017 * solib-aix.c: Remove _initialize_solib_aix prototype.
1018 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
1019 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
1020 * solib-frv.c: Remove _initialize_frv_solib prototype.
1021 * solib-spu.c: Remove _initialize_spu_solib prototype.
1022 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
1023 * solib-target.c: Remove _initialize_solib_target prototype.
1024 * solib.c: Remove _initialize_solib prototype.
1025 * source.c: Remove _initialize_source prototype.
1026 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
1027 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
1028 prototype.
1029 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
1030 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
1031 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
1032 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
1033 prototype.
1034 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
1035 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
1036 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
1037 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
1038 prototype.
1039 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
1040 prototype.
1041 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
1042 prototype.
1043 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
1044 prototype.
1045 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
1046 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
1047 prototype.
1048 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
1049 prototype.
1050 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
1051 prototype.
1052 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
1053 prototype.
1054 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
1055 prototype.
1056 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
1057 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
1058 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
1059 * stabsread.c: Remove _initialize_stabsread prototype.
1060 * stack.c: Remove _initialize_stack prototype.
1061 * stap-probe.c: Remove _initialize_stap_probe prototype.
1062 * std-regs.c: Remove _initialize_frame_reg prototype.
1063 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
1064 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
1065 * symfile.c: Remove _initialize_symfile prototype.
1066 * symmisc.c: Remove _initialize_symmisc prototype.
1067 * symtab.c: Remove _initialize_symtab prototype.
1068 * target-dcache.c: Remove _initialize_target_dcache prototype.
1069 * target-descriptions.c: Remove _initialize_target_descriptions
1070 prototype.
1071 * thread.c: Remove _initialize_thread prototype.
1072 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
1073 prototype.
1074 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
1075 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
1076 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
1077 prototype.
1078 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
1079 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
1080 * tracefile.c: Remove _initialize_tracefile prototype.
1081 * tracepoint.c: Remove _initialize_tracepoint prototype.
1082 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
1083 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
1084 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
1085 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
1086 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
1087 * tui/tui-win.c: Remove _initialize_tui_win prototype.
1088 * tui/tui.c: Remove _initialize_tui prototype.
1089 * typeprint.c: Remove _initialize_typeprint prototype.
1090 * user-regs.c: Remove _initialize_user_regs prototype.
1091 * utils.c: Remove _initialize_utils prototype.
1092 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
1093 * valarith.c: Remove _initialize_valarith prototype.
1094 * valops.c: Remove _initialize_valops prototype.
1095 * valprint.c: Remove _initialize_valprint prototype.
1096 * value.c: Remove _initialize_values prototype.
1097 * varobj.c: Remove _initialize_varobj prototype.
1098 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
1099 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
1100 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
1101 * windows-nat.c: Remove _initialize_windows_nat,
1102 _initialize_check_for_gdb_ini, and _initialize_loadable
1103 prototypes.
1104 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
1105 * xcoffread.c: Remove _initialize_xcoffread prototype.
1106 * xml-support.c: Remove _initialize_xml_support prototype.
1107 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
1108 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
1109 prototype.
1110 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
1111 prototype.
1112 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
1113
1114 2017-09-08 Keith Seitz <keiths@redhat.com>
1115
1116 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
1117 field.
1118
1119 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
1120
1121 * f-valprint.c (f_val_print): Remove check for one byte
1122 sized integers. Remove printing of character type.
1123
1124 2017-09-08 Frank Penczek <frank.penczek@intel.com>
1125 Christoph Weinmann <christoph.t.weinmann@intel.com>
1126 Bernhard Heckel <bernhard.heckel@intel.com>
1127
1128 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
1129 to maintain proper indentation when printing pointers/refs.
1130
1131 2017-09-07 Joel Brobecker <brobecker@adacore.com>
1132
1133 GDB 8.0.1 released.
1134
1135 2017-09-07 Joel Brobecker <brobecker@adacore.com>
1136
1137 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
1138
1139 2017-09-05 Tom Tromey <tom@tromey.com>
1140
1141 * parse.c (funcall_chain): Now a std::vector.
1142 (start_arglist, end_arglist): Simplify.
1143 (free_funcalls): Remove.
1144 (parse_exp_in_context_1): Remove cleanup.
1145
1146 2017-09-05 Tom Tromey <tom@tromey.com>
1147
1148 * go-exp.y (go_parse): Don't create a cleanup.
1149
1150 2017-09-05 Tom Tromey <tom@tromey.com>
1151
1152 * d-exp.y (PrimaryExpression): Use std::string.
1153 (d_parse): Don't create a cleanup.
1154
1155 2017-09-05 Tom Tromey <tom@tromey.com>
1156
1157 * utils.c (do_clear_parser_state): Remove.
1158 (make_cleanup_clear_parser_state): Remove.
1159 * p-exp.y (pascal_parse): Use scoped_restore.
1160 * m2-exp.y (m2_parse): Use scoped_restore.
1161 * f-exp.y (f_parse): Use scoped_restore.
1162 * d-exp.y (d_parse): Use scoped_restore.
1163 * c-exp.y (c_parse): Use scoped_restore.
1164 * ada-exp.y (ada_parse): Use scoped_restore.
1165 * utils.h (make_cleanup_clear_parser_state): Remove.
1166
1167 2017-09-06 Keith Seitz <keiths@redhat.com>
1168
1169 * dwarf2read.c (dw2_linkage_name_attr): New function.
1170 (dw2_linkage_name): New function.
1171 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
1172 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
1173 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
1174
1175 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1176
1177 * config/djgpp/djconfig.sh: Correct shell portability issue.
1178
1179 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1180
1181 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
1182
1183 2017-09-06 John Baldwin <jhb@FreeBSD.org>
1184
1185 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
1186 * NEWS: Mention new FreeBSD/mips native configuration.
1187 * configure.host: Add aarch64*-*-freebsd*.
1188 * configure.nat: Likewise.
1189 * aarch64-fbsd-nat.c: New file.
1190
1191 2017-09-06 John Baldwin <jhb@FreeBSD.org>
1192
1193 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
1194 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
1195 * NEWS: Mention new FreeBSD/aarch64 target.
1196 * configure.tgt: Add aarch64*-*-freebsd*.
1197 * aarch64-fbsd-tdep.c: New file.
1198 * aarch64-fbsd-tdep.h: New file.
1199
1200 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1201
1202 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
1203
1204 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1205
1206 * parse.c (find_minsym_type_and_address): Don't relocate addresses
1207 of TLS symbols.
1208
1209 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1210
1211 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
1212 call.
1213
1214 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1215
1216 * infrun.c (follow_exec): Call add_thread after
1217 target_find_description.
1218
1219 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1220
1221 * infrun.c (handle_inferior_event_1): When exec'ing, read
1222 stop_pc after follow_exec.
1223
1224 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1225
1226 * remote.c (process_g_packet): Update error message.
1227
1228 2017-09-05 Yao Qi <yao.qi@linaro.org>
1229
1230 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
1231 targets.
1232
1233 2017-09-05 Pedro Alves <palves@redhat.com>
1234
1235 * eval.c (eval_call, evaluate_funcall): New functions, factored
1236 out from ...
1237 (evaluate_subexp_standard): ... this.
1238
1239 2017-09-05 Yao Qi <yao.qi@linaro.org>
1240
1241 * amd64-tdep.c (amd64_target_description): Create target
1242 descriptions.
1243 (_initialize_amd64_tdep): Don't call functions
1244 initialize_tdesc_amd64_*. Add self tests.
1245 * arch/amd64.c (amd64_create_target_description): Add parameter
1246 is_linux. Call set_tdesc_osabi if is_linux is true.
1247 * arch/amd64.h (amd64_create_target_description): Update the
1248 declaration.
1249 * arch/i386.c (i386_create_target_description): Add parameter
1250 is_linux. Call set_tdesc_osabi if is_linux is true.
1251 * arch/i386.h (i386_create_target_description): Update
1252 declaration.
1253 * configure.tgt: Add i386.o to gdb_target_obs.
1254 * features/Makefile (XMLTOC): Remove i386/*.xml.
1255 * features/i386/amd64-avx-avx512.c: Remove.
1256 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
1257 * features/i386/amd64-avx-mpx.c: Remove.
1258 * features/i386/amd64-avx.c: Remove.
1259 * features/i386/amd64-mpx.c: Remove.
1260 * features/i386/amd64.c: Remove.
1261 * features/i386/i386-avx-avx512.c: Remove.
1262 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
1263 * features/i386/i386-avx-mpx.c: Remove.
1264 * features/i386/i386-avx.c: Remove.
1265 * features/i386/i386-mmx.c: Remove.
1266 * features/i386/i386-mpx.c: Remove.
1267 * features/i386/i386.c: Remove.
1268 * i386-tdep.c: Don't include features/i386/i386*.c., include
1269 target-descriptions.h and arch/i386.h.
1270 (i386_target_description): Create target descriptions.
1271 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
1272 functions. Do self tests.
1273
1274 2017-09-05 Yao Qi <yao.qi@linaro.org>
1275
1276 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
1277 * features/i386/amd64-avx-avx512-linux.c: Removed.
1278 * features/i386/amd64-avx-linux.c: Removed.
1279 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
1280 * features/i386/amd64-avx-mpx-linux.c: Removed.
1281 * features/i386/amd64-linux.c: Removed.
1282 * features/i386/amd64-mpx-linux.c: Removed.
1283 * features/i386/x32-avx-avx512-linux.c: Removed.
1284 * features/i386/x32-avx-linux.c: Removed.
1285 * features/i386/x32-linux.c: Removed.
1286
1287 2017-09-05 Yao Qi <yao.qi@linaro.org>
1288
1289 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
1290 features/i386/*.c.
1291 (amd64_linux_read_description): Call
1292 amd64_create_target_description.
1293 * arch/amd64.c: New file.
1294 * arch/amd64.h: New file.
1295 * configure.tgt (x86_64-*-linux*): Append amd64.o.
1296 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
1297
1298 2017-09-05 Yao Qi <yao.qi@linaro.org>
1299
1300 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
1301 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
1302 (amd64_linux_read_description): Create target descriptions.
1303 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
1304 functions. Add unit tests.
1305 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
1306 x32-core.xml.
1307 * features/i386/64bit-avx.c: Generated.
1308 * features/i386/64bit-avx512.c: Generated.
1309 * features/i386/64bit-core.c: Generated.
1310 * features/i386/64bit-linux.c: Generated.
1311 * features/i386/64bit-mpx.c: Generated.
1312 * features/i386/64bit-pkeys.c: Generated.
1313 * features/i386/64bit-segments.c: Generated.
1314 * features/i386/64bit-sse.c: Generated.
1315 * features/i386/x32-core.c: Generated.
1316 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
1317 c files for amd64-linux and x32-linux.
1318
1319 2017-09-05 Yao Qi <yao.qi@linaro.org>
1320
1321 * amd64-linux-tdep.c (amd64_linux_read_description): New
1322 function.
1323 (amd64_linux_core_read_description): Call
1324 amd64_linux_read_description.
1325 (amd64_linux_init_abi): Likewise.
1326 (amd64_x32_linux_init_abi): Likewise.
1327 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
1328 * x86-linux-nat.c (x86_linux_read_description): Call
1329 amd64_linux_read_description.
1330
1331 2017-09-05 Yao Qi <yao.qi@linaro.org>
1332
1333 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
1334 comments.
1335
1336 2017-09-05 Yao Qi <yao.qi@linaro.org>
1337
1338 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
1339 * features/i386/i386-avx-avx512-linux.c: Remove.
1340 * features/i386/i386-avx-linux.c: Remove.
1341 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
1342 * features/i386/i386-avx-mpx-linux.c: Remove.
1343 * features/i386/i386-linux.c: Remove.
1344 * features/i386/i386-mmx-linux.c: Remove.
1345 * features/i386/i386-mpx-linux.c: Remove.
1346
1347 2017-09-05 Yao Qi <yao.qi@linaro.org>
1348
1349 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
1350 (SFILES): Add arch/i386.c.
1351 (HFILES_NO_SRCDIR): Add arch/i386.h.
1352 * arch/i386.c: New file.
1353 * arch/i386.h: New file.
1354 * arch/tdesc.h (allocate_target_description): Declare.
1355 (set_tdesc_architecture): Declare.
1356 (set_tdesc_osabi): Declare.
1357 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
1358 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
1359 include arch/i386.h.
1360 (i386_linux_read_description): Remove code and call
1361 i386_create_target_description.
1362 (set_tdesc_architecture): New function.
1363 (set_tdesc_osabi): New function.
1364 * target-descriptions.h (allocate_target_description): Remove.
1365
1366 2017-09-05 Yao Qi <yao.qi@linaro.org>
1367
1368 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
1369 * target-descriptions.c (tdesc_create_feature): Likewise, and
1370 adjust code.
1371 * features/i386/32bit-avx.c: Re-generated.
1372 * features/i386/32bit-avx512.c: Re-generated.
1373 * features/i386/32bit-core.c: Re-generated.
1374 * features/i386/32bit-linux.c: Re-generated.
1375 * features/i386/32bit-mpx.c: Re-generated.
1376 * features/i386/32bit-pkeys.c: Re-generated.
1377 * features/i386/32bit-sse.c: Re-generated.
1378
1379 2017-09-05 Yao Qi <yao.qi@linaro.org>
1380
1381 * regformats/regdef.h (struct reg): Override operator == and !=.
1382
1383 2017-09-05 Yao Qi <yao.qi@linaro.org>
1384
1385 * arch/tdesc.h: New file.
1386 * regformats/regdat.sh: Generate code using tdesc_create_reg.
1387 * target-descriptions.c: Update comments.
1388 * target-descriptions.h: Include "arch/tdesc.h". Remove the
1389 declarations.
1390 * features/i386/32bit-avx.c: Re-generated.
1391 * features/i386/32bit-avx512.c: Re-generated.
1392 * features/i386/32bit-core.c: Re-generated.
1393 * features/i386/32bit-linux.c: Re-generated.
1394 * features/i386/32bit-mpx.c: Re-generated.
1395 * features/i386/32bit-pkeys.c: Re-generated.
1396 * features/i386/32bit-sse.c: Re-generated.
1397
1398 2017-09-05 Yao Qi <yao.qi@linaro.org>
1399
1400 * regformats/regdat.sh: Update generated code.
1401
1402 2017-09-05 Yao Qi <yao.qi@linaro.org>
1403
1404 * regformats/regdat.sh: Adjust code order.
1405
1406 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1407
1408 * expprint.c (dump_subexp_body_standard): Use constant format
1409 string in fprintf_filtered call.
1410
1411 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1412
1413 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
1414 NetBSD/i386.
1415 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
1416
1417 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1418
1419 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
1420
1421 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1422
1423 * bsd-kvm.o: Define _KMEMUSER.
1424 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
1425 * configure: Regenerate.
1426
1427 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1428
1429 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
1430 * i386-fbsd-nat.c: Likewise.
1431
1432 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1433
1434 * unittests/array-view-selftests.c: Add include of <array>.
1435
1436 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1437
1438 * spu-tdep.c (flush_ea_cache): Add missing argument to
1439 call_function_by_hand.
1440
1441 2017-09-04 Pedro Alves <palves@redhat.com>
1442
1443 * NEWS (Safer support for debugging with no debug info): New.
1444
1445 2017-09-04 Pedro Alves <palves@redhat.com>
1446
1447 * c-exp.y (function_method, function_method_void): Add current
1448 instance flags to TYPE_INSTANCE.
1449 * dwarf2read.c (check_modifier): New.
1450 (compute_delayed_physnames): Assert that only C++ adds delayed
1451 physnames. Mark fn_fields as const/volatile depending on
1452 physname.
1453 * eval.c (make_params): New type_instance_flags parameter. Use
1454 it as the new type's instance flags.
1455 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
1456 flags element and pass it to make_params.
1457 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
1458 instance flags element.
1459 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
1460 * gdbtypes.h: Include "enum-flags.h".
1461 (type_instance_flags): New enum-flags type.
1462 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
1463 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
1464 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
1465 (follow_type_instance_flags): New function.
1466 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
1467 * parser-defs.h (follow_type_instance_flags): Declare.
1468 * valops.c (value_struct_elt_for_reference): const/volatile must
1469 match too.
1470
1471 2017-09-04 Pedro Alves <palves@redhat.com>
1472
1473 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
1474 function/method scopes; lookup the nested name as a function local
1475 static variable.
1476
1477 2017-09-04 Pedro Alves <palves@redhat.com>
1478
1479 (%type <voidval>): Add function_method.
1480 * c-exp.y (exp): New production for calls with no arguments.
1481 (function_method, function_method_void_or_typelist): New
1482 productions.
1483 (exp): New production for "method()::static_var".
1484 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
1485 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1486 Handle OP_FUNC_STATIC_VAR.
1487 * parse.c (operator_length_standard):
1488 Handle OP_FUNC_STATIC_VAR.
1489
1490 2017-09-04 Pedro Alves <palves@redhat.com>
1491
1492 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
1493 handling.
1494 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1495 Ditto.
1496 * parse.c (operator_length_standard, operator_check_standard):
1497 Ditto.
1498 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
1499
1500 2017-09-04 Pedro Alves <palves@redhat.com>
1501
1502 * ax-gdb.c: Include "typeprint.h".
1503 (gen_expr_for_cast): New function.
1504 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
1505 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
1506 type is unknown.
1507 * dwarf2read.c (new_symbol_full): Fallback to int instead of
1508 nodebug_data_symbol.
1509 * eval.c: Include "typeprint.h".
1510 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
1511 Error out if symbol has unknown type.
1512 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
1513 evaluate_subexp_for_cast.
1514 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
1515 OP_VAR_MSYM_VALUE.
1516 (evaluate_subexp_for_cast): New function.
1517 * gdbtypes.c (init_nodebug_var_type): New function.
1518 (objfile_type): Use it to initialize types of variables with no
1519 debug info.
1520 * typeprint.c (error_unknown_type): New.
1521 * typeprint.h (error_unknown_type): New declaration.
1522 * compile/compile-c-types.c (convert_type_basic): Handle
1523 TYPE_CODE_ERROR; warn and fallback to int for variables with
1524 unknown type.
1525
1526 2017-09-04 Pedro Alves <palves@redhat.com>
1527
1528 * eval.c (evaluate_var_value): New function, factored out from ...
1529 (evaluate_subexp_standard): ... here.
1530
1531 2017-09-04 Pedro Alves <palves@redhat.com>
1532
1533 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
1534 Remove useless assignments to 'op'.
1535
1536 2017-09-04 Pedro Alves <palves@redhat.com>
1537
1538 * eval.c (eval_skip_value): New function.
1539 (evaluate_subexp_standard): Use it.
1540
1541 2017-09-04 Pedro Alves <palves@redhat.com>
1542
1543 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
1544 function name from symbol/minsym and pass it to
1545 error_call_unknown_return_type.
1546
1547 2017-09-04 Pedro Alves <palves@redhat.com>
1548
1549 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
1550 * ax-gdb.c (gen_msym_var_ref): New function.
1551 (gen_expr): Handle OP_VAR_MSYM_VALUE.
1552 * eval.c (evaluate_var_msym_value): New function.
1553 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
1554 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
1555 to call_function_by_hand.
1556 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1557 Handle OP_VAR_MSYM_VALUE.
1558 (union exp_element) <msymbol>: New field.
1559 * minsyms.h (struct type): Forward declare.
1560 (find_minsym_type_and_address): Declare.
1561 * parse.c (write_exp_elt_msym): New function.
1562 (write_exp_msymbol): Delete, refactored as ...
1563 (find_minsym_type_and_address): ... this new function.
1564 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
1565 (operator_length_standard, operator_check_standard): Handle
1566 OP_VAR_MSYM_VALUE.
1567 * std-operator.def (OP_VAR_MSYM_VALUE): New.
1568
1569 2017-09-04 Pedro Alves <palves@redhat.com>
1570
1571 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
1572 TYPE_GNU_IFUNC specially here. Throw error if return type is
1573 unknown.
1574 * ada-typeprint.c (print_func_type): Handle functions with unknown
1575 return type.
1576 * c-typeprint.c (c_type_print_base): Handle functions and methods
1577 with unknown return type.
1578 * compile/compile-c-symbols.c (convert_symbol_bmsym)
1579 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
1580 * compile/compile-c-types.c: Include "objfiles.h".
1581 (convert_func): For functions with unknown return type, warn and
1582 default to int.
1583 * compile/compile-object-run.c (compile_object_run): Adjust call
1584 to call_function_by_hand_dummy.
1585 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
1586 call_function_by_hand.
1587 * eval.c (evaluate_subexp_standard): Adjust calls to
1588 call_function_by_hand. Handle functions and methods with unknown
1589 return type. Pass expect_type to call_function_by_hand.
1590 * f-typeprint.c (f_type_print_base): Handle functions with unknown
1591 return type.
1592 * gcore.c (call_target_sbrk): Adjust call to
1593 call_function_by_hand.
1594 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
1595 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
1596 an integer address type instead of nodebug.
1597 * guile/scm-value.c (gdbscm_value_call): Adjust call to
1598 call_function_by_hand.
1599 * infcall.c (error_call_unknown_return_type): New function.
1600 (call_function_by_hand): New "default_return_type" parameter.
1601 Pass it down.
1602 (call_function_by_hand_dummy): New "default_return_type"
1603 parameter. Use it instead of defaulting to int. If there's no
1604 default and the return type is unknown, throw an error. If
1605 there's a default return type, and the called function has no
1606 debug info, then assume the function is prototyped.
1607 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
1608 New "default_return_type" parameter.
1609 (error_call_unknown_return_type): New declaration.
1610 * linux-fork.c (call_lseek): Cast return type of lseek.
1611 (inferior_call_waitpid, checkpoint_command): Adjust calls to
1612 call_function_by_hand.
1613 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
1614 calls to call_function_by_hand.
1615 * m2-typeprint.c (m2_procedure): Handle functions with unknown
1616 return type.
1617 * objc-lang.c (lookup_objc_class, lookup_child_selector)
1618 (value_nsstring, print_object_command): Adjust calls to
1619 call_function_by_hand.
1620 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
1621 functions with unknown return type.
1622 (pascal_type_print_func_varspec_suffix): New function.
1623 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
1624 TYPE_CODE_METHOD>: Use it.
1625 * python/py-value.c (valpy_call): Adjust call to
1626 call_function_by_hand.
1627 * rust-lang.c (rust_evaluate_funcall): Adjust call to
1628 call_function_by_hand.
1629 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
1630 call_function_by_hand.
1631 * valops.c (value_allocate_space_in_inferior): Adjust call to
1632 call_function_by_hand.
1633 * typeprint.c (type_print_unknown_return_type): New function.
1634 * typeprint.h (type_print_unknown_return_type): New declaration.
1635
1636 2017-09-04 Pedro Alves <palves@redhat.com>
1637
1638 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
1639 types with more than one parameter as prototyped.
1640
1641 2017-09-04 Pedro Alves <palves@redhat.com>
1642
1643 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
1644 (disassemble_command): Use gdb_disassembly_flags instead of bare
1645 int.
1646 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
1647 (dump_insns, do_mixed_source_and_assembly_deprecated)
1648 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
1649 Use gdb_disassembly_flags instead of bare int.
1650 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
1651 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
1652 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
1653 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
1654 (enum gdb_disassembly_flag): ... values of this new enumeration.
1655 (gdb_disassembly_flags): Define.
1656 (gdb_disassembly)
1657 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
1658 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
1659 gdb_disassembly_flags instead of bare int.
1660 * record-btrace.c (btrace_insn_history)
1661 (record_btrace_insn_history, record_btrace_insn_history_range)
1662 (record_btrace_insn_history_from): Use gdb_disassembly_flags
1663 instead of bare int.
1664 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
1665 Use gdb_disassembly_flags instead of bare int.
1666 * target-debug.h (target_debug_print_gdb_disassembly_flags):
1667 Define.
1668 * target-delegates.c: Regenerate.
1669 * target.c (target_insn_history, target_insn_history_from)
1670 (target_insn_history_range): Use gdb_disassembly_flags instead of
1671 bare int.
1672 * target.h: Include "disasm.h".
1673 (struct target_ops) <to_insn_history, to_insn_history_from,
1674 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
1675 int.
1676 (target_insn_history, target_insn_history_from)
1677 (target_insn_history_range): Use gdb_disassembly_flags instead of
1678 bare int.
1679
1680 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1681
1682 * cli/cli-script.c (build_command_line): For if/while commands,
1683 check whether args is empty.
1684
1685 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1686
1687 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
1688 (enum command_control_type): Likewise.
1689 (struct command_line): Likewise.
1690 (free_command_lines): Likewise.
1691 (struct command_lines_deleter): Likewise.
1692 (command_line_up): Likewise.
1693 (read_command_lines): Likewise.
1694 (read_command_lines_1): Likewise.
1695 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
1696 (enum command_control_type): Likewise.
1697 (struct command_line): Likewise.
1698 (free_command_lines): Likewise.
1699 (struct command_lines_deleter): Likewise.
1700 (command_line_up): Likewise.
1701 (read_command_lines): Likewise.
1702 (read_command_lines_1): Likewise.
1703 * breakpoint.h: Include cli/cli-script.h.
1704 * extension-priv.h: Likewise.
1705 * gdbcmd.h: Likewise.
1706
1707 2017-09-04 Pedro Alves <palves@redhat.com>
1708
1709 * ada-lang.c (is_known_support_routine): Move sal declaration to
1710 where it is initialized.
1711 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
1712 (parse_breakpoint_sals, decode_static_tracepoint_spec)
1713 (clear_command, update_static_tracepoint): Remove init_sal
1714 references. Move declarations closer to initializations.
1715 * cli/cli-cmds.c (list_command): Move sal declarations closer to
1716 initializations.
1717 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
1718 references. Move sal declarations closer to initializations.
1719 * frame.c (find_frame_sal): Return a symtab_and_line via function
1720 return instead of output parameter. Remove init_sal references.
1721 * frame.h (find_frame_sal): Return a symtab_and_line via function
1722 return instead of output parameter.
1723 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
1724 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
1725 instead of memset.
1726 (gdbscm_find_pc_line): Remove init_sal reference.
1727 * infcall.c (call_function_by_hand_dummy): Remove init_sal
1728 references. Move declarations closer to initializations.
1729 * infcmd.c (set_step_frame): Update. Move declarations closer to
1730 initializations.
1731 (finish_backward): Remove init_sal references. Move declarations
1732 closer to initializations.
1733 * infrun.c (process_event_stop_test, handle_step_into_function)
1734 (insert_hp_step_resume_breakpoint_at_frame)
1735 (insert_step_resume_breakpoint_at_caller): Likewise.
1736 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
1737 (symbol_to_sal): Likewise.
1738 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
1739 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
1740 to its initialization.
1741 * reverse.c (save_bookmark_command): Use new/delete. Remove
1742 init_sal references. Move declarations closer to initializations.
1743 * source.c (get_current_source_symtab_and_line): Remove brace
1744 initialization.
1745 (set_current_source_symtab_and_line): Now takes the sal by const
1746 reference. Remove brace initialization.
1747 (line_info): Remove init_sal reference.
1748 * source.h (set_current_source_symtab_and_line): Now takes a
1749 symtab_and_line via const reference.
1750 * stack.c (set_current_sal_from_frame): Adjust.
1751 (print_frame_info): Adjust.
1752 (get_last_displayed_sal): Return the sal via function return
1753 instead of via output parameter. Simplify.
1754 (frame_info): Adjust.
1755 * stack.h (get_last_displayed_sal): Return the sal via function
1756 return instead of via output parameter.
1757 * symtab.c (init_sal): Delete.
1758 (find_pc_sect_line): Remove init_sal references. Move
1759 declarations closer to initializations.
1760 (find_function_start_sal): Remove init_sal references. Move
1761 declarations closer to initializations.
1762 * symtab.h (struct symtab_and_line): In-class initialize all
1763 fields.
1764 * tracepoint.c (set_traceframe_context)
1765 (print_one_static_tracepoint_marker): Remove init_sal references.
1766 Move declarations closer to initializations.
1767 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
1768 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
1769 declarations closer to initializations.
1770 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
1771 init_sal references. Adjust.
1772
1773 2017-09-04 Pedro Alves <palves@redhat.com>
1774
1775 * ax-gdb.c (agent_command_1): Use range-for.
1776 * break-catch-throw.c (re_set_exception_catchpoint): Update.
1777 * breakpoint.c: Include "common/array-view.h".
1778 (init_breakpoint_sal, create_breakpoint_sal): Change sals
1779 parameter from struct symtabs_and_lines to
1780 array_view<symtab_and_line>. Adjust. Use range-for. Update.
1781 (breakpoint_sals_to_pc): Change sals parameter from struct
1782 symtabs_and_lines to std::vector reference.
1783 (check_fast_tracepoint_sals): Change sals parameter from struct
1784 symtabs_and_lines to std::array_view. Use range-for.
1785 (decode_static_tracepoint_spec): Return a std::vector instead of
1786 symtabs_and_lines. Update.
1787 (create_breakpoint): Update.
1788 (break_range_command, until_break_command, clear_command): Update.
1789 (base_breakpoint_decode_location, bkpt_decode_location)
1790 (bkpt_probe_create_sals_from_location)
1791 (bkpt_probe_decode_location, tracepoint_decode_location)
1792 (tracepoint_probe_decode_location)
1793 (strace_marker_create_sals_from_location): Return a std::vector
1794 instead of symtabs_and_lines.
1795 (strace_marker_create_breakpoints_sal): Update.
1796 (strace_marker_decode_location): Return a std::vector instead of
1797 symtabs_and_lines. Update.
1798 (update_breakpoint_locations): Change struct symtabs_and_lines
1799 parameters to gdb::array_view. Adjust.
1800 (location_to_sals): Return a std::vector instead of
1801 symtabs_and_lines. Update.
1802 (breakpoint_re_set_default): Use std::vector instead of struct
1803 symtabs_and_lines.
1804 (decode_location_default): Return a std::vector instead of
1805 symtabs_and_lines. Update.
1806 * breakpoint.h: Include "common/array-view.h".
1807 (struct breakpoint_ops) <decode_location>: Now returns a
1808 std::vector instead of returning a symtabs_and_lines via output
1809 parameter.
1810 (update_breakpoint_locations): Change sals parameters to use
1811 gdb::array_view.
1812 * cli/cli-cmds.c (edit_command, list_command): Update to use
1813 std::vector and gdb::array_view.
1814 (ambiguous_line_spec): Adjust to use gdb::array_view and
1815 range-for.
1816 (compare_symtabs): Rename to ...
1817 (cmp_symtabs): ... this. Change parameters to symtab_and_line
1818 const reference and adjust.
1819 (filter_sals): Rewrite using std::vector and standard algorithms.
1820 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
1821 (jump_command): Update to use std::vector.
1822 * linespec.c (struct linespec_state) <canonical_names>: Update
1823 comment.
1824 (add_sal_to_sals_basic): Delete.
1825 (add_sal_to_sals, filter_results, convert_results_to_lsals)
1826 (decode_line_2, create_sals_line_offset)
1827 (convert_address_location_to_sals, convert_linespec_to_sals)
1828 (convert_explicit_location_to_sals, parse_linespec)
1829 (event_location_to_sals, decode_line_full, decode_line_1)
1830 (decode_line_with_current_source)
1831 (decode_line_with_last_displayed, decode_objc)
1832 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
1833 (linespec_result::~linespec_result): Adjust to use std::vector
1834 instead of symtabs_and_lines.
1835 * linespec.h (linespec_sals::sals): Now a std::vector.
1836 (struct linespec_result): Use std::vector, bool, and in-class
1837 initialization.
1838 (decode_line_1, decode_line_with_current_source)
1839 (decode_line_with_last_displayed): Return std::vector.
1840 * macrocmd.c (info_macros_command): Use std::vector.
1841 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
1842 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
1843 std::vector.
1844 * probe.h (parse_probes): Return a std::vector.
1845 * python/python.c (gdbpy_decode_line): Use std::vector and
1846 gdb::array_view.
1847 * source.c (select_source_symtab, line_info): Use std::vector.
1848 * stack.c (func_command): Use std::vector.
1849 * symtab.h (struct symtabs_and_lines): Delete.
1850 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
1851
1852 2017-09-04 Pedro Alves <palves@redhat.com>
1853
1854 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1855 unittests/array-view-selftests.c.
1856 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
1857 * common/array-view.h: New file.
1858 * unittests/array-view-selftests.c: New file.
1859
1860 2017-09-04 Pedro Alves <palves@redhat.com>
1861
1862 * cli/cli-cmds.c (edit_command): Pass message to
1863 ambiguous_line_spec.
1864 (list_command): Pass message to ambiguous_line_spec. Say
1865 "first"/"last" instead of "start" and "end" to be consistent with
1866 the manual.
1867 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
1868 them to print formatted message.
1869
1870 2017-09-04 Pedro Alves <palves@redhat.com>
1871
1872 * btrace.c (ftrace_add_pt): Pass btrace_insn to
1873 ftrace_update_insns by reference instead of pointer.
1874
1875 2017-09-04 Yao Qi <yao.qi@linaro.org>
1876
1877 * i386-go32-tdep.c: Include x86-xstate.h.
1878 (i386_go32_init_abi): Call i386_target_description.
1879 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
1880 if xcr0 is X86_XSTATE_X87_MASK.
1881 * i386-tdep.h (tdesc_i386): Remove the declaration.
1882 (tdesc_i386_mmx): Likewise.
1883
1884 2017-09-04 Yao Qi <yao.qi@linaro.org>
1885
1886 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
1887 X86_XSTATE_SSE_MASK instead of 0.
1888
1889 2017-09-04 Yao Qi <yao.qi@linaro.org>
1890
1891 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
1892 i386_target_description.
1893 * i386-fbsd-nat.c (i386fbsd_read_description): Call
1894 i386_target_description.
1895 * i386-tdep.c (i386_gdbarch_init): Likewise.
1896
1897 2017-09-04 Yao Qi <yao.qi@linaro.org>
1898
1899 * amd64-darwin-tdep.c: Include "x86-xstate.h".
1900 (x86_darwin_init_abi_64): Call amd64_target_description.
1901 * amd64-dicos-tdep.c: Likewise.
1902 * amd64-fbsd-nat.c: Likewise.
1903 * amd64-fbsd-tdep.c: Likewise.
1904 * amd64-nbsd-tdep.c: Likewise.
1905 * amd64-obsd-tdep.c: Likewise.
1906 * amd64-sol2-tdep.c: Likewise.
1907 * amd64-windows-tdep.c: Likewise.
1908 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
1909
1910 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1911
1912 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
1913 (btrace_function) <insn>: Change type to use std::vector.
1914 * btrace.c (ftrace_debug, ftrace_call_num_insn,
1915 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
1916 ftrace_update_insns, ftrace_compute_global_level_offset,
1917 btrace_stitch_bts, btrace_clear, btrace_insn_get,
1918 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
1919 change to std::vector.
1920 (ftrace_update_insns): Adjust to change to std::vector, change
1921 type of INSN parameter.
1922 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
1923 * record-btrace.c (btrace_call_history_insn_range,
1924 btrace_compute_src_line_range,
1925 record_btrace_frame_prev_register): Adjust to change to
1926 std::vector.
1927 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
1928 to change to std::vector.
1929
1930 2017-09-03 Tom Tromey <tom@tromey.com>
1931
1932 * corefile.c (reopen_exec_file): Use std::string.
1933
1934 2017-09-03 Tom Tromey <tom@tromey.com>
1935
1936 * compile/compile.c (compile_register_name_mangled): Return
1937 std::string.
1938 * compile/compile-loc2c.c (pushf_register_address): Update.
1939 (pushf_register): Update.
1940 * compile/compile-c-types.c (convert_array): Update.
1941 * compile/compile-c-symbols.c (generate_vla_size): Update.
1942 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
1943 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
1944 (convert_one_symbol): Update.
1945 (generate_c_for_for_one_variable): Update.
1946 * compile/compile-c-support.c (c_get_range_decl_name): Return a
1947 std::string.
1948 (generate_register_struct): Update.
1949 * compile/compile-internal.h (c_get_range_decl_name): Return a
1950 std::string.
1951 (compile_register_name_mangled): Return std::string.
1952
1953 2017-09-03 Tom Tromey <tom@tromey.com>
1954
1955 * utils.c (perror_string): Return a std::string.
1956 (throw_perror_with_name, perror_warning_with_name): Update.
1957
1958 2017-09-03 Tom Tromey <tom@tromey.com>
1959
1960 * demangle.c (demangle_command): Use std::string,
1961 unique_xmalloc_ptr.
1962
1963 2017-09-03 Tom Tromey <tom@tromey.com>
1964
1965 * cli/cli-setshow.c (do_set_command): Use std::string.
1966
1967 2017-09-03 Tom Tromey <tom@tromey.com>
1968
1969 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
1970
1971 2017-09-03 Tom Tromey <tom@tromey.com>
1972
1973 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
1974
1975 2017-09-03 Tom Tromey <tom@tromey.com>
1976
1977 * mi/mi-cmd-env.c (env_execute_cli_command): Use
1978 gdb::unique_xmalloc_ptr.
1979
1980 2017-09-03 Tom Tromey <tom@tromey.com>
1981
1982 * thread.c (print_thread_info_1): Use string_printf.
1983 (thread_apply_command, thread_apply_all_command): Use
1984 std::string.
1985
1986 2017-09-03 Tom Tromey <tom@tromey.com>
1987
1988 * valprint.c (val_print_string): Update.
1989 * gdbcore.h (memory_error_message): Return std::string.
1990 * corefile.c (memory_error_message): Return std::string.
1991 (memory_error): Update.
1992 * breakpoint.c (insert_bp_location): Update.
1993
1994 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1995
1996 * target/waitstatus.h (target_waitstatus_to_string): Change
1997 return type to std::string.
1998 * target/waitstatus.c (target_waitstatus_to_string): Return
1999 std::string.
2000 * target.h (target_waitstatus_to_string): Remove declaration.
2001 * infrun.c (resume, clear_proceed_status_thread,
2002 print_target_wait_results, do_target_wait, save_waitstatus,
2003 stop_all_threads): Adjust.
2004 * record-btrace.c (record_btrace_wait): Adjust.
2005 * target-debug.h
2006 (target_debug_print_struct_target_waitstatus_p): Adjust.
2007
2008 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2009
2010 PR gdb/22046
2011 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
2012 detection.
2013
2014 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2015
2016 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
2017 for setting/unsetting environment variables on the remote target.
2018 (New remote packets): Add entries for QEnvironmentHexEncoded,
2019 QEnvironmentUnset and QEnvironmentReset.
2020 * common/environ.c (gdb_environ::operator=): Extend method to
2021 handle m_user_set_env_list and m_user_unset_env_list.
2022 (gdb_environ::clear): Likewise.
2023 (match_var_in_string): Change type of first parameter from 'char
2024 *' to 'const char *'.
2025 (gdb_environ::set): Extend method to handle
2026 m_user_set_env_list and m_user_unset_env_list.
2027 (gdb_environ::unset): Likewise.
2028 (gdb_environ::clear_user_set_env): New method.
2029 (gdb_environ::user_set_envp): Likewise.
2030 (gdb_environ::user_unset_envp): Likewise.
2031 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
2032 m_user_unset_env_list on move constructor/assignment.
2033 (unset): Add new default parameter 'update_unset_list = true'.
2034 (clear_user_set_env): New method.
2035 (user_set_envp): Likewise.
2036 (user_unset_envp): Likewise.
2037 (m_user_set_env_list): New std::set.
2038 (m_user_unset_env_list): Likewise.
2039 * common/rsp-low.c (hex2str): New function.
2040 (bin2hex): New overload for bin2hex function.
2041 * common/rsp-low.c (hex2str): New prototype.
2042 (str2hex): New overload prototype.
2043 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
2044 QEnvironmentUnset and QEnvironmentReset.
2045 (remote_protocol_features): Add QEnvironmentHexEncoded,
2046 QEnvironmentUnset and QEnvironmentReset packets.
2047 (send_environment_packet): New function.
2048 (extended_remote_environment_support): Likewise.
2049 (extended_remote_create_inferior): Call
2050 extended_remote_environment_support.
2051 (_initialize_remote): Add QEnvironmentHexEncoded,
2052 QEnvironmentUnset and QEnvironmentReset packet configs.
2053 * unittests/environ-selftests.c (gdb_selftest_env_var):
2054 New variable.
2055 (test_vector_initialization): New function.
2056 (test_init_from_host_environ): Likewise.
2057 (test_reinit_from_host_environ): Likewise.
2058 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
2059 Likewise.
2060 (test_unset_set_empty_vector): Likewise.
2061 (test_vector_clear): Likewise.
2062 (test_std_move): Likewise.
2063 (test_move_constructor):
2064 (test_self_move): Likewise.
2065 (test_set_unset_reset): Likewise.
2066 (run_tests): Rewrite in terms of the functions above.
2067
2068 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
2069
2070 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
2071 (adi_available): Use a temp variable of type CORE_ADDR as argument
2072 3 when calling target_auxv_search.
2073 (adi_normalize_address): Use masks and xor operators to calculate
2074 normalized address.
2075 (adi_read_versions, adi_write_versions, adi_print_versions)
2076 (do_examine, do_assign): Use paddress.
2077
2078 2017-08-29 John Baldwin <jhb@FreeBSD.org>
2079
2080 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
2081 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
2082 out of loop and add supply of FIR.
2083 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
2084 add collect of FIR.
2085
2086 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
2087
2088 PR gdb/21827
2089 * cli/cli-script.c (define_command): Don't convert command name
2090 to lower case.
2091
2092 2017-08-25 Joel Brobecker <brobecker@adacore.com>
2093
2094 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
2095 Update all callers accordingly. Remove all code blocks handling
2096 the case where DISPP is not NULL.
2097
2098 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2099
2100 PR symtab/22003
2101 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
2102 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2103 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
2104
2105 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2106
2107 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
2108 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
2109 (read_comp_units_from_section): New parameter abbrev_section, use
2110 read_and_check_comp_unit_head, allocate signatured_type if needed.
2111 (create_all_comp_units): Update read_comp_units_from_section caller.
2112
2113 2017-08-23 Pedro Alves <palves@redhat.com>
2114
2115 PR remote/21852
2116 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
2117 to null_ptid and switch to thread without reading the registers
2118 after adding the inferior.
2119
2120 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2121
2122 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
2123 compile-gcc.
2124 * compile/compile.c (compile_gcc, show_compile_gcc): New.
2125 (compile_to_object): Implement compile_gcc.
2126 (_initialize_compile): Install "set compile-gcc". Initialize
2127 compile_gcc.
2128
2129 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2130
2131 * compile/compile.c (compile_to_object): Conditionally call
2132 set_verbose. Conditionally call compile or compile_v0.
2133
2134 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
2135
2136 * sparc64-tdep.h: (adi_normalize_address): New export.
2137 * sparc-nat.h: (open_adi_tag_fd): New export.
2138 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
2139 * sparc64-linux-tdep.c:
2140 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
2141 (sparc64_linux_handle_segmentation_fault): New function.
2142 (sparc64_linux_init_abi): Register
2143 sparc64_linux_handle_segmentation_fault
2144 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
2145 (sparc64_addr_bits_remove): New function.
2146 (sparc64_init_abi): Register sparc64_addr_bits_remove.
2147 (MAX_PROC_NAME_SIZE): New macro.
2148 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
2149 (sparc64adilist): New variable.
2150 (adi_proc_list): New variable.
2151 (find_adi_info): New function.
2152 (add_adi_info): New function.
2153 (get_adi_info_proc): New function.
2154 (get_adi_info): New function.
2155 (info_adi_command): New function.
2156 (read_maps_entry): New function.
2157 (adi_available): New function.
2158 (adi_normalize_address): New function.
2159 (adi_align_address): New function.
2160 (adi_convert_byte_count): New function.
2161 (adi_tag_fd): New function.
2162 (adi_is_addr_mapped): New function.
2163 (adi_read_versions): New function.
2164 (adi_write_versions): New function.
2165 (adi_print_versions): New function.
2166 (do_examine): New function.
2167 (do_assign): New function.
2168 (adi_examine_command): New function.
2169 (adi_assign_command): New function.
2170 (_initialize_sparc64_adi_tdep): New function.
2171
2172 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
2173
2174 * breakpoint.c (breakpoints_info): Rename to ...
2175 (info_breakpoints_command): ... this.
2176 (watchpoints_info): Rename to ...
2177 (info_watchpoints_command): ... this.
2178 (tracepoints_info): Rename to ...
2179 (info_tracepoints_command): ... this.
2180 (_initialize_breakpoint): Adjust.
2181 * dcache.c (dcache_info): Rename to ...
2182 (info_display_command): ... this.
2183 (_initialize_dcache): Adjust.
2184 * frame.h (args_info): Rename to ...
2185 (info_args_command): ... this.
2186 (locals_info): Rename to ...
2187 (info_locals_command): ... this.
2188 * infcmd.c (nofp_registers_info): Rename to ...
2189 (info_registers_command): ... this.
2190 (float_info): Rename to ...
2191 (info_float_command): ... this.
2192 (program_info): Rename to ...
2193 (info_program_command): ... this.
2194 (all_registers_info): Rename to ...
2195 (info_all_registers_command): ... this.
2196 (vector_info): Rename to ...
2197 (info_vector_command): ... this.
2198 (float_info): Rename to ...
2199 (info_float_command): ... this.
2200 (_initialize_infcmd): Adjust.
2201 * inferior.h (term_info): Rename to ...
2202 (info_terminal_command): ... this.
2203 * inflow.c (term_info): Rename to ...
2204 (info_terminal_command): ... this.
2205 (_initialize_inflow): Adjust.
2206 * infrun.c (signals_info): Rename to ...
2207 (info_signals_command): ... this.
2208 (_initialize_infrun): Adjust.
2209 * objc-lang.c (classes_info): Rename to ...
2210 (info_classes_command): ... this.
2211 (selectors_info): Rename to ...
2212 (info_selectors_command): ... this.
2213 (_initialize_objc_language): Adjust.
2214 * printcmd.c (sym_info): Rename to ...
2215 (info_symbol_command): ... this.
2216 (address_info): Rename to ...
2217 (info_address_command): ... this.
2218 (display_info): Rename to ...
2219 (info_display_command): ... this.
2220 (_initialize_printcmd): Adjust.
2221 * reverse.c (bookmarks_info): Rename to ...
2222 (info_breakpoints_command): ... this.
2223 (_initialize_reverse): Adjust.
2224 * ser-go32.c (dos_info): Rename to ...
2225 (info_serial_command): ... this.
2226 (_initialize_ser_dos): Adjust.
2227 * skip.c (skip_info): Rename to ...
2228 (info_skip_command): ... this.
2229 (_initialize_step_skip): Adjust.
2230 * source.c (line_info): Rename to ...
2231 (info_line_command): ... this.
2232 (source_info): Rename to ...
2233 (info_source_command)
2234 * stack.c (frame_info): Rename to ...
2235 (info_frame_command): ... this.
2236 (locals_info): Rename to ...
2237 (info_locals_command): ... this.
2238 (args_info): Rename to ...
2239 (info_args_command): ... this.
2240 (_initialize_stack): Adjust.
2241 * symtab.c (sources_info): Rename to ...
2242 (info_sources_command): ... this.
2243 (variables_info): Rename to ...
2244 (info_variables_command): ... this.
2245 (functions_info): Rename to ...
2246 (info_functions_command): ... this.
2247 (types_info): Rename to ...
2248 (info_types_command): ... this.
2249 (_initialize_symtab): Adjust.
2250 * target.c (target_info): Rename to ...
2251 (info_target_command): ... this.
2252 (initialize_targets): Adjust.
2253 * tracepoint.c (tvariables_info): Rename to ...
2254 (info_tvariables_command): ... this.
2255 (scope_info): Rename to ...
2256 (info_scope_command): ... this.
2257 (trace_dump_actions): Adjust.
2258 (_initialize_tracepoint): Adjust.
2259
2260 2017-08-22 Tom Tromey <tom@tromey.com>
2261
2262 * breakpoint.h (install_breakpoint): Update.
2263 * breakpoint.c (add_solib_catchpoint): Update.
2264 (install_breakpoint): Change argument to a std::unique_ptr.
2265 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
2266 (create_breakpoint_sal, create_breakpoint): Update.
2267 (watch_command_1, catch_exec_command_1)
2268 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
2269 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
2270 Return the breakpoint.
2271 (set_raw_breakpoint_without_location, set_raw_breakpoint)
2272 (new_single_step_breakpoint): Update.
2273 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
2274 std::unique_ptr.
2275 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2276 std::unique_ptr.
2277 * break-catch-sig.c (create_signal_catchpoint): Use
2278 std::unique_ptr.
2279 * ada-lang.c (create_ada_exception_catchpoint): Use
2280 std::unique_ptr.
2281
2282 2017-08-22 Tom Tromey <tom@tromey.com>
2283
2284 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
2285
2286 2017-08-22 Tom Tromey <tom@tromey.com>
2287
2288 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
2289 (lookup_partial_symbol): Update.
2290
2291 2017-08-22 Tom Tromey <tom@tromey.com>
2292
2293 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
2294 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
2295 (find_and_open_source, symtab_to_fullname): Update.
2296 * psymtab.c (psymtab_to_fullname): Update.
2297
2298 2017-08-22 Tom Tromey <tom@tromey.com>
2299
2300 * exec.c (exec_file_attach): Update.
2301 * linux-thread-db.c (try_thread_db_load): Update.
2302 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
2303 * utils.c (gdb_realpath): Change return type.
2304 (gdb_realpath_keepfile): Update.
2305 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
2306 (_initialize_utils): Register the new self test.
2307 * source.c (openp): Update.
2308 (find_and_open_source): Update.
2309 * nto-tdep.c (nto_find_and_open_solib): Update.
2310 * main.c (set_gdb_data_directory): Update.
2311 (captured_main_1): Update.
2312 * dwarf2read.c (dwarf2_get_dwz_file): Update
2313 (dw2_map_symbol_filenames): Update.
2314 * auto-load.c (auto_load_safe_path_vec_update): Update.
2315 (filename_is_in_auto_load_safe_path_vec): Change type of
2316 "filename_realp".
2317 (auto_load_objfile_script): Update.
2318 (file_is_auto_load_safe): Update. Use std::string.
2319 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
2320
2321 2017-08-22 Tom Tromey <tom@tromey.com>
2322
2323 * utils.c (gdb_realpath_keepfile): Return a
2324 gdb::unique_xmalloc_ptr.
2325 * exec.c (exec_file_attach): Update.
2326 * utils.h (gdb_realpath_keepfile): Return a
2327 gdb::unique_xmalloc_ptr.
2328
2329 2017-08-22 Tom Tromey <tom@tromey.com>
2330
2331 * compile/compile.c (compile_file_command): Use
2332 gdb::unique_xmalloc_ptr, std::string.
2333 * utils.c (gdb_abspath): Change return type.
2334 * source.c (openp): Update.
2335 * objfiles.c (allocate_objfile): Update.
2336 * main.c (set_gdb_data_directory): Update.
2337 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
2338
2339 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
2340
2341 * cli-cmds.c (list_commands): List actual code around more than
2342 one location.
2343
2344 2017-08-21 John Baldwin <jhb@FreeBSD.org>
2345
2346 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
2347
2348 2017-08-21 Pedro Alves <palves@redhat.com>
2349
2350 PR gdb/19487
2351 * c-exp.y (variable production): Handle function aliases.
2352 * minsyms.c (msymbol_is_text): New function.
2353 * minsyms.h (msymbol_is_text): Declare.
2354 * symtab.c (find_function_alias_target): New function.
2355 * symtab.h (find_function_alias_target): Declare.
2356
2357 2017-08-21 Pedro Alves <palves@redhat.com>
2358
2359 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
2360 typedefs.
2361 * typeprint.c (whatis_exp): If handling "whatis", and expression
2362 is OP_TYPE, strip one typedef level. Otherwise don't strip
2363 typedefs here.
2364 * valops.c (value_cast): Save "to" type before resolving
2365 stubs/typedefs. Use that type as resulting value's type.
2366
2367 2017-08-18 Tom Tromey <tom@tromey.com>
2368 Pedro Alves <palves@redhat.com>
2369
2370 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
2371 * sol-thread.c (sol_thread_resume, sol_thread_wait)
2372 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
2373 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
2374 * proc-service.c (ps_xfer_memory): Use scoped_restore.
2375 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
2376 (linux_get_siginfo_data): Add "thread" argument. Use
2377 scoped_restore.
2378 * linux-nat.c (linux_child_follow_fork)
2379 (check_stopped_by_watchpoint): Use scoped_restore.
2380 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
2381 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
2382 (restore_inferior_ptid, save_inferior_ptid): Remove.
2383 * btrace.c (btrace_fetch): Use scoped_restore.
2384 * bsd-uthread.c (bsd_uthread_fetch_registers)
2385 (bsd_uthread_store_registers): Use scoped_restore.
2386 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
2387 scoped_restore.
2388 * aix-thread.c (aix_thread_resume, aix_thread_wait)
2389 (aix_thread_xfer_partial): Use scoped_restore.
2390 * inferior.h (save_inferior_ptid): Remove.
2391
2392 2017-08-18 Yao Qi <yao.qi@linaro.org>
2393
2394 PR tdep/21818
2395 * arm-tdep.c (gdb_print_insn_arm): Mark
2396 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
2397
2398 2017-08-18 Yao Qi <yao.qi@linaro.org>
2399
2400 * NEWS: Mention GDBserver's new option "--selftest".
2401 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
2402 * selftest.c: Move it to common/selftest.c.
2403 * selftest.h: Move it to common/selftest.h.
2404 * selftest-arch.c (reset): New function.
2405 (tests_with_arch): Call reset.
2406
2407 2017-08-18 Yao Qi <yao.qi@linaro.org>
2408
2409 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
2410 instead of exception_fprintf and printf_filtered.
2411
2412 2017-08-18 Yao Qi <yao.qi@linaro.org>
2413
2414 * selftest.c (register_self_test): Rename it to
2415 selftests::register_test.
2416 (run_self_tests): selftest::run_tests.
2417 * selftest.h: Update declarations.
2418 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
2419 selftests::register_test_foreach_arch.
2420 * selftest-arch.h: Update declaration.
2421 * aarch64-tdep.c: Update.
2422 * arm-tdep.c: Likewise.
2423 * disasm-selftests.c: Likewise.
2424 * dwarf2loc.c: Likewise.
2425 * dwarf2-frame.c: Likewise.
2426 * findvar.c: Likewise.
2427 * gdbarch-selftests.c: Likewise.
2428 * maint.c (maintenance_selftest): Likewise.
2429 * regcache.c: Likewise.
2430 * rust-exp.y: Likewise.
2431 * selftest-arch.c: Likewise.
2432 * unittests/environ-selftests.c: Likewise.
2433 * unittests/function-view-selftests.c: Likewise.
2434 * unittests/offset-type-selftests.c: Likewise.
2435 * unittests/optional-selftests.c: Likewise.
2436 * unittests/scoped_restore-selftests.c: Likewise.
2437 * utils-selftests.c: Likewise.
2438
2439 2017-08-17 Pedro Alves <palves@redhat.com>
2440
2441 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
2442 local.
2443
2444 2017-08-17 Pedro Alves <palves@redhat.com>
2445
2446 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
2447 field.
2448 (reset_die_in_process): Delete, replaced by ...
2449 (process_die_scope): ... this new class. Make it responsible for
2450 freeing cu->line_header too.
2451 (process_die): Use process_die_scope.
2452 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
2453 cu->line_header_die_owner. Don't release the line header if it's
2454 owned by the CU.
2455 (setup_type_unit_groups): Make the CU/DIE own the line header.
2456 Don't release the line header here.
2457
2458 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
2459
2460 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
2461
2462 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
2463
2464 * NEWS: Mention new shortcuts for nexti and stepi in TUI
2465 Single-Key mode
2466
2467 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
2468
2469 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
2470 mode command list.
2471
2472 2017-08-15 Stafford Horne <shorne@gmail.com>
2473
2474 * MAINTAINERS (Write After Approval): Add Stafford Horne.
2475
2476 2017-08-15 Stafford Horne <shorne@gmail.com>
2477
2478 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
2479
2480 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
2481
2482 PR gdb/21954
2483 * infcmd.c (unset_environment_command): Use the 'clear' method on
2484 the environment instead of resetting it.
2485
2486 2017-08-15 John Baldwin <jhb@FreeBSD.org>
2487
2488 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
2489 platforms.
2490
2491 2017-08-14 Tom Tromey <tom@tromey.com>
2492
2493 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
2494 (print_binary_chars): Likewise.
2495 (BITS_IN_BYTES): Remove.
2496
2497 2017-08-14 Tom Tromey <tom@tromey.com>
2498
2499 PR gdb/21675
2500 * valprint.c (LOW_ZERO): Change value to 034.
2501 (print_octal_chars): Add static_asserts for octal constants.
2502 * printcmd.c (print_scalar_formatted): Add 'd' case.
2503
2504 2017-08-11 Tom Tromey <tom@tromey.com>
2505
2506 * symfile.c (add_symbol_file_command): Use std::vector.
2507
2508 2017-08-14 Tom Tromey <tom@tromey.com>
2509
2510 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
2511 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2512 std::move.
2513 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
2514
2515 2017-08-11 Pedro Alves <palves@redhat.com>
2516
2517 * infrun.c (process_event_stop_test): Adjust
2518 function_name_is_marked_for_skip call.
2519 * skip.c: Include <list>.
2520 (skiplist_entry): Make it a class with private fields, and
2521 getters/setters.
2522 (skiplist_entry_chain): Delete.
2523 (skiplist_entries): New.
2524 (skiplist_entry_count): Delete.
2525 (highest_skiplist_entry_num): New.
2526 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
2527 (add_skiplist_entry): Delete.
2528 (skiplist_entry::skiplist_entry): New.
2529 (skiplist_entry::add_entry): New.
2530 (skip_file_command, skip_function): Adjust.
2531 (compile_skip_regexp): Delete.
2532 (skip_command): Don't compile regexp here. Adjust to use
2533 skiplist_entry::add_entry.
2534 (skip_info): Adjust to use range-for and getters.
2535 (skip_enable_command, skip_disable_command): Adjust to use
2536 range-for and setters.
2537 (skip_delete_command): Adjust to use std::list.
2538 (add_skiplist_entry): Delete.
2539 (skip_file_p): Delete, refactored as ...
2540 (skiplist_entry::do_skip_file_p): ... this new method.
2541 (skip_gfile_p): Delete, refactored as ...
2542 (skiplist_entry::do_gskip_file_p): ... this new method.
2543 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
2544 (skiplist_entry::skip_function_p): ... this new method.
2545 (function_name_is_marked_for_skip): Now returns bool, and takes
2546 the function sal by const reference. Adjust to use range-for and
2547 skiplist_entry methods.
2548 (_initialize_step_skip): Remove references to
2549 skiplist_entry_chain, skiplist_entry_count.
2550 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
2551 takes the function sal by const reference.
2552
2553 2017-08-11 Yao Qi <yao.qi@linaro.org>
2554
2555 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
2556 (dwarf2_frame_cache): Remove reset_cache_cleanup.
2557 (dwarf2_frame_cache):
2558 * frame-unwind.c (frame_unwind_try_unwinder): Catch
2559 RETURN_MASK_ALL and set *this_case to NULL.
2560 * frame-unwind.h: Update comments.
2561
2562 2017-08-11 Yao Qi <yao.qi@linaro.org>
2563
2564 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
2565 (dwarf2_frame_state_copy_regs): Remove.
2566 (dwarf2_frame_state_free_regs): Remove.
2567 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
2568 (dwarf2_restore_rule): Call method .alloc_regs instead of
2569 dwarf2_frame_state_alloc_regs.
2570 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
2571 constructor. Call std::move.
2572 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
2573 (dwarf2_frame_cache): Likewise.
2574
2575 [GDB_SELF_TEST]: Include selftest.h and
2576 selftest-arch.h.
2577 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
2578 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
2579 execute_cfa_program_test.
2580
2581 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
2582 copy ctor, assignment operator, move assignment.
2583 <alloc_regs>: New method.
2584 <swap>: New method.
2585 (struct dwarf2_frame_state): Delete dtor.
2586 (dwarf2_frame_state_alloc_regs): Remove declaration.
2587 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
2588 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
2589
2590 2017-08-11 Yao Qi <yao.qi@linaro.org>
2591
2592 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
2593 (dwarf2_frame_state::dwarf2_frame_state): New.
2594 (dwarf2_frame_state::~dwarf2_frame_state): New.
2595 (dwarf2_fetch_cfa_info): Update.
2596 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
2597 rather than a pointer. Update code.
2598 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
2599 dtor.
2600 <data_align, code_align, retaddr_column>: Change them to const.
2601 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
2602 to bool.
2603
2604 2017-08-11 Yao Qi <yao.qi@linaro.org>
2605
2606 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
2607 <loc.exp>: New field.
2608 * dwarf2-frame.c (execute_cfa_program): Update.
2609 (dwarf2_frame_prev_register): Update.
2610
2611 2017-08-10 Pedro Alves <palves@redhat.com>
2612
2613 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
2614
2615 2017-08-09 John Baldwin <jhb@FreeBSD.org>
2616
2617 * fbsd-nat.c (struct fbsd_fork_info): Remove.
2618 (fbsd_pending_children): Use std::list.
2619 (fbsd_remember_child): Likewise.
2620 (fbsd_is_child_pending): Likewise.
2621 (fbsd_pending_vfork_done): Use std::forward_list.
2622 (fbsd_add_vfork_done): Likewise.
2623 (fbsd_is_vfork_done_pending): Likewise.
2624 (fbsd_next_vfork_done): Likewise.
2625
2626 2017-08-09 John Baldwin <jhb@FreeBSD.org>
2627
2628 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
2629 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
2630 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
2631 for `mapfilename'.
2632 (fbsd_xfer_partial): Use gdb::byte_vector.
2633 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
2634
2635 2017-08-09 John Baldwin <jhb@FreeBSD.org>
2636
2637 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
2638 "filestuff.h".
2639 (fbsd_find_memory_regions): Fix `mapfile' initialization.
2640
2641 2017-08-09 Tom Tromey <tom@tromey.com>
2642
2643 * skip.c (skiplist_entry): New constructor.
2644 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
2645 (skiplist_entry::file_is_glob): Now bool.
2646 (skiplist_entry::file, skiplist_entry::function): Now
2647 std::string.
2648 (make_skip_entry): Return a unique_ptr. Use new.
2649 (free_skiplist_entry, free_skiplist_entry_cleanup)
2650 (make_free_skiplist_entry_cleanup): Remove.
2651 (skip_command, skip_disable_command, add_skiplist_entry)
2652 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
2653 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
2654 (function_name_is_marked_for_skip): Update.
2655 (skip_delete_command): Update. Use delete.
2656
2657 2017-08-09 Jiong Wang <jiong.wang@arm.com>
2658
2659 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
2660 (aarch64_linux_core_read_description): New function.
2661 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
2662
2663 2017-08-09 Pedro Alves <palves@redhat.com>
2664
2665 * cp-name-parser.y (cp_comp_to_string): Return a
2666 gdb::unique_xmalloc_ptr<char>.
2667 * cp-support.c (replace_typedefs_qualified_name)
2668 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
2669 (cp_canonicalize_string_full): Use op= instead of explicit
2670 convertion.
2671 (cp_class_name_from_physname, method_name_from_physname)
2672 (cp_func_name, cp_remove_params): Adjust to use
2673 gdb::unique_xmalloc_ptr<char>.
2674 * cp-support.h (cp_comp_to_string): Return a
2675 gdb::unique_xmalloc_ptr<char>.
2676 * python/py-type.c (typy_lookup_type): Adjust to use
2677 gdb::unique_xmalloc_ptr<char>.
2678
2679 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
2680
2681 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
2682
2683 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
2684 Yao Qi <yao.qi@linaro.org>
2685
2686 * cp-support.c (cp_canonicalize_string_full): Use
2687 gdb::unique_xmalloc_ptr<char>.
2688 (cp_canonicalize_string): Likewise.
2689
2690 2017-08-09 Yao Qi <yao.qi@linaro.org>
2691
2692 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
2693 * regformats/i386/amd64-avx-avx512.dat: Remove.
2694 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
2695 * regformats/i386/amd64-avx-mpx.dat:Remove.
2696 * regformats/i386/amd64-avx.dat: Remove.
2697 * regformats/i386/amd64-mpx.dat: Remove.
2698 * regformats/i386/i386-avx-avx512.dat: Remove.
2699 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
2700 * regformats/i386/i386-avx-mpx.dat: Remove.
2701 * regformats/i386/i386-mmx.dat: Remove.
2702 * regformats/i386/i386-mpx.dat: Remove.
2703
2704 2017-08-09 Yao Qi <yao.qi@linaro.org>
2705
2706 * amd64-tdep.h (tdesc_x32): Remove the declaration.
2707 * amd64-tdep.c: Don't include features/i386/x32*.c.
2708 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
2709 functions.
2710 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
2711 and i386/x32-avx-avx512.
2712 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
2713 and i386/x32.xml.
2714 * features/i386/x32-avx-avx512.c: Removed.
2715 * features/i386/x32-avx-avx512.xml: Removed.
2716 * features/i386/x32-avx.c: Removed.
2717 * features/i386/x32-avx.xml: Removed.
2718 * features/i386/x32.c: Removed.
2719 * features/i386/x32.xml: Removed.
2720 * regformats/i386/x32-avx-avx512.dat: Removed.
2721 * regformats/i386/x32-avx.dat: Removed.
2722 * regformats/i386/x32.dat: Removed.
2723
2724 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
2725
2726 PR breakpoints/21886
2727 * mem-break.c (default_memory_insert_breakpoint): Use
2728 `->placed_address' rather than `->reqstd_address' for the
2729 breakpoint location.
2730
2731 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
2732
2733 * arch-utils.c (default_print_insn): Remove arch/mach/endian
2734 assertions.
2735
2736 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
2737
2738 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
2739 a union of `tdep_info', `tdesc_data' and `id'.
2740 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
2741 rather than `info.tdep_info'.
2742 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
2743 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
2744 * i386-tdep.c (i386_gdbarch_init): Likewise.
2745 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
2746 * mips-tdep.c (mips_gdbarch_init): Likewise.
2747 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2748 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
2749 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
2750 `info.tdep_info'.
2751 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
2752 `info.tdep_info'.
2753 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
2754 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
2755 `info.tdep_info'.
2756 * spu-tdep.c (spu_gdbarch_init): Likewise.
2757 * gdbarch.h: Regenerate.
2758
2759 2017-08-07 Leszek Swirski <leszeks@google.com>
2760
2761 PR symtab/20899
2762 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
2763
2764 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
2765
2766 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
2767 (gdbsim_open): Rename gdb_argv args object to argv.
2768
2769 2017-08-05 Tom Tromey <tom@tromey.com>
2770
2771 * compile/compile-object-load.c (compile_object_load): Use
2772 gdb::unique_xmalloc_ptr.
2773 * cli/cli-dump.c (scan_filename): Rename from
2774 scan_filename_with_cleanup. Change return type.
2775 (scan_expression): Rename from scan_expression_with_cleanup.
2776 Change return type.
2777 (dump_memory_to_file, dump_value_to_file, restore_command):
2778 Use gdb::unique_xmalloc_ptr. Update.
2779 * cli/cli-cmds.c (find_and_open_script): Use
2780 gdb::unique_xmalloc_ptr.
2781 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
2782 * symmisc.c (maintenance_print_symbols)
2783 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
2784 * symfile.c (symfile_bfd_open, generic_load)
2785 (add_symbol_file_command, remove_symbol_file_command): Use
2786 gdb::unique_xmalloc_ptr.
2787 * source.c (openp): Use gdb::unique_xmalloc_ptr.
2788 * psymtab.c (maintenance_print_psymbols): Use
2789 gdb::unique_xmalloc_ptr.
2790 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
2791 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
2792 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
2793 (reload_shared_libraries_1): Likewise.
2794
2795 2017-08-05 Tom Tromey <tom@tromey.com>
2796
2797 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
2798 (rust_op_vector, rust_set_vector): New typedefs.
2799 (current_parser): New global.
2800 (work_obstack): Change to pointer type. Update all users.
2801 (rust_ast, pstate): Remove globals.
2802 (struct rust_parser): New.
2803 (%union) <params, field_inits>: Change type.
2804 (start, tuple_expr, unit_expr, struct_expr_list, literal)
2805 (field_expr, expr_list, maybe_expr_list, type_list): Update.
2806 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
2807 (convert_params_to_types, convert_params_to_expression): Change
2808 type of "params".
2809 (ast_string): Change type of "fields".
2810 (rust_parse): Make a rust_parser. Remove cleanups.
2811 (rust_lex_tests): Make and install an auto_obstack.
2812
2813 2017-08-04 Yao Qi <yao.qi@linaro.org>
2814
2815 * configure.srv (ipa_x32_linux_regobj): New.
2816 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
2817 instead of X86_TDESC_AVX512.
2818 (initialize_low_tracepoint): Call
2819 init_registers_x32_avx_avx512_linux.
2820
2821 2017-08-04 Yao Qi <yao.qi@linaro.org>
2822
2823 * utils.h (gdb_argv): Add namespace std for nullptr_t.
2824
2825 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
2826
2827 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
2828
2829 2017-08-03 Tom Tromey <tom@tromey.com>
2830
2831 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
2832 Remove.
2833 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
2834
2835 2017-08-03 Tom Tromey <tom@tromey.com>
2836
2837 * python/py-param.c (compute_enum_values): Use gdb_argv.
2838
2839 2017-08-03 Tom Tromey <tom@tromey.com>
2840
2841 * utils.h (struct gdb_argv_deleter): New.
2842 (gdb_argv): New class.
2843 * utils.c (gdb_argv::reset): New method.
2844 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
2845 * tracefile.c (tsave_command): Use gdb_argv.
2846 * top.c (new_ui_command): Use gdb_argv.
2847 * symmisc.c (maintenance_print_symbols)
2848 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
2849 * symfile.c (symbol_file_command, generic_load)
2850 (remove_symbol_file_command): Use gdb_argv.
2851 * stack.c (backtrace_command): Use gdb_argv.
2852 * source.c (add_path, show_substitute_path_command)
2853 (unset_substitute_path_command, set_substitute_path_command):
2854 Use gdb_argv.
2855 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
2856 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
2857 * remote.c (extended_remote_run, remote_put_command)
2858 (remote_get_command, remote_delete_command): Use gdb_argv.
2859 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
2860 (gdbsim_open): Use gdb_argv.
2861 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
2862 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
2863 * procfs.c (procfs_info_proc): Use gdb_argv.
2864 * interps.c (interpreter_exec_cmd): Use gdb_argv.
2865 * infrun.c (handle_command): Use gdb_argv.
2866 * inferior.c (add_inferior_command, clone_inferior_command):
2867 Use gdb_argv.
2868 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
2869 * exec.c (exec_file_command): Use gdb_argv.
2870 * cli/cli-cmds.c (alias_command): Use gdb_argv.
2871 * compile/compile.c (build_argc_argv): Use gdb_argv.
2872
2873 2017-08-03 Tom Tromey <tom@tromey.com>
2874
2875 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
2876
2877 2017-08-03 Tom Tromey <tom@tromey.com>
2878
2879 * python/python.c (compute_python_string): Return std::string.
2880 (gdbpy_eval_from_control_command): Update.
2881 (do_start_initialization): Use std::string.
2882 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
2883 xstrprintf.
2884 * python/py-breakpoint.c (local_setattro): Use string_printf, not
2885 xstrprintf.
2886
2887 2017-08-03 Tom Tromey <tom@tromey.com>
2888
2889 * top.h (do_restore_instream_cleanup): Remove.
2890 * top.c (do_restore_instream_cleanup): Remove.
2891 (read_command_file): Use scoped_restore.
2892 * cli/cli-script.c (execute_user_command): Use scoped_restore.
2893
2894 2017-08-03 Tom Tromey <tom@tromey.com>
2895
2896 * cli/cli-script.c (execute_user_command)
2897 (execute_control_command): Use scoped_restore.
2898
2899 2017-08-03 Tom Tromey <tom@tromey.com>
2900
2901 * cli/cli-script.c (do_restore_user_call_depth): Remove.
2902 (execute_user_command): Remove user_call_depth; use
2903 user_args_stack's size instead.
2904
2905 2017-08-03 Tom Tromey <tom@tromey.com>
2906
2907 * top.h (in_user_command): Remove.
2908 * top.c (in_user_command): Remove.
2909 * cli/cli-script.c (do_restore_user_call_depth)
2910 (execute_user_command): Update.
2911
2912 2017-08-03 Tom Tromey <tom@tromey.com>
2913
2914 * valops.c (search_struct_method): Use gdb::byte_vector.
2915 * valarith.c (value_concat): Use std::vector.
2916 * target.c (memory_xfer_partial): Use gdb::byte_vector.
2917 (simple_search_memory): Likewise.
2918 * printcmd.c (find_string_backward): Use gdb::byte_vector.
2919 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
2920 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
2921 * elfread.c (elf_rel_plt_read): Use std::string.
2922 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
2923 * cli/cli-dump.c (restore_section_callback): Use
2924 gdb::byte_vector.
2925
2926 2017-08-03 Tom Tromey <tom@tromey.com>
2927
2928 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
2929
2930 2017-08-03 Tom Tromey <tom@tromey.com>
2931
2932 * tui/tui-regs.c (tui_restore_gdbout): Remove.
2933 (tui_register_format): Use scoped_restore.
2934
2935 2017-08-03 Tom Tromey <tom@tromey.com>
2936
2937 * reverse.c (exec_direction_default): Remove.
2938 (exec_reverse_once): Use scoped_restore.
2939 * remote.c (restore_remote_timeout): Remove.
2940 (remote_flash_erase, remote_flash_write, remote_flash_done)
2941 (readchar, remote_serial_write): Use scoped_restore.
2942 * cli/cli-script.c (struct source_cleanup_lines_args)
2943 (source_cleanup_lines): Remove.
2944 (script_from_file): Use scoped_restore.
2945 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
2946 (source_command): Use scoped_restore.
2947
2948 2017-08-03 Tom Tromey <tom@tromey.com>
2949
2950 * utils.h (make_cleanup_free_so): Remove.
2951 * utils.c (do_free_so, make_cleanup_free_so): Remove.
2952 * solist.h (struct so_deleter): New.
2953 (so_list_up): New typedef.
2954 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
2955
2956 2017-08-03 Tom Tromey <tom@tromey.com>
2957
2958 * utils.h (make_cleanup_restore_current_language): Remove.
2959 * utils.c (do_restore_current_language)
2960 (make_cleanup_restore_current_language): Remove.
2961 * parse.c (parse_exp_in_context_1)
2962 (parse_expression_with_language): Use
2963 scoped_restore_current_language.
2964 * mi/mi-main.c (mi_cmd_execute): Use
2965 scoped_restore_current_language.
2966 * language.h (scoped_restore_current_language): New class.
2967
2968 2017-08-03 Tom Tromey <tom@tromey.com>
2969
2970 * compile/compile.c (cleanup_unlink_file): Remove.
2971 (compile_to_object): Use gdb::unlinker.
2972 (eval_compile_command): Likewise.
2973
2974 2017-08-03 Tom Tromey <tom@tromey.com>
2975
2976 * utils.h (make_cleanup_fclose): Remove.
2977 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
2978
2979 2017-08-03 Tom Tromey <tom@tromey.com>
2980
2981 * top.c (open_terminal_stream): Return gdb_file_up.
2982 (new_ui_command): Update.
2983
2984 2017-08-03 Tom Tromey <tom@tromey.com>
2985
2986 * source.c (print_source_lines_base, forward_search_command)
2987 (reverse_search_command): Use gdb_file_up.
2988
2989 2017-08-03 Tom Tromey <tom@tromey.com>
2990
2991 * fbsd-nat.c (fbsd_find_memory_regions): Update.
2992
2993 2017-08-03 Tom Tromey <tom@tromey.com>
2994
2995 * cli/cli-cmds.c (find_and_open_script): Change return type.
2996 Remove "streamp" and "full_path" parameters.
2997 (source_script_with_search): Update.
2998 * auto-load.c (source_script_file): Update.
2999 * cli/cli-cmds.h (find_and_open_script): Change type.
3000 (open_script): New struct.
3001
3002 2017-08-03 Tom Tromey <tom@tromey.com>
3003
3004 * xml-support.c (xml_fetch_content_from_file): Update.
3005 * ui-file.c (stdio_file::open): Update.
3006 * tracefile-tfile.c (tfile_start): Update.
3007 * remote.c (remote_file_put, remote_file_get): Update.
3008 * nat/linux-procfs.c (linux_proc_get_int)
3009 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
3010 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
3011 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
3012 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
3013 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
3014 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
3015 * linux-nat.c (linux_proc_pending_signals): Update.
3016 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
3017 (file_closer): Remove.
3018 * compile/compile.c (compile_to_object): Update.
3019 * common/filestuff.h (struct gdb_file_deleter): New.
3020 (gdb_file_up): New typedef.
3021 (gdb_fopen_cloexec): Change return type.
3022 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
3023 * cli/cli-dump.c (fopen_with_cleanup): Remove.
3024 (dump_binary_file, restore_binary_file): Update.
3025 * auto-load.c (auto_load_objfile_script_1): Update.
3026
3027 2017-08-03 Tom Tromey <tom@tromey.com>
3028
3029 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
3030 (info_static_tracepoint_markers_command): Likewise.
3031 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
3032 * skip.c (skip_info): Use ui_out_emit_table.
3033 * progspace.c (print_program_space): Use ui_out_emit_table.
3034 * osdata.c (info_osdata): Use ui_out_emit_table.
3035 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
3036 ui_out_emit_table.
3037 * linux-thread-db.c (info_auto_load_libthread_db): Use
3038 ui_out_emit_table.
3039 * inferior.c (print_inferior): Use ui_out_emit_table.
3040 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
3041 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
3042 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
3043 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
3044 * ui-out.h (class ui_out_emit_table): New.
3045
3046 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
3047
3048 * mips-tdep.c (mips_fpu_type_str): New function.
3049 (mips_dump_tdep): Call it.
3050
3051 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
3052
3053 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
3054 `->mips_fpu_type'.
3055
3056 2017-07-31 Xavier Roirand <roirand@adacore.com>
3057
3058 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
3059
3060 2017-07-27 Xavier Roirand <roirand@adacore.com>
3061
3062 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
3063
3064 2017-07-26 Yao Qi <yao.qi@linaro.org>
3065
3066 * cli/cli-cmds.c (maintenancechecklist): New variable.
3067 * gdbcmd.h (maintenancechecklist): Declare it.
3068 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
3069 Call i386_linux_read_description with different masks.
3070 * maint.c (maintenance_check_command): New function.
3071 (_initialize_maint_cmds): Call add_prefix_cmd.
3072 * target-descriptions.c (tdesc_reg): override operator != and ==.
3073 (tdesc_type): Likewise.
3074 (tdesc_feature): Likewise.
3075 (target_desc): Likewise.
3076 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
3077 (maintenance_check_xml_descriptions): New function.
3078 (_initialize_target_descriptions) Add command "xml-descriptions".
3079 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
3080
3081 2017-07-26 Yao Qi <yao.qi@linaro.org>
3082
3083 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
3084 Include features/i386/32bit-*.c.
3085 (i386_linux_read_description): Generate target description if it
3086 doesn't exist.
3087 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
3088 functions.
3089 * features/i386/32bit-linux.c: Re-generated.
3090 * features/i386/32bit-sse.c: Likewise.
3091 * target-descriptions.c (print_c_feature::visit): Print code to
3092 set register number if needed.
3093 (print_c_feature) <m_next_regnum>: New field.
3094
3095 2017-07-26 Yao Qi <yao.qi@linaro.org>
3096
3097 * features/Makefile (CFILES): Rename with TDESC_CFILES.
3098 (FEATURE_XMLFILES): New.
3099 (FEATURE_CFILES): New.
3100 New rules.
3101 (clean-cfiles): Remove generated c files.
3102 * features/i386/32bit-avx.c: Generated.
3103 * features/i386/32bit-avx512.c: Generated.
3104 * features/i386/32bit-core.c: Generated.
3105 * features/i386/32bit-linux.c: Generated.
3106 * features/i386/32bit-mpx.c: Generated.
3107 * features/i386/32bit-pkeys.c: Generated.
3108 * features/i386/32bit-sse.c: Generated.
3109 * target-descriptions.c: Include algorithm.
3110 (tdesc_element_visitor): Add method visit_end.
3111 (print_c_tdesc): Implement visit_end.
3112 (print_c_tdesc:: m_filename_after_features): Move it to
3113 protected.
3114 (print_c_feature): New class.
3115 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
3116 name starts with "i386/32bit-".
3117
3118 2017-07-26 Yao Qi <yao.qi@linaro.org>
3119
3120 * target-descriptions.c (tdesc_element_visitor): New class.
3121 (tdesc_element): New class.
3122 (tdesc_reg): Inherit from tdesc_element.
3123 (tdesc_reg::accept): New function.
3124 (tdesc_type): Inherit from tdesc_element.
3125 (tdesc_type::accept): New function.
3126 (tdesc_feature): Inherit from tdesc_element.
3127 (tdesc_feature::accept): New function.
3128 (target_desc): Inherit from tdesc_element.
3129 (target_desc::target_desc): New.
3130 (target_desc::~target_desc): New.
3131 (target_desc::accept): New.
3132 (allocate_target_description): Use new.
3133 (free_target_description): Use delete.
3134 (print_c_tdesc): New class.
3135 (maint_print_c_tdesc_cmd): Adjust.
3136
3137 * features/aarch64.c: Re-generated.
3138 * features/arc-arcompact.c: Re-generated.
3139 * features/arc-v2.c: Re-generated.
3140 * features/arm/arm-with-iwmmxt.c: Re-generated.
3141 * features/arm/arm-with-m.c: Re-generated.
3142 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
3143 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
3144 * features/arm/arm-with-neon.c: Re-generated.
3145 * features/arm/arm-with-vfpv2.c: Re-generated.
3146 * features/arm/arm-with-vfpv3.c: Re-generated.
3147 * features/i386/amd64-avx-avx512.c: Re-generated.
3148 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
3149 * features/i386/amd64-avx.c: Re-generated.
3150 * features/i386/amd64-avx-linux.c: Re-generated.
3151 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
3152 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
3153 * features/i386/amd64-avx-mpx.c: Re-generated.
3154 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
3155 * features/i386/amd64.c: Re-generated.
3156 * features/i386/amd64-linux.c: Re-generated.
3157 * features/i386/amd64-mpx.c: Re-generated.
3158 * features/i386/amd64-mpx-linux.c: Re-generated.
3159 * features/i386/i386-avx-avx512.c: Re-generated.
3160 * features/i386/i386-avx-avx512-linux.c: Re-generated.
3161 * features/i386/i386-avx.c: Re-generated.
3162 * features/i386/i386-avx-linux.c: Re-generated.
3163 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
3164 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
3165 * features/i386/i386-avx-mpx.c: Re-generated.
3166 * features/i386/i386-avx-mpx-linux.c: Re-generated.
3167 * features/i386/i386.c: Re-generated.
3168 * features/i386/i386-linux.c: Re-generated.
3169 * features/i386/i386-mmx.c: Re-generated.
3170 * features/i386/i386-mmx-linux.c: Re-generated.
3171 * features/i386/i386-mpx.c: Re-generated.
3172 * features/i386/i386-mpx-linux.c: Re-generated.
3173 * features/i386/x32-avx-avx512.c: Re-generated.
3174 * features/i386/x32-avx-avx512-linux.c: Re-generated.
3175 * features/i386/x32-avx.c: Re-generated.
3176 * features/i386/x32-avx-linux.c: Re-generated.
3177 * features/i386/x32.c: Re-generated.
3178 * features/i386/x32-linux.c: Re-generated.
3179 * features/microblaze.c: Re-generated.
3180 * features/microblaze-with-stack-protect.c: Re-generated.
3181 * features/mips64-dsp-linux.c: Re-generated.
3182 * features/mips64-linux.c: Re-generated.
3183 * features/mips-dsp-linux.c: Re-generated.
3184 * features/mips-linux.c: Re-generated.
3185 * features/nds32.c: Re-generated.
3186 * features/nios2.c: Re-generated.
3187 * features/nios2-linux.c: Re-generated.
3188 * features/rs6000/powerpc-32.c: Re-generated.
3189 * features/rs6000/powerpc-32l.c: Re-generated.
3190 * features/rs6000/powerpc-403.c: Re-generated.
3191 * features/rs6000/powerpc-403gc.c : Re-generated.
3192 * features/rs6000/powerpc-405.c: Re-generated.
3193 * features/rs6000/powerpc-505.c: Re-generated.
3194 * features/rs6000/powerpc-601.c: Re-generated.
3195 * features/rs6000/powerpc-602.c: Re-generated.
3196 * features/rs6000/powerpc-603.c: Re-generated.
3197 * features/rs6000/powerpc-604.c: Re-generated.
3198 * features/rs6000/powerpc-64.c: Re-generated.
3199 * features/rs6000/powerpc-64l.c: Re-generated.
3200 * features/rs6000/powerpc-7400.c: Re-generated.
3201 * features/rs6000/powerpc-750.c: Re-generated.
3202 * features/rs6000/powerpc-860.c: Re-generated.
3203 * features/rs6000/powerpc-altivec32.c: Re-generated.
3204 * features/rs6000/powerpc-altivec32l.c: Re-generated.
3205 * features/rs6000/powerpc-altivec64.c: Re-generated.
3206 * features/rs6000/powerpc-altivec64l.c: Re-generated.
3207 * features/rs6000/powerpc-cell32l.c: Re-generated.
3208 * features/rs6000/powerpc-cell64l.c: Re-generated.
3209 * features/rs6000/powerpc-e500.c: Re-generated.
3210 * features/rs6000/powerpc-e500l.c: Re-generated.
3211 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
3212 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
3213 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
3214 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
3215 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
3216 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
3217 * features/rs6000/powerpc-vsx32.c: Re-generated.
3218 * features/rs6000/powerpc-vsx32l.c: Re-generated.
3219 * features/rs6000/powerpc-vsx64.c: Re-generated.
3220 * features/rs6000/powerpc-vsx64l.c: Re-generated.
3221 * features/rs6000/rs6000.c: Re-generated.
3222 * features/s390-linux32.c: Re-generated.
3223 * features/s390-linux32v1.c: Re-generated.
3224 * features/s390-linux32v2.c: Re-generated.
3225 * features/s390-linux64.c: Re-generated.
3226 * features/s390-linux64v1.c: Re-generated.
3227 * features/s390-linux64v2.c: Re-generated.
3228 * features/s390-te-linux64.c: Re-generated.
3229 * features/s390-tevx-linux64.c: Re-generated.
3230 * features/s390-vx-linux64.c: Re-generated.
3231 * features/s390x-linux64.c: Re-generated.
3232 * features/s390x-linux64v1.c: Re-generated.
3233 * features/s390x-linux64v2.c: Re-generated.
3234 * features/s390x-te-linux64.c: Re-generated.
3235 * features/s390x-tevx-linux64.c: Re-generated.
3236 * features/s390x-vx-linux64.c: Re-generated.
3237 * features/sparc/sparc32-solaris.c: Re-generated.
3238 * features/sparc/sparc64-solaris.c: Re-generated.
3239 * features/tic6x-c62x.c: Re-generated.
3240 * features/tic6x-c62x-linux.c: Re-generated.
3241 * features/tic6x-c64x.c: Re-generated.
3242 * features/tic6x-c64x-linux.c: Re-generated.
3243 * features/tic6x-c64xp.c: Re-generated.
3244 * features/tic6x-c64xp-linux.c: Re-generated.
3245
3246 2017-07-26 Yao Qi <yao.qi@linaro.org>
3247
3248 * i386-linux-tdep.c (i386_linux_read_description): New function.
3249 (i386_linux_core_read_description): Call
3250 i386_linux_read_description.
3251 * i386-linux-tdep.h (i386_linux_read_description): Declare.
3252 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
3253 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
3254 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
3255 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
3256 * x86-linux-nat.c (x86_linux_read_description): Call
3257 i386_linux_read_description.
3258
3259 2017-07-26 Yao Qi <yao.qi@linaro.org>
3260
3261 * NEWS: Mention it.
3262 * features/Makefile (%.c: %.xml): Pass the xml file name to
3263 command "maint print c-tdesc".
3264 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
3265 name from 'arg'.
3266
3267 2017-07-26 Yao Qi <yao.qi@linaro.org>
3268
3269 * target-descriptions.c (target_desc): Add ctor and dtor. Do
3270 in-class initialization.
3271 (tdesc_create_feature): Call new instead of XCNEW.
3272 (free_target_description): Ue delete.
3273
3274 2017-07-25 John Baldwin <jhb@FreeBSD.org>
3275
3276 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
3277
3278 2017-07-25 Yao Qi <yao.qi@linaro.org>
3279
3280 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
3281 constant.
3282 (amd64_x32_init_abi): Likewise.
3283 * amd64-tdep.h (amd64_init_abi): Update declaration.
3284 (amd64_x32_init_abi): Likewise.
3285
3286 2017-07-25 Yao Qi <yao.qi@linaro.org>
3287
3288 PR tdep/21717
3289 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
3290 condition for FPSCR.
3291 (arm_linux_store_inferior_registers): Likewise.
3292
3293 2017-07-22 Tom Tromey <tom@tromey.com>
3294
3295 * break-catch-syscall.c (struct catch_syscall_inferior_data)
3296 <syscalls_counts>: Now a std::vector.
3297 (get_catch_syscall_inferior_data): Use "new".
3298 (catch_syscall_inferior_data_cleanup): Use "delete".
3299 (insert_catch_syscall, remove_catch_syscall)
3300 (clear_syscall_counts): Update.
3301
3302 2017-07-22 Tom Tromey <tom@tromey.com>
3303
3304 * break-catch-syscall.c (syscall_catchpoint)
3305 <syscalls_to_be_caught>: Now a std::vector<int>
3306 (~syscall_catchpoint): Remove.
3307 (insert_catch_syscall, remove_catch_syscall)
3308 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
3309 (print_mention_catch_syscall, print_recreate_catch_syscall):
3310 Update.
3311 (create_syscall_event_catchpoint): Change type of "filter"
3312 parameter.
3313 (catch_syscall_split_args): Return a std::vector.
3314 (catch_syscall_command_1, catching_syscall_number_1): Update.
3315
3316 2017-07-22 Tom Tromey <tom@tromey.com>
3317
3318 * break-catch-throw.c (struct exception_catchpoint)
3319 <exception_rx>: Now a std::string.
3320 (~exception_catchpoint): Remove.
3321 (print_one_detail_exception_catchpoint): Update.
3322 (handle_gnu_v3_exceptions): Change type of except_rx.
3323 (extract_exception_regexp): Return a std::string.
3324 (catch_exception_command_1): Update.
3325
3326 2017-07-22 Tom Tromey <tom@tromey.com>
3327
3328 * break-catch-sig.c (gdb_signal_type): Remove typedef.
3329 (struct signal_catchpoint) <signals_to_be_caught>: Now a
3330 std::vector.
3331 <catch_all>: Now a bool.
3332 (~signal_catchpoint): Remove.
3333 (signal_catchpoint_insert_location)
3334 (signal_catchpoint_remove_location)
3335 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
3336 (signal_catchpoint_print_mention)
3337 (signal_catchpoint_print_recreate)
3338 (signal_catchpoint_explains_signal): Update.
3339 (create_signal_catchpoint): Change type of "filter" and
3340 "catch_all".
3341 (catch_signal_split_args): Return a std::vector. Change type of
3342 "catch_all".
3343 (catch_signal_command): Update.
3344
3345 2017-07-20 Pedro Alves <palves@redhat.com>
3346
3347 * ada-lang.c (ada_language_defn): Make extern.
3348 (_initialize_ada_language): Remove add_language call.
3349 * c-lang.c (c_language_defn, cplus_language_defn)
3350 (asm_language_defn, minimal_language_defn): Make extern.
3351 (_initialize_c_language): Delete.
3352 * completer.c (compare_cstrings): Delete, moved to utils.h.
3353 * d-lang.c (d_language_defn): Make extern.
3354 (_initialize_d_language): Remove add_language calls.
3355 * defs.h (enum language): Add comment.
3356 * f-lang.c (f_language_defn): Make extern.
3357 (_initialize_f_language): Remove add_language call.
3358 * go-lang.c (go_language_defn): Make extern.
3359 (_initialize_go_language): Remove add_language call.
3360 * language.c: Include <algorithm>.
3361 (languages): Redefine as const array.
3362 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
3363 (set_language_command): Handle "local". Use for-range loop.
3364 (set_language): Remove loop.
3365 (language_enum): Rewrite.
3366 (language_def, language_str): Remove loops.
3367 (add_language): Delete.
3368 (add_set_language_command): New, based on add_languages.
3369 (skip_language_trampoline): Adjust.
3370 (local_language_defn): Delete.
3371 (language_gdbarch_post_init): Adjust.
3372 (_initialize_language): Remove add_language calls. Call
3373 add_set_language_command.
3374 * language.h (add_language): Delete.
3375 (auto_language_defn)
3376 (unknown_language_defn, minimal_language_defn, ada_language_defn)
3377 (asm_language_defn, c_language_defn, cplus_language_defn)
3378 (d_language_defn, f_language_defn, go_language_defn)
3379 (m2_language_defn, objc_language_defn, opencl_language_defn)
3380 (pascal_language_defn, rust_language_defn): Declare.
3381 * m2-lang.c (m2_language_defn): Make extern.
3382 (_initialize_m2_language): Remove add_language call.
3383 * objc-lang.c (objc_language_defn): Make extern.
3384 (_initialize_objc_language): Remove add_language call.
3385 * opencl-lang.c (opencl_language_defn): Make extern.
3386 (_initialize_opencl_language): Remove add_language call.
3387 * p-lang.c (pascal_language_defn): Make extern.
3388 (_initialize_pascal_language): Delete.
3389 * rust-lang.c (rust_language_defn): Make extern.
3390 (_initialize_rust_language): Delete.
3391 * utils.h (compare_cstrings): New static inline function.
3392
3393 2017-07-20 Pedro Alves <palves@redhat.com>
3394
3395 * ada-lang.c (ada_to_fixed_type_1): Adjust.
3396 (get_var_value): Constify parameters.
3397 (get_int_var_value): Change prototype.
3398 (to_fixed_range_type): Adjust.
3399 * ada-lang.h (get_int_var_value): Change prototype.
3400
3401 2017-07-20 Pedro Alves <palves@redhat.com>
3402
3403 * dwarf2read.c (dw2_lookup_symbol): Use
3404 SYMBOL_MATCHES_SEARCH_NAME.
3405 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
3406
3407 2017-07-20 Pedro Alves <palves@redhat.com>
3408
3409 * block.c (block_iter_name_step, block_iter_name_first)
3410 (block_iter_name_next): Delete.
3411 (block_lookup_symbol_primary): Adjust to use
3412 dict_iter_match_first/dict_iter_match_next.
3413 * block.h (block_iter_name_first, block_iter_name_next): Delete
3414 declarations.
3415 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
3416 dict_iter_match_first/dict_iter_match_next.
3417
3418 2017-07-20 Pedro Alves <palves@redhat.com>
3419
3420 * cp-support.c (cp_find_first_component_aux): Add missing case for
3421 end of string.
3422
3423 2017-07-18 David Blaikie <dblaikie@gmail.com>
3424
3425 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
3426 of dwo_cu's dwo_file.
3427
3428 2017-07-18 Yao Qi <yao.qi@linaro.org>
3429
3430 * remote.c (store_registers_using_G): Remove one line comment.
3431
3432 2017-07-18 Yao Qi <yao.qi@linaro.org>
3433
3434 * regcache.c (regcache_cpy): Simplify it.
3435 (regcache::cpy_no_passthrough): Remove it.
3436 * regcache.h (cpy_no_passthrough): Remove it.
3437 (regcache_dup, regcache_cpy): Update comments.
3438
3439 2017-07-18 Pedro Alves <palves@redhat.com>
3440
3441 * remote-sim.c (sim_command_completer): Adjust to work with a
3442 completion_tracker instead of a VEC.
3443
3444 2017-07-17 Pedro Alves <palves@redhat.com>
3445
3446 * completer.c (complete_source_filenames): New function.
3447 (complete_address_and_linespec_locations): New function.
3448 (location_completer): Use complete_address_and_linespec_locations.
3449 (completion_tracker::build_completion_result): Honor the tracker's
3450 request to suppress append.
3451 * completer.h (completion_tracker::suppress_append_ws)
3452 (completion_tracker::set_suppress_append_ws): New methods.
3453 (completion_tracker::m_suppress_append_ws): New field.
3454 (complete_source_filenames): New declaration.
3455 * linespec.c (linespec_complete_what): New.
3456 (struct ls_parser) <complete_what, completion_word,
3457 completion_quote_char, completion_quote_end, completion_tracker>:
3458 New fields.
3459 (string_find_incomplete_keyword_at_end): New.
3460 (linespec_lexer_lex_string): Record quote char. If in completion
3461 mode, don't throw.
3462 (linespec_lexer_consume_token): Advance the completion word point.
3463 (linespec_lexer_peek_token): Save/restore completion info.
3464 (save_stream_and_consume_token): New.
3465 (set_completion_after_number): New.
3466 (linespec_parse_basic): Set what to complete next depending on
3467 token. Handle function and label completions specially.
3468 (parse_linespec): Disable objc shortcut in completion mode. Set
3469 what to complete next depending on token type. Skip keyword if in
3470 completion mode.
3471 (complete_linespec_component, linespec_complete): New.
3472 * linespec.h (linespec_complete): Declare.
3473
3474 2017-07-17 Pedro Alves <palves@redhat.com>
3475
3476 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
3477 Handle 'operator<' / 'operator<<'.
3478
3479 2017-07-17 Pedro Alves <palves@redhat.com>
3480
3481 * completer.c (collect_explicit_location_matches): Handle
3482 MATCH_LABEL.
3483 (convert_explicit_location_to_linespec): New, factored out from
3484 ...
3485 (convert_explicit_location_to_sals): ... this.
3486 (complete_label): New.
3487 (linespec_complete_label, find_label_symbols_in_block): New.
3488 (find_label_symbols): Add completion_mode parameter and adjust to
3489 call find_label_symbols_in_block.
3490 * linespec.h (linespec_complete_label): Declare.
3491
3492 2017-07-17 Pedro Alves <palves@redhat.com>
3493
3494 * ada-lang.c (ada_collect_symbol_completion_matches): Add
3495 complete_symbol_mode parameter.
3496 * cli/cli-cmds.c (complete_command): Get the completion result out
3497 of the handle_brkchars tracker if used a custom word point.
3498 * completer.c: Include "linespec.h".
3499 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
3500 (advance_to_expression_complete_word_point): New.
3501 (completion_tracker::completes_to_completion_word): New.
3502 (complete_files_symbols): Pass down
3503 complete_symbol_mode::EXPRESSION.
3504 (explicit_options, probe_options): New.
3505 (collect_explicit_location_matches): Complete on the
3506 explictit_loc->foo instead of word. Use
3507 linespec_complete_function. Handle MATCH_LINE. Handle offering
3508 keyword and options completions.
3509 (backup_text_ptr): Delete.
3510 (skip_keyword): New.
3511 (complete_explicit_location): Remove 'word' parameter. Add
3512 language, quoted_arg_start and quoted_arg_end parameters.
3513 Rewrite, parsing left to right.
3514 (location_completer): Rewrite.
3515 (location_completer_handle_brkchars): New function.
3516 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
3517 (enum complete_line_internal_reason): Adjust comments.
3518 (completion_tracker::discard_completions): New.
3519 (completer_handle_brkchars_func_for_completer): Handle
3520 location_completer.
3521 (gdb_custom_word_point_brkchars)
3522 (gdb_org_rl_basic_quote_characters): New.
3523 (gdb_completion_word_break_characters_throw)
3524 (completion_find_completion_word): Handle trackers that use a
3525 custom word point.
3526 (completion_tracker::advance_custom_word_point_by): New.
3527 (completion_tracker::build_completion_result): Don't rely on
3528 readline appending the quote char.
3529 (gdb_rl_attempted_completion_function_throw): Handle trackers that
3530 use a custom word point.
3531 (gdb_rl_attempted_completion_function): Restore
3532 rl_basic_quote_characters.
3533 * completer.h (class completion_tracker): Extend intro comment.
3534 (completion_tracker::set_quote_char)
3535 (completion_tracker::quote_char)
3536 (completion_tracker::set_use_custom_word_point)
3537 (completion_tracker::use_custom_word_point)
3538 (completion_tracker::custom_word_point)
3539 (completion_tracker::set_custom_word_point)
3540 (completion_tracker::advance_custom_word_point_by)
3541 (completion_tracker::completes_to_completion_word)
3542 (completion_tracker::discard_completions): New methods.
3543 (completion_tracker::m_quote_char)
3544 (completion_tracker::m_use_custom_word_point)
3545 (completion_tracker::m_custom_word_point): New fields.
3546 (advance_to_expression_complete_word_point): Declare.
3547 * f-lang.c (f_collect_symbol_completion_matches): Add
3548 complete_symbol_mode parameter.
3549 * language.h (struct language_defn)
3550 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
3551 parameter.
3552 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
3553 (linespec_complete_function): New function.
3554 (linespec_lexer_lex_keyword): Adjust.
3555 * linespec.h (linespec_keywords, linespec_complete_function): New
3556 declarations.
3557 * location.c (find_end_quote): New function.
3558 (explicit_location_lex_one): Add explicit_completion_info
3559 parameter. Save quoting info. Don't throw if being called for
3560 completion. Don't handle Ada operators here.
3561 (is_cp_operator, skip_op_false_positives, first_of)
3562 (explicit_location_lex_one_function): New function.
3563 (string_to_explicit_location): Replace 'dont_throw' parameter with
3564 an explicit_completion_info pointer parameter. Handle it. Don't
3565 use explicit_location_lex_one to lex function names. Use
3566 explicit_location_lex_one_function instead.
3567 * location.h (struct explicit_completion_info): New.
3568 (string_to_explicit_location): Replace 'dont_throw' parameter with
3569 an explicit_completion_info pointer parameter.
3570 * symtab.c (default_collect_symbol_completion_matches_break_on):
3571 Add complete_symbol_mode parameter. Handle LINESPEC mode.
3572 (default_collect_symbol_completion_matches)
3573 (collect_symbol_completion_matches): Add complete_symbol_mode
3574 parameter.
3575 (collect_symbol_completion_matches_type): Pass down
3576 complete_symbol_mode::EXPRESSION.
3577 (collect_file_symbol_completion_matches): Add complete_symbol_mode
3578 parameter. Handle LINESPEC mode.
3579 * symtab.h (complete_symbol_mode): New.
3580 (default_collect_symbol_completion_matches_break_on)
3581 (default_collect_symbol_completion_matches)
3582 (collect_symbol_completion_matches)
3583 (collect_file_symbol_completion_matches): Add complete_symbol_mode
3584 parameter.
3585
3586 2017-07-17 Pedro Alves <palves@redhat.com>
3587
3588 * utils.c (enum class strncmp_iw_mode): New.
3589 (strcmp_iw): Rename to ...
3590 (strncmp_iw_with_mode): ... this. Add string2_len and mode
3591 parameters. Handle them.
3592 (strncmp_iw): New.
3593 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
3594 * utils.h (strncmp_iw): Declare.
3595 (strcmp_iw): Move describing comments here.
3596
3597 2017-07-17 Pedro Alves <palves@redhat.com>
3598
3599 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
3600 CP_OPERATOR_STR.
3601 * c-typeprint.c (is_type_conversion_operator): Use
3602 CP_OPERATOR_STR.
3603 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
3604 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
3605 CP_OPERATOR_LEN.
3606 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
3607 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
3608 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
3609 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
3610 CP_OPERATOR_STR.
3611 * location.c: Include "cp-support.h".
3612 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
3613 CP_OPERATOR_STR.
3614 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
3615 CP_OPERATOR_LEN.
3616
3617 2017-07-17 Pedro Alves <palves@redhat.com>
3618
3619 * cli/cli-cmds.c (complete_command): Use a completion tracker
3620 along with completion_find_completion_word for handle_brkchars
3621 phase.
3622 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
3623 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
3624 (struct gdb_rl_completion_word_info): New.
3625 (gdb_rl_find_completion_word): New.
3626 (completion_find_completion_word): New.
3627 * completer.h (completion_find_completion_word): Declare.
3628
3629 2017-07-17 Pedro Alves <palves@redhat.com>
3630
3631 * ada-lang.c (symbol_completion_match): Adjust comments.
3632 (symbol_completion_add): Replace vector parameter with
3633 completion_tracker parameter. Use it.
3634 (ada_make_symbol_completion_list): Rename to...
3635 (ada_collect_symbol_completion_matches): ... this. Add
3636 completion_tracker parameter and use it.
3637 (ada_language_defn): Adjust.
3638 * break-catch-syscall.c (catch_syscall_completer): Adjust
3639 prototype and work with completion_tracker instead of VEC.
3640 * breakpoint.c (condition_completer): Adjust prototype and work
3641 with completion_tracker instead of VEC.
3642 * c-lang.c (c_language_defn, cplus_language_defn)
3643 (asm_language_defn, minimal_language_defn): Adjust to renames.
3644 * cli/cli-cmds.c (complete_command): Rework using
3645 completion_tracker. Catch exceptions when completing.
3646 * cli/cli-decode.c (integer_unlimited_completer)
3647 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
3648 with completion_tracker instead of VEC.
3649 * command.h (struct completion_tracker): Forward declare.
3650 (completer_ftype, completer_handle_brkchars_ftype): Change
3651 types.
3652 (complete_on_cmdlist, complete_on_enum): Adjust.
3653 * completer.c: Include <algorithm>.
3654 (struct gdb_completer_state): New.
3655 (current_completion): New global.
3656 (readline_line_completion_function): Delete.
3657 (noop_completer, filename_completer)
3658 (filename_completer_handle_brkchars, complete_files_symbols)
3659 (linespec_location_completer): Adjust to work with a
3660 completion_tracker instead of a VEC.
3661 (string_or_empty): New.
3662 (collect_explicit_location_matches): Adjust to work with a
3663 completion_tracker instead of a VEC.
3664 (explicit_location_completer): Rename to ...
3665 (complete_explicit_location): ... this and adjust to work with a
3666 completion_tracker instead of a VEC.
3667 (location_completer): Adjust to work with a completion_tracker
3668 instead of a VEC.
3669 (add_struct_fields): Adjust to work with a completion_list instead
3670 of VEC.
3671 (expression_completer): Rename to ...
3672 (complete_expression): ... this and adjust to work with a
3673 completion_tracker instead of a VEC. Use complete_files_symbols.
3674 (expression_completer): Reimplement on top of complete_expression.
3675 (symbol_completer): Adjust to work with a completion_tracker
3676 instead of a VEC.
3677 (enum complete_line_internal_reason): Add describing comments.
3678 (complete_line_internal_normal_command): Adjust to work with a
3679 completion_tracker instead of a VEC.
3680 (complete_line_internal): Rename to ...
3681 (complete_line_internal_1): ... this and adjust to work with a
3682 completion_tracker instead of a VEC. Assert TEXT is NULL in the
3683 handle_brkchars phase.
3684 (new_completion_tracker): Delete.
3685 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
3686 complete_line_internal_1.
3687 (free_completion_tracker): Delete.
3688 (INITIAL_COMPLETION_HTAB_SIZE): New.
3689 (completion_tracker::completion_tracker)
3690 (completion_tracker::~completion_tracker): New.
3691 (maybe_add_completion): Delete.
3692 (completion_tracker::maybe_add_completion)
3693 (completion_tracker::add_completion)
3694 (completion_tracker::add_completions): New.
3695 (throw_max_completions_reached_error): Delete.
3696 (complete_line): Adjust to work with a completion_tracker instead
3697 of a VEC. Don't create a completion_tracker_t or check for max
3698 completions here.
3699 (command_completer, command_completer_handle_brkchars)
3700 (signal_completer, reg_or_group_completer_1)
3701 (reg_or_group_completer, default_completer_handle_brkchars):
3702 Adjust to work with a completion_tracker.
3703 (gdb_completion_word_break_characters_throw): New.
3704 (gdb_completion_word_break_characters): Reimplement.
3705 (line_completion_function): Delete.
3706 (completion_tracker::recompute_lowest_common_denominator)
3707 (expand_preserving_ws)
3708 (completion_tracker::build_completion_result)
3709 (completion_result::completion_result)
3710 (completion_result::completion_result)
3711 (completion_result::~completion_result)
3712 (completion_result::completion_result)
3713 (completion_result::release_match_list, compare_cstrings)
3714 (completion_result::sort_match_list)
3715 (completion_result::reset_match_list)
3716 (gdb_rl_attempted_completion_function_throw)
3717 (gdb_rl_attempted_completion_function): New.
3718 * completer.h (completion_list, struct completion_result)
3719 (class completion_tracker): New.
3720 (complete_line): Add completion_tracker parameter.
3721 (readline_line_completion_function): Delete.
3722 (gdb_rl_attempted_completion_function): New.
3723 (noop_completer, filename_completer, expression_completer)
3724 (location_completer, symbol_completer, command_completer)
3725 (signal_completer, reg_or_group_completer): Update prototypes.
3726 (completion_tracker_t, new_completion_tracker)
3727 (make_cleanup_free_completion_tracker): Delete.
3728 (enum maybe_add_completion_enum): Delete.
3729 (maybe_add_completion): Delete.
3730 (throw_max_completions_reached_error): Delete.
3731 * corefile.c (complete_set_gnutarget): Adjust to work with a
3732 completion_tracker instead of a VEC.
3733 * cp-abi.c (cp_abi_completer): Adjust to work with a
3734 completion_tracker instead of a VEC.
3735 * d-lang.c (d_language_defn): Adjust.
3736 * disasm.c (disassembler_options_completer): Adjust to work with a
3737 completion_tracker instead of a VEC.
3738 * f-lang.c (f_make_symbol_completion_list): Rename to ...
3739 (f_collect_symbol_completion_matches): ... this. Adjust to work
3740 with a completion_tracker instead of a VEC.
3741 (f_language_defn): Adjust.
3742 * go-lang.c (go_language_defn): Adjust.
3743 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
3744 Adjust to work with a completion_tracker instead of a VEC.
3745 * infrun.c (handle_completer): Likewise.
3746 * interps.c (interpreter_completer): Likewise.
3747 * interps.h (interpreter_completer): Likewise.
3748 * language.c (unknown_language_defn, auto_language_defn)
3749 (local_language_defn): Adjust.
3750 * language.h (language_defn::la_make_symbol_completion_list):
3751 Rename to ...
3752 (language_defn::la_collect_symbol_completion_matches): ... this
3753 and adjust to work with a completion_tracker instead of a VEC.
3754 * m2-lang.c (m2_language_defn): Adjust.
3755 * objc-lang.c (objc_language_defn): Adjust.
3756 * opencl-lang.c (opencl_language_defn): Adjust.
3757 * p-lang.c (pascal_language_defn): Adjust.
3758 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
3759 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
3760 with a completion_tracker.
3761 * rust-lang.c (rust_language_defn): Adjust.
3762 * symtab.c (free_completion_list, do_free_completion_list)
3763 (return_val, completion_tracker): Delete.
3764 (completion_list_add_name, completion_list_add_symbol)
3765 (completion_list_add_msymbol, completion_list_objc_symbol)
3766 (completion_list_add_fields, add_symtab_completions): Add
3767 completion_tracker parameter and use it.
3768 (default_make_symbol_completion_list_break_on_1): Rename to...
3769 (default_collect_symbol_completion_matches_break_on): ... this.
3770 Add completion_tracker parameter and use it instead of allocating
3771 a completion tracker here.
3772 (default_make_symbol_completion_list_break_on): Delete old
3773 implementation.
3774 (default_make_symbol_completion_list): Delete.
3775 (default_collect_symbol_completion_matches): New.
3776 (make_symbol_completion_list): Delete.
3777 (collect_symbol_completion_matches): New.
3778 (make_symbol_completion_type): Rename to ...
3779 (collect_symbol_completion_matches_type): ... this. Add
3780 completion_tracker parameter and use it instead of VEC.
3781 (make_file_symbol_completion_list_1): Rename to...
3782 (collect_file_symbol_completion_matches): ... this. Add
3783 completion_tracker parameter and use it instead of VEC.
3784 (make_file_symbol_completion_list): Delete.
3785 (add_filename_to_list): Use completion_list instead of a VEC.
3786 (add_partial_filename_data::list): Now a completion_list.
3787 (make_source_files_completion_list): Work with a completion_list
3788 instead of a VEC.
3789 * symtab.h: Include "completer.h".
3790 (default_make_symbol_completion_list_break_on)
3791 (default_make_symbol_completion_list, make_symbol_completion_list)
3792 (make_symbol_completion_type, make_file_symbol_completion_list)
3793 (make_source_files_completion_list): Delete.
3794 (default_collect_symbol_completion_matches_break_on)
3795 (default_collect_symbol_completion_matches)
3796 (collect_symbol_completion_matches)
3797 (collect_symbol_completion_matches_type)
3798 (collect_file_symbol_completion_matches)
3799 (make_source_files_completion_list): New.
3800 * top.c (init_main): Don't install a rl_completion_entry_function
3801 hook. Install a rl_attempted_completion_function hook instead.
3802 * tui/tui-layout.c (layout_completer): Adjust to work with a
3803 completion_tracker.
3804 * tui/tui-regs.c (tui_reggroup_completer):
3805 * tui/tui-win.c (window_name_completer, focus_completer)
3806 (winheight_completer): Adjust to work with a completion_tracker.
3807 * value.c: Include "completer.h".
3808 (complete_internalvar): Adjust to work with a completion_tracker.
3809 * value.h (complete_internalvar): Likewise.
3810
3811 2017-07-17 Pedro Alves <palves@redhat.com>
3812
3813 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
3814 renames.
3815 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
3816 comments to completer_ftype's declaration.
3817 <completer_handle_brkchars>: Change type to
3818 completer_handle_brkchars_ftype.
3819 * command.h (completer_ftype): Add describing comment and give
3820 names to parameters.
3821 (completer_ftype_void): Rename to ...
3822 (completer_handle_brkchars_ftype) ... this. Add describing comment.
3823 (set_cmd_completer_handle_brkchars): Adjust.
3824 * completer.c (filename_completer_handle_brkchars): New function.
3825 (complete_line_internal_normal_command): New function, factored
3826 out from ...
3827 (complete_line_internal): ... here.
3828 (command_completer_handle_brkchars)
3829 (default_completer_handle_brkchars)
3830 (completer_handle_brkchars_func_for_completer): New functions.
3831 * completer.h (set_gdb_completion_word_break_characters): Delete
3832 declaration.
3833 (completer_handle_brkchars_func_for_completer): New declaration.
3834 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
3835 completer_handle_brkchars_func_for_completer.
3836
3837 2017-07-17 Pedro Alves <palves@redhat.com>
3838
3839 * completer.c (symbol_completer): New function, based on
3840 make_symbol_completion_list_fn.
3841 * completer.h (symbol_completer): New declaration.
3842 * guile/scm-cmd.c (cmdscm_completers): Adjust.
3843 * python/py-cmd.c (completers): Adjust.
3844 * symtab.c (make_symbol_completion_list_fn): Delete.
3845 * symtab.h (make_symbol_completion_list_fn): Delete.
3846 * cli/cli-decode.c (add_cmd): Adjust.
3847
3848 2017-07-17 Pedro Alves <palves@redhat.com>
3849
3850 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
3851 * dwarf2read.c: Include "filename-seen-cache.h".
3852 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
3853 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
3854 * filename-seen-cache.c: New file.
3855 * filename-seen-cache.h: New file.
3856 * symtab.c: Include "filename-seen-cache.h".
3857 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
3858 (create_filename_seen_cache, clear_filename_seen_cache)
3859 (delete_filename_seen_cache, filename_seen): Delete, parts moved
3860 to filename-seen-cache.h/filename-seen-cache.c.
3861 (output_source_filename, sources_info)
3862 (maybe_add_partial_symtab_filename)
3863 (make_source_files_completion_list): Adjust to use
3864 filename_seen_cache.
3865
3866 2017-07-17 Pedro Alves <palves@redhat.com>
3867
3868 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
3869 fields.
3870 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
3871 dwarf2_debug_sections*)): New.
3872 (dwarf2_per_objfile::dwarf2_per_objfile(const
3873 dwarf2_per_objfile&)): Declare as deleted.
3874 (dwarf2_per_objfile::operator=): Declare as deleted.
3875 (dwarf2_per_objfile::dwarf2_per_objfile)
3876 (dwarf2_per_objfile::~dwarf2_per_objfile)
3877 (dwarf2_per_objfile::free_cached_comp_units): New.
3878 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
3879 ctor. Call dwarf2_per_objfile's ctor manually.
3880 (dwarf2_locate_sections): Deleted/refactored as ...
3881 (dwarf2_per_objfile::locate_sections): ... this new method.
3882 (free_cached_comp_units): Defer to
3883 dwarf2_per_objfile::free_cached_comp_units.
3884 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
3885
3886 2017-07-14 Tom Tromey <tom@tromey.com>
3887
3888 PR rust/21764:
3889 * rust-exp.y (convert_ast_to_expression): Add "want_type"
3890 parameter.
3891 <UNOP_SIZEOF>: Split into separate case.
3892 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
3893
3894 2017-07-14 Tom Tromey <tom@tromey.com>
3895
3896 PR rust/21763:
3897 * symtab.c (symbol_matches_domain): Add language_rust to special
3898 case.
3899 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
3900 treat LOC_TYPEDEF symbols as variables.
3901
3902 2017-07-14 Pedro Alves <palves@redhat.com>
3903
3904 * symtab.c (make_file_symbol_completion_list_1): Iterate over
3905 symtabs matching all symtabs with SRCFILE as file name instead of
3906 only considering the first hit, with lookup_symtab.
3907
3908 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
3909
3910 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
3911 operator_name parameters.
3912 (gen_expr): Update function call.
3913
3914 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
3915
3916 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
3917 parameter.
3918 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
3919 Likewise.
3920 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
3921 parameter, use agent_expr::gdbarch instead, update function
3922 calls.
3923 (locexpr_tracepoint_var_ref): Likewise.
3924 (loclist_tracepoint_var_ref): Likewise.
3925 * ax-gdb.c (gen_trace_static_fields): Likewise.
3926 (gen_traced_pop): Likewise.
3927 (gen_frame_args_address): Likewise.
3928 (gen_frame_locals_address): Likewise.
3929 (gen_var_ref): Likewise.
3930 (gen_struct_ref_recursive): Likewise.
3931 (gen_static_field): Likewise.
3932 (gen_maybe_namespace_elt): Likewise.
3933 (gen_expr): Likewise.
3934 (gen_trace_for_var): Likewise.
3935 (gen_trace_for_expr): Likewise.
3936 (gen_trace_for_return_address): Likewise.
3937
3938 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
3939
3940 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
3941 parameter.
3942 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
3943
3944 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
3945
3946 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
3947 from ax, update calls.
3948 (gen_usual_arithmetic): Likewise.
3949 (gen_integral_promotions): Likewise.
3950 (gen_bitfield_ref): Likewise.
3951 (gen_primitive_field): Likewise.
3952 (gen_struct_ref_recursive): Likewise.
3953 (gen_struct_ref): Likewise.
3954 (gen_maybe_namespace_elt): Likewise.
3955 (gen_struct_elt_for_reference): Likewise.
3956 (gen_namespace_elt): Likewise.
3957 (gen_aggregate_elt_ref): Likewise.
3958 (gen_expr): Get gdbarch from ax, update calls.
3959 (gen_expr_binop_rest): Likewise.
3960
3961 2017-07-13 Pedro Alves <palves@redhat.com>
3962
3963 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
3964 as default tdesc.
3965 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
3966 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
3967 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
3968 tdesc_amd64_linux as default tdesc. Get final tdesc from the
3969 tdep.
3970 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
3971 Get final tdesc from the tdep.
3972 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
3973 default tdesc.
3974 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3975 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3976 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
3977 Use it as default tdesc.
3978 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
3979 down to amd_init_abi. No longer handle fallback tdesc here.
3980 * amd64-tdep.h (tdesc_x32): Declare.
3981 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
3982 parameter.
3983 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
3984 as default tdesc.
3985
3986 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
3987
3988 * s390-linux-tdep.c (s390_process_record): Add support for
3989 instructions new in arch12.
3990
3991 2017-07-11 John Baldwin <jhb@FreeBSD.org>
3992
3993 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
3994 PT_GETFSBASE and PT_GETGSBASE.
3995 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
3996 PT_SETGSBASE.
3997
3998 2017-07-11 John Baldwin <jhb@FreeBSD.org>
3999
4000 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
4001 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
4002 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
4003 those rules.
4004 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
4005 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
4006 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
4007 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
4008 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
4009 * features/i386/amd64.xml: Add 64bit-segments.xml.
4010 * features/i386/amd64-avx-avx512.c: Regenerated.
4011 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
4012 * features/i386/amd64-avx-mpx.c: Regenerated.
4013 * features/i386/amd64-avx.c: Regenerated.
4014 * features/i386/amd64-mpx.c: Regenerated.
4015 * features/i386/amd64.c: Regenerated.
4016 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
4017 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4018 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
4019 * regformats/i386/amd64-avx.dat: Regenerated.
4020 * regformats/i386/amd64-mpx.dat: Regenerated.
4021 * regformats/i386/amd64.dat: Regenerated.
4022
4023 2017-07-10 Yao Qi <yao.qi@linaro.org>
4024
4025 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4026 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4027
4028 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
4029
4030 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
4031 unsetenv.
4032 * gnulib/aclocal.m4: Regenerate.
4033 * gnulib/config.in: Regenerate.
4034 * gnulib/configure: Regenerate.
4035 * gnulib/import/Makefile.am: Regenerate.
4036 * gnulib/import/Makefile.in: Regenerate.
4037 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4038 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4039 * gnulib/import/m4/environ.m4: New file.
4040 * gnulib/import/m4/setenv.m4: New file.
4041 * gnulib/import/setenv.c: New file.
4042 * gnulib/import/unsetenv.c: New file.
4043
4044 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
4045
4046 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
4047 address when op is DW_OP_addr.
4048
4049 2017-07-09 Tom Tromey <tom@tromey.com>
4050
4051 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
4052 check and apply to outer type.
4053
4054 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4055
4056 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
4057 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
4058 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
4059 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
4060
4061 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4062
4063 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
4064
4065 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4066
4067 * corelow.c (get_core_siginfo): Remove.
4068 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
4069 instead of get_core_siginfo.
4070 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
4071 * gdbarch.h: Re-generate.
4072 * gdbarch.c: Re-generate.
4073 * linux-tdep.c (linux_core_xfer_siginfo): New.
4074 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
4075
4076 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4077
4078 * corelow.c (thread_section_name): Move to ...
4079 * gdbcore.h (thread_section_name): ... here.
4080
4081 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4082
4083 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
4084 (struct siginfo32): New.
4085 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
4086 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
4087 via ptrace(PT_LWPINFO).
4088
4089 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4090
4091 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
4092 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
4093 (fbsd_get_siginfo_type): New.
4094 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
4095 (_initialize_fbsd_tdep): New.
4096
4097 2017-07-06 David Blaikie <dblaikie@gmail.com>
4098
4099 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
4100 a singular dwo_unit*) to support multiple CUs in the same way that
4101 multiple TUs are supported.
4102 (create_cus_hash_table): Replace create_dwo_cu with a function for
4103 parsing multiple CUs from a DWO file.
4104 (open_and_init_dwo_file): Use create_cus_hash_table rather than
4105 create_dwo_cu.
4106 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
4107 htab_find, rather than comparing the signature to a singleton CU in
4108 the dwo_file.
4109
4110 2017-07-06 Pedro Alves <palves@redhat.com>
4111
4112 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
4113
4114 2017-07-04 Pedro Alves <palves@redhat.com>
4115
4116 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
4117 * gdbtypes.h (TYPE_STATIC): Delete.
4118 (struct fn_field) <is_public, is_abstract, is_static, is_final,
4119 is_synchronized, is_native>: Delete.
4120 <dummy>: Bump.
4121 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
4122 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
4123 (TYPE_FN_FIELD_ABSTRACT): Delete.
4124
4125 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
4126
4127 * buffer.h (buffer_finish): Fix spelling mistakes.
4128
4129 2017-07-01 Eli Zaretskii <eliz@gnu.org>
4130
4131 * .dir-locals.el: Automatically switch to C-style comments in
4132 versions of Emacs that support the feature.
4133
4134 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4135 Pedro Alves <palves@redhat.com>
4136
4137 PR cli/21688
4138 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
4139 (process_next_line): New variable 'inline_cmd'.
4140 Adjust 'if' clauses for "python", "compile" and "guile" to use
4141 'command_name_equals' and check for '!inline_cmd'.
4142
4143 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4144
4145 PR cli/21688
4146 * cli/cli-script.c (command_name_equals_not_inline): New function.
4147 (process_next_line): Adjust 'if' clauses for "python", "compile"
4148 and "guile" to use command_name_equals_not_inline.
4149
4150 2017-06-29 Pedro Alves <palves@redhat.com>
4151
4152 * completer.c (expression_completer): Call
4153 linespec_location_completer instead of location_completer.
4154
4155 2017-06-29 Pedro Alves <palves@redhat.com>
4156
4157 * completer.c (expression_completer): Remove code that recomputes
4158 'text' from 'word'.
4159
4160 2017-06-29 Yao Qi <yao.qi@linaro.org>
4161
4162 * regformats/regdat.sh: Generate code with
4163 "ifndef IN_PROCESS_AGENT".
4164
4165 2017-06-28 Pedro Alves <palves@redhat.com>
4166
4167 * command.h: Include "common/scoped_restore.h".
4168
4169 2017-06-28 Yao Qi <yao.qi@linaro.org>
4170
4171 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
4172 instead of obstack_grow.
4173
4174 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
4175
4176 PR gdb/21337
4177 * symfile.c (reread_symbols): Call objfiles_changed just before
4178 read_symbols.
4179
4180 2017-06-27 Pedro Alves <palves@redhat.com>
4181
4182 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
4183 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
4184 (completion_list_add_symbol, completion_list_add_msymbol):
4185 ... these new functions.
4186 (add_symtab_completions)
4187 (default_make_symbol_completion_list_break_on_1): Adjust.
4188
4189 2017-06-27 Pedro Alves <palves@redhat.com>
4190
4191 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
4192 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
4193 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
4194 dtor.
4195 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
4196 'storage_obstack' field an auto_obstack. In-class initialize all
4197 non-bitfield fields. Make minsyms_read bool.
4198 * symfile.c (read_symbols): Adjust.
4199
4200 2017-06-27 Alan Hayward <alan.hayward@arm.com>
4201
4202 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
4203 (gdbsim_store_register): Likewise.
4204
4205 2017-06-27 Pedro Alves <palves@redhat.com>
4206
4207 * c-exp.y (name_obstack): Now an auto_obstack.
4208 (yylex): Use auto_obstack::clear.
4209 (c_parse): Use auto_obstack::clear instead of reinitializing and
4210 freeing the obstack.
4211 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
4212 * d-exp.y (name_obstack): Now an auto_obstack.
4213 (yylex): Use auto_obstack::clear.
4214 (d_parse): Use auto_obstack::clear instead of reinitializing and
4215 freeing the obstack.
4216 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
4217 auto_obstack.
4218 * dwarf2read.c (create_addrmap_from_index)
4219 (dwarf2_build_psymtabs_hard)
4220 (update_enumeration_type_from_children): Likewise.
4221 * gdb_obstack.h (auto_obstack): New type.
4222 * go-exp.y (name_obstack): Now an auto_obstack.
4223 (build_packaged_name): Use auto_obstack::clear.
4224 (go_parse): Use auto_obstack::clear instead of reinitializing and
4225 freeing the obstack.
4226 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
4227 auto_obstack.
4228 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
4229 * rust-exp.y (work_obstack): Now an auto_obstack.
4230 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
4231 reinitializing and freeing the obstack.
4232 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
4233 (host_char_to_target): Use auto_obstack.
4234 * utils.h (make_cleanup_obstack_free): Delete declaration.
4235 * valprint.c (generic_emit_char, generic_printstr): Use
4236 auto_obstack.
4237
4238 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
4239
4240 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
4241 thread.
4242 (darwin_init_thread_list): Don't update dummy thread.
4243 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
4244
4245 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4246
4247 * record-full.c (netorder16): Remove.
4248
4249 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4250
4251 * common/diagnostics.h: Define macros for GCC.
4252 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
4253 * common/vec.h: Include diagnostics.h.
4254 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
4255 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
4256 warning.
4257
4258 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4259
4260 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
4261 New macro.
4262 * ada-lex.l: Ignore deprecated register warnings.
4263
4264 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4265
4266 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
4267 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
4268
4269 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4270
4271 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
4272 its own line.
4273
4274 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4275
4276 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
4277
4278 2017-06-23 Alan Hayward <alan.hayward@arm.com>
4279
4280 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
4281 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
4282 (xtensa_register_read_masked): Likewise.
4283
4284 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
4285
4286 * common/environ.c (gdb_environ::unset): Update comment.
4287
4288 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4289
4290 * python/py-unwind.c (pyuw_sniffer): Allocate space for
4291 registers.
4292
4293 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4294
4295 * record-full.c (record_full_exec_insn): Use byte_vector.
4296
4297 2017-06-22 Yao Qi <yao.qi@linaro.org>
4298
4299 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
4300 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4301
4302 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4303
4304 * remote.c (cached_reg): Move from here...
4305 * regcache.h (cached_reg): ...to here.
4306 * python/py-unwind.c (struct reg_info): Remove.
4307 (cached_frame_info): Use cached_reg_t.
4308 (pyuw_prev_register): Likewise.
4309 (pyuw_sniffer): Use cached_reg_t and allocate registers.
4310 (pyuw_dealloc_cache): Free all registers.
4311
4312 2017-06-22 Pedro Alves <palves@redhat.com>
4313 Simon Marchi <simon.marchi@ericsson.com>
4314
4315 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
4316 warning.
4317 * common/diagnostics.h: New file.
4318
4319 2017-06-22 Pedro Alves <palves@redhat.com>
4320
4321 * common/agent.h: Add include guards.
4322
4323 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
4324
4325 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
4326 talk about addressable units instead of bytes.
4327
4328 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4329
4330 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
4331 of '::const_iterator'.
4332
4333 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4334
4335 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4336 'unittests/environ-selftests.c'.
4337 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
4338 * charset.c (find_charset_names): Declare object 'iconv_env'.
4339 Update code to use 'iconv_env' object. Remove call to
4340 'free_environ'.
4341 * common/environ.c: Include <utility>.
4342 (make_environ): Delete function.
4343 (free_environ): Delete function.
4344 (gdb_environ::clear): New function.
4345 (gdb_environ::operator=): New function.
4346 (gdb_environ::get): Likewise.
4347 (environ_vector): Delete function.
4348 (set_in_environ): Delete function.
4349 (gdb_environ::set): New function.
4350 (unset_in_environ): Delete function.
4351 (gdb_environ::unset): New function.
4352 (gdb_environ::envp): Likewise.
4353 * common/environ.h: Include <vector>.
4354 (struct gdb_environ): Delete; transform into...
4355 (class gdb_environ): ... this class.
4356 (free_environ): Delete prototype.
4357 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
4358 environ_vector): Likewise.
4359 * infcmd.c (run_command_1): Update code to call
4360 'envp' from 'gdb_environ' class.
4361 (environment_info): Update code to call methods from 'gdb_environ'
4362 class.
4363 (unset_environment_command): Likewise.
4364 (path_info): Likewise.
4365 (path_command): Likewise.
4366 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
4367 (inferior::inferior): Initialize 'environment' using the host's
4368 information.
4369 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
4370 Include "environ.h".
4371 (class inferior) <environment>: Change type from 'struct
4372 gdb_environ' to 'gdb_environ'.
4373 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
4374 methods from 'gdb_environ' class.
4375 * solib.c (solib_find_1): Likewise
4376 * unittests/environ-selftests.c: New file.
4377
4378 2017-06-20 Yao Qi <yao.qi@linaro.org>
4379
4380 * features/i386/i386-linux.xml: Exchange the order of including
4381 32bit-linux.xml and 32bit-sse.xml.
4382 * features/i386/i386-linux.c: Regenerated.
4383
4384 2017-06-20 Yao Qi <yao.qi@linaro.org>
4385
4386 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
4387 Delete copy ctor and assignment operator.
4388 (tdesc_type): Likewise.
4389 (tdesc_feature): Likewise.
4390 (tdesc_free_reg): Remove.
4391 (tdesc_create_reg): Use new.
4392 (tdesc_free_type): Remove.
4393 (tdesc_create_vector): Use new.
4394 (tdesc_create_union): Likewise.
4395 (tdesc_create_flags): Likewise.
4396 (tdesc_create_enum): Likewise.
4397 (tdesc_free_feature): Delete.
4398 (free_target_description): Use delete.
4399
4400 2017-06-19 John Baldwin <jhb@FreeBSD.org>
4401
4402 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
4403 registers.
4404
4405 2017-06-19 Pedro Alves <palves@redhat.com>
4406
4407 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
4408 after gdb::unlinker.
4409
4410 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
4411
4412 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
4413 gdb_environ to access an environment variable.
4414
4415 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
4416
4417 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
4418 gdb_byte*.
4419
4420 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4421
4422 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
4423
4424 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4425
4426 * configure: Re-generate.
4427 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
4428
4429 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4430
4431 * configure: Re-generate.
4432 * warning.m4: Pass -Werror to compiler when checking for
4433 supported warning flags.
4434
4435 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4436
4437 * Makefile.in (COMPILE.pre): Add "-x c++".
4438
4439 2017-06-16 Alan Hayward <alan.hayward@arm.com>
4440 Pedro Alves <palves@redhat.com>
4441 Yao Qi <yao.qi@linaro.org>
4442
4443 * defs.h (RequireLongest): New.
4444 (extract_integer): Declare function template.
4445 (extract_signed_integer): Remove the declaration, but define it
4446 static inline.
4447 (extract_unsigned_integer): Likewise.
4448 (store_integer): Declare function template.
4449 (store_signed_integer): Remove the declaration, but define it
4450 static inline.
4451 (store_unsigned_integer): Likewise.
4452 * findvar.c (extract_integer): New function template.
4453 (extract_signed_integer): Remove.
4454 (extract_unsigned_integer): Remove.
4455 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
4456 instantiations.
4457 (store_integer): New function template.
4458 (store_signed_integer): Remove.
4459 (store_unsigned_integer): Remove.
4460 (store_integer): Explicit instantiations.
4461 * regcache.c (regcache_raw_read_signed): Update.
4462 (regcache::raw_read): New function.
4463 (regcache::raw_read_signed): Remove.
4464 (regcache::raw_read_unsigned): Remove.
4465 (regcache_raw_read_unsigned): Update.
4466 (regcache_raw_write_unsigned): Update.
4467 (regcache::raw_write_signed): Remove.
4468 (regcache::raw_write): New function.
4469 (regcache_cooked_read_signed): Update.
4470 (regcache::raw_write_unsigned): Remove.
4471 (regcache::cooked_read_signed): Remove.
4472 (regcache_cooked_read_unsigned): Update.
4473 (regcache::cooked_read_unsigned): Remove.
4474 (regcache_cooked_write_signed): Update.
4475 (regcache_cooked_write_unsigned): Update.
4476 * regcache.h (regcache) <raw_read_signed>: Remove.
4477 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
4478 <raw_read, raw_write>: New.
4479 <cooked_read_signed, cooked_write_signed>: Remove.
4480 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
4481 <cooked_read, cooked_write>: New.
4482 * sh64-tdep.c (sh64_pseudo_register_read): Update.
4483 (sh64_pseudo_register_write): Update.
4484
4485 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
4486
4487 * arc-tdep.c (arc_disassembler_options): New variable.
4488 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
4489 of default_print_insn.
4490 (arc_delayed_print_insn): Set info->section when needed,
4491 use default_print_insn to retrieve a disassembler.
4492
4493 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
4494
4495 PR gdb/21574
4496 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
4497 to mention $SHELL and startup-with-shell.
4498
4499 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
4500
4501 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
4502
4503 2017-06-14 Yao Qi <yao.qi@linaro.org>
4504
4505 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
4506 default_print_insn instead of print_insn_aarch64.
4507 * arm-tdep.c (gdb_print_insn_arm): Call
4508 default_print_insn instead of print_insn_big_arm
4509 and print_insn_little_arm.
4510 * i386-tdep.c (i386_print_insn): Call default_print_insn
4511 instead of print_insn_i386.
4512 * ia64-tdep.c (ia64_print_insn): Call
4513 default_print_insn instead of print_insn_ia64.
4514 * mips-tdep.c (gdb_print_insn_mips): Call
4515 default_print_insn instead of print_insn_big_mips
4516 and print_insn_little_mips.
4517 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
4518 instead of print_insn_spu.
4519
4520 2017-06-14 Pedro Alves <palves@redhat.com>
4521
4522 * ada-lang.c: Include "common/byte-vector.h".
4523 (ada_value_primitive_packed_val): Use gdb::byte_vector.
4524 * charset.c (wchar_iterator::iterate): Resize the vector instead
4525 of reserving it.
4526 * common/byte-vector.h: Include "common/def-vector.h".
4527 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
4528 * cli/cli-dump.c: Include "common/byte-vector.h".
4529 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
4530 * common/byte-vector.h: New file.
4531 * common/def-vector.h: New file.
4532 * common/default-init-alloc.h: New file.
4533 * dwarf2loc.c: Include "common/byte-vector.h".
4534 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
4535 instead of reserving it.
4536 * dwarf2read.c: Include "common/byte-vector.h".
4537 (data_buf::m_vec): Now a gdb::byte_vector.
4538 * gdb_regex.c: Include "common/def-vector.h".
4539 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
4540 * mi/mi-main.c: Include "common/byte-vector.h".
4541 (mi_cmd_data_read_memory): Use gdb::byte_vector.
4542 * printcmd.c: Include "common/byte-vector.h".
4543 (print_scalar_formatted): Use gdb::byte_vector.
4544 * valprint.c: Include "common/byte-vector.h".
4545 (maybe_negate_by_bytes, print_decimal_chars): Use
4546 gdb::byte_vector.
4547
4548 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
4549
4550 * darwin-nat.c: Include "nat/fork-inferior.h".
4551
4552 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
4553
4554 * configure.nat: Factor out Darwin bits that are not
4555 architecture-specific. Add fork-inferior.o.
4556
4557 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
4558
4559 * configure.nat: Factor out AIX bits that are not
4560 architecture-specific. Add fork-inferior.o.
4561
4562 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4563
4564 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
4565 (read_pieced_value, write_pieced_value): ...here. Reduce to
4566 wrappers that just call rw_pieced_value.
4567
4568 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4569
4570 * dwarf2loc.c (write_pieced_value): When writing the data for a
4571 memory piece, use write_memory_with_notification instead of
4572 write_memory.
4573
4574 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4575
4576 * valops.c (read_value_memory): Change embedded_offset to
4577 represent a bit offset instead of a byte offset.
4578 * value.h (read_value_memory): Adjust comment.
4579
4580 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4581
4582 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
4583 dest_offset_bits and source_offset_bits.
4584 (write_pieced_value): Likewise.
4585
4586 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4587
4588 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
4589 given by DW_OP_bit_piece.
4590 (write_pieced_value): Likewise.
4591
4592 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4593
4594 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
4595 some other preparations to the places where sufficient information
4596 is available.
4597 (write_pieced_value): Likewise.
4598
4599 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4600
4601 * dwarf2loc.c (bits_to_bytes): New function.
4602 (read_pieced_value): Fix offset calculations for register pieces
4603 on big-endian targets.
4604 (write_pieced_value): Likewise.
4605
4606 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4607
4608 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
4609 (write_pieced_value): Likewise.
4610
4611 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4612
4613 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
4614 transfer the source value's least significant bits, instead of its
4615 lowest-addressed ones. Rename type_len to max_offset.
4616 (read_pieced_value): Mirror above changes to write_pieced_value as
4617 applicable.
4618
4619 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4620
4621 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
4622 truncate full bytes from dest_offset_bits before using it as an
4623 offset into the buffer.
4624
4625 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4626
4627 * dwarf2loc.c (write_pieced_value): Include transfer size in
4628 byte-wise check.
4629
4630 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4631
4632 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
4633 calculation of this_size.
4634
4635 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4636
4637 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
4638 when targeting a bit-field.
4639 (write_pieced_value): Likewise.
4640
4641 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4642
4643 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
4644 (allocate_piece_closure): Drop addr_size parameter.
4645 (dwarf2_evaluate_loc_desc_full): Adjust call to
4646 allocate_piece_closure.
4647
4648 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4649
4650 PR gdb/21226
4651 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
4652 the LSB end, independent of endianness.
4653
4654 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4655
4656 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
4657 size capping.
4658
4659 2017-06-13 Yao Qi <yao.qi@linaro.org>
4660
4661 * mips-linux-nat.c: Move include features/mips*-linux.c to
4662 mips-linux-tdep.c.
4663 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
4664 to mips-linux-tdep.c.
4665 * mips-linux-tdep.c: Include features/mips*-linux.c
4666 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
4667 functions.
4668 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
4669 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
4670 (tdesc_mips64_dsp_linux): Declare.
4671
4672 2017-06-12 Tom Tromey <tom@tromey.com>
4673
4674 * valprint.h (val_print_type_code_int): Remove.
4675 * valprint.c (generic_val_print_int): Always call
4676 val_print_scalar_formatted.
4677 (val_print_type_code_int): Remove.
4678 * printcmd.c (print_scalar_formatted): Handle options->format==0.
4679 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
4680 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
4681 * ada-valprint.c (ada_val_print_num): Use
4682 val_print_scalar_formatted.
4683
4684 2017-06-12 Tom Tromey <tom@tromey.com>
4685
4686 * printcmd.c (print_scalar_formatted): Unify the two switches.
4687 Don't convert scalars to LONGEST.
4688
4689 2017-06-12 Tom Tromey <tom@tromey.com>
4690
4691 PR exp/16225:
4692 * valprint.h (print_decimal_chars): Update.
4693 * valprint.c (maybe_negate_by_bytes): New function.
4694 (print_decimal_chars): Add "is_signed" argument.
4695 * printcmd.c (print_scalar_formatted): Update.
4696
4697 2017-06-12 Tom Tromey <tom@tromey.com>
4698
4699 PR exp/16225:
4700 * valprint.h (print_binary_chars, print_hex_chars): Update.
4701 * valprint.c (val_print_type_code_int): Update.
4702 (print_binary_chars): Add "zero_pad" argument.
4703 (emit_octal_digit): New function.
4704 (print_octal_chars): Don't zero-pad.
4705 (print_decimal_chars): Likewise.
4706 (print_hex_chars): Add "zero_pad" argument.
4707 * sh64-tdep.c (sh64_do_fp_register): Update.
4708 * regcache.c (regcache::dump): Update.
4709 * printcmd.c (print_scalar_formatted): Update.
4710 * infcmd.c (default_print_one_register_info): Update.
4711
4712 2017-06-12 Pedro Alves <palves@redhat.com>
4713 Alan Hayward <alan.hayward@arm.com>
4714
4715 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
4716 (mips_eabi_push_dummy_call): Rename local 'regsize' to
4717 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
4718 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
4719 Assert that abi_regsize bytes fit in 'ref_valbuf'.
4720
4721 2017-06-12 Pedro Alves <palves@redhat.com>
4722
4723 * dwarf2read.c (mapped_symtab::data): Now a vector of
4724 symtab_index_entry instead of vector of
4725 std::unique_ptr<symtab_index_entry>. All users adjusted to check
4726 whether an element's name is NULL instead of checking whether the
4727 element itself is NULL.
4728 (find_slot): Change return type. Adjust.
4729 (hash_expand, , add_index_entry, uniquify_cu_indices)
4730 (write_hash_table): Adjust.
4731
4732 2017-06-12 Pedro Alves <palves@redhat.com>
4733
4734 * dwarf2read.c (recursively_count_psymbols): New function.
4735 (write_psymtabs_to_index): Call it to compute number of psyms and
4736 pass estimate size of psyms_seen to unordered_set's ctor.
4737
4738 2017-06-12 Pedro Alves <palves@redhat.com>
4739
4740 * dwarf2read.c (write_hash_table): Check if key already exists
4741 before emplacing.
4742
4743 2017-06-12 Pedro Alves <palves@redhat.com>
4744
4745 * dwarf2read.c (data_buf::append_space): Rename to...
4746 (data_buf::grow): ... this, and make private. Adjust all callers.
4747 (data_buf::append_uint): New method.
4748 (add_address_entry, write_one_signatured_type)
4749 (write_psymtabs_to_index): Use it.
4750
4751 2017-06-12 Pedro Alves <palves@redhat.com>
4752
4753 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
4754 (file_write (FILE *, const std::vector<Elem>&)): Delete.
4755 (data_buf::file_write): Call ::fwrite directly.
4756
4757 2017-06-12 Pedro Alves <palves@redhat.com>
4758
4759 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
4760 std::vector::erase.
4761
4762 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
4763
4764 Code cleanup: C++ify .gdb_index producer.
4765 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
4766 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
4767 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
4768 (create_strtab, add_string): Remove.
4769 (file_write, data_buf): New.
4770 (struct symtab_index_entry): Use std::vector for cu_indices.
4771 (struct mapped_symtab): Use std::vector for data.
4772 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
4773 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
4774 Remove.
4775 (find_slot): Change return type. Update it to the new data structures.
4776 (hash_expand, add_index_entry): Update it to the new data structures.
4777 (offset_type_compare): Remove.
4778 (uniquify_cu_indices): Update it to the new data structures.
4779 (c_str_view, c_str_view_hasher, vector_hasher): New.
4780 (add_indices_to_cpool): Remove.
4781 (write_hash_table): Update it to the new data structures.
4782 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
4783 (eq_psymtab_cu_index): Remove.
4784 (psym_index_map): New typedef.
4785 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
4786 reference and std::unordered_map for cu_index_htab.
4787 (add_address_entry, add_address_entry_worker, write_address_map)
4788 (write_psymbols): Update it to the new data structures.
4789 (write_obstack): Remove.
4790 (struct signatured_type_index_data): Change types_list to a data_buf
4791 reference and psyms_seen to a std::unordered_set reference.
4792 (write_one_signatured_type, recursively_write_psymbols)
4793 (write_psymtabs_to_index): Update it to the new data structures.
4794
4795 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
4796
4797 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
4798 separate-debug-file commands.
4799 * symfile.h (separate_debug_file_debug): New global.
4800 * symfile.c (separate_debug_file_debug): New global.
4801 (separate_debug_file_exists, find_separate_debug_file): Add
4802 debug output.
4803 (_initialize_symfile): Add "set debug separate-debug-file"
4804 command.
4805 * build-id.c (build_id_to_debug_bfd,
4806 find_separate_debug_file_by_buildid): Add debug output.
4807
4808 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
4809
4810 * gdbarch.sh (displaced_step_free_closure): Remove.
4811 * gdbarch.h, gdbarch.c: Re-generate.
4812 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
4813 displaced_step_free_closure.
4814 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
4815 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
4816 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4817 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
4818 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
4819 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
4820 * arch-utils.h (simple_displaced_step_free_closure): Remove.
4821 * arch-utils.c (simple_displaced_step_free_closure): Remove.
4822 * infrun.c (displaced_step_clear): Call xfree instead of
4823 gdbarch_displaced_step_free_closure.
4824
4825 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
4826
4827 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
4828 NULL".
4829
4830 2017-06-08 Alan Hayward <alan.hayward@arm.com>
4831
4832 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
4833 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
4834 (mn10300_push_dummy_call): Likewise.
4835
4836 2017-06-08 Alan Hayward <alan.hayward@arm.com>
4837
4838 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
4839
4840 2017-06-08 Alan Hayward <alan.hayward@arm.com>
4841
4842 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
4843
4844 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4845
4846 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
4847 able to start inferiors using a shell.
4848 (New remote packets): Announce new packet "QStartupWithShell".
4849 * remote.c: Add PACKET_QStartupWithShell.
4850 (extended_remote_create_inferior): Handle new
4851 PACKET_QStartupWithShell.
4852 (remote_protocol_features) <QStartupWithShell>: New entry for
4853 PACKET_QStartupWithShell.
4854 (_initialize_remote): Call "add_packet_config_cmd" for
4855 QStartupShell.
4856
4857 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4858 Pedro Alves <palves@redhat.com>
4859
4860 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
4861 and "nat/fork-inferior.h".
4862 * common/common-inferior.h: New file, with contents from
4863 "gdb/inferior.h".
4864 * commom/common-utils.c: Include "common-utils.h".
4865 (stringify_argv): New function.
4866 * common/common-utils.h (stringify_argv): New prototype.
4867 * configure.nat: Add "fork-inferior.o" as a dependency for
4868 "*linux*", "fbsd*" and "nbsd*" hosts.
4869 * corefile.c (get_exec_file): Update comment.
4870 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
4871 instead of "startup_inferior".
4872 (darwin_create_inferior): Call "add_thread_silent" after
4873 "fork_inferior".
4874 * fork-child.c: Cleanup unnecessary includes.
4875 (SHELL_FILE): Move to "common/common-fork-child.c".
4876 (environ): Likewise.
4877 (exec_wrapper): Initialize.
4878 (get_exec_wrapper): New function.
4879 (breakup_args): Move to "common/common-fork-child.c"; rename to
4880 "breakup_args_for_exec".
4881 (escape_bang_in_quoted_argument): Move to
4882 "common/common-fork-child.c".
4883 (saved_ui): New variable.
4884 (prefork_hook): New function.
4885 (postfork_hook): Likewise.
4886 (postfork_child_hook): Likewise.
4887 (gdb_startup_inferior): Likewise.
4888 (fork_inferior): Move to "common/common-fork-child.c". Update
4889 function to support gdbserver.
4890 (startup_inferior): Likewise.
4891 * gdbcore.h (get_exec_file): Remove declaration.
4892 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
4893 instead of "startup_inferior". Call "add_thread_silent" after
4894 "fork_inferior".
4895 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
4896 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
4897 instead of "startup_inferior". Call "add_thread_silent" after
4898 "fork_inferior".
4899 * inferior.h: Include "common-inferior.h".
4900 (trace_start_error): Move to "common/common-utils.h".
4901 (trace_start_error_with_name): Likewise.
4902 (fork_inferior): Move prototype to "nat/fork-inferior.h".
4903 (startup_inferior): Likewise.
4904 (gdb_startup_inferior): New prototype.
4905 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
4906 * nat/fork-inferior.h: New file.
4907 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
4908 instead of "startup_inferior". Call "add_thread_silent" after
4909 "fork_inferior".
4910 * target.h (target_terminal_init): Move prototype to
4911 "target/target.h".
4912 (target_terminal_inferior): Likewise.
4913 (target_terminal_ours): Likewise.
4914 * target/target.h (target_terminal_init): New prototype, moved
4915 from "target.h".
4916 (target_terminal_inferior): Likewise.
4917 (target_terminal_ours): Likewise.
4918 * utils.c (gdb_flush_out_err): New function.
4919
4920 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4921
4922 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
4923 * common/common-gdbthread.h: New file, with parts from
4924 "gdb/gdbthread.h".
4925 * gdbthread.h: Include "common-gdbthread.h".
4926 (switch_to_thread): Moved to "common/common-gdbthread.h".
4927
4928 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4929
4930 * Makefile.in (SFILES): Add "common/job-control.c".
4931 (HFILES_NO_SRCDIR): Add "common/job-control.h".
4932 (COMMON_OBS): Add "job-control.o".
4933 * common/job-control.c: New file, with contents from
4934 "gdb/inflow.c".
4935 * common/job-control.h: New file, with contents from "terminal.h".
4936 * fork-child.c: Include "job-control.h".
4937 * inflow.c: Include "job-control.h".
4938 (gdb_setpgid): Move to "common/common-inflow.c".
4939 (_initialize_inflow): Move setting of "job_control" to
4940 "handle_job_control".
4941 * terminal.h (job_control): Moved to "common/common-terminal.h".
4942 (gdb_setpgid): Likewise.
4943 * top.c: Include "job_control.h".
4944 * utils.c: Likewise.
4945 (job_control): Moved to "job-control.c".
4946
4947 2017-06-07 Pedro Alves <palves@redhat.com>
4948
4949 * Makefile.in (SFILES): Add gdb_regex.c.
4950 (COMMON_OBS): Add gdb_regex.o.
4951 * ada-lang.c (ada_add_standard_exceptions)
4952 (ada_add_exceptions_from_frame, name_matches_regex)
4953 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
4954 parameter type to compiled_regex. Adjust.
4955 (ada_exceptions_list): Use compiled_regex.
4956 * break-catch-throw.c (exception_catchpoint::pattern): Now a
4957 std::unique_ptr<compiled_regex>.
4958 (exception_catchpoint::~exception_catchpoint): Remove regfree
4959 call.
4960 (check_status_exception_catchpoint): Adjust to use compiled_regex.
4961 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
4962 * breakpoint.c (solib_catchpoint::compiled): Now a
4963 std::unique_ptr<compiled_regex>.
4964 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
4965 (check_status_catch_solib): Adjust to use compiled_regex.
4966 (add_solib_catchpoint): Adjust to use compiled_regex.
4967 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
4968 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
4969 compiled_regex reference. Adjust to use it.
4970 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
4971 declaration. Include "gdb_regex.h".
4972 (apropos_cmd): Change regex parameter to compiled_regex reference.
4973 * gdb_regex.c: New file.
4974 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
4975 declarations.
4976 (class compiled_regex): New.
4977 * linux-tdep.c: Include "common/gdb_optional.h".
4978 (struct mapping_regexes): New, factored out from
4979 mapping_is_anonymous_p, and adjusted to use compiled_regex.
4980 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
4981 gdb::optional and remove cleanups. Adjust to compiled_regex.
4982 * probe.c: Include "common/gdb_optional.h".
4983 (collect_probes): Use compiled_regex and gdb::optional and remove
4984 cleanups.
4985 * skip.c: Include "common/gdb_optional.h".
4986 (skiplist_entry::compiled_function_regexp): Now a
4987 gdb::optional<compiled_regex>.
4988 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
4989 (free_skiplist_entry): Remove regfree call.
4990 (compile_skip_regexp, skip_rfunction_p): Adjust to use
4991 compiled_regex and gdb::optional.
4992 * symtab.c: Include "common/gdb_optional.h".
4993 (search_symbols): Use compiled_regex and gdb::optional.
4994 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
4995 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
4996 to gdb_regex.c.
4997
4998 2017-06-07 Alan Hayward <alan.hayward@arm.com>
4999
5000 * regcache.c (regcache::save): Avoid buffer use.
5001 (regcache::dump): Likewise.
5002
5003 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5004
5005 * sh-tdep.c (sh_pseudo_register_read): Remove
5006 MAX_REGISTER_SIZE.
5007 (sh_pseudo_register_write): Likewise.
5008 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
5009 (sh64_pseudo_register_write): Likewise
5010
5011 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5012
5013 * aarch64-tdep.c (aarch64_store_return_value): Use
5014 V_REGISTER_SIZE.
5015 (aarch64_pseudo_read_value): Likewise.
5016 (aarch64_pseudo_write): Likewise.
5017
5018 2017-06-06 Yao Qi <yao.qi@linaro.org>
5019
5020 * regformats/regdef.h (set_register_cache): Remove the
5021 declaration.
5022
5023 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5024
5025 * frame.c (frame_unwind_register_signed): Use
5026 frame_unwind_register_value.
5027
5028 2017-06-06 Pedro Alves <palves@redhat.com>
5029
5030 PR breakpoints/21553
5031 * breakpoint.c (create_breakpoints_sal_default)
5032 (init_breakpoint_sal, create_breakpoint_sal): Use
5033 gdb::unique_xmalloc_ptr for string parameters.
5034 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5035 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
5036 (base_breakpoint_create_breakpoints_sal)
5037 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
5038 (strace_marker_create_breakpoints_sal)
5039 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
5040 string parameters.
5041 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
5042 gdb::unique_xmalloc_ptr for string parameters.
5043 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5044 parameters.
5045
5046 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5047
5048 * alpha-tdep.c (alpha_register_to_value): Use
5049 get_frame_register_value.
5050 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
5051
5052 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5053
5054 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
5055 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
5056 (ia64_value_to_register): Likewise.
5057 (ia64_extract_return_value): Likewise.
5058 (ia64_store_return_value): Likewise.
5059 (ia64_push_dummy_call): Likewise.
5060
5061 2017-06-04 Joel Brobecker <brobecker@adacore.com>
5062
5063 GDB 8.0 released.
5064
5065 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
5066
5067 * x86-linux-nat.c (struct arch_lwp_info): Remove.
5068
5069 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
5070
5071 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
5072 parameter.
5073 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
5074
5075 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
5076
5077 * event-loop.c (poll_timers): Unallocate timer using delete
5078 instead of xfree.
5079
5080 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5081
5082 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
5083 (struct breakpoint) <~breakpoint>: New.
5084 (struct watchpoint): Inherit from breakpoint.
5085 <~watchpoint>: New.
5086 <base>: Remove.
5087 (struct tracepoint): Inherit from breakpoint.
5088 <base>: Remove.
5089 * breakpoint.c (longjmp_breakpoint_ops): Remove.
5090 (struct longjmp_breakpoint): Inherit from breakpoint.
5091 <~longjmp_breakpoint>: New.
5092 <base>: Remove.
5093 (new_breakpoint_from_type): Remove casts.
5094 (watchpoint_in_thread_scope): Remove reference to base field.
5095 (watchpoint_del_at_next_stop): Likewise.
5096 (update_watchpoint): Likewise.
5097 (watchpoint_check): Likewise.
5098 (bpstat_check_watchpoint): Likewise.
5099 (set_longjmp_breakpoint): Likewise.
5100 (struct fork_catchpoint): Inherit from breakpoint.
5101 <base>: Remove.
5102 (struct solib_catchpoint): Inherit from breakpoint.
5103 <~solib_catchpoint>: New.
5104 <base>: Remove.
5105 (dtor_catch_solib): Change to ...
5106 (solib_catchpoint::~solib_catchpoint): ... this.
5107 (breakpoint_hit_catch_solib): Remove reference to base field.
5108 (add_solib_catchpoint): Likewise.
5109 (create_fork_vfork_event_catchpoint): Likewise.
5110 (struct exec_catchpoint): Inherit from breakpoint.
5111 <~exec_catchpoint>: New.
5112 <base>: Remove.
5113 (dtor_catch_exec): Change to ...
5114 (exec_catchpoint::~exec_catchpoint): ... this.
5115 (dtor_watchpoint): Change to ...
5116 (watchpoint::~watchpoint): ... this.
5117 (watch_command_1): Remove reference to base field.
5118 (catch_exec_command_1): Likewise.
5119 (base_breakpoint_dtor): Change to ...
5120 (breakpoint::~breakpoint): ... this.
5121 (base_breakpoint_ops): Remove dtor field value.
5122 (longjmp_bkpt_dtor): Change to ...
5123 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
5124 (strace_marker_create_breakpoints_sal): Remove reference to base
5125 field.
5126 (delete_breakpoint): Don't manually call breakpoint destructor.
5127 (create_tracepoint_from_upload): Remove reference to base field.
5128 (trace_pass_set_count): Likewise.
5129 (initialize_breakpoint_ops): Don't initialize
5130 momentary_breakpoint_ops, don't set dtors.
5131 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
5132 <~ada_catchpoint>: New.
5133 <base>: Remove.
5134 (create_excep_cond_exprs): Remove reference to base field.
5135 (dtor_exception): Change to ...
5136 (ada_catchpoint::~ada_catchpoint): ... this.
5137 (dtor_catch_exception): Remove.
5138 (dtor_catch_exception_unhandled): Remove.
5139 (dtor_catch_assert): Remove.
5140 (create_ada_exception_catchpoint): Remove reference to base
5141 field.
5142 (initialize_ada_catchpoint_ops): Don't set dtors.
5143 * break-catch-sig.c (struct signal_catchpoint): Inherit from
5144 breakpoint.
5145 <~signal_catchpoint>: New.
5146 <base>: Remove.
5147 (signal_catchpoint_dtor): Change to ...
5148 (signal_catchpoint::~signal_catchpoint): ... this.
5149 (create_signal_catchpoint): Remove reference to base field.
5150 (initialize_signal_catchpoint_ops): Don't set dtor.
5151 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
5152 from breakpoint.
5153 <~syscall_catchpoint>: New.
5154 <base>: Remove.
5155 (dtor_catch_syscall): Change to ...
5156 (syscall_catchpoint::~syscall_catchpoint): ... this.
5157 (create_syscall_event_catchpoint): Remove reference to base
5158 field.
5159 (initialize_syscall_catchpoint_ops): Don't set dtor.
5160 * break-catch-throw.c (struct exception_catchpoint): Inherit
5161 from breakpoint.
5162 <~exception_catchpoint>: New.
5163 <base>: Remove.
5164 (dtor_exception_catchpoint): Change to ...
5165 (exception_catchpoint::~exception_catchpoint): ... this.
5166 (handle_gnu_v3_exceptions): Remove reference to base field.
5167 (initialize_throw_catchpoint_ops): Don't set dtor.
5168 * ctf.c (ctf_get_traceframe_address): Remove reference to base
5169 field.
5170 * remote.c (remote_get_tracepoint_status): Likewise.
5171 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
5172 * tracefile.c (tracefile_fetch_registers): Likewise.
5173 * tracepoint.c (actions_command): Likewise.
5174 (validate_actionline): Likewise.
5175 (tfind_1): Likewise.
5176 (get_traceframe_location): Likewise.
5177 (find_matching_tracepoint_location): Likewise.
5178 (parse_tracepoint_status): Likewise.
5179 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
5180
5181 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5182
5183 * breakpoint.c (struct longjmp_breakpoint): New struct.
5184 (is_tracepoint_type): Change return type to bool.
5185 (is_longjmp_type): New function.
5186 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
5187 (set_raw_breakpoint_without_location): Use
5188 new_breakpoint_from_type.
5189 (set_raw_breakpoint): Likewise.
5190
5191 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5192
5193 * breakpoint.c (new_breakpoint_from_type): New function.
5194 (create_breakpoint_sal): Use new_breakpoint_from_type and
5195 unique_ptr.
5196 (create_breakpoint): Likewise.
5197
5198 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
5199
5200 * memattr.c (mem_info_command): Rename to ...
5201 (info_mem_command): ... this.
5202 (mem_enable_command): Rename to ...
5203 (enable_mem_command): ... this.
5204 (mem_disable_command): Rename to ...
5205 (disable_mem_command): ... this.
5206 (mem_delete_command): Rename to ...
5207 (delete_mem_command): ... this.
5208 (_initialize_mem): Adjust function names.
5209
5210 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5211
5212 * btrace.c (handle_pt_insn_events): New.
5213 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
5214 STATUS. Split into this and ...
5215 (handle_pt_insn_event_flags): ... this.
5216
5217 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5218
5219 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
5220 and struct pt_insn.resynced.
5221 * configure: Regenerated.
5222 * config.in: Regenerated.
5223
5224 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5225
5226 * btrace.c (ftrace_find_call_by_number): New function.
5227 (ftrace_new_function): Store objects, not pointers.
5228 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
5229 ftrace_new_gap, ftrace_update_function,
5230 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
5231 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
5232 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
5233 btrace_ends_with_single_insn, btrace_call_get): Account for
5234 btrace_thread_info::functions now storing objects.
5235 * btrace.h (struct btrace_thread_info): Add constructor.
5236 (struct btrace_thread_info) <functions>: Make std::vector.
5237 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
5238 Initialize with default values.
5239 * record-btrace.c (record_btrace_frame_sniffer): Account for
5240 btrace_thread_info::functions now storing objects.
5241
5242 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5243
5244 * btrace.c: Remove typedef bfun_s.
5245 (ftrace_new_gap): Directly add gaps to the list of gaps.
5246 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
5247 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
5248 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
5249 instead of gdb VEC.
5250
5251 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5252
5253 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
5254 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
5255 with btrace_thread_info::next_segment and
5256 btrace_thread_info::prev_segment.
5257 * btrace.h: Remove struct btrace_func_link.
5258 (struct btrace_function): Replace pair of function segment pointers
5259 with pair of indices.
5260 * python/py-record-btrace.c (btpy_call_prev_sibling,
5261 btpy_call_next_sibling): Replace references to
5262 btrace_thread_info::segment with btrace_thread_info::next_segment and
5263 btrace_thread_info::prev_segment.
5264 * record-btrace.c (record_btrace_frame_this_id): Use
5265 btrace_find_call_by_number.
5266
5267 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5268
5269 * btrace.c (ftrace_new_function, ftrace_fixup_level,
5270 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
5271 btrace_insn_next, btrace_insn_prev): Remove references to
5272 btrace_thread_info::flow.
5273 * btrace.h (struct btrace_function): Remove FLOW.
5274
5275 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5276
5277 * btrace.c (ftrace_find_call_by_number): New function.
5278 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
5279 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
5280 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
5281 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
5282 index.
5283 * btrace.h (struct btrace_function): Turn UP into an index.
5284 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
5285 as an index.
5286 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
5287 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
5288 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
5289
5290 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5291
5292 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5293 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5294 ftrace_update_function, ftrace_compute_global_level_offset,
5295 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
5296 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
5297 btrace_insn_end, btrace_is_empty): Remove references to
5298 btrace_thread_info::begin and btrace_thread_info::end.
5299 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
5300 (struct btrace_thread_info) <functions>: Adjust comment.
5301 * record-btrace.c (record_btrace_start_replaying): Remove reference to
5302 btrace_thread_info::begin.
5303
5304 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5305
5306 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5307 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5308 ftrace_update_function): Remove arguments that implicitly were always
5309 BTINFO->END.
5310 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
5311 Don't pass BTINFO->END.
5312
5313 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5314
5315 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
5316 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
5317 btrace_find_insn_by_number): Replace function segment pointer with
5318 index.
5319 (btrace_insn_cmp): Simplify.
5320 * btrace.h: (struct btrace_insn_iterator) Rename index to
5321 insn_index. Replace function segment pointer with index into function
5322 segment vector.
5323 * record-btrace.c (record_btrace_call_history): Replace function
5324 segment pointer use with index.
5325 (record_btrace_frame_sniffer): Retrieve function call segment through
5326 vector.
5327 (record_btrace_set_replay): Remove defunc't safety check.
5328
5329 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5330
5331 * btrace.c (btrace_ends_with_single_insn): New function.
5332 (btrace_call_get, btrace_call_number, btrace_call_begin,
5333 btrace_call_end, btrace_call_next, btrace_call_prev,
5334 btrace_find_call_by_number): Use index into call segment vector
5335 instead of pointer.
5336 (btrace_call_cmp): Simplify.
5337 * btrace.h (struct btrace_call_iterator): Replace function call segment
5338 pointer with index into vector.
5339 * record-btrace.c (record_btrace_call_history): Use index instead of
5340 pointer.
5341
5342 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5343
5344 * btrace.c (btrace_insn_begin, btrace_insn_end,
5345 btrace_find_insn_by_number): Add btinfo to iterator.
5346 * btrace.h (struct btrace_insn_iterator): Add btinfo.
5347
5348 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5349
5350 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
5351 and save pointers directly.
5352 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
5353 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
5354 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
5355 changed signature of functions.
5356 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
5357 (btrace_fetch): Remove code that adds btrace_function pointers to
5358 vector of btrace_functions.
5359 (btrace_clear): Simplify freeing vector of btrace_functions.
5360
5361 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5362
5363 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
5364 Replace VEC_* with std::vector functions.
5365 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
5366 (struct btrace_thread_info)<functions>: Change type to std::vector.
5367
5368 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
5369
5370 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
5371 "Removed targets and native configurations" up. Merge duplicate
5372 "New commands" sub-sections. Add "New options" sub-sections.
5373
5374 2017-05-26 Alan Hayward <alan.hayward@arm.com>
5375
5376 * defs.h (copy_integer_to_size): New declaration.
5377 * findvar.c (copy_integer_to_size): New function.
5378 (do_cint_test): New selftest function.
5379 (copy_integer_to_size_test): Likewise.
5380 (_initialize_findvar): Likewise.
5381 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
5382 (mips_fbsd_collect_reg): Use raw_collect_integer.
5383 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
5384 (mips64_fill_gregset): Use raw_collect_integer
5385 (mips64_fill_fpregset): Use raw_supply_integer.
5386 * regcache.c (regcache::raw_supply_integer): New function.
5387 (regcache::raw_collect_integer): Likewise.
5388 * regcache.h: (regcache::raw_supply_integer): New declaration.
5389 (regcache::raw_collect_integer): Likewise.
5390
5391 2017-05-24 Yao Qi <yao.qi@linaro.org>
5392
5393 * Makefile.in (SFILES): Add gdbarch-selftests.c.
5394 (COMMON_OBS): Add gdbarch-selftests.o.
5395 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
5396 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
5397 * gdbarch-selftests.c: New file.
5398 * regcache.h (regcache) <~regcache>: Mark it virtual if
5399 GDB_SELF_TEST.
5400 <raw_write>: Likewise.
5401
5402 2017-05-24 Yao Qi <yao.qi@linaro.org>
5403
5404 * regcache.c (current_regcache): Change it to
5405 regcache::current_regcache.
5406 (regcache_observer_target_changed): Update.
5407 (regcache_thread_ptid_changed): Make it a regcache static
5408 method.
5409 (regcache_thread_ptid_changed): Update.
5410 (class regcache_access): New.
5411 (current_regcache_test): Update.
5412 (_initialize_regcache): Update.
5413 * regcache.h: Include forward_list.
5414 (regcache): Declare regcache_thread_ptid_changed and declare
5415 registers_changed_ptid as friend.
5416
5417 2017-05-24 Yao Qi <yao.qi@linaro.org>
5418
5419 * i387-tdep.c (i387_register_to_value): Use register_size
5420 instead of TYPE_LENGTH.
5421 * m68k-tdep.c (m68k_register_to_value): Likewise.
5422
5423 2017-05-24 Yao Qi <yao.qi@linaro.org>
5424
5425 * i387-tdep.c (i387_convert_register_p): Return false if type
5426 code isn't TYPE_CODE_FLT.
5427
5428 2017-05-24 Yao Qi <yao.qi@linaro.org>
5429
5430 * alpha-tdep.c (alpha_convert_register_p): Return true if type
5431 length is 4.
5432 (alpha_register_to_value): Remove type length check.
5433 (alpha_value_to_register): Likewise.
5434
5435 2017-05-24 Yao Qi <yao.qi@linaro.org>
5436
5437 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
5438 TYPE_CODE_FLT.
5439
5440 2017-05-24 Yao Qi <yao.qi@linaro.org>
5441
5442 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
5443 TYPE_CODE_FLT or not.
5444
5445 2017-05-24 Yao Qi <yao.qi@linaro.org>
5446
5447 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
5448 * avr-tdep.c (avr_gdbarch_init): Likewise.
5449 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5450 * cris-tdep.c (cris_gdbarch_init): Likewise.
5451 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5452 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5453 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5454 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
5455 * mep-tdep.c (mep_gdbarch_init): Likewise.
5456 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5457 * mips-tdep.c (mips_gdbarch_init): Likewise.
5458 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5459 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5460 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5461 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5462 * v850-tdep.c (v850_gdbarch_init): Likewise.
5463
5464 2017-05-24 Yao Qi <yao.qi@linaro.org>
5465
5466 * selftest-arch.c (tests_with_arch): Call registers_changed
5467 and reinit_frame_cache.
5468 * selftest.c (run_self_tests): Likewise.
5469
5470 2017-05-24 Yao Qi <yao.qi@linaro.org>
5471
5472 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
5473 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
5474
5475 2017-05-24 Yao Qi <yao.qi@linaro.org>
5476
5477 * rl78-tdep.c (rl78_gdbarch_init): Don't call
5478 set_gdbarch_print_insn.
5479
5480 2017-05-24 Yao Qi <yao.qi@linaro.org>
5481
5482 * h8300-tdep.c (h8300_gdbarch_init): Don't call
5483 set_gdbarch_print_insn.
5484
5485 2017-05-24 Yao Qi <yao.qi@linaro.org>
5486
5487 * alpha-tdep.c (alpha_gdbarch_init): Don't call
5488 set_gdbarch_print_insn.
5489 * arc-tdep.c (arc_gdbarch_init): Likewise.
5490 * arch-utils.c: include dis-asm.h.
5491 (default_print_insn): New function.
5492 * arch-utils.h (default_print_insn): Declare.
5493 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
5494 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5495 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
5496 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
5497 * frv-tdep.c (frv_gdbarch_init): Likewise.
5498 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5499 * gdbarch.sh (print_insn): Use default_print_insn.
5500 * gdbarch.c: Regenerated.
5501 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
5502 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
5503 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5504 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
5505 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5506 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
5507 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
5508 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
5509 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
5510 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5511 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5512 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5513 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5514 * mt-tdep.c (mt_gdbarch_init): Likewise.
5515 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5516 * nios2-tdep.c (nios2_print_insn): Remove.
5517 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
5518 * rx-tdep.c (rx_gdbarch_init): Likewise.
5519 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5520 * score-tdep.c (score_print_insn): Remove.
5521 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
5522 * sh-tdep.c (sh_gdbarch_init): Likewise.
5523 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5524 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5525 * tic6x-tdep.c (tic6x_print_insn): Remove.
5526 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
5527 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
5528 * v850-tdep.c (v850_gdbarch_init): Likewise.
5529 * vax-tdep.c (vax_gdbarch_init): Likewise.
5530 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
5531 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
5532
5533 2017-05-23 John Baldwin <jhb@FreeBSD.org>
5534
5535 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
5536 (MIPS_FP0_REGNUM): Remove.
5537 (MIPS_FSR_REGNUM): Remove.
5538 (mips_fbsd_supply_fpregs): Use mips_regnum.
5539 (mips_fbsd_supply_gregs): Likewise.
5540 (mips_fbsd_collect_fpregs): Likewise.
5541 (mips_fbsd_collect_gregs): Likewise.
5542
5543 2017-05-23 John Baldwin <jhb@FreeBSD.org>
5544
5545 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
5546 (getpfpregs_supplies): New function.
5547 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
5548 getfpregs_supplies.
5549 (mips_fbsd_store_inferior_registers): Likewise.
5550
5551 2017-05-22 Pedro Alves <palves@redhat.com>
5552
5553 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
5554 maintainer.
5555
5556 2017-05-22 Alan Hayward <alan.hayward@arm.com>
5557
5558 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
5559 (store_register): Likewise.
5560 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
5561 (get_decimal_float_return_value): Likewise.
5562 (do_ppc_sysv_return_value): Likewise.
5563 (ppc64_sysv_abi_push_integer): Likewise.
5564 (ppc64_sysv_abi_push_freg): Likewise.
5565 (ppc64_sysv_abi_return_value_base): Likewise.
5566 (ppc64_sysv_abi_return_value): Likewise.
5567 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
5568 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
5569 * rs6000-nat.c: Likewise.
5570 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
5571 (rs6000_value_to_register): Likewise.
5572 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
5573
5574 2017-05-21 Tom Tromey <tom@tromey.com>
5575
5576 PR rust/21466:
5577 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
5578 arrays as "[T]", not "[T; ]".
5579
5580 2017-05-19 Tom Tromey <tom@tromey.com>
5581
5582 PR rust/21484:
5583 * rust-lang.c (exp_descriptor_rust): New function.
5584 (rust_language_defn): Use it.
5585 * p-lang.c (pascal_language_defn): Update.
5586 * opencl-lang.c (opencl_language_defn): Update.
5587 * objc-lang.c (objc_language_defn): Update.
5588 * m2-lang.c (m2_language_defn): Update.
5589 * language.h (struct language_defn)
5590 <la_watch_location_expression>: New member.
5591 * language.c (unknown_language_defn, auto_language_defn)
5592 (local_language_defn): Update.
5593 * go-lang.c (go_language_defn): Update.
5594 * f-lang.c (f_language_defn): Update.
5595 * d-lang.c (d_language_defn): Update.
5596 * c-lang.h (c_watch_location_expression): Declare.
5597 * c-lang.c (c_watch_location_expression): New function.
5598 (c_language_defn, cplus_language_defn, asm_language_defn)
5599 (minimal_language_defn): Use it.
5600 * breakpoint.c (watch_command_1): Call
5601 la_watch_location_expression.
5602 * ada-lang.c (ada_language_defn): Update.
5603
5604 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5605
5606 PR tui/21482
5607 * gdb_curses.h (NOMACROS): Define.
5608 (NCURSES_NOMACROS): Define.
5609
5610 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5611
5612 PR tui/21482
5613 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
5614 arg to char *.
5615 * tui/tui-wingeneral.c (box_win): Likewise.
5616 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
5617 (tui_show_source_line): Likewise.
5618 (tui_show_exec_info_content): Likewise.
5619
5620 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
5621
5622 * sparc-tdep.c (sparc_structure_return_p)
5623 (sparc_arg_on_registers_p): New functions.
5624 (sparc32_store_arguments): Use them.
5625 * sparc64-tdep.c (sparc64_16_byte_align_p)
5626 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
5627 Handle TYPE_CODE_ARRAY.
5628
5629 2017-05-17 Yao Qi <yao.qi@linaro.org>
5630
5631 * cli/cli-decode.c (add_alias_cmd): New function.
5632 * command.h (add_alias_cmd): Declare.
5633 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
5634 instead call add_alias_cmd.
5635
5636 2017-05-17 Pedro Alves <palves@redhat.com>
5637
5638 * Makefile.in (nat_extra_makefile_frag): Rename to ...
5639 (nat_makefile_frag): ... this. All references updated.
5640 * configure.ac: Likewise.
5641 * configure.nat: Likewise. Enhance comments.
5642 * configure: Regenerate.
5643
5644 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5645
5646 * procfs.c (procfs_create_inferior): Change prototype to match
5647 definition.
5648
5649 2017-05-13 Eli Zaretskii <eliz@gnu.org>
5650
5651 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
5652 C++ compiler warning.
5653
5654 2017-05-12 Tom Tromey <tom@tromey.com>
5655
5656 PR rust/21483:
5657 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
5658 recurse, just call value_struct_elt directly.
5659
5660 2017-05-12 Tom Tromey <tom@tromey.com>
5661
5662 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
5663 OP_RUST_ARRAY>: Fix.
5664
5665 2017-05-12 Tom Tromey <tom@tromey.com>
5666
5667 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
5668
5669 2017-05-09 Yao Qi <yao.qi@linaro.org>
5670
5671 * regcache.c: Include <forward_list>.
5672 (struct regcache_list): Remove.
5673 (current_regcache): Update.
5674 (get_thread_arch_aspace_regcache): Update for std::forward_list.
5675 (regcache_thread_ptid_changed): Likewise.
5676 (registers_changed_ptid): Likewise.
5677 (current_regcache_size): Likewise.
5678
5679 2017-05-09 Yao Qi <yao.qi@linaro.org>
5680
5681 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
5682 (current_regcache_size): New function.
5683 (current_regcache_test): New function.
5684 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
5685
5686 2017-05-08 Alan Hayward <alan.hayward@arm.com>
5687
5688 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
5689 (print_gp_register_row): Use get_frame_register_value.
5690
5691 2017-05-08 Alan Hayward <alan.hayward@arm.com>
5692
5693 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
5694 (mips_supply_fpregset): Likewise.
5695 (mips64_supply_gregset): Likewise.
5696
5697 2017-05-08 Alan Hayward <alan.hayward@arm.com>
5698
5699 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
5700 regcache->raw_supply_zeroed.
5701
5702 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
5703
5704 * configure.nat: Rearrange 'case' statements to match
5705 host before cpu.
5706
5707 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
5708
5709 * Makefile.in: Remove "@host_makefile_frag@". Add variables
5710 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
5711 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
5712 "@nat_extra_makefile_frag@".
5713 (Makefile): Remove dependency on "@frags@".
5714 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
5715 (data-directory/Makefile): Likewise.
5716 * config/aarch64/linux.mh: Deleted; moved contents to
5717 "gdb/configure.nat".
5718 * config/alpha/alpha-linux.mh: Likewise.
5719 * config/alpha/nbsd.mh: Likewise.
5720 * config/arm/linux.mh: Likewise.
5721 * config/arm/nbsdelf.mh: Likewise.
5722 * config/i386/cygwin.mh: Likewise.
5723 * config/i386/cygwin64.mh: Likewise.
5724 * config/i386/darwin.mh: Likewise.
5725 * config/i386/fbsd.mh: Likewise.
5726 * config/i386/fbsd64.mh: Likewise.
5727 * config/i386/go32.mh: Likewise.
5728 * config/i386/i386gnu.mh: Likewise.
5729 * config/i386/i386sol2.mh: Likewise.
5730 * config/i386/linux.mh: Likewise.
5731 * config/i386/linux64.mh: Likewise.
5732 * config/i386/mingw.mh: Likewise.
5733 * config/i386/mingw64.mh: Likewise.
5734 * config/i386/nbsd64.mh: Likewise.
5735 * config/i386/nbsdelf.mh: Likewise.
5736 * config/i386/nto.mh: Likewise.
5737 * config/i386/obsd.mh: Likewise.
5738 * config/i386/obsd64.mh: Likewise.
5739 * config/i386/sol2-64.mh: Likewise.
5740 * config/ia64/linux.mh: Likewise.
5741 * config/m32r/linux.mh: Likewise.
5742 * config/m68k/linux.mh: Likewise.
5743 * config/m68k/nbsdelf.mh: Likewise.
5744 * config/m68k/obsd.mh: Likewise.
5745 * config/m88k/obsd.mh: Likewise.
5746 * config/mips/fbsd.mh: Likewise.
5747 * config/mips/linux.mh: Likewise.
5748 * config/mips/nbsd.mh: Likewise.
5749 * config/mips/obsd64.mh: Likewise.
5750 * config/pa/linux.mh: Likewise.
5751 * config/pa/nbsd.mh: Likewise.
5752 * config/pa/obsd.mh: Likewise.
5753 * config/powerpc/aix.mh: Likewise.
5754 * config/powerpc/fbsd.mh: Likewise.
5755 * config/powerpc/linux.mh: Likewise.
5756 * config/powerpc/nbsd.mh: Likewise.
5757 * config/powerpc/obsd.mh: Likewise.
5758 * config/powerpc/ppc64-linux.mh: Likewise.
5759 * config/powerpc/spu-linux.mh: Likewise.
5760 * config/s390/linux.mh: Likewise.
5761 * config/sh/nbsd.mh: Likewise.
5762 * config/sparc/fbsd.mh: Likewise.
5763 * config/sparc/linux.mh: Likewise.
5764 * config/sparc/linux64.mh: Likewise.
5765 * config/sparc/nbsd64.mh: Likewise.
5766 * config/sparc/nbsdelf.mh: Likewise.
5767 * config/sparc/obsd64.mh: Likewise.
5768 * config/sparc/sol2.mh: Likewise.
5769 * config/tilegx/linux.mh: Likewise.
5770 * config/vax/nbsdelf.mh: Likewise.
5771 * config/vax/obsd.mh: Likewise.
5772 * config/xtensa/linux.mh: Likewise.
5773 * config/i386/i386gnu.mn: New file, with excerpts from
5774 "config/i386/i386gnu.mh".
5775 * configure: Regenerate.
5776 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
5777 *.mh files under "gdb/config".
5778 * configure.nat: New file, with contents from the
5779 "gdb/config/*/*.mh" files.
5780
5781 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
5782
5783 * btrace.c (btrace_clear): Free insn vector.
5784
5785 2017-05-05 Pedro Alves <palves@redhat.com>
5786
5787 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
5788 * configure: Regenerate.
5789
5790 2017-05-04 Pedro Alves <palves@redhat.com>
5791
5792 * Makefile.in (SFILES): Add progspace-and-thread.c.
5793 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
5794 (COMMON_OBS): Add progspace-and-thread.o.
5795 * breakpoint.c: Include "progspace-and-thread.h".
5796 (update_inserted_breakpoint_locations)
5797 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
5798 Use scoped_restore_current_pspace_and_thread.
5799 (create_std_terminate_master_breakpoint): Use
5800 scoped_restore_current_program_space.
5801 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
5802 (print_breakpoint_location): Use
5803 scoped_restore_current_program_space.
5804 (bp_loc_is_permanent): Use
5805 scoped_restore_current_pspace_and_thread.
5806 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
5807 (download_tracepoint_locations): Use
5808 scoped_restore_current_pspace_and_thread.
5809 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
5810 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
5811 (enum step_over_calls_kind): Moved from inferior.h.
5812 (class scoped_restore_current_thread): New class.
5813 * gdbthread.h (make_cleanup_restore_current_thread): Delete
5814 declaration.
5815 (scoped_restore_current_thread): New class.
5816 * infcmd.c: Include "common/gdb_optional.h".
5817 (continue_1, proceed_after_attach): Use
5818 scoped_restore_current_thread.
5819 (notice_new_inferior): Use scoped_restore_current_thread.
5820 * inferior.c: Include "progspace-and-thread.h".
5821 (restore_inferior, save_current_inferior): Delete.
5822 (add_inferior_command, clone_inferior_command): Use
5823 scoped_restore_current_pspace_and_thread.
5824 * inferior.h (scoped_restore_current_inferior): New class.
5825 * infrun.c: Include "progspace-and-thread.h" and
5826 "common/gdb_optional.h".
5827 (follow_fork_inferior): Use
5828 scoped_restore_current_pspace_and_thread.
5829 (scoped_restore_exited_inferior): New class.
5830 (handle_vfork_child_exec_or_exit): Use
5831 scoped_restore_exited_inferior,
5832 scoped_restore_current_pspace_and_thread,
5833 scoped_restore_current_thread and scoped_restore.
5834 (fetch_inferior_event): Use scoped_restore_current_thread.
5835 * linespec.c (decode_line_full, decode_line_1): Use
5836 scoped_restore_current_program_space.
5837 * mi/mi-main.c: Include "progspace-and-thread.h".
5838 (exec_continue): Use scoped_restore_current_thread.
5839 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
5840 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
5841 * proc-service.c (ps_pglobal_lookup): Use
5842 scoped_restore_current_program_space.
5843 * progspace-and-thread.c: New file.
5844 * progspace-and-thread.h: New file.
5845 * progspace.c (release_program_space, clone_program_space): Use
5846 scoped_restore_current_program_space.
5847 (restore_program_space, save_current_program_space)
5848 (save_current_space_and_thread): Delete.
5849 (switch_to_program_space_and_thread): Moved to
5850 progspace-and-thread.c.
5851 * progspace.h (save_current_program_space)
5852 (save_current_space_and_thread): Delete declarations.
5853 (scoped_restore_current_program_space): New class.
5854 * remote.c (remote_btrace_maybe_reopen): Use
5855 scoped_restore_current_thread.
5856 * symtab.c: Include "progspace-and-thread.h".
5857 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
5858 * thread.c (print_thread_info_1): Use
5859 scoped_restore_current_thread.
5860 (struct current_thread_cleanup): Delete.
5861 (do_restore_current_thread_cleanup)
5862 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
5863 (scoped_restore_current_thread::~scoped_restore_current_thread):
5864 ... this new dtor.
5865 (make_cleanup_restore_current_thread): Rename/convert to ...
5866 (scoped_restore_current_thread::scoped_restore_current_thread):
5867 ... this new ctor.
5868 (thread_apply_all_command): Use scoped_restore_current_thread.
5869 (thread_apply_command): Use scoped_restore_current_thread.
5870 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
5871 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
5872
5873 2017-05-04 Pedro Alves <palves@redhat.com>
5874
5875 * thread.c (make_cleanup_restore_current_thread): Move
5876 find_thread_ptid call before the is_stopped call. Assert that the
5877 thread is found. Replace is_stopped call by checking the thread's
5878 state directly. Remove unnecessary NULL-thread check.
5879
5880 2017-05-04 Pedro Alves <palves@redhat.com>
5881
5882 * corelow.c (thread_section_name): New class.
5883 (get_core_register_section, get_core_siginfo): Use it.
5884
5885 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
5886
5887 * corelow.c (sniff_core_bfd): Remove extra semicolon.
5888 (get_core_register_section): Remove xfree of NULL pointer.
5889
5890 2017-05-03 Alan Hayward <alan.hayward@arm.com>
5891
5892 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
5893 * regcache.c (regcache::raw_supply_zeroed): New function.
5894 * regcache.h (regcache::raw_supply_zeroed): New declaration.
5895
5896 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
5897
5898 * gdbarch.sh: Remove commented out definition of
5899 TARGET_CHAR_BIT.
5900 * gdbarch.h: Re-generate.
5901
5902 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
5903
5904 * configure: Regenerate.
5905
5906 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
5907
5908 * solib-target.c (solib_target_relocate_section_addresses):
5909 Remove num_section_bases, num_bases, segment_bases variables.
5910
5911 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
5912
5913 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
5914
5915 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
5916
5917 * solib-target.c: Include <vector>
5918 (struct lm_info_target) <~lm_info_target>: Remove.
5919 <segment_bases, section_bases>: Change type to
5920 std::vector<CORE_ADDR>.
5921 (library_list_start_segment, library_list_start_section,
5922 library_list_end_library,
5923 solib_target_relocate_section_addresses): Adjust.
5924
5925 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
5926
5927 * gdbarch.sh (software_single_step): Change return type to
5928 std::vector<CORE_ADDR>.
5929 * gdbarch.c, gdbarch.h: Re-generate.
5930 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
5931 Adjust.
5932 (arm_deal_with_atomic_sequence_raw): Adjust.
5933 (thumb_get_next_pcs_raw): Adjust.
5934 (arm_get_next_pcs_raw): Adjust.
5935 (arm_get_next_pcs): Adjust.
5936 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
5937 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
5938 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
5939 (alpha_software_single_step): Adjust.
5940 * alpha-tdep.h (alpha_software_single_step): Adjust.
5941 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
5942 * arm-tdep.c (arm_software_single_step): Adjust.
5943 (arm_breakpoint_kind_from_current_state): Adjust.
5944 * arm-tdep.h (arm_software_single_step): Adjust.
5945 * breakpoint.c (insert_single_step_breakpoint): Adjust.
5946 * cris-tdep.c (cris_software_single_step): Adjust.
5947 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
5948 (micromips_deal_with_atomic_sequence): Adjust.
5949 (deal_with_atomic_sequence): Adjust.
5950 (mips_software_single_step): Adjust.
5951 * mips-tdep.h (mips_software_single_step): Adjust.
5952 * moxie-tdep.c (moxie_software_single_step): Adjust.
5953 * nios2-tdep.c (nios2_software_single_step): Adjust.
5954 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
5955 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
5956 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
5957 * s390-linux-tdep.c (s390_software_single_step): Adjust.
5958 * sparc-tdep.c (sparc_software_single_step): Adjust.
5959 * spu-tdep.c (spu_software_single_step): Adjust.
5960 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
5961
5962 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
5963
5964 * gdbarch.sh: Use semi-colon as field separator instead of colon.
5965 * gdbarch.h: Re-generate.
5966
5967 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
5968
5969 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
5970 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
5971 * python/py-instruction.c, python/py-instruction.h: New file.
5972 * python/py-record.c: Add py-instruction.h include.
5973 (gdbpy_initialize_record): Make gdb.Instruction a super class of
5974 gdb.RecordInstruction.
5975 * python/python-internal.h: Add gdbpy_initialize_instruction
5976 declaration.
5977 * python/python.c (do_start_initialization): Add
5978 gdbpy_initialize_instruction.
5979
5980 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
5981
5982 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
5983 Remove.
5984 (btrace_func_from_recpy_func): New function.
5985 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
5986 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
5987 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
5988 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
5989 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
5990 Also, use new helper functions.
5991 (btpy_list_item): Use new helper functions.
5992 (recpy_bt_function_call_history): Use new type name.
5993 (btpy_call_getset): Remove.
5994 (gdbpy_initialize_btrace): Remove code to initialize
5995 gdb.BtraceFunctionCall.
5996 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
5997 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
5998 recpy_bt_func_prev, recpy_bt_func_next): New export.
5999 * python/py-record.c (recpy_func_type): New static object.
6000 (recpy_func_new, recpy_func_level, recpy_func_symbol,
6001 recpy_func_instructions, recpy_func_up, recpy_func_prev,
6002 recpy_func_next): New function.
6003 (recpy_element_hash, recpy_element_richcompare): Updated comment.
6004 (recpy_func_getset): New static object.
6005 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
6006 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
6007
6008 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6009
6010 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
6011 (btpy_object, btpy_insn_type, btpy_new): Remove.
6012 (btpy_list_object): Use gdb.RecordInstruction type instead of
6013 gdb.BtraceInstruction type.
6014 (btrace_insn_from_recpy_insn): New function.
6015 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
6016 btpy_new.
6017 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
6018 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
6019 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
6020 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
6021 instead of btpy_object.
6022 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6023 btpy_insn_data, btpy_insn_decode): Rename to ...
6024 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
6025 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
6026 recpy_bt_insn_decode): This. Also, use new helper functions.
6027 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
6028 recpy_insn_type.
6029 (btpy_insn_getset): Remove.
6030 (gdbpy_initialize_btrace): Remove code to initialize
6031 gdb.BtraceInstruction. Use recpy_element_object.
6032 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
6033 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
6034 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
6035 * python/py-record.c (recpy_insn_type): New static object.
6036 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
6037 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
6038 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
6039 New function.
6040 (recpy_insn_getset): New static object.
6041 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
6042 * python/py-record.h (recpy_element_object): New typedef.
6043 (recpy_insn_type, recpy_insn_new): New export.
6044
6045 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6046
6047 * py-record-btrace.c (btpy_insn_new): Removed.
6048 (btpy_insn_or_gap_new): New function.
6049 (btpy_insn_error): Removed.
6050 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6051 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
6052 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
6053 btpy_insn_or_gap_new instead of btpy_insn_new.
6054 (btpy_insn_getset): Remove btpy_insn_error.
6055 * py-record.c (recpy_gap_type): New static object.
6056 (recpy_gap_object): New typedef.
6057 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
6058 recpy_gap_reason_string): New function.
6059 (recpy_gap_getset): New static object.
6060 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
6061 * py-record.h (recpy_gap_new): New export.
6062
6063 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6064
6065 * python/py-record.c (recpy_ptid): Remove.
6066 (recpy_record_getset): Remove recpy_ptid.
6067
6068 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6069
6070 * btrace.c (btrace_fetch): Set inferior_ptid.
6071 * python/py-record-btrace.c: Add "py-record.h" include.
6072 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
6073 recpy_bt_end, recpy_bt_instruction_history,
6074 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
6075 in gdb.Record object instead of current ptid.
6076 * python/py-record.c: Include new "py-record.h" file.
6077 (recpy_record_object): Moved to py-record.h.
6078 * python/py-record.h: New file.
6079
6080 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6081
6082 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
6083 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
6084 indentation.
6085
6086 2017-05-01 Joel Brobecker <brobecker@adacore.com>
6087
6088 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
6089 the past maintainers section.
6090
6091 2017-04-28 Yao Qi <yao.qi@linaro.org>
6092
6093 * infcmd.c (get_return_value): Use regcache ctor, and remove
6094 cleanup.
6095
6096 2017-04-28 Yao Qi <yao.qi@linaro.org>
6097 Pedro Alves <palves@redhat.com>
6098
6099 * regcache.c (regcache::regcache): New tag dispatch ctor.
6100 (do_cooked_read): Moved above.
6101 (regcache_dup): Use the tag dispatch ctor..
6102 * regcache.h (regcache): Declare ctor, delete copy ctor and
6103 assignment operator, remove friend regcache_dup.
6104
6105 2017-04-28 Yao Qi <yao.qi@linaro.org>
6106
6107 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
6108 call method save instead of regcache_cpy.
6109 * regcache.h (struct regcache): Make regcache_dup a friend.
6110
6111 2017-04-28 Yao Qi <yao.qi@linaro.org>
6112
6113 * regcache.c (struct regcache): Move to regcache.h
6114 (regcache::arch): New method.
6115 (regcache_get_ptid): Update.
6116 (get_regcache_arch): Call arch method.
6117 (get_regcache_aspace): Call method aspace.
6118 (register_buffer): Change it to method.
6119 (regcache_save): Change it to regcache::save.
6120 (regcache_restore): Likewise.
6121 (regcache_cpy_no_passthrough): Remove the declaration.
6122 (regcache_cpy): Call methods restore and cpy_no_passthrough.
6123 (regcache_cpy_no_passthrough): Change it to method
6124 cpy_no_passthrough.
6125 (regcache_register_status): Change it to method
6126 get_register_status.
6127 (regcache_invalidate): Change it to method invalidate.
6128 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
6129 (regcache_raw_update): Change it to method raw_update.
6130 (regcache_raw_read): Likewise.
6131 (regcache_raw_read_signed): Likewise.
6132 (regcache_raw_read_unsigned): Likewise.
6133 (regcache_raw_write_signed): Likewise.
6134 (regcache_raw_write_unsigned): Likewise.
6135 (regcache_cooked_read): Likewise.
6136 (regcache_cooked_read_value): Likewise.
6137 (regcache_cooked_read_signed): Likewise.
6138 (regcache_cooked_read_unsigned): Likewise.
6139 (regcache_cooked_write_signed): Likewise.
6140 (regcache_cooked_write_unsigned): Likewise.
6141 (regcache_raw_set_cached_value): Likewise.
6142 (regcache_raw_write): Likewise.
6143 (regcache_cooked_write): Likewise.
6144 (regcache_xfer_part): Likewise.
6145 (regcache_raw_read_part): Likewise.
6146 (regcache_raw_write_part): Likewise.
6147 (regcache_cooked_read_part): Likewise.
6148 (regcache_cooked_write_part): Likewise.
6149 (regcache_raw_supply): Likewise.
6150 (regcache_raw_collect): Likewise.
6151 (regcache_transfer_regset): Likewise.
6152 (regcache_supply_regset): Likewise.
6153 (regcache_collect_regset): Likewise.
6154 (regcache_debug_print_register): Likewise.
6155 (enum regcache_dump_what): Move it to regcache.h.
6156 (regcache_dump): Change it to method dump.
6157 * regcache.h (enum regcache_dump_what): New.
6158 (class regcache): New.
6159 * target.c (target_fetch_registers): Call method
6160 debug_print_register.
6161 (target_store_registers): Likewise.
6162
6163 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6164
6165 * windows-nat.c (struct lm_info_windows): Initialize field.
6166 (windows_make_so): Allocate lm_info_windows with new.
6167 (windows_free_so): Free lm_info_windows with delete.
6168
6169 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6170
6171 * solib-darwin.c (struct lm_info_darwin): Initialize field.
6172 (darwin_current_sos): Allocate lm_info_darwin with new, remove
6173 cleanup.
6174 (darwin_free_so): Free lm_info_darwin with delete.
6175
6176 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6177
6178 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
6179 <l_addr_p>: Change type to bool.
6180 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
6181 (svr4_free_so): Free lm_info_svr4 with delete.
6182 (svr4_copy_library_list): Replace memcpy with call to copy
6183 constructor.
6184 (library_list_start_library, svr4_default_sos): Allocate
6185 lm_info_svr4 with new.
6186
6187 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6188
6189 * solib-target.c (struct lm_info_target): Add destructor,
6190 initialize fields.
6191 <name>: Change type to std::string.
6192 (library_list_start_library): Allocate lm_info_target with new.
6193 (solib_target_free_library_list): Free lm_info_target with
6194 delete.
6195 (solib_target_current_sos): Adapt to std::string.
6196 (solib_target_free_so): Free lm_info_target with delete.
6197
6198 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6199
6200 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
6201 fields.
6202 (frv_current_sos): Allocate lm_info_frv with new.
6203 (frv_relocate_main_executable): Free lm_info_frv with delete,
6204 allocate with new.
6205 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
6206
6207 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6208
6209 * solib-frv.c (struct lm_info_frv): Fix indentation.
6210
6211 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6212
6213 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
6214 map field.
6215 (dsbt_current_sos): Allocate lm_info_dsbt with new.
6216 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
6217 and allocate with new.
6218 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
6219
6220 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6221
6222 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
6223 <filename, member_name>: Change type to std::string.
6224 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
6225 (library_list_start_library): Allocate lm_info_aix with new.
6226 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
6227 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
6228 with copy constructor.
6229
6230 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6231
6232 * solist.h (struct lm_info): Remove.
6233 (struct lm_info_base): New class.
6234 (struct so_list) <lm_info>: Change type to lm_info_base *.
6235 * nto-tdep.c (struct lm_info): Remove.
6236 (lm_addr): Adjust.
6237 * solib-aix.c (struct lm_info): Rename to ...
6238 (struct lm_info_aix): ... this. Extend lm_info_base.
6239 (lm_info_p): Rename to ...
6240 (lm_info_aix_p): ... this, and adjust.
6241 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
6242 solib_aix_parse_libraries, library_list_start_library,
6243 solib_aix_free_library_list, solib_aix_parse_libraries,
6244 solib_aix_get_library_list,
6245 solib_aix_relocate_section_addresses, solib_aix_free_so,
6246 solib_aix_get_section_offsets,
6247 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
6248 Adjust.
6249 (struct solib_aix_inferior_data) <library_list>: Adjust.
6250 * solib-darwin.c (struct lm_info): Rename to ...
6251 (struct lm_info_darwin): ... this. Extend lm_info_base.
6252 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
6253 * solib-dsbt.c (struct lm_info): Rename to ...
6254 (struct lm_info_dsbt): ... this. Extend lm_info_base.
6255 (struct dsbt_info) <main_executable_lm_info): Adjust.
6256 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
6257 dsbt_relocate_section_addresses): Adjust.
6258 * solib-frv.c (struct lm_info): Rename to ...
6259 (struct lm_info_frv): ... this. Extend lm_info_base.
6260 (main_executable_lm_info): Adjust.
6261 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
6262 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
6263 find_canonical_descriptor_in_load_object,
6264 frv_fdpic_find_canonical_descriptor): Adjust.
6265 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
6266 to lm_info_svr4.
6267 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
6268 svr4_clear_so, svr4_copy_library_list,
6269 library_list_start_library, svr4_default_sos, svr4_read_so_list,
6270 svr4_current_sos, svr4_fetch_objfile_link_map,
6271 solist_update_incremental): Adjust.
6272 * solib-svr4.h (struct lm_info_svr4): Move here from
6273 solib-svr4.c.
6274 * solib-target.c (struct lm_info): Rename to ...
6275 (struct lm_info_target): ... this. Extend lm_info_base.
6276 (lm_info_p): Rename to ...
6277 (lm_info_target_p): ... this.
6278 (solib_target_parse_libraries, library_list_start_segment,
6279 library_list_start_section, library_list_start_library,
6280 library_list_end_library, solib_target_free_library_list,
6281 solib_target_current_sos, solib_target_free_so,
6282 solib_target_relocate_section_addresses): Adjust.
6283 * windows-nat.c (struct lm_info): Rename to ...
6284 (struct lm_info_windows): ... this. Extend lm_info_base.
6285 (windows_make_so, handle_load_dll, handle_unload_dll,
6286 windows_xfer_shared_libraries): Adjust.
6287
6288 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6289
6290 * solib-darwin.c (struct darwin_so_list): Remove.
6291 (darwin_current_sos): Allocate an so_list object instead of a
6292 darwin_so_list, separately allocate an lm_info object.
6293 (darwin_free_so): Free lm_info.
6294
6295 2017-04-28 John Baldwin <jhb@FreeBSD.org>
6296
6297 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
6298 with fprintf_filtered.
6299
6300 2017-04-28 Yao Qi <yao.qi@linaro.org>
6301
6302 * regcache.c (regcache::regcache): New function.
6303 (regcache::~regcache): New function.
6304 (regcache_xmalloc_1): Remove.
6305 (regcache_xmalloc): Call new regcache.
6306 (regcache_xfree): Call delete regcache.
6307 (get_thread_arch_aspace_regcache): Call new regcache.
6308
6309 2017-04-28 Yao Qi <yao.qi@linaro.org>
6310
6311 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
6312 lwp instead of ptid_get_lwp.
6313
6314 2017-04-28 Yao Qi <yao.qi@linaro.org>
6315
6316 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
6317 lwp_info instead of getting from inferior_ptid.
6318
6319 2017-04-27 Keith Seitz <keiths@redhat.com>
6320
6321 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
6322 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
6323 (CV_CONVERSION_BADNESS): Define.
6324 (rank_one_type): Remove overly restrictive rvalue reference
6325 rank checks.
6326 Add cv-qualifier checks and subranks for type equality.
6327 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
6328 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
6329 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
6330
6331 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
6332
6333 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
6334 count when creating the object.
6335
6336 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
6337 Ulrich Weigand <uweigand@de.ibm.com>
6338
6339 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
6340 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
6341 is used in AIX.
6342 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
6343 (process_xcoff_symbol): Likewise.
6344 (scan_xcoff_symtab): Likewise.
6345
6346 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6347
6348 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
6349 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
6350 (ia64_access_reg): Use get_frame_register_unsigned.
6351 (ia64_access_rse_reg): Likewise.
6352 (ia64_libunwind_frame_prev_register): Likewise.
6353
6354 2017-04-26 Jiong Wang <jiong.wang@arm.com>
6355
6356 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
6357 * gdbarch.c: Regenerated.
6358 * gdbarch.h: Regenerated.
6359 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
6360 visibility external.
6361 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
6362 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
6363 (enum cfa_how_kind): Move to ...
6364 (struct dwarf2_frame_state_reg_info): Likewise.
6365 (struct dwarf2_frame_state): Likewise.
6366 * dwarf2-frame.h: ... here.
6367 (dwarf2_frame_state_alloc_regs): New declaration.
6368 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
6369 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
6370
6371 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6372
6373 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
6374 regcache_raw_read_unsigned.
6375 (xtensa_pseudo_register_write): Likewise.
6376
6377 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6378
6379 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
6380 (nds32_pseudo_register_write): Likewise.
6381
6382 2017-04-25 Yao Qi <yao.qi@linaro.org>
6383
6384 * regcache.c (struct regcache) <readonly_p>: Change its type
6385 to bool.
6386 (regcache_xmalloc_1): Update parameter type and callers update.
6387
6388 2017-04-25 Yao Qi <yao.qi@linaro.org>
6389
6390 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
6391 set_gdbarch_wchar_bit.
6392 * arm-tdep.c (arm_gdbarch_init): Likewise.
6393
6394 2017-04-25 Pedro Alves <palves@redhat.com>
6395
6396 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
6397 (BothAreRelocatable, memcopy, memmove): Don't define.
6398 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
6399 macros.
6400
6401 2017-04-25 Pedro Alves <palves@redhat.com>
6402
6403 * common/common-defs.h: Include "common/poison.h".
6404 * common/function-view.h: (Not, Or, Requires): Move to traits.h
6405 and adjust.
6406 * common/poison.h: New file.
6407 * common/traits.h: Include <type_traits>.
6408 (Not, Or, Requires): New, moved from common/function-view.h.
6409
6410 2017-04-25 Pedro Alves <palves@redhat.com>
6411
6412 * breakpoint.h (struct breakpoint): In-class initialize all
6413 fields. Make boolean fields "bool".
6414 * breakpoint.c (init_raw_breakpoint_without_location): Remove
6415 memset call and initializations no longer necessary.
6416
6417 2017-04-25 Pedro Alves <palves@redhat.com>
6418
6419 * btrace.c (pt_btrace_insn_flags): Change parameter type to
6420 reference.
6421 (pt_btrace_insn): New function.
6422 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
6423
6424 2017-04-25 Pedro Alves <palves@redhat.com>
6425
6426 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
6427 "base" field and inherit from "bp_location" instead. Add
6428 non-default ctor.
6429 (allocate_location_exception): Use new non-default ctor.
6430 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
6431 (init_bp_location): Convert to ...
6432 (bp_location::bp_location): ... this new ctor, and remove memset
6433 call.
6434 (base_breakpoint_allocate_location): Use the new non-default ctor.
6435 * breakpoint.h (bp_location): Now a class. Declare default and
6436 non-default ctors. In-class initialize all members.
6437 (init_bp_location): Remove declaration.
6438
6439 2017-04-25 Pedro Alves <palves@redhat.com>
6440
6441 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
6442 assignment operator.
6443
6444 2017-04-24 Yao Qi <yao.qi@linaro.org>
6445
6446 * doublest.c (convert_doublest_to_floatformat): Call
6447 floatformat_totalsize_bytes.
6448
6449 2017-04-22 Tom Tromey <tom@tromey.com>
6450
6451 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6452 ui_out_emit_list.
6453 * stack.c (print_frame): Use ui_out_emit_list.
6454 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6455 ui_out_emit_list.
6456 * mi/mi-main.c (print_one_inferior)
6457 (mi_cmd_data_list_register_names)
6458 (mi_cmd_data_list_register_values, mi_cmd_list_features)
6459 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
6460 ui_out_emit_list.
6461 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
6462 (mi_output_solib_attribs): Use ui_out_emit_list,
6463 ui_out_emit_tuple.
6464 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
6465 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
6466 (mi_cmd_stack_list_args, list_args_or_locals): Use
6467 ui_out_emit_list.
6468 * disasm.c (do_assembly_only): Use ui_out_emit_list.
6469 * breakpoint.c (print_solib_event, output_thread_groups): Use
6470 ui_out_emit_list.
6471
6472 2017-04-22 Tom Tromey <tom@tromey.com>
6473
6474 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
6475 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
6476 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
6477
6478 2017-04-22 Tom Tromey <tom@tromey.com>
6479
6480 * tracepoint.c (tvariables_info_1)
6481 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
6482
6483 2017-04-22 Tom Tromey <tom@tromey.com>
6484
6485 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
6486 annotate_arg_emitter.
6487 * breakpoint.c (print_mention_watchpoint)
6488 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
6489 * annotate.h (struct annotate_arg_emitter): New.
6490
6491 2017-04-22 Tom Tromey <tom@tromey.com>
6492
6493 * record-btrace.c (record_btrace_insn_history)
6494 (record_btrace_insn_history_range, record_btrace_call_history)
6495 (record_btrace_call_history_range): Use ui_out_emit_tuple.
6496 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
6497 ui_out_emit_tuple.
6498 * stack.c (print_frame_info): Use ui_out_emit_tuple.
6499 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
6500 * skip.c (skip_info): Use ui_out_emit_tuple.
6501 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
6502 * progspace.c (print_program_space): Use ui_out_emit_tuple.
6503 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
6504 * osdata.c (info_osdata): Use ui_out_emit_tuple.
6505 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6506 ui_out_emit_tuple.
6507 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
6508 (output_register, mi_cmd_data_read_memory)
6509 (mi_cmd_data_read_memory_bytes, mi_load_progress)
6510 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
6511 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
6512 Use ui_out_emit_tuple.
6513 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
6514 ui_out_emit_tuple.
6515 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
6516 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
6517 * linux-thread-db.c (info_auto_load_libthread_db): Use
6518 ui_out_emit_tuple.
6519 * inferior.c (print_inferior): Use ui_out_emit_tuple.
6520 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
6521 * disasm.c (do_mixed_source_and_assembly_deprecated)
6522 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
6523 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
6524 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
6525 * breakpoint.c (print_one_breakpoint_location)
6526 (print_one_breakpoint): Use ui_out_emit_tuple.
6527 * auto-load.c (print_script, info_auto_load_cmd): Use
6528 ui_out_emit_tuple.
6529 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
6530
6531 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
6532
6533 * thread.c (print_thread_info_1): Remove dead code.
6534
6535 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6536
6537 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
6538 GDB_SELF_TEST.
6539 * arm-tdep.c (selftests::arm_record_test): Likewise.
6540
6541 2017-04-21 Yao Qi <yao.qi@linaro.org>
6542
6543 * regcache.c (regcache_restore): Remove argument 2. Replace
6544 argument 3 with regcache. Get register status from
6545 src->register_status and get register contents from
6546 register_buffer (src, regnum).
6547 (regcache_cpy): Update.
6548
6549 2017-04-19 Pedro Alves <palves@redhat.com>
6550
6551 * gdbthread.h (thread): Add missing closing parenthesis in
6552 comment.
6553
6554 2017-04-19 Pedro Alves <palves@redhat.com>
6555
6556 * common/refcounted-object.h: New file.
6557 * gdbthread.h: Include "common/refcounted-object.h".
6558 (thread_info): Inherit from refcounted_object and add comments.
6559 (thread_info::incref, thread_info::decref)
6560 (thread_info::m_refcount): Delete.
6561 (thread_info::deletable): Use the refcounted_object::refcount()
6562 method.
6563 * inferior.c (current_inferior_): Add comment.
6564 (set_current_inferior): Increment/decrement refcounts.
6565 (prune_inferiors, remove_inferior_command): Skip inferiors marked
6566 not-deletable instead of comparing with the current inferior.
6567 (initialize_inferiors): Increment the initial inferior's refcount.
6568 * inferior.h (struct inferior): Forward declare.
6569 Include "common/refcounted-object.h".
6570 (current_inferior, set_current_inferior): Move declaration to
6571 before struct inferior's definition, and fix comment.
6572 (inferior): Inherit from refcounted_object. Add comments.
6573 * thread.c (switch_to_thread_no_regs): Reference the thread's
6574 inferior pointer directly instead of doing a ptid lookup.
6575 (switch_to_no_thread): New function.
6576 (switch_to_thread(thread_info *)): New function, factored out
6577 from ...
6578 (switch_to_thread(ptid_t)): ... this.
6579 (restore_current_thread): Delete.
6580 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
6581 fields, and add 'inf' field.
6582 (do_restore_current_thread_cleanup): Check whether old->inf is
6583 alive instead of looking up an inferior by ptid. Use
6584 switch_to_thread and switch_to_no_thread.
6585 (restore_current_thread_cleanup_dtor): Use old->inf directly
6586 instead of lookup up an inferior by id. Decref the inferior.
6587 Don't restore 'removable'.
6588 (make_cleanup_restore_current_thread): Same the inferior pointer
6589 in old, instead of the inferior number. Incref the inferior.
6590 Don't save/clear 'removable'.
6591
6592 2017-04-19 Pedro Alves <palves@redhat.com>
6593
6594 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6595 unittests/scoped_restore-selftests.c.
6596 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
6597 * common/scoped_restore.h (scoped_restore_base): Make "class".
6598 (scoped_restore_base::release): New public method.
6599 (scoped_restore_base::scoped_restore_base): New protected ctor.
6600 (scoped_restore_base::m_saved_var): New protected field.
6601 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
6602 scoped_restore_base base class instead of m_saved_var directly.
6603 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
6604 (scoped_restore_tmpl::scoped_restore_tmpl(const
6605 scoped_restore_tmpl<T>&)): Likewise.
6606 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
6607 method.
6608 (scoped_restore_tmpl::saved_var): New method.
6609 (scoped_restore_tmpl::m_saved_var): Delete.
6610 * inferior.h (inferior::detaching): Now a bool.
6611 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
6612 cleanup.
6613 * unittests/scoped_restore-selftests.c: New file.
6614
6615 2017-04-19 Pedro Alves <palves@redhat.com>
6616
6617 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
6618 Re-sort in alphabetic order.
6619
6620 2017-04-18 Pedro Alves <palves@redhat.com>
6621
6622 * xml-support.c (obstack_xml_printf): Delete.
6623 * xml-support.h (obstack_xml_printf): Delete.
6624
6625 2017-04-18 Pedro Alves <palves@redhat.com>
6626
6627 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
6628 vdebug, verror, body_text, start_element, end_element, name,
6629 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
6630 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
6631 is_xinclude>: Make private and add m_ prefix.
6632 (gdb_xml_parser::body_text): New method, based on ...
6633 (gdb_xml_body_text): ... this. Adjust.
6634 (gdb_xml_parser::vdebug): New method, based on ...
6635 (gdb_xml_debug): ... this. Adjust.
6636 (gdb_xml_parser::verror): New method, based on ...
6637 (gdb_xml_error): ... this. Adjust.
6638 (gdb_xml_parser::start_element): New method, based on ...
6639 (gdb_xml_start_element): ... this. Adjust.
6640 (gdb_xml_start_element_wrapper): Defer to
6641 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
6642 (gdb_xml_parser::end_element): New method, based on ...
6643 (gdb_xml_end_element_wrapper): ... this. Adjust.
6644 (gdb_xml_parser::~gdb_xml_parser): Adjust.
6645 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
6646 (gdb_xml_parser::use_dtd): New method, based on ...
6647 (gdb_xml_use_dtd): ... this. Adjust.
6648 (gdb_xml_parser::parse): New method, based on ...
6649 (gdb_xml_parse): ... this. Adjust.
6650 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
6651 (xinclude_start_include): Adjust to call the parser's name method.
6652 (xml_xinclude_default, xml_xinclude_start_doctype)
6653 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
6654 method.
6655 (xml_process_xincludes): Adjust to call parser methods.
6656 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
6657 declarations.
6658
6659 2017-04-18 Pedro Alves <palves@redhat.com>
6660
6661 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
6662 gdb::optional<std::string>.
6663 * xml-support.c: Include <string>.
6664 (scope_level::scope_level(scope_level &&))
6665 (scope_level::~scope_level): Delete.
6666 (scope_level::body): Now a std::string.
6667 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
6668 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
6669 parameter.
6670 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
6671 (xinclude_parsing_data::output): Now a std::string reference.
6672 (xinclude_start_include): Adjust.
6673 (xml_xinclude_default): Adjust.
6674 (xml_process_xincludes): Add 'output' parameter, and return bool.
6675 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
6676 and return bool.
6677 * xml-tdesc.c: Include <unordered_map> and <string>.
6678 (tdesc_xml_cache): Delete.
6679 (tdesc_xml_cache_s): Delete.
6680 (xml_cache): Now an std::unordered_map.
6681 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
6682 (target_fetch_description_xml): Change return type to
6683 gdb::optional<std::string>, and adjust.
6684 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
6685 (target_fetch_description_xml): Change return type to
6686 gdb::optional<std::string>.
6687
6688 2017-04-18 Pedro Alves <palves@redhat.com>
6689
6690 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6691 unittests/optional-selftests.c.
6692 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
6693 * unittests/optional-selftests.c: New file.
6694 * unittests/optional/assignment/1.cc: New file.
6695 * unittests/optional/assignment/2.cc: New file.
6696 * unittests/optional/assignment/3.cc: New file.
6697 * unittests/optional/assignment/4.cc: New file.
6698 * unittests/optional/assignment/5.cc: New file.
6699 * unittests/optional/assignment/6.cc: New file.
6700 * unittests/optional/assignment/7.cc: New file.
6701 * unittests/optional/cons/copy.cc: New file.
6702 * unittests/optional/cons/default.cc: New file.
6703 * unittests/optional/cons/move.cc: New file.
6704 * unittests/optional/cons/value.cc: New file.
6705 * unittests/optional/in_place.cc: New file.
6706 * unittests/optional/observers/1.cc: New file.
6707 * unittests/optional/observers/2.cc: New file.
6708
6709 2017-04-18 Pedro Alves <palves@redhat.com>
6710
6711 * common/gdb_optional.h: Include common/traits.h.
6712 (in_place_t): New type.
6713 (in_place): New constexpr variable.
6714 (optional::optional): Remove member initialization of
6715 m_instantiated.
6716 (optional::optional(in_place_t...)): New constructor.
6717 (optional::~optional): Use reset.
6718 (optional::optional(const optional&)): New.
6719 (optional::optional(const optional&&)): New.
6720 (optional::optional(T &)): New.
6721 (optional::optional(T &&)): New.
6722 (operator::operator=(const optional &)): New.
6723 (operator::operator=(optional &&)): New.
6724 (operator::operator= (const T &))
6725 (operator::operator= (T &&))
6726 (operator::emplace (Args &&... args)): Return a T&. Use reset.
6727 (operator::reset): New.
6728 (operator::m_instantiated):: Add in-class initializer.
6729 * common/traits.h: Include <type_traits>.
6730 (struct And): New types.
6731
6732 2017-04-18 Pedro Alves <palves@redhat.com>
6733
6734 * xml-support.c: Include <vector>.
6735 (scope_level::scope_level(const gdb_xml_element *))
6736 (scope_level::scope_level(scope_level&&)): New.
6737 (scope_level::~scope_level): New.
6738 (scope_level_s): Delete.
6739 (gdb_xml_parser::scopes): Now a std::vector.
6740 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
6741 Use std::vector.
6742 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
6743 scope cleanup code.
6744 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
6745 of the scopes member. Use std::vector::emplace_back.
6746
6747 2017-04-18 Pedro Alves <palves@redhat.com>
6748
6749 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
6750 a bool.
6751 (gdb_xml_end_element): Change type of first parameter.
6752 (gdb_xml_cleanup): Rename to ...
6753 (gdb_xml_parser::~gdb_xml_parser): ... this.
6754 (gdb_xml_create_parser_and_cleanup): Delete with ...
6755 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
6756 to this new ctor.
6757 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
6758 using gdb_xml_create_parser_and_cleanup.
6759 (xinclude_parsing_data): Add ctor/dtor.
6760 (xml_xinclude_cleanup): Delete.
6761 (xml_process_xincludes): Create a local xinclude_parsing_data
6762 instead of heap-allocating one. Create a local gdb_xml_parser
6763 instead of heap-allocating one with
6764 gdb_xml_create_parser_and_cleanup.
6765
6766 2017-04-18 John Baldwin <jhb@FreeBSD.org>
6767
6768 PR threads/20743
6769 * fbsd-nat.c (resume_one_thread_cb): Remove.
6770 (resume_all_threads_cb): Remove.
6771 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
6772 iterate_over_threads.
6773
6774 2017-04-17 Joel Brobecker <brobecker@adacore.com>
6775
6776 * NEWS: Create a new section for the next release branch.
6777 Rename the section of the current branch, now that it has
6778 been cut.
6779
6780 2017-04-17 Joel Brobecker <brobecker@adacore.com>
6781
6782 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
6783 * version.in: Bump version to 8.0.50.DATE-git.
6784
6785 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
6786
6787 PR gdb/21385
6788 * windows-nat.c (windows_create_inferior): Declare 'allargs'
6789 independently of the host, and fix build breakage on Cygwin.
6790
6791 2017-04-13 Pedro Alves <palves@redhat.com>
6792
6793 * inferior.c (free_inferior): Convert to ...
6794 (inferior::~inferior): ... this dtor.
6795 (inferior::inferior): New ctor, factored out from ...
6796 (add_inferior_silent): ... here. Allocate the inferior with a new
6797 expression.
6798 (delete_inferior): Call delete instead of free_inferior.
6799 * inferior.h (gdb_environ, continuation): Forward declare.
6800 (inferior): Now a class. Add in-class initialization to all
6801 members. Make boolean fields bool, except 'detaching'.
6802 (inferior::inferior): New explicit ctor.
6803 (inferior::~inferior): New.
6804
6805 2017-04-13 Pedro Alves <palves@redhat.com>
6806
6807 * inferior.c (init_inferior_list): Delete.
6808 * inferior.h (init_inferior_list): Delete.
6809
6810 2017-04-13 Pedro Alves <palves@redhat.com>
6811
6812 PR threads/13217
6813 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
6814 (top level): Call it twice, with different thread sets.
6815
6816 2017-04-13 Pedro Alves <palves@redhat.com>
6817
6818 * thread.c: Include <algorithm>.
6819 (thread_array_cleanup): Delete.
6820 (scoped_inc_dec_ref): New class.
6821 (live_threads_count): New function.
6822 (set_thread_refcount): Delete.
6823 (tp_array_compar_ascending): Now a bool.
6824 (tp_array_compar): Convert to a std::sort comparison function.
6825 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
6826 and live_threads_count.
6827
6828 2017-04-13 Pedro Alves <palves@redhat.com>
6829
6830 * infrun.c (follow_fork_inferior): Also switch the current
6831 inferior.
6832
6833 2017-04-13 Pedro Alves <palves@redhat.com>
6834
6835 * breakpoint.c (watch_command_1): Save watchpoint-frame info
6836 before calling create_internal_breakpoint.
6837
6838 2017-04-13 Pedro Alves <palves@redhat.com>
6839
6840 * fork-child.c (execv_argv): New class.
6841 (breakup_args): Refactored as ...
6842 (execv_argv::init_for_no_shell): .. this method of execv_argv.
6843 Copy arguments to storage and replace separators with NULL
6844 terminators in place.
6845 (escape_bang_in_quoted_argument): Adjust to return bool.
6846 (execv_argv::execv_argv): New ctor.
6847 (execv_argv::init_for_shell): New method, factored out from
6848 fork_inferior. Don't strdup strings into the vector.
6849 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
6850 Remove free_vector_argv call.
6851
6852 2017-04-13 Yao Qi <yao.qi@linaro.org>
6853
6854 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
6855 tdep->rx_psw_type.
6856
6857 2017-04-13 Yao Qi <yao.qi@linaro.org>
6858
6859 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
6860 * rx-tdep.c (rx_gdbarch_init): Likewise.
6861
6862 2017-04-13 Pedro Alves <palves@redhat.com>
6863
6864 * breakpoint.h (struct breakpoint): Reindent.
6865
6866 2017-04-13 Pedro Alves <palves@redhat.com>
6867
6868 * breakpoint.c (bp_location): Rename to ...
6869 (bp_locations): ... this. All references updated.
6870 (bp_location_count): Rename to ...
6871 (bp_locations_count): ... this. All references updated.
6872 (bp_location_placed_address_before_address_max): Rename to ...
6873 (bp_locations_placed_address_before_address_max): ... this. All
6874 references updated.
6875 (bp_location_shadow_len_after_address_max): Rename to ...
6876 (bp_locations_shadow_len_after_address_max): ... this. All
6877 references updated.
6878 (bp_location_compare_addrs): Rename to ...
6879 (bp_locations_compare_addrs): ... this. All references updated.
6880 (bp_location_compare):Rename to ...
6881 (bp_locations_compare): ... this. All references updated.
6882 (bp_location_target_extensions_update): Rename to ...
6883 (bp_locations_target_extensions_update): ... this. All references
6884 updated.
6885
6886 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6887
6888 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
6889 * common/common.m4: Check headers 'termios.h', 'termio.h' and
6890 'sgtty.h'.
6891 * common/gdb_termios.h: New file, with parts of "terminal.h".
6892 * inflow.c: Include "gdb_termios.h".
6893 * ser-unix.c: Include "gdb_termios.h".
6894 * terminal.h: Move terminal-related defines to
6895 "common/gdb_termios.h".
6896
6897 2017-04-12 Tom Tromey <tom@tromey.com>
6898
6899 * probe.c (parse_probes): Update.
6900 * location.h (delete_event_location): Don't declare.
6901 (event_location_deleter::operator()): Update.
6902 * location.c (event_location_deleter::operator()): Rename from
6903 delete_event_location.
6904 * linespec.h (linespec_result) <location>: Change type to
6905 event_location_up.
6906 * linespec.c (canonicalize_linespec, event_location_to_sals)
6907 (decode_objc): Update.
6908 (linespec_result): Don't call delete_event_location.
6909 * breakpoint.c (create_breakpoints_sal)
6910 (bkpt_probe_create_sals_from_location)
6911 (strace_marker_create_sals_from_location): Update.
6912
6913 2017-04-12 Tom Tromey <tom@tromey.com>
6914
6915 * linespec.h (struct linespec_result): Add constructor and
6916 destructor.
6917 (init_linespec_result, destroy_linespec_result)
6918 (make_cleanup_destroy_linespec_result): Don't declare.
6919 * linespec.c (init_linespec_result): Remove.
6920 (linespec_result::~linespec_result): Rename from
6921 destroy_linespec_result. Update.
6922 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
6923 Remove.
6924 * breakpoint.c (create_breakpoint, break_range_command)
6925 (decode_location_default): Update.
6926 * ax-gdb.c (agent_command_1): Update.
6927
6928 2017-04-12 Tom Tromey <tom@tromey.com>
6929
6930 * remote.c (remote_download_tracepoint): Update.
6931 * python/py-breakpoint.c (bppy_get_location): Update.
6932 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
6933 (gdbscm_breakpoint_location): Update.
6934 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
6935 * breakpoint.h (struct breakpoint) <location, location_range_end>:
6936 Change type to event_location_up.
6937 * breakpoint.c (create_overlay_event_breakpoint)
6938 (create_longjmp_master_breakpoint)
6939 (create_std_terminate_master_breakpoint)
6940 (create_exception_master_breakpoint)
6941 (breakpoint_event_location_empty_p, print_breakpoint_location)
6942 (print_one_breakpoint_location, create_thread_event_breakpoint)
6943 (init_breakpoint_sal, create_breakpoint)
6944 (print_recreate_ranged_breakpoint, break_range_command)
6945 (init_ada_exception_breakpoint, say_where): Update.
6946 (base_breakpoint_dtor): Don't call delete_event_location.
6947 (bkpt_print_recreate, tracepoint_print_recreate)
6948 (dprintf_print_recreate, update_static_tracepoint)
6949 (breakpoint_re_set_default): Update.
6950
6951 2017-04-12 Tom Tromey <tom@tromey.com>
6952
6953 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
6954 type of "to_do". Update.
6955 (compute_stack_depth): Use std::vector.
6956
6957 2017-04-12 Tom Tromey <tom@tromey.com>
6958
6959 * printcmd.c (find_instruction_backward): Use std::vector.
6960
6961 2017-04-12 Tom Tromey <tom@tromey.com>
6962
6963 * symfile.c (objfilep): Remove typedef.
6964 (reread_symbols): Use a std::vector.
6965
6966 2017-04-12 Tom Tromey <tom@tromey.com>
6967
6968 * mi/mi-main.c (exec_direction_forward): Remove.
6969 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
6970 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6971 scoped_restore.
6972 * guile/guile.c (guile_repl_command, guile_command)
6973 (gdbscm_execute_gdb_command): Use scoped_restore.
6974 * go-exp.y (go_parse): Use scoped_restore.
6975 * d-exp.y (d_parse): Use scoped_restore.
6976 * cli/cli-decode.c (cmd_func): Use scoped_restore.
6977 * c-exp.y (c_parse): Use scoped_restore.
6978
6979 2017-04-12 Tom Tromey <tom@tromey.com>
6980
6981 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
6982 (mi_parse): Update return type.
6983 (mi_parse_free): Remove.
6984 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
6985 (mi_parse::~mi_parse): Rename from mi_parse_free.
6986 (mi_parse_cleanup): Remove.
6987 (mi_parse): Return a unique_ptr. Use new.
6988 * mi/mi-main.c (mi_execute_command): Update.
6989
6990 2017-04-12 Tom Tromey <tom@tromey.com>
6991
6992 * location.c (explicit_location_lex_one): Return a
6993 unique_xmalloc_ptr.
6994 (string_to_explicit_location): Update. Remove cleanups.
6995
6996 2017-04-12 Tom Tromey <tom@tromey.com>
6997
6998 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
6999 (compare_value_and_voffset): Change type. Update.
7000 (compute_vtable_size): Change type of "offset_vec".
7001 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
7002 (gnuv3_get_typeid): Remove extraneous declaration.
7003
7004 2017-04-12 Tom Tromey <tom@tromey.com>
7005
7006 * charset.h (wchar_iterator): Fix comment.
7007
7008 2017-04-12 Tom Tromey <tom@tromey.com>
7009
7010 * charset.c (iconv_wrapper): New class.
7011 (cleanup_iconv): Remove.
7012 (convert_between_encodings): Use it.
7013
7014 2017-04-12 Tom Tromey <tom@tromey.com>
7015
7016 * symfile.h (increment_reading_symtab): Update type.
7017 * symfile.c (decrement_reading_symtab): Remove.
7018 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
7019 * psymtab.c (psymtab_to_symtab): Update.
7020 * dwarf2read.c (dw2_instantiate_symtab): Update.
7021
7022 2017-04-12 Tom Tromey <tom@tromey.com>
7023
7024 * jit.c (struct jit_reader): Declare separately. Add constructor
7025 and destructor. Change type of "handle".
7026 (loaded_jit_reader): Define separately.
7027 (jit_reader_load): Update. New "new".
7028 (jit_reader_unload_command): Use "delete".
7029 * gdb-dlfcn.h (struct dlclose_deleter): New.
7030 (gdb_dlhandle_up): New typedef.
7031 (gdb_dlopen, gdb_dlsym): Update types.
7032 (gdb_dlclose): Remove.
7033 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
7034 (gdb_dlsym): Change type of "handle".
7035 (make_cleanup_dlclose): Remove.
7036 (dlclose_deleter::operator()): Rename from gdb_dlclose.
7037 * compile/compile-c-support.c (load_libcc): Update.
7038
7039 2017-04-12 Tom Tromey <tom@tromey.com>
7040
7041 * symtab.h (find_pcs_for_symtab_line): Change return type.
7042 * symtab.c (find_pcs_for_symtab_line): Change return type.
7043 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
7044 type of "vec". Update.
7045 (ltpy_get_pcs_for_line): Update.
7046 * linespec.c (decode_digits_ordinary): Update.
7047
7048 2017-04-12 Tom Tromey <tom@tromey.com>
7049
7050 * tracepoint.c (actions_command): Update.
7051 * python/python.c (python_command, python_interactive_command):
7052 Update.
7053 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7054 * guile/guile.c (guile_command): Update.
7055 * defs.h (read_command_lines, read_command_lines_1): Return
7056 command_line_up.
7057 (command_lines_deleter): New struct.
7058 (command_line_up): New typedef.
7059 * compile/compile.c (compile_code_command)
7060 (compile_print_command): Update.
7061 * cli/cli-script.h (get_command_line, copy_command_lines): Return
7062 command_line_up.
7063 (make_cleanup_free_command_lines): Remove.
7064 * cli/cli-script.c (get_command_line, read_command_lines_1)
7065 (copy_command_lines): Return command_line_up.
7066 (while_command, if_command, read_command_lines, define_command)
7067 (document_command): Update.
7068 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
7069 Remove.
7070 * breakpoint.h (breakpoint_set_commands): Change type of
7071 "commands".
7072 * breakpoint.c (breakpoint_set_commands): Change type of
7073 "commands". Update.
7074 (do_map_commands_command, update_dprintf_command_list)
7075 (create_tracepoint_from_upload): Update.
7076
7077 2017-04-12 Tom Tromey <tom@tromey.com>
7078
7079 * tracepoint.c (scope_info): Update.
7080 * spu-tdep.c (spu_catch_start): Update.
7081 * python/python.c (gdbpy_decode_line): Update.
7082 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
7083 * python/py-breakpoint.c (bppy_init): Update.
7084 * probe.c (parse_probes): Update.
7085 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
7086 * location.h (event_location_deleter): New struct.
7087 (event_location_up): New typedef.
7088 (new_linespec_location, new_address_location, new_probe_location)
7089 (new_explicit_location, copy_event_location)
7090 (string_to_event_location, string_to_event_location_basic)
7091 (string_to_explicit_location): Update return type.
7092 (make_cleanup_delete_event_location): Remove.
7093 * location.c (new_linespec_location, new_address_location)
7094 (new_probe_location, new_explicit_location, copy_event_location):
7095 Return event_location_up.
7096 (delete_event_location_cleanup)
7097 (make_cleanup_delete_event_location): Remove.
7098 (string_to_explicit_location, string_to_event_location_basic)
7099 (string_to_event_location): Return event_location_up.
7100 * linespec.c (canonicalize_linespec, event_location_to_sals)
7101 (decode_line_with_current_source)
7102 (decode_line_with_last_displayed, decode_objc): Update.
7103 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
7104 * completer.c (location_completer): Update.
7105 * cli/cli-cmds.c (edit_command, list_command): Update.
7106 * breakpoint.c (create_overlay_event_breakpoint)
7107 (create_longjmp_master_breakpoint)
7108 (create_std_terminate_master_breakpoint)
7109 (create_exception_master_breakpoint)
7110 (create_thread_event_breakpoint): Update.
7111 (init_breakpoint_sal): Update. Remove some dead code.
7112 (create_breakpoint_sal): Change type of "location". Update.
7113 (create_breakpoints_sal, create_breakpoint, break_command_1)
7114 (dprintf_command, break_range_command, until_break_command)
7115 (init_ada_exception_breakpoint)
7116 (strace_marker_create_sals_from_location)
7117 (update_static_tracepoint, trace_command, ftrace_command)
7118 (strace_command, create_tracepoint_from_upload): Update.
7119 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7120 * ax-gdb.c (agent_command_1): Update.
7121
7122 2017-04-12 Pedro Alves <palves@redhat.com>
7123
7124 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
7125 * configure.tgt: Handle i[34567]86-*-go32* and
7126 i[34567]86-*-msdosdjgpp*.
7127 * i386-tdep.c (i386_svr4_reg_to_regnum):
7128 Make extern.
7129 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
7130 i386-go32-tdep.c.
7131 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
7132 * i386-go32-tdep.c: New file.
7133 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
7134 declarations.
7135
7136 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
7137
7138 * aix-thread.c (pd_status2str): Change return type to const char *.
7139
7140 2017-04-12 Pedro Alves <palves@redhat.com>
7141
7142 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
7143 calls to set_gdbarch_gnu_triplet_regexp.
7144
7145 2017-04-12 Pedro Alves <palves@redhat.com>
7146
7147 PR gdb/21323
7148 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
7149 New enum value.
7150 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
7151 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
7152 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
7153 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
7154 * gdbarch.h, gdbarch.c: Regenerate.
7155 * aarch64-tdep.c (aarch64_gdbarch_init): Override
7156 gdbarch_wchar_bit and gdbarch_wchar_signed.
7157 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
7158 * arm-tdep.c (arm_gdbarch_init): Likewise.
7159 * avr-tdep.c (avr_gdbarch_init): Likewise.
7160 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
7161 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
7162 * i386-tdep.c (i386_go32_init_abi): Likewise.
7163 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7164 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7165 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7166 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7167 * sh-tdep.c (sh_gdbarch_init): Likewise.
7168 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7169 * sparc64-tdep.c (sparc64_init_abi): Likewise.
7170 * windows-tdep.c (windows_init_abi): Likewise.
7171 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7172
7173 2017-04-12 Pedro Alves <palves@redhat.com>
7174
7175 PR c++/21323
7176 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
7177 cplus_primitive_type_char32_t>: New enum values.
7178 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
7179 and cplus_primitive_type_char32_t.
7180 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
7181 32, use the archtecture's built-in type for char16_t and char32_t,
7182 respectively. Otherwise, fallback to init_integer_type as before,
7183 but make the type unsigned, and issue a complaint.
7184 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
7185
7186 2017-04-12 Alan Hayward <alan.hayward@arm.com>
7187
7188 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
7189 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
7190
7191 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7192
7193 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
7194 'const char *'.
7195
7196 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7197
7198 * common/common-utils.c (free_vector_argv): New function.
7199 * common/common-utils.h: Include <vector>.
7200 (free_vector_argv): New prototype.
7201 * darwin-nat.c (darwin_create_inferior): Rewrite function
7202 prototype in order to constify "exec_file" and accept a
7203 "std::string" for "allargs".
7204 * fork-child.c: Include <vector>.
7205 (breakup_args): Rewrite function, using C++.
7206 (fork_inferior): Rewrite function header, constify "exec_file_arg"
7207 and accept "std::string" for "allargs". Update the code to
7208 calculate "argv" based on "allargs". Update calls to "exec_fun"
7209 and "execvp".
7210 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
7211 order to constify "exec_file" and accept a "std::string" for
7212 "allargs".
7213 * go32-nat.c (go32_create_inferior): Likewise.
7214 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
7215 * infcmd.c (run_command_1): Constify "exec_file". Use
7216 "std::string" for inferior arguments.
7217 * inferior.h (fork_inferior): Update prototype.
7218 * linux-nat.c (linux_nat_create_inferior): Rewrite function
7219 prototype in order to constify "exec_file" and accept a
7220 "std::string" for "allargs".
7221 * nto-procfs.c (procfs_create_inferior): Likewise.
7222 * procfs.c (procfs_create_inferior): Likewise.
7223 * remote-sim.c (gdbsim_create_inferior): Likewise.
7224 * remote.c (extended_remote_run): Update code to accept
7225 "std::string" as argument.
7226 (extended_remote_create_inferior): Rewrite function prototype in
7227 order to constify "exec_file" and accept a "std::string" for
7228 "allargs".
7229 * rs6000-nat.c (super_create_inferior): Likewise.
7230 (rs6000_create_inferior): Likewise.
7231 * target.h (struct target_ops) <to_create_inferior>: Likewise.
7232 * windows-nat.c (windows_create_inferior): Likewise.
7233
7234 2017-04-11 Pedro Alves <palves@redhat.com>
7235
7236 * thread.c: Fix whitespace throughout.
7237
7238 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
7239
7240 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
7241
7242 2017-04-11 Alan Hayward <alan.hayward@arm.com>
7243
7244 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
7245
7246 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
7247
7248 PR gdb/21364
7249 * osdata.c (info_osdata): Check if 'type' is an empty string
7250 instead of NULL.
7251
7252 2017-04-10 Pedro Alves <palves@redhat.com>
7253
7254 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
7255 (ptid_to_global_thread_id, in_thread_list)
7256 (do_captured_list_thread_ids, set_resumed, set_running)
7257 (set_executing, set_stop_requested, finish_thread_state)
7258 (validate_registers_access, can_access_registers_ptid)
7259 (print_thread_info_1, switch_to_thread)
7260 (do_restore_current_thread_cleanup)
7261 (make_cleanup_restore_current_thread, thread_command)
7262 (thread_name_command): Use operator== instead of ptid_equal.
7263
7264 2017-04-10 Pedro Alves <palves@redhat.com>
7265
7266 * thread.c (struct current_thread_cleanup) <next>: Delete field.
7267 (current_thread_cleanup_chain): Delete.
7268 (restore_current_thread_cleanup_dtor)
7269 (make_cleanup_restore_current_thread): Remove references to
7270 current_thread_cleanup_chain.
7271
7272 2017-04-10 Alan Hayward <alan.hayward@arm.com>
7273
7274 * msp430-tdep.c (msp430_pseudo_register_read): Never return
7275 REG_UNKNOWN.
7276
7277 2017-04-10 Yao Qi <yao.qi@linaro.org>
7278
7279 PR gdb/19942
7280 * gdbthread.h (thread_info::deletable): New method.
7281 (thread_info::incref): New method.
7282 (thread_info::decref): New method.
7283 (thread_info::refcount): Move it to private.
7284 * infrun.c (save_stop_context): Call inc_refcount.
7285 (release_stop_context_cleanup): Likewise.
7286 * thread.c (set_thread_exited): New function.
7287 (init_thread_list): Delete "tp" only it is deletable, otherwise
7288 call set_thread_exited.
7289 (delete_thread_1): Call set_thread_exited.
7290 (current_thread_cleanup) <inferior_pid>: Remove.
7291 <thread>: New field.
7292 (restore_current_thread_ptid_changed): Removed.
7293 (do_restore_current_thread_cleanup): Adjust.
7294 (restore_current_thread_cleanup_dtor): Don't call
7295 find_thread_ptid.
7296 (set_thread_refcount): Use dec_refcount.
7297 (make_cleanup_restore_current_thread): Adjust.
7298 (thread_apply_all_command): Call inc_refcount.
7299 (_initialize_thread): Don't call
7300 observer_attach_thread_ptid_changed.
7301
7302 2017-04-10 Yao Qi <yao.qi@linaro.org>
7303
7304 * thread.c (delete_thread_1): Hoist code on marking thread as
7305 exited.
7306
7307 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7308
7309 * windows-nat.c (windows_detach): Initialize ptid with
7310 minus_one_ptid.
7311
7312 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
7313
7314 * unittests/ptid-selftests.c: Fix erroneous assert messages.
7315
7316 2017-04-07 Alan Hayward <alan.hayward@arm.com>
7317
7318 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
7319 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
7320 (bfin_pseudo_register_write): Likewise
7321
7322 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7323
7324 * common/ptid.h (struct ptid): Change to...
7325 (class ptid_t): ... this.
7326 <ptid_t>: New constructors.
7327 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
7328 matches>: New methods.
7329 <make_null, make_minus_one>: New static methods.
7330 <pid>: Rename to...
7331 <m_pid>: ...this.
7332 <lwp>: Rename to...
7333 <m_lwp>: ...this.
7334 <tid>: Rename to...
7335 <m_tid>: ...this.
7336 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
7337 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
7338 as references, move comment to class ptid_t.
7339 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
7340 ptid_t static methods.
7341 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
7342 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
7343 Take ptid arguments as references, implement using ptid_t methods.
7344 * unittests/ptid-selftests.c: New file.
7345 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7346 unittests/ptid-selftests.c.
7347 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
7348
7349 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
7350
7351 * python/python.c (python_run_simple_file): Cast mode literal to
7352 non-const char pointer as expected by PyFile_FromString.
7353
7354 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
7355
7356 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
7357 minus_one_ptid and null_ptid.
7358
7359 2017-04-05 Pedro Alves <palves@redhat.com>
7360
7361 * warning.m4 (build_warnings): Remove -Wno-write-strings.
7362 * configure: Regenerate.
7363
7364 2017-04-05 Pedro Alves <palves@redhat.com>
7365
7366 * ada-exp.y (yyerror): Constify.
7367 * ada-lang.c (bound_name, get_selections)
7368 (ada_variant_discrim_type)
7369 (ada_variant_discrim_name, ada_value_struct_elt)
7370 (ada_lookup_struct_elt_type, is_unchecked_variant)
7371 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
7372 (catch_ada_exception_command_split)
7373 (catch_ada_assert_command_split, catch_assert_command)
7374 (ada_op_name): Constify.
7375 * ada-lang.h (ada_yyerror, get_selections)
7376 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
7377 * arc-tdep.c (arc_print_frame_cache): Constify.
7378 * arm-tdep.c (arm_skip_stub): Constify.
7379 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
7380 (gen_aggregate_elt_ref): Constify.
7381 * bcache.c (print_bcache_statistics): Constify.
7382 * bcache.h (print_bcache_statistics): Constify.
7383 * break-catch-throw.c (catch_exception_command_1):
7384 * breakpoint.c (struct ep_type_description::description):
7385 Constify.
7386 (add_solib_catchpoint): Constify.
7387 (catch_fork_command_1): Add cast.
7388 (add_catch_command): Constify.
7389 * breakpoint.h (add_catch_command, add_solib_catchpoint):
7390 Constify.
7391 * bsd-uthread.c (bsd_uthread_state): Constify.
7392 * buildsym.c (patch_subfile_names): Constify.
7393 * buildsym.h (next_symbol_text_func, patch_subfile_names):
7394 Constify.
7395 * c-exp.y (yyerror): Constify.
7396 (token::oper): Constify.
7397 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
7398 * c-varobj.c (cplus_describe_child): Constify.
7399 * charset.c (find_charset_names): Add cast.
7400 (find_charset_names): Constify array and add const_cast.
7401 * cli/cli-cmds.c (complete_command, cd_command): Constify.
7402 (edit_command): Constify.
7403 * cli/cli-decode.c (lookup_cmd): Constify.
7404 * cli/cli-dump.c (dump_memory_command, dump_value_command):
7405 Constify.
7406 (struct dump_context): Constify.
7407 (add_dump_command, restore_command): Constify.
7408 * cli/cli-script.c (get_command_line): Constify.
7409 * cli/cli-script.h (get_command_line): Constify.
7410 * cli/cli-utils.c (check_for_argument): Constify.
7411 * cli/cli-utils.h (check_for_argument): Constify.
7412 * coff-pe-read.c (struct read_pe_section_data): Constify.
7413 * command.h (lookup_cmd): Constify.
7414 * common/print-utils.c (decimal2str): Constify.
7415 * completer.c (gdb_print_filename): Constify.
7416 * corefile.c (set_gnutarget): Constify.
7417 * cp-name-parser.y (yyerror): Constify.
7418 * cp-valprint.c (cp_print_class_member): Constify.
7419 * cris-tdep.c (cris_register_name, crisv32_register_name):
7420 Constify.
7421 * d-exp.y (yyerror): Constify.
7422 (struct token::oper): Constify.
7423 * d-lang.h (d_yyerror): Constify.
7424 * dbxread.c (struct header_file_location::name): Constify.
7425 (add_old_header_file, add_new_header_file, last_function_name)
7426 (dbx_next_symbol_text, add_bincl_to_list)
7427 (find_corresponding_bincl_psymtab, set_namestring)
7428 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
7429 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
7430 * defs.h (command_line_input, print_address_symbolic)
7431 (deprecated_readline_begin_hook): Constify.
7432 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
7433 Constify.
7434 * event-top.c (handle_line_of_input): Constify and add cast.
7435 * exceptions.c (catch_errors): Constify.
7436 * exceptions.h (catch_errors): Constify.
7437 * expprint.c (print_subexp_standard, op_string, op_name)
7438 (op_name_standard, dump_raw_expression, dump_raw_expression):
7439 * expression.h (op_name, op_string, dump_raw_expression):
7440 Constify.
7441 * f-exp.y (yyerror): Constify.
7442 (struct token::oper): Constify.
7443 (struct f77_boolean_val::name): Constify.
7444 * f-lang.c (f_word_break_characters): Constify.
7445 * f-lang.h (f_yyerror): Constify.
7446 * fork-child.c (fork_inferior): Add cast.
7447 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
7448 (new_variant): Constify.
7449 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
7450 * gdbarch.c: Regenerate.
7451 * gdbcore.h (set_gnutarget): Constify.
7452 * go-exp.y (yyerror): Constify.
7453 (token::oper): Constify.
7454 * go-lang.h (go_yyerror): Constify.
7455 * go32-nat.c (go32_sysinfo): Constify.
7456 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
7457 * guile/scm-cmd.c (cmdscm_function): Constify.
7458 * guile/scm-param.c (pascm_param_value): Constify.
7459 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
7460 (h8300sx_register_name): Constify.
7461 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
7462 Constify.
7463 * ia64-tdep.c (ia64_register_names): Constify.
7464 * infcmd.c (construct_inferior_arguments): Constify.
7465 (path_command, attach_post_wait): Constify.
7466 * language.c (show_range_command, show_case_command)
7467 (unk_lang_error): Constify.
7468 * language.h (language_defn::la_error)
7469 (language_defn::la_name_of_this): Constify.
7470 * linespec.c (decode_line_2): Constify.
7471 * linux-thread-db.c (thread_db_err_str): Constify.
7472 * lm32-tdep.c (lm32_register_name): Constify.
7473 * m2-exp.y (yyerror): Constify.
7474 * m2-lang.h (m2_yyerror): Constify.
7475 * m32r-tdep.c (m32r_register_names): Constify and make static.
7476 * m68hc11-tdep.c (m68hc11_register_names): Constify.
7477 * m88k-tdep.c (m88k_register_name): Constify.
7478 * macroexp.c (appendmem): Constify.
7479 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
7480 (upgrade_type, parse_external, parse_partial_symbols)
7481 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
7482 (new_symbol): Constify.
7483 * memattr.c (mem_info_command): Constify.
7484 * mep-tdep.c (register_name_from_keyword): Constify.
7485 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
7486 Constify.
7487 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
7488 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
7489 * mi/mi-main.c (captured_mi_execute_command): Constify and add
7490 cast.
7491 (mi_execute_async_cli_command): Constify.
7492 * mips-tdep.c (mips_register_name): Constify.
7493 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
7494 (am33_register_name, am33_2_register_name)
7495 * moxie-tdep.c (moxie_register_names): Constify.
7496 * nat/linux-osdata.c (osdata_type): Constify fields.
7497 * nto-tdep.c (nto_parse_redirection): Constify.
7498 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
7499 (lookup_child_selector): Constify.
7500 (objc_methcall::name): Constify.
7501 * objc-lang.h (lookup_objc_class, lookup_child_selector)
7502 (lookup_struct_typedef): Constify.
7503 * objfiles.c (pc_in_section): Constify.
7504 * objfiles.h (pc_in_section): Constify.
7505 * p-exp.y (struct token::oper): Constify.
7506 (yyerror): Constify.
7507 * p-lang.h (pascal_yyerror): Constify.
7508 * parser-defs.h (op_name_standard): Constify.
7509 (op_print::string): Constify.
7510 (exp_descriptor::op_name): Constify.
7511 * printcmd.c (print_address_symbolic): Constify.
7512 * psymtab.c (print_partial_symbols): Constify.
7513 * python/py-breakpoint.c (stop_func): Constify.
7514 (bppy_get_expression): Constify.
7515 * python/py-cmd.c (cmdpy_completer::name): Constify.
7516 (cmdpy_function): Constify.
7517 * python/py-event.c (evpy_add_attribute)
7518 (gdbpy_initialize_event_generic): Constify.
7519 * python/py-event.h (evpy_add_attribute)
7520 (gdbpy_initialize_event_generic): Constify.
7521 * python/py-evts.c (add_new_registry): Constify.
7522 * python/py-finishbreakpoint.c (outofscope_func): Constify.
7523 * python/py-framefilter.c (get_py_iter_from_func): Constify.
7524 * python/py-inferior.c (get_buffer): Add cast.
7525 * python/py-param.c (parm_constant::name): Constify.
7526 * python/py-unwind.c (fprint_frame_id): Constify.
7527 * python/python.c (gdbpy_parameter_value): Constify.
7528 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
7529 * remote.c (memory_packet_config::name): Constify.
7530 (show_packet_config_cmd, remote_write_bytes)
7531 (remote_buffer_add_string):
7532 * reverse.c (exec_reverse_once): Constify.
7533 * rs6000-tdep.c (variant::name, variant::description): Constify.
7534 * rust-exp.y (rustyyerror): Constify.
7535 * rust-lang.c (rust_op_name): Constify.
7536 * rust-lang.h (rustyyerror): Constify.
7537 * serial.h (serial_ops::name): Constify.
7538 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
7539 (sh_sh3e_register_name, sh_sh2e_register_name)
7540 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
7541 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
7542 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
7543 (sh_sh4al_dsp_register_name): Constify.
7544 * sh64-tdep.c (sh64_register_name): Constify.
7545 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
7546 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
7547 * stabsread.c (patch_block_stabs, read_type_number)
7548 (ref_map::stabs, ref_add, process_reference)
7549 (symbol_reference_defined, define_symbol, define_symbol)
7550 (error_type, read_type, read_member_functions, read_cpp_abbrev)
7551 (read_one_struct_field, read_struct_fields, read_baseclasses)
7552 (read_tilde_fields, read_struct_type, read_array_type)
7553 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
7554 (read_huge_number, read_range_type, read_args, common_block_start)
7555 (find_name_end): Constify.
7556 * stabsread.h (common_block_start, define_symbol)
7557 (process_one_symbol, symbol_reference_defined, ref_add):
7558 * symfile.c (get_section_index, add_symbol_file_command):
7559 * symfile.h (get_section_index): Constify.
7560 * target-descriptions.c (tdesc_type::name): Constify.
7561 (tdesc_free_type): Add cast.
7562 * target.c (find_default_run_target):
7563 (add_deprecated_target_alias, find_default_run_target)
7564 (target_announce_detach): Constify.
7565 (do_option): Constify.
7566 * target.h (add_deprecated_target_alias): Constify.
7567 * thread.c (print_thread_info_1): Constify.
7568 * top.c (deprecated_readline_begin_hook, command_line_input):
7569 Constify.
7570 (init_main): Add casts.
7571 * top.h (handle_line_of_input): Constify.
7572 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
7573 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
7574 (tfind_command): Rename to ...
7575 (tfind_command_1): ... this and constify.
7576 (tfind_command): New function.
7577 (tfind_end_command, tfind_start_command): Adjust.
7578 (encode_source_string): Constify.
7579 * tracepoint.h (encode_source_string): Constify.
7580 * tui/tui-data.c (tui_partial_win_by_name): Constify.
7581 * tui/tui-data.h (tui_partial_win_by_name): Constify.
7582 * tui/tui-source.c (tui_set_source_content_nil): Constify.
7583 * tui/tui-source.h (tui_set_source_content_nil): Constify.
7584 * tui/tui-win.c (parse_scrolling_args): Constify.
7585 * tui/tui-windata.c (tui_erase_data_content): Constify.
7586 * tui/tui-windata.h (tui_erase_data_content): Constify.
7587 * tui/tui-winsource.c (tui_erase_source_content): Constify.
7588 * tui/tui.c (tui_enable): Add cast.
7589 * utils.c (defaulted_query): Constify.
7590 (init_page_info): Add cast.
7591 (puts_debug, subset_compare): Constify.
7592 * utils.h (subset_compare): Constify.
7593 * varobj.c (varobj_format_string): Constify.
7594 * varobj.h (varobj_format_string): Constify.
7595 * vax-tdep.c (vax_register_name): Constify.
7596 * windows-nat.c (windows_detach): Constify.
7597 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
7598 * xml-support.c (gdb_xml_end_element): Constify.
7599 * xml-tdesc.c (tdesc_start_reg): Constify.
7600 * xstormy16-tdep.c (xstormy16_register_name): Constify.
7601 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
7602 * xtensa-tdep.h (xtensa_register_t::name): Constify.
7603
7604 2017-04-05 Pedro Alves <palves@redhat.com>
7605
7606 * proc-api.c (struct trans): Constify.
7607 (procfs_note): Constify.
7608 * proc-events.c (struct trans, syscall_table):
7609 * proc-flags.c (struct trans): Constify.
7610 * proc-utils.h (procfs_note): Constify.
7611 * proc-why.c (struct trans): Constify.
7612 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
7613 (procfs_detach): Constify.
7614 * sol-thread.c (struct string_map): Constify.
7615 (td_err_string, td_state_string): Constify.
7616
7617 2017-04-05 Pedro Alves <palves@redhat.com>
7618
7619 * proc-api.c (procfs_filename): Don't initialize
7620 procfs_filename.
7621 (prepare_to_trace): Assume procfs_filename is non-NULL.
7622 (_initialize_proc_api): Give procfs_filename a default value here.
7623
7624 2017-04-05 Pedro Alves <palves@redhat.com>
7625
7626 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
7627 'cond_string' parameter.
7628 (extract_exception_regexp): Constify 'string' parameter.
7629 (catch_exception_command_1): Constify.
7630 * breakpoint.c (init_catchpoint)
7631 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
7632 parameter.
7633 (ep_parse_optional_if_clause, catch_fork_command_1)
7634 (catch_exec_command_1): Constify.
7635 * breakpoint.h (init_catchpoint): Constify 'cond_string'
7636 parameter.
7637 (ep_parse_optional_if_clause): Constify.
7638 * cli/cli-utils.c (remove_trailing_whitespace)
7639 (check_for_argument): Constify.
7640 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
7641 non-const overload.
7642 (check_for_argument): Likewise.
7643
7644 2017-04-05 Pedro Alves <palves@redhat.com>
7645
7646 * event-top.c (command_line_handler): Add cast to execute_command
7647 call.
7648 * record-btrace.c (cmd_record_btrace_bts_start)
7649 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
7650 (cmd_record_btrace_start): Add cast to execute_command call.
7651 * record-full.c (record_full_goto_insn):
7652 * record.c (record_start, record_stop): Add cast to
7653 execute_command_to_string calls.
7654 (cmd_record_start): Add cast to execute_command calls.
7655
7656 2017-04-05 Pedro Alves <palves@redhat.com>
7657
7658 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
7659 static inline function.
7660 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
7661 array and use gdb_PyArg_ParseTupleAndKeywords.
7662 * python/py-cmd.c (cmdpy_init): Likewise.
7663 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
7664 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
7665 (infpy_search_memory): Likewise.
7666 * python/py-objfile.c (objfpy_add_separate_debug_file)
7667 (gdbpy_lookup_objfile): Likewise.
7668 * python/py-symbol.c (gdbpy_lookup_symbol)
7669 (gdbpy_lookup_global_symbol): Likewise.
7670 * python/py-type.c (gdbpy_lookup_type): Likewise.
7671 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
7672 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
7673 Likewise.
7674
7675 2017-04-05 Pedro Alves <palves@redhat.com>
7676
7677 * python/python-internal.h (gdb_PyGetSetDef): New type.
7678 * python/py-block.c (block_object_getset)
7679 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
7680 * python/py-event.c (event_object_getset)
7681 (finish_breakpoint_object_getset): Likewise.
7682 * python/py-inferior.c (inferior_object_getset): Likewise.
7683 * python/py-infthread.c (thread_object_getset): Likewise.
7684 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
7685 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
7686 * python/py-objfile.c (objfile_getset): Likewise.
7687 * python/py-progspace.c (pspace_getset): Likewise.
7688 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
7689 Likewise.
7690 * python/py-record.c (recpy_record_getset): Likewise.
7691 * python/py-symbol.c (symbol_object_getset): Likewise.
7692 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
7693 Likewise.
7694 * python/py-type.c (type_object_getset, field_object_getset):
7695 Likewise.
7696 * python/py-value.c (value_object_getset): Likewise.
7697
7698 2017-04-05 Pedro Alves <palves@redhat.com>
7699
7700 * python/python-internal.h (gdb_PyObject_CallMethod)
7701 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
7702 New functions.
7703 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
7704 (PySys_GetObject, PySys_SetPath): New macros.
7705
7706 2017-04-05 Pedro Alves <palves@redhat.com>
7707
7708 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
7709 info_osdata_command.
7710 * osdata.c (info_osdata_command): Rename to ...
7711 (info_osdata): ... this. Constify 'type' parameter, and remove
7712 the 'from_tty' parameter. Accept NULL TYPE.
7713 (info_osdata_command): New function.
7714 * osdata.h (info_osdata_command): Remove declaration.
7715 (info_osdata): New declaration.
7716
7717 2017-04-05 Pedro Alves <palves@redhat.com>
7718
7719 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
7720 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
7721 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
7722 parameter.
7723 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
7724 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
7725 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
7726 parameter.
7727 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
7728 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
7729 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
7730 (mi_cmd_file_list_exec_source_files)
7731 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
7732 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7733 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
7734 parameter.
7735 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
7736 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
7737 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
7738 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
7739 (mi_cmd_stack_info_frame): Constify 'command' parameter.
7740 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
7741 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
7742 'command' parameter.
7743 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
7744 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
7745 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
7746 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
7747 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
7748 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
7749 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
7750 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
7751 (mi_cmd_var_set_update_range): Constify 'command' parameter.
7752 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
7753 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
7754 parameter.
7755 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
7756 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
7757 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
7758 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
7759 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
7760 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
7761 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
7762 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
7763 (mi_cmd_data_list_changed_registers)
7764 (mi_cmd_data_write_register_values)
7765 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
7766 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
7767 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
7768 (mi_cmd_list_features, mi_cmd_list_target_features)
7769 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
7770 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
7771 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
7772 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
7773 (mi_cmd_trace_frame_collected): Constify 'command'
7774 parameter.
7775 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
7776 'command' parameter.
7777
7778 2017-04-05 Pedro Alves <palves@redhat.com>
7779
7780 * ada-lang.c (ada_completer_word_break_characters): Now a const
7781 array.
7782 (ada_get_gdb_completer_word_break_characters): Constify.
7783 * completer.c (gdb_completer_command_word_break_characters)
7784 (gdb_completer_file_name_break_characters)
7785 (gdb_completer_quote_characters): Now const arrays.
7786 (get_gdb_completer_quote_characters): Constify.
7787 (set_rl_completer_word_break_characters): New function.
7788 (set_gdb_completion_word_break_characters)
7789 (complete_line_internal): Use it.
7790 * completer.h (get_gdb_completer_quote_characters): Constify.
7791 (set_rl_completer_word_break_characters): Declare.
7792 * f-lang.c (f_word_break_characters): Constify.
7793 * language.c (default_word_break_characters): Constify.
7794 * language.h (language_defn::la_word_break_characters): Constify.
7795 (default_word_break_characters): Constify.
7796 * top.c (init_main): Use set_rl_completer_word_break_characters.
7797
7798 2017-04-05 Pedro Alves <palves@redhat.com>
7799
7800 * aix-thread.c (aix_thread_pid_to_str)
7801 (aix_thread_extra_thread_info): Constify.
7802 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
7803 * bsd-uthread.c (bsd_uthread_extra_thread_info)
7804 (bsd_uthread_pid_to_str): Constify.
7805 * corelow.c (core_pid_to_str): Constify.
7806 * darwin-nat.c (darwin_pid_to_str): Constify.
7807 * fbsd-nat.c (fbsd_pid_to_str): Constify.
7808 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
7809 Constify.
7810 * gnu-nat.c (gnu_pid_to_str): Constify.
7811 * go32-nat.c (go32_pid_to_str): Constify.
7812 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
7813 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
7814 * inferior.c (inferior_pid_to_str): Constify.
7815 * linux-nat.c (linux_nat_pid_to_str): Constify.
7816 * linux-tdep.c (linux_core_pid_to_str): Constify.
7817 * linux-thread-db.c (thread_db_pid_to_str)
7818 (thread_db_extra_thread_info): Constify.
7819 * nto-tdep.c (nto_extra_thread_info): Constify.
7820 * nto-tdep.h (nto_extra_thread_info): Constify.
7821 * obsd-nat.c (obsd_pid_to_str): Constify.
7822 * procfs.c (procfs_pid_to_str): Constify.
7823 * ravenscar-thread.c (ravenscar_extra_thread_info)
7824 (ravenscar_pid_to_str): Constify.
7825 * remote-sim.c (gdbsim_pid_to_str): Constify.
7826 * remote.c (remote_threads_extra_info, remote_pid_to_str):
7827 Constify.
7828 * sol-thread.c (solaris_pid_to_str): Constify.
7829 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
7830 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
7831 * target.c (default_pid_to_str, target_pid_to_str)
7832 (normal_pid_to_str, default_pid_to_str): Constify.
7833 * target.h (target_ops::to_pid_to_str)
7834 (target_ops::to_extra_thread_info): Constify.
7835 (target_pid_to_str, normal_pid_to_str): Constify.
7836 * windows-nat.c (windows_pid_to_str): Constify.
7837 * gdbarch.sh (core_pid_to_str): Constify.
7838 * target-delegates.c: Regenerate.
7839 * gdbarch.h, gdbarch.c: Regenerate.
7840
7841 2017-04-05 Pedro Alves <palves@redhat.com>
7842
7843 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
7844 the memory of the temporary warning_pre_print override.
7845 * utils.c (warning_pre_print): Constify.
7846 * utils.h (warning_pre_print): Constify.
7847
7848 2017-04-05 Pedro Alves <palves@redhat.com>
7849
7850 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
7851 (shell_command): New function.
7852 (make_command): Use std::string.
7853 (init_cli_cmds): Register shell_command instead of shell_escape.
7854
7855 2017-04-05 Pedro Alves <palves@redhat.com>
7856
7857 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
7858 * tracepoint.c (default_collect): Don't initialize.
7859
7860 2017-04-05 Pedro Alves <palves@redhat.com>
7861
7862 * macroexp.c (macro_buffer::shared): Now a bool.
7863 (init_buffer): Update.
7864 (init_shared_buffer): Constify 'addr' parameter.
7865 (substitute_args, expand, macro_expand, macro_expand_next): Remove
7866 casts.
7867
7868 2017-04-05 Pedro Alves <palves@redhat.com>
7869
7870 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
7871 * disasm.c (set_disassembler_options): Constify local.
7872 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
7873
7874 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
7875
7876 PR gdb/21352
7877 * tracefile.c (tsave_command): Fix argument parsing for '-r'
7878 option.
7879
7880 2017-04-05 Yao Qi <yao.qi@linaro.org>
7881
7882 * frame.c (frame_unwind_register_unsigned): Call
7883 frame_unwind_register_value.
7884
7885 2017-04-05 Yao Qi <yao.qi@linaro.org>
7886
7887 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
7888 Use gdb_test_multiple, and don't match anchor.
7889
7890 2017-04-05 Pedro Alves <palves@redhat.com>
7891
7892 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
7893 (Write After Approval): Remove Simon Marchi.
7894
7895 2017-04-05 Pedro Alves <palves@redhat.com>
7896
7897 * common/gdb_optional.h (optional::optional): Make constexpr and
7898 initialize m_dummy.
7899
7900 2017-04-04 John Baldwin <jhb@FreeBSD.org>
7901
7902 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
7903 (amd64fbsd_jmp_buf_reg_offset): Remove.
7904 (amd64fbsd_supply_uthread): Remove function.
7905 (amd64fbsd_collect_uthread): Remove function.
7906 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
7907 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
7908 (x86_64-*-freebsd*): Remove bsd-uthread.o.
7909 (fbsd-nat.c): Update comment.
7910 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
7911 (i386fbsd_jmp_buf_reg_offset): Remove.
7912 (i386fbsd_supply_uthread): Remove function.
7913 (i386fbsd_collect_uthread): Remove function.
7914 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
7915
7916 2017-04-04 John Baldwin <jhb@FreeBSD.org>
7917
7918 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
7919 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
7920 * NEWS: Mention that support for FreeBSD/alpha was removed.
7921 * alpha-fbsd-tdep.c: Delete file.
7922 * config/alpha/fbsd.mh: Delete file.
7923 * configure.host: Delete alpha*-*-freebsd* and
7924 alpha*-*-kfreebsd*-gnu.
7925 * configure.tgt: Delete alpha*-*-freebsd* and
7926 alpha*-*-kfreebsd*-gnu.
7927
7928 2017-04-04 John Baldwin <jhb@FreeBSD.org>
7929
7930 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
7931 amd64bsd_store_inferior_registers): Use ptid from regcache.
7932
7933 2017-04-04 Pedro Alves <palves@redhat.com>
7934
7935 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
7936 data fields, make them private and add "m_" prefixes.
7937 (lnp_state_machine::lnp_state_machine): New ctor.
7938 (record_line, check_line_address, handle_set_discriminator)
7939 (handle_set_address, handle_advance_pc, handle_special_opcode)
7940 (handle_advance_line, handle_set_file, handle_negate_stmt)
7941 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
7942 (end_sequence, advance_line): New methods.
7943 (m_gdbarch, m_record_lines_p): New fields.
7944 (lnp_reader_state): Delete.
7945 (dwarf_record_line): Rename to ...
7946 (lnp_state_machine::record_line): ... adjust.
7947 (init_lnp_state_machine): Delete.
7948 (lnp_state_machine::lnp_state_machine): New.
7949 (check_line_address): Rename to ...
7950 (lnp_state_machine::check_line_address): This.
7951 (dwarf_decode_lines_1): Remove reference to "reader_state".
7952 Adjust lnp_state_machine having a non-default ctor. Use bool.
7953 State machine internal state manipulation moved to
7954 lnp_state_machine methods.
7955
7956 2017-04-04 Pedro Alves <palves@redhat.com>
7957
7958 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7959 unittests/offset-type-selftests.c.
7960 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
7961 * common/offset-type.h: New file.
7962 * common/preprocessor.h: New file.
7963 * common/traits.h: New file.
7964 * common/valid-expr.h: New file.
7965 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
7966 sect_offset and cu_offset strong typedefs throughout.
7967 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
7968 typedefs throughout.
7969 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
7970 sect_offset and cu_offset strong typedefs throughout.
7971 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
7972 typedefs throughout.
7973 * gdbtypes.h: Include "common/offset-type.h".
7974 (cu_offset): Now an offset type (strong typedef) instead of a
7975 struct.
7976 (sect_offset): Likewise.
7977 (union call_site_parameter_u): Rename "param_offset" field to
7978 "param_cu_off".
7979 * unittests/offset-type-selftests.c: New file.
7980
7981 2017-04-04 Pedro Alves <palves@redhat.com>
7982
7983 * common/underlying.h: New file.
7984 * dwarf2read.c: Include "common/gdb_optional.h" and
7985 "common/underlying.h".
7986 (dir_index, file_name_index): New types.
7987 (file_entry): Use them.
7988 (file_entry::include): Use to_underlying.
7989 (line_header::add_file_name): Use dir_index.
7990 (read_formatted_entries): Use gdb::optional. Read form before
7991 writting to file_entry.
7992 (dwarf_decode_line_header): Use dir_index.
7993 (lnp_state_machine::current_file): Use to_underlying.
7994 (lnp_state_machine::file): Change type to file_name_index.
7995 (dwarf_record_line): Use to_underlying.
7996 (init_lnp_state_machine): Use file_name_index.
7997 (dwarf_decode_lines_1): Use dir_index and file_name_index.
7998
7999 2017-04-04 Pedro Alves <palves@redhat.com>
8000
8001 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
8002 operator bool, has_value and get methods.
8003
8004 2017-04-04 Pedro Alves <palves@redhat.com>
8005
8006 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
8007 fields.
8008 (line_header): Initialize all data fields. Change type of
8009 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
8010 Change type of include_dirs to std::vector<const char *>. Remove
8011 num_include_dirs, include_dirs_size. Change type of file_names to
8012 std::vector<file_entry>. Remove num_file_names, file_names_size.
8013 (line_header::line_header): New.
8014 (line_header::add_include_dir, line_header::add_file_name): New
8015 methods.
8016 (line_header::include_dir_at): Remove NULL check.
8017 (line_header::file_name_at): Add const overload.
8018 (line_header_up): New unique_ptr typedef.
8019 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
8020 std::vector. Remove free_line_header call.
8021 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
8022 free_line_header call.
8023 (free_cu_line_header): Delete.
8024 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
8025 (setup_type_unit_groups): Use line_header_up instead of cleanups.
8026 Adjust to use std::vector.
8027 (free_line_header): Delete.
8028 (free_line_header_voidp): Use delete.
8029 (add_include_dir): Replace with ...
8030 (line_header::add_include_dir): ... this method. Use std::vector.
8031 (add_file_name): Replace with ...
8032 (line_header::add_file_name): ... this method. Use std::vector.
8033 (add_include_dir_stub): Delete.
8034 (read_formatted_entries): Remove memset.
8035 (dwarf_decode_line_header): Return a line_header_up instead of a
8036 raw pointer. Remove cleanup handling. Pass lambdas to
8037 read_formatted_entries. Adjust to use line_header methods.
8038 (dwarf_decode_lines_1): Adjust to use line_header methods.
8039 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
8040 use std::vector.
8041
8042 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
8043
8044 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
8045 instead of struct ptid.
8046
8047 2017-05-04 Alan Hayward <alan.hayward@arm.com>
8048
8049 * frame.c (get_frame_register_bytes): Unwind using value.
8050 (put_frame_register_bytes): Likewise.
8051
8052 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
8053
8054 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
8055 aggregate-like.
8056
8057 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
8058
8059 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
8060
8061 2017-03-29 Yao Qi <yao.qi@linaro.org>
8062
8063 * gdbthread.h (struct thread_info): Declare constructor and
8064 destructor. Add some in-class member initializers.
8065 * thread.c (free_thread): Remove.
8066 (init_thread_list): Call delete instead of free_thread.
8067 (new_thread): Call thread_info constructor.
8068 (thread_info::thread_info): New function.
8069 (thread_info::~thread_info): New function.
8070 (delete_thread_1): Call delete instead of free_thread.
8071 (make_cleanup_restore_current_thread): Move tp and frame to
8072 inner block.
8073
8074 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8075
8076 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
8077 (arc_skip_prologue): Likewise.
8078 (arc_make_frame_cache): Likewise.
8079 (arc_pv_get_operand): New function.
8080 (arc_is_in_prologue): Likewise.
8081 (arc_analyze_prologue): Likewise.
8082 (arc_print_frame_cache): Likewise.
8083 (MAX_PROLOGUE_LENGTH): New constant.
8084
8085 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8086
8087 * configure.tgt: Add arc-insn.o.
8088 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
8089 (dump_arc_instruction_command): New function.
8090 (arc_fprintf_disasm): Likewise.
8091 (arc_disassemble_info): Likewise.
8092 (arc_insn_get_operand_value): Likewise.
8093 (arc_insn_get_operand_value_signed): Likewise.
8094 (arc_insn_get_memory_base_reg): Likewise.
8095 (arc_insn_get_memory_offset): Likewise.
8096 (arc_insn_get_branch_target): Likewise.
8097 (arc_insn_dump): Likewise.
8098 (arc_insn_get_linear_next_pc): Likewise.
8099 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
8100 (arc_disassemble_info): Likewise.
8101 (arc_insn_get_branch_target): Likewise.
8102 (arc_insn_get_linear_next_pc): Likewise.
8103 * NEWS: Mention new "maint print arc arc-instruction".
8104
8105 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8106
8107 * arc-tdep (maintenance_print_arc_list): New variable.
8108 (maintenance_print_arc_command): New function.
8109
8110 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8111
8112 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
8113 Add "limm" and "reserved".
8114 (arc_cannot_fetch_register, arc_cannot_store_register): Add
8115 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
8116 * arc-tdep.h (arc_regnum): Likewise.
8117
8118 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8119
8120 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8121 for THREADPTR register.
8122 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
8123 register.
8124 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
8125 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
8126 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
8127
8128 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8129
8130 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
8131 registers above gdbarch_num_regs (gdbarch) as privileged in
8132 call0 ABI.
8133
8134 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8135
8136 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8137 for a single specified register or for all registers in
8138 a0_base..a0_base + C0_NREGS range.
8139 (supply_gregset_reg): Call regcache_raw_supply for a single
8140 specified register or for all registers in a0_base..a0_base +
8141 C0_NREGS range.
8142
8143 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8144
8145 * arch/xtensa.h (C0_NREGS): Add definition.
8146 * xtensa-tdep.c (C0_NREGS): Remove definition.
8147
8148 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8149
8150 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
8151 Drop xtensa_default_isa initialization.
8152 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
8153
8154 2017-03-27 Pedro Alves <palves@redhat.com>
8155
8156 * dwarf2read.c (file_entry) <dir_index>: Add comment.
8157 (file_entry::include_dir): New method.
8158 (line_header::include_dir_at, line_header::file_name_at): New
8159 methods.
8160 (setup_type_unit_groups, setup_type_unit_groups)
8161 (psymtab_include_file_name): Simplify using the new methods.
8162 (lnp_state_machine) <the_line_header>: New field.
8163 <file>: Add comment.
8164 (lnp_state_machine::current_file): New method.
8165 (dwarf_record_line): Simplify using the new methods.
8166 (init_lnp_state_machine): Initialize the "the_line_header" field.
8167 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
8168 Simplify using the new methods.
8169
8170 2017-03-27 Pedro Alves <palves@redhat.com>
8171
8172 * cp-name-parser.y (make_empty): Delete.
8173 (demangler_special, nested_name, ptr_operator, array_indicator)
8174 (direct_declarator, declarator_1): Use fill_comp instead of
8175 make_empty.
8176
8177 2017-03-27 Pedro Alves <palves@redhat.com>
8178
8179 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
8180 to ATTRIBUTE_PRINTF.
8181 * solib-target.c (library_list_start_list): Print "string" not
8182 "version".
8183 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
8184 gdb_xml_error call.
8185
8186 2017-03-27 Pedro Alves <palves@redhat.com>
8187
8188 * dwarf2read.c (struct file_and_directory): New.
8189 (dwarf2_get_dwz_file): Adjust to use std::string.
8190 (dw2_get_file_names_reader): Adjust to use file_and_directory.
8191 (find_file_and_directory): Adjust to return a file_and_directory
8192 object.
8193 (read_file_scope): Adjust to use file_and_directory. Remove
8194 make_cleanup/do_cleanups calls.
8195 (open_and_init_dwp_file): Adjust to use std::string. Remove
8196 make_cleanup/do_cleanups calls.
8197 * python/python.c (do_start_initialization): Adjust to ldirname
8198 returning a std::string.
8199 * utils.c (ldirname): Now returns a std::string.
8200 * utils.h (ldirname): Change return type to std::string.
8201 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
8202 returning a std::string.
8203 * xml-tdesc.c (file_read_description_xml): Likewise.
8204
8205 2017-03-24 Alan Hayward <alan.hayward@arm.com>
8206
8207 * regcache.c (regcache_debug_print_register): New function.
8208 * regcache.h (regcache_debug_print_register): New declaration.
8209 * target.c (debug_print_register): Remove.
8210 (target_fetch_registers): Call regcache_debug_print_register.
8211 (target_store_registers): Likewise.
8212
8213 2017-03-24 Pádraig Brady <pbrady@fb.com>
8214
8215 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
8216 reference beyond the 'lh->include_dirs' array before accessing to
8217 it.
8218 (psymtab_include_file_name): Likewise.
8219 (dwarf_decode_lines_1): Likewise.
8220 (dwarf_decode_lines): Likewise.
8221 (file_file_name): Likewise.
8222
8223 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
8224
8225 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
8226 inferior_ptid.
8227 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8228 ps_lsetfpregs): Likewise.
8229 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
8230 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8231 ps_lsetfpregs): Likewise.
8232 * target.c (target_fetch_registers, target_store_registers):
8233 Remove asserts.
8234
8235 2017-03-23 Alan Hayward <alan.hayward@arm.com>
8236
8237 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
8238
8239 2017-03-23 Yao Qi <yao.qi@linaro.org>
8240
8241 * aarch64-tdep.c (aarch64_process_record_test): Declare.
8242 (_initialize_aarch64_tdep): Register it.
8243 (aarch64_record_load_store): Handle PRFM instruction.
8244 (aarch64_process_record_test): New function.
8245
8246 2017-03-23 Yao Qi <yao.qi@linaro.org>
8247
8248 * aarch64-tdep.c (aarch64_record_load_store): Fix code
8249 indentation.
8250
8251 2017-03-23 Yao Qi <yao.qi@linaro.org>
8252
8253 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
8254
8255 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8256
8257 python/python.c (do_start_initialization): Fix memory leak.
8258
8259 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8260
8261 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
8262 using get_ptrace_pid.
8263 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
8264 inferior_ptid.
8265 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
8266 inferior_ptid instead of pid.
8267
8268 2017-03-22 Yao Qi <yao.qi@linaro.org>
8269
8270 * aarch64-tdep.c: Wrap locally used classes in anonymous
8271 namespace.
8272 * arm-tdep.c: Likewise.
8273 * linespec.c: Likewise.
8274 * ui-out.c: Likewise.
8275
8276 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
8277
8278 PR gdb/19637
8279 * python/lib/gdb/printer/bound_registers.py: Import sys.
8280
8281 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8282
8283 * windows-nat.c (do_windows_fetch_inferior_registers): Add
8284 windows_thread_info parameter and use it instead of
8285 current_thread.
8286 (windows_fetch_inferior_registers): Don't set current_thread,
8287 pass the thread to do_windows_fetch_inferior_registers. Use
8288 ptid from regcache instead of inferior_ptid.
8289 (do_windows_store_inferior_registers): Add windows_thread_info
8290 parameter and use it instead of current_thread.
8291 (windows_store_inferior_registers): Don't set current_thread,
8292 pass the thread to do_windows_store_inferior_registers. Use
8293 ptid from regcache instead of inferior_ptid.
8294
8295 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8296
8297 * ser-mingw.c (ser_windows_raw): Remove reference to
8298 struct serial::current_timeout.
8299
8300 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
8301
8302 PR tdep/20928
8303 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
8304 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
8305 (sparc64_fsr_type): Fix %fsr decoding.
8306
8307 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
8308
8309 * python/py-record-btrace.c (btpy_insn_data): Change return type
8310 for Python 2.
8311
8312 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8313
8314 * spu-linux-nat.c (spu_fetch_inferior_registers,
8315 spu_store_inferior_registers): Use ptid from regcache, set and
8316 restore inferior_ptid.
8317 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
8318 Likewise.
8319
8320 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8321
8322 * i386-linux-nat.c (fetch_register, store_register,
8323 i386_linux_fetch_inferior_registers,
8324 i386_linux_store_inferior_registers): Use ptid from regcache.
8325 * ia64-linux-nat.c (ia64_linux_fetch_register,
8326 ia64_linux_store_register): Likewise.
8327 * inf-ptrace.c (inf_ptrace_fetch_register,
8328 inf_ptrace_store_register): Likewise.
8329 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
8330 m32r_linux_store_inferior_registers): Likewise.
8331 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
8332 m68kbsd_store_inferior_registers): Likewise.
8333 * m68k-linux-nat.c (fetch_register, store_register,
8334 m68k_linux_fetch_inferior_registers,
8335 m68k_linux_store_inferior_registers): Likewise.
8336 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
8337 m88kbsd_store_inferior_registers): Likewise.
8338 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
8339 mips_fbsd_store_inferior_registers): Likewise.
8340 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
8341 mips64_linux_regsets_store_registers): Likewise.
8342 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
8343 mipsnbsd_store_inferior_registers): Likewise.
8344 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
8345 mips64obsd_store_inferior_registers): Likewise.
8346 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
8347 Likewise.
8348 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
8349 ppcfbsd_store_inferior_registers): Likewise.
8350 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
8351 ppc_linux_store_inferior_registers): Likewise.
8352 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
8353 ppcnbsd_store_inferior_registers): Likewise.
8354 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
8355 ppcobsd_store_registers): Likewise.
8356 * procfs.c (procfs_fetch_registers, procfs_store_registers):
8357 Likewise.
8358 * ravenscar-thread.c (ravenscar_fetch_registers,
8359 ravenscar_store_registers, ravenscar_prepare_to_store):
8360 Likewise.
8361 * record-btrace.c (record_btrace_fetch_registers,
8362 record_btrace_store_registers, record_btrace_prepare_to_store):
8363 Likewise.
8364 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
8365 Lookup inferior using ptid from regcache, instead of
8366 current_inferior.
8367 * remote.c (remote_fetch_registers, remote_store_registers): Use
8368 ptid from regcache.
8369 * rs6000-nat.c (fetch_register, store_register): Likewise.
8370 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
8371 s390_linux_store_inferior_registers): Likewise.
8372 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
8373 shnbsd_store_inferior_registers): Likewise.
8374 * sol-thread.c (sol_thread_fetch_registers,
8375 sol_thread_store_registers): Likewise.
8376 * sparc-nat.c (sparc_fetch_inferior_registers,
8377 sparc_store_inferior_registers): Likewise.
8378 * tilegx-linux-nat.c (fetch_inferior_registers,
8379 store_inferior_registers): Likewise.
8380 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
8381 vaxbsd_store_inferior_registers): Likewise.
8382 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
8383 store_xtregs): Likewise.
8384
8385 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8386
8387 PR gdb/14441
8388 * NEWS: Mention support for rvalue references in GDB and python.
8389 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
8390 supports both lvalue and rvalue references.
8391
8392 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8393
8394 PR gdb/14441
8395 * gdbtypes.c (rank_one_type): Implement overloading
8396 resolution rules regarding rvalue references.
8397
8398 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8399
8400 PR gdb/14441
8401 * aarch64-tdep.c (aarch64_type_align)
8402 (aarch64_extract_return_value, aarch64_store_return_value): Change
8403 lvalue reference type checks to general reference type checks.
8404 * amd64-tdep.c (amd64_classify): Likewise.
8405 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
8406 Likewise.
8407 * arm-tdep.c (arm_type_align, arm_extract_return_value)
8408 (arm_store_return_value): Likewise.
8409 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
8410 * c-typeprint.c (c_print_type): Likewise.
8411 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
8412 (cplus_number_of_children, cplus_describe_child): Likewise.
8413 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
8414 * completer.c (expression_completer): Likewise.
8415 * cp-support.c (make_symbol_overload_list_adl_namespace):
8416 Likewise.
8417 * darwin-nat-info.c (info_mach_region_command): Likewise.
8418 * dwarf2loc.c (entry_data_value_coerce_ref)
8419 (value_of_dwarf_reg_entry): Likewise.
8420 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
8421 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
8422 Likewise.
8423 * findvar.c (extract_typed_address, store_typed_address):
8424 Likewise.
8425 * gdbtypes.c (rank_one_type): Likewise.
8426 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
8427 * infcall.c (value_arg_coerce): Likewise.
8428 * language.c (pointer_type): Likewise.
8429 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
8430 Likewise.
8431 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
8432 * mn10300-tdep.c (mn10300_type_align): Likewise.
8433 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
8434 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
8435 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
8436 Likewise.
8437 * printcmd.c (print_formatted, x_command): Likewise.
8438 * python/py-type.c (typy_get_composite, typy_template_argument):
8439 Likewise.
8440 * python/py-value.c (valpy_referenced_value)
8441 (valpy_get_dynamic_type, value_has_field): Likewise.
8442 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
8443 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
8444 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
8445 * spu-tdep.c (spu_scalar_value_p): Likewise.
8446 * symtab.c (lookup_symbol_aux): Likewise.
8447 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
8448 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
8449 Likewise.
8450 * valops.c (value_cast_pointers, value_cast)
8451 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
8452 (value_struct_elt, value_struct_elt_bitpos)
8453 (value_find_oload_method_list, find_overload_match)
8454 (value_rtti_indirect_type): Likewise.
8455 * valprint.c (val_print_scalar_type_p, generic_val_print):
8456 Likewise.
8457 * value.c (value_actual_type, value_as_address, unpack_long)
8458 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
8459 (coerce_ref): Likewise.
8460 * varobj.c (varobj_get_value_type): Likewise.
8461
8462 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8463
8464 PR gdb/14441
8465 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
8466 table of constants.
8467 * python/lib/gdb/command/explore.py: Support exploring values
8468 of rvalue reference types.
8469 * python/lib/gdb/types.py: Implement get_basic_type() for
8470 rvalue reference types.
8471 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
8472 constant.
8473 * python/py-value.c (valpy_getitem): Add an rvalue reference
8474 check.
8475 (valpy_reference_value): Add new parameter "refcode".
8476 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
8477 New wrappers for valpy_reference_value().
8478 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
8479 (gdbpy_invoke_xmethod): Likewise.
8480
8481 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8482
8483 PR gdb/14441
8484 * dwarf2read.c (process_die, read_type_die_1): Handle the
8485 DW_TAG_rvalue_reference_type DIE.
8486 (read_tag_reference_type): Add new parameter "refcode".
8487
8488 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8489
8490 PR gdb/14441
8491 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
8492 (c_type_print_modifier, c_type_print_varspec_suffix)
8493 (c_type_print_base): Support printing rvalue reference types.
8494 * c-valprint.c (c_val_print, c_value_print): Support printing
8495 rvalue reference values.
8496
8497 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8498
8499 PR gdb/14441
8500 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
8501 typename.
8502 * cp-support.c (replace_typedefs): Handle
8503 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
8504 * python/py-type.c (typy_lookup_type): Likewise.
8505
8506 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8507
8508 PR gdb/14441
8509 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
8510 * parse.c (insert_type): Change assert statement.
8511 (follow_types): Handle rvalue reference types.
8512 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
8513 constant.
8514
8515 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8516
8517 PR gdb/14441
8518 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
8519 value_ref() interface.
8520 * c-valprint.c (c_value_print): Likewise.
8521 * infcall.c (value_arg_coerce): Likewise.
8522 * python/py-value.c (valpy_reference_value): Likewise.
8523 * valops.c (value_cast, value_reinterpret_cast)
8524 (value_dynamic_cast, typecmp): Likewise.
8525 (value_ref): Parameterize by kind of return value reference type.
8526 * value.h (value_ref): Add new parameter "refcode".
8527
8528 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8529
8530 PR gdb/14441
8531 * dwarf2read.c (read_tag_reference_type): Use
8532 lookup_lvalue_reference_type() instead of lookup_reference_type().
8533 * eval.c (evaluate_subexp_standard): Likewise.
8534 * f-exp.y: Likewise.
8535 * gdbtypes.c (make_reference_type, lookup_reference_type):
8536 Generalize with rvalue reference types.
8537 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
8538 convenience wrappers for lookup_reference_type().
8539 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
8540 reference kind parameter.
8541 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
8542 wrappers for lookup_reference_type().
8543 * guile/scm-type.c (gdbscm_type_reference): Use
8544 lookup_lvalue_reference_type() instead of lookup_reference_type().
8545 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
8546 * parse.c (follow_types): Likewise.
8547 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
8548 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
8549 Likewise.
8550 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
8551 (gdbpy_invoke_xmethod): Likewise.
8552 * stabsread.c: Provide extra argument to make_reference_type()
8553 call.
8554 * valops.c (value_ref, value_rtti_indirect_type): Use
8555 lookup_lvalue_reference_type() instead of lookup_reference_type().
8556
8557 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8558
8559 PR gdb/14441
8560 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
8561 (TYPE_IS_REFERENCE): New macro.
8562 (struct type): Add rvalue_reference_type field.
8563 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
8564
8565 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
8566
8567 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
8568 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
8569 New function definition.
8570 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
8571 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
8572 New function declaration.
8573 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
8574 * mi/mi-interp.h: New file.
8575 * solib.c (info_sharedlibrary_command): Replace for loop with
8576 ALL_SO_LIBS macro
8577 * solib.h (update_solib_list): New function declaration.
8578 (so_list_head): Move macro.
8579 * solist.h (ALL_SO_LIBS): New macro.
8580
8581 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
8582
8583 * infcmd.c (post_create_inferior): Remove unused argument in
8584 call to solib_add.
8585 * remote.c (remote_start_remote): Likewise.
8586 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
8587 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
8588 (enable_break): Likewise.
8589 * solib.c (update_solib_list): Remove unused target argument
8590 and its documentation.
8591 (solib_add): Remove unused target argument. Remove unused
8592 argument in call to update_solib_list.
8593 (info_sharedlibrary_command): Remove unused argument in call
8594 to update_solib_list.
8595 (sharedlibrary_command): Remove unused argument in call to
8596 solib_add.
8597 (handle_solib_event): Likewise.
8598 (reload_shared_libraries): Likewise.
8599 * solib.h (solib_add): Remove unused target argument.
8600
8601 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
8602
8603 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
8604 (s390_displaced_step_fixup): Cover relative branches with the
8605 default fixup handling. This fixes lack of support for some
8606 relative branch instructions.
8607
8608 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8609
8610 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
8611 ptid from regcache.
8612
8613 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8614
8615 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
8616 i386_darwin_store_inferior_registers): Use ptid from regcache.
8617
8618 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8619
8620 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
8621 i386bsd_store_inferior_registers): Use ptid from regcache.
8622
8623 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8624
8625 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
8626 hppaobsd_store_registers): Use ptid from regcache.
8627
8628 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8629
8630 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
8631 hppanbsd_store_registers): Use ptid from regcache.
8632
8633 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8634
8635 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
8636 from regcache. Use get_ptrace_pid.
8637
8638 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8639
8640 * corelow.c (get_core_register_section): Use ptid from regcache,
8641 update doc.
8642
8643 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8644
8645 * bsd-uthread.c (bsd_uthread_fetch_registers,
8646 bsd_uthread_store_registers): Use ptid from regcache, set and
8647 restore inferior_ptid.
8648
8649 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8650
8651 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
8652 fetch_fp_regs, store_register, store_regs, store_fp_register,
8653 store_fp_regs): Use ptid from regcache.
8654
8655 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8656
8657 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
8658 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
8659 store_vfp_regs): Use ptid from regcache.
8660
8661 2017-03-17 Pedro Alves <palves@redhat.com>
8662
8663 PR remote/21188
8664 * ser-base.c (ser_base_wait_for): Add comment.
8665 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
8666 version.
8667 * ser-unix.c (hardwire_raw): Remove reference to
8668 scb->current_timeout.
8669 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
8670 (hardwire_ops): Install ser_base_readchar instead of
8671 hardwire_readchar.
8672 * serial.h (struct serial) <current_timeout, timeout_remaining>:
8673 Remove fields.
8674
8675 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
8676
8677 PR gdb/19637
8678 * python/lib/gdb/printer/bound_registers.py: Add support for
8679 Python 3.
8680
8681 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
8682
8683 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
8684 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
8685 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
8686 byte_offset to subobj_byte_offset. Fix the handling of
8687 DWARF_VALUE_STACK on big-endian targets when coming via an
8688 implicit pointer.
8689 (dwarf2_evaluate_loc_desc): Adjust call to
8690 dwarf2_evaluate_loc_desc_full.
8691 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
8692 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
8693
8694 2017-03-16 Yao Qi <yao.qi@linaro.org>
8695
8696 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
8697 and REVSH instructions.
8698
8699 2017-03-16 Yao Qi <yao.qi@linaro.org>
8700
8701 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
8702 (arm_record_test): Declare.
8703 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
8704 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
8705 align with the manual.
8706 (thumb_record_misc): Adjust the code order to align with the
8707 manual.
8708 (thumb2_record_decode_insn_handler): Fix instruction matching.
8709 (instruction_reader_thumb): New class.
8710 (arm_record_test): New function.
8711
8712 2017-03-16 Yao Qi <yao.qi@linaro.org>
8713
8714 * arm-tdep.c (abstract_memory_reader): New class.
8715 (instruction_reader): New class.
8716 (extract_arm_insn): Add argument 'reader'. Callers updated.
8717 (decode_insn): Likewise.
8718
8719 2017-03-16 Doug Evans <dje@google.com>
8720
8721 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
8722 member. Change type of TYPE member to SCM. All uses updated.
8723 (lsscm_make_lazy_string_smob): Add assert.
8724 (lsscm_make_lazy_string): Flag bad length values.
8725 (lsscm_elt_type): New function.
8726 (gdbscm_lazy_string_to_value): Rewrite to use
8727 lsscm_safe_lazy_string_to_value.
8728 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
8729 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
8730 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
8731 in incoming type.
8732 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
8733 * guile/scm-type.c (tyscm_scm_to_type): New function.
8734
8735 2017-03-15 Doug Evans <dje@google.com>
8736
8737 PR python/17728, python/18439, python/18779
8738 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
8739 member. Change type of TYPE member to PyObject *. All uses updated.
8740 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
8741 (gdbpy_create_lazy_string_object): Flag bad length values.
8742 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
8743 Handle typedefs in incoming type.
8744 (stpy_lazy_string_elt_type): New function.
8745 (gdbpy_extract_lazy_string): Call it.
8746 * python/py-value.c (valpy_lazy_string): Flag bad length values.
8747 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
8748 typedefs in incoming type.
8749
8750 2017-03-16 Doug Evans <dje@google.com>
8751
8752 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
8753 * guile/scm-type.c (tyscm_scm_to_type): New function.
8754
8755 2017-03-16 Jiong Wang <jiong.wang@arm.com>
8756
8757 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
8758 "ULONGEST" for "skip".
8759
8760 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
8761
8762 PR gdb/21220
8763 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
8764 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
8765 (inf_ptrace_peek_poke): ...here. New function. Now also loop
8766 over ptrace peek/poke until end of buffer or error.
8767
8768 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
8769
8770 * parse.c (length_of_subexp): Make static.
8771 * parser-defs.h (length_of_subexp): Remove.
8772
8773 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
8774
8775 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
8776 as well.
8777
8778 2017-03-14 Pedro Alves <palves@redhat.com>
8779
8780 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
8781 (main): Use std::unique_ptr. Remove calls to
8782 cp_demangled_name_parse_free.
8783
8784 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8785
8786 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
8787 alphabsd_store_inferior_registers): Use regcache->ptid instead
8788 of inferior_ptid.
8789
8790 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8791
8792 * aix-thread.c (aix_thread_fetch_registers,
8793 aix_thread_store_registers): Use regcache->ptid instead of
8794 inferior_ptid.
8795
8796 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8797
8798 * aarch64-linux-nat.c (fetch_gregs_from_thread,
8799 store_gregs_to_thread, fetch_fpregs_from_thread,
8800 store_fpregs_to_thread): Use regcache->ptid instead of
8801 inferior_ptid.
8802
8803 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8804
8805 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
8806 amd64_linux_fetch_inferior_registers): Use regcache->ptid
8807 instead of inferior_ptid.
8808
8809 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8810
8811 * target.c (target_fetch_registers, target_store_registers): Add
8812 assert.
8813
8814 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8815
8816 * regcache.h (regcache_get_ptid): New function.
8817 * regcache.c (regcache_get_ptid): New function.
8818
8819 2017-03-13 Mark Wielaard <mark@klomp.org>
8820
8821 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
8822
8823 2017-03-10 Keith Seitz <keiths@redhat.com>
8824
8825 PR c++/8218
8826 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
8827
8828 2017-03-08 Pedro Alves <palves@redhat.com>
8829
8830 PR gdb/18360
8831 * infrun.c (start_step_over, do_target_resume, resume)
8832 (restart_threads): Assert we're not resuming a thread that is
8833 meant to be stopped.
8834 (infrun_thread_stop_requested_callback): Delete.
8835 (infrun_thread_stop_requested): If the thread is internally
8836 stopped, queue a pending stop event and clear the thread's
8837 inline-frame state.
8838 (handle_stop_requested): New function.
8839 (handle_syscall_event, handle_inferior_event_1): Use
8840 handle_stop_requested.
8841 (handle_stop_requested): New function.
8842 (handle_signal_stop): Set the thread's stop_signal here instead of
8843 at caller.
8844 (finish_step_over): Clear step over info unconditionally.
8845 (handle_signal_stop): If the user had interrupted the event
8846 thread, consider the stop a random signal.
8847 (handle_signal_stop) <signal arrived while stepping over
8848 breakpoint>: Don't restart threads here.
8849 (stop_waiting): Don't clear step-over info here.
8850
8851 2017-03-08 Pedro Alves <palves@redhat.com>
8852
8853 PR 21206
8854 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
8855 goes to argument 2, not 1.
8856
8857 2017-03-08 Pedro Alves <palves@redhat.com>
8858
8859 PR cli/21218
8860 * top.c (gdb_readline_wrapper): Avoid passing NULL to
8861 display_gdb_prompt.
8862 (command_line_input): Add comment.
8863
8864 2017-03-08 Pedro Alves <palves@redhat.com>
8865
8866 PR tui/21216
8867 * tui/tui-file.c (tui_file::write): New.
8868 * tui/tui-file.h (tui_file): Override "write".
8869 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
8870 factored out from ...
8871 (tui_puts): ... here.
8872 (tui_putc): Use them.
8873 (tui_write): New function.
8874 * tui/tui-io.h (tui_write): Declare.
8875
8876 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
8877
8878 * Makefile.in (SFILES): Replace "environ.c" with
8879 "common/environ.c".
8880 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
8881 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
8882 to...
8883 * common/environ.c: ... here.
8884 * environ.h: Moved to...
8885 * common/environ.h: ... here.
8886
8887 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
8888
8889 * gdbarch.sh (pstring_ptr): New static function.
8890 (gdbarch_disassembler_options): Use it.
8891 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
8892 not valid_disassembler_option->name.
8893 * gdbarch.c: Regenerate.
8894
8895 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
8896
8897 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
8898
8899 2017-03-07 Pedro Alves <palves@redhat.com>
8900
8901 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
8902
8903 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
8904
8905 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
8906 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
8907 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
8908 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
8909
8910 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
8911
8912 * xtensa-linux-nat.c (fetch_gregs): Remove const.
8913
8914 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
8915
8916 * remote.c (remote_add_target_side_commands): Use range-based
8917 for loop.
8918
8919 2017-03-03 Yao Qi <yao.qi@linaro.org>
8920
8921 PR gdb/21165
8922 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
8923 value is lazy.
8924 * valprint.c (common_val_print): Likewise.
8925
8926 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
8927
8928 * NEWS: Mention new set/show disassembler-options commands.
8929 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
8930 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
8931 (prospective_options): New static variable.
8932 (gdb_disassembler::gdb_disassembler): Initialize
8933 m_di.disassembler_options.
8934 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
8935 (get_disassembler_options): New function.
8936 (set_disassembler_options): Likewise.
8937 (set_disassembler_options_sfunc): Likewise.
8938 (show_disassembler_options_sfunc): Likewise.
8939 (disassembler_options_completer): Likewise.
8940 (_initialize_disasm): Likewise.
8941 * disasm.h (get_disassembler_options): New prototype.
8942 (set_disassembler_options): Likewise.
8943 * gdbarch.sh (gdbarch_disassembler_options): New variable.
8944 (gdbarch_verify_disassembler_options): Likewise.
8945 * gdbarch.c: Regenerate.
8946 * gdbarch.h: Likewise.
8947 * arm-tdep.c (num_disassembly_options): Delete.
8948 (set_disassembly_style): Likewise.
8949 (arm_disassembler_options): New static variable.
8950 (set_disassembly_style_sfunc): Convert short style name into long
8951 option name. Call set_disassembler_options.
8952 (show_disassembly_style_sfunc): New function.
8953 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
8954 set_gdbarch_verify_disassembler_options.
8955 (_initialize_arm_tdep): Delete regnames variable and update callers.
8956 (arm_disassembler_options): Initialize.
8957 (disasm_options): New variable.
8958 (num_disassembly_options): Rename from this...
8959 (num_disassembly_styles): ...to this. Compute by scanning through
8960 disasm_options.
8961 (valid_disassembly_styles): Initialize using disasm_options.
8962 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
8963 set_arm_regname_option.
8964 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
8965 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
8966 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
8967 set_gdbarch_verify_disassembler_options.
8968 * s390-tdep.c (s390_disassembler_options): New static variable.
8969 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
8970 set_gdbarch_verify_disassembler_options.
8971
8972 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
8973
8974 * remote.c (remote_add_target_side_condition): Remove "struct"
8975 keyword from range-based for loop.
8976
8977 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
8978
8979 * remote.c (remote_add_target_side_condition): Use range-based
8980 for loop. Update comment.
8981
8982 2017-02-27 Yao Qi <yao.qi@linaro.org>
8983
8984 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
8985
8986 2017-02-26 Alan Hayward <alan.hayward@arm.com>
8987
8988 * regcache.c (regcache_raw_update): New function.
8989 (regcache_raw_read): Move code to regcache_raw_update.
8990 * regcache.h (regcache_raw_update): New declaration.
8991 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
8992
8993 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
8994
8995 * dwarf2read.c (create_debug_type_hash_table): Initialize
8996 header.signature and header.type_offset_in_tu.
8997
8998 2017-02-24 Pedro Alves <palves@redhat.com>
8999
9000 * symtab.c (make_file_symbol_completion_list_1): Use
9001 add_symtab_completions.
9002
9003 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9004
9005 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
9006
9007 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9008
9009 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
9010 I386_MAX_REGISTER_SIZE.
9011 (i386_pseudo_register_write): Likewise.
9012 (i386_process_record): Likewise.
9013 * i387-tdep.c (i387_supply_xsave): Likewise.
9014 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
9015 (store_register): Likewise.
9016
9017 2017-02-23 Pedro Alves <palves@redhat.com>
9018
9019 * ada-lang.c: Include "common/function-view.h".
9020 (ada_iterate_over_symbols): Adjust to use function_view as
9021 callback type.
9022 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
9023 (ada_make_symbol_completion_list): Use a lambda.
9024 (ada_exc_search_name_matches): Delete.
9025 (name_matches_regex): New.
9026 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
9027 * compile/compile-c-support.c: Include "common/function-view.h".
9028 (print_one_macro): Change prototype to accept a ui_file pointer.
9029 (write_macro_definitions): Use a lambda.
9030 * dwarf2read.c: Include "common/function-view.h".
9031 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
9032 (dw2_expand_symtabs_matching): Adjust to use function_view as
9033 callback type.
9034 * language.h: Include "common/function-view.h".
9035 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
9036 function_view as callback type.
9037 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
9038 * linespec.c: Include "common/function-view.h".
9039 (collect_info::add_symbol): New method.
9040 (struct symbol_and_data_callback, iterate_inline_only, struct
9041 symbol_matcher_data, iterate_name_matcher): Delete.
9042 (iterate_over_all_matching_symtabs): Adjust to use function_view
9043 as callback type and lambdas.
9044 (iterate_over_file_blocks): Adjust to use function_view as
9045 callback type.
9046 (decode_compound_collector): Now a class with private fields.
9047 (decode_compound_collector::release_symbols): New method.
9048 (collect_one_symbol): Rename to...
9049 (decode_compound_collector::operator()): ... this and adjust.
9050 (lookup_prefix_sym): decode_compound_collector construction bits
9051 move to decode_compound_collector ctor. Pass the
9052 decode_compound_collector object directly as callback. Remove
9053 cleanups and use decode_compound_collector::release_symbols
9054 instead.
9055 (symtab_collector): Now a class with private fields.
9056 (symtab_collector::release_symtabs): New method.
9057 (add_symtabs_to_list): Rename to...
9058 (symtab_collector::operator()): ... this and adjust.
9059 (collect_symtabs_from_filename): symtab_collector construction
9060 bits move to symtab_collector ctor. Pass the symtab_collector
9061 object directly as callback. Remove cleanups and use
9062 symtab_collector::release_symtabs instead.
9063 (collect_symbols): Delete.
9064 (add_matching_symbols_to_info): Use lambdas.
9065 * macrocmd.c (print_macro_callback): Delete.
9066 (info_macro_command): Use a lambda.
9067 (info_macros_command): Pass print_macro_definition as callable
9068 directly.
9069 (print_one_macro): Remove 'ignore' parameter.
9070 (macro_list_command): Adjust.
9071 * macrotab.c (macro_for_each_data::fn): Now a function_view.
9072 (macro_for_each_data::user_data): Delete field.
9073 (foreach_macro): Adjust to call the function_view.
9074 (macro_for_each): Adjust to use function_view as callback type.
9075 (foreach_macro_in_scope): Adjust to call the function_view.
9076 (macro_for_each_in_scope): Adjust to use function_view as callback
9077 type.
9078 * macrotab.h: Include "common/function-view.h".
9079 (macro_callback_fn): Declare a prototype instead of a pointer.
9080 Remove "user_data" parameter.
9081 (macro_for_each, macro_for_each_in_scope): Adjust to use
9082 function_view as callback type.
9083 * psymtab.c (partial_map_expand_apply)
9084 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
9085 Adjust to use function_view as callback type and to return bool.
9086 (psym_expand_symtabs_matching): Adjust to use function_view as
9087 callback types.
9088 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
9089 to use function_view as callback type and to return bool.
9090 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
9091 callback types.
9092 * symfile.c (expand_symtabs_matching): Adjust to use function_view
9093 as callback types.
9094 * symfile.h: Include "common/function-view.h".
9095 (expand_symtabs_file_matcher_ftype)
9096 (expand_symtabs_symbol_matcher_ftype)
9097 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
9098 return bool.
9099 (quick_symbol_functions::map_symtabs_matching_filename)
9100 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
9101 function_view as callback type and return bool.
9102 (expand_symtabs_matching): Adjust to use function_view as callback
9103 type.
9104 (maintenance_expand_name_matcher)
9105 (maintenance_expand_file_matcher): Delete.
9106 (maintenance_expand_symtabs): Use lambdas.
9107 * symtab.c (iterate_over_some_symtabs): Adjust to use
9108 function_view as callback types and return bool.
9109 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
9110 of a cleanup.
9111 (lookup_symtab_callback): Delete.
9112 (lookup_symtab): Use a lambda.
9113 (iterate_over_symbols): Adjust to use function_view as callback
9114 type.
9115 (struct search_symbols_data, search_symbols_file_matches)
9116 (search_symbols_name_matches): Delete.
9117 (search_symbols): Use a pair of lambdas.
9118 (struct add_name_data, add_macro_name, symbol_completion_matcher)
9119 (symtab_expansion_callback): Delete.
9120 (default_make_symbol_completion_list_break_on_1): Use lambdas.
9121 * symtab.h: Include "common/function-view.h".
9122 (iterate_over_some_symtabs): Adjust to use function_view as
9123 callback type and return bool.
9124 (iterate_over_symtabs): Adjust to use function_view as callback
9125 type.
9126 (symbol_found_callback_ftype): Remove 'data' parameter and return
9127 bool.
9128 (iterate_over_symbols): Adjust to use function_view as callback
9129 type.
9130
9131 2017-02-23 Pedro Alves <palves@redhat.com>
9132
9133 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
9134 (%.o) <unittests/%.c>: New pattern.
9135 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
9136 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
9137 * common/function-view.h: New file.
9138 * unittests/function-view-selftests.c: New file.
9139 * configure: Regenerate.
9140
9141 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
9142
9143 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
9144 inferior_ptid.
9145 * go32-nat.c (go32_thread_alive): Likewise.
9146
9147 2017-02-23 Yao Qi <yao.qi@linaro.org>
9148
9149 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
9150 delete.
9151
9152 2017-02-23 Yao Qi <yao.qi@linaro.org>
9153
9154 * varobj.c (varobj_clear_saved_item): Use delete instead of
9155 xfree.
9156 (update_dynamic_varobj_children): Likewise.
9157
9158 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9159
9160 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
9161
9162 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
9163
9164 * common/enum-flags.h (enum_flags::enum_flags): Initialize
9165 m_enum_value to 0 in default constructor.
9166
9167 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9168
9169 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
9170 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
9171 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
9172 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
9173 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
9174 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
9175 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
9176 IS_STORE_CONDITIONAL_INSN.
9177
9178 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9179
9180 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
9181
9182 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9183
9184 * NEWS (Changes since GDB 7.12): Add DWARF-5.
9185
9186 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9187
9188 * dwarf2read.c (skip_one_die, read_attribute_value)
9189 (dwarf2_const_value_attr, dump_die_shallow)
9190 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9191 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
9192
9193 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9194
9195 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
9196 (dwarf_parse_macro_header): Accept DWARF version 5.
9197 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
9198
9199 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9200
9201 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
9202 DW_AT_GNU_*.
9203 * common/common-exceptions.h (enum errors): Likewise.
9204 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
9205 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
9206 (dwarf_expr_context::execute_stack_op): Likewise.
9207 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
9208 Likewise.
9209 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
9210 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
9211 (show_entry_values_debug, call_site_to_target_addr)
9212 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
9213 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
9214 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
9215 (value_of_dwarf_block_entry, indirect_pieced_value)
9216 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
9217 (disassemble_dwarf_expression): Likewise.
9218 * dwarf2read.c (process_die, inherit_abstract_dies)
9219 (read_call_site_scope): Likewise.
9220 * gdbtypes.h (struct func_type, struct call_site_parameter)
9221 (struct call_site): Likewise.
9222 * stack.c (read_frame_arg): Likewise.
9223 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
9224
9225 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9226
9227 * defs.h (read_unsigned_leb128): New declaration.
9228 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
9229 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
9230 (dwarf2_find_location_expression): Call also
9231 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
9232 * dwarf2loc.h (dwarf2_version): New declaration.
9233 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
9234 rnglists.
9235 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
9236 .debug_rnglists.
9237 (struct dwop_section_names): Add loclists_dwo.
9238 (dwop_section_names): Add .debug_loclists.dwo.
9239 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
9240 (struct dwarf2_per_cu_data): Add dwarf_version.
9241 (struct dwo_sections): Add loclists.
9242 (struct attr_abbrev): Add implicit_const.
9243 (read_indirect_line_string): New declaration.
9244 (read_unsigned_leb128): Delete declaration.
9245 (rcuh_kind): New definition.
9246 (read_and_check_comp_unit_head): Change parameter
9247 is_debug_types_section to section_kind.
9248 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
9249 (read_comp_unit_head): Change parameter abfd to section, add parameter
9250 section_kind. Handle DWARF-5.
9251 (error_check_comp_unit_head): Accept also DWARF version 5.
9252 (read_and_check_comp_unit_head): Change parameter
9253 is_debug_types_section to section_kind.
9254 (read_and_check_type_unit_head): Delete function.
9255 (read_abbrev_offset): Handle DWARF-5.
9256 (create_debug_type_hash_table): Add parameter section_kind. Process
9257 only DW_UT_type. Use signature and type_offset_in_tu from struct
9258 comp_unit_head.
9259 (create_debug_types_hash_table): Update create_debug_type_hash_table
9260 caller.
9261 (create_all_type_units): Call create_debug_type_hash_table.
9262 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
9263 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
9264 caller.
9265 (skip_one_die): Handle DW_FORM_implicit_const.
9266 (dwarf2_rnglists_process): New function.
9267 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
9268 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
9269 (read_attribute_value): Handle DW_FORM_implicit_const,
9270 DW_FORM_line_strp.
9271 (read_attribute): Handle DW_FORM_implicit_const.
9272 (read_indirect_string_at_offset_from): New function from
9273 read_indirect_string_at_offset.
9274 (read_indirect_string_at_offset): Call
9275 read_indirect_string_at_offset_from.
9276 (read_indirect_line_string_at_offset): New function.
9277 (read_indirect_string): New function comment.
9278 (read_indirect_line_string): New function.
9279 (read_unsigned_leb128): Make it global.
9280 (dwarf2_string_attr): Handle DWARF-5.
9281 (add_include_dir_stub, read_formatted_entries): New functions.
9282 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
9283 Handle DWARF-5.
9284 (per_cu_header_read_in): Update read_comp_unit_head caller.
9285 (dwarf2_version): New function.
9286 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
9287 rnglists.
9288 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
9289 fields.
9290
9291 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9292
9293 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
9294
9295 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9296
9297 * dwarf2read.c (dwarf2_ranges_process): New function from
9298 dwarf2_ranges_read.
9299 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
9300 dwarf2_ranges_process.
9301
9302 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9303
9304 * dwarf2read.c (create_debug_type_hash_table): New function from
9305 create_debug_types_hash_table.
9306 (create_debug_types_hash_table): Call create_debug_type_hash_table.
9307 (create_all_type_units, open_and_init_dwo_file): Update
9308 create_debug_types_hash_table callers.
9309
9310 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9311
9312 PR gdb/16188
9313 * fork-child.c (trace_start_error): Fix thinko. va_end should
9314 refer to 'ap', not 'args'.
9315
9316 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9317 Pedro Alves <palves@redhat.com>
9318
9319 PR gdb/16188
9320 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
9321 calls succeeded.
9322 * fork-child.c (trace_start_error): New function.
9323 (trace_start_error_with_name): Likewise.
9324 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
9325 * inf-ptrace.c (inf_ptrace_me): Likewise.
9326 * inferior.h (trace_start_error): New prototype.
9327 (trace_start_error_with_name): Likewise.
9328
9329 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
9330
9331 PR gdb/21164
9332 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
9333 NULL before using it.
9334 * symmisc.c (maintenance_print_symbols): Likewise.
9335 (maintenance_print_msymbols): Likewise.
9336
9337 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9338
9339 * NEWS: Add record Python bindings entry.
9340
9341 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9342
9343 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
9344 py-record-full.o.
9345 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
9346 * python/py-record-btrace.c, python/py-record-btrace.h,
9347 python/py-record-full.c, python/py-record-full.h: New file.
9348 * python/py-record.c: Add include for py-record-btrace.h and
9349 py-record-full.h.
9350 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
9351 recpy_instruction_history, recpy_function_call_history, recpy_begin,
9352 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
9353 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
9354 New definition.
9355 (gdbpy_initialize_btrace): New export.
9356 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
9357
9358 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9359
9360 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
9361 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
9362 * python/py-record.c: New file.
9363 * python/python-internal.h (gdbpy_start_recording,
9364 gdbpy_current_recording, gdpy_stop_recording,
9365 gdbpy_initialize_record): New export.
9366 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
9367 (python_GdbMethods): Add gdbpy_start_recording,
9368 gdbpy_current_recording and gdbpy_stop_recording.
9369
9370 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9371
9372 * record-btrace.c (record_btrace_record_method): New function.
9373 (init_record_btrace_ops): Initialize to_record_method.
9374 * record-full.c (record_full_record_method): New function.
9375 (init_record_full_ops, init_record_full_core_ops): Add
9376 record_full_record_method.
9377 * record.h (enum record_method): New enum.
9378 * target-debug.h (target_debug_print_enum_record_method: New define.
9379 * target-delegates.c: Regenerate.
9380 * target.c (target_record_method): New function.
9381 * target.h: Include record.h.
9382 (struct target_ops) <to_record_method>: New field.
9383 (target_record_method): New export.
9384
9385 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9386
9387 * record.h (record_start, record_stop): New export.
9388 * record.c (record_start, record_stop): New function.
9389
9390 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9391
9392 * btrace.c (btrace_fetch): Copy function call segments pointer
9393 into a vector.
9394 (btrace_clear): Clear the vector.
9395 (btrace_find_insn_by_number): Use binary search to find the correct
9396 function call segment.
9397 * btrace.h (brace_fun_p): New typedef.
9398 (struct btrace_thread_info) <functions>: New field.
9399
9400 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9401
9402 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
9403 * btrace.c (btrace_decode_error): ... here. New function.
9404 * btrace.h (btrace_decode_error): New export.
9405
9406 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9407
9408 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
9409 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
9410 btrace_find_insn_by_number): Remove special case for gaps.
9411 * btrace.h (btrace_insn_get_error): New export.
9412 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
9413 * record-btrace.c (btrace_insn_history): Print number for gaps.
9414 (record_btrace_info, record_btrace_goto): Handle gaps.
9415
9416 2017-02-14 Tom Tromey <tom@tromey.com>
9417
9418 PR python/13598:
9419 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
9420 event.
9421 * python/py-evts.c (gdbpy_initialize_py_events): Add
9422 before_prompt registry.
9423 * python/py-events.h (events_object) <before_prompt>: New field.
9424
9425 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
9426
9427 * btrace.c (ftrace_new_switch): Preserve up link and flags.
9428
9429 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
9430
9431 * symfile (_initialize_symfile): Add usage text to the load command's
9432 help text.
9433
9434 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
9435
9436 * utils.c (defaulted_query): Don't query on secondary UIs.
9437
9438 2017-02-10 Tom Tromey <tom@tromey.com>
9439
9440 * rust-lang.c (rust_get_disr_info): Remove unused variable.
9441
9442 2017-02-10 Tom Tromey <tom@tromey.com>
9443
9444 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
9445 "cleanup" local.
9446 * python/py-type.c (typy_legacy_template_argument): Remove
9447 unnecessary "cleanup" local.
9448
9449 2017-02-10 Tom Tromey <tom@tromey.com>
9450
9451 * python/python.c (do_start_initialization): New function, from
9452 _initialize_python.
9453 (_initialize_python): Call do_start_initialization.
9454 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
9455 goto.
9456
9457 2017-02-10 Tom Tromey <tom@tromey.com>
9458
9459 * python/py-prettyprint.c (pretty_print_one_value): Use
9460 gdbpy_ref.
9461
9462 2017-02-10 Tom Tromey <tom@tromey.com>
9463
9464 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
9465 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
9466 gdbpy_ref.
9467 * python/py-type.c (field_new): Use gdbpy_ref.
9468 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
9469 gdbpy_ref.
9470 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
9471 (py_free_pspace): Likewise.
9472 (pspace_to_pspace_object): Likewise.
9473 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
9474 (py_free_objfile): Likewise.
9475 (objfile_to_objfile_object): Likewise.
9476 * python/py-inferior.c (delete_thread_object): Use
9477 gdbpy_ref.
9478 (infpy_read_memory): Likewise.
9479 (py_free_inferior): Likewise.
9480 * python/py-evtregistry.c (create_eventregistry_object): Use
9481 gdbpy_ref.
9482 * python/py-event.c (create_event_object): Use gdbpy_ref.
9483
9484 2017-02-10 Tom Tromey <tom@tromey.com>
9485
9486 * python/py-ref.h (gdbpy_ref_policy): Now a template.
9487 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
9488 used.
9489 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
9490 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
9491 python/py-exitedevent.c, python/py-finishbreakpoint.c,
9492 python/py-framefilter.c, python/py-function.c,
9493 python/py-inferior.c, python/py-infevents.c,
9494 python/py-linetable.c, python/py-newobjfileevent.c,
9495 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
9496 python/py-signalevent.c, python/py-stopevent.c,
9497 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
9498 python/py-unwind.c, python/py-utils.c, python/py-value.c,
9499 python/py-varobj.c, python/py-xmethods.c, python/python.c,
9500 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
9501
9502 2017-02-10 Tom Tromey <tom@tromey.com>
9503
9504 * ui-out.h (ui_out_emit_type): New class.
9505 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
9506 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
9507 and ui_out_emit_tuple.
9508 (enumerate_locals): Likewise.
9509 (py_mi_print_variables, py_print_locals, py_print_args): Use
9510 ui_out_emit_list.
9511 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
9512 ui_out_emit_list.
9513 * common/gdb_optional.h: New file.
9514
9515 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
9516
9517 * MAINTAINERS (Write After Approval): Update my e-mail address.
9518
9519 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
9520
9521 PR gdb/21122
9522 * breakpoint.c (_initialize_breakpoint): Update the help description
9523 of the 'commands' command to indicate that it takes a list argument.
9524
9525 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
9526
9527 * interps.c (current_interp_set_logging): Remove "return".
9528
9529 2017-02-09 Gary Benson <gbenson@redhat.com>
9530
9531 * symtab.c (add_symtab_completions): Prevent NULL pointer
9532 dereference.
9533
9534 2017-02-08 Pedro Alves <palves@redhat.com>
9535
9536 * interps.c (interp::interp): Remove reference to quiet_p.
9537 (interp_set): Make static. Remove dead "Switching to" output
9538 code.
9539 (interp_quiet_p, interp_set_quiet): Delete.
9540 (interpreter_exec_cmd): Don't set the interpreter quiet.
9541 * interps.h (interp_quiet_p): Make static.
9542 (class interp) <quiet_p>: Remove field
9543
9544 2017-02-08 Jerome Guitton <guitton@adacore.com>
9545
9546 * cli/cli-decode.c (find_command_name_length): Make it extern.
9547 * cli/cli-decode.h (find_command_name_length): Declare.
9548 * cli/cli-script.c (command_name_equals, line_first_arg):
9549 New functions.
9550 (process_next_line): Use cli-decode to parse command names.
9551 (build_command_line): Make args a constant pointer.
9552
9553 2017-02-08 Jerome Guitton <guitton@adacore.com>
9554
9555 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
9556 Remove case-insensitive search.
9557
9558 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
9559
9560 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
9561 at the end of the line. Avoids an ARI warning.
9562
9563 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
9564
9565 * NEWS: Mention support for record/replay of Intel 64 rdrand and
9566 rdseed instructions.
9567 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
9568
9569 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
9570
9571 PR tdep/20936
9572 Provide and use sparc32 and sparc64 target description XML files.
9573 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
9574 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
9575 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
9576 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
9577 * features/sparc/sparc32-solaris.xml: New file.
9578 * features/sparc/sparc64-solaris.xml: New file.
9579 * features/sparc/sparc32-solaris.c: Generated.
9580 * features/sparc/sparc64-solaris.c: Generated.
9581 * sparc-tdep.h: Account for differences in target descriptions.
9582 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
9583 (sparc32_register_type): Use target provided registers.
9584 (validate_tdesc_registers): New function.
9585 (sparc32_gdbarch_init): Use tdesc_has_registers.
9586 Set pseudoregister functions.
9587 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
9588 (sparc64_register_type): Use target provided registers.
9589 (sparc64_init_abi): Set pseudoregister functions.
9590
9591 2017-02-03 Tom Tromey <tom@tromey.com>
9592
9593 PR rust/21097:
9594 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
9595 with a single member.
9596
9597 2017-02-03 Pedro Alves <palves@redhat.com>
9598
9599 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
9600 (cli_interp_base::~cli_interp_base): New.
9601 (cli_interp): New struct.
9602 (as_cli_interp): Cast the interp itself to cli_interp.
9603 (cli_interpreter_pre_command_loop): Rename to ...
9604 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
9605 parameter.
9606 (cli_interpreter_init): Rename to ...
9607 (cli_interp::init): ... this. Remove 'self' parameter. Use
9608 boolean. Make extern.
9609 (cli_interpreter_resume): Rename to ...
9610 (cli_interp::resume): ... this. Remove 'data' parameter. Make
9611 extern.
9612 (cli_interpreter_suspend): Rename to ...
9613 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
9614 extern.
9615 (cli_interpreter_exec): Rename to ...
9616 (cli_interp::exec): ... this. Remove 'data' parameter. Make
9617 extern.
9618 (cli_interpreter_supports_command_editing): Rename to ...
9619 (cli_interp_base::supports_command_editing): ... this. Remove
9620 'interp' parameter. Make extern.
9621 (cli_ui_out): Rename to ...
9622 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
9623 Make extern.
9624 (cli_set_logging): Rename to ...
9625 (cli_interp_base::set_logging): ... this. Remove 'interp'
9626 parameter. Make extern.
9627 (cli_interp_procs): Delete.
9628 (cli_interp_factory): Adjust to use "new".
9629 * cli/cli-interp.h: Include "interps.h".
9630 (struct cli_interp_base): New struct.
9631 * interps.c (struct interp): Delete. Fields moved to interps.h.
9632 (interp_new): Delete.
9633 (interp::interp, interp::~interp): New.
9634 (interp_set): Use bool, and return void. Assume the interpreter
9635 has suspend, init and resume methods, and that the all return
9636 void.
9637 (set_top_level_interpreter): interp_set returns void.
9638 (interp_ui_out): Adapt.
9639 (current_interp_set_logging): Adapt.
9640 (interp_data): Delete.
9641 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
9642 (interp_exec): Adapt.
9643 (top_level_interpreter_data): Delete.
9644 * interps.h (interp_init_ftype, interp_resume_ftype)
9645 (interp_suspend_ftype, interp_exec_ftype)
9646 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
9647 (class interp): New.
9648 (interp_new): Delete.
9649 (interp_set): Now returns void. Use bool.
9650 (interp_data, top_level_interpreter_data): Delete.
9651 * mi/mi-common.h: Include interps.h.
9652 (class mi_interp): Inherit from interp. Define a ctor. Declare
9653 init, resume, suspect, exec, interp_ui_out, set_logging and
9654 pre_command_loop methods.
9655 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
9656 (mi_interpreter_init): Rename to ...
9657 (mi_interp::init): ... this. Remove the 'interp' parameter, use
9658 bool, return void and make extern. Adjust.
9659 (mi_interpreter_resume): ... Rename to ...
9660 (mi_interp::resume): ... this. Remove the 'data' parameter,
9661 return void and make extern. Adjust.
9662 (mi_interpreter_suspend): ... Rename to ...
9663 (mi_interp::suspend): ... this. Remove the 'data' parameter,
9664 return void and make extern. Adjust.
9665 (mi_interpreter_exec): ... Rename to ...
9666 (mi_interp::exec): ... this. Remove the 'data' parameter and make
9667 extern. Adjust.
9668 (mi_interpreter_pre_command_loop): ... Rename to ...
9669 (mi_interp::pre_command_loop): ... this. Remove the 'self'
9670 parameter and make extern.
9671 (mi_on_normal_stop_1): Adjust.
9672 (mi_ui_out): Rename to ...
9673 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
9674 parameter and make extern. Adjust.
9675 (mi_set_logging): Rename to ...
9676 (mi_interp::set_logging): ... this. Remove the 'interp'
9677 parameter and make extern. Adjust.
9678 (mi_interp_procs): Delete.
9679 (mi_interp_factory): Adjust to use 'new'.
9680 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
9681 (mi_print_exception, mi_execute_command, mi_load_progress):
9682 Adjust.
9683 * tui/tui-interp.c (tui_interp): New class.
9684 (as_tui_interp): Return a tui_interp pointer.
9685 (tui_on_normal_stop, tui_on_signal_received)
9686 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
9687 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
9688 to use interp::interp_ui_out.
9689 (tui_init): Rename to ...
9690 (tui_interp::init): ... this. Remove the 'self' parameter, use
9691 bool, return void and make extern. Adjust.
9692 (tui_resume): Rename to ...
9693 (tui_interp::resume): ... this. Remove the 'data' parameter,
9694 return void and make extern. Adjust.
9695 (tui_suspend): Rename to ...
9696 (tui_interp::suspend): ... this. Remove the 'data' parameter,
9697 return void and make extern. Adjust.
9698 (tui_ui_out): Rename to ...
9699 (tui_interp::interp_ui_out): ... this. Remove the 'self'
9700 parameter, and make extern. Adjust.
9701 (tui_exec): Rename to ...
9702 (tui_interp::exec): ... this. Remove the 'data' parameter and
9703 make extern.
9704 (tui_interp_procs): Delete.
9705 (tui_interp_factory): Use "new".
9706
9707 2017-02-02 Tom Tromey <tom@tromey.com>
9708
9709 * rust-exp.y (ends_raw_string, space_then_number)
9710 (rust_identifier_start_p): Return bool.
9711 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
9712 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
9713 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
9714 (rust_chartype_p): Return bool.
9715 (val_print_struct, rust_print_struct_def, rust_print_type):
9716 Update.
9717 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
9718 Return bool.
9719
9720 2017-02-02 Tom Tromey <tom@tromey.com>
9721
9722 * rust-lang.c: Reindent.
9723
9724 2017-02-02 Tom Tromey <tom@tromey.com>
9725
9726 * rust-lang.h (rust_crate_for_block): Update.
9727 * rust-lang.c (rust_crate_for_block): Return std::string.
9728 (rust_get_disr_info): Use std:;string, not
9729 gdb::unique_xmalloc_ptr.
9730 * rust-exp.y (crate_name): Update.
9731
9732 2017-02-02 Pedro Alves <palves@redhat.com>
9733
9734 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
9735 field out of gdb_disassembler_test and make it static.
9736
9737 2017-02-02 Pedro Alves <palves@redhat.com>
9738
9739 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
9740 mi1_interp and mi_interp fields.
9741
9742 2017-02-02 Pedro Alves <palves@redhat.com>
9743
9744 * cli/cli-interp.c (struct saved_output_files, saved_output):
9745 Moved from cli/cli-logging.c.
9746 (cli_set_logging): New function.
9747 (cli_interp_procs): Install cli_set_logging.
9748 * cli/cli-interp.h (make_logging_output, cli_set_logging):
9749 Declare.
9750 * cli/cli-logging.c (struct saved_output_files, saved_output):
9751 Moved to cli/cli-interp.c.
9752 (pop_output_files): Don't save outputs here.
9753 (make_logging_output): New function.
9754 (handle_redirections): Don't build tee nor save previous outputs
9755 here.
9756 * interps.c (current_interp_set_logging): Change prototype.
9757 Assume there's always a set_logging_proc method installed.
9758 * interps.h (interp_set_logging_ftype): Change prototype.
9759 (current_interp_set_logging): Change prototype and adjust comment.
9760 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
9761 use make_logging_output.
9762 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
9763 2017-02-02 Pedro Alves <palves@redhat.com>
9764
9765 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
9766 from ...
9767 (set_logging_overwrite): ... here.
9768 (logging_no_redirect_file): Delete.
9769 (set_logging_redirect): Don't handle redirection on the fly.
9770 Instead warn that "logging off" / "logging on" is necessary.
9771 (pop_output_files): Delete references to logging_no_redirect_file.
9772 (show_logging_command): Always speak in terms of what will happen
9773 once logging is reenabled.
9774
9775 2017-02-02 Pedro Alves <palves@redhat.com>
9776
9777 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
9778
9779 2017-02-02 Pedro Alves <palves@redhat.com>
9780
9781 * disasm.c (gdb_pretty_print_insn): Rename to ...
9782 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
9783 Remove gdbarch parameter. Adapt to clear the object's buffers
9784 instead of allocating new buffers, and to print using the object's
9785 gdb_disassembler instead of calling gdb_print_insn.
9786 (dump_insns): Use gdb_pretty_print_disassembler.
9787 * disasm.h (gdb_pretty_print_insn): Delete declaration.
9788 (gdb_pretty_print_disassembler): New class.
9789 * record-btrace.c (btrace_insn_history): Use
9790 gdb_pretty_print_disassembler.
9791
9792 2017-02-02 Pedro Alves <palves@redhat.com>
9793
9794 * ada-lang.c (type_as_string): Use string_file.
9795 * ada-valprint.c (ada_print_floating): Use string_file.
9796 * ada-varobj.c (ada_varobj_scalar_image)
9797 (ada_varobj_get_value_image): Use string_file.
9798 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
9799 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
9800 * breakpoint.c (update_inserted_breakpoint_locations)
9801 (insert_breakpoint_locations, reattach_breakpoints)
9802 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
9803 (print_it_watchpoint): Use string_file.
9804 (save_breakpoints): Use stdio_file.
9805 * c-exp.y (oper): Use string_file.
9806 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
9807 tee_file.
9808 (pop_output_files): Use delete.
9809 (handle_redirections): Use stdio_file and tee_file.
9810 * cli/cli-setshow.c (do_show_command): Use string_file.
9811 * compile/compile-c-support.c (c_compute_program): Use
9812 string_file.
9813 * compile/compile-c-symbols.c (generate_vla_size): Take a
9814 'string_file &' instead of a 'ui_file *'.
9815 (generate_c_for_for_one_variable): Take a 'string_file &' instead
9816 of a 'ui_file *'. Use string_file.
9817 (generate_c_for_variable_locations): Take a 'string_file &'
9818 instead of a 'ui_file *'.
9819 * compile/compile-internal.h (generate_c_for_for_one_variable):
9820 Take a 'string_file &' instead of a 'ui_file *'.
9821 * compile/compile-loc2c.c (push, pushf, unary, binary)
9822 (print_label, pushf_register_address, pushf_register)
9823 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
9824 'ui_file *'. Adjust.
9825 * compile/compile.c (compile_to_object): Use string_file.
9826 * compile/compile.h (compile_dwarf_expr_to_c)
9827 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
9828 'ui_file *'.
9829 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
9830 (replace_typedefs_qualified_name): Use string_file and
9831 obstack_copy0.
9832 * disasm.c (gdb_pretty_print_insn): Use string_file.
9833 (gdb_disassembly): Adjust reference the null_stream global.
9834 (do_ui_file_delete): Delete.
9835 (gdb_insn_length): Use null_stream.
9836 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
9837 * dwarf2loc.c (dwarf2_compile_property_to_c)
9838 (locexpr_generate_c_location, loclist_generate_c_location): Take a
9839 'string_file &' instead of a 'ui_file *'.
9840 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
9841 * dwarf2read.c (do_ui_file_peek_last): Delete.
9842 (dwarf2_compute_name): Use string_file.
9843 * event-top.c (gdb_setup_readline): Use stdio_file.
9844 * gdbarch.sh (verify_gdbarch): Use string_file.
9845 * gdbtypes.c (safe_parse_type): Use null_stream.
9846 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
9847 string_file.
9848 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
9849 'string_file *' instead of a 'ui_file *'.
9850 (gdbscm_arch_disassemble): Use string_file.
9851 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
9852 * guile/scm-ports.c (class ioscm_file_port): Now a class that
9853 inherits from ui_file.
9854 (ioscm_file_port_delete, ioscm_file_port_rewind)
9855 (ioscm_file_port_put): Delete.
9856 (ioscm_file_port_write): Rename to ...
9857 (ioscm_file_port::write): ... this. Remove file_port_magic
9858 checks.
9859 (ioscm_file_port_new): Delete.
9860 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
9861 ui_file_up.
9862 * guile/scm-type.c (tyscm_type_name): Use string_file.
9863 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
9864 Use string_file.
9865 * infcmd.c (print_return_value_1): Use string_file.
9866 * infrun.c (print_target_wait_results): Use string_file.
9867 * language.c (add_language): Use string_file.
9868 * location.c (explicit_to_string_internal): Use string_file.
9869 * main.c (captured_main_1): Use null_file.
9870 * maint.c (maintenance_print_architecture): Use stdio_file.
9871 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
9872 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
9873 event_channel>: Change type to mi_console_file pointer.
9874 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
9875 (mi_console_file_delete): Delete.
9876 (struct mi_console_file): Delete.
9877 (mi_console_file_magic): Delete.
9878 (mi_console_file_new): Delete.
9879 (mi_console_file::mi_console_file): New.
9880 (mi_console_file_delete): Delete.
9881 (mi_console_file_fputs): Delete.
9882 (mi_console_file::write): New.
9883 (mi_console_raw_packet): Delete.
9884 (mi_console_file::flush): New.
9885 (mi_console_file_flush): Delete.
9886 (mi_console_set_raw): Rename to ...
9887 (mi_console_file::set_raw): ... this.
9888 * mi/mi-console.h (class mi_console_file): New class.
9889 (mi_console_file_new, mi_console_set_raw): Delete.
9890 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
9891 (mi_set_logging): Use delete and tee_file. Adjust.
9892 * mi/mi-main.c (output_register): Use string_file.
9893 (mi_cmd_data_evaluate_expression): Use string_file.
9894 (mi_cmd_data_read_memory): Use string_file.
9895 (mi_cmd_execute, print_variable_or_computed): Use string_file.
9896 * mi/mi-out.c (mi_ui_out::main_stream): New.
9897 (mi_ui_out::rewind): Use main_stream and
9898 string_file.
9899 (mi_ui_out::put): Use main_stream and string_file.
9900 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
9901 Allocate a 'string_file' instead.
9902 (mi_out_new): Don't allocate a mem_fileopen stream here.
9903 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
9904 (mi_ui_out::main_stream): Declare method.
9905 * printcmd.c (eval_command): Use string_file.
9906 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
9907 * python/py-arch.c (archpy_disassemble): Use string_file.
9908 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
9909 * python/py-frame.c (frapy_str): Use string_file.
9910 * python/py-framefilter.c (py_print_type, py_print_single_arg):
9911 Use string_file.
9912 * python/py-type.c (typy_str): Use string_file.
9913 * python/py-unwind.c (unwind_infopy_str): Use string_file.
9914 * python/py-value.c (valpy_str): Use string_file.
9915 * record-btrace.c (btrace_insn_history): Use string_file.
9916 * regcache.c (regcache_print): Use stdio_file.
9917 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
9918 * remote.c (escape_buffer): Use string_file.
9919 * rust-lang.c (rust_get_disr_info): Use string_file.
9920 * serial.c (serial_open_ops_1): Use stdio_file.
9921 (do_serial_close): Use delete.
9922 * stack.c (print_frame_arg): Use string_file.
9923 (print_frame_args): Remove local mem_fileopen stream, not used.
9924 (print_frame): Use string_file.
9925 * symmisc.c (maintenance_print_symbols): Use stdio_file.
9926 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
9927 Take a 'string_file *' instead of a 'ui_file *'.
9928 * top.c (new_ui): Use stdio_file and stderr_file.
9929 (free_ui): Use delete.
9930 (execute_command_to_string): Use string_file.
9931 (quit_confirm): Use string_file.
9932 * tracepoint.c (collection_list::append_exp): Use string_file.
9933 * tui/tui-disasm.c (tui_disassemble): Use string_file.
9934 * tui/tui-file.c: Don't include "ui-file.h".
9935 (enum streamtype, struct tui_stream): Delete.
9936 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
9937 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
9938 (tui_file::tui_file): New method.
9939 (tui_file_fputs): Delete.
9940 (tui_file_get_strbuf): Delete.
9941 (tui_file::puts): New method.
9942 (tui_file_adjust_strbuf): Delete.
9943 (tui_file_flush): Delete.
9944 (tui_file::flush): New method.
9945 * tui/tui-file.h: Tweak intro comment.
9946 Include ui-file.h.
9947 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
9948 (tui_file_adjust_strbuf): Delete declarations.
9949 (class tui_file): New class.
9950 * tui/tui-io.c (tui_initialize_io): Use tui_file.
9951 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
9952 (tui_register_format): Use string_stream.
9953 * tui/tui-stack.c (tui_make_status_line): Use string_file.
9954 (tui_get_function_from_frame): Use string_file.
9955 * typeprint.c (type_to_string): Use string_file.
9956 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
9957 (null_stream): New global.
9958 (ui_file_delete): Delete.
9959 (ui_file::ui_file): New.
9960 (null_file_isatty): Delete.
9961 (ui_file::~ui_file): New.
9962 (null_file_rewind): Delete.
9963 (ui_file::printf): New.
9964 (null_file_put): Delete.
9965 (null_file_flush): Delete.
9966 (ui_file::putstr): New.
9967 (null_file_write): Delete.
9968 (ui_file::putstrn): New.
9969 (null_file_read): Delete.
9970 (ui_file::putc): New.
9971 (null_file_fputs): Delete.
9972 (null_file_write_async_safe): Delete.
9973 (ui_file::vprintf): New.
9974 (null_file_delete): Delete.
9975 (null_file::write): New.
9976 (null_file_fseek): Delete.
9977 (null_file::puts): New.
9978 (ui_file_data): Delete.
9979 (null_file::write_async_safe): New.
9980 (gdb_flush, ui_file_isatty): Adjust.
9981 (ui_file_put, ui_file_rewind): Delete.
9982 (ui_file_write): Adjust.
9983 (ui_file_write_for_put): Delete.
9984 (ui_file_write_async_safe, ui_file_read): Adjust.
9985 (ui_file_fseek): Delete.
9986 (fputs_unfiltered): Adjust.
9987 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
9988 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
9989 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
9990 (set_ui_file_data): Delete.
9991 (string_file::~string_file, string_file::write)
9992 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
9993 (do_ui_file_as_string, ui_file_as_string): Delete.
9994 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
9995 (struct mem_file): Delete.
9996 (mem_file_new): Delete.
9997 (stdio_file::stdio_file): New.
9998 (mem_file_delete): Delete.
9999 (stdio_file::stdio_file): New.
10000 (mem_fileopen): Delete.
10001 (stdio_file::~stdio_file): New.
10002 (mem_file_rewind): Delete.
10003 (stdio_file::set_stream): New.
10004 (mem_file_put): Delete.
10005 (stdio_file::open): New.
10006 (mem_file_write): Delete.
10007 (stdio_file_magic, struct stdio_file): Delete.
10008 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
10009 (stdio_file::flush): New.
10010 (stdio_file_read): Rename to ...
10011 (stdio_file::read): ... this. Adjust.
10012 (stdio_file_write): Rename to ...
10013 (stdio_file::write): ... this. Adjust.
10014 (stdio_file_write_async_safe): Rename to ...
10015 (stdio_file::write_async_safe) ... this. Adjust.
10016 (stdio_file_fputs): Rename to ...
10017 (stdio_file::puts) ... this. Adjust.
10018 (stdio_file_isatty): Delete.
10019 (stdio_file_fseek): Delete.
10020 (stdio_file::isatty): New.
10021 (stderr_file_write): Rename to ...
10022 (stderr_file::write) ... this. Adjust.
10023 (stderr_file_fputs): Rename to ...
10024 (stderr_file::puts) ... this. Adjust.
10025 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
10026 (stderr_file::stderr_file): New.
10027 (tee_file_magic): Delete.
10028 (struct tee_file): Delete.
10029 (tee_file::tee_file): New.
10030 (tee_file_new): Delete.
10031 (tee_file::~tee_file): New.
10032 (tee_file_delete): Delete.
10033 (tee_file_flush): Rename to ...
10034 (tee_file::flush): ... this. Adjust.
10035 (tee_file_write): Rename to ...
10036 (tee_file::write): ... this. Adjust.
10037 (tee_file::write_async_safe): New.
10038 (tee_file_fputs): Rename to ...
10039 (tee_file::puts): ... this. Adjust.
10040 (tee_file_isatty): Rename to ...
10041 (tee_file::isatty): ... this. Adjust.
10042 * ui-file.h (struct obstack, struct ui_file): Don't
10043 forward-declare.
10044 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
10045 (ui_file_write_ftype)
10046 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
10047 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
10048 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
10049 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
10050 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
10051 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
10052 (set_ui_file_fseek): Delete.
10053 (ui_file_data, ui_file_delete, ui_file_rewind)
10054 (struct ui_file): New.
10055 (ui_file_up): New.
10056 (class null_file): New.
10057 (null_stream): Declare.
10058 (ui_file_write_for_put, ui_file_put): Delete.
10059 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
10060 Delete.
10061 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
10062 (gdb_fopen, tee_file_new): Delete.
10063 (struct string_file): New.
10064 (struct stdio_file): New.
10065 (stdio_file_up): New.
10066 (struct stderr_file): New.
10067 (class tee_file): New.
10068 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
10069 of a 'ui_file *'. Adjust.
10070 * ui-out.h (class ui_out) <field_stream>: Likewise.
10071 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
10072 (null_stream): Delete.
10073 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
10074 Adjust.
10075 * utils.h (struct ui_file): Delete forward declaration..
10076 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
10077 (error_stream): Take a 'string_file &' instead of a
10078 'ui_file *'.
10079 * varobj.c (varobj_value_get_print_value): Use string_file.
10080 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
10081 * gdbarch.c: Regenerate.
10082
10083 2017-02-02 Pedro Alves <palves@redhat.com>
10084
10085 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
10086 (gdb_pretty_print_insn): ... this. Now a free function. Add back
10087 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
10088 Adjust to call gdb_print_insn instead of
10089 gdb_disassembler::print_insn.
10090 (dump_insns, do_mixed_source_and_assembly_deprecated)
10091 (do_mixed_source_and_assembly, do_assembly_only): Add back a
10092 'gdbarch' parameter. Remove gdb_disassembler parameter.
10093 (gdb_disassembly): Don't allocate a gdb_disassembler here.
10094 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
10095 declaration.
10096 (gdb_pretty_print_insn): Re-add declaration.
10097 * record-btrace.c (btrace_insn_history): Don't allocate a
10098 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
10099
10100 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
10101
10102 * disasm.h (gdb_disassembly): Remove file_string parameter.
10103 * disasm.c (gdb_disassembly): Likewise.
10104 * cli/cli-cmds.c (print_disassembly): Adapt.
10105 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
10106 * stack.c (do_gdb_disassembly): Likewise.
10107
10108 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
10109
10110 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
10111 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
10112 targets. And if the implicit value is longer than needed, extract
10113 the first bytes instead of the "least significant" ones.
10114
10115 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10116
10117 * btrace.c (btrace_enable): Do not call btrace_add_pc for
10118 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
10119 (btrace_fetch): Assert can_access_registers_ptid.
10120 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
10121 validate_registers_access.
10122
10123 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10124
10125 * gdbthread.h (can_access_registers_ptid): New.
10126 * thread.c (can_access_registers_ptid): New.
10127
10128 2017-02-01 Pedro Alves <palves@redhat.com>
10129
10130 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
10131
10132 2017-01-31 Pedro Alves <palves@redhat.com>
10133
10134 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
10135 Fix typos.
10136
10137 2017-01-31 Pedro Alves <palves@redhat.com>
10138
10139 * stack.c (print_frame_args): Remove local mem_fileopen stream,
10140 not used.
10141
10142 2017-01-31 Pedro Alves <palves@redhat.com>
10143
10144 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
10145
10146 2017-01-31 Pedro Alves <palves@redhat.com>
10147
10148 * common/scoped_restore.h
10149 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
10150 change the value's parameter type to T2.
10151 (make_scoped_restore): Likewise.
10152
10153 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10154 Richard Henderson <rth@redhat.com>
10155
10156 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
10157 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
10158 GS_BASE for older kernels.
10159 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
10160 GS_BASE for older kernels.
10161 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
10162 and GS_BASE to the offset table.
10163 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
10164 system register group.
10165 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
10166 for older kernels.
10167 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
10168 amd64 ABI.
10169 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
10170 AMD64_GSBASE_REGNUM.
10171 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
10172 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
10173 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
10174 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
10175 i386/64bit-segments.xml in those rules.
10176 * features/i386/64bit-segments.xml: New file.
10177 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
10178 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
10179 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
10180 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
10181 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
10182 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
10183 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
10184 * features/i386/amd64-avx-linux.c: Regenerated.
10185 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
10186 * features/i386/amd64-avx-mpx.c: Regenerated.
10187 * features/i386/amd64-avx512-linux.c: Regenerated.
10188 * features/i386/amd64-linux.c: Regenerated.
10189 * features/i386/amd64-mpx-linux.c: Regenerated.
10190 * features/i386/i386-avx-mpx-linux.c: Regenerated.
10191 * features/i386/i386-avx-mpx.c: Regenerated.
10192 * features/i386/x32-avx-linux.c: Regenerated.
10193 * features/i386/x32-avx512-linux.c: Regenerated.
10194 * regformats/i386/amd64-avx-linux.dat: Regenerated.
10195 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
10196 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
10197 * regformats/i386/amd64-linux.dat: Regenerated.
10198 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
10199 * regformats/i386/x32-avx-linux.dat: Regenerated.
10200 * regformats/i386/x32-avx512-linux.dat: Regenerated.
10201 * regformats/i386/x32-linux.dat: Regenerated.
10202
10203 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10204
10205 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
10206 Set to AMD64_NUM_REGS.
10207
10208 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10209
10210 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
10211 that checks validity of a register number.
10212
10213 2017-01-27 Kees Cook <keescook@google.com>
10214
10215 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
10216 fetch_fpregs if target has fpa registers.
10217 (arm_linux_store_inferior_registers): Call store_fpregs if target
10218 has fpa registers.
10219
10220 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
10221
10222 * cris-tdep.c (cris_gdbarch_init): Remove check for
10223 info.byte_order and force it to BFD_ENDIAN_LITTLE.
10224
10225 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
10226
10227 * corelow.c (get_core_register_section): Check for regset
10228 existence before checking for REGSET_VARIABLE_SIZE.
10229
10230 2017-01-26 Yao Qi <yao.qi@linaro.org>
10231 Pedro Alves <palves@redhat.com>
10232
10233 PR gdb/20939
10234 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
10235 call memory_error, save memaddr instead.
10236 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
10237 negative, cal memory_error.
10238 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
10239
10240 2017-01-26 Yao Qi <yao.qi@linaro.org>
10241
10242 * disasm-selftests.c (memory_error_test): New function.
10243 (_initialize_disasm_selftests): Register memory_error_test.
10244
10245 2017-01-26 Yao Qi <yao.qi@linaro.org>
10246
10247 * Makefile.in (SFILES): Add disasm-selftests.c and
10248 selftest-arch.c.
10249 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
10250 * disasm-selftests.c: New file.
10251 * selftest-arch.c: New file.
10252 * selftest-arch.h: New file.
10253
10254 2017-01-26 Yao Qi <yao.qi@linaro.org>
10255
10256 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
10257 to bfd_arch_mep. Don't return 0 if section is not
10258 found. Call print_insn_mep.
10259
10260 2017-01-26 Pedro Alves <palves@redhat.com>
10261 Yao Qi <yao.qi@linaro.org>
10262
10263 * arm-tdep.c: Include "disasm.h".
10264 (gdb_print_insn_arm): Update code to get gdbarch.
10265 * disasm.c (dis_asm_read_memory): Change it to
10266 gdb_disassembler::dis_asm_read_memory.
10267 (dis_asm_memory_error): Likewise.
10268 (dis_asm_print_address): Likewise.
10269 (gdb_pretty_print_insn): Change it to
10270 gdb_disassembler::pretty_print_insn.
10271 (dump_insns): Add one argument gdb_disassemlber. All
10272 callers updated.
10273 (do_mixed_source_and_assembly_deprecated): Likewise.
10274 (do_mixed_source_and_assembly): Likewise.
10275 (do_assembly_only): Likewise.
10276 (gdb_disassembler::gdb_disassembler): New.
10277 (gdb_disassembler::print_insn): New.
10278 * disasm.h (class gdb_disassembler): New.
10279 (gdb_pretty_print_insn): Remove declaration.
10280 (gdb_disassemble_info): Likewise.
10281 * guile/scm-disasm.c (class gdbscm_disassembler): New.
10282 (gdbscm_disasm_read_memory_worker): Update.
10283 (gdbscm_disasm_read_memory): Update.
10284 (gdbscm_disasm_memory_error): Remove.
10285 (gdbscm_disasm_print_address): Remove.
10286 (gdbscm_disassembler::gdbscm_disassembler): New.
10287 (gdbscm_print_insn_from_port): Update.
10288 * mips-tdep.c: Include disasm.h.
10289 (gdb_print_insn_mips): Update code to get gdbarch.
10290 * record-btrace.c (btrace_insn_history): Update.
10291 * spu-tdep.c: Include disasm.h.
10292 (struct spu_dis_asm_data): Remove.
10293 (struct spu_dis_asm_info): New.
10294 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
10295 SPU id.
10296 (gdb_print_insn_spu): Cast disassemble_info to
10297 spu_dis_asm_info.
10298
10299 2017-01-26 Yao Qi <yao.qi@linaro.org>
10300
10301 * disasm.c (do_ui_file_delete): Delete.
10302 (gdb_insn_length): Move code creating stream to ...
10303 * utils.c (null_stream): ... here. New function.
10304 * utils.h (null_stream): Declare.
10305
10306 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
10307
10308 * python/py-inferior.c (find_thread_object): Return directly
10309 from the loop. Remove "found" variable.
10310
10311 2017-01-21 Joel Brobecker <brobecker@adacore.com>
10312
10313 GDB 7.12.1 released.
10314
10315 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10316
10317 * python/py-function.c (fnpy_call): Reorder declarations to have
10318 the gdbpy_enter object declared first.
10319 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
10320
10321 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10322
10323 PR python/21068
10324 * python/python-internal.h (PyMem_RawMalloc): Define for
10325 Python < 3.4.
10326 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
10327 PyMem_RawMalloc instead of PyMem_Malloc.
10328
10329 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
10330 Luis Machado <lgustavo@codesourcery.com>
10331
10332 * NEWS (New commands): Mention flash-erase.
10333 (New MI commands): Mention target-flash-erase.
10334 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
10335 command.
10336 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
10337 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
10338 * target.c (flash_erase_command): New function.
10339 (initialize_targets): Add new flash-erase command.
10340 * target.h (flash_erase_command): New declaration.
10341
10342 2017-01-20 Joel Brobecker <brobecker@adacore.com>
10343
10344 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
10345 HAVE_SYS_PROCFS_H is defined.
10346
10347 2017-01-18 Alan Hayward <alan.hayward@arm.com>
10348
10349 * remote.c (struct cached_reg): Change data into a pointer.
10350 * (stop_reply_dtr): Free data pointers before deleting vector.
10351 (process_stop_reply): Likewise.
10352 (remote_parse_stop_reply): Allocate space for data
10353
10354 2017-01-18 Alan Hayward <alan.hayward@arm.com>
10355
10356 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
10357 MAX_REGISTER_SIZE.
10358 (amd64_pseudo_register_read_value): Likewise.
10359 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
10360 (store_register_using_P): Likewise.
10361 * regcache.c (regcache_xfer_part): Likewise.
10362
10363 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
10364
10365 Split real and pseudo registers.
10366 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
10367 (sparc32_pseudo_regnum): New enum.
10368 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
10369 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
10370 (SPARC32_CP0_REGISTERS): New macro.
10371 (sparc32_pseudo_register_name): New function.
10372 (sparc32_register_name): Use sparc32_pseudo_register_name.
10373 (sparc32_pseudo_register_type): New function.
10374 (sparc32_register_type): Use sparc32_pseudo_register_type.
10375 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
10376 pseudo register numbers.
10377 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
10378 (SPARC64_CP0_REGISTERS): New macro.
10379 (sparc64_pseudo_register_name): New function.
10380 (sparc64_register_name): Use sparc64_pseudo_register_name.
10381 (sparc64_pseudo_register_type): New function.
10382 (sparc64_register_type): Use sparc64_pseudo_register_type.
10383 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
10384 pseudo register numbers.
10385 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
10386 sparc64_store_arguments): Handle pseudo register numbers.
10387
10388 2017-01-13 Yao Qi <yao.qi@linaro.org>
10389
10390 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
10391 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
10392 output.
10393 (getpkt_or_notif_sane_1): Likewise.
10394
10395 2017-01-13 Yao Qi <yao.qi@linaro.org>
10396
10397 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
10398 of CC. Pass "-x c++-header" instead of "-x c".
10399
10400 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10401
10402 * remote.c (remote_can_async_p): Update comment.
10403
10404 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10405
10406 * linux-nat.c (linux_nat_can_async_p): Update comment.
10407
10408 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10409
10410 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
10411
10412 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
10413
10414 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
10415
10416 2017-01-10 Tom Tromey <tom@tromey.com>
10417
10418 * python/py-type.c (typy_legacy_template_argument): Update.
10419 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
10420 ~demangle_parse_info): Declare new members.
10421 (cp_demangled_name_to_comp): Return unique_ptr.
10422 (cp_demangled_name_parse_free)
10423 (make_cleanup_cp_demangled_name_parse_free)
10424 (cp_new_demangle_parse_info): Remove.
10425 * cp-support.c (do_demangled_name_parse_free_cleanup)
10426 (make_cleanup_cp_demangled_name_parse_free): Remove.
10427 (inspect_type, cp_canonicalize_string_full)
10428 (cp_canonicalize_string): Update.
10429 (mangled_name_to_comp): Change return type.
10430 (cp_class_name_from_physname, method_name_from_physname)
10431 (cp_func_name, cp_remove_params): Update.
10432 * cp-name-parser.y (demangle_parse_info): New constructor, from
10433 cp_new_demangle_parse_info.
10434 (~demangle_parse_info): New destructor, from
10435 cp_demangled_name_parse_free.
10436 (cp_merge_demangle_parse_infos): Update.
10437 (cp_demangled_name_to_comp): Change return type.
10438
10439 2017-01-10 Tom Tromey <tom@tromey.com>
10440
10441 * top.c (prevent_dont_repeat): Change return type.
10442 * python/python.c (execute_gdb_command): Use std::string.
10443 Update.
10444 * guile/guile.c (gdbscm_execute_gdb_command): Update.
10445 * command.h (prevent_dont_repeat): Change return type.
10446 * breakpoint.c (bpstat_do_actions_1): Update.
10447
10448 2017-01-10 Tom Tromey <tom@tromey.com>
10449
10450 * value.h (scoped_value_mark::~scoped_value_mark): Call
10451 free_to_mark.
10452 (scoped_value_mark::free_to_mark): New method.
10453 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
10454 scoped_value_mark.
10455
10456 2017-01-10 Tom Tromey <tom@tromey.com>
10457
10458 * python/py-value.c (valpy_dereference, valpy_referenced_value)
10459 (valpy_reference_value, valpy_const_value, valpy_get_address)
10460 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
10461 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
10462 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
10463 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
10464 scoped_value_mark.
10465 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
10466 * value.h (scoped_value_mark): New class.
10467
10468 2017-01-10 Tom Tromey <tom@tromey.com>
10469
10470 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
10471 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
10472 * psymtab.c (discard_psymtabs_upto): Remove.
10473 (make_cleanup_discard_psymtabs): Remove.
10474 (struct psymtab_state): Remove.
10475
10476 2017-01-10 Tom Tromey <tom@tromey.com>
10477
10478 * record-full.c (record_full_save_cleanups): Remove.
10479 (record_full_save): Use gdb::unlinker.
10480 * gcore.c (do_bfd_delete_cleanup): Remove.
10481 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
10482 cleanups.
10483 * dwarf2read.c (unlink_if_set): Remove.
10484 (write_psymtabs_to_index): Use gdb::unlinker.
10485 * common/gdb_unlinker.h: New file.
10486
10487 2017-01-10 Tom Tromey <tom@tromey.com>
10488
10489 * windows-tdep.c (windows_xfer_shared_library): Update.
10490 * windows-nat.c (windows_make_so): Update.
10491 * utils.h (make_cleanup_bfd_unref): Remove.
10492 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
10493 * symfile.h (symfile_bfd_open)
10494 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
10495 * symfile.c (read_symbols, symbol_file_add)
10496 (separate_debug_file_exists): Update.
10497 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
10498 (generic_load, reread_symbols): Update.
10499 * symfile-mem.c (symbol_file_add_from_memory): Update.
10500 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
10501 (spu_symbol_file_add_from_memory): Update.
10502 * solist.h (struct target_so_ops) <bfd_open>: Return
10503 gdb_bfd_ref_ptr.
10504 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
10505 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
10506 gdb_bfd_ref_ptr.
10507 (solib_map_sections, reload_shared_libraries_1): Update.
10508 * solib-svr4.c (enable_break): Update.
10509 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
10510 * solib-frv.c (enable_break2): Update.
10511 * solib-dsbt.c (enable_break): Update.
10512 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
10513 gdb_bfd_ref_ptr.
10514 (darwin_solib_get_all_image_info_addr_at_init): Update.
10515 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
10516 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
10517 * record-full.c (record_full_save): Update.
10518 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
10519 * procfs.c (insert_dbx_link_bpt_in_file): Update.
10520 * minidebug.c (find_separate_debug_file_in_section): Return
10521 gdb_bfd_ref_ptr.
10522 * machoread.c (macho_add_oso_symfile): Change abfd to
10523 gdb_bfd_ref_ptr.
10524 (macho_symfile_read_all_oso): Update.
10525 (macho_check_dsym): Return gdb_bfd_ref_ptr.
10526 (macho_symfile_read): Update.
10527 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
10528 (jit_bfd_try_read_symtab): Update.
10529 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10530 (gdb_bfd_openw, gdb_bfd_openr_iovec)
10531 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
10532 gdb_bfd_ref_ptr.
10533 (gdb_bfd_ref_policy): New struct.
10534 (gdb_bfd_ref_ptr): New typedef.
10535 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10536 (gdb_bfd_openw, gdb_bfd_openr_iovec)
10537 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
10538 gdb_bfd_ref_ptr.
10539 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
10540 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
10541 (gcore_command): Update.
10542 * exec.c (exec_file_attach): Update.
10543 * elfread.c (elf_symfile_read): Update.
10544 * dwarf2read.c (dwarf2_get_dwz_file): Update.
10545 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
10546 (open_and_init_dwo_file): Update.
10547 (open_dwp_file): Return gdb_bfd_ref_ptr.
10548 (open_and_init_dwp_file): Update.
10549 * corelow.c (core_open): Update.
10550 * compile/compile-object-load.c (compile_object_load): Update.
10551 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
10552 * coffread.c (coff_symfile_read): Update.
10553 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
10554 gdb_bfd_ref_ptr. Rename.
10555 (dump_bfd_file, restore_command): Update.
10556 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
10557 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
10558 (find_separate_debug_file_by_buildid): Update.
10559
10560 2017-01-10 Tom Tromey <tom@tromey.com>
10561
10562 * common/gdb_ref_ptr.h: New file.
10563 * python/py-ref.h (struct gdbpy_ref_policy): New.
10564 (gdbpy_ref): Now a typedef.
10565
10566 2017-01-10 Tom Tromey <tom@tromey.com>
10567
10568 * utils.h (make_cleanup_htab_delete): Don't declare.
10569 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
10570 Remove.
10571 * linespec.c (decode_compound_collector): Add constructor,
10572 destructor.
10573 (lookup_prefix_sym): Remove cleanup.
10574 (symtab_collector): Add constructor, destructor.
10575 (collect_symtabs_from_filename): Remove cleanup.
10576 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
10577 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
10578 Use htab_up.
10579 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
10580 * dwarf2read.c (dw2_expand_symtabs_matching)
10581 (dw2_map_symbol_filenames, dwarf_decode_macros)
10582 (write_psymtabs_to_index): Use htab_up.
10583 * dwarf2loc.c (func_verify_no_selftailcall)
10584 (call_site_find_chain_1, func_verify_no_selftailcall)
10585 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
10586 std::vector, gdb::unique_xmalloc_ptr.
10587 (call_sitep): Remove typedef.
10588 (dwarf2_locexpr_baton_eval): Remove unused variable.
10589
10590 2017-01-10 Tom Tromey <tom@tromey.com>
10591
10592 * python/python-internal.h (make_cleanup_py_decref)
10593 (make_cleanup_py_xdecref): Don't declare.
10594 * python/py-utils.c (py_decref, make_cleanup_py_decref)
10595 (py_xdecref, make_cleanup_py_xdecref): Remove.
10596
10597 2017-01-10 Tom Tromey <tom@tromey.com>
10598
10599 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
10600 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
10601
10602 2017-01-10 Tom Tromey <tom@tromey.com>
10603
10604 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
10605
10606 2017-01-10 Tom Tromey <tom@tromey.com>
10607
10608 * python/py-utils.c (unicode_to_encoded_string)
10609 (python_string_to_target_string)
10610 (python_string_to_target_python_string)
10611 (python_string_to_host_string, gdbpy_obj_to_string)
10612 (get_addr_from_python): Use gdbpy_ref.
10613
10614 2017-01-10 Tom Tromey <tom@tromey.com>
10615
10616 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
10617 gdbpy_ref.
10618
10619 2017-01-10 Tom Tromey <tom@tromey.com>
10620
10621 * python/python.c (eval_python_command, gdbpy_decode_line)
10622 (gdbpy_run_events, gdbpy_start_type_printers)
10623 (gdbpy_apply_type_printers): Use gdbpy_ref.
10624
10625 2017-01-10 Tom Tromey <tom@tromey.com>
10626
10627 * python/py-param.c (get_doc_string, compute_enum_values): Use
10628 gdbpy_ref.
10629
10630 2017-01-10 Tom Tromey <tom@tromey.com>
10631
10632 * python/py-inferior.c (find_thread_object, build_inferior_list):
10633 Use gdbpy_ref.
10634
10635 2017-01-10 Tom Tromey <tom@tromey.com>
10636
10637 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
10638
10639 2017-01-10 Tom Tromey <tom@tromey.com>
10640
10641 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
10642 gdbpy_ref.
10643
10644 2017-01-10 Tom Tromey <tom@tromey.com>
10645
10646 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
10647 extra incref.
10648 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
10649 Use gdbpy_ref.
10650
10651 2017-01-10 Tom Tromey <tom@tromey.com>
10652
10653 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
10654 gdbpy_ref.
10655
10656 2017-01-10 Tom Tromey <tom@tromey.com>
10657
10658 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
10659 decref results of PyArg_ParseTupleAndKeywords.
10660
10661 2017-01-10 Tom Tromey <tom@tromey.com>
10662
10663 * python/python.c (python_run_simple_file): Use
10664 unique_xmalloc_ptr, gdbpy_ref.
10665
10666 2017-01-10 Tom Tromey <tom@tromey.com>
10667
10668 * python/py-prettyprint.c (print_stack_unless_memory_error)
10669 (print_string_repr, print_children): Use gdbpy_ref.
10670 (dummy_python_frame): New class.
10671 (dummy_python_frame::dummy_python_frame): Rename from
10672 push_dummy_python_frame.
10673 (py_restore_tstate): Remove.
10674
10675 2017-01-10 Tom Tromey <tom@tromey.com>
10676
10677 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
10678
10679 2017-01-10 Tom Tromey <tom@tromey.com>
10680
10681 * python/python.c (ensure_python_env, restore_python_env):
10682 Remove.
10683 * python/python-internal.h (ensure_python_env): Don't declare.
10684 * varobj.h (varobj_ensure_python_env): Don't declare.
10685 * varobj.c (varobj_ensure_python_env): Remove.
10686
10687 2017-01-10 Tom Tromey <tom@tromey.com>
10688
10689 * varobj.c (varobj_value_get_print_value): Use
10690 gdbpy_enter_varobj.
10691
10692 2017-01-10 Tom Tromey <tom@tromey.com>
10693
10694 * python/py-prettyprint.c (print_string_repr, print_children):
10695 Update.
10696 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
10697 of "encoding".
10698 * varobj.c (varobj_value_get_print_value): Update.
10699 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
10700
10701 2017-01-10 Tom Tromey <tom@tromey.com>
10702
10703 * varobj.c (varobj_get_display_hint)
10704 (dynamic_varobj_has_child_method, install_new_value_visualizer)
10705 (varobj_set_visualizer, free_variable): Use
10706 gdbpy_enter_varobj.
10707
10708 2017-01-10 Tom Tromey <tom@tromey.com>
10709
10710 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
10711 (do_finish_initialization): New function. Use gdbpy_ref.
10712 (gdbpy_finish_initialization): Use gdbpy_enter. Call
10713 do_finish_initialization.
10714
10715 2017-01-10 Tom Tromey <tom@tromey.com>
10716
10717 * python/py-param.c (get_set_value, get_show_value): Use
10718 gdbpy_enter, gdbpy_ref.
10719
10720 2017-01-10 Tom Tromey <tom@tromey.com>
10721
10722 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
10723
10724 2017-01-10 Tom Tromey <tom@tromey.com>
10725
10726 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
10727
10728 2017-01-10 Tom Tromey <tom@tromey.com>
10729
10730 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
10731 Use gdbpy_enter_varobj.
10732
10733 2017-01-10 Tom Tromey <tom@tromey.com>
10734
10735 * varobj.c (gdbpy_enter_varobj): New constructor.
10736 * python/python-internal.h (gdbpy_enter_varobj): New class.
10737 * python/py-varobj.c (py_varobj_get_iterator): Use
10738 gdbpy_enter_varobj.
10739
10740 2017-01-10 Tom Tromey <tom@tromey.com>
10741
10742 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
10743 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
10744 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
10745 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
10746 unique_xmalloc_ptr.
10747 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
10748
10749 2017-01-10 Tom Tromey <tom@tromey.com>
10750
10751 * python/py-xmethods.c (invoke_match_method): Use
10752 gdbpy_ref.
10753
10754 2017-01-10 Tom Tromey <tom@tromey.com>
10755
10756 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
10757 gdbpy_enter, gdbpy_ref.
10758
10759 2017-01-10 Tom Tromey <tom@tromey.com>
10760
10761 * python/python.c (python_interactive_command): Use gdbpy_enter.
10762
10763 2017-01-10 Tom Tromey <tom@tromey.com>
10764
10765 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
10766 gdbpy_ref.
10767
10768 2017-01-10 Tom Tromey <tom@tromey.com>
10769
10770 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
10771 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
10772
10773 2017-01-10 Tom Tromey <tom@tromey.com>
10774
10775 * utils.h (htab_deleter): New struct.
10776 (htab_up): New typedef.
10777 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
10778 gdbpy_enter, gdbpy_ref, htab_up.
10779
10780 2017-01-10 Tom Tromey <tom@tromey.com>
10781
10782 * python/py-unwind.c (pending_frame_invalidate): Remove.
10783 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
10784
10785 2017-01-10 Tom Tromey <tom@tromey.com>
10786
10787 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
10788 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
10789
10790 2017-01-10 Tom Tromey <tom@tromey.com>
10791
10792 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
10793
10794 2017-01-10 Tom Tromey <tom@tromey.com>
10795
10796 * python/python.c (gdbpy_eval_from_control_command)
10797 (gdbpy_source_script, gdbpy_run_events)
10798 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
10799 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
10800 gdbpy_enter.
10801
10802 2017-01-10 Tom Tromey <tom@tromey.com>
10803
10804 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
10805
10806 2017-01-10 Tom Tromey <tom@tromey.com>
10807
10808 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
10809
10810 2017-01-10 Tom Tromey <tom@tromey.com>
10811
10812 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
10813 (python_on_inferior_call_pre, python_on_inferior_call_post)
10814 (python_on_memory_change, python_on_register_change)
10815 (python_inferior_exit, python_new_objfile, add_thread_object)
10816 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
10817
10818 2017-01-10 Tom Tromey <tom@tromey.com>
10819
10820 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
10821 (bpfinishpy_handle_exit): Use gdbpy_enter.
10822
10823 2017-01-10 Tom Tromey <tom@tromey.com>
10824
10825 * python/py-cmd.c (cmdpy_destroyer)
10826 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
10827 gdbpy_enter.
10828
10829 2017-01-10 Tom Tromey <tom@tromey.com>
10830
10831 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
10832 gdbpy_enter.
10833 (gdbpy_breakpoint_has_cond): Likewise.
10834
10835 2017-01-10 Tom Tromey <tom@tromey.com>
10836
10837 * python/python.c (gdbpy_enter): New constructor.
10838 (~gdbpy_enter): New destructor.
10839 (restore_python_env, ensure_python_env): Rewrite.
10840 * python/python-internal.h (gdbpy_enter): New class.
10841
10842 2017-01-10 Tom Tromey <tom@tromey.com>
10843
10844 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
10845
10846 2017-01-10 Tom Tromey <tom@tromey.com>
10847
10848 * python/py-value.c (value_has_field, get_field_flag)
10849 (get_field_type, valpy_getitem, convert_value_from_python): Use
10850 gdbpy_ref.
10851
10852 2017-01-10 Tom Tromey <tom@tromey.com>
10853
10854 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
10855 gdbpy_ref.
10856
10857 2017-01-10 Tom Tromey <tom@tromey.com>
10858
10859 * python/py-prettyprint.c (search_pp_list)
10860 (find_pretty_printer_from_objfiles)
10861 (find_pretty_printer_from_progspace)
10862 (find_pretty_printer_from_gdb, find_pretty_printer)
10863 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
10864 gdbpy_ref.
10865
10866 2017-01-10 Tom Tromey <tom@tromey.com>
10867
10868 * python/py-param.c (call_doc_function): Use gdbpy_ref.
10869
10870 2017-01-10 Tom Tromey <tom@tromey.com>
10871
10872 * python/py-linetable.c (build_line_table_tuple_from_pcs)
10873 (ltpy_get_all_source_lines): Use gdbpy_ref.
10874
10875 2017-01-10 Tom Tromey <tom@tromey.com>
10876
10877 * python/py-framefilter.c (extract_sym, extract_value)
10878 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
10879 gdbpy_ref.
10880
10881 2017-01-10 Tom Tromey <tom@tromey.com>
10882
10883 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
10884
10885 2017-01-10 Tom Tromey <tom@tromey.com>
10886
10887 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
10888
10889 2017-01-10 Tom Tromey <tom@tromey.com>
10890
10891 * python/py-function.c (convert_values_to_python, fnpy_init): Use
10892 gdbpy_ref.
10893
10894 2017-01-10 Tom Tromey <tom@tromey.com>
10895
10896 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
10897
10898 2017-01-10 Tom Tromey <tom@tromey.com>
10899
10900 * python/py-type.c (convert_field, make_fielditem, typy_fields)
10901 (typy_range): Use gdbpy_ref.
10902
10903 2017-01-10 Tom Tromey <tom@tromey.com>
10904
10905 * python/py-threadevent.c (create_thread_event_object): Use
10906 gdbpy_ref.
10907 * python/py-stopevent.c (create_stop_event_object): Simplify.
10908 (emit_stop_event): Use gdbpy_ref.
10909 * python/py-signalevent.c (create_signal_event_object): Use
10910 gdbpy_ref.
10911 * python/py-newobjfileevent.c (create_new_objfile_event_object)
10912 (emit_new_objfile_event, create_clear_objfiles_event_object)
10913 (emit_clear_objfiles_event): Use gdbpy_ref.
10914 * python/py-infevents.c (create_inferior_call_event_object)
10915 (create_register_changed_event_object)
10916 (create_memory_changed_event_object, emit_inferior_call_event)
10917 (emit_memory_changed_event, emit_register_changed_event): Use
10918 gdbpy_ref.
10919 * python/py-exitedevent.c (create_exited_event_object)
10920 (emit_exited_event): Use gdbpy_ref.
10921 * python/py-event.h (evpy_emit_event): Remove
10922 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
10923 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
10924 * python/py-continueevent.c (emit_continue_event): Use
10925 gdbpy_ref.
10926 * python/py-breakpoint.c (gdbpy_breakpoint_created)
10927 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
10928 gdbpy_ref.
10929 * python/py-bpevent.c (create_breakpoint_event_object): Use
10930 gdbpy_ref.
10931
10932 2017-01-10 Tom Tromey <tom@tromey.com>
10933
10934 * python/py-ref.h: New file.
10935
10936 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
10937
10938 * cli-out.c (cli_ui_out::do_redirect): Change return type to
10939 void.
10940 * cli-out.h (cli_ui_out::do_redirect): Likewise.
10941 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
10942 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
10943 * ui-out.c (ui_out::redirect): Likewise.
10944 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
10945 * cli/cli-logging.c (set_logging_redirect): Update call site of
10946 ui_out::redirect.
10947 (handle_redirections): Likewise.
10948 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
10949 * top.c (execute_command_to_string): Likewise.
10950 * utils.c (do_ui_out_redirect_pop): Likewise.
10951
10952 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
10953
10954 * stack.c (_initialize_stack): Update "frame" command help message.
10955
10956 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
10957
10958 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
10959
10960 2017-01-06 Yao Qi <yao.qi@linaro.org>
10961
10962 * x86-linux-nat.h: Include gdb_proc_service.h.
10963
10964 2017-01-06 Yao Qi <yao.qi@linaro.org>
10965
10966 * ser-base.h: Include serial.h.
10967
10968 2017-01-06 Yao Qi <yao.qi@linaro.org>
10969
10970 * ppc-linux-tdep.h: Include ppc-tdep.h.
10971
10972 2017-01-06 Yao Qi <yao.qi@linaro.org>
10973
10974 * nat/amd64-linux-siginfo.h: Include signal.h.
10975
10976 2017-01-06 Yao Qi <yao.qi@linaro.org>
10977
10978 * nat/aarch64-linux-hw-point.h: Include break-common.h.
10979
10980 2017-01-06 Yao Qi <yao.qi@linaro.org>
10981
10982 * mi/mi-parse.h: Include mi-cmds.h.
10983
10984 2017-01-06 Yao Qi <yao.qi@linaro.org>
10985
10986 * inf-loop.c: Don't include "target.h".
10987 * inf-loop.h: Include it here.
10988
10989 2017-01-06 Yao Qi <yao.qi@linaro.org>
10990
10991 * dfp.h: Include "dboulest.h" and "expression.h".
10992
10993 2017-01-06 Yao Qi <yao.qi@linaro.org>
10994
10995 * ax-gdb.h: Include "ax.h".
10996
10997 2017-01-06 Yao Qi <yao.qi@linaro.org>
10998
10999 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
11000 with nat/gdb_ptrace.h.
11001
11002 2017-01-05 Yao Qi <yao.qi@linaro.org>
11003
11004 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
11005 new line.
11006 (mips64_fbsd_sigframe_init): Likewise.
11007
11008 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11009
11010 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
11011 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
11012
11013 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11014
11015 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
11016 * NEWS: Mention new FreeBSD/mips native configuration.
11017 * config/mips/fbsd.mh: New file.
11018 * configure.host: Add mips*-*-freebsd*.
11019 * mips-fbsd-nat.c: New file.
11020
11021 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11022
11023 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
11024 (ALLDEPFILES): Add mips-fbsd-tdep.c.
11025 * NEWS: Mention new FreeBSD/mips target.
11026 * configure.tgt: Add mips*-*-freebsd*.
11027 * mips-fbsd-tdep.c: New file.
11028 * mips-fbsd-tdep.h: New file.
11029
11030 2017-01-04 Yao Qi <yao.qi@linaro.org>
11031
11032 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
11033 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
11034
11035 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11036
11037 Update copyright year range in all GDB files.
11038
11039 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11040
11041 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
11042
11043 For older changes see ChangeLog-2016.
11044 \f
11045 Local Variables:
11046 mode: change-log
11047 left-margin: 8
11048 fill-column: 74
11049 version-control: never
11050 coding: utf-8
11051 End: