]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/ChangeLog
Fix gdb 8.1 Solaris compilation
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
1 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2
3 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4 <sol2,sparc>: Likewise.
5 <sol2-64,i386>: Likewise.
6
7 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
8 -Wdeprecated-declarations on *-*-solaris*.
9 * configure: Regenerate.
10
11 * procfs.c: Include "nat/inferior.h".
12 (procfs_info_proc): Fix typo.
13
14 2017-09-21 Kevin Buettner <kevinb@redhat.com>
15
16 * remote.c (vector): Include.
17 (struct private_thread_info): Add field, thread_handle.
18 (free_private_thread_info): Deallocate storage associated with
19 thread handle.
20 (get_private_info_thread): Initialize `thread_handle' field.
21 (struct thread_item): Add field, thread_handle.
22 (clear_threads_listing_context): Deallocate storage associated
23 with thread handle.
24 (start_thread): Add support for "handle" attribute.
25 (thread_attributes): Add "handle".
26 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
27 field.
28 (remote_update_thread_list): Update thread_handle.
29 (remote_thread_handle_to_thread_info): New function.
30 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
31
32 2017-09-21 Kevin Buettner <kevinb@redhat.com>
33
34 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
35 function.
36 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
37 * python/python-internal.h (thread_object_type): Declare.
38
39 2017-09-21 Kevin Buettner <kevinb@redhat.com>
40
41 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
42 (target_thread_handle_to_thread_info): Declare.
43 * target.c (target_thread_handle_to_thread_info): New function.
44 * target-delegates.c: Regenerate.
45 * gdbthread.h (find_thread_by_handle): Declare.
46 * thread.c (find_thread_by_handle): New function.
47 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
48 function.
49 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
50
51 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
52
53 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
54
55 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
56
57 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
58
59 2017-09-21 Yao Qi <yao.qi@linaro.org>
60
61 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
62 to gdb_target_obs.
63
64 2017-09-20 Tom Tromey <tom@tromey.com>
65
66 * breakpoint.c (struct counted_command_line): Remove.
67 (breakpoint_commands): Update.
68 (alloc_counted_command_line, incref_counted_command_line)
69 (decref_counted_command_line, do_cleanup_counted_command_line)
70 (make_cleanup_decref_counted_command_line): Remove.
71 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
72 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
73 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
74 (save_breakpoints): Update.
75 * breakpoint.h (counted_command_line): Now a typedef to
76 shared_ptr.
77 (struct breakpoint) <commands>: Now a counted_command_line.
78 (struct bpstats) <command>: Likewise.
79
80 2017-09-20 Tom Tromey <tom@tromey.com>
81
82 * breakpoint.c (struct commands_info, do_map_commands_command):
83 Remove.
84 (commands_command_1): Update.
85 (iterate_over_related_breakpoints): Take a function_view.
86 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
87 (delete_command): Update.
88 (map_breakpoint_numbers): Take a function_view.
89 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
90 (disable_command): Update.
91 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
92 (enable_command): Update.
93 (struct disp_data, do_enable_breakpoint_disp)
94 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
95 (do_map_enable_delete_breakpoint): Remove.
96 (enable_once_command, enable_count_command, enable_delete_command)
97 (delete_trace_variable_command): Update.
98
99 2017-09-20 Tom Tromey <tom@tromey.com>
100
101 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
102 (bpstat_clear): Use delete.
103 (bpstats): New constructors.
104 (bpstat_copy, bpstat_stop_status): Use new.
105 (dprintf_after_condition_true): Update.
106 * breakpoint.h (bpstats::bpstats): Add constructors.
107 (bpstats::~bpstats): Add destructor.
108
109 2017-09-20 Pedro Alves <palves@redhat.com>
110
111 * eval.c (make_params): Delete, refactored as ...
112 (class fake_method): ... this new type's ctor.
113 (fake_method::~fake_method): New.
114 (evaluate_subexp_standard): Use 'fake_method'.
115
116 2017-09-20 Tom Tromey <tom@tromey.com>
117
118 * windows-nat.c (get_windows_debug_event, windows_wait)
119 (do_initial_windows_stuff, windows_attach): Update.
120 * utils.c (vwarning, internal_vproblem): Update.
121 (ui_unregister_input_event_handler_cleanup)
122 (prepare_to_handle_input): Remove.
123 (class scoped_input_handler): New.
124 (defaulted_query, prompt_for_continue): Update.
125 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
126 Update.
127 * top.c (undo_terminal_modifications_before_exit): Update.
128 * target/target.h (target_terminal_init, target_terminal_inferior)
129 (target_terminal_ours): Don't declare.
130 (class target_terminal): New.
131 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
132 (target_terminal_ours_for_output)
133 (make_cleanup_restore_target_terminal): Don't declare.
134 (target_terminal_info): Remove.
135 * target.c (enum terminal_state, terminal_state): Remove.
136 (target_terminal::terminal_state): Define.
137 (target_terminal::init): Rename from target_terminal_init.
138 (target_terminal::inferior): Rename from
139 target_terminal_inferior.
140 (target_terminal::ours): Rename from target_terminal_ours.
141 (target_terminal::ours_for_output): Rename from
142 target_terminal_ours_for_output.
143 (target_terminal::info): New method.
144 (cleanup_restore_target_terminal)
145 (make_cleanup_restore_target_terminal): Remove.
146 * solib.c (handle_solib_event): Update.
147 * remote.c (remote_serial_quit_handler): Update.
148 (remote_terminal_inferior, remote_wait_as): Update.
149 * record-full.c (record_full_wait_1): Update.
150 * nto-procfs.c (procfs_create_inferior): Update.
151 * nat/fork-inferior.c (startup_inferior): Update.
152 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
153 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
154 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
155 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
156 (mi_breakpoint_created, mi_breakpoint_deleted)
157 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
158 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
159 (mi_user_selected_context_changed, report_initial_inferior):
160 Update.
161 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
162 (linux_nat_terminal_inferior): Update.
163 * infrun.c (follow_fork_inferior)
164 (handle_vfork_child_exec_or_exit, do_target_resume)
165 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
166 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
167 Update.
168 * inflow.c (child_terminal_init, info_terminal_command): Update.
169 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
170 (attach_command): Update.
171 * infcall.c (call_thread_fsm_should_stop): Update.
172 * gnu-nat.c (gnu_attach): Update.
173 * extension.c (struct active_ext_lang_state)
174 (restore_active_ext_lang): Update.
175 * exceptions.c (print_flush): Update.
176 * event-top.c (async_enable_stdin, default_quit_handler): Update.
177 (struct quit_handler_cleanup_data, restore_quit_handler)
178 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
179 Remove.
180 * cp-support.c (gdb_demangle): Update.
181 * breakpoint.c (update_inserted_breakpoint_locations)
182 (insert_breakpoint_locations, handle_jit_event)
183 (disable_breakpoints_in_unloaded_shlib): Update.
184 * annotate.c (annotate_breakpoints_invalid)
185 (annotate_frames_invalid): Update.
186
187 2017-09-20 Tom Tromey <tom@tromey.com>
188
189 * main.c (catch_command_errors): Rename from
190 catch_command_errors_const.
191 (captured_main_1): Update.
192
193 2017-09-20 Pedro Alves <palves@redhat.com>
194
195 * cli/cli-cmds.c (list_command): Use print_sal_location.
196 (print_sal_location): New function.
197 (ambiguous_line_spec): Use print_sal_location.
198 * linespec.c (symbol_to_sal): Record the symbol in the sal.
199 * symtab.c (find_function_start_sal): Likewise.
200 * symtab.h (symtab_and_line::symbol): New field.
201
202 2017-09-20 Pedro Alves <palves@redhat.com>
203
204 * linespec.c (minsym_found): Handle non-text minsyms.
205 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
206
207 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
208
209 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
210 backslash.
211
212 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
213
214 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
215 vmovups instead vmovaps.
216 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
217
218 2017-09-19 John Baldwin <jhb@FreeBSD.org>
219
220 * NEWS (Changes since GDB 8.0): Add starti.
221 * infcmd.c (enum run_break): New.
222 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
223 case.
224 (run_command): Use enum run_how.
225 (start_command): Likewise.
226 (starti_command): New function.
227 (RUN_ARGS_HELP): New macro.
228 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
229 commands. Add starti command.
230
231 2017-09-19 Yao Qi <yao.qi@linaro.org>
232
233 * Makefile.in (monitor.o): Remove the rule.
234
235 2017-09-19 Yao Qi <yao.qi@linaro.org>
236
237 * annotate.h (struct annotate_arg_emitter): Use
238 DISABLE_COPY_AND_ASSIGN.
239 * common/refcounted-object.h (refcounted_object): Likewise.
240 * completer.h (struct completion_result): Likewise.
241 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
242 * filename-seen-cache.h (filename_seen_cache): Likewise.
243 * gdbcore.h (thread_section_name): Likewise.
244 * gdb_regex.h (compiled_regex): Likewise.
245 * gdbthread.h (scoped_restore_current_thread): Likewise.
246 * inferior.h (scoped_restore_current_inferior): Likewise.
247 * jit.c (jit_reader): Likewise.
248 * linespec.h (struct linespec_result): Likewise.
249 * mi/mi-parse.h (struct mi_parse): Likewise.
250 * nat/fork-inferior.c (execv_argv): Likewise.
251 * progspace.h (scoped_restore_current_program_space): Likewise.
252 * python/python-internal.h (class gdbpy_enter): Likewise.
253 * regcache.h (regcache): Likewise.
254 * target-descriptions.c (struct tdesc_reg): Likewise.
255 (struct tdesc_type): Likewise.
256 (struct tdesc_feature): Likewise.
257 * ui-out.h (ui_out_emit_type): Likewise.
258
259 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
260
261 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
262 label abort_expression.
263
264 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
265
266 * common/buffer.c (buffer_xml_printf): Adjust.
267 * common/xml-utils.c (xml_escape_text): Change return type to
268 std::string, update code accordingly.
269 * common/xml-utils.h (xml_escape_text): Change return type to
270 std::string.
271 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
272 * windows-tdep.c (windows_xfer_shared_library): Adjust.
273 * unittests/xml-utils-selftests.c (test_xml_escape_text):
274 Adjust.
275
276 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
277
278 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
279 (SUBDIR_UNITTESTS_OBS): Add new object file.
280 * unittests/xml-utils-selftests.c: New file.
281
282 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
283
284 * common/selftest.h (selftest): New struct/interface.
285 (register_test): Add name parameter, add new overload.
286 (run_tests): Add filter parameter.
287 (for_each_selftest_ftype): New typedef.
288 (for_each_selftest): New declaration.
289 * common/selftest.c (tests): Change type to
290 map<string, unique_ptr<selftest>>.
291 (simple_selftest): New struct.
292 (register_test): New function.
293 (register_test): Add name parameter and use it.
294 (run_tests): Add filter parameter and use it. Add prints.
295 Adjust to vector -> map change.
296 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
297 registering selftests.
298 * arm-tdep.c (_initialize_arm_tdep): Likewise.
299 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
300 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
301 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
302 * findvar.c (_initialize_findvar): Likewise.
303 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
304 * maint.c (maintenance_selftest): Update call to run_tests.
305 (maintenance_info_selftests): New function.
306 (_initialize_maint_cmds): Register "maintenance info selftests"
307 command. Update "maintenance selftest" doc.
308 * regcache.c (_initialize_regcache): Add names when registering
309 selftests.
310 * rust-exp.y (_initialize_rust_exp): Likewise.
311 * selftest-arch.c (gdbarch_selftest): New struct.
312 (gdbarch_tests): Remove.
313 (register_test_foreach_arch): Add name parameter. Call
314 register_test.
315 (tests_with_arch): Remove, move most content to
316 gdbarch_selftest::operator().
317 (_initialize_selftests_foreach_arch): Remove.
318 * selftest-arch.h (register_test_foreach_arch): Add name
319 parameter.
320 (run_tests_with_arch): New declaration.
321 * utils-selftests.c (_initialize_utils_selftests): Add names
322 when registering selftests.
323 * utils.c (_initialize_utils): Likewise.
324 * unittests/array-view-selftests.c
325 (_initialize_array_view_selftests): Likewise.
326 * unittests/environ-selftests.c (_initialize_environ_selftests):
327 Likewise.
328 * unittests/function-view-selftests.c
329 (_initialize_function_view_selftests): Likewise.
330 * unittests/offset-type-selftests.c
331 (_initialize_offset_type_selftests): Likewise.
332 * unittests/optional-selftests.c
333 (_initialize_optional_selftests): Likewise.
334 * unittests/scoped_restore-selftests.c
335 (_initialize_scoped_restore_selftests): Likewise.
336 * NEWS: Document "maintenance selftest" and "maint info
337 selftests".
338
339 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
340
341 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
342 scoped_restore.
343
344 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
345
346 * mi/mi-main.c (mi_load_progress): Make uiout variable
347 a unique_ptr.
348
349 2017-09-15 Pedro Alves <palves@redhat.com>
350
351 * compile/compile-c-types.c (convert_enum, convert_int)
352 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
353
354 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
355
356 * dwarf2read.c (copy_string): Remove.
357 (parse_macro_definition): Replace copy_string with savestring.
358
359 2017-09-15 Yao Qi <yao.qi@linaro.org>
360
361 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
362 gdb_target_obs.
363 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
364 Likewise.
365 (i[34567]86-*-linux*): Likewise.
366
367 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
368
369 * dwarf2expr.h (dwarf_stack_value): Add constructor.
370 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
371 <stack>: Change type to std::vector.
372 <stack_len, stack_allocated>: Remove.
373 <grow_stack>: Remove.
374 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
375 (dwarf_expr_context::~dwarf_expr_context): Remove.
376 (dwarf_expr_context::grow_stack): Remove.
377 (dwarf_expr_context::push): Adjust.
378 (dwarf_expr_context::pop): Adjust.
379 (dwarf_expr_context::fetch): Adjust.
380 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
381 (dwarf_expr_context::stack_empty_p): Adjust.
382 (dwarf_expr_context::execute_stack_op): Adjust.
383
384 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
385
386 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
387 return type to bool.
388 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
389
390 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
391
392 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
393 Change type to bool.
394 (dwarf_stack_value) <in_stack_memory>: Likewise.
395 (dwarf_expr_context) <push_address>: Change parameter type to
396 bool.
397 <fetch_in_stack_memory>: Change return type to bool.
398 <push>: Change parameter type to bool.
399 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
400 to bool.
401 (dwarf_expr_context::push_address): Likewise.
402 (dwarf_expr_context::fetch_in_stack_memory): Change return type
403 to bool.
404 (dwarf_expr_context::execute_stack_op): Adjust.
405 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
406
407 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
408
409 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
410 (struct dwarf_expr_context) <n_pieces>: Remove.
411 <pieces>: Change type to std::vector.
412 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
413 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
414 pieces.
415 (dwarf_expr_context::add_piece): Adjust.
416 * dwarf2loc.c (struct piece_closure): Initialize fields.
417 <n_pieces>: Remove.
418 <pieces>: Change type to std::vector.
419 (allocate_piece_closure): Adjust, change parameter to
420 std::vector rvalue and std::move it to piece_closure.
421 (rw_pieced_value): Adjust.
422 (check_pieced_synthetic_pointer): Adjust.
423 (indirect_synthetic_pointer): Adjust.
424 (coerce_pieced_ref): Adjust.
425 (free_pieced_value_closure): Adjust. Use delete to free
426 piece_closure.
427 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
428 to allocate_piece_closure.
429 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
430
431 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
432
433 * probe.h (probe_ops_cp): Remove typedef.
434 (DEF_VEC_P (probe_ops_cp)): Remove.
435 (all_probe_ops): Change type to std::vector.
436 * probe.c (info_probes_for_ops): Adjust to vector change.
437 (probe_linespec_to_ops): Likewise.
438 (all_probe_ops): Change type to std::vector.
439 (_initialize_probe): Adjust to vector change.
440 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
441 * elfread.c (elf_get_probes): Likewise.
442 * stap-probe.c (_initialize_stap_probe): Likewise.
443
444 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
445
446 * probe.h (struct bound_probe): Define constructors.
447 * probe.c (bound_probe_s): Remove typedef.
448 (DEF_VEC_O (bound_probe_s)): Remove VEC.
449 (collect_probes): Change return type to std::vector, remove
450 cleanup.
451 (compare_probes): Return bool, change parameter type. Change
452 semantic to "less than".
453 (gen_ui_out_table_header_info): Change parameter to std::vector
454 and update.
455 (exists_probe_with_pops): Likewise.
456 (info_probes_for_ops): Update to std::vector change.
457 (enable_probes_command): Likewise.
458 (disable_probes_command): Likewise.
459
460 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
461
462 * probe.h (struct probe_ops) <get_probes>: Change parameter from
463 vec to std::vector.
464 * probe.c (parse_probes_in_pspace): Update.
465 (find_probes_in_objfile): Update.
466 (find_probe_by_pc): Update.
467 (collect_probes): Update.
468 (probe_any_get_probes): Update.
469 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
470 return type to reference to std::vector.
471 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
472 std::vector and update.
473 (dtrace_process_dof): Likewise.
474 (dtrace_get_probes): Likewise.
475 * elfread.c (elf_get_probes): Change return type to std::vector,
476 store an std::vector in bfd_data.
477 (probe_key_free): Update to std::vector.
478 * stap-probe.c (handle_stap_probe): Change parameter to
479 std::vector and update.
480 (stap_get_probes): Likewise.
481 * symfile-debug.c (debug_sym_get_probes): Change return type to
482 std::vector and update.
483
484 2017-09-11 Tom Tromey <tom@tromey.com>
485
486 * breakpoint.c (program_breakpoint_here_p): Update.
487 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
488 from make_show_memory_breakpoints_cleanup. Return a
489 scoped_restore_tmpl<int>.
490 (restore_show_memory_breakpoints): Remove.
491 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
492 * mem-break.c (memory_validate_breakpoint): Update.
493 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
494 (ia64_memory_remove_breakpoint): Update.
495 (ia64_breakpoint_from_pc): Update.
496 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
497 from make_show_memory_breakpoints_cleanup.
498
499 2017-09-11 Tom Tromey <tom@tromey.com>
500
501 * d-namespace.c (d_lookup_symbol): Use std::string.
502 (find_symbol_in_baseclass): Likewise.
503
504 2017-09-11 Tom Tromey <tom@tromey.com>
505
506 * ctf.c (ctf_start): Use std::string.
507
508 2017-09-11 Tom Tromey <tom@tromey.com>
509
510 * ada-lang.c (is_known_support_routine): Update.
511 (ada_unhandled_exception_name_addr_from_raise): Update.
512 * guile/scm-frame.c (gdbscm_frame_name): Update.
513 * python/py-frame.c (frapy_name): Update.
514 (frapy_function): Update.
515 * stack.h (find_frame_funname): Update.
516 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
517 (print_frame): Update.
518
519 2017-09-11 Tom Tromey <tom@tromey.com>
520
521 * findcmd.c (put_bits): Take a gdb::byte_vector.
522 (parse_find_args): Return gdb::byte_vector. "args" now const.
523 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
524 cleanups.
525 (find_command): Update.
526
527 2017-09-11 Tom Tromey <tom@tromey.com>
528
529 * cli/cli-script.c (class scoped_restore_hook_in): New.
530 (clear_hook_in_cleanup): Remove.
531 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
532 scoped_restore_hook_in.
533
534 2017-09-11 Tom Tromey <tom@tromey.com>
535
536 * cli/cli-script.c (restore_interp): Remove.
537 (read_command_lines): Use scoped_restore_interp.
538 * interps.c (scoped_restore_interp::set_temp): Rename from
539 interp_set_temp.
540 * interps.h (class scoped_restore_interp): New.
541 (interp_set_temp): Remove.
542
543 2017-09-11 Tom Tromey <tom@tromey.com>
544
545 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
546 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
547 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
548 scoped_restore.
549 (mi_cmd_break_insert_1): Update.
550 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
551 scoped_restore.
552
553 2017-09-11 Tom Tromey <tom@tromey.com>
554
555 * demangle.c (demangle_command): Update.
556 * breakpoint.c (disable_command): Update.
557 (enable_command): Update.
558 (find_location_by_number): Make "number" const. Use
559 get_number_trailer.
560 * cli/cli-utils.c (extract_arg): Return std::string.
561 * probe.c (parse_probe_linespec): Update. Change types.
562 (collect_probes): Take string arguments.
563 (parse_probe_linespec): Likewise.
564 (info_probes_for_ops): Update.
565 (enable_probes_command): Update.
566 (disable_probes_command): Update.
567 * break-catch-sig.c (catch_signal_split_args): Update.
568 * mi/mi-parse.c (mi_parse): Update.
569
570 2017-09-11 Tom Tromey <tom@tromey.com>
571
572 * language.h (language_enum): Make argument const.
573 * language.c (language_enum): Make argument const.
574
575 2017-09-11 Tom Tromey <tom@tromey.com>
576
577 * common/common-utils.h (skip_to_space): Remove macro, redeclare
578 as function.
579 (skip_to_space): Rename from skip_to_space_const.
580 * common/common-utils.c (skip_to_space): New function.
581 (skip_to_space): Rename from skip_to_space_const.
582 * cli/cli-utils.h (get_number): Rename from get_number_const.
583 (extract_arg): Rename from extract_arg_const.
584 * cli/cli-utils.c (get_number): Rename from get_number_const.
585 (extract_arg): Rename from extract_arg_const.
586 (number_or_range_parser::get_number): Use ::get_number.
587 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
588 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
589 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
590 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
591 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
592 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
593 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
594 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
595
596 2017-09-11 Tom Tromey <tom@tromey.com>
597
598 * python/python.c (do_start_initialization): Use
599 py-event-types.def to initialize types.
600 Define all object type structures.
601 * python/python-internal.h: Don't declare event initialization
602 functions.
603 * python/py-threadevent.c (thread_event_object_type): Don't
604 define.
605 * python/py-stopevent.c (stop_event_object_type): Don't define.
606 * python/py-signalevent.c (signal_event_object_type): Don't
607 declare or define.
608 * python/py-newobjfileevent.c (new_objfile_event_object_type)
609 (clear_objfiles_event_object_type): Don't declare or define.
610 * python/py-infevents.c (inferior_call_pre_event_object_type)
611 (inferior_call_post_event_object_type)
612 (register_changed_event_object_type)
613 (memory_changed_event_object_type): Don't declare or define.
614 * python/py-inferior.c (new_thread_event_object_type)
615 (new_inferior_event_object_type)
616 (inferior_deleted_event_object_type): Don't declare or define.
617 * python/py-exitedevent.c (exited_event_object_type): Don't
618 declare or define.
619 * python/py-evts.c (gdbpy_initialize_py_events): Use
620 py-all-events.def.
621 * python/py-events.h (thread_event_object_type): Don't declare.
622 (events_object): Use py-all-events.def.
623 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
624 py-event-types.def.
625 * python/py-event-types.def: New file.
626 * python/py-continueevent.c (create_continue_event_object): Don't
627 declare or define.
628 * python/py-bpevent.c (breakpoint_event_object_type): Don't
629 declare or define.
630 * python/py-all-events.def: New file.
631
632 2017-09-11 Tom Tromey <tom@tromey.com>
633
634 * python/py-threadevent.c (create_thread_event_object): Return
635 gdbpy_ref.
636 * python/py-stopevent.h (create_stop_event_object)
637 (create_breakpoint_event_object, create_signal_event_object):
638 Update.
639 * python/py-stopevent.c (create_stop_event_object): Return
640 gdbpy_ref.
641 (emit_stop_event): Update.
642 * python/py-signalevent.c (create_signal_event_object): Return
643 gdbpy_ref.
644 * python/py-infevents.c (create_inferior_call_event_object):
645 Update.
646 * python/py-event.h (create_event_object)
647 (create_thread_event_object): Update.
648 * python/py-event.c (create_event_object): Return gdbpy_ref.
649 * python/py-continueevent.c: Return gdbpy_ref.
650 * python/py-bpevent.c (create_breakpoint_event_object): Return
651 gdbpy_ref.
652
653 2017-09-11 Tom Tromey <tom@tromey.com>
654
655 PR python/15622:
656 * NEWS: Add entry.
657 * python/python.c (do_start_initialization): Initialize new event
658 types.
659 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
660 (gdbpy_initialize_inferior_deleted_event)
661 (gdbpy_initialize_new_thread_event): Declare.
662 * python/py-threadevent.c (create_thread_event_object): Add option
663 "thread" parameter.
664 * python/py-inferior.c (new_thread_event_object_type)
665 (new_inferior_event_object_type)
666 (inferior_deleted_event_object_type): Declare.
667 (python_new_inferior, python_inferior_deleted): New functions.
668 (add_thread_object): Emit new_thread event.
669 (gdbpy_initialize_inferior): Attach new functions to corresponding
670 observers.
671 (new_thread, new_inferior, inferior_deleted): Define new event
672 types.
673 * python/py-evts.c (gdbpy_initialize_py_events): Add new
674 registries.
675 * python/py-events.h (events_object) <new_inferior,
676 inferior_deleted, new_thread>: New fields.
677 * python/py-event.h (create_thread_event_breakpoint): Add optional
678 "thread" parameter.
679
680 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
681
682 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
683 check current_ui instead.
684 (internal_vproblem): Likewise.
685
686 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
687
688 * thread.c (print_thread_info_1): Remove unnecessary calls to
689 uiout->is_mi_like_p.
690
691 2017-09-09 Tom Tromey <tom@tromey.com>
692
693 * namespace.h (add_using_directive): Update.
694 * namespace.c (add_using_directive): Change type of excludes to
695 std::vector.
696 * dwarf2read.c (read_import_statement): Use std::vector.
697 (read_namespace): Update.
698 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
699
700 2017-09-09 Tom Tromey <tom@tromey.com>
701
702 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
703
704 2017-09-09 Tom Tromey <tom@tromey.com>
705
706 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
707
708 2017-09-09 Tom Tromey <tom@tromey.com>
709
710 * stack.c (func_command): Use gdb::def_vector.
711
712 2017-09-09 Tom Tromey <tom@tromey.com>
713
714 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
715 ui_out_emit_list, ui_out_emit_tuple.
716 (mi_cmd_var_update): Likewise.
717
718 2017-09-09 Tom Tromey <tom@tromey.com>
719
720 * mi/mi-interp.c (mi_user_selected_context_changed): Use
721 ui_out_redirect_pop.
722 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
723 ui_out_redirect_pop.
724 * utils.c (do_ui_out_redirect_pop)
725 (make_cleanup_ui_out_redirect_pop): Remove.
726 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
727 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
728 * ui-out.h (ui_out_redirect_pop): New class.
729
730 2017-09-09 Tom Tromey <tom@tromey.com>
731
732 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
733 (list_available_thread_groups, mi_cmd_list_thread_groups)
734 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
735 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
736 Likewise.
737
738 2017-09-09 Tom Tromey <tom@tromey.com>
739
740 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
741 ui_out_emit_tuple.
742
743 2017-09-09 Tom Tromey <tom@tromey.com>
744
745 * target.c (flash_erase_command): Use ui_out_emit_tuple.
746 * stack.c (print_frame): Use ui_out_emit_tuple.
747 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
748 (info_spu_mailbox_command, info_spu_dma_command)
749 (info_spu_proxydma_command): Likewise.
750 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
751 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
752 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
753 ui_out_emit_tuple.
754 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
755
756 2017-09-09 Tom Tromey <tom@tromey.com>
757
758 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
759 (class ui_out_emit_table): Update comment.
760 * ui-out.c (do_cleanup_table_end)
761 (make_cleanup_ui_out_table_begin_end): Remove.
762 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
763 (info_spu_dma_cmdlist): Likewise.
764 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
765 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
766 ui_out_emit_table.
767
768 2017-09-09 Tom Tromey <tom@tromey.com>
769
770 * thread.c (print_thread_info_1): Use ui_out_emit_table,
771 ui_out_emit_list, gdb::optional.
772
773 2017-09-09 John Baldwin <jhb@FreeBSD.org>
774
775 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
776 prototype.
777 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
778 prototype.
779 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
780 prototype.
781 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
782 * ada-exp.y: Remove _initialize_ada_exp prototype.
783 * ada-lang.c: Remove _initialize_ada_language prototype.
784 * ada-tasks.c: Remove _initialize_tasks prototype.
785 * addrmap.c: Remove _initialize_addrmap prototype.
786 * agent.c: Remove _initialize_agent prototype.
787 * aix-thread.c: Remove _initialize_aix_thread prototype.
788 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
789 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
790 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
791 prototype.
792 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
793 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
794 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
795 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
796 prototype.
797 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
798 prototype.
799 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
800 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
801 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
802 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
803 prototype.
804 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
805 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
806 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
807 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
808 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
809 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
810 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
811 prototype.
812 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
813 prototype.
814 * annotate.c: Remove _initialize_annotate prototype.
815 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
816 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
817 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
818 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
819 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
820 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
821 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
822 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
823 prototype.
824 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
825 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
826 * auto-load.c: Remove _initialize_auto_load prototype.
827 * auxv.c: Remove _initialize_auxv prototype.
828 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
829 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
830 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
831 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
832 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
833 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
834 prototype.
835 * break-catch-throw.c: Remove _initialize_break_catch_throw
836 prototype.
837 * breakpoint.c: Remove _initialize_breakpoint prototype.
838 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
839 * btrace.c: Remove _initialize_btrace prototype.
840 * charset.c: Remove _initialize_charset prototype.
841 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
842 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
843 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
844 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
845 * cli/cli-script.c: Remove _initialize_cli_script prototype.
846 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
847 * coffread.c: Remove _initialize_coffread prototype.
848 * compile/compile.c: Remove _initialize_compile prototype.
849 * complaints.c: Remove _initialize_complaints prototype.
850 * completer.c: Remove _initialize_completer prototype.
851 * copying.awk: Remove _initialize_copying prototype.
852 * copying.c: Regenerate.
853 * core-regset.c: Remove _initialize_core_regset prototype.
854 * corefile.c: Remove _initialize_core prototype.
855 * corelow.c: Remove _initialize_corelow prototype.
856 * cp-abi.c: Remove _initialize_cp_abi prototype.
857 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
858 * cp-support.c: Remove _initialize_cp_support prototype.
859 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
860 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
861 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
862 * ctf.c: Remove _initialize_ctf prototype.
863 * d-lang.c: Remove _initialize_d_language prototype.
864 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
865 prototype.
866 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
867 * dbxread.c: Remove _initialize_dbxread prototype.
868 * dcache.c: Remove _initialize_dcache prototype.
869 * demangle.c: Remove _initialize_demangler prototype.
870 * disasm-selftests.c: Remove _initialize_disasm_selftests
871 prototype.
872 * disasm.c: Remove _initialize_disasm prototype.
873 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
874 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
875 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
876 prototype.
877 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
878 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
879 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
880 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
881 * elfread.c: Remove _initialize_elfread prototype.
882 * exec.c: Remove _initialize_exec prototype.
883 * extension.c: Remove _initialize_extension prototype.
884 * f-lang.c: Remove _initialize_f_language prototype.
885 * f-valprint.c: Remove _initialize_f_valprint prototype.
886 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
887 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
888 * filesystem.c: Remove _initialize_filesystem prototype.
889 * findcmd.c: Remove _initialize_mem_search prototype.
890 * fork-child.c: Remove _initialize_fork_child prototype.
891 * frame-base.c: Remove _initialize_frame_base prototype.
892 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
893 * frame.c: Remove _initialize_frame prototype.
894 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
895 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
896 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
897 * gcore.c: Remove _initialize_gcore prototype.
898 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
899 * gdbarch.c: Regenerate.
900 * gdbarch.sh: Remove _initialize_gdbarch prototype.
901 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
902 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
903 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
904 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
905 * go-lang.c: Remove _initialize_go_language prototype.
906 * go32-nat.c: Remove _initialize_go32_nat prototype.
907 * guile/guile.c: Remove _initialize_guile prototype.
908 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
909 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
910 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
911 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
912 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
913 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
914 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
915 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
916 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
917 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
918 prototype.
919 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
920 prototype.
921 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
922 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
923 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
924 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
925 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
926 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
927 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
928 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
929 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
930 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
931 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
932 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
933 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
934 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
935 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
936 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
937 prototype.
938 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
939 prototype.
940 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
941 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
942 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
943 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
944 * infcall.c: Remove _initialize_infcall prototype.
945 * infcmd.c: Remove _initialize_infcmd prototype.
946 * inferior.c: Remove _initialize_inferiors prototype.
947 * inflow.c: Remove _initialize_inflow prototype.
948 * infrun.c: Remove _initialize_infrun prototype.
949 * interps.c: Remove _initialize_interpreter prototype.
950 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
951 * jit.c: Remove _initialize_jit prototype.
952 * language.c: Remove _initialize_language prototype.
953 * linux-fork.c: Remove _initialize_linux_fork prototype.
954 * linux-nat.c: Remove _initialize_linux_nat prototype.
955 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
956 * linux-thread-db.c: Remove _initialize_thread_db prototype.
957 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
958 * m2-lang.c: Remove _initialize_m2_language prototype.
959 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
960 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
961 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
962 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
963 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
964 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
965 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
966 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
967 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
968 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
969 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
970 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
971 * machoread.c: Remove _initialize_machoread prototype.
972 * macrocmd.c: Remove _initialize_macrocmd prototype.
973 * macroscope.c: Remove _initialize_macroscope prototype.
974 * maint.c: Remove _initialize_maint_cmds prototype.
975 * mdebugread.c: Remove _initialize_mdebugread prototype.
976 * memattr.c: Remove _initialize_mem prototype.
977 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
978 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
979 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
980 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
981 * mi/mi-main.c: Remove _initialize_mi_main prototype.
982 * microblaze-linux-tdep.c: Remove
983 _initialize_microblaze_linux_tdep prototype.
984 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
985 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
986 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
987 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
988 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
989 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
990 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
991 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
992 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
993 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
994 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
995 prototype.
996 * mipsread.c: Remove _initialize_mipsread prototype.
997 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
998 prototype.
999 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
1000 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
1001 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
1002 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
1003 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
1004 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
1005 prototype.
1006 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
1007 * nto-procfs.c: Remove _initialize_procfs prototype.
1008 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
1009 * objc-lang.c: Remove _initialize_objc_language prototype.
1010 * objfiles.c: Remove _initialize_objfiles prototype.
1011 * observer.c: Remove observer_test_first_notification_function,
1012 observer_test_second_notification_function,
1013 observer_test_third_notification_function, and
1014 _initialize_observer prototypes.
1015 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
1016 * osabi.c: Remove _initialize_gdb_osabi prototype.
1017 * osdata.c: Remove _initialize_osdata prototype.
1018 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
1019 * parse.c: Remove _initialize_parse prototype.
1020 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
1021 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
1022 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
1023 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
1024 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
1025 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
1026 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
1027 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
1028 * printcmd.c: Remove _initialize_printcmd prototype.
1029 * probe.c: Remove _initialize_probe prototype.
1030 * proc-api.c: Remove _initialize_proc_api prototype.
1031 * proc-events.c: Remove _initialize_proc_events prototype.
1032 * proc-service.c: Remove _initialize_proc_service prototype.
1033 * procfs.c: Remove _initialize_procfs prototype.
1034 * psymtab.c: Remove _initialize_psymtab prototype.
1035 * python/python.c: Remove _initialize_python prototype.
1036 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
1037 * record-btrace.c: Remove _initialize_record_btrace prototype.
1038 * record-full.c: Remove _initialize_record_full prototype.
1039 * record.c: Remove _initialize_record prototype.
1040 * regcache.c: Remove _initialize_regcache prototype.
1041 * reggroups.c: Remove _initialize_reggroup prototype.
1042 * remote-notif.c: Remove _initialize_notif prototype.
1043 * remote-sim.c: Remove _initialize_remote_sim prototype.
1044 * remote.c: Remove _initialize_remote prototype.
1045 * reverse.c: Remove _initialize_reverse prototype.
1046 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
1047 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
1048 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
1049 prototype.
1050 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
1051 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
1052 * rust-exp.y: Remove _initialize_rust_exp prototype.
1053 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
1054 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
1055 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
1056 * score-tdep.c: Remove _initialize_score_tdep prototype.
1057 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
1058 prototype.
1059 * ser-go32.c: Remove _initialize_ser_dos prototype.
1060 * ser-mingw.c: Remove _initialize_ser_windows prototype.
1061 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
1062 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
1063 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
1064 * serial.c: Remove _initialize_serial prototype.
1065 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
1066 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
1067 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
1068 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
1069 * skip.c: Remove _initialize_step_skip prototype.
1070 * sol-thread.c: Remove _initialize_sol_thread prototype.
1071 * solib-aix.c: Remove _initialize_solib_aix prototype.
1072 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
1073 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
1074 * solib-frv.c: Remove _initialize_frv_solib prototype.
1075 * solib-spu.c: Remove _initialize_spu_solib prototype.
1076 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
1077 * solib-target.c: Remove _initialize_solib_target prototype.
1078 * solib.c: Remove _initialize_solib prototype.
1079 * source.c: Remove _initialize_source prototype.
1080 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
1081 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
1082 prototype.
1083 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
1084 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
1085 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
1086 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
1087 prototype.
1088 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
1089 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
1090 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
1091 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
1092 prototype.
1093 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
1094 prototype.
1095 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
1096 prototype.
1097 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
1098 prototype.
1099 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
1100 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
1101 prototype.
1102 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
1103 prototype.
1104 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
1105 prototype.
1106 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
1107 prototype.
1108 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
1109 prototype.
1110 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
1111 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
1112 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
1113 * stabsread.c: Remove _initialize_stabsread prototype.
1114 * stack.c: Remove _initialize_stack prototype.
1115 * stap-probe.c: Remove _initialize_stap_probe prototype.
1116 * std-regs.c: Remove _initialize_frame_reg prototype.
1117 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
1118 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
1119 * symfile.c: Remove _initialize_symfile prototype.
1120 * symmisc.c: Remove _initialize_symmisc prototype.
1121 * symtab.c: Remove _initialize_symtab prototype.
1122 * target-dcache.c: Remove _initialize_target_dcache prototype.
1123 * target-descriptions.c: Remove _initialize_target_descriptions
1124 prototype.
1125 * thread.c: Remove _initialize_thread prototype.
1126 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
1127 prototype.
1128 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
1129 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
1130 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
1131 prototype.
1132 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
1133 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
1134 * tracefile.c: Remove _initialize_tracefile prototype.
1135 * tracepoint.c: Remove _initialize_tracepoint prototype.
1136 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
1137 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
1138 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
1139 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
1140 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
1141 * tui/tui-win.c: Remove _initialize_tui_win prototype.
1142 * tui/tui.c: Remove _initialize_tui prototype.
1143 * typeprint.c: Remove _initialize_typeprint prototype.
1144 * user-regs.c: Remove _initialize_user_regs prototype.
1145 * utils.c: Remove _initialize_utils prototype.
1146 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
1147 * valarith.c: Remove _initialize_valarith prototype.
1148 * valops.c: Remove _initialize_valops prototype.
1149 * valprint.c: Remove _initialize_valprint prototype.
1150 * value.c: Remove _initialize_values prototype.
1151 * varobj.c: Remove _initialize_varobj prototype.
1152 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
1153 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
1154 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
1155 * windows-nat.c: Remove _initialize_windows_nat,
1156 _initialize_check_for_gdb_ini, and _initialize_loadable
1157 prototypes.
1158 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
1159 * xcoffread.c: Remove _initialize_xcoffread prototype.
1160 * xml-support.c: Remove _initialize_xml_support prototype.
1161 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
1162 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
1163 prototype.
1164 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
1165 prototype.
1166 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
1167
1168 2017-09-08 Keith Seitz <keiths@redhat.com>
1169
1170 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
1171 field.
1172
1173 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
1174
1175 * f-valprint.c (f_val_print): Remove check for one byte
1176 sized integers. Remove printing of character type.
1177
1178 2017-09-08 Frank Penczek <frank.penczek@intel.com>
1179 Christoph Weinmann <christoph.t.weinmann@intel.com>
1180 Bernhard Heckel <bernhard.heckel@intel.com>
1181
1182 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
1183 to maintain proper indentation when printing pointers/refs.
1184
1185 2017-09-07 Joel Brobecker <brobecker@adacore.com>
1186
1187 GDB 8.0.1 released.
1188
1189 2017-09-07 Joel Brobecker <brobecker@adacore.com>
1190
1191 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
1192
1193 2017-09-05 Tom Tromey <tom@tromey.com>
1194
1195 * parse.c (funcall_chain): Now a std::vector.
1196 (start_arglist, end_arglist): Simplify.
1197 (free_funcalls): Remove.
1198 (parse_exp_in_context_1): Remove cleanup.
1199
1200 2017-09-05 Tom Tromey <tom@tromey.com>
1201
1202 * go-exp.y (go_parse): Don't create a cleanup.
1203
1204 2017-09-05 Tom Tromey <tom@tromey.com>
1205
1206 * d-exp.y (PrimaryExpression): Use std::string.
1207 (d_parse): Don't create a cleanup.
1208
1209 2017-09-05 Tom Tromey <tom@tromey.com>
1210
1211 * utils.c (do_clear_parser_state): Remove.
1212 (make_cleanup_clear_parser_state): Remove.
1213 * p-exp.y (pascal_parse): Use scoped_restore.
1214 * m2-exp.y (m2_parse): Use scoped_restore.
1215 * f-exp.y (f_parse): Use scoped_restore.
1216 * d-exp.y (d_parse): Use scoped_restore.
1217 * c-exp.y (c_parse): Use scoped_restore.
1218 * ada-exp.y (ada_parse): Use scoped_restore.
1219 * utils.h (make_cleanup_clear_parser_state): Remove.
1220
1221 2017-09-06 Keith Seitz <keiths@redhat.com>
1222
1223 * dwarf2read.c (dw2_linkage_name_attr): New function.
1224 (dw2_linkage_name): New function.
1225 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
1226 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
1227 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
1228
1229 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1230
1231 * config/djgpp/djconfig.sh: Correct shell portability issue.
1232
1233 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1234
1235 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
1236
1237 2017-09-06 John Baldwin <jhb@FreeBSD.org>
1238
1239 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
1240 * NEWS: Mention new FreeBSD/mips native configuration.
1241 * configure.host: Add aarch64*-*-freebsd*.
1242 * configure.nat: Likewise.
1243 * aarch64-fbsd-nat.c: New file.
1244
1245 2017-09-06 John Baldwin <jhb@FreeBSD.org>
1246
1247 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
1248 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
1249 * NEWS: Mention new FreeBSD/aarch64 target.
1250 * configure.tgt: Add aarch64*-*-freebsd*.
1251 * aarch64-fbsd-tdep.c: New file.
1252 * aarch64-fbsd-tdep.h: New file.
1253
1254 2017-09-06 Kamil Rytarowski <n54@gmx.com>
1255
1256 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
1257
1258 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1259
1260 * parse.c (find_minsym_type_and_address): Don't relocate addresses
1261 of TLS symbols.
1262
1263 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1264
1265 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
1266 call.
1267
1268 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1269
1270 * infrun.c (follow_exec): Call add_thread after
1271 target_find_description.
1272
1273 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1274
1275 * infrun.c (handle_inferior_event_1): When exec'ing, read
1276 stop_pc after follow_exec.
1277
1278 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1279
1280 * remote.c (process_g_packet): Update error message.
1281
1282 2017-09-05 Yao Qi <yao.qi@linaro.org>
1283
1284 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
1285 targets.
1286
1287 2017-09-05 Pedro Alves <palves@redhat.com>
1288
1289 * eval.c (eval_call, evaluate_funcall): New functions, factored
1290 out from ...
1291 (evaluate_subexp_standard): ... this.
1292
1293 2017-09-05 Yao Qi <yao.qi@linaro.org>
1294
1295 * amd64-tdep.c (amd64_target_description): Create target
1296 descriptions.
1297 (_initialize_amd64_tdep): Don't call functions
1298 initialize_tdesc_amd64_*. Add self tests.
1299 * arch/amd64.c (amd64_create_target_description): Add parameter
1300 is_linux. Call set_tdesc_osabi if is_linux is true.
1301 * arch/amd64.h (amd64_create_target_description): Update the
1302 declaration.
1303 * arch/i386.c (i386_create_target_description): Add parameter
1304 is_linux. Call set_tdesc_osabi if is_linux is true.
1305 * arch/i386.h (i386_create_target_description): Update
1306 declaration.
1307 * configure.tgt: Add i386.o to gdb_target_obs.
1308 * features/Makefile (XMLTOC): Remove i386/*.xml.
1309 * features/i386/amd64-avx-avx512.c: Remove.
1310 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
1311 * features/i386/amd64-avx-mpx.c: Remove.
1312 * features/i386/amd64-avx.c: Remove.
1313 * features/i386/amd64-mpx.c: Remove.
1314 * features/i386/amd64.c: Remove.
1315 * features/i386/i386-avx-avx512.c: Remove.
1316 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
1317 * features/i386/i386-avx-mpx.c: Remove.
1318 * features/i386/i386-avx.c: Remove.
1319 * features/i386/i386-mmx.c: Remove.
1320 * features/i386/i386-mpx.c: Remove.
1321 * features/i386/i386.c: Remove.
1322 * i386-tdep.c: Don't include features/i386/i386*.c., include
1323 target-descriptions.h and arch/i386.h.
1324 (i386_target_description): Create target descriptions.
1325 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
1326 functions. Do self tests.
1327
1328 2017-09-05 Yao Qi <yao.qi@linaro.org>
1329
1330 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
1331 * features/i386/amd64-avx-avx512-linux.c: Removed.
1332 * features/i386/amd64-avx-linux.c: Removed.
1333 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
1334 * features/i386/amd64-avx-mpx-linux.c: Removed.
1335 * features/i386/amd64-linux.c: Removed.
1336 * features/i386/amd64-mpx-linux.c: Removed.
1337 * features/i386/x32-avx-avx512-linux.c: Removed.
1338 * features/i386/x32-avx-linux.c: Removed.
1339 * features/i386/x32-linux.c: Removed.
1340
1341 2017-09-05 Yao Qi <yao.qi@linaro.org>
1342
1343 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
1344 features/i386/*.c.
1345 (amd64_linux_read_description): Call
1346 amd64_create_target_description.
1347 * arch/amd64.c: New file.
1348 * arch/amd64.h: New file.
1349 * configure.tgt (x86_64-*-linux*): Append amd64.o.
1350 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
1351
1352 2017-09-05 Yao Qi <yao.qi@linaro.org>
1353
1354 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
1355 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
1356 (amd64_linux_read_description): Create target descriptions.
1357 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
1358 functions. Add unit tests.
1359 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
1360 x32-core.xml.
1361 * features/i386/64bit-avx.c: Generated.
1362 * features/i386/64bit-avx512.c: Generated.
1363 * features/i386/64bit-core.c: Generated.
1364 * features/i386/64bit-linux.c: Generated.
1365 * features/i386/64bit-mpx.c: Generated.
1366 * features/i386/64bit-pkeys.c: Generated.
1367 * features/i386/64bit-segments.c: Generated.
1368 * features/i386/64bit-sse.c: Generated.
1369 * features/i386/x32-core.c: Generated.
1370 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
1371 c files for amd64-linux and x32-linux.
1372
1373 2017-09-05 Yao Qi <yao.qi@linaro.org>
1374
1375 * amd64-linux-tdep.c (amd64_linux_read_description): New
1376 function.
1377 (amd64_linux_core_read_description): Call
1378 amd64_linux_read_description.
1379 (amd64_linux_init_abi): Likewise.
1380 (amd64_x32_linux_init_abi): Likewise.
1381 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
1382 * x86-linux-nat.c (x86_linux_read_description): Call
1383 amd64_linux_read_description.
1384
1385 2017-09-05 Yao Qi <yao.qi@linaro.org>
1386
1387 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
1388 comments.
1389
1390 2017-09-05 Yao Qi <yao.qi@linaro.org>
1391
1392 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
1393 * features/i386/i386-avx-avx512-linux.c: Remove.
1394 * features/i386/i386-avx-linux.c: Remove.
1395 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
1396 * features/i386/i386-avx-mpx-linux.c: Remove.
1397 * features/i386/i386-linux.c: Remove.
1398 * features/i386/i386-mmx-linux.c: Remove.
1399 * features/i386/i386-mpx-linux.c: Remove.
1400
1401 2017-09-05 Yao Qi <yao.qi@linaro.org>
1402
1403 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
1404 (SFILES): Add arch/i386.c.
1405 (HFILES_NO_SRCDIR): Add arch/i386.h.
1406 * arch/i386.c: New file.
1407 * arch/i386.h: New file.
1408 * arch/tdesc.h (allocate_target_description): Declare.
1409 (set_tdesc_architecture): Declare.
1410 (set_tdesc_osabi): Declare.
1411 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
1412 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
1413 include arch/i386.h.
1414 (i386_linux_read_description): Remove code and call
1415 i386_create_target_description.
1416 (set_tdesc_architecture): New function.
1417 (set_tdesc_osabi): New function.
1418 * target-descriptions.h (allocate_target_description): Remove.
1419
1420 2017-09-05 Yao Qi <yao.qi@linaro.org>
1421
1422 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
1423 * target-descriptions.c (tdesc_create_feature): Likewise, and
1424 adjust code.
1425 * features/i386/32bit-avx.c: Re-generated.
1426 * features/i386/32bit-avx512.c: Re-generated.
1427 * features/i386/32bit-core.c: Re-generated.
1428 * features/i386/32bit-linux.c: Re-generated.
1429 * features/i386/32bit-mpx.c: Re-generated.
1430 * features/i386/32bit-pkeys.c: Re-generated.
1431 * features/i386/32bit-sse.c: Re-generated.
1432
1433 2017-09-05 Yao Qi <yao.qi@linaro.org>
1434
1435 * regformats/regdef.h (struct reg): Override operator == and !=.
1436
1437 2017-09-05 Yao Qi <yao.qi@linaro.org>
1438
1439 * arch/tdesc.h: New file.
1440 * regformats/regdat.sh: Generate code using tdesc_create_reg.
1441 * target-descriptions.c: Update comments.
1442 * target-descriptions.h: Include "arch/tdesc.h". Remove the
1443 declarations.
1444 * features/i386/32bit-avx.c: Re-generated.
1445 * features/i386/32bit-avx512.c: Re-generated.
1446 * features/i386/32bit-core.c: Re-generated.
1447 * features/i386/32bit-linux.c: Re-generated.
1448 * features/i386/32bit-mpx.c: Re-generated.
1449 * features/i386/32bit-pkeys.c: Re-generated.
1450 * features/i386/32bit-sse.c: Re-generated.
1451
1452 2017-09-05 Yao Qi <yao.qi@linaro.org>
1453
1454 * regformats/regdat.sh: Update generated code.
1455
1456 2017-09-05 Yao Qi <yao.qi@linaro.org>
1457
1458 * regformats/regdat.sh: Adjust code order.
1459
1460 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
1461
1462 * expprint.c (dump_subexp_body_standard): Use constant format
1463 string in fprintf_filtered call.
1464
1465 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1466
1467 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
1468 NetBSD/i386.
1469 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
1470
1471 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1472
1473 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
1474
1475 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1476
1477 * bsd-kvm.o: Define _KMEMUSER.
1478 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
1479 * configure: Regenerate.
1480
1481 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1482
1483 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
1484 * i386-fbsd-nat.c: Likewise.
1485
1486 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1487
1488 * unittests/array-view-selftests.c: Add include of <array>.
1489
1490 2017-09-04 John Baldwin <jhb@FreeBSD.org>
1491
1492 * spu-tdep.c (flush_ea_cache): Add missing argument to
1493 call_function_by_hand.
1494
1495 2017-09-04 Pedro Alves <palves@redhat.com>
1496
1497 * NEWS (Safer support for debugging with no debug info): New.
1498
1499 2017-09-04 Pedro Alves <palves@redhat.com>
1500
1501 * c-exp.y (function_method, function_method_void): Add current
1502 instance flags to TYPE_INSTANCE.
1503 * dwarf2read.c (check_modifier): New.
1504 (compute_delayed_physnames): Assert that only C++ adds delayed
1505 physnames. Mark fn_fields as const/volatile depending on
1506 physname.
1507 * eval.c (make_params): New type_instance_flags parameter. Use
1508 it as the new type's instance flags.
1509 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
1510 flags element and pass it to make_params.
1511 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
1512 instance flags element.
1513 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
1514 * gdbtypes.h: Include "enum-flags.h".
1515 (type_instance_flags): New enum-flags type.
1516 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
1517 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
1518 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
1519 (follow_type_instance_flags): New function.
1520 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
1521 * parser-defs.h (follow_type_instance_flags): Declare.
1522 * valops.c (value_struct_elt_for_reference): const/volatile must
1523 match too.
1524
1525 2017-09-04 Pedro Alves <palves@redhat.com>
1526
1527 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
1528 function/method scopes; lookup the nested name as a function local
1529 static variable.
1530
1531 2017-09-04 Pedro Alves <palves@redhat.com>
1532
1533 (%type <voidval>): Add function_method.
1534 * c-exp.y (exp): New production for calls with no arguments.
1535 (function_method, function_method_void_or_typelist): New
1536 productions.
1537 (exp): New production for "method()::static_var".
1538 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
1539 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1540 Handle OP_FUNC_STATIC_VAR.
1541 * parse.c (operator_length_standard):
1542 Handle OP_FUNC_STATIC_VAR.
1543
1544 2017-09-04 Pedro Alves <palves@redhat.com>
1545
1546 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
1547 handling.
1548 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1549 Ditto.
1550 * parse.c (operator_length_standard, operator_check_standard):
1551 Ditto.
1552 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
1553
1554 2017-09-04 Pedro Alves <palves@redhat.com>
1555
1556 * ax-gdb.c: Include "typeprint.h".
1557 (gen_expr_for_cast): New function.
1558 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
1559 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
1560 type is unknown.
1561 * dwarf2read.c (new_symbol_full): Fallback to int instead of
1562 nodebug_data_symbol.
1563 * eval.c: Include "typeprint.h".
1564 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
1565 Error out if symbol has unknown type.
1566 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
1567 evaluate_subexp_for_cast.
1568 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
1569 OP_VAR_MSYM_VALUE.
1570 (evaluate_subexp_for_cast): New function.
1571 * gdbtypes.c (init_nodebug_var_type): New function.
1572 (objfile_type): Use it to initialize types of variables with no
1573 debug info.
1574 * typeprint.c (error_unknown_type): New.
1575 * typeprint.h (error_unknown_type): New declaration.
1576 * compile/compile-c-types.c (convert_type_basic): Handle
1577 TYPE_CODE_ERROR; warn and fallback to int for variables with
1578 unknown type.
1579
1580 2017-09-04 Pedro Alves <palves@redhat.com>
1581
1582 * eval.c (evaluate_var_value): New function, factored out from ...
1583 (evaluate_subexp_standard): ... here.
1584
1585 2017-09-04 Pedro Alves <palves@redhat.com>
1586
1587 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
1588 Remove useless assignments to 'op'.
1589
1590 2017-09-04 Pedro Alves <palves@redhat.com>
1591
1592 * eval.c (eval_skip_value): New function.
1593 (evaluate_subexp_standard): Use it.
1594
1595 2017-09-04 Pedro Alves <palves@redhat.com>
1596
1597 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
1598 function name from symbol/minsym and pass it to
1599 error_call_unknown_return_type.
1600
1601 2017-09-04 Pedro Alves <palves@redhat.com>
1602
1603 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
1604 * ax-gdb.c (gen_msym_var_ref): New function.
1605 (gen_expr): Handle OP_VAR_MSYM_VALUE.
1606 * eval.c (evaluate_var_msym_value): New function.
1607 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
1608 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
1609 to call_function_by_hand.
1610 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1611 Handle OP_VAR_MSYM_VALUE.
1612 (union exp_element) <msymbol>: New field.
1613 * minsyms.h (struct type): Forward declare.
1614 (find_minsym_type_and_address): Declare.
1615 * parse.c (write_exp_elt_msym): New function.
1616 (write_exp_msymbol): Delete, refactored as ...
1617 (find_minsym_type_and_address): ... this new function.
1618 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
1619 (operator_length_standard, operator_check_standard): Handle
1620 OP_VAR_MSYM_VALUE.
1621 * std-operator.def (OP_VAR_MSYM_VALUE): New.
1622
1623 2017-09-04 Pedro Alves <palves@redhat.com>
1624
1625 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
1626 TYPE_GNU_IFUNC specially here. Throw error if return type is
1627 unknown.
1628 * ada-typeprint.c (print_func_type): Handle functions with unknown
1629 return type.
1630 * c-typeprint.c (c_type_print_base): Handle functions and methods
1631 with unknown return type.
1632 * compile/compile-c-symbols.c (convert_symbol_bmsym)
1633 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
1634 * compile/compile-c-types.c: Include "objfiles.h".
1635 (convert_func): For functions with unknown return type, warn and
1636 default to int.
1637 * compile/compile-object-run.c (compile_object_run): Adjust call
1638 to call_function_by_hand_dummy.
1639 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
1640 call_function_by_hand.
1641 * eval.c (evaluate_subexp_standard): Adjust calls to
1642 call_function_by_hand. Handle functions and methods with unknown
1643 return type. Pass expect_type to call_function_by_hand.
1644 * f-typeprint.c (f_type_print_base): Handle functions with unknown
1645 return type.
1646 * gcore.c (call_target_sbrk): Adjust call to
1647 call_function_by_hand.
1648 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
1649 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
1650 an integer address type instead of nodebug.
1651 * guile/scm-value.c (gdbscm_value_call): Adjust call to
1652 call_function_by_hand.
1653 * infcall.c (error_call_unknown_return_type): New function.
1654 (call_function_by_hand): New "default_return_type" parameter.
1655 Pass it down.
1656 (call_function_by_hand_dummy): New "default_return_type"
1657 parameter. Use it instead of defaulting to int. If there's no
1658 default and the return type is unknown, throw an error. If
1659 there's a default return type, and the called function has no
1660 debug info, then assume the function is prototyped.
1661 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
1662 New "default_return_type" parameter.
1663 (error_call_unknown_return_type): New declaration.
1664 * linux-fork.c (call_lseek): Cast return type of lseek.
1665 (inferior_call_waitpid, checkpoint_command): Adjust calls to
1666 call_function_by_hand.
1667 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
1668 calls to call_function_by_hand.
1669 * m2-typeprint.c (m2_procedure): Handle functions with unknown
1670 return type.
1671 * objc-lang.c (lookup_objc_class, lookup_child_selector)
1672 (value_nsstring, print_object_command): Adjust calls to
1673 call_function_by_hand.
1674 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
1675 functions with unknown return type.
1676 (pascal_type_print_func_varspec_suffix): New function.
1677 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
1678 TYPE_CODE_METHOD>: Use it.
1679 * python/py-value.c (valpy_call): Adjust call to
1680 call_function_by_hand.
1681 * rust-lang.c (rust_evaluate_funcall): Adjust call to
1682 call_function_by_hand.
1683 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
1684 call_function_by_hand.
1685 * valops.c (value_allocate_space_in_inferior): Adjust call to
1686 call_function_by_hand.
1687 * typeprint.c (type_print_unknown_return_type): New function.
1688 * typeprint.h (type_print_unknown_return_type): New declaration.
1689
1690 2017-09-04 Pedro Alves <palves@redhat.com>
1691
1692 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
1693 types with more than one parameter as prototyped.
1694
1695 2017-09-04 Pedro Alves <palves@redhat.com>
1696
1697 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
1698 (disassemble_command): Use gdb_disassembly_flags instead of bare
1699 int.
1700 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
1701 (dump_insns, do_mixed_source_and_assembly_deprecated)
1702 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
1703 Use gdb_disassembly_flags instead of bare int.
1704 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
1705 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
1706 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
1707 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
1708 (enum gdb_disassembly_flag): ... values of this new enumeration.
1709 (gdb_disassembly_flags): Define.
1710 (gdb_disassembly)
1711 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
1712 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
1713 gdb_disassembly_flags instead of bare int.
1714 * record-btrace.c (btrace_insn_history)
1715 (record_btrace_insn_history, record_btrace_insn_history_range)
1716 (record_btrace_insn_history_from): Use gdb_disassembly_flags
1717 instead of bare int.
1718 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
1719 Use gdb_disassembly_flags instead of bare int.
1720 * target-debug.h (target_debug_print_gdb_disassembly_flags):
1721 Define.
1722 * target-delegates.c: Regenerate.
1723 * target.c (target_insn_history, target_insn_history_from)
1724 (target_insn_history_range): Use gdb_disassembly_flags instead of
1725 bare int.
1726 * target.h: Include "disasm.h".
1727 (struct target_ops) <to_insn_history, to_insn_history_from,
1728 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
1729 int.
1730 (target_insn_history, target_insn_history_from)
1731 (target_insn_history_range): Use gdb_disassembly_flags instead of
1732 bare int.
1733
1734 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1735
1736 * cli/cli-script.c (build_command_line): For if/while commands,
1737 check whether args is empty.
1738
1739 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1740
1741 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
1742 (enum command_control_type): Likewise.
1743 (struct command_line): Likewise.
1744 (free_command_lines): Likewise.
1745 (struct command_lines_deleter): Likewise.
1746 (command_line_up): Likewise.
1747 (read_command_lines): Likewise.
1748 (read_command_lines_1): Likewise.
1749 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
1750 (enum command_control_type): Likewise.
1751 (struct command_line): Likewise.
1752 (free_command_lines): Likewise.
1753 (struct command_lines_deleter): Likewise.
1754 (command_line_up): Likewise.
1755 (read_command_lines): Likewise.
1756 (read_command_lines_1): Likewise.
1757 * breakpoint.h: Include cli/cli-script.h.
1758 * extension-priv.h: Likewise.
1759 * gdbcmd.h: Likewise.
1760
1761 2017-09-04 Pedro Alves <palves@redhat.com>
1762
1763 * ada-lang.c (is_known_support_routine): Move sal declaration to
1764 where it is initialized.
1765 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
1766 (parse_breakpoint_sals, decode_static_tracepoint_spec)
1767 (clear_command, update_static_tracepoint): Remove init_sal
1768 references. Move declarations closer to initializations.
1769 * cli/cli-cmds.c (list_command): Move sal declarations closer to
1770 initializations.
1771 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
1772 references. Move sal declarations closer to initializations.
1773 * frame.c (find_frame_sal): Return a symtab_and_line via function
1774 return instead of output parameter. Remove init_sal references.
1775 * frame.h (find_frame_sal): Return a symtab_and_line via function
1776 return instead of output parameter.
1777 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
1778 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
1779 instead of memset.
1780 (gdbscm_find_pc_line): Remove init_sal reference.
1781 * infcall.c (call_function_by_hand_dummy): Remove init_sal
1782 references. Move declarations closer to initializations.
1783 * infcmd.c (set_step_frame): Update. Move declarations closer to
1784 initializations.
1785 (finish_backward): Remove init_sal references. Move declarations
1786 closer to initializations.
1787 * infrun.c (process_event_stop_test, handle_step_into_function)
1788 (insert_hp_step_resume_breakpoint_at_frame)
1789 (insert_step_resume_breakpoint_at_caller): Likewise.
1790 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
1791 (symbol_to_sal): Likewise.
1792 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
1793 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
1794 to its initialization.
1795 * reverse.c (save_bookmark_command): Use new/delete. Remove
1796 init_sal references. Move declarations closer to initializations.
1797 * source.c (get_current_source_symtab_and_line): Remove brace
1798 initialization.
1799 (set_current_source_symtab_and_line): Now takes the sal by const
1800 reference. Remove brace initialization.
1801 (line_info): Remove init_sal reference.
1802 * source.h (set_current_source_symtab_and_line): Now takes a
1803 symtab_and_line via const reference.
1804 * stack.c (set_current_sal_from_frame): Adjust.
1805 (print_frame_info): Adjust.
1806 (get_last_displayed_sal): Return the sal via function return
1807 instead of via output parameter. Simplify.
1808 (frame_info): Adjust.
1809 * stack.h (get_last_displayed_sal): Return the sal via function
1810 return instead of via output parameter.
1811 * symtab.c (init_sal): Delete.
1812 (find_pc_sect_line): Remove init_sal references. Move
1813 declarations closer to initializations.
1814 (find_function_start_sal): Remove init_sal references. Move
1815 declarations closer to initializations.
1816 * symtab.h (struct symtab_and_line): In-class initialize all
1817 fields.
1818 * tracepoint.c (set_traceframe_context)
1819 (print_one_static_tracepoint_marker): Remove init_sal references.
1820 Move declarations closer to initializations.
1821 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
1822 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
1823 declarations closer to initializations.
1824 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
1825 init_sal references. Adjust.
1826
1827 2017-09-04 Pedro Alves <palves@redhat.com>
1828
1829 * ax-gdb.c (agent_command_1): Use range-for.
1830 * break-catch-throw.c (re_set_exception_catchpoint): Update.
1831 * breakpoint.c: Include "common/array-view.h".
1832 (init_breakpoint_sal, create_breakpoint_sal): Change sals
1833 parameter from struct symtabs_and_lines to
1834 array_view<symtab_and_line>. Adjust. Use range-for. Update.
1835 (breakpoint_sals_to_pc): Change sals parameter from struct
1836 symtabs_and_lines to std::vector reference.
1837 (check_fast_tracepoint_sals): Change sals parameter from struct
1838 symtabs_and_lines to std::array_view. Use range-for.
1839 (decode_static_tracepoint_spec): Return a std::vector instead of
1840 symtabs_and_lines. Update.
1841 (create_breakpoint): Update.
1842 (break_range_command, until_break_command, clear_command): Update.
1843 (base_breakpoint_decode_location, bkpt_decode_location)
1844 (bkpt_probe_create_sals_from_location)
1845 (bkpt_probe_decode_location, tracepoint_decode_location)
1846 (tracepoint_probe_decode_location)
1847 (strace_marker_create_sals_from_location): Return a std::vector
1848 instead of symtabs_and_lines.
1849 (strace_marker_create_breakpoints_sal): Update.
1850 (strace_marker_decode_location): Return a std::vector instead of
1851 symtabs_and_lines. Update.
1852 (update_breakpoint_locations): Change struct symtabs_and_lines
1853 parameters to gdb::array_view. Adjust.
1854 (location_to_sals): Return a std::vector instead of
1855 symtabs_and_lines. Update.
1856 (breakpoint_re_set_default): Use std::vector instead of struct
1857 symtabs_and_lines.
1858 (decode_location_default): Return a std::vector instead of
1859 symtabs_and_lines. Update.
1860 * breakpoint.h: Include "common/array-view.h".
1861 (struct breakpoint_ops) <decode_location>: Now returns a
1862 std::vector instead of returning a symtabs_and_lines via output
1863 parameter.
1864 (update_breakpoint_locations): Change sals parameters to use
1865 gdb::array_view.
1866 * cli/cli-cmds.c (edit_command, list_command): Update to use
1867 std::vector and gdb::array_view.
1868 (ambiguous_line_spec): Adjust to use gdb::array_view and
1869 range-for.
1870 (compare_symtabs): Rename to ...
1871 (cmp_symtabs): ... this. Change parameters to symtab_and_line
1872 const reference and adjust.
1873 (filter_sals): Rewrite using std::vector and standard algorithms.
1874 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
1875 (jump_command): Update to use std::vector.
1876 * linespec.c (struct linespec_state) <canonical_names>: Update
1877 comment.
1878 (add_sal_to_sals_basic): Delete.
1879 (add_sal_to_sals, filter_results, convert_results_to_lsals)
1880 (decode_line_2, create_sals_line_offset)
1881 (convert_address_location_to_sals, convert_linespec_to_sals)
1882 (convert_explicit_location_to_sals, parse_linespec)
1883 (event_location_to_sals, decode_line_full, decode_line_1)
1884 (decode_line_with_current_source)
1885 (decode_line_with_last_displayed, decode_objc)
1886 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
1887 (linespec_result::~linespec_result): Adjust to use std::vector
1888 instead of symtabs_and_lines.
1889 * linespec.h (linespec_sals::sals): Now a std::vector.
1890 (struct linespec_result): Use std::vector, bool, and in-class
1891 initialization.
1892 (decode_line_1, decode_line_with_current_source)
1893 (decode_line_with_last_displayed): Return std::vector.
1894 * macrocmd.c (info_macros_command): Use std::vector.
1895 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
1896 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
1897 std::vector.
1898 * probe.h (parse_probes): Return a std::vector.
1899 * python/python.c (gdbpy_decode_line): Use std::vector and
1900 gdb::array_view.
1901 * source.c (select_source_symtab, line_info): Use std::vector.
1902 * stack.c (func_command): Use std::vector.
1903 * symtab.h (struct symtabs_and_lines): Delete.
1904 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
1905
1906 2017-09-04 Pedro Alves <palves@redhat.com>
1907
1908 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1909 unittests/array-view-selftests.c.
1910 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
1911 * common/array-view.h: New file.
1912 * unittests/array-view-selftests.c: New file.
1913
1914 2017-09-04 Pedro Alves <palves@redhat.com>
1915
1916 * cli/cli-cmds.c (edit_command): Pass message to
1917 ambiguous_line_spec.
1918 (list_command): Pass message to ambiguous_line_spec. Say
1919 "first"/"last" instead of "start" and "end" to be consistent with
1920 the manual.
1921 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
1922 them to print formatted message.
1923
1924 2017-09-04 Pedro Alves <palves@redhat.com>
1925
1926 * btrace.c (ftrace_add_pt): Pass btrace_insn to
1927 ftrace_update_insns by reference instead of pointer.
1928
1929 2017-09-04 Yao Qi <yao.qi@linaro.org>
1930
1931 * i386-go32-tdep.c: Include x86-xstate.h.
1932 (i386_go32_init_abi): Call i386_target_description.
1933 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
1934 if xcr0 is X86_XSTATE_X87_MASK.
1935 * i386-tdep.h (tdesc_i386): Remove the declaration.
1936 (tdesc_i386_mmx): Likewise.
1937
1938 2017-09-04 Yao Qi <yao.qi@linaro.org>
1939
1940 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
1941 X86_XSTATE_SSE_MASK instead of 0.
1942
1943 2017-09-04 Yao Qi <yao.qi@linaro.org>
1944
1945 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
1946 i386_target_description.
1947 * i386-fbsd-nat.c (i386fbsd_read_description): Call
1948 i386_target_description.
1949 * i386-tdep.c (i386_gdbarch_init): Likewise.
1950
1951 2017-09-04 Yao Qi <yao.qi@linaro.org>
1952
1953 * amd64-darwin-tdep.c: Include "x86-xstate.h".
1954 (x86_darwin_init_abi_64): Call amd64_target_description.
1955 * amd64-dicos-tdep.c: Likewise.
1956 * amd64-fbsd-nat.c: Likewise.
1957 * amd64-fbsd-tdep.c: Likewise.
1958 * amd64-nbsd-tdep.c: Likewise.
1959 * amd64-obsd-tdep.c: Likewise.
1960 * amd64-sol2-tdep.c: Likewise.
1961 * amd64-windows-tdep.c: Likewise.
1962 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
1963
1964 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1965
1966 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
1967 (btrace_function) <insn>: Change type to use std::vector.
1968 * btrace.c (ftrace_debug, ftrace_call_num_insn,
1969 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
1970 ftrace_update_insns, ftrace_compute_global_level_offset,
1971 btrace_stitch_bts, btrace_clear, btrace_insn_get,
1972 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
1973 change to std::vector.
1974 (ftrace_update_insns): Adjust to change to std::vector, change
1975 type of INSN parameter.
1976 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
1977 * record-btrace.c (btrace_call_history_insn_range,
1978 btrace_compute_src_line_range,
1979 record_btrace_frame_prev_register): Adjust to change to
1980 std::vector.
1981 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
1982 to change to std::vector.
1983
1984 2017-09-03 Tom Tromey <tom@tromey.com>
1985
1986 * corefile.c (reopen_exec_file): Use std::string.
1987
1988 2017-09-03 Tom Tromey <tom@tromey.com>
1989
1990 * compile/compile.c (compile_register_name_mangled): Return
1991 std::string.
1992 * compile/compile-loc2c.c (pushf_register_address): Update.
1993 (pushf_register): Update.
1994 * compile/compile-c-types.c (convert_array): Update.
1995 * compile/compile-c-symbols.c (generate_vla_size): Update.
1996 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
1997 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
1998 (convert_one_symbol): Update.
1999 (generate_c_for_for_one_variable): Update.
2000 * compile/compile-c-support.c (c_get_range_decl_name): Return a
2001 std::string.
2002 (generate_register_struct): Update.
2003 * compile/compile-internal.h (c_get_range_decl_name): Return a
2004 std::string.
2005 (compile_register_name_mangled): Return std::string.
2006
2007 2017-09-03 Tom Tromey <tom@tromey.com>
2008
2009 * utils.c (perror_string): Return a std::string.
2010 (throw_perror_with_name, perror_warning_with_name): Update.
2011
2012 2017-09-03 Tom Tromey <tom@tromey.com>
2013
2014 * demangle.c (demangle_command): Use std::string,
2015 unique_xmalloc_ptr.
2016
2017 2017-09-03 Tom Tromey <tom@tromey.com>
2018
2019 * cli/cli-setshow.c (do_set_command): Use std::string.
2020
2021 2017-09-03 Tom Tromey <tom@tromey.com>
2022
2023 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
2024
2025 2017-09-03 Tom Tromey <tom@tromey.com>
2026
2027 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
2028
2029 2017-09-03 Tom Tromey <tom@tromey.com>
2030
2031 * mi/mi-cmd-env.c (env_execute_cli_command): Use
2032 gdb::unique_xmalloc_ptr.
2033
2034 2017-09-03 Tom Tromey <tom@tromey.com>
2035
2036 * thread.c (print_thread_info_1): Use string_printf.
2037 (thread_apply_command, thread_apply_all_command): Use
2038 std::string.
2039
2040 2017-09-03 Tom Tromey <tom@tromey.com>
2041
2042 * valprint.c (val_print_string): Update.
2043 * gdbcore.h (memory_error_message): Return std::string.
2044 * corefile.c (memory_error_message): Return std::string.
2045 (memory_error): Update.
2046 * breakpoint.c (insert_bp_location): Update.
2047
2048 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2049
2050 * target/waitstatus.h (target_waitstatus_to_string): Change
2051 return type to std::string.
2052 * target/waitstatus.c (target_waitstatus_to_string): Return
2053 std::string.
2054 * target.h (target_waitstatus_to_string): Remove declaration.
2055 * infrun.c (resume, clear_proceed_status_thread,
2056 print_target_wait_results, do_target_wait, save_waitstatus,
2057 stop_all_threads): Adjust.
2058 * record-btrace.c (record_btrace_wait): Adjust.
2059 * target-debug.h
2060 (target_debug_print_struct_target_waitstatus_p): Adjust.
2061
2062 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2063
2064 PR gdb/22046
2065 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
2066 detection.
2067
2068 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2069
2070 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
2071 for setting/unsetting environment variables on the remote target.
2072 (New remote packets): Add entries for QEnvironmentHexEncoded,
2073 QEnvironmentUnset and QEnvironmentReset.
2074 * common/environ.c (gdb_environ::operator=): Extend method to
2075 handle m_user_set_env_list and m_user_unset_env_list.
2076 (gdb_environ::clear): Likewise.
2077 (match_var_in_string): Change type of first parameter from 'char
2078 *' to 'const char *'.
2079 (gdb_environ::set): Extend method to handle
2080 m_user_set_env_list and m_user_unset_env_list.
2081 (gdb_environ::unset): Likewise.
2082 (gdb_environ::clear_user_set_env): New method.
2083 (gdb_environ::user_set_envp): Likewise.
2084 (gdb_environ::user_unset_envp): Likewise.
2085 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
2086 m_user_unset_env_list on move constructor/assignment.
2087 (unset): Add new default parameter 'update_unset_list = true'.
2088 (clear_user_set_env): New method.
2089 (user_set_envp): Likewise.
2090 (user_unset_envp): Likewise.
2091 (m_user_set_env_list): New std::set.
2092 (m_user_unset_env_list): Likewise.
2093 * common/rsp-low.c (hex2str): New function.
2094 (bin2hex): New overload for bin2hex function.
2095 * common/rsp-low.c (hex2str): New prototype.
2096 (str2hex): New overload prototype.
2097 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
2098 QEnvironmentUnset and QEnvironmentReset.
2099 (remote_protocol_features): Add QEnvironmentHexEncoded,
2100 QEnvironmentUnset and QEnvironmentReset packets.
2101 (send_environment_packet): New function.
2102 (extended_remote_environment_support): Likewise.
2103 (extended_remote_create_inferior): Call
2104 extended_remote_environment_support.
2105 (_initialize_remote): Add QEnvironmentHexEncoded,
2106 QEnvironmentUnset and QEnvironmentReset packet configs.
2107 * unittests/environ-selftests.c (gdb_selftest_env_var):
2108 New variable.
2109 (test_vector_initialization): New function.
2110 (test_init_from_host_environ): Likewise.
2111 (test_reinit_from_host_environ): Likewise.
2112 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
2113 Likewise.
2114 (test_unset_set_empty_vector): Likewise.
2115 (test_vector_clear): Likewise.
2116 (test_std_move): Likewise.
2117 (test_move_constructor):
2118 (test_self_move): Likewise.
2119 (test_set_unset_reset): Likewise.
2120 (run_tests): Rewrite in terms of the functions above.
2121
2122 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
2123
2124 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
2125 (adi_available): Use a temp variable of type CORE_ADDR as argument
2126 3 when calling target_auxv_search.
2127 (adi_normalize_address): Use masks and xor operators to calculate
2128 normalized address.
2129 (adi_read_versions, adi_write_versions, adi_print_versions)
2130 (do_examine, do_assign): Use paddress.
2131
2132 2017-08-29 John Baldwin <jhb@FreeBSD.org>
2133
2134 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
2135 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
2136 out of loop and add supply of FIR.
2137 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
2138 add collect of FIR.
2139
2140 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
2141
2142 PR gdb/21827
2143 * cli/cli-script.c (define_command): Don't convert command name
2144 to lower case.
2145
2146 2017-08-25 Joel Brobecker <brobecker@adacore.com>
2147
2148 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
2149 Update all callers accordingly. Remove all code blocks handling
2150 the case where DISPP is not NULL.
2151
2152 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2153
2154 PR symtab/22003
2155 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
2156 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2157 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
2158
2159 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2160
2161 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
2162 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
2163 (read_comp_units_from_section): New parameter abbrev_section, use
2164 read_and_check_comp_unit_head, allocate signatured_type if needed.
2165 (create_all_comp_units): Update read_comp_units_from_section caller.
2166
2167 2017-08-23 Pedro Alves <palves@redhat.com>
2168
2169 PR remote/21852
2170 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
2171 to null_ptid and switch to thread without reading the registers
2172 after adding the inferior.
2173
2174 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2175
2176 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
2177 compile-gcc.
2178 * compile/compile.c (compile_gcc, show_compile_gcc): New.
2179 (compile_to_object): Implement compile_gcc.
2180 (_initialize_compile): Install "set compile-gcc". Initialize
2181 compile_gcc.
2182
2183 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2184
2185 * compile/compile.c (compile_to_object): Conditionally call
2186 set_verbose. Conditionally call compile or compile_v0.
2187
2188 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
2189
2190 * sparc64-tdep.h: (adi_normalize_address): New export.
2191 * sparc-nat.h: (open_adi_tag_fd): New export.
2192 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
2193 * sparc64-linux-tdep.c:
2194 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
2195 (sparc64_linux_handle_segmentation_fault): New function.
2196 (sparc64_linux_init_abi): Register
2197 sparc64_linux_handle_segmentation_fault
2198 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
2199 (sparc64_addr_bits_remove): New function.
2200 (sparc64_init_abi): Register sparc64_addr_bits_remove.
2201 (MAX_PROC_NAME_SIZE): New macro.
2202 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
2203 (sparc64adilist): New variable.
2204 (adi_proc_list): New variable.
2205 (find_adi_info): New function.
2206 (add_adi_info): New function.
2207 (get_adi_info_proc): New function.
2208 (get_adi_info): New function.
2209 (info_adi_command): New function.
2210 (read_maps_entry): New function.
2211 (adi_available): New function.
2212 (adi_normalize_address): New function.
2213 (adi_align_address): New function.
2214 (adi_convert_byte_count): New function.
2215 (adi_tag_fd): New function.
2216 (adi_is_addr_mapped): New function.
2217 (adi_read_versions): New function.
2218 (adi_write_versions): New function.
2219 (adi_print_versions): New function.
2220 (do_examine): New function.
2221 (do_assign): New function.
2222 (adi_examine_command): New function.
2223 (adi_assign_command): New function.
2224 (_initialize_sparc64_adi_tdep): New function.
2225
2226 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
2227
2228 * breakpoint.c (breakpoints_info): Rename to ...
2229 (info_breakpoints_command): ... this.
2230 (watchpoints_info): Rename to ...
2231 (info_watchpoints_command): ... this.
2232 (tracepoints_info): Rename to ...
2233 (info_tracepoints_command): ... this.
2234 (_initialize_breakpoint): Adjust.
2235 * dcache.c (dcache_info): Rename to ...
2236 (info_display_command): ... this.
2237 (_initialize_dcache): Adjust.
2238 * frame.h (args_info): Rename to ...
2239 (info_args_command): ... this.
2240 (locals_info): Rename to ...
2241 (info_locals_command): ... this.
2242 * infcmd.c (nofp_registers_info): Rename to ...
2243 (info_registers_command): ... this.
2244 (float_info): Rename to ...
2245 (info_float_command): ... this.
2246 (program_info): Rename to ...
2247 (info_program_command): ... this.
2248 (all_registers_info): Rename to ...
2249 (info_all_registers_command): ... this.
2250 (vector_info): Rename to ...
2251 (info_vector_command): ... this.
2252 (float_info): Rename to ...
2253 (info_float_command): ... this.
2254 (_initialize_infcmd): Adjust.
2255 * inferior.h (term_info): Rename to ...
2256 (info_terminal_command): ... this.
2257 * inflow.c (term_info): Rename to ...
2258 (info_terminal_command): ... this.
2259 (_initialize_inflow): Adjust.
2260 * infrun.c (signals_info): Rename to ...
2261 (info_signals_command): ... this.
2262 (_initialize_infrun): Adjust.
2263 * objc-lang.c (classes_info): Rename to ...
2264 (info_classes_command): ... this.
2265 (selectors_info): Rename to ...
2266 (info_selectors_command): ... this.
2267 (_initialize_objc_language): Adjust.
2268 * printcmd.c (sym_info): Rename to ...
2269 (info_symbol_command): ... this.
2270 (address_info): Rename to ...
2271 (info_address_command): ... this.
2272 (display_info): Rename to ...
2273 (info_display_command): ... this.
2274 (_initialize_printcmd): Adjust.
2275 * reverse.c (bookmarks_info): Rename to ...
2276 (info_breakpoints_command): ... this.
2277 (_initialize_reverse): Adjust.
2278 * ser-go32.c (dos_info): Rename to ...
2279 (info_serial_command): ... this.
2280 (_initialize_ser_dos): Adjust.
2281 * skip.c (skip_info): Rename to ...
2282 (info_skip_command): ... this.
2283 (_initialize_step_skip): Adjust.
2284 * source.c (line_info): Rename to ...
2285 (info_line_command): ... this.
2286 (source_info): Rename to ...
2287 (info_source_command)
2288 * stack.c (frame_info): Rename to ...
2289 (info_frame_command): ... this.
2290 (locals_info): Rename to ...
2291 (info_locals_command): ... this.
2292 (args_info): Rename to ...
2293 (info_args_command): ... this.
2294 (_initialize_stack): Adjust.
2295 * symtab.c (sources_info): Rename to ...
2296 (info_sources_command): ... this.
2297 (variables_info): Rename to ...
2298 (info_variables_command): ... this.
2299 (functions_info): Rename to ...
2300 (info_functions_command): ... this.
2301 (types_info): Rename to ...
2302 (info_types_command): ... this.
2303 (_initialize_symtab): Adjust.
2304 * target.c (target_info): Rename to ...
2305 (info_target_command): ... this.
2306 (initialize_targets): Adjust.
2307 * tracepoint.c (tvariables_info): Rename to ...
2308 (info_tvariables_command): ... this.
2309 (scope_info): Rename to ...
2310 (info_scope_command): ... this.
2311 (trace_dump_actions): Adjust.
2312 (_initialize_tracepoint): Adjust.
2313
2314 2017-08-22 Tom Tromey <tom@tromey.com>
2315
2316 * breakpoint.h (install_breakpoint): Update.
2317 * breakpoint.c (add_solib_catchpoint): Update.
2318 (install_breakpoint): Change argument to a std::unique_ptr.
2319 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
2320 (create_breakpoint_sal, create_breakpoint): Update.
2321 (watch_command_1, catch_exec_command_1)
2322 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
2323 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
2324 Return the breakpoint.
2325 (set_raw_breakpoint_without_location, set_raw_breakpoint)
2326 (new_single_step_breakpoint): Update.
2327 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
2328 std::unique_ptr.
2329 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2330 std::unique_ptr.
2331 * break-catch-sig.c (create_signal_catchpoint): Use
2332 std::unique_ptr.
2333 * ada-lang.c (create_ada_exception_catchpoint): Use
2334 std::unique_ptr.
2335
2336 2017-08-22 Tom Tromey <tom@tromey.com>
2337
2338 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
2339
2340 2017-08-22 Tom Tromey <tom@tromey.com>
2341
2342 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
2343 (lookup_partial_symbol): Update.
2344
2345 2017-08-22 Tom Tromey <tom@tromey.com>
2346
2347 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
2348 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
2349 (find_and_open_source, symtab_to_fullname): Update.
2350 * psymtab.c (psymtab_to_fullname): Update.
2351
2352 2017-08-22 Tom Tromey <tom@tromey.com>
2353
2354 * exec.c (exec_file_attach): Update.
2355 * linux-thread-db.c (try_thread_db_load): Update.
2356 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
2357 * utils.c (gdb_realpath): Change return type.
2358 (gdb_realpath_keepfile): Update.
2359 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
2360 (_initialize_utils): Register the new self test.
2361 * source.c (openp): Update.
2362 (find_and_open_source): Update.
2363 * nto-tdep.c (nto_find_and_open_solib): Update.
2364 * main.c (set_gdb_data_directory): Update.
2365 (captured_main_1): Update.
2366 * dwarf2read.c (dwarf2_get_dwz_file): Update
2367 (dw2_map_symbol_filenames): Update.
2368 * auto-load.c (auto_load_safe_path_vec_update): Update.
2369 (filename_is_in_auto_load_safe_path_vec): Change type of
2370 "filename_realp".
2371 (auto_load_objfile_script): Update.
2372 (file_is_auto_load_safe): Update. Use std::string.
2373 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
2374
2375 2017-08-22 Tom Tromey <tom@tromey.com>
2376
2377 * utils.c (gdb_realpath_keepfile): Return a
2378 gdb::unique_xmalloc_ptr.
2379 * exec.c (exec_file_attach): Update.
2380 * utils.h (gdb_realpath_keepfile): Return a
2381 gdb::unique_xmalloc_ptr.
2382
2383 2017-08-22 Tom Tromey <tom@tromey.com>
2384
2385 * compile/compile.c (compile_file_command): Use
2386 gdb::unique_xmalloc_ptr, std::string.
2387 * utils.c (gdb_abspath): Change return type.
2388 * source.c (openp): Update.
2389 * objfiles.c (allocate_objfile): Update.
2390 * main.c (set_gdb_data_directory): Update.
2391 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
2392
2393 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
2394
2395 * cli-cmds.c (list_commands): List actual code around more than
2396 one location.
2397
2398 2017-08-21 John Baldwin <jhb@FreeBSD.org>
2399
2400 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
2401
2402 2017-08-21 Pedro Alves <palves@redhat.com>
2403
2404 PR gdb/19487
2405 * c-exp.y (variable production): Handle function aliases.
2406 * minsyms.c (msymbol_is_text): New function.
2407 * minsyms.h (msymbol_is_text): Declare.
2408 * symtab.c (find_function_alias_target): New function.
2409 * symtab.h (find_function_alias_target): Declare.
2410
2411 2017-08-21 Pedro Alves <palves@redhat.com>
2412
2413 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
2414 typedefs.
2415 * typeprint.c (whatis_exp): If handling "whatis", and expression
2416 is OP_TYPE, strip one typedef level. Otherwise don't strip
2417 typedefs here.
2418 * valops.c (value_cast): Save "to" type before resolving
2419 stubs/typedefs. Use that type as resulting value's type.
2420
2421 2017-08-18 Tom Tromey <tom@tromey.com>
2422 Pedro Alves <palves@redhat.com>
2423
2424 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
2425 * sol-thread.c (sol_thread_resume, sol_thread_wait)
2426 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
2427 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
2428 * proc-service.c (ps_xfer_memory): Use scoped_restore.
2429 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
2430 (linux_get_siginfo_data): Add "thread" argument. Use
2431 scoped_restore.
2432 * linux-nat.c (linux_child_follow_fork)
2433 (check_stopped_by_watchpoint): Use scoped_restore.
2434 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
2435 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
2436 (restore_inferior_ptid, save_inferior_ptid): Remove.
2437 * btrace.c (btrace_fetch): Use scoped_restore.
2438 * bsd-uthread.c (bsd_uthread_fetch_registers)
2439 (bsd_uthread_store_registers): Use scoped_restore.
2440 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
2441 scoped_restore.
2442 * aix-thread.c (aix_thread_resume, aix_thread_wait)
2443 (aix_thread_xfer_partial): Use scoped_restore.
2444 * inferior.h (save_inferior_ptid): Remove.
2445
2446 2017-08-18 Yao Qi <yao.qi@linaro.org>
2447
2448 PR tdep/21818
2449 * arm-tdep.c (gdb_print_insn_arm): Mark
2450 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
2451
2452 2017-08-18 Yao Qi <yao.qi@linaro.org>
2453
2454 * NEWS: Mention GDBserver's new option "--selftest".
2455 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
2456 * selftest.c: Move it to common/selftest.c.
2457 * selftest.h: Move it to common/selftest.h.
2458 * selftest-arch.c (reset): New function.
2459 (tests_with_arch): Call reset.
2460
2461 2017-08-18 Yao Qi <yao.qi@linaro.org>
2462
2463 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
2464 instead of exception_fprintf and printf_filtered.
2465
2466 2017-08-18 Yao Qi <yao.qi@linaro.org>
2467
2468 * selftest.c (register_self_test): Rename it to
2469 selftests::register_test.
2470 (run_self_tests): selftest::run_tests.
2471 * selftest.h: Update declarations.
2472 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
2473 selftests::register_test_foreach_arch.
2474 * selftest-arch.h: Update declaration.
2475 * aarch64-tdep.c: Update.
2476 * arm-tdep.c: Likewise.
2477 * disasm-selftests.c: Likewise.
2478 * dwarf2loc.c: Likewise.
2479 * dwarf2-frame.c: Likewise.
2480 * findvar.c: Likewise.
2481 * gdbarch-selftests.c: Likewise.
2482 * maint.c (maintenance_selftest): Likewise.
2483 * regcache.c: Likewise.
2484 * rust-exp.y: Likewise.
2485 * selftest-arch.c: Likewise.
2486 * unittests/environ-selftests.c: Likewise.
2487 * unittests/function-view-selftests.c: Likewise.
2488 * unittests/offset-type-selftests.c: Likewise.
2489 * unittests/optional-selftests.c: Likewise.
2490 * unittests/scoped_restore-selftests.c: Likewise.
2491 * utils-selftests.c: Likewise.
2492
2493 2017-08-17 Pedro Alves <palves@redhat.com>
2494
2495 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
2496 local.
2497
2498 2017-08-17 Pedro Alves <palves@redhat.com>
2499
2500 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
2501 field.
2502 (reset_die_in_process): Delete, replaced by ...
2503 (process_die_scope): ... this new class. Make it responsible for
2504 freeing cu->line_header too.
2505 (process_die): Use process_die_scope.
2506 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
2507 cu->line_header_die_owner. Don't release the line header if it's
2508 owned by the CU.
2509 (setup_type_unit_groups): Make the CU/DIE own the line header.
2510 Don't release the line header here.
2511
2512 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
2513
2514 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
2515
2516 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
2517
2518 * NEWS: Mention new shortcuts for nexti and stepi in TUI
2519 Single-Key mode
2520
2521 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
2522
2523 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
2524 mode command list.
2525
2526 2017-08-15 Stafford Horne <shorne@gmail.com>
2527
2528 * MAINTAINERS (Write After Approval): Add Stafford Horne.
2529
2530 2017-08-15 Stafford Horne <shorne@gmail.com>
2531
2532 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
2533
2534 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
2535
2536 PR gdb/21954
2537 * infcmd.c (unset_environment_command): Use the 'clear' method on
2538 the environment instead of resetting it.
2539
2540 2017-08-15 John Baldwin <jhb@FreeBSD.org>
2541
2542 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
2543 platforms.
2544
2545 2017-08-14 Tom Tromey <tom@tromey.com>
2546
2547 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
2548 (print_binary_chars): Likewise.
2549 (BITS_IN_BYTES): Remove.
2550
2551 2017-08-14 Tom Tromey <tom@tromey.com>
2552
2553 PR gdb/21675
2554 * valprint.c (LOW_ZERO): Change value to 034.
2555 (print_octal_chars): Add static_asserts for octal constants.
2556 * printcmd.c (print_scalar_formatted): Add 'd' case.
2557
2558 2017-08-11 Tom Tromey <tom@tromey.com>
2559
2560 * symfile.c (add_symbol_file_command): Use std::vector.
2561
2562 2017-08-14 Tom Tromey <tom@tromey.com>
2563
2564 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
2565 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2566 std::move.
2567 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
2568
2569 2017-08-11 Pedro Alves <palves@redhat.com>
2570
2571 * infrun.c (process_event_stop_test): Adjust
2572 function_name_is_marked_for_skip call.
2573 * skip.c: Include <list>.
2574 (skiplist_entry): Make it a class with private fields, and
2575 getters/setters.
2576 (skiplist_entry_chain): Delete.
2577 (skiplist_entries): New.
2578 (skiplist_entry_count): Delete.
2579 (highest_skiplist_entry_num): New.
2580 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
2581 (add_skiplist_entry): Delete.
2582 (skiplist_entry::skiplist_entry): New.
2583 (skiplist_entry::add_entry): New.
2584 (skip_file_command, skip_function): Adjust.
2585 (compile_skip_regexp): Delete.
2586 (skip_command): Don't compile regexp here. Adjust to use
2587 skiplist_entry::add_entry.
2588 (skip_info): Adjust to use range-for and getters.
2589 (skip_enable_command, skip_disable_command): Adjust to use
2590 range-for and setters.
2591 (skip_delete_command): Adjust to use std::list.
2592 (add_skiplist_entry): Delete.
2593 (skip_file_p): Delete, refactored as ...
2594 (skiplist_entry::do_skip_file_p): ... this new method.
2595 (skip_gfile_p): Delete, refactored as ...
2596 (skiplist_entry::do_gskip_file_p): ... this new method.
2597 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
2598 (skiplist_entry::skip_function_p): ... this new method.
2599 (function_name_is_marked_for_skip): Now returns bool, and takes
2600 the function sal by const reference. Adjust to use range-for and
2601 skiplist_entry methods.
2602 (_initialize_step_skip): Remove references to
2603 skiplist_entry_chain, skiplist_entry_count.
2604 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
2605 takes the function sal by const reference.
2606
2607 2017-08-11 Yao Qi <yao.qi@linaro.org>
2608
2609 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
2610 (dwarf2_frame_cache): Remove reset_cache_cleanup.
2611 (dwarf2_frame_cache):
2612 * frame-unwind.c (frame_unwind_try_unwinder): Catch
2613 RETURN_MASK_ALL and set *this_case to NULL.
2614 * frame-unwind.h: Update comments.
2615
2616 2017-08-11 Yao Qi <yao.qi@linaro.org>
2617
2618 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
2619 (dwarf2_frame_state_copy_regs): Remove.
2620 (dwarf2_frame_state_free_regs): Remove.
2621 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
2622 (dwarf2_restore_rule): Call method .alloc_regs instead of
2623 dwarf2_frame_state_alloc_regs.
2624 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
2625 constructor. Call std::move.
2626 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
2627 (dwarf2_frame_cache): Likewise.
2628
2629 [GDB_SELF_TEST]: Include selftest.h and
2630 selftest-arch.h.
2631 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
2632 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
2633 execute_cfa_program_test.
2634
2635 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
2636 copy ctor, assignment operator, move assignment.
2637 <alloc_regs>: New method.
2638 <swap>: New method.
2639 (struct dwarf2_frame_state): Delete dtor.
2640 (dwarf2_frame_state_alloc_regs): Remove declaration.
2641 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
2642 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
2643
2644 2017-08-11 Yao Qi <yao.qi@linaro.org>
2645
2646 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
2647 (dwarf2_frame_state::dwarf2_frame_state): New.
2648 (dwarf2_frame_state::~dwarf2_frame_state): New.
2649 (dwarf2_fetch_cfa_info): Update.
2650 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
2651 rather than a pointer. Update code.
2652 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
2653 dtor.
2654 <data_align, code_align, retaddr_column>: Change them to const.
2655 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
2656 to bool.
2657
2658 2017-08-11 Yao Qi <yao.qi@linaro.org>
2659
2660 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
2661 <loc.exp>: New field.
2662 * dwarf2-frame.c (execute_cfa_program): Update.
2663 (dwarf2_frame_prev_register): Update.
2664
2665 2017-08-10 Pedro Alves <palves@redhat.com>
2666
2667 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
2668
2669 2017-08-09 John Baldwin <jhb@FreeBSD.org>
2670
2671 * fbsd-nat.c (struct fbsd_fork_info): Remove.
2672 (fbsd_pending_children): Use std::list.
2673 (fbsd_remember_child): Likewise.
2674 (fbsd_is_child_pending): Likewise.
2675 (fbsd_pending_vfork_done): Use std::forward_list.
2676 (fbsd_add_vfork_done): Likewise.
2677 (fbsd_is_vfork_done_pending): Likewise.
2678 (fbsd_next_vfork_done): Likewise.
2679
2680 2017-08-09 John Baldwin <jhb@FreeBSD.org>
2681
2682 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
2683 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
2684 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
2685 for `mapfilename'.
2686 (fbsd_xfer_partial): Use gdb::byte_vector.
2687 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
2688
2689 2017-08-09 John Baldwin <jhb@FreeBSD.org>
2690
2691 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
2692 "filestuff.h".
2693 (fbsd_find_memory_regions): Fix `mapfile' initialization.
2694
2695 2017-08-09 Tom Tromey <tom@tromey.com>
2696
2697 * skip.c (skiplist_entry): New constructor.
2698 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
2699 (skiplist_entry::file_is_glob): Now bool.
2700 (skiplist_entry::file, skiplist_entry::function): Now
2701 std::string.
2702 (make_skip_entry): Return a unique_ptr. Use new.
2703 (free_skiplist_entry, free_skiplist_entry_cleanup)
2704 (make_free_skiplist_entry_cleanup): Remove.
2705 (skip_command, skip_disable_command, add_skiplist_entry)
2706 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
2707 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
2708 (function_name_is_marked_for_skip): Update.
2709 (skip_delete_command): Update. Use delete.
2710
2711 2017-08-09 Jiong Wang <jiong.wang@arm.com>
2712
2713 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
2714 (aarch64_linux_core_read_description): New function.
2715 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
2716
2717 2017-08-09 Pedro Alves <palves@redhat.com>
2718
2719 * cp-name-parser.y (cp_comp_to_string): Return a
2720 gdb::unique_xmalloc_ptr<char>.
2721 * cp-support.c (replace_typedefs_qualified_name)
2722 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
2723 (cp_canonicalize_string_full): Use op= instead of explicit
2724 convertion.
2725 (cp_class_name_from_physname, method_name_from_physname)
2726 (cp_func_name, cp_remove_params): Adjust to use
2727 gdb::unique_xmalloc_ptr<char>.
2728 * cp-support.h (cp_comp_to_string): Return a
2729 gdb::unique_xmalloc_ptr<char>.
2730 * python/py-type.c (typy_lookup_type): Adjust to use
2731 gdb::unique_xmalloc_ptr<char>.
2732
2733 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
2734
2735 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
2736
2737 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
2738 Yao Qi <yao.qi@linaro.org>
2739
2740 * cp-support.c (cp_canonicalize_string_full): Use
2741 gdb::unique_xmalloc_ptr<char>.
2742 (cp_canonicalize_string): Likewise.
2743
2744 2017-08-09 Yao Qi <yao.qi@linaro.org>
2745
2746 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
2747 * regformats/i386/amd64-avx-avx512.dat: Remove.
2748 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
2749 * regformats/i386/amd64-avx-mpx.dat:Remove.
2750 * regformats/i386/amd64-avx.dat: Remove.
2751 * regformats/i386/amd64-mpx.dat: Remove.
2752 * regformats/i386/i386-avx-avx512.dat: Remove.
2753 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
2754 * regformats/i386/i386-avx-mpx.dat: Remove.
2755 * regformats/i386/i386-mmx.dat: Remove.
2756 * regformats/i386/i386-mpx.dat: Remove.
2757
2758 2017-08-09 Yao Qi <yao.qi@linaro.org>
2759
2760 * amd64-tdep.h (tdesc_x32): Remove the declaration.
2761 * amd64-tdep.c: Don't include features/i386/x32*.c.
2762 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
2763 functions.
2764 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
2765 and i386/x32-avx-avx512.
2766 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
2767 and i386/x32.xml.
2768 * features/i386/x32-avx-avx512.c: Removed.
2769 * features/i386/x32-avx-avx512.xml: Removed.
2770 * features/i386/x32-avx.c: Removed.
2771 * features/i386/x32-avx.xml: Removed.
2772 * features/i386/x32.c: Removed.
2773 * features/i386/x32.xml: Removed.
2774 * regformats/i386/x32-avx-avx512.dat: Removed.
2775 * regformats/i386/x32-avx.dat: Removed.
2776 * regformats/i386/x32.dat: Removed.
2777
2778 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
2779
2780 PR breakpoints/21886
2781 * mem-break.c (default_memory_insert_breakpoint): Use
2782 `->placed_address' rather than `->reqstd_address' for the
2783 breakpoint location.
2784
2785 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
2786
2787 * arch-utils.c (default_print_insn): Remove arch/mach/endian
2788 assertions.
2789
2790 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
2791
2792 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
2793 a union of `tdep_info', `tdesc_data' and `id'.
2794 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
2795 rather than `info.tdep_info'.
2796 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
2797 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
2798 * i386-tdep.c (i386_gdbarch_init): Likewise.
2799 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
2800 * mips-tdep.c (mips_gdbarch_init): Likewise.
2801 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2802 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
2803 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
2804 `info.tdep_info'.
2805 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
2806 `info.tdep_info'.
2807 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
2808 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
2809 `info.tdep_info'.
2810 * spu-tdep.c (spu_gdbarch_init): Likewise.
2811 * gdbarch.h: Regenerate.
2812
2813 2017-08-07 Leszek Swirski <leszeks@google.com>
2814
2815 PR symtab/20899
2816 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
2817
2818 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
2819
2820 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
2821 (gdbsim_open): Rename gdb_argv args object to argv.
2822
2823 2017-08-05 Tom Tromey <tom@tromey.com>
2824
2825 * compile/compile-object-load.c (compile_object_load): Use
2826 gdb::unique_xmalloc_ptr.
2827 * cli/cli-dump.c (scan_filename): Rename from
2828 scan_filename_with_cleanup. Change return type.
2829 (scan_expression): Rename from scan_expression_with_cleanup.
2830 Change return type.
2831 (dump_memory_to_file, dump_value_to_file, restore_command):
2832 Use gdb::unique_xmalloc_ptr. Update.
2833 * cli/cli-cmds.c (find_and_open_script): Use
2834 gdb::unique_xmalloc_ptr.
2835 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
2836 * symmisc.c (maintenance_print_symbols)
2837 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
2838 * symfile.c (symfile_bfd_open, generic_load)
2839 (add_symbol_file_command, remove_symbol_file_command): Use
2840 gdb::unique_xmalloc_ptr.
2841 * source.c (openp): Use gdb::unique_xmalloc_ptr.
2842 * psymtab.c (maintenance_print_psymbols): Use
2843 gdb::unique_xmalloc_ptr.
2844 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
2845 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
2846 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
2847 (reload_shared_libraries_1): Likewise.
2848
2849 2017-08-05 Tom Tromey <tom@tromey.com>
2850
2851 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
2852 (rust_op_vector, rust_set_vector): New typedefs.
2853 (current_parser): New global.
2854 (work_obstack): Change to pointer type. Update all users.
2855 (rust_ast, pstate): Remove globals.
2856 (struct rust_parser): New.
2857 (%union) <params, field_inits>: Change type.
2858 (start, tuple_expr, unit_expr, struct_expr_list, literal)
2859 (field_expr, expr_list, maybe_expr_list, type_list): Update.
2860 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
2861 (convert_params_to_types, convert_params_to_expression): Change
2862 type of "params".
2863 (ast_string): Change type of "fields".
2864 (rust_parse): Make a rust_parser. Remove cleanups.
2865 (rust_lex_tests): Make and install an auto_obstack.
2866
2867 2017-08-04 Yao Qi <yao.qi@linaro.org>
2868
2869 * configure.srv (ipa_x32_linux_regobj): New.
2870 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
2871 instead of X86_TDESC_AVX512.
2872 (initialize_low_tracepoint): Call
2873 init_registers_x32_avx_avx512_linux.
2874
2875 2017-08-04 Yao Qi <yao.qi@linaro.org>
2876
2877 * utils.h (gdb_argv): Add namespace std for nullptr_t.
2878
2879 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
2880
2881 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
2882
2883 2017-08-03 Tom Tromey <tom@tromey.com>
2884
2885 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
2886 Remove.
2887 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
2888
2889 2017-08-03 Tom Tromey <tom@tromey.com>
2890
2891 * python/py-param.c (compute_enum_values): Use gdb_argv.
2892
2893 2017-08-03 Tom Tromey <tom@tromey.com>
2894
2895 * utils.h (struct gdb_argv_deleter): New.
2896 (gdb_argv): New class.
2897 * utils.c (gdb_argv::reset): New method.
2898 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
2899 * tracefile.c (tsave_command): Use gdb_argv.
2900 * top.c (new_ui_command): Use gdb_argv.
2901 * symmisc.c (maintenance_print_symbols)
2902 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
2903 * symfile.c (symbol_file_command, generic_load)
2904 (remove_symbol_file_command): Use gdb_argv.
2905 * stack.c (backtrace_command): Use gdb_argv.
2906 * source.c (add_path, show_substitute_path_command)
2907 (unset_substitute_path_command, set_substitute_path_command):
2908 Use gdb_argv.
2909 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
2910 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
2911 * remote.c (extended_remote_run, remote_put_command)
2912 (remote_get_command, remote_delete_command): Use gdb_argv.
2913 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
2914 (gdbsim_open): Use gdb_argv.
2915 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
2916 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
2917 * procfs.c (procfs_info_proc): Use gdb_argv.
2918 * interps.c (interpreter_exec_cmd): Use gdb_argv.
2919 * infrun.c (handle_command): Use gdb_argv.
2920 * inferior.c (add_inferior_command, clone_inferior_command):
2921 Use gdb_argv.
2922 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
2923 * exec.c (exec_file_command): Use gdb_argv.
2924 * cli/cli-cmds.c (alias_command): Use gdb_argv.
2925 * compile/compile.c (build_argc_argv): Use gdb_argv.
2926
2927 2017-08-03 Tom Tromey <tom@tromey.com>
2928
2929 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
2930
2931 2017-08-03 Tom Tromey <tom@tromey.com>
2932
2933 * python/python.c (compute_python_string): Return std::string.
2934 (gdbpy_eval_from_control_command): Update.
2935 (do_start_initialization): Use std::string.
2936 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
2937 xstrprintf.
2938 * python/py-breakpoint.c (local_setattro): Use string_printf, not
2939 xstrprintf.
2940
2941 2017-08-03 Tom Tromey <tom@tromey.com>
2942
2943 * top.h (do_restore_instream_cleanup): Remove.
2944 * top.c (do_restore_instream_cleanup): Remove.
2945 (read_command_file): Use scoped_restore.
2946 * cli/cli-script.c (execute_user_command): Use scoped_restore.
2947
2948 2017-08-03 Tom Tromey <tom@tromey.com>
2949
2950 * cli/cli-script.c (execute_user_command)
2951 (execute_control_command): Use scoped_restore.
2952
2953 2017-08-03 Tom Tromey <tom@tromey.com>
2954
2955 * cli/cli-script.c (do_restore_user_call_depth): Remove.
2956 (execute_user_command): Remove user_call_depth; use
2957 user_args_stack's size instead.
2958
2959 2017-08-03 Tom Tromey <tom@tromey.com>
2960
2961 * top.h (in_user_command): Remove.
2962 * top.c (in_user_command): Remove.
2963 * cli/cli-script.c (do_restore_user_call_depth)
2964 (execute_user_command): Update.
2965
2966 2017-08-03 Tom Tromey <tom@tromey.com>
2967
2968 * valops.c (search_struct_method): Use gdb::byte_vector.
2969 * valarith.c (value_concat): Use std::vector.
2970 * target.c (memory_xfer_partial): Use gdb::byte_vector.
2971 (simple_search_memory): Likewise.
2972 * printcmd.c (find_string_backward): Use gdb::byte_vector.
2973 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
2974 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
2975 * elfread.c (elf_rel_plt_read): Use std::string.
2976 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
2977 * cli/cli-dump.c (restore_section_callback): Use
2978 gdb::byte_vector.
2979
2980 2017-08-03 Tom Tromey <tom@tromey.com>
2981
2982 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
2983
2984 2017-08-03 Tom Tromey <tom@tromey.com>
2985
2986 * tui/tui-regs.c (tui_restore_gdbout): Remove.
2987 (tui_register_format): Use scoped_restore.
2988
2989 2017-08-03 Tom Tromey <tom@tromey.com>
2990
2991 * reverse.c (exec_direction_default): Remove.
2992 (exec_reverse_once): Use scoped_restore.
2993 * remote.c (restore_remote_timeout): Remove.
2994 (remote_flash_erase, remote_flash_write, remote_flash_done)
2995 (readchar, remote_serial_write): Use scoped_restore.
2996 * cli/cli-script.c (struct source_cleanup_lines_args)
2997 (source_cleanup_lines): Remove.
2998 (script_from_file): Use scoped_restore.
2999 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
3000 (source_command): Use scoped_restore.
3001
3002 2017-08-03 Tom Tromey <tom@tromey.com>
3003
3004 * utils.h (make_cleanup_free_so): Remove.
3005 * utils.c (do_free_so, make_cleanup_free_so): Remove.
3006 * solist.h (struct so_deleter): New.
3007 (so_list_up): New typedef.
3008 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
3009
3010 2017-08-03 Tom Tromey <tom@tromey.com>
3011
3012 * utils.h (make_cleanup_restore_current_language): Remove.
3013 * utils.c (do_restore_current_language)
3014 (make_cleanup_restore_current_language): Remove.
3015 * parse.c (parse_exp_in_context_1)
3016 (parse_expression_with_language): Use
3017 scoped_restore_current_language.
3018 * mi/mi-main.c (mi_cmd_execute): Use
3019 scoped_restore_current_language.
3020 * language.h (scoped_restore_current_language): New class.
3021
3022 2017-08-03 Tom Tromey <tom@tromey.com>
3023
3024 * compile/compile.c (cleanup_unlink_file): Remove.
3025 (compile_to_object): Use gdb::unlinker.
3026 (eval_compile_command): Likewise.
3027
3028 2017-08-03 Tom Tromey <tom@tromey.com>
3029
3030 * utils.h (make_cleanup_fclose): Remove.
3031 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
3032
3033 2017-08-03 Tom Tromey <tom@tromey.com>
3034
3035 * top.c (open_terminal_stream): Return gdb_file_up.
3036 (new_ui_command): Update.
3037
3038 2017-08-03 Tom Tromey <tom@tromey.com>
3039
3040 * source.c (print_source_lines_base, forward_search_command)
3041 (reverse_search_command): Use gdb_file_up.
3042
3043 2017-08-03 Tom Tromey <tom@tromey.com>
3044
3045 * fbsd-nat.c (fbsd_find_memory_regions): Update.
3046
3047 2017-08-03 Tom Tromey <tom@tromey.com>
3048
3049 * cli/cli-cmds.c (find_and_open_script): Change return type.
3050 Remove "streamp" and "full_path" parameters.
3051 (source_script_with_search): Update.
3052 * auto-load.c (source_script_file): Update.
3053 * cli/cli-cmds.h (find_and_open_script): Change type.
3054 (open_script): New struct.
3055
3056 2017-08-03 Tom Tromey <tom@tromey.com>
3057
3058 * xml-support.c (xml_fetch_content_from_file): Update.
3059 * ui-file.c (stdio_file::open): Update.
3060 * tracefile-tfile.c (tfile_start): Update.
3061 * remote.c (remote_file_put, remote_file_get): Update.
3062 * nat/linux-procfs.c (linux_proc_get_int)
3063 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
3064 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
3065 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
3066 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
3067 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
3068 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
3069 * linux-nat.c (linux_proc_pending_signals): Update.
3070 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
3071 (file_closer): Remove.
3072 * compile/compile.c (compile_to_object): Update.
3073 * common/filestuff.h (struct gdb_file_deleter): New.
3074 (gdb_file_up): New typedef.
3075 (gdb_fopen_cloexec): Change return type.
3076 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
3077 * cli/cli-dump.c (fopen_with_cleanup): Remove.
3078 (dump_binary_file, restore_binary_file): Update.
3079 * auto-load.c (auto_load_objfile_script_1): Update.
3080
3081 2017-08-03 Tom Tromey <tom@tromey.com>
3082
3083 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
3084 (info_static_tracepoint_markers_command): Likewise.
3085 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
3086 * skip.c (skip_info): Use ui_out_emit_table.
3087 * progspace.c (print_program_space): Use ui_out_emit_table.
3088 * osdata.c (info_osdata): Use ui_out_emit_table.
3089 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
3090 ui_out_emit_table.
3091 * linux-thread-db.c (info_auto_load_libthread_db): Use
3092 ui_out_emit_table.
3093 * inferior.c (print_inferior): Use ui_out_emit_table.
3094 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
3095 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
3096 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
3097 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
3098 * ui-out.h (class ui_out_emit_table): New.
3099
3100 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
3101
3102 * mips-tdep.c (mips_fpu_type_str): New function.
3103 (mips_dump_tdep): Call it.
3104
3105 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
3106
3107 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
3108 `->mips_fpu_type'.
3109
3110 2017-07-31 Xavier Roirand <roirand@adacore.com>
3111
3112 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
3113
3114 2017-07-27 Xavier Roirand <roirand@adacore.com>
3115
3116 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
3117
3118 2017-07-26 Yao Qi <yao.qi@linaro.org>
3119
3120 * cli/cli-cmds.c (maintenancechecklist): New variable.
3121 * gdbcmd.h (maintenancechecklist): Declare it.
3122 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
3123 Call i386_linux_read_description with different masks.
3124 * maint.c (maintenance_check_command): New function.
3125 (_initialize_maint_cmds): Call add_prefix_cmd.
3126 * target-descriptions.c (tdesc_reg): override operator != and ==.
3127 (tdesc_type): Likewise.
3128 (tdesc_feature): Likewise.
3129 (target_desc): Likewise.
3130 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
3131 (maintenance_check_xml_descriptions): New function.
3132 (_initialize_target_descriptions) Add command "xml-descriptions".
3133 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
3134
3135 2017-07-26 Yao Qi <yao.qi@linaro.org>
3136
3137 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
3138 Include features/i386/32bit-*.c.
3139 (i386_linux_read_description): Generate target description if it
3140 doesn't exist.
3141 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
3142 functions.
3143 * features/i386/32bit-linux.c: Re-generated.
3144 * features/i386/32bit-sse.c: Likewise.
3145 * target-descriptions.c (print_c_feature::visit): Print code to
3146 set register number if needed.
3147 (print_c_feature) <m_next_regnum>: New field.
3148
3149 2017-07-26 Yao Qi <yao.qi@linaro.org>
3150
3151 * features/Makefile (CFILES): Rename with TDESC_CFILES.
3152 (FEATURE_XMLFILES): New.
3153 (FEATURE_CFILES): New.
3154 New rules.
3155 (clean-cfiles): Remove generated c files.
3156 * features/i386/32bit-avx.c: Generated.
3157 * features/i386/32bit-avx512.c: Generated.
3158 * features/i386/32bit-core.c: Generated.
3159 * features/i386/32bit-linux.c: Generated.
3160 * features/i386/32bit-mpx.c: Generated.
3161 * features/i386/32bit-pkeys.c: Generated.
3162 * features/i386/32bit-sse.c: Generated.
3163 * target-descriptions.c: Include algorithm.
3164 (tdesc_element_visitor): Add method visit_end.
3165 (print_c_tdesc): Implement visit_end.
3166 (print_c_tdesc:: m_filename_after_features): Move it to
3167 protected.
3168 (print_c_feature): New class.
3169 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
3170 name starts with "i386/32bit-".
3171
3172 2017-07-26 Yao Qi <yao.qi@linaro.org>
3173
3174 * target-descriptions.c (tdesc_element_visitor): New class.
3175 (tdesc_element): New class.
3176 (tdesc_reg): Inherit from tdesc_element.
3177 (tdesc_reg::accept): New function.
3178 (tdesc_type): Inherit from tdesc_element.
3179 (tdesc_type::accept): New function.
3180 (tdesc_feature): Inherit from tdesc_element.
3181 (tdesc_feature::accept): New function.
3182 (target_desc): Inherit from tdesc_element.
3183 (target_desc::target_desc): New.
3184 (target_desc::~target_desc): New.
3185 (target_desc::accept): New.
3186 (allocate_target_description): Use new.
3187 (free_target_description): Use delete.
3188 (print_c_tdesc): New class.
3189 (maint_print_c_tdesc_cmd): Adjust.
3190
3191 * features/aarch64.c: Re-generated.
3192 * features/arc-arcompact.c: Re-generated.
3193 * features/arc-v2.c: Re-generated.
3194 * features/arm/arm-with-iwmmxt.c: Re-generated.
3195 * features/arm/arm-with-m.c: Re-generated.
3196 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
3197 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
3198 * features/arm/arm-with-neon.c: Re-generated.
3199 * features/arm/arm-with-vfpv2.c: Re-generated.
3200 * features/arm/arm-with-vfpv3.c: Re-generated.
3201 * features/i386/amd64-avx-avx512.c: Re-generated.
3202 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
3203 * features/i386/amd64-avx.c: Re-generated.
3204 * features/i386/amd64-avx-linux.c: Re-generated.
3205 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
3206 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
3207 * features/i386/amd64-avx-mpx.c: Re-generated.
3208 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
3209 * features/i386/amd64.c: Re-generated.
3210 * features/i386/amd64-linux.c: Re-generated.
3211 * features/i386/amd64-mpx.c: Re-generated.
3212 * features/i386/amd64-mpx-linux.c: Re-generated.
3213 * features/i386/i386-avx-avx512.c: Re-generated.
3214 * features/i386/i386-avx-avx512-linux.c: Re-generated.
3215 * features/i386/i386-avx.c: Re-generated.
3216 * features/i386/i386-avx-linux.c: Re-generated.
3217 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
3218 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
3219 * features/i386/i386-avx-mpx.c: Re-generated.
3220 * features/i386/i386-avx-mpx-linux.c: Re-generated.
3221 * features/i386/i386.c: Re-generated.
3222 * features/i386/i386-linux.c: Re-generated.
3223 * features/i386/i386-mmx.c: Re-generated.
3224 * features/i386/i386-mmx-linux.c: Re-generated.
3225 * features/i386/i386-mpx.c: Re-generated.
3226 * features/i386/i386-mpx-linux.c: Re-generated.
3227 * features/i386/x32-avx-avx512.c: Re-generated.
3228 * features/i386/x32-avx-avx512-linux.c: Re-generated.
3229 * features/i386/x32-avx.c: Re-generated.
3230 * features/i386/x32-avx-linux.c: Re-generated.
3231 * features/i386/x32.c: Re-generated.
3232 * features/i386/x32-linux.c: Re-generated.
3233 * features/microblaze.c: Re-generated.
3234 * features/microblaze-with-stack-protect.c: Re-generated.
3235 * features/mips64-dsp-linux.c: Re-generated.
3236 * features/mips64-linux.c: Re-generated.
3237 * features/mips-dsp-linux.c: Re-generated.
3238 * features/mips-linux.c: Re-generated.
3239 * features/nds32.c: Re-generated.
3240 * features/nios2.c: Re-generated.
3241 * features/nios2-linux.c: Re-generated.
3242 * features/rs6000/powerpc-32.c: Re-generated.
3243 * features/rs6000/powerpc-32l.c: Re-generated.
3244 * features/rs6000/powerpc-403.c: Re-generated.
3245 * features/rs6000/powerpc-403gc.c : Re-generated.
3246 * features/rs6000/powerpc-405.c: Re-generated.
3247 * features/rs6000/powerpc-505.c: Re-generated.
3248 * features/rs6000/powerpc-601.c: Re-generated.
3249 * features/rs6000/powerpc-602.c: Re-generated.
3250 * features/rs6000/powerpc-603.c: Re-generated.
3251 * features/rs6000/powerpc-604.c: Re-generated.
3252 * features/rs6000/powerpc-64.c: Re-generated.
3253 * features/rs6000/powerpc-64l.c: Re-generated.
3254 * features/rs6000/powerpc-7400.c: Re-generated.
3255 * features/rs6000/powerpc-750.c: Re-generated.
3256 * features/rs6000/powerpc-860.c: Re-generated.
3257 * features/rs6000/powerpc-altivec32.c: Re-generated.
3258 * features/rs6000/powerpc-altivec32l.c: Re-generated.
3259 * features/rs6000/powerpc-altivec64.c: Re-generated.
3260 * features/rs6000/powerpc-altivec64l.c: Re-generated.
3261 * features/rs6000/powerpc-cell32l.c: Re-generated.
3262 * features/rs6000/powerpc-cell64l.c: Re-generated.
3263 * features/rs6000/powerpc-e500.c: Re-generated.
3264 * features/rs6000/powerpc-e500l.c: Re-generated.
3265 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
3266 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
3267 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
3268 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
3269 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
3270 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
3271 * features/rs6000/powerpc-vsx32.c: Re-generated.
3272 * features/rs6000/powerpc-vsx32l.c: Re-generated.
3273 * features/rs6000/powerpc-vsx64.c: Re-generated.
3274 * features/rs6000/powerpc-vsx64l.c: Re-generated.
3275 * features/rs6000/rs6000.c: Re-generated.
3276 * features/s390-linux32.c: Re-generated.
3277 * features/s390-linux32v1.c: Re-generated.
3278 * features/s390-linux32v2.c: Re-generated.
3279 * features/s390-linux64.c: Re-generated.
3280 * features/s390-linux64v1.c: Re-generated.
3281 * features/s390-linux64v2.c: Re-generated.
3282 * features/s390-te-linux64.c: Re-generated.
3283 * features/s390-tevx-linux64.c: Re-generated.
3284 * features/s390-vx-linux64.c: Re-generated.
3285 * features/s390x-linux64.c: Re-generated.
3286 * features/s390x-linux64v1.c: Re-generated.
3287 * features/s390x-linux64v2.c: Re-generated.
3288 * features/s390x-te-linux64.c: Re-generated.
3289 * features/s390x-tevx-linux64.c: Re-generated.
3290 * features/s390x-vx-linux64.c: Re-generated.
3291 * features/sparc/sparc32-solaris.c: Re-generated.
3292 * features/sparc/sparc64-solaris.c: Re-generated.
3293 * features/tic6x-c62x.c: Re-generated.
3294 * features/tic6x-c62x-linux.c: Re-generated.
3295 * features/tic6x-c64x.c: Re-generated.
3296 * features/tic6x-c64x-linux.c: Re-generated.
3297 * features/tic6x-c64xp.c: Re-generated.
3298 * features/tic6x-c64xp-linux.c: Re-generated.
3299
3300 2017-07-26 Yao Qi <yao.qi@linaro.org>
3301
3302 * i386-linux-tdep.c (i386_linux_read_description): New function.
3303 (i386_linux_core_read_description): Call
3304 i386_linux_read_description.
3305 * i386-linux-tdep.h (i386_linux_read_description): Declare.
3306 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
3307 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
3308 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
3309 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
3310 * x86-linux-nat.c (x86_linux_read_description): Call
3311 i386_linux_read_description.
3312
3313 2017-07-26 Yao Qi <yao.qi@linaro.org>
3314
3315 * NEWS: Mention it.
3316 * features/Makefile (%.c: %.xml): Pass the xml file name to
3317 command "maint print c-tdesc".
3318 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
3319 name from 'arg'.
3320
3321 2017-07-26 Yao Qi <yao.qi@linaro.org>
3322
3323 * target-descriptions.c (target_desc): Add ctor and dtor. Do
3324 in-class initialization.
3325 (tdesc_create_feature): Call new instead of XCNEW.
3326 (free_target_description): Ue delete.
3327
3328 2017-07-25 John Baldwin <jhb@FreeBSD.org>
3329
3330 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
3331
3332 2017-07-25 Yao Qi <yao.qi@linaro.org>
3333
3334 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
3335 constant.
3336 (amd64_x32_init_abi): Likewise.
3337 * amd64-tdep.h (amd64_init_abi): Update declaration.
3338 (amd64_x32_init_abi): Likewise.
3339
3340 2017-07-25 Yao Qi <yao.qi@linaro.org>
3341
3342 PR tdep/21717
3343 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
3344 condition for FPSCR.
3345 (arm_linux_store_inferior_registers): Likewise.
3346
3347 2017-07-22 Tom Tromey <tom@tromey.com>
3348
3349 * break-catch-syscall.c (struct catch_syscall_inferior_data)
3350 <syscalls_counts>: Now a std::vector.
3351 (get_catch_syscall_inferior_data): Use "new".
3352 (catch_syscall_inferior_data_cleanup): Use "delete".
3353 (insert_catch_syscall, remove_catch_syscall)
3354 (clear_syscall_counts): Update.
3355
3356 2017-07-22 Tom Tromey <tom@tromey.com>
3357
3358 * break-catch-syscall.c (syscall_catchpoint)
3359 <syscalls_to_be_caught>: Now a std::vector<int>
3360 (~syscall_catchpoint): Remove.
3361 (insert_catch_syscall, remove_catch_syscall)
3362 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
3363 (print_mention_catch_syscall, print_recreate_catch_syscall):
3364 Update.
3365 (create_syscall_event_catchpoint): Change type of "filter"
3366 parameter.
3367 (catch_syscall_split_args): Return a std::vector.
3368 (catch_syscall_command_1, catching_syscall_number_1): Update.
3369
3370 2017-07-22 Tom Tromey <tom@tromey.com>
3371
3372 * break-catch-throw.c (struct exception_catchpoint)
3373 <exception_rx>: Now a std::string.
3374 (~exception_catchpoint): Remove.
3375 (print_one_detail_exception_catchpoint): Update.
3376 (handle_gnu_v3_exceptions): Change type of except_rx.
3377 (extract_exception_regexp): Return a std::string.
3378 (catch_exception_command_1): Update.
3379
3380 2017-07-22 Tom Tromey <tom@tromey.com>
3381
3382 * break-catch-sig.c (gdb_signal_type): Remove typedef.
3383 (struct signal_catchpoint) <signals_to_be_caught>: Now a
3384 std::vector.
3385 <catch_all>: Now a bool.
3386 (~signal_catchpoint): Remove.
3387 (signal_catchpoint_insert_location)
3388 (signal_catchpoint_remove_location)
3389 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
3390 (signal_catchpoint_print_mention)
3391 (signal_catchpoint_print_recreate)
3392 (signal_catchpoint_explains_signal): Update.
3393 (create_signal_catchpoint): Change type of "filter" and
3394 "catch_all".
3395 (catch_signal_split_args): Return a std::vector. Change type of
3396 "catch_all".
3397 (catch_signal_command): Update.
3398
3399 2017-07-20 Pedro Alves <palves@redhat.com>
3400
3401 * ada-lang.c (ada_language_defn): Make extern.
3402 (_initialize_ada_language): Remove add_language call.
3403 * c-lang.c (c_language_defn, cplus_language_defn)
3404 (asm_language_defn, minimal_language_defn): Make extern.
3405 (_initialize_c_language): Delete.
3406 * completer.c (compare_cstrings): Delete, moved to utils.h.
3407 * d-lang.c (d_language_defn): Make extern.
3408 (_initialize_d_language): Remove add_language calls.
3409 * defs.h (enum language): Add comment.
3410 * f-lang.c (f_language_defn): Make extern.
3411 (_initialize_f_language): Remove add_language call.
3412 * go-lang.c (go_language_defn): Make extern.
3413 (_initialize_go_language): Remove add_language call.
3414 * language.c: Include <algorithm>.
3415 (languages): Redefine as const array.
3416 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
3417 (set_language_command): Handle "local". Use for-range loop.
3418 (set_language): Remove loop.
3419 (language_enum): Rewrite.
3420 (language_def, language_str): Remove loops.
3421 (add_language): Delete.
3422 (add_set_language_command): New, based on add_languages.
3423 (skip_language_trampoline): Adjust.
3424 (local_language_defn): Delete.
3425 (language_gdbarch_post_init): Adjust.
3426 (_initialize_language): Remove add_language calls. Call
3427 add_set_language_command.
3428 * language.h (add_language): Delete.
3429 (auto_language_defn)
3430 (unknown_language_defn, minimal_language_defn, ada_language_defn)
3431 (asm_language_defn, c_language_defn, cplus_language_defn)
3432 (d_language_defn, f_language_defn, go_language_defn)
3433 (m2_language_defn, objc_language_defn, opencl_language_defn)
3434 (pascal_language_defn, rust_language_defn): Declare.
3435 * m2-lang.c (m2_language_defn): Make extern.
3436 (_initialize_m2_language): Remove add_language call.
3437 * objc-lang.c (objc_language_defn): Make extern.
3438 (_initialize_objc_language): Remove add_language call.
3439 * opencl-lang.c (opencl_language_defn): Make extern.
3440 (_initialize_opencl_language): Remove add_language call.
3441 * p-lang.c (pascal_language_defn): Make extern.
3442 (_initialize_pascal_language): Delete.
3443 * rust-lang.c (rust_language_defn): Make extern.
3444 (_initialize_rust_language): Delete.
3445 * utils.h (compare_cstrings): New static inline function.
3446
3447 2017-07-20 Pedro Alves <palves@redhat.com>
3448
3449 * ada-lang.c (ada_to_fixed_type_1): Adjust.
3450 (get_var_value): Constify parameters.
3451 (get_int_var_value): Change prototype.
3452 (to_fixed_range_type): Adjust.
3453 * ada-lang.h (get_int_var_value): Change prototype.
3454
3455 2017-07-20 Pedro Alves <palves@redhat.com>
3456
3457 * dwarf2read.c (dw2_lookup_symbol): Use
3458 SYMBOL_MATCHES_SEARCH_NAME.
3459 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
3460
3461 2017-07-20 Pedro Alves <palves@redhat.com>
3462
3463 * block.c (block_iter_name_step, block_iter_name_first)
3464 (block_iter_name_next): Delete.
3465 (block_lookup_symbol_primary): Adjust to use
3466 dict_iter_match_first/dict_iter_match_next.
3467 * block.h (block_iter_name_first, block_iter_name_next): Delete
3468 declarations.
3469 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
3470 dict_iter_match_first/dict_iter_match_next.
3471
3472 2017-07-20 Pedro Alves <palves@redhat.com>
3473
3474 * cp-support.c (cp_find_first_component_aux): Add missing case for
3475 end of string.
3476
3477 2017-07-18 David Blaikie <dblaikie@gmail.com>
3478
3479 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
3480 of dwo_cu's dwo_file.
3481
3482 2017-07-18 Yao Qi <yao.qi@linaro.org>
3483
3484 * remote.c (store_registers_using_G): Remove one line comment.
3485
3486 2017-07-18 Yao Qi <yao.qi@linaro.org>
3487
3488 * regcache.c (regcache_cpy): Simplify it.
3489 (regcache::cpy_no_passthrough): Remove it.
3490 * regcache.h (cpy_no_passthrough): Remove it.
3491 (regcache_dup, regcache_cpy): Update comments.
3492
3493 2017-07-18 Pedro Alves <palves@redhat.com>
3494
3495 * remote-sim.c (sim_command_completer): Adjust to work with a
3496 completion_tracker instead of a VEC.
3497
3498 2017-07-17 Pedro Alves <palves@redhat.com>
3499
3500 * completer.c (complete_source_filenames): New function.
3501 (complete_address_and_linespec_locations): New function.
3502 (location_completer): Use complete_address_and_linespec_locations.
3503 (completion_tracker::build_completion_result): Honor the tracker's
3504 request to suppress append.
3505 * completer.h (completion_tracker::suppress_append_ws)
3506 (completion_tracker::set_suppress_append_ws): New methods.
3507 (completion_tracker::m_suppress_append_ws): New field.
3508 (complete_source_filenames): New declaration.
3509 * linespec.c (linespec_complete_what): New.
3510 (struct ls_parser) <complete_what, completion_word,
3511 completion_quote_char, completion_quote_end, completion_tracker>:
3512 New fields.
3513 (string_find_incomplete_keyword_at_end): New.
3514 (linespec_lexer_lex_string): Record quote char. If in completion
3515 mode, don't throw.
3516 (linespec_lexer_consume_token): Advance the completion word point.
3517 (linespec_lexer_peek_token): Save/restore completion info.
3518 (save_stream_and_consume_token): New.
3519 (set_completion_after_number): New.
3520 (linespec_parse_basic): Set what to complete next depending on
3521 token. Handle function and label completions specially.
3522 (parse_linespec): Disable objc shortcut in completion mode. Set
3523 what to complete next depending on token type. Skip keyword if in
3524 completion mode.
3525 (complete_linespec_component, linespec_complete): New.
3526 * linespec.h (linespec_complete): Declare.
3527
3528 2017-07-17 Pedro Alves <palves@redhat.com>
3529
3530 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
3531 Handle 'operator<' / 'operator<<'.
3532
3533 2017-07-17 Pedro Alves <palves@redhat.com>
3534
3535 * completer.c (collect_explicit_location_matches): Handle
3536 MATCH_LABEL.
3537 (convert_explicit_location_to_linespec): New, factored out from
3538 ...
3539 (convert_explicit_location_to_sals): ... this.
3540 (complete_label): New.
3541 (linespec_complete_label, find_label_symbols_in_block): New.
3542 (find_label_symbols): Add completion_mode parameter and adjust to
3543 call find_label_symbols_in_block.
3544 * linespec.h (linespec_complete_label): Declare.
3545
3546 2017-07-17 Pedro Alves <palves@redhat.com>
3547
3548 * ada-lang.c (ada_collect_symbol_completion_matches): Add
3549 complete_symbol_mode parameter.
3550 * cli/cli-cmds.c (complete_command): Get the completion result out
3551 of the handle_brkchars tracker if used a custom word point.
3552 * completer.c: Include "linespec.h".
3553 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
3554 (advance_to_expression_complete_word_point): New.
3555 (completion_tracker::completes_to_completion_word): New.
3556 (complete_files_symbols): Pass down
3557 complete_symbol_mode::EXPRESSION.
3558 (explicit_options, probe_options): New.
3559 (collect_explicit_location_matches): Complete on the
3560 explictit_loc->foo instead of word. Use
3561 linespec_complete_function. Handle MATCH_LINE. Handle offering
3562 keyword and options completions.
3563 (backup_text_ptr): Delete.
3564 (skip_keyword): New.
3565 (complete_explicit_location): Remove 'word' parameter. Add
3566 language, quoted_arg_start and quoted_arg_end parameters.
3567 Rewrite, parsing left to right.
3568 (location_completer): Rewrite.
3569 (location_completer_handle_brkchars): New function.
3570 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
3571 (enum complete_line_internal_reason): Adjust comments.
3572 (completion_tracker::discard_completions): New.
3573 (completer_handle_brkchars_func_for_completer): Handle
3574 location_completer.
3575 (gdb_custom_word_point_brkchars)
3576 (gdb_org_rl_basic_quote_characters): New.
3577 (gdb_completion_word_break_characters_throw)
3578 (completion_find_completion_word): Handle trackers that use a
3579 custom word point.
3580 (completion_tracker::advance_custom_word_point_by): New.
3581 (completion_tracker::build_completion_result): Don't rely on
3582 readline appending the quote char.
3583 (gdb_rl_attempted_completion_function_throw): Handle trackers that
3584 use a custom word point.
3585 (gdb_rl_attempted_completion_function): Restore
3586 rl_basic_quote_characters.
3587 * completer.h (class completion_tracker): Extend intro comment.
3588 (completion_tracker::set_quote_char)
3589 (completion_tracker::quote_char)
3590 (completion_tracker::set_use_custom_word_point)
3591 (completion_tracker::use_custom_word_point)
3592 (completion_tracker::custom_word_point)
3593 (completion_tracker::set_custom_word_point)
3594 (completion_tracker::advance_custom_word_point_by)
3595 (completion_tracker::completes_to_completion_word)
3596 (completion_tracker::discard_completions): New methods.
3597 (completion_tracker::m_quote_char)
3598 (completion_tracker::m_use_custom_word_point)
3599 (completion_tracker::m_custom_word_point): New fields.
3600 (advance_to_expression_complete_word_point): Declare.
3601 * f-lang.c (f_collect_symbol_completion_matches): Add
3602 complete_symbol_mode parameter.
3603 * language.h (struct language_defn)
3604 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
3605 parameter.
3606 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
3607 (linespec_complete_function): New function.
3608 (linespec_lexer_lex_keyword): Adjust.
3609 * linespec.h (linespec_keywords, linespec_complete_function): New
3610 declarations.
3611 * location.c (find_end_quote): New function.
3612 (explicit_location_lex_one): Add explicit_completion_info
3613 parameter. Save quoting info. Don't throw if being called for
3614 completion. Don't handle Ada operators here.
3615 (is_cp_operator, skip_op_false_positives, first_of)
3616 (explicit_location_lex_one_function): New function.
3617 (string_to_explicit_location): Replace 'dont_throw' parameter with
3618 an explicit_completion_info pointer parameter. Handle it. Don't
3619 use explicit_location_lex_one to lex function names. Use
3620 explicit_location_lex_one_function instead.
3621 * location.h (struct explicit_completion_info): New.
3622 (string_to_explicit_location): Replace 'dont_throw' parameter with
3623 an explicit_completion_info pointer parameter.
3624 * symtab.c (default_collect_symbol_completion_matches_break_on):
3625 Add complete_symbol_mode parameter. Handle LINESPEC mode.
3626 (default_collect_symbol_completion_matches)
3627 (collect_symbol_completion_matches): Add complete_symbol_mode
3628 parameter.
3629 (collect_symbol_completion_matches_type): Pass down
3630 complete_symbol_mode::EXPRESSION.
3631 (collect_file_symbol_completion_matches): Add complete_symbol_mode
3632 parameter. Handle LINESPEC mode.
3633 * symtab.h (complete_symbol_mode): New.
3634 (default_collect_symbol_completion_matches_break_on)
3635 (default_collect_symbol_completion_matches)
3636 (collect_symbol_completion_matches)
3637 (collect_file_symbol_completion_matches): Add complete_symbol_mode
3638 parameter.
3639
3640 2017-07-17 Pedro Alves <palves@redhat.com>
3641
3642 * utils.c (enum class strncmp_iw_mode): New.
3643 (strcmp_iw): Rename to ...
3644 (strncmp_iw_with_mode): ... this. Add string2_len and mode
3645 parameters. Handle them.
3646 (strncmp_iw): New.
3647 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
3648 * utils.h (strncmp_iw): Declare.
3649 (strcmp_iw): Move describing comments here.
3650
3651 2017-07-17 Pedro Alves <palves@redhat.com>
3652
3653 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
3654 CP_OPERATOR_STR.
3655 * c-typeprint.c (is_type_conversion_operator): Use
3656 CP_OPERATOR_STR.
3657 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
3658 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
3659 CP_OPERATOR_LEN.
3660 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
3661 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
3662 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
3663 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
3664 CP_OPERATOR_STR.
3665 * location.c: Include "cp-support.h".
3666 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
3667 CP_OPERATOR_STR.
3668 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
3669 CP_OPERATOR_LEN.
3670
3671 2017-07-17 Pedro Alves <palves@redhat.com>
3672
3673 * cli/cli-cmds.c (complete_command): Use a completion tracker
3674 along with completion_find_completion_word for handle_brkchars
3675 phase.
3676 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
3677 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
3678 (struct gdb_rl_completion_word_info): New.
3679 (gdb_rl_find_completion_word): New.
3680 (completion_find_completion_word): New.
3681 * completer.h (completion_find_completion_word): Declare.
3682
3683 2017-07-17 Pedro Alves <palves@redhat.com>
3684
3685 * ada-lang.c (symbol_completion_match): Adjust comments.
3686 (symbol_completion_add): Replace vector parameter with
3687 completion_tracker parameter. Use it.
3688 (ada_make_symbol_completion_list): Rename to...
3689 (ada_collect_symbol_completion_matches): ... this. Add
3690 completion_tracker parameter and use it.
3691 (ada_language_defn): Adjust.
3692 * break-catch-syscall.c (catch_syscall_completer): Adjust
3693 prototype and work with completion_tracker instead of VEC.
3694 * breakpoint.c (condition_completer): Adjust prototype and work
3695 with completion_tracker instead of VEC.
3696 * c-lang.c (c_language_defn, cplus_language_defn)
3697 (asm_language_defn, minimal_language_defn): Adjust to renames.
3698 * cli/cli-cmds.c (complete_command): Rework using
3699 completion_tracker. Catch exceptions when completing.
3700 * cli/cli-decode.c (integer_unlimited_completer)
3701 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
3702 with completion_tracker instead of VEC.
3703 * command.h (struct completion_tracker): Forward declare.
3704 (completer_ftype, completer_handle_brkchars_ftype): Change
3705 types.
3706 (complete_on_cmdlist, complete_on_enum): Adjust.
3707 * completer.c: Include <algorithm>.
3708 (struct gdb_completer_state): New.
3709 (current_completion): New global.
3710 (readline_line_completion_function): Delete.
3711 (noop_completer, filename_completer)
3712 (filename_completer_handle_brkchars, complete_files_symbols)
3713 (linespec_location_completer): Adjust to work with a
3714 completion_tracker instead of a VEC.
3715 (string_or_empty): New.
3716 (collect_explicit_location_matches): Adjust to work with a
3717 completion_tracker instead of a VEC.
3718 (explicit_location_completer): Rename to ...
3719 (complete_explicit_location): ... this and adjust to work with a
3720 completion_tracker instead of a VEC.
3721 (location_completer): Adjust to work with a completion_tracker
3722 instead of a VEC.
3723 (add_struct_fields): Adjust to work with a completion_list instead
3724 of VEC.
3725 (expression_completer): Rename to ...
3726 (complete_expression): ... this and adjust to work with a
3727 completion_tracker instead of a VEC. Use complete_files_symbols.
3728 (expression_completer): Reimplement on top of complete_expression.
3729 (symbol_completer): Adjust to work with a completion_tracker
3730 instead of a VEC.
3731 (enum complete_line_internal_reason): Add describing comments.
3732 (complete_line_internal_normal_command): Adjust to work with a
3733 completion_tracker instead of a VEC.
3734 (complete_line_internal): Rename to ...
3735 (complete_line_internal_1): ... this and adjust to work with a
3736 completion_tracker instead of a VEC. Assert TEXT is NULL in the
3737 handle_brkchars phase.
3738 (new_completion_tracker): Delete.
3739 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
3740 complete_line_internal_1.
3741 (free_completion_tracker): Delete.
3742 (INITIAL_COMPLETION_HTAB_SIZE): New.
3743 (completion_tracker::completion_tracker)
3744 (completion_tracker::~completion_tracker): New.
3745 (maybe_add_completion): Delete.
3746 (completion_tracker::maybe_add_completion)
3747 (completion_tracker::add_completion)
3748 (completion_tracker::add_completions): New.
3749 (throw_max_completions_reached_error): Delete.
3750 (complete_line): Adjust to work with a completion_tracker instead
3751 of a VEC. Don't create a completion_tracker_t or check for max
3752 completions here.
3753 (command_completer, command_completer_handle_brkchars)
3754 (signal_completer, reg_or_group_completer_1)
3755 (reg_or_group_completer, default_completer_handle_brkchars):
3756 Adjust to work with a completion_tracker.
3757 (gdb_completion_word_break_characters_throw): New.
3758 (gdb_completion_word_break_characters): Reimplement.
3759 (line_completion_function): Delete.
3760 (completion_tracker::recompute_lowest_common_denominator)
3761 (expand_preserving_ws)
3762 (completion_tracker::build_completion_result)
3763 (completion_result::completion_result)
3764 (completion_result::completion_result)
3765 (completion_result::~completion_result)
3766 (completion_result::completion_result)
3767 (completion_result::release_match_list, compare_cstrings)
3768 (completion_result::sort_match_list)
3769 (completion_result::reset_match_list)
3770 (gdb_rl_attempted_completion_function_throw)
3771 (gdb_rl_attempted_completion_function): New.
3772 * completer.h (completion_list, struct completion_result)
3773 (class completion_tracker): New.
3774 (complete_line): Add completion_tracker parameter.
3775 (readline_line_completion_function): Delete.
3776 (gdb_rl_attempted_completion_function): New.
3777 (noop_completer, filename_completer, expression_completer)
3778 (location_completer, symbol_completer, command_completer)
3779 (signal_completer, reg_or_group_completer): Update prototypes.
3780 (completion_tracker_t, new_completion_tracker)
3781 (make_cleanup_free_completion_tracker): Delete.
3782 (enum maybe_add_completion_enum): Delete.
3783 (maybe_add_completion): Delete.
3784 (throw_max_completions_reached_error): Delete.
3785 * corefile.c (complete_set_gnutarget): Adjust to work with a
3786 completion_tracker instead of a VEC.
3787 * cp-abi.c (cp_abi_completer): Adjust to work with a
3788 completion_tracker instead of a VEC.
3789 * d-lang.c (d_language_defn): Adjust.
3790 * disasm.c (disassembler_options_completer): Adjust to work with a
3791 completion_tracker instead of a VEC.
3792 * f-lang.c (f_make_symbol_completion_list): Rename to ...
3793 (f_collect_symbol_completion_matches): ... this. Adjust to work
3794 with a completion_tracker instead of a VEC.
3795 (f_language_defn): Adjust.
3796 * go-lang.c (go_language_defn): Adjust.
3797 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
3798 Adjust to work with a completion_tracker instead of a VEC.
3799 * infrun.c (handle_completer): Likewise.
3800 * interps.c (interpreter_completer): Likewise.
3801 * interps.h (interpreter_completer): Likewise.
3802 * language.c (unknown_language_defn, auto_language_defn)
3803 (local_language_defn): Adjust.
3804 * language.h (language_defn::la_make_symbol_completion_list):
3805 Rename to ...
3806 (language_defn::la_collect_symbol_completion_matches): ... this
3807 and adjust to work with a completion_tracker instead of a VEC.
3808 * m2-lang.c (m2_language_defn): Adjust.
3809 * objc-lang.c (objc_language_defn): Adjust.
3810 * opencl-lang.c (opencl_language_defn): Adjust.
3811 * p-lang.c (pascal_language_defn): Adjust.
3812 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
3813 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
3814 with a completion_tracker.
3815 * rust-lang.c (rust_language_defn): Adjust.
3816 * symtab.c (free_completion_list, do_free_completion_list)
3817 (return_val, completion_tracker): Delete.
3818 (completion_list_add_name, completion_list_add_symbol)
3819 (completion_list_add_msymbol, completion_list_objc_symbol)
3820 (completion_list_add_fields, add_symtab_completions): Add
3821 completion_tracker parameter and use it.
3822 (default_make_symbol_completion_list_break_on_1): Rename to...
3823 (default_collect_symbol_completion_matches_break_on): ... this.
3824 Add completion_tracker parameter and use it instead of allocating
3825 a completion tracker here.
3826 (default_make_symbol_completion_list_break_on): Delete old
3827 implementation.
3828 (default_make_symbol_completion_list): Delete.
3829 (default_collect_symbol_completion_matches): New.
3830 (make_symbol_completion_list): Delete.
3831 (collect_symbol_completion_matches): New.
3832 (make_symbol_completion_type): Rename to ...
3833 (collect_symbol_completion_matches_type): ... this. Add
3834 completion_tracker parameter and use it instead of VEC.
3835 (make_file_symbol_completion_list_1): Rename to...
3836 (collect_file_symbol_completion_matches): ... this. Add
3837 completion_tracker parameter and use it instead of VEC.
3838 (make_file_symbol_completion_list): Delete.
3839 (add_filename_to_list): Use completion_list instead of a VEC.
3840 (add_partial_filename_data::list): Now a completion_list.
3841 (make_source_files_completion_list): Work with a completion_list
3842 instead of a VEC.
3843 * symtab.h: Include "completer.h".
3844 (default_make_symbol_completion_list_break_on)
3845 (default_make_symbol_completion_list, make_symbol_completion_list)
3846 (make_symbol_completion_type, make_file_symbol_completion_list)
3847 (make_source_files_completion_list): Delete.
3848 (default_collect_symbol_completion_matches_break_on)
3849 (default_collect_symbol_completion_matches)
3850 (collect_symbol_completion_matches)
3851 (collect_symbol_completion_matches_type)
3852 (collect_file_symbol_completion_matches)
3853 (make_source_files_completion_list): New.
3854 * top.c (init_main): Don't install a rl_completion_entry_function
3855 hook. Install a rl_attempted_completion_function hook instead.
3856 * tui/tui-layout.c (layout_completer): Adjust to work with a
3857 completion_tracker.
3858 * tui/tui-regs.c (tui_reggroup_completer):
3859 * tui/tui-win.c (window_name_completer, focus_completer)
3860 (winheight_completer): Adjust to work with a completion_tracker.
3861 * value.c: Include "completer.h".
3862 (complete_internalvar): Adjust to work with a completion_tracker.
3863 * value.h (complete_internalvar): Likewise.
3864
3865 2017-07-17 Pedro Alves <palves@redhat.com>
3866
3867 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
3868 renames.
3869 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
3870 comments to completer_ftype's declaration.
3871 <completer_handle_brkchars>: Change type to
3872 completer_handle_brkchars_ftype.
3873 * command.h (completer_ftype): Add describing comment and give
3874 names to parameters.
3875 (completer_ftype_void): Rename to ...
3876 (completer_handle_brkchars_ftype) ... this. Add describing comment.
3877 (set_cmd_completer_handle_brkchars): Adjust.
3878 * completer.c (filename_completer_handle_brkchars): New function.
3879 (complete_line_internal_normal_command): New function, factored
3880 out from ...
3881 (complete_line_internal): ... here.
3882 (command_completer_handle_brkchars)
3883 (default_completer_handle_brkchars)
3884 (completer_handle_brkchars_func_for_completer): New functions.
3885 * completer.h (set_gdb_completion_word_break_characters): Delete
3886 declaration.
3887 (completer_handle_brkchars_func_for_completer): New declaration.
3888 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
3889 completer_handle_brkchars_func_for_completer.
3890
3891 2017-07-17 Pedro Alves <palves@redhat.com>
3892
3893 * completer.c (symbol_completer): New function, based on
3894 make_symbol_completion_list_fn.
3895 * completer.h (symbol_completer): New declaration.
3896 * guile/scm-cmd.c (cmdscm_completers): Adjust.
3897 * python/py-cmd.c (completers): Adjust.
3898 * symtab.c (make_symbol_completion_list_fn): Delete.
3899 * symtab.h (make_symbol_completion_list_fn): Delete.
3900 * cli/cli-decode.c (add_cmd): Adjust.
3901
3902 2017-07-17 Pedro Alves <palves@redhat.com>
3903
3904 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
3905 * dwarf2read.c: Include "filename-seen-cache.h".
3906 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
3907 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
3908 * filename-seen-cache.c: New file.
3909 * filename-seen-cache.h: New file.
3910 * symtab.c: Include "filename-seen-cache.h".
3911 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
3912 (create_filename_seen_cache, clear_filename_seen_cache)
3913 (delete_filename_seen_cache, filename_seen): Delete, parts moved
3914 to filename-seen-cache.h/filename-seen-cache.c.
3915 (output_source_filename, sources_info)
3916 (maybe_add_partial_symtab_filename)
3917 (make_source_files_completion_list): Adjust to use
3918 filename_seen_cache.
3919
3920 2017-07-17 Pedro Alves <palves@redhat.com>
3921
3922 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
3923 fields.
3924 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
3925 dwarf2_debug_sections*)): New.
3926 (dwarf2_per_objfile::dwarf2_per_objfile(const
3927 dwarf2_per_objfile&)): Declare as deleted.
3928 (dwarf2_per_objfile::operator=): Declare as deleted.
3929 (dwarf2_per_objfile::dwarf2_per_objfile)
3930 (dwarf2_per_objfile::~dwarf2_per_objfile)
3931 (dwarf2_per_objfile::free_cached_comp_units): New.
3932 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
3933 ctor. Call dwarf2_per_objfile's ctor manually.
3934 (dwarf2_locate_sections): Deleted/refactored as ...
3935 (dwarf2_per_objfile::locate_sections): ... this new method.
3936 (free_cached_comp_units): Defer to
3937 dwarf2_per_objfile::free_cached_comp_units.
3938 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
3939
3940 2017-07-14 Tom Tromey <tom@tromey.com>
3941
3942 PR rust/21764:
3943 * rust-exp.y (convert_ast_to_expression): Add "want_type"
3944 parameter.
3945 <UNOP_SIZEOF>: Split into separate case.
3946 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
3947
3948 2017-07-14 Tom Tromey <tom@tromey.com>
3949
3950 PR rust/21763:
3951 * symtab.c (symbol_matches_domain): Add language_rust to special
3952 case.
3953 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
3954 treat LOC_TYPEDEF symbols as variables.
3955
3956 2017-07-14 Pedro Alves <palves@redhat.com>
3957
3958 * symtab.c (make_file_symbol_completion_list_1): Iterate over
3959 symtabs matching all symtabs with SRCFILE as file name instead of
3960 only considering the first hit, with lookup_symtab.
3961
3962 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
3963
3964 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
3965 operator_name parameters.
3966 (gen_expr): Update function call.
3967
3968 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
3969
3970 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
3971 parameter.
3972 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
3973 Likewise.
3974 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
3975 parameter, use agent_expr::gdbarch instead, update function
3976 calls.
3977 (locexpr_tracepoint_var_ref): Likewise.
3978 (loclist_tracepoint_var_ref): Likewise.
3979 * ax-gdb.c (gen_trace_static_fields): Likewise.
3980 (gen_traced_pop): Likewise.
3981 (gen_frame_args_address): Likewise.
3982 (gen_frame_locals_address): Likewise.
3983 (gen_var_ref): Likewise.
3984 (gen_struct_ref_recursive): Likewise.
3985 (gen_static_field): Likewise.
3986 (gen_maybe_namespace_elt): Likewise.
3987 (gen_expr): Likewise.
3988 (gen_trace_for_var): Likewise.
3989 (gen_trace_for_expr): Likewise.
3990 (gen_trace_for_return_address): Likewise.
3991
3992 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
3993
3994 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
3995 parameter.
3996 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
3997
3998 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
3999
4000 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
4001 from ax, update calls.
4002 (gen_usual_arithmetic): Likewise.
4003 (gen_integral_promotions): Likewise.
4004 (gen_bitfield_ref): Likewise.
4005 (gen_primitive_field): Likewise.
4006 (gen_struct_ref_recursive): Likewise.
4007 (gen_struct_ref): Likewise.
4008 (gen_maybe_namespace_elt): Likewise.
4009 (gen_struct_elt_for_reference): Likewise.
4010 (gen_namespace_elt): Likewise.
4011 (gen_aggregate_elt_ref): Likewise.
4012 (gen_expr): Get gdbarch from ax, update calls.
4013 (gen_expr_binop_rest): Likewise.
4014
4015 2017-07-13 Pedro Alves <palves@redhat.com>
4016
4017 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
4018 as default tdesc.
4019 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
4020 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
4021 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
4022 tdesc_amd64_linux as default tdesc. Get final tdesc from the
4023 tdep.
4024 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
4025 Get final tdesc from the tdep.
4026 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
4027 default tdesc.
4028 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4029 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4030 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
4031 Use it as default tdesc.
4032 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
4033 down to amd_init_abi. No longer handle fallback tdesc here.
4034 * amd64-tdep.h (tdesc_x32): Declare.
4035 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
4036 parameter.
4037 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
4038 as default tdesc.
4039
4040 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4041
4042 * s390-linux-tdep.c (s390_process_record): Add support for
4043 instructions new in arch12.
4044
4045 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4046
4047 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
4048 PT_GETFSBASE and PT_GETGSBASE.
4049 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
4050 PT_SETGSBASE.
4051
4052 2017-07-11 John Baldwin <jhb@FreeBSD.org>
4053
4054 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
4055 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
4056 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
4057 those rules.
4058 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
4059 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
4060 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
4061 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
4062 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
4063 * features/i386/amd64.xml: Add 64bit-segments.xml.
4064 * features/i386/amd64-avx-avx512.c: Regenerated.
4065 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
4066 * features/i386/amd64-avx-mpx.c: Regenerated.
4067 * features/i386/amd64-avx.c: Regenerated.
4068 * features/i386/amd64-mpx.c: Regenerated.
4069 * features/i386/amd64.c: Regenerated.
4070 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
4071 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4072 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
4073 * regformats/i386/amd64-avx.dat: Regenerated.
4074 * regformats/i386/amd64-mpx.dat: Regenerated.
4075 * regformats/i386/amd64.dat: Regenerated.
4076
4077 2017-07-10 Yao Qi <yao.qi@linaro.org>
4078
4079 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4080 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4081
4082 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
4083
4084 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
4085 unsetenv.
4086 * gnulib/aclocal.m4: Regenerate.
4087 * gnulib/config.in: Regenerate.
4088 * gnulib/configure: Regenerate.
4089 * gnulib/import/Makefile.am: Regenerate.
4090 * gnulib/import/Makefile.in: Regenerate.
4091 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4092 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4093 * gnulib/import/m4/environ.m4: New file.
4094 * gnulib/import/m4/setenv.m4: New file.
4095 * gnulib/import/setenv.c: New file.
4096 * gnulib/import/unsetenv.c: New file.
4097
4098 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
4099
4100 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
4101 address when op is DW_OP_addr.
4102
4103 2017-07-09 Tom Tromey <tom@tromey.com>
4104
4105 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
4106 check and apply to outer type.
4107
4108 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4109
4110 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
4111 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
4112 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
4113 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
4114
4115 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4116
4117 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
4118
4119 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4120
4121 * corelow.c (get_core_siginfo): Remove.
4122 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
4123 instead of get_core_siginfo.
4124 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
4125 * gdbarch.h: Re-generate.
4126 * gdbarch.c: Re-generate.
4127 * linux-tdep.c (linux_core_xfer_siginfo): New.
4128 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
4129
4130 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4131
4132 * corelow.c (thread_section_name): Move to ...
4133 * gdbcore.h (thread_section_name): ... here.
4134
4135 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4136
4137 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
4138 (struct siginfo32): New.
4139 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
4140 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
4141 via ptrace(PT_LWPINFO).
4142
4143 2017-07-07 John Baldwin <jhb@FreeBSD.org>
4144
4145 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
4146 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
4147 (fbsd_get_siginfo_type): New.
4148 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
4149 (_initialize_fbsd_tdep): New.
4150
4151 2017-07-06 David Blaikie <dblaikie@gmail.com>
4152
4153 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
4154 a singular dwo_unit*) to support multiple CUs in the same way that
4155 multiple TUs are supported.
4156 (create_cus_hash_table): Replace create_dwo_cu with a function for
4157 parsing multiple CUs from a DWO file.
4158 (open_and_init_dwo_file): Use create_cus_hash_table rather than
4159 create_dwo_cu.
4160 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
4161 htab_find, rather than comparing the signature to a singleton CU in
4162 the dwo_file.
4163
4164 2017-07-06 Pedro Alves <palves@redhat.com>
4165
4166 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
4167
4168 2017-07-04 Pedro Alves <palves@redhat.com>
4169
4170 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
4171 * gdbtypes.h (TYPE_STATIC): Delete.
4172 (struct fn_field) <is_public, is_abstract, is_static, is_final,
4173 is_synchronized, is_native>: Delete.
4174 <dummy>: Bump.
4175 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
4176 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
4177 (TYPE_FN_FIELD_ABSTRACT): Delete.
4178
4179 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
4180
4181 * buffer.h (buffer_finish): Fix spelling mistakes.
4182
4183 2017-07-01 Eli Zaretskii <eliz@gnu.org>
4184
4185 * .dir-locals.el: Automatically switch to C-style comments in
4186 versions of Emacs that support the feature.
4187
4188 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4189 Pedro Alves <palves@redhat.com>
4190
4191 PR cli/21688
4192 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
4193 (process_next_line): New variable 'inline_cmd'.
4194 Adjust 'if' clauses for "python", "compile" and "guile" to use
4195 'command_name_equals' and check for '!inline_cmd'.
4196
4197 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
4198
4199 PR cli/21688
4200 * cli/cli-script.c (command_name_equals_not_inline): New function.
4201 (process_next_line): Adjust 'if' clauses for "python", "compile"
4202 and "guile" to use command_name_equals_not_inline.
4203
4204 2017-06-29 Pedro Alves <palves@redhat.com>
4205
4206 * completer.c (expression_completer): Call
4207 linespec_location_completer instead of location_completer.
4208
4209 2017-06-29 Pedro Alves <palves@redhat.com>
4210
4211 * completer.c (expression_completer): Remove code that recomputes
4212 'text' from 'word'.
4213
4214 2017-06-29 Yao Qi <yao.qi@linaro.org>
4215
4216 * regformats/regdat.sh: Generate code with
4217 "ifndef IN_PROCESS_AGENT".
4218
4219 2017-06-28 Pedro Alves <palves@redhat.com>
4220
4221 * command.h: Include "common/scoped_restore.h".
4222
4223 2017-06-28 Yao Qi <yao.qi@linaro.org>
4224
4225 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
4226 instead of obstack_grow.
4227
4228 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
4229
4230 PR gdb/21337
4231 * symfile.c (reread_symbols): Call objfiles_changed just before
4232 read_symbols.
4233
4234 2017-06-27 Pedro Alves <palves@redhat.com>
4235
4236 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
4237 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
4238 (completion_list_add_symbol, completion_list_add_msymbol):
4239 ... these new functions.
4240 (add_symtab_completions)
4241 (default_make_symbol_completion_list_break_on_1): Adjust.
4242
4243 2017-06-27 Pedro Alves <palves@redhat.com>
4244
4245 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
4246 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
4247 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
4248 dtor.
4249 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
4250 'storage_obstack' field an auto_obstack. In-class initialize all
4251 non-bitfield fields. Make minsyms_read bool.
4252 * symfile.c (read_symbols): Adjust.
4253
4254 2017-06-27 Alan Hayward <alan.hayward@arm.com>
4255
4256 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
4257 (gdbsim_store_register): Likewise.
4258
4259 2017-06-27 Pedro Alves <palves@redhat.com>
4260
4261 * c-exp.y (name_obstack): Now an auto_obstack.
4262 (yylex): Use auto_obstack::clear.
4263 (c_parse): Use auto_obstack::clear instead of reinitializing and
4264 freeing the obstack.
4265 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
4266 * d-exp.y (name_obstack): Now an auto_obstack.
4267 (yylex): Use auto_obstack::clear.
4268 (d_parse): Use auto_obstack::clear instead of reinitializing and
4269 freeing the obstack.
4270 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
4271 auto_obstack.
4272 * dwarf2read.c (create_addrmap_from_index)
4273 (dwarf2_build_psymtabs_hard)
4274 (update_enumeration_type_from_children): Likewise.
4275 * gdb_obstack.h (auto_obstack): New type.
4276 * go-exp.y (name_obstack): Now an auto_obstack.
4277 (build_packaged_name): Use auto_obstack::clear.
4278 (go_parse): Use auto_obstack::clear instead of reinitializing and
4279 freeing the obstack.
4280 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
4281 auto_obstack.
4282 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
4283 * rust-exp.y (work_obstack): Now an auto_obstack.
4284 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
4285 reinitializing and freeing the obstack.
4286 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
4287 (host_char_to_target): Use auto_obstack.
4288 * utils.h (make_cleanup_obstack_free): Delete declaration.
4289 * valprint.c (generic_emit_char, generic_printstr): Use
4290 auto_obstack.
4291
4292 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
4293
4294 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
4295 thread.
4296 (darwin_init_thread_list): Don't update dummy thread.
4297 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
4298
4299 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4300
4301 * record-full.c (netorder16): Remove.
4302
4303 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4304
4305 * common/diagnostics.h: Define macros for GCC.
4306 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
4307 * common/vec.h: Include diagnostics.h.
4308 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
4309 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
4310 warning.
4311
4312 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
4313
4314 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
4315 New macro.
4316 * ada-lex.l: Ignore deprecated register warnings.
4317
4318 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4319
4320 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
4321 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
4322
4323 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4324
4325 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
4326 its own line.
4327
4328 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
4329
4330 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
4331
4332 2017-06-23 Alan Hayward <alan.hayward@arm.com>
4333
4334 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
4335 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
4336 (xtensa_register_read_masked): Likewise.
4337
4338 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
4339
4340 * common/environ.c (gdb_environ::unset): Update comment.
4341
4342 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4343
4344 * python/py-unwind.c (pyuw_sniffer): Allocate space for
4345 registers.
4346
4347 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4348
4349 * record-full.c (record_full_exec_insn): Use byte_vector.
4350
4351 2017-06-22 Yao Qi <yao.qi@linaro.org>
4352
4353 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
4354 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4355
4356 2017-06-22 Alan Hayward <alan.hayward@arm.com>
4357
4358 * remote.c (cached_reg): Move from here...
4359 * regcache.h (cached_reg): ...to here.
4360 * python/py-unwind.c (struct reg_info): Remove.
4361 (cached_frame_info): Use cached_reg_t.
4362 (pyuw_prev_register): Likewise.
4363 (pyuw_sniffer): Use cached_reg_t and allocate registers.
4364 (pyuw_dealloc_cache): Free all registers.
4365
4366 2017-06-22 Pedro Alves <palves@redhat.com>
4367 Simon Marchi <simon.marchi@ericsson.com>
4368
4369 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
4370 warning.
4371 * common/diagnostics.h: New file.
4372
4373 2017-06-22 Pedro Alves <palves@redhat.com>
4374
4375 * common/agent.h: Add include guards.
4376
4377 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
4378
4379 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
4380 talk about addressable units instead of bytes.
4381
4382 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4383
4384 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
4385 of '::const_iterator'.
4386
4387 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4388
4389 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4390 'unittests/environ-selftests.c'.
4391 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
4392 * charset.c (find_charset_names): Declare object 'iconv_env'.
4393 Update code to use 'iconv_env' object. Remove call to
4394 'free_environ'.
4395 * common/environ.c: Include <utility>.
4396 (make_environ): Delete function.
4397 (free_environ): Delete function.
4398 (gdb_environ::clear): New function.
4399 (gdb_environ::operator=): New function.
4400 (gdb_environ::get): Likewise.
4401 (environ_vector): Delete function.
4402 (set_in_environ): Delete function.
4403 (gdb_environ::set): New function.
4404 (unset_in_environ): Delete function.
4405 (gdb_environ::unset): New function.
4406 (gdb_environ::envp): Likewise.
4407 * common/environ.h: Include <vector>.
4408 (struct gdb_environ): Delete; transform into...
4409 (class gdb_environ): ... this class.
4410 (free_environ): Delete prototype.
4411 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
4412 environ_vector): Likewise.
4413 * infcmd.c (run_command_1): Update code to call
4414 'envp' from 'gdb_environ' class.
4415 (environment_info): Update code to call methods from 'gdb_environ'
4416 class.
4417 (unset_environment_command): Likewise.
4418 (path_info): Likewise.
4419 (path_command): Likewise.
4420 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
4421 (inferior::inferior): Initialize 'environment' using the host's
4422 information.
4423 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
4424 Include "environ.h".
4425 (class inferior) <environment>: Change type from 'struct
4426 gdb_environ' to 'gdb_environ'.
4427 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
4428 methods from 'gdb_environ' class.
4429 * solib.c (solib_find_1): Likewise
4430 * unittests/environ-selftests.c: New file.
4431
4432 2017-06-20 Yao Qi <yao.qi@linaro.org>
4433
4434 * features/i386/i386-linux.xml: Exchange the order of including
4435 32bit-linux.xml and 32bit-sse.xml.
4436 * features/i386/i386-linux.c: Regenerated.
4437
4438 2017-06-20 Yao Qi <yao.qi@linaro.org>
4439
4440 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
4441 Delete copy ctor and assignment operator.
4442 (tdesc_type): Likewise.
4443 (tdesc_feature): Likewise.
4444 (tdesc_free_reg): Remove.
4445 (tdesc_create_reg): Use new.
4446 (tdesc_free_type): Remove.
4447 (tdesc_create_vector): Use new.
4448 (tdesc_create_union): Likewise.
4449 (tdesc_create_flags): Likewise.
4450 (tdesc_create_enum): Likewise.
4451 (tdesc_free_feature): Delete.
4452 (free_target_description): Use delete.
4453
4454 2017-06-19 John Baldwin <jhb@FreeBSD.org>
4455
4456 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
4457 registers.
4458
4459 2017-06-19 Pedro Alves <palves@redhat.com>
4460
4461 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
4462 after gdb::unlinker.
4463
4464 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
4465
4466 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
4467 gdb_environ to access an environment variable.
4468
4469 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
4470
4471 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
4472 gdb_byte*.
4473
4474 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4475
4476 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
4477
4478 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4479
4480 * configure: Re-generate.
4481 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
4482
4483 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4484
4485 * configure: Re-generate.
4486 * warning.m4: Pass -Werror to compiler when checking for
4487 supported warning flags.
4488
4489 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4490
4491 * Makefile.in (COMPILE.pre): Add "-x c++".
4492
4493 2017-06-16 Alan Hayward <alan.hayward@arm.com>
4494 Pedro Alves <palves@redhat.com>
4495 Yao Qi <yao.qi@linaro.org>
4496
4497 * defs.h (RequireLongest): New.
4498 (extract_integer): Declare function template.
4499 (extract_signed_integer): Remove the declaration, but define it
4500 static inline.
4501 (extract_unsigned_integer): Likewise.
4502 (store_integer): Declare function template.
4503 (store_signed_integer): Remove the declaration, but define it
4504 static inline.
4505 (store_unsigned_integer): Likewise.
4506 * findvar.c (extract_integer): New function template.
4507 (extract_signed_integer): Remove.
4508 (extract_unsigned_integer): Remove.
4509 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
4510 instantiations.
4511 (store_integer): New function template.
4512 (store_signed_integer): Remove.
4513 (store_unsigned_integer): Remove.
4514 (store_integer): Explicit instantiations.
4515 * regcache.c (regcache_raw_read_signed): Update.
4516 (regcache::raw_read): New function.
4517 (regcache::raw_read_signed): Remove.
4518 (regcache::raw_read_unsigned): Remove.
4519 (regcache_raw_read_unsigned): Update.
4520 (regcache_raw_write_unsigned): Update.
4521 (regcache::raw_write_signed): Remove.
4522 (regcache::raw_write): New function.
4523 (regcache_cooked_read_signed): Update.
4524 (regcache::raw_write_unsigned): Remove.
4525 (regcache::cooked_read_signed): Remove.
4526 (regcache_cooked_read_unsigned): Update.
4527 (regcache::cooked_read_unsigned): Remove.
4528 (regcache_cooked_write_signed): Update.
4529 (regcache_cooked_write_unsigned): Update.
4530 * regcache.h (regcache) <raw_read_signed>: Remove.
4531 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
4532 <raw_read, raw_write>: New.
4533 <cooked_read_signed, cooked_write_signed>: Remove.
4534 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
4535 <cooked_read, cooked_write>: New.
4536 * sh64-tdep.c (sh64_pseudo_register_read): Update.
4537 (sh64_pseudo_register_write): Update.
4538
4539 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
4540
4541 * arc-tdep.c (arc_disassembler_options): New variable.
4542 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
4543 of default_print_insn.
4544 (arc_delayed_print_insn): Set info->section when needed,
4545 use default_print_insn to retrieve a disassembler.
4546
4547 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
4548
4549 PR gdb/21574
4550 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
4551 to mention $SHELL and startup-with-shell.
4552
4553 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
4554
4555 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
4556
4557 2017-06-14 Yao Qi <yao.qi@linaro.org>
4558
4559 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
4560 default_print_insn instead of print_insn_aarch64.
4561 * arm-tdep.c (gdb_print_insn_arm): Call
4562 default_print_insn instead of print_insn_big_arm
4563 and print_insn_little_arm.
4564 * i386-tdep.c (i386_print_insn): Call default_print_insn
4565 instead of print_insn_i386.
4566 * ia64-tdep.c (ia64_print_insn): Call
4567 default_print_insn instead of print_insn_ia64.
4568 * mips-tdep.c (gdb_print_insn_mips): Call
4569 default_print_insn instead of print_insn_big_mips
4570 and print_insn_little_mips.
4571 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
4572 instead of print_insn_spu.
4573
4574 2017-06-14 Pedro Alves <palves@redhat.com>
4575
4576 * ada-lang.c: Include "common/byte-vector.h".
4577 (ada_value_primitive_packed_val): Use gdb::byte_vector.
4578 * charset.c (wchar_iterator::iterate): Resize the vector instead
4579 of reserving it.
4580 * common/byte-vector.h: Include "common/def-vector.h".
4581 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
4582 * cli/cli-dump.c: Include "common/byte-vector.h".
4583 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
4584 * common/byte-vector.h: New file.
4585 * common/def-vector.h: New file.
4586 * common/default-init-alloc.h: New file.
4587 * dwarf2loc.c: Include "common/byte-vector.h".
4588 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
4589 instead of reserving it.
4590 * dwarf2read.c: Include "common/byte-vector.h".
4591 (data_buf::m_vec): Now a gdb::byte_vector.
4592 * gdb_regex.c: Include "common/def-vector.h".
4593 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
4594 * mi/mi-main.c: Include "common/byte-vector.h".
4595 (mi_cmd_data_read_memory): Use gdb::byte_vector.
4596 * printcmd.c: Include "common/byte-vector.h".
4597 (print_scalar_formatted): Use gdb::byte_vector.
4598 * valprint.c: Include "common/byte-vector.h".
4599 (maybe_negate_by_bytes, print_decimal_chars): Use
4600 gdb::byte_vector.
4601
4602 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
4603
4604 * darwin-nat.c: Include "nat/fork-inferior.h".
4605
4606 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
4607
4608 * configure.nat: Factor out Darwin bits that are not
4609 architecture-specific. Add fork-inferior.o.
4610
4611 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
4612
4613 * configure.nat: Factor out AIX bits that are not
4614 architecture-specific. Add fork-inferior.o.
4615
4616 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4617
4618 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
4619 (read_pieced_value, write_pieced_value): ...here. Reduce to
4620 wrappers that just call rw_pieced_value.
4621
4622 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4623
4624 * dwarf2loc.c (write_pieced_value): When writing the data for a
4625 memory piece, use write_memory_with_notification instead of
4626 write_memory.
4627
4628 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4629
4630 * valops.c (read_value_memory): Change embedded_offset to
4631 represent a bit offset instead of a byte offset.
4632 * value.h (read_value_memory): Adjust comment.
4633
4634 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4635
4636 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
4637 dest_offset_bits and source_offset_bits.
4638 (write_pieced_value): Likewise.
4639
4640 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4641
4642 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
4643 given by DW_OP_bit_piece.
4644 (write_pieced_value): Likewise.
4645
4646 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4647
4648 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
4649 some other preparations to the places where sufficient information
4650 is available.
4651 (write_pieced_value): Likewise.
4652
4653 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4654
4655 * dwarf2loc.c (bits_to_bytes): New function.
4656 (read_pieced_value): Fix offset calculations for register pieces
4657 on big-endian targets.
4658 (write_pieced_value): Likewise.
4659
4660 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4661
4662 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
4663 (write_pieced_value): Likewise.
4664
4665 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4666
4667 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
4668 transfer the source value's least significant bits, instead of its
4669 lowest-addressed ones. Rename type_len to max_offset.
4670 (read_pieced_value): Mirror above changes to write_pieced_value as
4671 applicable.
4672
4673 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4674
4675 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
4676 truncate full bytes from dest_offset_bits before using it as an
4677 offset into the buffer.
4678
4679 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4680
4681 * dwarf2loc.c (write_pieced_value): Include transfer size in
4682 byte-wise check.
4683
4684 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4685
4686 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
4687 calculation of this_size.
4688
4689 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4690
4691 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
4692 when targeting a bit-field.
4693 (write_pieced_value): Likewise.
4694
4695 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4696
4697 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
4698 (allocate_piece_closure): Drop addr_size parameter.
4699 (dwarf2_evaluate_loc_desc_full): Adjust call to
4700 allocate_piece_closure.
4701
4702 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4703
4704 PR gdb/21226
4705 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
4706 the LSB end, independent of endianness.
4707
4708 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4709
4710 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
4711 size capping.
4712
4713 2017-06-13 Yao Qi <yao.qi@linaro.org>
4714
4715 * mips-linux-nat.c: Move include features/mips*-linux.c to
4716 mips-linux-tdep.c.
4717 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
4718 to mips-linux-tdep.c.
4719 * mips-linux-tdep.c: Include features/mips*-linux.c
4720 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
4721 functions.
4722 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
4723 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
4724 (tdesc_mips64_dsp_linux): Declare.
4725
4726 2017-06-12 Tom Tromey <tom@tromey.com>
4727
4728 * valprint.h (val_print_type_code_int): Remove.
4729 * valprint.c (generic_val_print_int): Always call
4730 val_print_scalar_formatted.
4731 (val_print_type_code_int): Remove.
4732 * printcmd.c (print_scalar_formatted): Handle options->format==0.
4733 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
4734 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
4735 * ada-valprint.c (ada_val_print_num): Use
4736 val_print_scalar_formatted.
4737
4738 2017-06-12 Tom Tromey <tom@tromey.com>
4739
4740 * printcmd.c (print_scalar_formatted): Unify the two switches.
4741 Don't convert scalars to LONGEST.
4742
4743 2017-06-12 Tom Tromey <tom@tromey.com>
4744
4745 PR exp/16225:
4746 * valprint.h (print_decimal_chars): Update.
4747 * valprint.c (maybe_negate_by_bytes): New function.
4748 (print_decimal_chars): Add "is_signed" argument.
4749 * printcmd.c (print_scalar_formatted): Update.
4750
4751 2017-06-12 Tom Tromey <tom@tromey.com>
4752
4753 PR exp/16225:
4754 * valprint.h (print_binary_chars, print_hex_chars): Update.
4755 * valprint.c (val_print_type_code_int): Update.
4756 (print_binary_chars): Add "zero_pad" argument.
4757 (emit_octal_digit): New function.
4758 (print_octal_chars): Don't zero-pad.
4759 (print_decimal_chars): Likewise.
4760 (print_hex_chars): Add "zero_pad" argument.
4761 * sh64-tdep.c (sh64_do_fp_register): Update.
4762 * regcache.c (regcache::dump): Update.
4763 * printcmd.c (print_scalar_formatted): Update.
4764 * infcmd.c (default_print_one_register_info): Update.
4765
4766 2017-06-12 Pedro Alves <palves@redhat.com>
4767 Alan Hayward <alan.hayward@arm.com>
4768
4769 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
4770 (mips_eabi_push_dummy_call): Rename local 'regsize' to
4771 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
4772 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
4773 Assert that abi_regsize bytes fit in 'ref_valbuf'.
4774
4775 2017-06-12 Pedro Alves <palves@redhat.com>
4776
4777 * dwarf2read.c (mapped_symtab::data): Now a vector of
4778 symtab_index_entry instead of vector of
4779 std::unique_ptr<symtab_index_entry>. All users adjusted to check
4780 whether an element's name is NULL instead of checking whether the
4781 element itself is NULL.
4782 (find_slot): Change return type. Adjust.
4783 (hash_expand, , add_index_entry, uniquify_cu_indices)
4784 (write_hash_table): Adjust.
4785
4786 2017-06-12 Pedro Alves <palves@redhat.com>
4787
4788 * dwarf2read.c (recursively_count_psymbols): New function.
4789 (write_psymtabs_to_index): Call it to compute number of psyms and
4790 pass estimate size of psyms_seen to unordered_set's ctor.
4791
4792 2017-06-12 Pedro Alves <palves@redhat.com>
4793
4794 * dwarf2read.c (write_hash_table): Check if key already exists
4795 before emplacing.
4796
4797 2017-06-12 Pedro Alves <palves@redhat.com>
4798
4799 * dwarf2read.c (data_buf::append_space): Rename to...
4800 (data_buf::grow): ... this, and make private. Adjust all callers.
4801 (data_buf::append_uint): New method.
4802 (add_address_entry, write_one_signatured_type)
4803 (write_psymtabs_to_index): Use it.
4804
4805 2017-06-12 Pedro Alves <palves@redhat.com>
4806
4807 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
4808 (file_write (FILE *, const std::vector<Elem>&)): Delete.
4809 (data_buf::file_write): Call ::fwrite directly.
4810
4811 2017-06-12 Pedro Alves <palves@redhat.com>
4812
4813 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
4814 std::vector::erase.
4815
4816 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
4817
4818 Code cleanup: C++ify .gdb_index producer.
4819 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
4820 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
4821 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
4822 (create_strtab, add_string): Remove.
4823 (file_write, data_buf): New.
4824 (struct symtab_index_entry): Use std::vector for cu_indices.
4825 (struct mapped_symtab): Use std::vector for data.
4826 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
4827 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
4828 Remove.
4829 (find_slot): Change return type. Update it to the new data structures.
4830 (hash_expand, add_index_entry): Update it to the new data structures.
4831 (offset_type_compare): Remove.
4832 (uniquify_cu_indices): Update it to the new data structures.
4833 (c_str_view, c_str_view_hasher, vector_hasher): New.
4834 (add_indices_to_cpool): Remove.
4835 (write_hash_table): Update it to the new data structures.
4836 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
4837 (eq_psymtab_cu_index): Remove.
4838 (psym_index_map): New typedef.
4839 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
4840 reference and std::unordered_map for cu_index_htab.
4841 (add_address_entry, add_address_entry_worker, write_address_map)
4842 (write_psymbols): Update it to the new data structures.
4843 (write_obstack): Remove.
4844 (struct signatured_type_index_data): Change types_list to a data_buf
4845 reference and psyms_seen to a std::unordered_set reference.
4846 (write_one_signatured_type, recursively_write_psymbols)
4847 (write_psymtabs_to_index): Update it to the new data structures.
4848
4849 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
4850
4851 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
4852 separate-debug-file commands.
4853 * symfile.h (separate_debug_file_debug): New global.
4854 * symfile.c (separate_debug_file_debug): New global.
4855 (separate_debug_file_exists, find_separate_debug_file): Add
4856 debug output.
4857 (_initialize_symfile): Add "set debug separate-debug-file"
4858 command.
4859 * build-id.c (build_id_to_debug_bfd,
4860 find_separate_debug_file_by_buildid): Add debug output.
4861
4862 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
4863
4864 * gdbarch.sh (displaced_step_free_closure): Remove.
4865 * gdbarch.h, gdbarch.c: Re-generate.
4866 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
4867 displaced_step_free_closure.
4868 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
4869 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
4870 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4871 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
4872 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
4873 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
4874 * arch-utils.h (simple_displaced_step_free_closure): Remove.
4875 * arch-utils.c (simple_displaced_step_free_closure): Remove.
4876 * infrun.c (displaced_step_clear): Call xfree instead of
4877 gdbarch_displaced_step_free_closure.
4878
4879 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
4880
4881 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
4882 NULL".
4883
4884 2017-06-08 Alan Hayward <alan.hayward@arm.com>
4885
4886 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
4887 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
4888 (mn10300_push_dummy_call): Likewise.
4889
4890 2017-06-08 Alan Hayward <alan.hayward@arm.com>
4891
4892 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
4893
4894 2017-06-08 Alan Hayward <alan.hayward@arm.com>
4895
4896 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
4897
4898 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4899
4900 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
4901 able to start inferiors using a shell.
4902 (New remote packets): Announce new packet "QStartupWithShell".
4903 * remote.c: Add PACKET_QStartupWithShell.
4904 (extended_remote_create_inferior): Handle new
4905 PACKET_QStartupWithShell.
4906 (remote_protocol_features) <QStartupWithShell>: New entry for
4907 PACKET_QStartupWithShell.
4908 (_initialize_remote): Call "add_packet_config_cmd" for
4909 QStartupShell.
4910
4911 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4912 Pedro Alves <palves@redhat.com>
4913
4914 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
4915 and "nat/fork-inferior.h".
4916 * common/common-inferior.h: New file, with contents from
4917 "gdb/inferior.h".
4918 * commom/common-utils.c: Include "common-utils.h".
4919 (stringify_argv): New function.
4920 * common/common-utils.h (stringify_argv): New prototype.
4921 * configure.nat: Add "fork-inferior.o" as a dependency for
4922 "*linux*", "fbsd*" and "nbsd*" hosts.
4923 * corefile.c (get_exec_file): Update comment.
4924 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
4925 instead of "startup_inferior".
4926 (darwin_create_inferior): Call "add_thread_silent" after
4927 "fork_inferior".
4928 * fork-child.c: Cleanup unnecessary includes.
4929 (SHELL_FILE): Move to "common/common-fork-child.c".
4930 (environ): Likewise.
4931 (exec_wrapper): Initialize.
4932 (get_exec_wrapper): New function.
4933 (breakup_args): Move to "common/common-fork-child.c"; rename to
4934 "breakup_args_for_exec".
4935 (escape_bang_in_quoted_argument): Move to
4936 "common/common-fork-child.c".
4937 (saved_ui): New variable.
4938 (prefork_hook): New function.
4939 (postfork_hook): Likewise.
4940 (postfork_child_hook): Likewise.
4941 (gdb_startup_inferior): Likewise.
4942 (fork_inferior): Move to "common/common-fork-child.c". Update
4943 function to support gdbserver.
4944 (startup_inferior): Likewise.
4945 * gdbcore.h (get_exec_file): Remove declaration.
4946 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
4947 instead of "startup_inferior". Call "add_thread_silent" after
4948 "fork_inferior".
4949 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
4950 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
4951 instead of "startup_inferior". Call "add_thread_silent" after
4952 "fork_inferior".
4953 * inferior.h: Include "common-inferior.h".
4954 (trace_start_error): Move to "common/common-utils.h".
4955 (trace_start_error_with_name): Likewise.
4956 (fork_inferior): Move prototype to "nat/fork-inferior.h".
4957 (startup_inferior): Likewise.
4958 (gdb_startup_inferior): New prototype.
4959 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
4960 * nat/fork-inferior.h: New file.
4961 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
4962 instead of "startup_inferior". Call "add_thread_silent" after
4963 "fork_inferior".
4964 * target.h (target_terminal_init): Move prototype to
4965 "target/target.h".
4966 (target_terminal_inferior): Likewise.
4967 (target_terminal_ours): Likewise.
4968 * target/target.h (target_terminal_init): New prototype, moved
4969 from "target.h".
4970 (target_terminal_inferior): Likewise.
4971 (target_terminal_ours): Likewise.
4972 * utils.c (gdb_flush_out_err): New function.
4973
4974 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4975
4976 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
4977 * common/common-gdbthread.h: New file, with parts from
4978 "gdb/gdbthread.h".
4979 * gdbthread.h: Include "common-gdbthread.h".
4980 (switch_to_thread): Moved to "common/common-gdbthread.h".
4981
4982 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4983
4984 * Makefile.in (SFILES): Add "common/job-control.c".
4985 (HFILES_NO_SRCDIR): Add "common/job-control.h".
4986 (COMMON_OBS): Add "job-control.o".
4987 * common/job-control.c: New file, with contents from
4988 "gdb/inflow.c".
4989 * common/job-control.h: New file, with contents from "terminal.h".
4990 * fork-child.c: Include "job-control.h".
4991 * inflow.c: Include "job-control.h".
4992 (gdb_setpgid): Move to "common/common-inflow.c".
4993 (_initialize_inflow): Move setting of "job_control" to
4994 "handle_job_control".
4995 * terminal.h (job_control): Moved to "common/common-terminal.h".
4996 (gdb_setpgid): Likewise.
4997 * top.c: Include "job_control.h".
4998 * utils.c: Likewise.
4999 (job_control): Moved to "job-control.c".
5000
5001 2017-06-07 Pedro Alves <palves@redhat.com>
5002
5003 * Makefile.in (SFILES): Add gdb_regex.c.
5004 (COMMON_OBS): Add gdb_regex.o.
5005 * ada-lang.c (ada_add_standard_exceptions)
5006 (ada_add_exceptions_from_frame, name_matches_regex)
5007 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
5008 parameter type to compiled_regex. Adjust.
5009 (ada_exceptions_list): Use compiled_regex.
5010 * break-catch-throw.c (exception_catchpoint::pattern): Now a
5011 std::unique_ptr<compiled_regex>.
5012 (exception_catchpoint::~exception_catchpoint): Remove regfree
5013 call.
5014 (check_status_exception_catchpoint): Adjust to use compiled_regex.
5015 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
5016 * breakpoint.c (solib_catchpoint::compiled): Now a
5017 std::unique_ptr<compiled_regex>.
5018 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
5019 (check_status_catch_solib): Adjust to use compiled_regex.
5020 (add_solib_catchpoint): Adjust to use compiled_regex.
5021 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
5022 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
5023 compiled_regex reference. Adjust to use it.
5024 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
5025 declaration. Include "gdb_regex.h".
5026 (apropos_cmd): Change regex parameter to compiled_regex reference.
5027 * gdb_regex.c: New file.
5028 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
5029 declarations.
5030 (class compiled_regex): New.
5031 * linux-tdep.c: Include "common/gdb_optional.h".
5032 (struct mapping_regexes): New, factored out from
5033 mapping_is_anonymous_p, and adjusted to use compiled_regex.
5034 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
5035 gdb::optional and remove cleanups. Adjust to compiled_regex.
5036 * probe.c: Include "common/gdb_optional.h".
5037 (collect_probes): Use compiled_regex and gdb::optional and remove
5038 cleanups.
5039 * skip.c: Include "common/gdb_optional.h".
5040 (skiplist_entry::compiled_function_regexp): Now a
5041 gdb::optional<compiled_regex>.
5042 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
5043 (free_skiplist_entry): Remove regfree call.
5044 (compile_skip_regexp, skip_rfunction_p): Adjust to use
5045 compiled_regex and gdb::optional.
5046 * symtab.c: Include "common/gdb_optional.h".
5047 (search_symbols): Use compiled_regex and gdb::optional.
5048 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
5049 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
5050 to gdb_regex.c.
5051
5052 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5053
5054 * regcache.c (regcache::save): Avoid buffer use.
5055 (regcache::dump): Likewise.
5056
5057 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5058
5059 * sh-tdep.c (sh_pseudo_register_read): Remove
5060 MAX_REGISTER_SIZE.
5061 (sh_pseudo_register_write): Likewise.
5062 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
5063 (sh64_pseudo_register_write): Likewise
5064
5065 2017-06-07 Alan Hayward <alan.hayward@arm.com>
5066
5067 * aarch64-tdep.c (aarch64_store_return_value): Use
5068 V_REGISTER_SIZE.
5069 (aarch64_pseudo_read_value): Likewise.
5070 (aarch64_pseudo_write): Likewise.
5071
5072 2017-06-06 Yao Qi <yao.qi@linaro.org>
5073
5074 * regformats/regdef.h (set_register_cache): Remove the
5075 declaration.
5076
5077 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5078
5079 * frame.c (frame_unwind_register_signed): Use
5080 frame_unwind_register_value.
5081
5082 2017-06-06 Pedro Alves <palves@redhat.com>
5083
5084 PR breakpoints/21553
5085 * breakpoint.c (create_breakpoints_sal_default)
5086 (init_breakpoint_sal, create_breakpoint_sal): Use
5087 gdb::unique_xmalloc_ptr for string parameters.
5088 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5089 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
5090 (base_breakpoint_create_breakpoints_sal)
5091 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
5092 (strace_marker_create_breakpoints_sal)
5093 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
5094 string parameters.
5095 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
5096 gdb::unique_xmalloc_ptr for string parameters.
5097 (create_breakpoint): Constify 'extra_string' and 'cond_string'
5098 parameters.
5099
5100 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5101
5102 * alpha-tdep.c (alpha_register_to_value): Use
5103 get_frame_register_value.
5104 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
5105
5106 2017-06-06 Alan Hayward <alan.hayward@arm.com>
5107
5108 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
5109 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
5110 (ia64_value_to_register): Likewise.
5111 (ia64_extract_return_value): Likewise.
5112 (ia64_store_return_value): Likewise.
5113 (ia64_push_dummy_call): Likewise.
5114
5115 2017-06-04 Joel Brobecker <brobecker@adacore.com>
5116
5117 GDB 8.0 released.
5118
5119 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
5120
5121 * x86-linux-nat.c (struct arch_lwp_info): Remove.
5122
5123 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
5124
5125 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
5126 parameter.
5127 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
5128
5129 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
5130
5131 * event-loop.c (poll_timers): Unallocate timer using delete
5132 instead of xfree.
5133
5134 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5135
5136 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
5137 (struct breakpoint) <~breakpoint>: New.
5138 (struct watchpoint): Inherit from breakpoint.
5139 <~watchpoint>: New.
5140 <base>: Remove.
5141 (struct tracepoint): Inherit from breakpoint.
5142 <base>: Remove.
5143 * breakpoint.c (longjmp_breakpoint_ops): Remove.
5144 (struct longjmp_breakpoint): Inherit from breakpoint.
5145 <~longjmp_breakpoint>: New.
5146 <base>: Remove.
5147 (new_breakpoint_from_type): Remove casts.
5148 (watchpoint_in_thread_scope): Remove reference to base field.
5149 (watchpoint_del_at_next_stop): Likewise.
5150 (update_watchpoint): Likewise.
5151 (watchpoint_check): Likewise.
5152 (bpstat_check_watchpoint): Likewise.
5153 (set_longjmp_breakpoint): Likewise.
5154 (struct fork_catchpoint): Inherit from breakpoint.
5155 <base>: Remove.
5156 (struct solib_catchpoint): Inherit from breakpoint.
5157 <~solib_catchpoint>: New.
5158 <base>: Remove.
5159 (dtor_catch_solib): Change to ...
5160 (solib_catchpoint::~solib_catchpoint): ... this.
5161 (breakpoint_hit_catch_solib): Remove reference to base field.
5162 (add_solib_catchpoint): Likewise.
5163 (create_fork_vfork_event_catchpoint): Likewise.
5164 (struct exec_catchpoint): Inherit from breakpoint.
5165 <~exec_catchpoint>: New.
5166 <base>: Remove.
5167 (dtor_catch_exec): Change to ...
5168 (exec_catchpoint::~exec_catchpoint): ... this.
5169 (dtor_watchpoint): Change to ...
5170 (watchpoint::~watchpoint): ... this.
5171 (watch_command_1): Remove reference to base field.
5172 (catch_exec_command_1): Likewise.
5173 (base_breakpoint_dtor): Change to ...
5174 (breakpoint::~breakpoint): ... this.
5175 (base_breakpoint_ops): Remove dtor field value.
5176 (longjmp_bkpt_dtor): Change to ...
5177 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
5178 (strace_marker_create_breakpoints_sal): Remove reference to base
5179 field.
5180 (delete_breakpoint): Don't manually call breakpoint destructor.
5181 (create_tracepoint_from_upload): Remove reference to base field.
5182 (trace_pass_set_count): Likewise.
5183 (initialize_breakpoint_ops): Don't initialize
5184 momentary_breakpoint_ops, don't set dtors.
5185 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
5186 <~ada_catchpoint>: New.
5187 <base>: Remove.
5188 (create_excep_cond_exprs): Remove reference to base field.
5189 (dtor_exception): Change to ...
5190 (ada_catchpoint::~ada_catchpoint): ... this.
5191 (dtor_catch_exception): Remove.
5192 (dtor_catch_exception_unhandled): Remove.
5193 (dtor_catch_assert): Remove.
5194 (create_ada_exception_catchpoint): Remove reference to base
5195 field.
5196 (initialize_ada_catchpoint_ops): Don't set dtors.
5197 * break-catch-sig.c (struct signal_catchpoint): Inherit from
5198 breakpoint.
5199 <~signal_catchpoint>: New.
5200 <base>: Remove.
5201 (signal_catchpoint_dtor): Change to ...
5202 (signal_catchpoint::~signal_catchpoint): ... this.
5203 (create_signal_catchpoint): Remove reference to base field.
5204 (initialize_signal_catchpoint_ops): Don't set dtor.
5205 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
5206 from breakpoint.
5207 <~syscall_catchpoint>: New.
5208 <base>: Remove.
5209 (dtor_catch_syscall): Change to ...
5210 (syscall_catchpoint::~syscall_catchpoint): ... this.
5211 (create_syscall_event_catchpoint): Remove reference to base
5212 field.
5213 (initialize_syscall_catchpoint_ops): Don't set dtor.
5214 * break-catch-throw.c (struct exception_catchpoint): Inherit
5215 from breakpoint.
5216 <~exception_catchpoint>: New.
5217 <base>: Remove.
5218 (dtor_exception_catchpoint): Change to ...
5219 (exception_catchpoint::~exception_catchpoint): ... this.
5220 (handle_gnu_v3_exceptions): Remove reference to base field.
5221 (initialize_throw_catchpoint_ops): Don't set dtor.
5222 * ctf.c (ctf_get_traceframe_address): Remove reference to base
5223 field.
5224 * remote.c (remote_get_tracepoint_status): Likewise.
5225 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
5226 * tracefile.c (tracefile_fetch_registers): Likewise.
5227 * tracepoint.c (actions_command): Likewise.
5228 (validate_actionline): Likewise.
5229 (tfind_1): Likewise.
5230 (get_traceframe_location): Likewise.
5231 (find_matching_tracepoint_location): Likewise.
5232 (parse_tracepoint_status): Likewise.
5233 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
5234
5235 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5236
5237 * breakpoint.c (struct longjmp_breakpoint): New struct.
5238 (is_tracepoint_type): Change return type to bool.
5239 (is_longjmp_type): New function.
5240 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
5241 (set_raw_breakpoint_without_location): Use
5242 new_breakpoint_from_type.
5243 (set_raw_breakpoint): Likewise.
5244
5245 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
5246
5247 * breakpoint.c (new_breakpoint_from_type): New function.
5248 (create_breakpoint_sal): Use new_breakpoint_from_type and
5249 unique_ptr.
5250 (create_breakpoint): Likewise.
5251
5252 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
5253
5254 * memattr.c (mem_info_command): Rename to ...
5255 (info_mem_command): ... this.
5256 (mem_enable_command): Rename to ...
5257 (enable_mem_command): ... this.
5258 (mem_disable_command): Rename to ...
5259 (disable_mem_command): ... this.
5260 (mem_delete_command): Rename to ...
5261 (delete_mem_command): ... this.
5262 (_initialize_mem): Adjust function names.
5263
5264 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5265
5266 * btrace.c (handle_pt_insn_events): New.
5267 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
5268 STATUS. Split into this and ...
5269 (handle_pt_insn_event_flags): ... this.
5270
5271 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
5272
5273 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
5274 and struct pt_insn.resynced.
5275 * configure: Regenerated.
5276 * config.in: Regenerated.
5277
5278 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5279
5280 * btrace.c (ftrace_find_call_by_number): New function.
5281 (ftrace_new_function): Store objects, not pointers.
5282 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
5283 ftrace_new_gap, ftrace_update_function,
5284 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
5285 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
5286 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
5287 btrace_ends_with_single_insn, btrace_call_get): Account for
5288 btrace_thread_info::functions now storing objects.
5289 * btrace.h (struct btrace_thread_info): Add constructor.
5290 (struct btrace_thread_info) <functions>: Make std::vector.
5291 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
5292 Initialize with default values.
5293 * record-btrace.c (record_btrace_frame_sniffer): Account for
5294 btrace_thread_info::functions now storing objects.
5295
5296 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5297
5298 * btrace.c: Remove typedef bfun_s.
5299 (ftrace_new_gap): Directly add gaps to the list of gaps.
5300 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
5301 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
5302 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
5303 instead of gdb VEC.
5304
5305 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5306
5307 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
5308 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
5309 with btrace_thread_info::next_segment and
5310 btrace_thread_info::prev_segment.
5311 * btrace.h: Remove struct btrace_func_link.
5312 (struct btrace_function): Replace pair of function segment pointers
5313 with pair of indices.
5314 * python/py-record-btrace.c (btpy_call_prev_sibling,
5315 btpy_call_next_sibling): Replace references to
5316 btrace_thread_info::segment with btrace_thread_info::next_segment and
5317 btrace_thread_info::prev_segment.
5318 * record-btrace.c (record_btrace_frame_this_id): Use
5319 btrace_find_call_by_number.
5320
5321 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5322
5323 * btrace.c (ftrace_new_function, ftrace_fixup_level,
5324 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
5325 btrace_insn_next, btrace_insn_prev): Remove references to
5326 btrace_thread_info::flow.
5327 * btrace.h (struct btrace_function): Remove FLOW.
5328
5329 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5330
5331 * btrace.c (ftrace_find_call_by_number): New function.
5332 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
5333 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
5334 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
5335 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
5336 index.
5337 * btrace.h (struct btrace_function): Turn UP into an index.
5338 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
5339 as an index.
5340 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
5341 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
5342 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
5343
5344 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5345
5346 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5347 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5348 ftrace_update_function, ftrace_compute_global_level_offset,
5349 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
5350 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
5351 btrace_insn_end, btrace_is_empty): Remove references to
5352 btrace_thread_info::begin and btrace_thread_info::end.
5353 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
5354 (struct btrace_thread_info) <functions>: Adjust comment.
5355 * record-btrace.c (record_btrace_start_replaying): Remove reference to
5356 btrace_thread_info::begin.
5357
5358 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5359
5360 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5361 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5362 ftrace_update_function): Remove arguments that implicitly were always
5363 BTINFO->END.
5364 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
5365 Don't pass BTINFO->END.
5366
5367 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5368
5369 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
5370 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
5371 btrace_find_insn_by_number): Replace function segment pointer with
5372 index.
5373 (btrace_insn_cmp): Simplify.
5374 * btrace.h: (struct btrace_insn_iterator) Rename index to
5375 insn_index. Replace function segment pointer with index into function
5376 segment vector.
5377 * record-btrace.c (record_btrace_call_history): Replace function
5378 segment pointer use with index.
5379 (record_btrace_frame_sniffer): Retrieve function call segment through
5380 vector.
5381 (record_btrace_set_replay): Remove defunc't safety check.
5382
5383 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5384
5385 * btrace.c (btrace_ends_with_single_insn): New function.
5386 (btrace_call_get, btrace_call_number, btrace_call_begin,
5387 btrace_call_end, btrace_call_next, btrace_call_prev,
5388 btrace_find_call_by_number): Use index into call segment vector
5389 instead of pointer.
5390 (btrace_call_cmp): Simplify.
5391 * btrace.h (struct btrace_call_iterator): Replace function call segment
5392 pointer with index into vector.
5393 * record-btrace.c (record_btrace_call_history): Use index instead of
5394 pointer.
5395
5396 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5397
5398 * btrace.c (btrace_insn_begin, btrace_insn_end,
5399 btrace_find_insn_by_number): Add btinfo to iterator.
5400 * btrace.h (struct btrace_insn_iterator): Add btinfo.
5401
5402 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5403
5404 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
5405 and save pointers directly.
5406 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
5407 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
5408 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
5409 changed signature of functions.
5410 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
5411 (btrace_fetch): Remove code that adds btrace_function pointers to
5412 vector of btrace_functions.
5413 (btrace_clear): Simplify freeing vector of btrace_functions.
5414
5415 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
5416
5417 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
5418 Replace VEC_* with std::vector functions.
5419 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
5420 (struct btrace_thread_info)<functions>: Change type to std::vector.
5421
5422 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
5423
5424 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
5425 "Removed targets and native configurations" up. Merge duplicate
5426 "New commands" sub-sections. Add "New options" sub-sections.
5427
5428 2017-05-26 Alan Hayward <alan.hayward@arm.com>
5429
5430 * defs.h (copy_integer_to_size): New declaration.
5431 * findvar.c (copy_integer_to_size): New function.
5432 (do_cint_test): New selftest function.
5433 (copy_integer_to_size_test): Likewise.
5434 (_initialize_findvar): Likewise.
5435 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
5436 (mips_fbsd_collect_reg): Use raw_collect_integer.
5437 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
5438 (mips64_fill_gregset): Use raw_collect_integer
5439 (mips64_fill_fpregset): Use raw_supply_integer.
5440 * regcache.c (regcache::raw_supply_integer): New function.
5441 (regcache::raw_collect_integer): Likewise.
5442 * regcache.h: (regcache::raw_supply_integer): New declaration.
5443 (regcache::raw_collect_integer): Likewise.
5444
5445 2017-05-24 Yao Qi <yao.qi@linaro.org>
5446
5447 * Makefile.in (SFILES): Add gdbarch-selftests.c.
5448 (COMMON_OBS): Add gdbarch-selftests.o.
5449 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
5450 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
5451 * gdbarch-selftests.c: New file.
5452 * regcache.h (regcache) <~regcache>: Mark it virtual if
5453 GDB_SELF_TEST.
5454 <raw_write>: Likewise.
5455
5456 2017-05-24 Yao Qi <yao.qi@linaro.org>
5457
5458 * regcache.c (current_regcache): Change it to
5459 regcache::current_regcache.
5460 (regcache_observer_target_changed): Update.
5461 (regcache_thread_ptid_changed): Make it a regcache static
5462 method.
5463 (regcache_thread_ptid_changed): Update.
5464 (class regcache_access): New.
5465 (current_regcache_test): Update.
5466 (_initialize_regcache): Update.
5467 * regcache.h: Include forward_list.
5468 (regcache): Declare regcache_thread_ptid_changed and declare
5469 registers_changed_ptid as friend.
5470
5471 2017-05-24 Yao Qi <yao.qi@linaro.org>
5472
5473 * i387-tdep.c (i387_register_to_value): Use register_size
5474 instead of TYPE_LENGTH.
5475 * m68k-tdep.c (m68k_register_to_value): Likewise.
5476
5477 2017-05-24 Yao Qi <yao.qi@linaro.org>
5478
5479 * i387-tdep.c (i387_convert_register_p): Return false if type
5480 code isn't TYPE_CODE_FLT.
5481
5482 2017-05-24 Yao Qi <yao.qi@linaro.org>
5483
5484 * alpha-tdep.c (alpha_convert_register_p): Return true if type
5485 length is 4.
5486 (alpha_register_to_value): Remove type length check.
5487 (alpha_value_to_register): Likewise.
5488
5489 2017-05-24 Yao Qi <yao.qi@linaro.org>
5490
5491 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
5492 TYPE_CODE_FLT.
5493
5494 2017-05-24 Yao Qi <yao.qi@linaro.org>
5495
5496 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
5497 TYPE_CODE_FLT or not.
5498
5499 2017-05-24 Yao Qi <yao.qi@linaro.org>
5500
5501 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
5502 * avr-tdep.c (avr_gdbarch_init): Likewise.
5503 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5504 * cris-tdep.c (cris_gdbarch_init): Likewise.
5505 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5506 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5507 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5508 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
5509 * mep-tdep.c (mep_gdbarch_init): Likewise.
5510 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5511 * mips-tdep.c (mips_gdbarch_init): Likewise.
5512 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5513 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5514 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5515 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5516 * v850-tdep.c (v850_gdbarch_init): Likewise.
5517
5518 2017-05-24 Yao Qi <yao.qi@linaro.org>
5519
5520 * selftest-arch.c (tests_with_arch): Call registers_changed
5521 and reinit_frame_cache.
5522 * selftest.c (run_self_tests): Likewise.
5523
5524 2017-05-24 Yao Qi <yao.qi@linaro.org>
5525
5526 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
5527 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
5528
5529 2017-05-24 Yao Qi <yao.qi@linaro.org>
5530
5531 * rl78-tdep.c (rl78_gdbarch_init): Don't call
5532 set_gdbarch_print_insn.
5533
5534 2017-05-24 Yao Qi <yao.qi@linaro.org>
5535
5536 * h8300-tdep.c (h8300_gdbarch_init): Don't call
5537 set_gdbarch_print_insn.
5538
5539 2017-05-24 Yao Qi <yao.qi@linaro.org>
5540
5541 * alpha-tdep.c (alpha_gdbarch_init): Don't call
5542 set_gdbarch_print_insn.
5543 * arc-tdep.c (arc_gdbarch_init): Likewise.
5544 * arch-utils.c: include dis-asm.h.
5545 (default_print_insn): New function.
5546 * arch-utils.h (default_print_insn): Declare.
5547 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
5548 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5549 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
5550 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
5551 * frv-tdep.c (frv_gdbarch_init): Likewise.
5552 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5553 * gdbarch.sh (print_insn): Use default_print_insn.
5554 * gdbarch.c: Regenerated.
5555 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
5556 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
5557 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5558 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
5559 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5560 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
5561 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
5562 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
5563 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
5564 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5565 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5566 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5567 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5568 * mt-tdep.c (mt_gdbarch_init): Likewise.
5569 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5570 * nios2-tdep.c (nios2_print_insn): Remove.
5571 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
5572 * rx-tdep.c (rx_gdbarch_init): Likewise.
5573 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5574 * score-tdep.c (score_print_insn): Remove.
5575 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
5576 * sh-tdep.c (sh_gdbarch_init): Likewise.
5577 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5578 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5579 * tic6x-tdep.c (tic6x_print_insn): Remove.
5580 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
5581 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
5582 * v850-tdep.c (v850_gdbarch_init): Likewise.
5583 * vax-tdep.c (vax_gdbarch_init): Likewise.
5584 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
5585 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
5586
5587 2017-05-23 John Baldwin <jhb@FreeBSD.org>
5588
5589 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
5590 (MIPS_FP0_REGNUM): Remove.
5591 (MIPS_FSR_REGNUM): Remove.
5592 (mips_fbsd_supply_fpregs): Use mips_regnum.
5593 (mips_fbsd_supply_gregs): Likewise.
5594 (mips_fbsd_collect_fpregs): Likewise.
5595 (mips_fbsd_collect_gregs): Likewise.
5596
5597 2017-05-23 John Baldwin <jhb@FreeBSD.org>
5598
5599 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
5600 (getpfpregs_supplies): New function.
5601 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
5602 getfpregs_supplies.
5603 (mips_fbsd_store_inferior_registers): Likewise.
5604
5605 2017-05-22 Pedro Alves <palves@redhat.com>
5606
5607 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
5608 maintainer.
5609
5610 2017-05-22 Alan Hayward <alan.hayward@arm.com>
5611
5612 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
5613 (store_register): Likewise.
5614 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
5615 (get_decimal_float_return_value): Likewise.
5616 (do_ppc_sysv_return_value): Likewise.
5617 (ppc64_sysv_abi_push_integer): Likewise.
5618 (ppc64_sysv_abi_push_freg): Likewise.
5619 (ppc64_sysv_abi_return_value_base): Likewise.
5620 (ppc64_sysv_abi_return_value): Likewise.
5621 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
5622 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
5623 * rs6000-nat.c: Likewise.
5624 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
5625 (rs6000_value_to_register): Likewise.
5626 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
5627
5628 2017-05-21 Tom Tromey <tom@tromey.com>
5629
5630 PR rust/21466:
5631 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
5632 arrays as "[T]", not "[T; ]".
5633
5634 2017-05-19 Tom Tromey <tom@tromey.com>
5635
5636 PR rust/21484:
5637 * rust-lang.c (exp_descriptor_rust): New function.
5638 (rust_language_defn): Use it.
5639 * p-lang.c (pascal_language_defn): Update.
5640 * opencl-lang.c (opencl_language_defn): Update.
5641 * objc-lang.c (objc_language_defn): Update.
5642 * m2-lang.c (m2_language_defn): Update.
5643 * language.h (struct language_defn)
5644 <la_watch_location_expression>: New member.
5645 * language.c (unknown_language_defn, auto_language_defn)
5646 (local_language_defn): Update.
5647 * go-lang.c (go_language_defn): Update.
5648 * f-lang.c (f_language_defn): Update.
5649 * d-lang.c (d_language_defn): Update.
5650 * c-lang.h (c_watch_location_expression): Declare.
5651 * c-lang.c (c_watch_location_expression): New function.
5652 (c_language_defn, cplus_language_defn, asm_language_defn)
5653 (minimal_language_defn): Use it.
5654 * breakpoint.c (watch_command_1): Call
5655 la_watch_location_expression.
5656 * ada-lang.c (ada_language_defn): Update.
5657
5658 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5659
5660 PR tui/21482
5661 * gdb_curses.h (NOMACROS): Define.
5662 (NCURSES_NOMACROS): Define.
5663
5664 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5665
5666 PR tui/21482
5667 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
5668 arg to char *.
5669 * tui/tui-wingeneral.c (box_win): Likewise.
5670 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
5671 (tui_show_source_line): Likewise.
5672 (tui_show_exec_info_content): Likewise.
5673
5674 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
5675
5676 * sparc-tdep.c (sparc_structure_return_p)
5677 (sparc_arg_on_registers_p): New functions.
5678 (sparc32_store_arguments): Use them.
5679 * sparc64-tdep.c (sparc64_16_byte_align_p)
5680 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
5681 Handle TYPE_CODE_ARRAY.
5682
5683 2017-05-17 Yao Qi <yao.qi@linaro.org>
5684
5685 * cli/cli-decode.c (add_alias_cmd): New function.
5686 * command.h (add_alias_cmd): Declare.
5687 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
5688 instead call add_alias_cmd.
5689
5690 2017-05-17 Pedro Alves <palves@redhat.com>
5691
5692 * Makefile.in (nat_extra_makefile_frag): Rename to ...
5693 (nat_makefile_frag): ... this. All references updated.
5694 * configure.ac: Likewise.
5695 * configure.nat: Likewise. Enhance comments.
5696 * configure: Regenerate.
5697
5698 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5699
5700 * procfs.c (procfs_create_inferior): Change prototype to match
5701 definition.
5702
5703 2017-05-13 Eli Zaretskii <eliz@gnu.org>
5704
5705 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
5706 C++ compiler warning.
5707
5708 2017-05-12 Tom Tromey <tom@tromey.com>
5709
5710 PR rust/21483:
5711 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
5712 recurse, just call value_struct_elt directly.
5713
5714 2017-05-12 Tom Tromey <tom@tromey.com>
5715
5716 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
5717 OP_RUST_ARRAY>: Fix.
5718
5719 2017-05-12 Tom Tromey <tom@tromey.com>
5720
5721 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
5722
5723 2017-05-09 Yao Qi <yao.qi@linaro.org>
5724
5725 * regcache.c: Include <forward_list>.
5726 (struct regcache_list): Remove.
5727 (current_regcache): Update.
5728 (get_thread_arch_aspace_regcache): Update for std::forward_list.
5729 (regcache_thread_ptid_changed): Likewise.
5730 (registers_changed_ptid): Likewise.
5731 (current_regcache_size): Likewise.
5732
5733 2017-05-09 Yao Qi <yao.qi@linaro.org>
5734
5735 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
5736 (current_regcache_size): New function.
5737 (current_regcache_test): New function.
5738 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
5739
5740 2017-05-08 Alan Hayward <alan.hayward@arm.com>
5741
5742 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
5743 (print_gp_register_row): Use get_frame_register_value.
5744
5745 2017-05-08 Alan Hayward <alan.hayward@arm.com>
5746
5747 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
5748 (mips_supply_fpregset): Likewise.
5749 (mips64_supply_gregset): Likewise.
5750
5751 2017-05-08 Alan Hayward <alan.hayward@arm.com>
5752
5753 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
5754 regcache->raw_supply_zeroed.
5755
5756 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
5757
5758 * configure.nat: Rearrange 'case' statements to match
5759 host before cpu.
5760
5761 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
5762
5763 * Makefile.in: Remove "@host_makefile_frag@". Add variables
5764 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
5765 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
5766 "@nat_extra_makefile_frag@".
5767 (Makefile): Remove dependency on "@frags@".
5768 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
5769 (data-directory/Makefile): Likewise.
5770 * config/aarch64/linux.mh: Deleted; moved contents to
5771 "gdb/configure.nat".
5772 * config/alpha/alpha-linux.mh: Likewise.
5773 * config/alpha/nbsd.mh: Likewise.
5774 * config/arm/linux.mh: Likewise.
5775 * config/arm/nbsdelf.mh: Likewise.
5776 * config/i386/cygwin.mh: Likewise.
5777 * config/i386/cygwin64.mh: Likewise.
5778 * config/i386/darwin.mh: Likewise.
5779 * config/i386/fbsd.mh: Likewise.
5780 * config/i386/fbsd64.mh: Likewise.
5781 * config/i386/go32.mh: Likewise.
5782 * config/i386/i386gnu.mh: Likewise.
5783 * config/i386/i386sol2.mh: Likewise.
5784 * config/i386/linux.mh: Likewise.
5785 * config/i386/linux64.mh: Likewise.
5786 * config/i386/mingw.mh: Likewise.
5787 * config/i386/mingw64.mh: Likewise.
5788 * config/i386/nbsd64.mh: Likewise.
5789 * config/i386/nbsdelf.mh: Likewise.
5790 * config/i386/nto.mh: Likewise.
5791 * config/i386/obsd.mh: Likewise.
5792 * config/i386/obsd64.mh: Likewise.
5793 * config/i386/sol2-64.mh: Likewise.
5794 * config/ia64/linux.mh: Likewise.
5795 * config/m32r/linux.mh: Likewise.
5796 * config/m68k/linux.mh: Likewise.
5797 * config/m68k/nbsdelf.mh: Likewise.
5798 * config/m68k/obsd.mh: Likewise.
5799 * config/m88k/obsd.mh: Likewise.
5800 * config/mips/fbsd.mh: Likewise.
5801 * config/mips/linux.mh: Likewise.
5802 * config/mips/nbsd.mh: Likewise.
5803 * config/mips/obsd64.mh: Likewise.
5804 * config/pa/linux.mh: Likewise.
5805 * config/pa/nbsd.mh: Likewise.
5806 * config/pa/obsd.mh: Likewise.
5807 * config/powerpc/aix.mh: Likewise.
5808 * config/powerpc/fbsd.mh: Likewise.
5809 * config/powerpc/linux.mh: Likewise.
5810 * config/powerpc/nbsd.mh: Likewise.
5811 * config/powerpc/obsd.mh: Likewise.
5812 * config/powerpc/ppc64-linux.mh: Likewise.
5813 * config/powerpc/spu-linux.mh: Likewise.
5814 * config/s390/linux.mh: Likewise.
5815 * config/sh/nbsd.mh: Likewise.
5816 * config/sparc/fbsd.mh: Likewise.
5817 * config/sparc/linux.mh: Likewise.
5818 * config/sparc/linux64.mh: Likewise.
5819 * config/sparc/nbsd64.mh: Likewise.
5820 * config/sparc/nbsdelf.mh: Likewise.
5821 * config/sparc/obsd64.mh: Likewise.
5822 * config/sparc/sol2.mh: Likewise.
5823 * config/tilegx/linux.mh: Likewise.
5824 * config/vax/nbsdelf.mh: Likewise.
5825 * config/vax/obsd.mh: Likewise.
5826 * config/xtensa/linux.mh: Likewise.
5827 * config/i386/i386gnu.mn: New file, with excerpts from
5828 "config/i386/i386gnu.mh".
5829 * configure: Regenerate.
5830 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
5831 *.mh files under "gdb/config".
5832 * configure.nat: New file, with contents from the
5833 "gdb/config/*/*.mh" files.
5834
5835 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
5836
5837 * btrace.c (btrace_clear): Free insn vector.
5838
5839 2017-05-05 Pedro Alves <palves@redhat.com>
5840
5841 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
5842 * configure: Regenerate.
5843
5844 2017-05-04 Pedro Alves <palves@redhat.com>
5845
5846 * Makefile.in (SFILES): Add progspace-and-thread.c.
5847 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
5848 (COMMON_OBS): Add progspace-and-thread.o.
5849 * breakpoint.c: Include "progspace-and-thread.h".
5850 (update_inserted_breakpoint_locations)
5851 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
5852 Use scoped_restore_current_pspace_and_thread.
5853 (create_std_terminate_master_breakpoint): Use
5854 scoped_restore_current_program_space.
5855 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
5856 (print_breakpoint_location): Use
5857 scoped_restore_current_program_space.
5858 (bp_loc_is_permanent): Use
5859 scoped_restore_current_pspace_and_thread.
5860 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
5861 (download_tracepoint_locations): Use
5862 scoped_restore_current_pspace_and_thread.
5863 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
5864 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
5865 (enum step_over_calls_kind): Moved from inferior.h.
5866 (class scoped_restore_current_thread): New class.
5867 * gdbthread.h (make_cleanup_restore_current_thread): Delete
5868 declaration.
5869 (scoped_restore_current_thread): New class.
5870 * infcmd.c: Include "common/gdb_optional.h".
5871 (continue_1, proceed_after_attach): Use
5872 scoped_restore_current_thread.
5873 (notice_new_inferior): Use scoped_restore_current_thread.
5874 * inferior.c: Include "progspace-and-thread.h".
5875 (restore_inferior, save_current_inferior): Delete.
5876 (add_inferior_command, clone_inferior_command): Use
5877 scoped_restore_current_pspace_and_thread.
5878 * inferior.h (scoped_restore_current_inferior): New class.
5879 * infrun.c: Include "progspace-and-thread.h" and
5880 "common/gdb_optional.h".
5881 (follow_fork_inferior): Use
5882 scoped_restore_current_pspace_and_thread.
5883 (scoped_restore_exited_inferior): New class.
5884 (handle_vfork_child_exec_or_exit): Use
5885 scoped_restore_exited_inferior,
5886 scoped_restore_current_pspace_and_thread,
5887 scoped_restore_current_thread and scoped_restore.
5888 (fetch_inferior_event): Use scoped_restore_current_thread.
5889 * linespec.c (decode_line_full, decode_line_1): Use
5890 scoped_restore_current_program_space.
5891 * mi/mi-main.c: Include "progspace-and-thread.h".
5892 (exec_continue): Use scoped_restore_current_thread.
5893 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
5894 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
5895 * proc-service.c (ps_pglobal_lookup): Use
5896 scoped_restore_current_program_space.
5897 * progspace-and-thread.c: New file.
5898 * progspace-and-thread.h: New file.
5899 * progspace.c (release_program_space, clone_program_space): Use
5900 scoped_restore_current_program_space.
5901 (restore_program_space, save_current_program_space)
5902 (save_current_space_and_thread): Delete.
5903 (switch_to_program_space_and_thread): Moved to
5904 progspace-and-thread.c.
5905 * progspace.h (save_current_program_space)
5906 (save_current_space_and_thread): Delete declarations.
5907 (scoped_restore_current_program_space): New class.
5908 * remote.c (remote_btrace_maybe_reopen): Use
5909 scoped_restore_current_thread.
5910 * symtab.c: Include "progspace-and-thread.h".
5911 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
5912 * thread.c (print_thread_info_1): Use
5913 scoped_restore_current_thread.
5914 (struct current_thread_cleanup): Delete.
5915 (do_restore_current_thread_cleanup)
5916 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
5917 (scoped_restore_current_thread::~scoped_restore_current_thread):
5918 ... this new dtor.
5919 (make_cleanup_restore_current_thread): Rename/convert to ...
5920 (scoped_restore_current_thread::scoped_restore_current_thread):
5921 ... this new ctor.
5922 (thread_apply_all_command): Use scoped_restore_current_thread.
5923 (thread_apply_command): Use scoped_restore_current_thread.
5924 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
5925 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
5926
5927 2017-05-04 Pedro Alves <palves@redhat.com>
5928
5929 * thread.c (make_cleanup_restore_current_thread): Move
5930 find_thread_ptid call before the is_stopped call. Assert that the
5931 thread is found. Replace is_stopped call by checking the thread's
5932 state directly. Remove unnecessary NULL-thread check.
5933
5934 2017-05-04 Pedro Alves <palves@redhat.com>
5935
5936 * corelow.c (thread_section_name): New class.
5937 (get_core_register_section, get_core_siginfo): Use it.
5938
5939 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
5940
5941 * corelow.c (sniff_core_bfd): Remove extra semicolon.
5942 (get_core_register_section): Remove xfree of NULL pointer.
5943
5944 2017-05-03 Alan Hayward <alan.hayward@arm.com>
5945
5946 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
5947 * regcache.c (regcache::raw_supply_zeroed): New function.
5948 * regcache.h (regcache::raw_supply_zeroed): New declaration.
5949
5950 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
5951
5952 * gdbarch.sh: Remove commented out definition of
5953 TARGET_CHAR_BIT.
5954 * gdbarch.h: Re-generate.
5955
5956 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
5957
5958 * configure: Regenerate.
5959
5960 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
5961
5962 * solib-target.c (solib_target_relocate_section_addresses):
5963 Remove num_section_bases, num_bases, segment_bases variables.
5964
5965 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
5966
5967 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
5968
5969 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
5970
5971 * solib-target.c: Include <vector>
5972 (struct lm_info_target) <~lm_info_target>: Remove.
5973 <segment_bases, section_bases>: Change type to
5974 std::vector<CORE_ADDR>.
5975 (library_list_start_segment, library_list_start_section,
5976 library_list_end_library,
5977 solib_target_relocate_section_addresses): Adjust.
5978
5979 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
5980
5981 * gdbarch.sh (software_single_step): Change return type to
5982 std::vector<CORE_ADDR>.
5983 * gdbarch.c, gdbarch.h: Re-generate.
5984 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
5985 Adjust.
5986 (arm_deal_with_atomic_sequence_raw): Adjust.
5987 (thumb_get_next_pcs_raw): Adjust.
5988 (arm_get_next_pcs_raw): Adjust.
5989 (arm_get_next_pcs): Adjust.
5990 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
5991 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
5992 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
5993 (alpha_software_single_step): Adjust.
5994 * alpha-tdep.h (alpha_software_single_step): Adjust.
5995 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
5996 * arm-tdep.c (arm_software_single_step): Adjust.
5997 (arm_breakpoint_kind_from_current_state): Adjust.
5998 * arm-tdep.h (arm_software_single_step): Adjust.
5999 * breakpoint.c (insert_single_step_breakpoint): Adjust.
6000 * cris-tdep.c (cris_software_single_step): Adjust.
6001 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
6002 (micromips_deal_with_atomic_sequence): Adjust.
6003 (deal_with_atomic_sequence): Adjust.
6004 (mips_software_single_step): Adjust.
6005 * mips-tdep.h (mips_software_single_step): Adjust.
6006 * moxie-tdep.c (moxie_software_single_step): Adjust.
6007 * nios2-tdep.c (nios2_software_single_step): Adjust.
6008 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
6009 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
6010 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
6011 * s390-linux-tdep.c (s390_software_single_step): Adjust.
6012 * sparc-tdep.c (sparc_software_single_step): Adjust.
6013 * spu-tdep.c (spu_software_single_step): Adjust.
6014 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
6015
6016 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6017
6018 * gdbarch.sh: Use semi-colon as field separator instead of colon.
6019 * gdbarch.h: Re-generate.
6020
6021 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6022
6023 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
6024 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
6025 * python/py-instruction.c, python/py-instruction.h: New file.
6026 * python/py-record.c: Add py-instruction.h include.
6027 (gdbpy_initialize_record): Make gdb.Instruction a super class of
6028 gdb.RecordInstruction.
6029 * python/python-internal.h: Add gdbpy_initialize_instruction
6030 declaration.
6031 * python/python.c (do_start_initialization): Add
6032 gdbpy_initialize_instruction.
6033
6034 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6035
6036 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
6037 Remove.
6038 (btrace_func_from_recpy_func): New function.
6039 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
6040 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
6041 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
6042 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
6043 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
6044 Also, use new helper functions.
6045 (btpy_list_item): Use new helper functions.
6046 (recpy_bt_function_call_history): Use new type name.
6047 (btpy_call_getset): Remove.
6048 (gdbpy_initialize_btrace): Remove code to initialize
6049 gdb.BtraceFunctionCall.
6050 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
6051 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
6052 recpy_bt_func_prev, recpy_bt_func_next): New export.
6053 * python/py-record.c (recpy_func_type): New static object.
6054 (recpy_func_new, recpy_func_level, recpy_func_symbol,
6055 recpy_func_instructions, recpy_func_up, recpy_func_prev,
6056 recpy_func_next): New function.
6057 (recpy_element_hash, recpy_element_richcompare): Updated comment.
6058 (recpy_func_getset): New static object.
6059 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
6060 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
6061
6062 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6063
6064 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
6065 (btpy_object, btpy_insn_type, btpy_new): Remove.
6066 (btpy_list_object): Use gdb.RecordInstruction type instead of
6067 gdb.BtraceInstruction type.
6068 (btrace_insn_from_recpy_insn): New function.
6069 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
6070 btpy_new.
6071 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
6072 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
6073 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
6074 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
6075 instead of btpy_object.
6076 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6077 btpy_insn_data, btpy_insn_decode): Rename to ...
6078 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
6079 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
6080 recpy_bt_insn_decode): This. Also, use new helper functions.
6081 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
6082 recpy_insn_type.
6083 (btpy_insn_getset): Remove.
6084 (gdbpy_initialize_btrace): Remove code to initialize
6085 gdb.BtraceInstruction. Use recpy_element_object.
6086 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
6087 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
6088 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
6089 * python/py-record.c (recpy_insn_type): New static object.
6090 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
6091 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
6092 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
6093 New function.
6094 (recpy_insn_getset): New static object.
6095 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
6096 * python/py-record.h (recpy_element_object): New typedef.
6097 (recpy_insn_type, recpy_insn_new): New export.
6098
6099 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6100
6101 * py-record-btrace.c (btpy_insn_new): Removed.
6102 (btpy_insn_or_gap_new): New function.
6103 (btpy_insn_error): Removed.
6104 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6105 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
6106 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
6107 btpy_insn_or_gap_new instead of btpy_insn_new.
6108 (btpy_insn_getset): Remove btpy_insn_error.
6109 * py-record.c (recpy_gap_type): New static object.
6110 (recpy_gap_object): New typedef.
6111 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
6112 recpy_gap_reason_string): New function.
6113 (recpy_gap_getset): New static object.
6114 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
6115 * py-record.h (recpy_gap_new): New export.
6116
6117 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6118
6119 * python/py-record.c (recpy_ptid): Remove.
6120 (recpy_record_getset): Remove recpy_ptid.
6121
6122 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6123
6124 * btrace.c (btrace_fetch): Set inferior_ptid.
6125 * python/py-record-btrace.c: Add "py-record.h" include.
6126 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
6127 recpy_bt_end, recpy_bt_instruction_history,
6128 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
6129 in gdb.Record object instead of current ptid.
6130 * python/py-record.c: Include new "py-record.h" file.
6131 (recpy_record_object): Moved to py-record.h.
6132 * python/py-record.h: New file.
6133
6134 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
6135
6136 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
6137 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
6138 indentation.
6139
6140 2017-05-01 Joel Brobecker <brobecker@adacore.com>
6141
6142 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
6143 the past maintainers section.
6144
6145 2017-04-28 Yao Qi <yao.qi@linaro.org>
6146
6147 * infcmd.c (get_return_value): Use regcache ctor, and remove
6148 cleanup.
6149
6150 2017-04-28 Yao Qi <yao.qi@linaro.org>
6151 Pedro Alves <palves@redhat.com>
6152
6153 * regcache.c (regcache::regcache): New tag dispatch ctor.
6154 (do_cooked_read): Moved above.
6155 (regcache_dup): Use the tag dispatch ctor..
6156 * regcache.h (regcache): Declare ctor, delete copy ctor and
6157 assignment operator, remove friend regcache_dup.
6158
6159 2017-04-28 Yao Qi <yao.qi@linaro.org>
6160
6161 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
6162 call method save instead of regcache_cpy.
6163 * regcache.h (struct regcache): Make regcache_dup a friend.
6164
6165 2017-04-28 Yao Qi <yao.qi@linaro.org>
6166
6167 * regcache.c (struct regcache): Move to regcache.h
6168 (regcache::arch): New method.
6169 (regcache_get_ptid): Update.
6170 (get_regcache_arch): Call arch method.
6171 (get_regcache_aspace): Call method aspace.
6172 (register_buffer): Change it to method.
6173 (regcache_save): Change it to regcache::save.
6174 (regcache_restore): Likewise.
6175 (regcache_cpy_no_passthrough): Remove the declaration.
6176 (regcache_cpy): Call methods restore and cpy_no_passthrough.
6177 (regcache_cpy_no_passthrough): Change it to method
6178 cpy_no_passthrough.
6179 (regcache_register_status): Change it to method
6180 get_register_status.
6181 (regcache_invalidate): Change it to method invalidate.
6182 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
6183 (regcache_raw_update): Change it to method raw_update.
6184 (regcache_raw_read): Likewise.
6185 (regcache_raw_read_signed): Likewise.
6186 (regcache_raw_read_unsigned): Likewise.
6187 (regcache_raw_write_signed): Likewise.
6188 (regcache_raw_write_unsigned): Likewise.
6189 (regcache_cooked_read): Likewise.
6190 (regcache_cooked_read_value): Likewise.
6191 (regcache_cooked_read_signed): Likewise.
6192 (regcache_cooked_read_unsigned): Likewise.
6193 (regcache_cooked_write_signed): Likewise.
6194 (regcache_cooked_write_unsigned): Likewise.
6195 (regcache_raw_set_cached_value): Likewise.
6196 (regcache_raw_write): Likewise.
6197 (regcache_cooked_write): Likewise.
6198 (regcache_xfer_part): Likewise.
6199 (regcache_raw_read_part): Likewise.
6200 (regcache_raw_write_part): Likewise.
6201 (regcache_cooked_read_part): Likewise.
6202 (regcache_cooked_write_part): Likewise.
6203 (regcache_raw_supply): Likewise.
6204 (regcache_raw_collect): Likewise.
6205 (regcache_transfer_regset): Likewise.
6206 (regcache_supply_regset): Likewise.
6207 (regcache_collect_regset): Likewise.
6208 (regcache_debug_print_register): Likewise.
6209 (enum regcache_dump_what): Move it to regcache.h.
6210 (regcache_dump): Change it to method dump.
6211 * regcache.h (enum regcache_dump_what): New.
6212 (class regcache): New.
6213 * target.c (target_fetch_registers): Call method
6214 debug_print_register.
6215 (target_store_registers): Likewise.
6216
6217 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6218
6219 * windows-nat.c (struct lm_info_windows): Initialize field.
6220 (windows_make_so): Allocate lm_info_windows with new.
6221 (windows_free_so): Free lm_info_windows with delete.
6222
6223 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6224
6225 * solib-darwin.c (struct lm_info_darwin): Initialize field.
6226 (darwin_current_sos): Allocate lm_info_darwin with new, remove
6227 cleanup.
6228 (darwin_free_so): Free lm_info_darwin with delete.
6229
6230 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6231
6232 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
6233 <l_addr_p>: Change type to bool.
6234 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
6235 (svr4_free_so): Free lm_info_svr4 with delete.
6236 (svr4_copy_library_list): Replace memcpy with call to copy
6237 constructor.
6238 (library_list_start_library, svr4_default_sos): Allocate
6239 lm_info_svr4 with new.
6240
6241 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6242
6243 * solib-target.c (struct lm_info_target): Add destructor,
6244 initialize fields.
6245 <name>: Change type to std::string.
6246 (library_list_start_library): Allocate lm_info_target with new.
6247 (solib_target_free_library_list): Free lm_info_target with
6248 delete.
6249 (solib_target_current_sos): Adapt to std::string.
6250 (solib_target_free_so): Free lm_info_target with delete.
6251
6252 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6253
6254 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
6255 fields.
6256 (frv_current_sos): Allocate lm_info_frv with new.
6257 (frv_relocate_main_executable): Free lm_info_frv with delete,
6258 allocate with new.
6259 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
6260
6261 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6262
6263 * solib-frv.c (struct lm_info_frv): Fix indentation.
6264
6265 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6266
6267 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
6268 map field.
6269 (dsbt_current_sos): Allocate lm_info_dsbt with new.
6270 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
6271 and allocate with new.
6272 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
6273
6274 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6275
6276 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
6277 <filename, member_name>: Change type to std::string.
6278 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
6279 (library_list_start_library): Allocate lm_info_aix with new.
6280 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
6281 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
6282 with copy constructor.
6283
6284 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6285
6286 * solist.h (struct lm_info): Remove.
6287 (struct lm_info_base): New class.
6288 (struct so_list) <lm_info>: Change type to lm_info_base *.
6289 * nto-tdep.c (struct lm_info): Remove.
6290 (lm_addr): Adjust.
6291 * solib-aix.c (struct lm_info): Rename to ...
6292 (struct lm_info_aix): ... this. Extend lm_info_base.
6293 (lm_info_p): Rename to ...
6294 (lm_info_aix_p): ... this, and adjust.
6295 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
6296 solib_aix_parse_libraries, library_list_start_library,
6297 solib_aix_free_library_list, solib_aix_parse_libraries,
6298 solib_aix_get_library_list,
6299 solib_aix_relocate_section_addresses, solib_aix_free_so,
6300 solib_aix_get_section_offsets,
6301 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
6302 Adjust.
6303 (struct solib_aix_inferior_data) <library_list>: Adjust.
6304 * solib-darwin.c (struct lm_info): Rename to ...
6305 (struct lm_info_darwin): ... this. Extend lm_info_base.
6306 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
6307 * solib-dsbt.c (struct lm_info): Rename to ...
6308 (struct lm_info_dsbt): ... this. Extend lm_info_base.
6309 (struct dsbt_info) <main_executable_lm_info): Adjust.
6310 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
6311 dsbt_relocate_section_addresses): Adjust.
6312 * solib-frv.c (struct lm_info): Rename to ...
6313 (struct lm_info_frv): ... this. Extend lm_info_base.
6314 (main_executable_lm_info): Adjust.
6315 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
6316 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
6317 find_canonical_descriptor_in_load_object,
6318 frv_fdpic_find_canonical_descriptor): Adjust.
6319 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
6320 to lm_info_svr4.
6321 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
6322 svr4_clear_so, svr4_copy_library_list,
6323 library_list_start_library, svr4_default_sos, svr4_read_so_list,
6324 svr4_current_sos, svr4_fetch_objfile_link_map,
6325 solist_update_incremental): Adjust.
6326 * solib-svr4.h (struct lm_info_svr4): Move here from
6327 solib-svr4.c.
6328 * solib-target.c (struct lm_info): Rename to ...
6329 (struct lm_info_target): ... this. Extend lm_info_base.
6330 (lm_info_p): Rename to ...
6331 (lm_info_target_p): ... this.
6332 (solib_target_parse_libraries, library_list_start_segment,
6333 library_list_start_section, library_list_start_library,
6334 library_list_end_library, solib_target_free_library_list,
6335 solib_target_current_sos, solib_target_free_so,
6336 solib_target_relocate_section_addresses): Adjust.
6337 * windows-nat.c (struct lm_info): Rename to ...
6338 (struct lm_info_windows): ... this. Extend lm_info_base.
6339 (windows_make_so, handle_load_dll, handle_unload_dll,
6340 windows_xfer_shared_libraries): Adjust.
6341
6342 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
6343
6344 * solib-darwin.c (struct darwin_so_list): Remove.
6345 (darwin_current_sos): Allocate an so_list object instead of a
6346 darwin_so_list, separately allocate an lm_info object.
6347 (darwin_free_so): Free lm_info.
6348
6349 2017-04-28 John Baldwin <jhb@FreeBSD.org>
6350
6351 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
6352 with fprintf_filtered.
6353
6354 2017-04-28 Yao Qi <yao.qi@linaro.org>
6355
6356 * regcache.c (regcache::regcache): New function.
6357 (regcache::~regcache): New function.
6358 (regcache_xmalloc_1): Remove.
6359 (regcache_xmalloc): Call new regcache.
6360 (regcache_xfree): Call delete regcache.
6361 (get_thread_arch_aspace_regcache): Call new regcache.
6362
6363 2017-04-28 Yao Qi <yao.qi@linaro.org>
6364
6365 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
6366 lwp instead of ptid_get_lwp.
6367
6368 2017-04-28 Yao Qi <yao.qi@linaro.org>
6369
6370 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
6371 lwp_info instead of getting from inferior_ptid.
6372
6373 2017-04-27 Keith Seitz <keiths@redhat.com>
6374
6375 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
6376 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
6377 (CV_CONVERSION_BADNESS): Define.
6378 (rank_one_type): Remove overly restrictive rvalue reference
6379 rank checks.
6380 Add cv-qualifier checks and subranks for type equality.
6381 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
6382 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
6383 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
6384
6385 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
6386
6387 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
6388 count when creating the object.
6389
6390 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
6391 Ulrich Weigand <uweigand@de.ibm.com>
6392
6393 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
6394 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
6395 is used in AIX.
6396 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
6397 (process_xcoff_symbol): Likewise.
6398 (scan_xcoff_symtab): Likewise.
6399
6400 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6401
6402 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
6403 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
6404 (ia64_access_reg): Use get_frame_register_unsigned.
6405 (ia64_access_rse_reg): Likewise.
6406 (ia64_libunwind_frame_prev_register): Likewise.
6407
6408 2017-04-26 Jiong Wang <jiong.wang@arm.com>
6409
6410 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
6411 * gdbarch.c: Regenerated.
6412 * gdbarch.h: Regenerated.
6413 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
6414 visibility external.
6415 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
6416 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
6417 (enum cfa_how_kind): Move to ...
6418 (struct dwarf2_frame_state_reg_info): Likewise.
6419 (struct dwarf2_frame_state): Likewise.
6420 * dwarf2-frame.h: ... here.
6421 (dwarf2_frame_state_alloc_regs): New declaration.
6422 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
6423 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
6424
6425 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6426
6427 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
6428 regcache_raw_read_unsigned.
6429 (xtensa_pseudo_register_write): Likewise.
6430
6431 2017-04-26 Alan Hayward <alan.hayward@arm.com>
6432
6433 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
6434 (nds32_pseudo_register_write): Likewise.
6435
6436 2017-04-25 Yao Qi <yao.qi@linaro.org>
6437
6438 * regcache.c (struct regcache) <readonly_p>: Change its type
6439 to bool.
6440 (regcache_xmalloc_1): Update parameter type and callers update.
6441
6442 2017-04-25 Yao Qi <yao.qi@linaro.org>
6443
6444 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
6445 set_gdbarch_wchar_bit.
6446 * arm-tdep.c (arm_gdbarch_init): Likewise.
6447
6448 2017-04-25 Pedro Alves <palves@redhat.com>
6449
6450 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
6451 (BothAreRelocatable, memcopy, memmove): Don't define.
6452 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
6453 macros.
6454
6455 2017-04-25 Pedro Alves <palves@redhat.com>
6456
6457 * common/common-defs.h: Include "common/poison.h".
6458 * common/function-view.h: (Not, Or, Requires): Move to traits.h
6459 and adjust.
6460 * common/poison.h: New file.
6461 * common/traits.h: Include <type_traits>.
6462 (Not, Or, Requires): New, moved from common/function-view.h.
6463
6464 2017-04-25 Pedro Alves <palves@redhat.com>
6465
6466 * breakpoint.h (struct breakpoint): In-class initialize all
6467 fields. Make boolean fields "bool".
6468 * breakpoint.c (init_raw_breakpoint_without_location): Remove
6469 memset call and initializations no longer necessary.
6470
6471 2017-04-25 Pedro Alves <palves@redhat.com>
6472
6473 * btrace.c (pt_btrace_insn_flags): Change parameter type to
6474 reference.
6475 (pt_btrace_insn): New function.
6476 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
6477
6478 2017-04-25 Pedro Alves <palves@redhat.com>
6479
6480 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
6481 "base" field and inherit from "bp_location" instead. Add
6482 non-default ctor.
6483 (allocate_location_exception): Use new non-default ctor.
6484 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
6485 (init_bp_location): Convert to ...
6486 (bp_location::bp_location): ... this new ctor, and remove memset
6487 call.
6488 (base_breakpoint_allocate_location): Use the new non-default ctor.
6489 * breakpoint.h (bp_location): Now a class. Declare default and
6490 non-default ctors. In-class initialize all members.
6491 (init_bp_location): Remove declaration.
6492
6493 2017-04-25 Pedro Alves <palves@redhat.com>
6494
6495 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
6496 assignment operator.
6497
6498 2017-04-24 Yao Qi <yao.qi@linaro.org>
6499
6500 * doublest.c (convert_doublest_to_floatformat): Call
6501 floatformat_totalsize_bytes.
6502
6503 2017-04-22 Tom Tromey <tom@tromey.com>
6504
6505 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6506 ui_out_emit_list.
6507 * stack.c (print_frame): Use ui_out_emit_list.
6508 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6509 ui_out_emit_list.
6510 * mi/mi-main.c (print_one_inferior)
6511 (mi_cmd_data_list_register_names)
6512 (mi_cmd_data_list_register_values, mi_cmd_list_features)
6513 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
6514 ui_out_emit_list.
6515 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
6516 (mi_output_solib_attribs): Use ui_out_emit_list,
6517 ui_out_emit_tuple.
6518 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
6519 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
6520 (mi_cmd_stack_list_args, list_args_or_locals): Use
6521 ui_out_emit_list.
6522 * disasm.c (do_assembly_only): Use ui_out_emit_list.
6523 * breakpoint.c (print_solib_event, output_thread_groups): Use
6524 ui_out_emit_list.
6525
6526 2017-04-22 Tom Tromey <tom@tromey.com>
6527
6528 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
6529 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
6530 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
6531
6532 2017-04-22 Tom Tromey <tom@tromey.com>
6533
6534 * tracepoint.c (tvariables_info_1)
6535 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
6536
6537 2017-04-22 Tom Tromey <tom@tromey.com>
6538
6539 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
6540 annotate_arg_emitter.
6541 * breakpoint.c (print_mention_watchpoint)
6542 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
6543 * annotate.h (struct annotate_arg_emitter): New.
6544
6545 2017-04-22 Tom Tromey <tom@tromey.com>
6546
6547 * record-btrace.c (record_btrace_insn_history)
6548 (record_btrace_insn_history_range, record_btrace_call_history)
6549 (record_btrace_call_history_range): Use ui_out_emit_tuple.
6550 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
6551 ui_out_emit_tuple.
6552 * stack.c (print_frame_info): Use ui_out_emit_tuple.
6553 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
6554 * skip.c (skip_info): Use ui_out_emit_tuple.
6555 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
6556 * progspace.c (print_program_space): Use ui_out_emit_tuple.
6557 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
6558 * osdata.c (info_osdata): Use ui_out_emit_tuple.
6559 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6560 ui_out_emit_tuple.
6561 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
6562 (output_register, mi_cmd_data_read_memory)
6563 (mi_cmd_data_read_memory_bytes, mi_load_progress)
6564 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
6565 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
6566 Use ui_out_emit_tuple.
6567 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
6568 ui_out_emit_tuple.
6569 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
6570 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
6571 * linux-thread-db.c (info_auto_load_libthread_db): Use
6572 ui_out_emit_tuple.
6573 * inferior.c (print_inferior): Use ui_out_emit_tuple.
6574 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
6575 * disasm.c (do_mixed_source_and_assembly_deprecated)
6576 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
6577 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
6578 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
6579 * breakpoint.c (print_one_breakpoint_location)
6580 (print_one_breakpoint): Use ui_out_emit_tuple.
6581 * auto-load.c (print_script, info_auto_load_cmd): Use
6582 ui_out_emit_tuple.
6583 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
6584
6585 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
6586
6587 * thread.c (print_thread_info_1): Remove dead code.
6588
6589 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6590
6591 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
6592 GDB_SELF_TEST.
6593 * arm-tdep.c (selftests::arm_record_test): Likewise.
6594
6595 2017-04-21 Yao Qi <yao.qi@linaro.org>
6596
6597 * regcache.c (regcache_restore): Remove argument 2. Replace
6598 argument 3 with regcache. Get register status from
6599 src->register_status and get register contents from
6600 register_buffer (src, regnum).
6601 (regcache_cpy): Update.
6602
6603 2017-04-19 Pedro Alves <palves@redhat.com>
6604
6605 * gdbthread.h (thread): Add missing closing parenthesis in
6606 comment.
6607
6608 2017-04-19 Pedro Alves <palves@redhat.com>
6609
6610 * common/refcounted-object.h: New file.
6611 * gdbthread.h: Include "common/refcounted-object.h".
6612 (thread_info): Inherit from refcounted_object and add comments.
6613 (thread_info::incref, thread_info::decref)
6614 (thread_info::m_refcount): Delete.
6615 (thread_info::deletable): Use the refcounted_object::refcount()
6616 method.
6617 * inferior.c (current_inferior_): Add comment.
6618 (set_current_inferior): Increment/decrement refcounts.
6619 (prune_inferiors, remove_inferior_command): Skip inferiors marked
6620 not-deletable instead of comparing with the current inferior.
6621 (initialize_inferiors): Increment the initial inferior's refcount.
6622 * inferior.h (struct inferior): Forward declare.
6623 Include "common/refcounted-object.h".
6624 (current_inferior, set_current_inferior): Move declaration to
6625 before struct inferior's definition, and fix comment.
6626 (inferior): Inherit from refcounted_object. Add comments.
6627 * thread.c (switch_to_thread_no_regs): Reference the thread's
6628 inferior pointer directly instead of doing a ptid lookup.
6629 (switch_to_no_thread): New function.
6630 (switch_to_thread(thread_info *)): New function, factored out
6631 from ...
6632 (switch_to_thread(ptid_t)): ... this.
6633 (restore_current_thread): Delete.
6634 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
6635 fields, and add 'inf' field.
6636 (do_restore_current_thread_cleanup): Check whether old->inf is
6637 alive instead of looking up an inferior by ptid. Use
6638 switch_to_thread and switch_to_no_thread.
6639 (restore_current_thread_cleanup_dtor): Use old->inf directly
6640 instead of lookup up an inferior by id. Decref the inferior.
6641 Don't restore 'removable'.
6642 (make_cleanup_restore_current_thread): Same the inferior pointer
6643 in old, instead of the inferior number. Incref the inferior.
6644 Don't save/clear 'removable'.
6645
6646 2017-04-19 Pedro Alves <palves@redhat.com>
6647
6648 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6649 unittests/scoped_restore-selftests.c.
6650 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
6651 * common/scoped_restore.h (scoped_restore_base): Make "class".
6652 (scoped_restore_base::release): New public method.
6653 (scoped_restore_base::scoped_restore_base): New protected ctor.
6654 (scoped_restore_base::m_saved_var): New protected field.
6655 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
6656 scoped_restore_base base class instead of m_saved_var directly.
6657 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
6658 (scoped_restore_tmpl::scoped_restore_tmpl(const
6659 scoped_restore_tmpl<T>&)): Likewise.
6660 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
6661 method.
6662 (scoped_restore_tmpl::saved_var): New method.
6663 (scoped_restore_tmpl::m_saved_var): Delete.
6664 * inferior.h (inferior::detaching): Now a bool.
6665 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
6666 cleanup.
6667 * unittests/scoped_restore-selftests.c: New file.
6668
6669 2017-04-19 Pedro Alves <palves@redhat.com>
6670
6671 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
6672 Re-sort in alphabetic order.
6673
6674 2017-04-18 Pedro Alves <palves@redhat.com>
6675
6676 * xml-support.c (obstack_xml_printf): Delete.
6677 * xml-support.h (obstack_xml_printf): Delete.
6678
6679 2017-04-18 Pedro Alves <palves@redhat.com>
6680
6681 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
6682 vdebug, verror, body_text, start_element, end_element, name,
6683 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
6684 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
6685 is_xinclude>: Make private and add m_ prefix.
6686 (gdb_xml_parser::body_text): New method, based on ...
6687 (gdb_xml_body_text): ... this. Adjust.
6688 (gdb_xml_parser::vdebug): New method, based on ...
6689 (gdb_xml_debug): ... this. Adjust.
6690 (gdb_xml_parser::verror): New method, based on ...
6691 (gdb_xml_error): ... this. Adjust.
6692 (gdb_xml_parser::start_element): New method, based on ...
6693 (gdb_xml_start_element): ... this. Adjust.
6694 (gdb_xml_start_element_wrapper): Defer to
6695 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
6696 (gdb_xml_parser::end_element): New method, based on ...
6697 (gdb_xml_end_element_wrapper): ... this. Adjust.
6698 (gdb_xml_parser::~gdb_xml_parser): Adjust.
6699 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
6700 (gdb_xml_parser::use_dtd): New method, based on ...
6701 (gdb_xml_use_dtd): ... this. Adjust.
6702 (gdb_xml_parser::parse): New method, based on ...
6703 (gdb_xml_parse): ... this. Adjust.
6704 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
6705 (xinclude_start_include): Adjust to call the parser's name method.
6706 (xml_xinclude_default, xml_xinclude_start_doctype)
6707 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
6708 method.
6709 (xml_process_xincludes): Adjust to call parser methods.
6710 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
6711 declarations.
6712
6713 2017-04-18 Pedro Alves <palves@redhat.com>
6714
6715 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
6716 gdb::optional<std::string>.
6717 * xml-support.c: Include <string>.
6718 (scope_level::scope_level(scope_level &&))
6719 (scope_level::~scope_level): Delete.
6720 (scope_level::body): Now a std::string.
6721 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
6722 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
6723 parameter.
6724 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
6725 (xinclude_parsing_data::output): Now a std::string reference.
6726 (xinclude_start_include): Adjust.
6727 (xml_xinclude_default): Adjust.
6728 (xml_process_xincludes): Add 'output' parameter, and return bool.
6729 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
6730 and return bool.
6731 * xml-tdesc.c: Include <unordered_map> and <string>.
6732 (tdesc_xml_cache): Delete.
6733 (tdesc_xml_cache_s): Delete.
6734 (xml_cache): Now an std::unordered_map.
6735 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
6736 (target_fetch_description_xml): Change return type to
6737 gdb::optional<std::string>, and adjust.
6738 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
6739 (target_fetch_description_xml): Change return type to
6740 gdb::optional<std::string>.
6741
6742 2017-04-18 Pedro Alves <palves@redhat.com>
6743
6744 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6745 unittests/optional-selftests.c.
6746 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
6747 * unittests/optional-selftests.c: New file.
6748 * unittests/optional/assignment/1.cc: New file.
6749 * unittests/optional/assignment/2.cc: New file.
6750 * unittests/optional/assignment/3.cc: New file.
6751 * unittests/optional/assignment/4.cc: New file.
6752 * unittests/optional/assignment/5.cc: New file.
6753 * unittests/optional/assignment/6.cc: New file.
6754 * unittests/optional/assignment/7.cc: New file.
6755 * unittests/optional/cons/copy.cc: New file.
6756 * unittests/optional/cons/default.cc: New file.
6757 * unittests/optional/cons/move.cc: New file.
6758 * unittests/optional/cons/value.cc: New file.
6759 * unittests/optional/in_place.cc: New file.
6760 * unittests/optional/observers/1.cc: New file.
6761 * unittests/optional/observers/2.cc: New file.
6762
6763 2017-04-18 Pedro Alves <palves@redhat.com>
6764
6765 * common/gdb_optional.h: Include common/traits.h.
6766 (in_place_t): New type.
6767 (in_place): New constexpr variable.
6768 (optional::optional): Remove member initialization of
6769 m_instantiated.
6770 (optional::optional(in_place_t...)): New constructor.
6771 (optional::~optional): Use reset.
6772 (optional::optional(const optional&)): New.
6773 (optional::optional(const optional&&)): New.
6774 (optional::optional(T &)): New.
6775 (optional::optional(T &&)): New.
6776 (operator::operator=(const optional &)): New.
6777 (operator::operator=(optional &&)): New.
6778 (operator::operator= (const T &))
6779 (operator::operator= (T &&))
6780 (operator::emplace (Args &&... args)): Return a T&. Use reset.
6781 (operator::reset): New.
6782 (operator::m_instantiated):: Add in-class initializer.
6783 * common/traits.h: Include <type_traits>.
6784 (struct And): New types.
6785
6786 2017-04-18 Pedro Alves <palves@redhat.com>
6787
6788 * xml-support.c: Include <vector>.
6789 (scope_level::scope_level(const gdb_xml_element *))
6790 (scope_level::scope_level(scope_level&&)): New.
6791 (scope_level::~scope_level): New.
6792 (scope_level_s): Delete.
6793 (gdb_xml_parser::scopes): Now a std::vector.
6794 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
6795 Use std::vector.
6796 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
6797 scope cleanup code.
6798 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
6799 of the scopes member. Use std::vector::emplace_back.
6800
6801 2017-04-18 Pedro Alves <palves@redhat.com>
6802
6803 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
6804 a bool.
6805 (gdb_xml_end_element): Change type of first parameter.
6806 (gdb_xml_cleanup): Rename to ...
6807 (gdb_xml_parser::~gdb_xml_parser): ... this.
6808 (gdb_xml_create_parser_and_cleanup): Delete with ...
6809 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
6810 to this new ctor.
6811 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
6812 using gdb_xml_create_parser_and_cleanup.
6813 (xinclude_parsing_data): Add ctor/dtor.
6814 (xml_xinclude_cleanup): Delete.
6815 (xml_process_xincludes): Create a local xinclude_parsing_data
6816 instead of heap-allocating one. Create a local gdb_xml_parser
6817 instead of heap-allocating one with
6818 gdb_xml_create_parser_and_cleanup.
6819
6820 2017-04-18 John Baldwin <jhb@FreeBSD.org>
6821
6822 PR threads/20743
6823 * fbsd-nat.c (resume_one_thread_cb): Remove.
6824 (resume_all_threads_cb): Remove.
6825 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
6826 iterate_over_threads.
6827
6828 2017-04-17 Joel Brobecker <brobecker@adacore.com>
6829
6830 * NEWS: Create a new section for the next release branch.
6831 Rename the section of the current branch, now that it has
6832 been cut.
6833
6834 2017-04-17 Joel Brobecker <brobecker@adacore.com>
6835
6836 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
6837 * version.in: Bump version to 8.0.50.DATE-git.
6838
6839 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
6840
6841 PR gdb/21385
6842 * windows-nat.c (windows_create_inferior): Declare 'allargs'
6843 independently of the host, and fix build breakage on Cygwin.
6844
6845 2017-04-13 Pedro Alves <palves@redhat.com>
6846
6847 * inferior.c (free_inferior): Convert to ...
6848 (inferior::~inferior): ... this dtor.
6849 (inferior::inferior): New ctor, factored out from ...
6850 (add_inferior_silent): ... here. Allocate the inferior with a new
6851 expression.
6852 (delete_inferior): Call delete instead of free_inferior.
6853 * inferior.h (gdb_environ, continuation): Forward declare.
6854 (inferior): Now a class. Add in-class initialization to all
6855 members. Make boolean fields bool, except 'detaching'.
6856 (inferior::inferior): New explicit ctor.
6857 (inferior::~inferior): New.
6858
6859 2017-04-13 Pedro Alves <palves@redhat.com>
6860
6861 * inferior.c (init_inferior_list): Delete.
6862 * inferior.h (init_inferior_list): Delete.
6863
6864 2017-04-13 Pedro Alves <palves@redhat.com>
6865
6866 PR threads/13217
6867 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
6868 (top level): Call it twice, with different thread sets.
6869
6870 2017-04-13 Pedro Alves <palves@redhat.com>
6871
6872 * thread.c: Include <algorithm>.
6873 (thread_array_cleanup): Delete.
6874 (scoped_inc_dec_ref): New class.
6875 (live_threads_count): New function.
6876 (set_thread_refcount): Delete.
6877 (tp_array_compar_ascending): Now a bool.
6878 (tp_array_compar): Convert to a std::sort comparison function.
6879 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
6880 and live_threads_count.
6881
6882 2017-04-13 Pedro Alves <palves@redhat.com>
6883
6884 * infrun.c (follow_fork_inferior): Also switch the current
6885 inferior.
6886
6887 2017-04-13 Pedro Alves <palves@redhat.com>
6888
6889 * breakpoint.c (watch_command_1): Save watchpoint-frame info
6890 before calling create_internal_breakpoint.
6891
6892 2017-04-13 Pedro Alves <palves@redhat.com>
6893
6894 * fork-child.c (execv_argv): New class.
6895 (breakup_args): Refactored as ...
6896 (execv_argv::init_for_no_shell): .. this method of execv_argv.
6897 Copy arguments to storage and replace separators with NULL
6898 terminators in place.
6899 (escape_bang_in_quoted_argument): Adjust to return bool.
6900 (execv_argv::execv_argv): New ctor.
6901 (execv_argv::init_for_shell): New method, factored out from
6902 fork_inferior. Don't strdup strings into the vector.
6903 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
6904 Remove free_vector_argv call.
6905
6906 2017-04-13 Yao Qi <yao.qi@linaro.org>
6907
6908 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
6909 tdep->rx_psw_type.
6910
6911 2017-04-13 Yao Qi <yao.qi@linaro.org>
6912
6913 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
6914 * rx-tdep.c (rx_gdbarch_init): Likewise.
6915
6916 2017-04-13 Pedro Alves <palves@redhat.com>
6917
6918 * breakpoint.h (struct breakpoint): Reindent.
6919
6920 2017-04-13 Pedro Alves <palves@redhat.com>
6921
6922 * breakpoint.c (bp_location): Rename to ...
6923 (bp_locations): ... this. All references updated.
6924 (bp_location_count): Rename to ...
6925 (bp_locations_count): ... this. All references updated.
6926 (bp_location_placed_address_before_address_max): Rename to ...
6927 (bp_locations_placed_address_before_address_max): ... this. All
6928 references updated.
6929 (bp_location_shadow_len_after_address_max): Rename to ...
6930 (bp_locations_shadow_len_after_address_max): ... this. All
6931 references updated.
6932 (bp_location_compare_addrs): Rename to ...
6933 (bp_locations_compare_addrs): ... this. All references updated.
6934 (bp_location_compare):Rename to ...
6935 (bp_locations_compare): ... this. All references updated.
6936 (bp_location_target_extensions_update): Rename to ...
6937 (bp_locations_target_extensions_update): ... this. All references
6938 updated.
6939
6940 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
6941
6942 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
6943 * common/common.m4: Check headers 'termios.h', 'termio.h' and
6944 'sgtty.h'.
6945 * common/gdb_termios.h: New file, with parts of "terminal.h".
6946 * inflow.c: Include "gdb_termios.h".
6947 * ser-unix.c: Include "gdb_termios.h".
6948 * terminal.h: Move terminal-related defines to
6949 "common/gdb_termios.h".
6950
6951 2017-04-12 Tom Tromey <tom@tromey.com>
6952
6953 * probe.c (parse_probes): Update.
6954 * location.h (delete_event_location): Don't declare.
6955 (event_location_deleter::operator()): Update.
6956 * location.c (event_location_deleter::operator()): Rename from
6957 delete_event_location.
6958 * linespec.h (linespec_result) <location>: Change type to
6959 event_location_up.
6960 * linespec.c (canonicalize_linespec, event_location_to_sals)
6961 (decode_objc): Update.
6962 (linespec_result): Don't call delete_event_location.
6963 * breakpoint.c (create_breakpoints_sal)
6964 (bkpt_probe_create_sals_from_location)
6965 (strace_marker_create_sals_from_location): Update.
6966
6967 2017-04-12 Tom Tromey <tom@tromey.com>
6968
6969 * linespec.h (struct linespec_result): Add constructor and
6970 destructor.
6971 (init_linespec_result, destroy_linespec_result)
6972 (make_cleanup_destroy_linespec_result): Don't declare.
6973 * linespec.c (init_linespec_result): Remove.
6974 (linespec_result::~linespec_result): Rename from
6975 destroy_linespec_result. Update.
6976 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
6977 Remove.
6978 * breakpoint.c (create_breakpoint, break_range_command)
6979 (decode_location_default): Update.
6980 * ax-gdb.c (agent_command_1): Update.
6981
6982 2017-04-12 Tom Tromey <tom@tromey.com>
6983
6984 * remote.c (remote_download_tracepoint): Update.
6985 * python/py-breakpoint.c (bppy_get_location): Update.
6986 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
6987 (gdbscm_breakpoint_location): Update.
6988 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
6989 * breakpoint.h (struct breakpoint) <location, location_range_end>:
6990 Change type to event_location_up.
6991 * breakpoint.c (create_overlay_event_breakpoint)
6992 (create_longjmp_master_breakpoint)
6993 (create_std_terminate_master_breakpoint)
6994 (create_exception_master_breakpoint)
6995 (breakpoint_event_location_empty_p, print_breakpoint_location)
6996 (print_one_breakpoint_location, create_thread_event_breakpoint)
6997 (init_breakpoint_sal, create_breakpoint)
6998 (print_recreate_ranged_breakpoint, break_range_command)
6999 (init_ada_exception_breakpoint, say_where): Update.
7000 (base_breakpoint_dtor): Don't call delete_event_location.
7001 (bkpt_print_recreate, tracepoint_print_recreate)
7002 (dprintf_print_recreate, update_static_tracepoint)
7003 (breakpoint_re_set_default): Update.
7004
7005 2017-04-12 Tom Tromey <tom@tromey.com>
7006
7007 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
7008 type of "to_do". Update.
7009 (compute_stack_depth): Use std::vector.
7010
7011 2017-04-12 Tom Tromey <tom@tromey.com>
7012
7013 * printcmd.c (find_instruction_backward): Use std::vector.
7014
7015 2017-04-12 Tom Tromey <tom@tromey.com>
7016
7017 * symfile.c (objfilep): Remove typedef.
7018 (reread_symbols): Use a std::vector.
7019
7020 2017-04-12 Tom Tromey <tom@tromey.com>
7021
7022 * mi/mi-main.c (exec_direction_forward): Remove.
7023 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
7024 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7025 scoped_restore.
7026 * guile/guile.c (guile_repl_command, guile_command)
7027 (gdbscm_execute_gdb_command): Use scoped_restore.
7028 * go-exp.y (go_parse): Use scoped_restore.
7029 * d-exp.y (d_parse): Use scoped_restore.
7030 * cli/cli-decode.c (cmd_func): Use scoped_restore.
7031 * c-exp.y (c_parse): Use scoped_restore.
7032
7033 2017-04-12 Tom Tromey <tom@tromey.com>
7034
7035 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
7036 (mi_parse): Update return type.
7037 (mi_parse_free): Remove.
7038 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
7039 (mi_parse::~mi_parse): Rename from mi_parse_free.
7040 (mi_parse_cleanup): Remove.
7041 (mi_parse): Return a unique_ptr. Use new.
7042 * mi/mi-main.c (mi_execute_command): Update.
7043
7044 2017-04-12 Tom Tromey <tom@tromey.com>
7045
7046 * location.c (explicit_location_lex_one): Return a
7047 unique_xmalloc_ptr.
7048 (string_to_explicit_location): Update. Remove cleanups.
7049
7050 2017-04-12 Tom Tromey <tom@tromey.com>
7051
7052 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
7053 (compare_value_and_voffset): Change type. Update.
7054 (compute_vtable_size): Change type of "offset_vec".
7055 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
7056 (gnuv3_get_typeid): Remove extraneous declaration.
7057
7058 2017-04-12 Tom Tromey <tom@tromey.com>
7059
7060 * charset.h (wchar_iterator): Fix comment.
7061
7062 2017-04-12 Tom Tromey <tom@tromey.com>
7063
7064 * charset.c (iconv_wrapper): New class.
7065 (cleanup_iconv): Remove.
7066 (convert_between_encodings): Use it.
7067
7068 2017-04-12 Tom Tromey <tom@tromey.com>
7069
7070 * symfile.h (increment_reading_symtab): Update type.
7071 * symfile.c (decrement_reading_symtab): Remove.
7072 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
7073 * psymtab.c (psymtab_to_symtab): Update.
7074 * dwarf2read.c (dw2_instantiate_symtab): Update.
7075
7076 2017-04-12 Tom Tromey <tom@tromey.com>
7077
7078 * jit.c (struct jit_reader): Declare separately. Add constructor
7079 and destructor. Change type of "handle".
7080 (loaded_jit_reader): Define separately.
7081 (jit_reader_load): Update. New "new".
7082 (jit_reader_unload_command): Use "delete".
7083 * gdb-dlfcn.h (struct dlclose_deleter): New.
7084 (gdb_dlhandle_up): New typedef.
7085 (gdb_dlopen, gdb_dlsym): Update types.
7086 (gdb_dlclose): Remove.
7087 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
7088 (gdb_dlsym): Change type of "handle".
7089 (make_cleanup_dlclose): Remove.
7090 (dlclose_deleter::operator()): Rename from gdb_dlclose.
7091 * compile/compile-c-support.c (load_libcc): Update.
7092
7093 2017-04-12 Tom Tromey <tom@tromey.com>
7094
7095 * symtab.h (find_pcs_for_symtab_line): Change return type.
7096 * symtab.c (find_pcs_for_symtab_line): Change return type.
7097 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
7098 type of "vec". Update.
7099 (ltpy_get_pcs_for_line): Update.
7100 * linespec.c (decode_digits_ordinary): Update.
7101
7102 2017-04-12 Tom Tromey <tom@tromey.com>
7103
7104 * tracepoint.c (actions_command): Update.
7105 * python/python.c (python_command, python_interactive_command):
7106 Update.
7107 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7108 * guile/guile.c (guile_command): Update.
7109 * defs.h (read_command_lines, read_command_lines_1): Return
7110 command_line_up.
7111 (command_lines_deleter): New struct.
7112 (command_line_up): New typedef.
7113 * compile/compile.c (compile_code_command)
7114 (compile_print_command): Update.
7115 * cli/cli-script.h (get_command_line, copy_command_lines): Return
7116 command_line_up.
7117 (make_cleanup_free_command_lines): Remove.
7118 * cli/cli-script.c (get_command_line, read_command_lines_1)
7119 (copy_command_lines): Return command_line_up.
7120 (while_command, if_command, read_command_lines, define_command)
7121 (document_command): Update.
7122 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
7123 Remove.
7124 * breakpoint.h (breakpoint_set_commands): Change type of
7125 "commands".
7126 * breakpoint.c (breakpoint_set_commands): Change type of
7127 "commands". Update.
7128 (do_map_commands_command, update_dprintf_command_list)
7129 (create_tracepoint_from_upload): Update.
7130
7131 2017-04-12 Tom Tromey <tom@tromey.com>
7132
7133 * tracepoint.c (scope_info): Update.
7134 * spu-tdep.c (spu_catch_start): Update.
7135 * python/python.c (gdbpy_decode_line): Update.
7136 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
7137 * python/py-breakpoint.c (bppy_init): Update.
7138 * probe.c (parse_probes): Update.
7139 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
7140 * location.h (event_location_deleter): New struct.
7141 (event_location_up): New typedef.
7142 (new_linespec_location, new_address_location, new_probe_location)
7143 (new_explicit_location, copy_event_location)
7144 (string_to_event_location, string_to_event_location_basic)
7145 (string_to_explicit_location): Update return type.
7146 (make_cleanup_delete_event_location): Remove.
7147 * location.c (new_linespec_location, new_address_location)
7148 (new_probe_location, new_explicit_location, copy_event_location):
7149 Return event_location_up.
7150 (delete_event_location_cleanup)
7151 (make_cleanup_delete_event_location): Remove.
7152 (string_to_explicit_location, string_to_event_location_basic)
7153 (string_to_event_location): Return event_location_up.
7154 * linespec.c (canonicalize_linespec, event_location_to_sals)
7155 (decode_line_with_current_source)
7156 (decode_line_with_last_displayed, decode_objc): Update.
7157 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
7158 * completer.c (location_completer): Update.
7159 * cli/cli-cmds.c (edit_command, list_command): Update.
7160 * breakpoint.c (create_overlay_event_breakpoint)
7161 (create_longjmp_master_breakpoint)
7162 (create_std_terminate_master_breakpoint)
7163 (create_exception_master_breakpoint)
7164 (create_thread_event_breakpoint): Update.
7165 (init_breakpoint_sal): Update. Remove some dead code.
7166 (create_breakpoint_sal): Change type of "location". Update.
7167 (create_breakpoints_sal, create_breakpoint, break_command_1)
7168 (dprintf_command, break_range_command, until_break_command)
7169 (init_ada_exception_breakpoint)
7170 (strace_marker_create_sals_from_location)
7171 (update_static_tracepoint, trace_command, ftrace_command)
7172 (strace_command, create_tracepoint_from_upload): Update.
7173 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7174 * ax-gdb.c (agent_command_1): Update.
7175
7176 2017-04-12 Pedro Alves <palves@redhat.com>
7177
7178 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
7179 * configure.tgt: Handle i[34567]86-*-go32* and
7180 i[34567]86-*-msdosdjgpp*.
7181 * i386-tdep.c (i386_svr4_reg_to_regnum):
7182 Make extern.
7183 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
7184 i386-go32-tdep.c.
7185 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
7186 * i386-go32-tdep.c: New file.
7187 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
7188 declarations.
7189
7190 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
7191
7192 * aix-thread.c (pd_status2str): Change return type to const char *.
7193
7194 2017-04-12 Pedro Alves <palves@redhat.com>
7195
7196 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
7197 calls to set_gdbarch_gnu_triplet_regexp.
7198
7199 2017-04-12 Pedro Alves <palves@redhat.com>
7200
7201 PR gdb/21323
7202 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
7203 New enum value.
7204 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
7205 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
7206 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
7207 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
7208 * gdbarch.h, gdbarch.c: Regenerate.
7209 * aarch64-tdep.c (aarch64_gdbarch_init): Override
7210 gdbarch_wchar_bit and gdbarch_wchar_signed.
7211 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
7212 * arm-tdep.c (arm_gdbarch_init): Likewise.
7213 * avr-tdep.c (avr_gdbarch_init): Likewise.
7214 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
7215 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
7216 * i386-tdep.c (i386_go32_init_abi): Likewise.
7217 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7218 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7219 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7220 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7221 * sh-tdep.c (sh_gdbarch_init): Likewise.
7222 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7223 * sparc64-tdep.c (sparc64_init_abi): Likewise.
7224 * windows-tdep.c (windows_init_abi): Likewise.
7225 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7226
7227 2017-04-12 Pedro Alves <palves@redhat.com>
7228
7229 PR c++/21323
7230 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
7231 cplus_primitive_type_char32_t>: New enum values.
7232 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
7233 and cplus_primitive_type_char32_t.
7234 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
7235 32, use the archtecture's built-in type for char16_t and char32_t,
7236 respectively. Otherwise, fallback to init_integer_type as before,
7237 but make the type unsigned, and issue a complaint.
7238 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
7239
7240 2017-04-12 Alan Hayward <alan.hayward@arm.com>
7241
7242 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
7243 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
7244
7245 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7246
7247 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
7248 'const char *'.
7249
7250 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7251
7252 * common/common-utils.c (free_vector_argv): New function.
7253 * common/common-utils.h: Include <vector>.
7254 (free_vector_argv): New prototype.
7255 * darwin-nat.c (darwin_create_inferior): Rewrite function
7256 prototype in order to constify "exec_file" and accept a
7257 "std::string" for "allargs".
7258 * fork-child.c: Include <vector>.
7259 (breakup_args): Rewrite function, using C++.
7260 (fork_inferior): Rewrite function header, constify "exec_file_arg"
7261 and accept "std::string" for "allargs". Update the code to
7262 calculate "argv" based on "allargs". Update calls to "exec_fun"
7263 and "execvp".
7264 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
7265 order to constify "exec_file" and accept a "std::string" for
7266 "allargs".
7267 * go32-nat.c (go32_create_inferior): Likewise.
7268 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
7269 * infcmd.c (run_command_1): Constify "exec_file". Use
7270 "std::string" for inferior arguments.
7271 * inferior.h (fork_inferior): Update prototype.
7272 * linux-nat.c (linux_nat_create_inferior): Rewrite function
7273 prototype in order to constify "exec_file" and accept a
7274 "std::string" for "allargs".
7275 * nto-procfs.c (procfs_create_inferior): Likewise.
7276 * procfs.c (procfs_create_inferior): Likewise.
7277 * remote-sim.c (gdbsim_create_inferior): Likewise.
7278 * remote.c (extended_remote_run): Update code to accept
7279 "std::string" as argument.
7280 (extended_remote_create_inferior): Rewrite function prototype in
7281 order to constify "exec_file" and accept a "std::string" for
7282 "allargs".
7283 * rs6000-nat.c (super_create_inferior): Likewise.
7284 (rs6000_create_inferior): Likewise.
7285 * target.h (struct target_ops) <to_create_inferior>: Likewise.
7286 * windows-nat.c (windows_create_inferior): Likewise.
7287
7288 2017-04-11 Pedro Alves <palves@redhat.com>
7289
7290 * thread.c: Fix whitespace throughout.
7291
7292 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
7293
7294 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
7295
7296 2017-04-11 Alan Hayward <alan.hayward@arm.com>
7297
7298 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
7299
7300 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
7301
7302 PR gdb/21364
7303 * osdata.c (info_osdata): Check if 'type' is an empty string
7304 instead of NULL.
7305
7306 2017-04-10 Pedro Alves <palves@redhat.com>
7307
7308 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
7309 (ptid_to_global_thread_id, in_thread_list)
7310 (do_captured_list_thread_ids, set_resumed, set_running)
7311 (set_executing, set_stop_requested, finish_thread_state)
7312 (validate_registers_access, can_access_registers_ptid)
7313 (print_thread_info_1, switch_to_thread)
7314 (do_restore_current_thread_cleanup)
7315 (make_cleanup_restore_current_thread, thread_command)
7316 (thread_name_command): Use operator== instead of ptid_equal.
7317
7318 2017-04-10 Pedro Alves <palves@redhat.com>
7319
7320 * thread.c (struct current_thread_cleanup) <next>: Delete field.
7321 (current_thread_cleanup_chain): Delete.
7322 (restore_current_thread_cleanup_dtor)
7323 (make_cleanup_restore_current_thread): Remove references to
7324 current_thread_cleanup_chain.
7325
7326 2017-04-10 Alan Hayward <alan.hayward@arm.com>
7327
7328 * msp430-tdep.c (msp430_pseudo_register_read): Never return
7329 REG_UNKNOWN.
7330
7331 2017-04-10 Yao Qi <yao.qi@linaro.org>
7332
7333 PR gdb/19942
7334 * gdbthread.h (thread_info::deletable): New method.
7335 (thread_info::incref): New method.
7336 (thread_info::decref): New method.
7337 (thread_info::refcount): Move it to private.
7338 * infrun.c (save_stop_context): Call inc_refcount.
7339 (release_stop_context_cleanup): Likewise.
7340 * thread.c (set_thread_exited): New function.
7341 (init_thread_list): Delete "tp" only it is deletable, otherwise
7342 call set_thread_exited.
7343 (delete_thread_1): Call set_thread_exited.
7344 (current_thread_cleanup) <inferior_pid>: Remove.
7345 <thread>: New field.
7346 (restore_current_thread_ptid_changed): Removed.
7347 (do_restore_current_thread_cleanup): Adjust.
7348 (restore_current_thread_cleanup_dtor): Don't call
7349 find_thread_ptid.
7350 (set_thread_refcount): Use dec_refcount.
7351 (make_cleanup_restore_current_thread): Adjust.
7352 (thread_apply_all_command): Call inc_refcount.
7353 (_initialize_thread): Don't call
7354 observer_attach_thread_ptid_changed.
7355
7356 2017-04-10 Yao Qi <yao.qi@linaro.org>
7357
7358 * thread.c (delete_thread_1): Hoist code on marking thread as
7359 exited.
7360
7361 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7362
7363 * windows-nat.c (windows_detach): Initialize ptid with
7364 minus_one_ptid.
7365
7366 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
7367
7368 * unittests/ptid-selftests.c: Fix erroneous assert messages.
7369
7370 2017-04-07 Alan Hayward <alan.hayward@arm.com>
7371
7372 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
7373 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
7374 (bfin_pseudo_register_write): Likewise
7375
7376 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7377
7378 * common/ptid.h (struct ptid): Change to...
7379 (class ptid_t): ... this.
7380 <ptid_t>: New constructors.
7381 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
7382 matches>: New methods.
7383 <make_null, make_minus_one>: New static methods.
7384 <pid>: Rename to...
7385 <m_pid>: ...this.
7386 <lwp>: Rename to...
7387 <m_lwp>: ...this.
7388 <tid>: Rename to...
7389 <m_tid>: ...this.
7390 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
7391 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
7392 as references, move comment to class ptid_t.
7393 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
7394 ptid_t static methods.
7395 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
7396 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
7397 Take ptid arguments as references, implement using ptid_t methods.
7398 * unittests/ptid-selftests.c: New file.
7399 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7400 unittests/ptid-selftests.c.
7401 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
7402
7403 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
7404
7405 * python/python.c (python_run_simple_file): Cast mode literal to
7406 non-const char pointer as expected by PyFile_FromString.
7407
7408 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
7409
7410 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
7411 minus_one_ptid and null_ptid.
7412
7413 2017-04-05 Pedro Alves <palves@redhat.com>
7414
7415 * warning.m4 (build_warnings): Remove -Wno-write-strings.
7416 * configure: Regenerate.
7417
7418 2017-04-05 Pedro Alves <palves@redhat.com>
7419
7420 * ada-exp.y (yyerror): Constify.
7421 * ada-lang.c (bound_name, get_selections)
7422 (ada_variant_discrim_type)
7423 (ada_variant_discrim_name, ada_value_struct_elt)
7424 (ada_lookup_struct_elt_type, is_unchecked_variant)
7425 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
7426 (catch_ada_exception_command_split)
7427 (catch_ada_assert_command_split, catch_assert_command)
7428 (ada_op_name): Constify.
7429 * ada-lang.h (ada_yyerror, get_selections)
7430 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
7431 * arc-tdep.c (arc_print_frame_cache): Constify.
7432 * arm-tdep.c (arm_skip_stub): Constify.
7433 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
7434 (gen_aggregate_elt_ref): Constify.
7435 * bcache.c (print_bcache_statistics): Constify.
7436 * bcache.h (print_bcache_statistics): Constify.
7437 * break-catch-throw.c (catch_exception_command_1):
7438 * breakpoint.c (struct ep_type_description::description):
7439 Constify.
7440 (add_solib_catchpoint): Constify.
7441 (catch_fork_command_1): Add cast.
7442 (add_catch_command): Constify.
7443 * breakpoint.h (add_catch_command, add_solib_catchpoint):
7444 Constify.
7445 * bsd-uthread.c (bsd_uthread_state): Constify.
7446 * buildsym.c (patch_subfile_names): Constify.
7447 * buildsym.h (next_symbol_text_func, patch_subfile_names):
7448 Constify.
7449 * c-exp.y (yyerror): Constify.
7450 (token::oper): Constify.
7451 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
7452 * c-varobj.c (cplus_describe_child): Constify.
7453 * charset.c (find_charset_names): Add cast.
7454 (find_charset_names): Constify array and add const_cast.
7455 * cli/cli-cmds.c (complete_command, cd_command): Constify.
7456 (edit_command): Constify.
7457 * cli/cli-decode.c (lookup_cmd): Constify.
7458 * cli/cli-dump.c (dump_memory_command, dump_value_command):
7459 Constify.
7460 (struct dump_context): Constify.
7461 (add_dump_command, restore_command): Constify.
7462 * cli/cli-script.c (get_command_line): Constify.
7463 * cli/cli-script.h (get_command_line): Constify.
7464 * cli/cli-utils.c (check_for_argument): Constify.
7465 * cli/cli-utils.h (check_for_argument): Constify.
7466 * coff-pe-read.c (struct read_pe_section_data): Constify.
7467 * command.h (lookup_cmd): Constify.
7468 * common/print-utils.c (decimal2str): Constify.
7469 * completer.c (gdb_print_filename): Constify.
7470 * corefile.c (set_gnutarget): Constify.
7471 * cp-name-parser.y (yyerror): Constify.
7472 * cp-valprint.c (cp_print_class_member): Constify.
7473 * cris-tdep.c (cris_register_name, crisv32_register_name):
7474 Constify.
7475 * d-exp.y (yyerror): Constify.
7476 (struct token::oper): Constify.
7477 * d-lang.h (d_yyerror): Constify.
7478 * dbxread.c (struct header_file_location::name): Constify.
7479 (add_old_header_file, add_new_header_file, last_function_name)
7480 (dbx_next_symbol_text, add_bincl_to_list)
7481 (find_corresponding_bincl_psymtab, set_namestring)
7482 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
7483 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
7484 * defs.h (command_line_input, print_address_symbolic)
7485 (deprecated_readline_begin_hook): Constify.
7486 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
7487 Constify.
7488 * event-top.c (handle_line_of_input): Constify and add cast.
7489 * exceptions.c (catch_errors): Constify.
7490 * exceptions.h (catch_errors): Constify.
7491 * expprint.c (print_subexp_standard, op_string, op_name)
7492 (op_name_standard, dump_raw_expression, dump_raw_expression):
7493 * expression.h (op_name, op_string, dump_raw_expression):
7494 Constify.
7495 * f-exp.y (yyerror): Constify.
7496 (struct token::oper): Constify.
7497 (struct f77_boolean_val::name): Constify.
7498 * f-lang.c (f_word_break_characters): Constify.
7499 * f-lang.h (f_yyerror): Constify.
7500 * fork-child.c (fork_inferior): Add cast.
7501 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
7502 (new_variant): Constify.
7503 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
7504 * gdbarch.c: Regenerate.
7505 * gdbcore.h (set_gnutarget): Constify.
7506 * go-exp.y (yyerror): Constify.
7507 (token::oper): Constify.
7508 * go-lang.h (go_yyerror): Constify.
7509 * go32-nat.c (go32_sysinfo): Constify.
7510 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
7511 * guile/scm-cmd.c (cmdscm_function): Constify.
7512 * guile/scm-param.c (pascm_param_value): Constify.
7513 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
7514 (h8300sx_register_name): Constify.
7515 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
7516 Constify.
7517 * ia64-tdep.c (ia64_register_names): Constify.
7518 * infcmd.c (construct_inferior_arguments): Constify.
7519 (path_command, attach_post_wait): Constify.
7520 * language.c (show_range_command, show_case_command)
7521 (unk_lang_error): Constify.
7522 * language.h (language_defn::la_error)
7523 (language_defn::la_name_of_this): Constify.
7524 * linespec.c (decode_line_2): Constify.
7525 * linux-thread-db.c (thread_db_err_str): Constify.
7526 * lm32-tdep.c (lm32_register_name): Constify.
7527 * m2-exp.y (yyerror): Constify.
7528 * m2-lang.h (m2_yyerror): Constify.
7529 * m32r-tdep.c (m32r_register_names): Constify and make static.
7530 * m68hc11-tdep.c (m68hc11_register_names): Constify.
7531 * m88k-tdep.c (m88k_register_name): Constify.
7532 * macroexp.c (appendmem): Constify.
7533 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
7534 (upgrade_type, parse_external, parse_partial_symbols)
7535 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
7536 (new_symbol): Constify.
7537 * memattr.c (mem_info_command): Constify.
7538 * mep-tdep.c (register_name_from_keyword): Constify.
7539 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
7540 Constify.
7541 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
7542 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
7543 * mi/mi-main.c (captured_mi_execute_command): Constify and add
7544 cast.
7545 (mi_execute_async_cli_command): Constify.
7546 * mips-tdep.c (mips_register_name): Constify.
7547 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
7548 (am33_register_name, am33_2_register_name)
7549 * moxie-tdep.c (moxie_register_names): Constify.
7550 * nat/linux-osdata.c (osdata_type): Constify fields.
7551 * nto-tdep.c (nto_parse_redirection): Constify.
7552 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
7553 (lookup_child_selector): Constify.
7554 (objc_methcall::name): Constify.
7555 * objc-lang.h (lookup_objc_class, lookup_child_selector)
7556 (lookup_struct_typedef): Constify.
7557 * objfiles.c (pc_in_section): Constify.
7558 * objfiles.h (pc_in_section): Constify.
7559 * p-exp.y (struct token::oper): Constify.
7560 (yyerror): Constify.
7561 * p-lang.h (pascal_yyerror): Constify.
7562 * parser-defs.h (op_name_standard): Constify.
7563 (op_print::string): Constify.
7564 (exp_descriptor::op_name): Constify.
7565 * printcmd.c (print_address_symbolic): Constify.
7566 * psymtab.c (print_partial_symbols): Constify.
7567 * python/py-breakpoint.c (stop_func): Constify.
7568 (bppy_get_expression): Constify.
7569 * python/py-cmd.c (cmdpy_completer::name): Constify.
7570 (cmdpy_function): Constify.
7571 * python/py-event.c (evpy_add_attribute)
7572 (gdbpy_initialize_event_generic): Constify.
7573 * python/py-event.h (evpy_add_attribute)
7574 (gdbpy_initialize_event_generic): Constify.
7575 * python/py-evts.c (add_new_registry): Constify.
7576 * python/py-finishbreakpoint.c (outofscope_func): Constify.
7577 * python/py-framefilter.c (get_py_iter_from_func): Constify.
7578 * python/py-inferior.c (get_buffer): Add cast.
7579 * python/py-param.c (parm_constant::name): Constify.
7580 * python/py-unwind.c (fprint_frame_id): Constify.
7581 * python/python.c (gdbpy_parameter_value): Constify.
7582 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
7583 * remote.c (memory_packet_config::name): Constify.
7584 (show_packet_config_cmd, remote_write_bytes)
7585 (remote_buffer_add_string):
7586 * reverse.c (exec_reverse_once): Constify.
7587 * rs6000-tdep.c (variant::name, variant::description): Constify.
7588 * rust-exp.y (rustyyerror): Constify.
7589 * rust-lang.c (rust_op_name): Constify.
7590 * rust-lang.h (rustyyerror): Constify.
7591 * serial.h (serial_ops::name): Constify.
7592 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
7593 (sh_sh3e_register_name, sh_sh2e_register_name)
7594 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
7595 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
7596 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
7597 (sh_sh4al_dsp_register_name): Constify.
7598 * sh64-tdep.c (sh64_register_name): Constify.
7599 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
7600 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
7601 * stabsread.c (patch_block_stabs, read_type_number)
7602 (ref_map::stabs, ref_add, process_reference)
7603 (symbol_reference_defined, define_symbol, define_symbol)
7604 (error_type, read_type, read_member_functions, read_cpp_abbrev)
7605 (read_one_struct_field, read_struct_fields, read_baseclasses)
7606 (read_tilde_fields, read_struct_type, read_array_type)
7607 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
7608 (read_huge_number, read_range_type, read_args, common_block_start)
7609 (find_name_end): Constify.
7610 * stabsread.h (common_block_start, define_symbol)
7611 (process_one_symbol, symbol_reference_defined, ref_add):
7612 * symfile.c (get_section_index, add_symbol_file_command):
7613 * symfile.h (get_section_index): Constify.
7614 * target-descriptions.c (tdesc_type::name): Constify.
7615 (tdesc_free_type): Add cast.
7616 * target.c (find_default_run_target):
7617 (add_deprecated_target_alias, find_default_run_target)
7618 (target_announce_detach): Constify.
7619 (do_option): Constify.
7620 * target.h (add_deprecated_target_alias): Constify.
7621 * thread.c (print_thread_info_1): Constify.
7622 * top.c (deprecated_readline_begin_hook, command_line_input):
7623 Constify.
7624 (init_main): Add casts.
7625 * top.h (handle_line_of_input): Constify.
7626 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
7627 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
7628 (tfind_command): Rename to ...
7629 (tfind_command_1): ... this and constify.
7630 (tfind_command): New function.
7631 (tfind_end_command, tfind_start_command): Adjust.
7632 (encode_source_string): Constify.
7633 * tracepoint.h (encode_source_string): Constify.
7634 * tui/tui-data.c (tui_partial_win_by_name): Constify.
7635 * tui/tui-data.h (tui_partial_win_by_name): Constify.
7636 * tui/tui-source.c (tui_set_source_content_nil): Constify.
7637 * tui/tui-source.h (tui_set_source_content_nil): Constify.
7638 * tui/tui-win.c (parse_scrolling_args): Constify.
7639 * tui/tui-windata.c (tui_erase_data_content): Constify.
7640 * tui/tui-windata.h (tui_erase_data_content): Constify.
7641 * tui/tui-winsource.c (tui_erase_source_content): Constify.
7642 * tui/tui.c (tui_enable): Add cast.
7643 * utils.c (defaulted_query): Constify.
7644 (init_page_info): Add cast.
7645 (puts_debug, subset_compare): Constify.
7646 * utils.h (subset_compare): Constify.
7647 * varobj.c (varobj_format_string): Constify.
7648 * varobj.h (varobj_format_string): Constify.
7649 * vax-tdep.c (vax_register_name): Constify.
7650 * windows-nat.c (windows_detach): Constify.
7651 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
7652 * xml-support.c (gdb_xml_end_element): Constify.
7653 * xml-tdesc.c (tdesc_start_reg): Constify.
7654 * xstormy16-tdep.c (xstormy16_register_name): Constify.
7655 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
7656 * xtensa-tdep.h (xtensa_register_t::name): Constify.
7657
7658 2017-04-05 Pedro Alves <palves@redhat.com>
7659
7660 * proc-api.c (struct trans): Constify.
7661 (procfs_note): Constify.
7662 * proc-events.c (struct trans, syscall_table):
7663 * proc-flags.c (struct trans): Constify.
7664 * proc-utils.h (procfs_note): Constify.
7665 * proc-why.c (struct trans): Constify.
7666 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
7667 (procfs_detach): Constify.
7668 * sol-thread.c (struct string_map): Constify.
7669 (td_err_string, td_state_string): Constify.
7670
7671 2017-04-05 Pedro Alves <palves@redhat.com>
7672
7673 * proc-api.c (procfs_filename): Don't initialize
7674 procfs_filename.
7675 (prepare_to_trace): Assume procfs_filename is non-NULL.
7676 (_initialize_proc_api): Give procfs_filename a default value here.
7677
7678 2017-04-05 Pedro Alves <palves@redhat.com>
7679
7680 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
7681 'cond_string' parameter.
7682 (extract_exception_regexp): Constify 'string' parameter.
7683 (catch_exception_command_1): Constify.
7684 * breakpoint.c (init_catchpoint)
7685 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
7686 parameter.
7687 (ep_parse_optional_if_clause, catch_fork_command_1)
7688 (catch_exec_command_1): Constify.
7689 * breakpoint.h (init_catchpoint): Constify 'cond_string'
7690 parameter.
7691 (ep_parse_optional_if_clause): Constify.
7692 * cli/cli-utils.c (remove_trailing_whitespace)
7693 (check_for_argument): Constify.
7694 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
7695 non-const overload.
7696 (check_for_argument): Likewise.
7697
7698 2017-04-05 Pedro Alves <palves@redhat.com>
7699
7700 * event-top.c (command_line_handler): Add cast to execute_command
7701 call.
7702 * record-btrace.c (cmd_record_btrace_bts_start)
7703 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
7704 (cmd_record_btrace_start): Add cast to execute_command call.
7705 * record-full.c (record_full_goto_insn):
7706 * record.c (record_start, record_stop): Add cast to
7707 execute_command_to_string calls.
7708 (cmd_record_start): Add cast to execute_command calls.
7709
7710 2017-04-05 Pedro Alves <palves@redhat.com>
7711
7712 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
7713 static inline function.
7714 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
7715 array and use gdb_PyArg_ParseTupleAndKeywords.
7716 * python/py-cmd.c (cmdpy_init): Likewise.
7717 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
7718 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
7719 (infpy_search_memory): Likewise.
7720 * python/py-objfile.c (objfpy_add_separate_debug_file)
7721 (gdbpy_lookup_objfile): Likewise.
7722 * python/py-symbol.c (gdbpy_lookup_symbol)
7723 (gdbpy_lookup_global_symbol): Likewise.
7724 * python/py-type.c (gdbpy_lookup_type): Likewise.
7725 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
7726 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
7727 Likewise.
7728
7729 2017-04-05 Pedro Alves <palves@redhat.com>
7730
7731 * python/python-internal.h (gdb_PyGetSetDef): New type.
7732 * python/py-block.c (block_object_getset)
7733 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
7734 * python/py-event.c (event_object_getset)
7735 (finish_breakpoint_object_getset): Likewise.
7736 * python/py-inferior.c (inferior_object_getset): Likewise.
7737 * python/py-infthread.c (thread_object_getset): Likewise.
7738 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
7739 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
7740 * python/py-objfile.c (objfile_getset): Likewise.
7741 * python/py-progspace.c (pspace_getset): Likewise.
7742 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
7743 Likewise.
7744 * python/py-record.c (recpy_record_getset): Likewise.
7745 * python/py-symbol.c (symbol_object_getset): Likewise.
7746 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
7747 Likewise.
7748 * python/py-type.c (type_object_getset, field_object_getset):
7749 Likewise.
7750 * python/py-value.c (value_object_getset): Likewise.
7751
7752 2017-04-05 Pedro Alves <palves@redhat.com>
7753
7754 * python/python-internal.h (gdb_PyObject_CallMethod)
7755 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
7756 New functions.
7757 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
7758 (PySys_GetObject, PySys_SetPath): New macros.
7759
7760 2017-04-05 Pedro Alves <palves@redhat.com>
7761
7762 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
7763 info_osdata_command.
7764 * osdata.c (info_osdata_command): Rename to ...
7765 (info_osdata): ... this. Constify 'type' parameter, and remove
7766 the 'from_tty' parameter. Accept NULL TYPE.
7767 (info_osdata_command): New function.
7768 * osdata.h (info_osdata_command): Remove declaration.
7769 (info_osdata): New declaration.
7770
7771 2017-04-05 Pedro Alves <palves@redhat.com>
7772
7773 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
7774 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
7775 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
7776 parameter.
7777 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
7778 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
7779 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
7780 parameter.
7781 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
7782 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
7783 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
7784 (mi_cmd_file_list_exec_source_files)
7785 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
7786 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7787 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
7788 parameter.
7789 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
7790 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
7791 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
7792 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
7793 (mi_cmd_stack_info_frame): Constify 'command' parameter.
7794 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
7795 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
7796 'command' parameter.
7797 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
7798 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
7799 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
7800 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
7801 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
7802 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
7803 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
7804 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
7805 (mi_cmd_var_set_update_range): Constify 'command' parameter.
7806 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
7807 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
7808 parameter.
7809 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
7810 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
7811 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
7812 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
7813 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
7814 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
7815 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
7816 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
7817 (mi_cmd_data_list_changed_registers)
7818 (mi_cmd_data_write_register_values)
7819 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
7820 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
7821 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
7822 (mi_cmd_list_features, mi_cmd_list_target_features)
7823 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
7824 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
7825 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
7826 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
7827 (mi_cmd_trace_frame_collected): Constify 'command'
7828 parameter.
7829 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
7830 'command' parameter.
7831
7832 2017-04-05 Pedro Alves <palves@redhat.com>
7833
7834 * ada-lang.c (ada_completer_word_break_characters): Now a const
7835 array.
7836 (ada_get_gdb_completer_word_break_characters): Constify.
7837 * completer.c (gdb_completer_command_word_break_characters)
7838 (gdb_completer_file_name_break_characters)
7839 (gdb_completer_quote_characters): Now const arrays.
7840 (get_gdb_completer_quote_characters): Constify.
7841 (set_rl_completer_word_break_characters): New function.
7842 (set_gdb_completion_word_break_characters)
7843 (complete_line_internal): Use it.
7844 * completer.h (get_gdb_completer_quote_characters): Constify.
7845 (set_rl_completer_word_break_characters): Declare.
7846 * f-lang.c (f_word_break_characters): Constify.
7847 * language.c (default_word_break_characters): Constify.
7848 * language.h (language_defn::la_word_break_characters): Constify.
7849 (default_word_break_characters): Constify.
7850 * top.c (init_main): Use set_rl_completer_word_break_characters.
7851
7852 2017-04-05 Pedro Alves <palves@redhat.com>
7853
7854 * aix-thread.c (aix_thread_pid_to_str)
7855 (aix_thread_extra_thread_info): Constify.
7856 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
7857 * bsd-uthread.c (bsd_uthread_extra_thread_info)
7858 (bsd_uthread_pid_to_str): Constify.
7859 * corelow.c (core_pid_to_str): Constify.
7860 * darwin-nat.c (darwin_pid_to_str): Constify.
7861 * fbsd-nat.c (fbsd_pid_to_str): Constify.
7862 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
7863 Constify.
7864 * gnu-nat.c (gnu_pid_to_str): Constify.
7865 * go32-nat.c (go32_pid_to_str): Constify.
7866 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
7867 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
7868 * inferior.c (inferior_pid_to_str): Constify.
7869 * linux-nat.c (linux_nat_pid_to_str): Constify.
7870 * linux-tdep.c (linux_core_pid_to_str): Constify.
7871 * linux-thread-db.c (thread_db_pid_to_str)
7872 (thread_db_extra_thread_info): Constify.
7873 * nto-tdep.c (nto_extra_thread_info): Constify.
7874 * nto-tdep.h (nto_extra_thread_info): Constify.
7875 * obsd-nat.c (obsd_pid_to_str): Constify.
7876 * procfs.c (procfs_pid_to_str): Constify.
7877 * ravenscar-thread.c (ravenscar_extra_thread_info)
7878 (ravenscar_pid_to_str): Constify.
7879 * remote-sim.c (gdbsim_pid_to_str): Constify.
7880 * remote.c (remote_threads_extra_info, remote_pid_to_str):
7881 Constify.
7882 * sol-thread.c (solaris_pid_to_str): Constify.
7883 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
7884 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
7885 * target.c (default_pid_to_str, target_pid_to_str)
7886 (normal_pid_to_str, default_pid_to_str): Constify.
7887 * target.h (target_ops::to_pid_to_str)
7888 (target_ops::to_extra_thread_info): Constify.
7889 (target_pid_to_str, normal_pid_to_str): Constify.
7890 * windows-nat.c (windows_pid_to_str): Constify.
7891 * gdbarch.sh (core_pid_to_str): Constify.
7892 * target-delegates.c: Regenerate.
7893 * gdbarch.h, gdbarch.c: Regenerate.
7894
7895 2017-04-05 Pedro Alves <palves@redhat.com>
7896
7897 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
7898 the memory of the temporary warning_pre_print override.
7899 * utils.c (warning_pre_print): Constify.
7900 * utils.h (warning_pre_print): Constify.
7901
7902 2017-04-05 Pedro Alves <palves@redhat.com>
7903
7904 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
7905 (shell_command): New function.
7906 (make_command): Use std::string.
7907 (init_cli_cmds): Register shell_command instead of shell_escape.
7908
7909 2017-04-05 Pedro Alves <palves@redhat.com>
7910
7911 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
7912 * tracepoint.c (default_collect): Don't initialize.
7913
7914 2017-04-05 Pedro Alves <palves@redhat.com>
7915
7916 * macroexp.c (macro_buffer::shared): Now a bool.
7917 (init_buffer): Update.
7918 (init_shared_buffer): Constify 'addr' parameter.
7919 (substitute_args, expand, macro_expand, macro_expand_next): Remove
7920 casts.
7921
7922 2017-04-05 Pedro Alves <palves@redhat.com>
7923
7924 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
7925 * disasm.c (set_disassembler_options): Constify local.
7926 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
7927
7928 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
7929
7930 PR gdb/21352
7931 * tracefile.c (tsave_command): Fix argument parsing for '-r'
7932 option.
7933
7934 2017-04-05 Yao Qi <yao.qi@linaro.org>
7935
7936 * frame.c (frame_unwind_register_unsigned): Call
7937 frame_unwind_register_value.
7938
7939 2017-04-05 Yao Qi <yao.qi@linaro.org>
7940
7941 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
7942 Use gdb_test_multiple, and don't match anchor.
7943
7944 2017-04-05 Pedro Alves <palves@redhat.com>
7945
7946 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
7947 (Write After Approval): Remove Simon Marchi.
7948
7949 2017-04-05 Pedro Alves <palves@redhat.com>
7950
7951 * common/gdb_optional.h (optional::optional): Make constexpr and
7952 initialize m_dummy.
7953
7954 2017-04-04 John Baldwin <jhb@FreeBSD.org>
7955
7956 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
7957 (amd64fbsd_jmp_buf_reg_offset): Remove.
7958 (amd64fbsd_supply_uthread): Remove function.
7959 (amd64fbsd_collect_uthread): Remove function.
7960 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
7961 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
7962 (x86_64-*-freebsd*): Remove bsd-uthread.o.
7963 (fbsd-nat.c): Update comment.
7964 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
7965 (i386fbsd_jmp_buf_reg_offset): Remove.
7966 (i386fbsd_supply_uthread): Remove function.
7967 (i386fbsd_collect_uthread): Remove function.
7968 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
7969
7970 2017-04-04 John Baldwin <jhb@FreeBSD.org>
7971
7972 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
7973 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
7974 * NEWS: Mention that support for FreeBSD/alpha was removed.
7975 * alpha-fbsd-tdep.c: Delete file.
7976 * config/alpha/fbsd.mh: Delete file.
7977 * configure.host: Delete alpha*-*-freebsd* and
7978 alpha*-*-kfreebsd*-gnu.
7979 * configure.tgt: Delete alpha*-*-freebsd* and
7980 alpha*-*-kfreebsd*-gnu.
7981
7982 2017-04-04 John Baldwin <jhb@FreeBSD.org>
7983
7984 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
7985 amd64bsd_store_inferior_registers): Use ptid from regcache.
7986
7987 2017-04-04 Pedro Alves <palves@redhat.com>
7988
7989 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
7990 data fields, make them private and add "m_" prefixes.
7991 (lnp_state_machine::lnp_state_machine): New ctor.
7992 (record_line, check_line_address, handle_set_discriminator)
7993 (handle_set_address, handle_advance_pc, handle_special_opcode)
7994 (handle_advance_line, handle_set_file, handle_negate_stmt)
7995 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
7996 (end_sequence, advance_line): New methods.
7997 (m_gdbarch, m_record_lines_p): New fields.
7998 (lnp_reader_state): Delete.
7999 (dwarf_record_line): Rename to ...
8000 (lnp_state_machine::record_line): ... adjust.
8001 (init_lnp_state_machine): Delete.
8002 (lnp_state_machine::lnp_state_machine): New.
8003 (check_line_address): Rename to ...
8004 (lnp_state_machine::check_line_address): This.
8005 (dwarf_decode_lines_1): Remove reference to "reader_state".
8006 Adjust lnp_state_machine having a non-default ctor. Use bool.
8007 State machine internal state manipulation moved to
8008 lnp_state_machine methods.
8009
8010 2017-04-04 Pedro Alves <palves@redhat.com>
8011
8012 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8013 unittests/offset-type-selftests.c.
8014 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
8015 * common/offset-type.h: New file.
8016 * common/preprocessor.h: New file.
8017 * common/traits.h: New file.
8018 * common/valid-expr.h: New file.
8019 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
8020 sect_offset and cu_offset strong typedefs throughout.
8021 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
8022 typedefs throughout.
8023 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
8024 sect_offset and cu_offset strong typedefs throughout.
8025 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
8026 typedefs throughout.
8027 * gdbtypes.h: Include "common/offset-type.h".
8028 (cu_offset): Now an offset type (strong typedef) instead of a
8029 struct.
8030 (sect_offset): Likewise.
8031 (union call_site_parameter_u): Rename "param_offset" field to
8032 "param_cu_off".
8033 * unittests/offset-type-selftests.c: New file.
8034
8035 2017-04-04 Pedro Alves <palves@redhat.com>
8036
8037 * common/underlying.h: New file.
8038 * dwarf2read.c: Include "common/gdb_optional.h" and
8039 "common/underlying.h".
8040 (dir_index, file_name_index): New types.
8041 (file_entry): Use them.
8042 (file_entry::include): Use to_underlying.
8043 (line_header::add_file_name): Use dir_index.
8044 (read_formatted_entries): Use gdb::optional. Read form before
8045 writting to file_entry.
8046 (dwarf_decode_line_header): Use dir_index.
8047 (lnp_state_machine::current_file): Use to_underlying.
8048 (lnp_state_machine::file): Change type to file_name_index.
8049 (dwarf_record_line): Use to_underlying.
8050 (init_lnp_state_machine): Use file_name_index.
8051 (dwarf_decode_lines_1): Use dir_index and file_name_index.
8052
8053 2017-04-04 Pedro Alves <palves@redhat.com>
8054
8055 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
8056 operator bool, has_value and get methods.
8057
8058 2017-04-04 Pedro Alves <palves@redhat.com>
8059
8060 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
8061 fields.
8062 (line_header): Initialize all data fields. Change type of
8063 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
8064 Change type of include_dirs to std::vector<const char *>. Remove
8065 num_include_dirs, include_dirs_size. Change type of file_names to
8066 std::vector<file_entry>. Remove num_file_names, file_names_size.
8067 (line_header::line_header): New.
8068 (line_header::add_include_dir, line_header::add_file_name): New
8069 methods.
8070 (line_header::include_dir_at): Remove NULL check.
8071 (line_header::file_name_at): Add const overload.
8072 (line_header_up): New unique_ptr typedef.
8073 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
8074 std::vector. Remove free_line_header call.
8075 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
8076 free_line_header call.
8077 (free_cu_line_header): Delete.
8078 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
8079 (setup_type_unit_groups): Use line_header_up instead of cleanups.
8080 Adjust to use std::vector.
8081 (free_line_header): Delete.
8082 (free_line_header_voidp): Use delete.
8083 (add_include_dir): Replace with ...
8084 (line_header::add_include_dir): ... this method. Use std::vector.
8085 (add_file_name): Replace with ...
8086 (line_header::add_file_name): ... this method. Use std::vector.
8087 (add_include_dir_stub): Delete.
8088 (read_formatted_entries): Remove memset.
8089 (dwarf_decode_line_header): Return a line_header_up instead of a
8090 raw pointer. Remove cleanup handling. Pass lambdas to
8091 read_formatted_entries. Adjust to use line_header methods.
8092 (dwarf_decode_lines_1): Adjust to use line_header methods.
8093 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
8094 use std::vector.
8095
8096 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
8097
8098 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
8099 instead of struct ptid.
8100
8101 2017-05-04 Alan Hayward <alan.hayward@arm.com>
8102
8103 * frame.c (get_frame_register_bytes): Unwind using value.
8104 (put_frame_register_bytes): Likewise.
8105
8106 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
8107
8108 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
8109 aggregate-like.
8110
8111 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
8112
8113 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
8114
8115 2017-03-29 Yao Qi <yao.qi@linaro.org>
8116
8117 * gdbthread.h (struct thread_info): Declare constructor and
8118 destructor. Add some in-class member initializers.
8119 * thread.c (free_thread): Remove.
8120 (init_thread_list): Call delete instead of free_thread.
8121 (new_thread): Call thread_info constructor.
8122 (thread_info::thread_info): New function.
8123 (thread_info::~thread_info): New function.
8124 (delete_thread_1): Call delete instead of free_thread.
8125 (make_cleanup_restore_current_thread): Move tp and frame to
8126 inner block.
8127
8128 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8129
8130 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
8131 (arc_skip_prologue): Likewise.
8132 (arc_make_frame_cache): Likewise.
8133 (arc_pv_get_operand): New function.
8134 (arc_is_in_prologue): Likewise.
8135 (arc_analyze_prologue): Likewise.
8136 (arc_print_frame_cache): Likewise.
8137 (MAX_PROLOGUE_LENGTH): New constant.
8138
8139 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8140
8141 * configure.tgt: Add arc-insn.o.
8142 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
8143 (dump_arc_instruction_command): New function.
8144 (arc_fprintf_disasm): Likewise.
8145 (arc_disassemble_info): Likewise.
8146 (arc_insn_get_operand_value): Likewise.
8147 (arc_insn_get_operand_value_signed): Likewise.
8148 (arc_insn_get_memory_base_reg): Likewise.
8149 (arc_insn_get_memory_offset): Likewise.
8150 (arc_insn_get_branch_target): Likewise.
8151 (arc_insn_dump): Likewise.
8152 (arc_insn_get_linear_next_pc): Likewise.
8153 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
8154 (arc_disassemble_info): Likewise.
8155 (arc_insn_get_branch_target): Likewise.
8156 (arc_insn_get_linear_next_pc): Likewise.
8157 * NEWS: Mention new "maint print arc arc-instruction".
8158
8159 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8160
8161 * arc-tdep (maintenance_print_arc_list): New variable.
8162 (maintenance_print_arc_command): New function.
8163
8164 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
8165
8166 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
8167 Add "limm" and "reserved".
8168 (arc_cannot_fetch_register, arc_cannot_store_register): Add
8169 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
8170 * arc-tdep.h (arc_regnum): Likewise.
8171
8172 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8173
8174 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8175 for THREADPTR register.
8176 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
8177 register.
8178 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
8179 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
8180 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
8181
8182 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8183
8184 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
8185 registers above gdbarch_num_regs (gdbarch) as privileged in
8186 call0 ABI.
8187
8188 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8189
8190 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8191 for a single specified register or for all registers in
8192 a0_base..a0_base + C0_NREGS range.
8193 (supply_gregset_reg): Call regcache_raw_supply for a single
8194 specified register or for all registers in a0_base..a0_base +
8195 C0_NREGS range.
8196
8197 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8198
8199 * arch/xtensa.h (C0_NREGS): Add definition.
8200 * xtensa-tdep.c (C0_NREGS): Remove definition.
8201
8202 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
8203
8204 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
8205 Drop xtensa_default_isa initialization.
8206 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
8207
8208 2017-03-27 Pedro Alves <palves@redhat.com>
8209
8210 * dwarf2read.c (file_entry) <dir_index>: Add comment.
8211 (file_entry::include_dir): New method.
8212 (line_header::include_dir_at, line_header::file_name_at): New
8213 methods.
8214 (setup_type_unit_groups, setup_type_unit_groups)
8215 (psymtab_include_file_name): Simplify using the new methods.
8216 (lnp_state_machine) <the_line_header>: New field.
8217 <file>: Add comment.
8218 (lnp_state_machine::current_file): New method.
8219 (dwarf_record_line): Simplify using the new methods.
8220 (init_lnp_state_machine): Initialize the "the_line_header" field.
8221 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
8222 Simplify using the new methods.
8223
8224 2017-03-27 Pedro Alves <palves@redhat.com>
8225
8226 * cp-name-parser.y (make_empty): Delete.
8227 (demangler_special, nested_name, ptr_operator, array_indicator)
8228 (direct_declarator, declarator_1): Use fill_comp instead of
8229 make_empty.
8230
8231 2017-03-27 Pedro Alves <palves@redhat.com>
8232
8233 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
8234 to ATTRIBUTE_PRINTF.
8235 * solib-target.c (library_list_start_list): Print "string" not
8236 "version".
8237 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
8238 gdb_xml_error call.
8239
8240 2017-03-27 Pedro Alves <palves@redhat.com>
8241
8242 * dwarf2read.c (struct file_and_directory): New.
8243 (dwarf2_get_dwz_file): Adjust to use std::string.
8244 (dw2_get_file_names_reader): Adjust to use file_and_directory.
8245 (find_file_and_directory): Adjust to return a file_and_directory
8246 object.
8247 (read_file_scope): Adjust to use file_and_directory. Remove
8248 make_cleanup/do_cleanups calls.
8249 (open_and_init_dwp_file): Adjust to use std::string. Remove
8250 make_cleanup/do_cleanups calls.
8251 * python/python.c (do_start_initialization): Adjust to ldirname
8252 returning a std::string.
8253 * utils.c (ldirname): Now returns a std::string.
8254 * utils.h (ldirname): Change return type to std::string.
8255 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
8256 returning a std::string.
8257 * xml-tdesc.c (file_read_description_xml): Likewise.
8258
8259 2017-03-24 Alan Hayward <alan.hayward@arm.com>
8260
8261 * regcache.c (regcache_debug_print_register): New function.
8262 * regcache.h (regcache_debug_print_register): New declaration.
8263 * target.c (debug_print_register): Remove.
8264 (target_fetch_registers): Call regcache_debug_print_register.
8265 (target_store_registers): Likewise.
8266
8267 2017-03-24 Pádraig Brady <pbrady@fb.com>
8268
8269 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
8270 reference beyond the 'lh->include_dirs' array before accessing to
8271 it.
8272 (psymtab_include_file_name): Likewise.
8273 (dwarf_decode_lines_1): Likewise.
8274 (dwarf_decode_lines): Likewise.
8275 (file_file_name): Likewise.
8276
8277 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
8278
8279 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
8280 inferior_ptid.
8281 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8282 ps_lsetfpregs): Likewise.
8283 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
8284 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8285 ps_lsetfpregs): Likewise.
8286 * target.c (target_fetch_registers, target_store_registers):
8287 Remove asserts.
8288
8289 2017-03-23 Alan Hayward <alan.hayward@arm.com>
8290
8291 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
8292
8293 2017-03-23 Yao Qi <yao.qi@linaro.org>
8294
8295 * aarch64-tdep.c (aarch64_process_record_test): Declare.
8296 (_initialize_aarch64_tdep): Register it.
8297 (aarch64_record_load_store): Handle PRFM instruction.
8298 (aarch64_process_record_test): New function.
8299
8300 2017-03-23 Yao Qi <yao.qi@linaro.org>
8301
8302 * aarch64-tdep.c (aarch64_record_load_store): Fix code
8303 indentation.
8304
8305 2017-03-23 Yao Qi <yao.qi@linaro.org>
8306
8307 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
8308
8309 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8310
8311 python/python.c (do_start_initialization): Fix memory leak.
8312
8313 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8314
8315 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
8316 using get_ptrace_pid.
8317 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
8318 inferior_ptid.
8319 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
8320 inferior_ptid instead of pid.
8321
8322 2017-03-22 Yao Qi <yao.qi@linaro.org>
8323
8324 * aarch64-tdep.c: Wrap locally used classes in anonymous
8325 namespace.
8326 * arm-tdep.c: Likewise.
8327 * linespec.c: Likewise.
8328 * ui-out.c: Likewise.
8329
8330 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
8331
8332 PR gdb/19637
8333 * python/lib/gdb/printer/bound_registers.py: Import sys.
8334
8335 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8336
8337 * windows-nat.c (do_windows_fetch_inferior_registers): Add
8338 windows_thread_info parameter and use it instead of
8339 current_thread.
8340 (windows_fetch_inferior_registers): Don't set current_thread,
8341 pass the thread to do_windows_fetch_inferior_registers. Use
8342 ptid from regcache instead of inferior_ptid.
8343 (do_windows_store_inferior_registers): Add windows_thread_info
8344 parameter and use it instead of current_thread.
8345 (windows_store_inferior_registers): Don't set current_thread,
8346 pass the thread to do_windows_store_inferior_registers. Use
8347 ptid from regcache instead of inferior_ptid.
8348
8349 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
8350
8351 * ser-mingw.c (ser_windows_raw): Remove reference to
8352 struct serial::current_timeout.
8353
8354 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
8355
8356 PR tdep/20928
8357 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
8358 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
8359 (sparc64_fsr_type): Fix %fsr decoding.
8360
8361 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
8362
8363 * python/py-record-btrace.c (btpy_insn_data): Change return type
8364 for Python 2.
8365
8366 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8367
8368 * spu-linux-nat.c (spu_fetch_inferior_registers,
8369 spu_store_inferior_registers): Use ptid from regcache, set and
8370 restore inferior_ptid.
8371 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
8372 Likewise.
8373
8374 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
8375
8376 * i386-linux-nat.c (fetch_register, store_register,
8377 i386_linux_fetch_inferior_registers,
8378 i386_linux_store_inferior_registers): Use ptid from regcache.
8379 * ia64-linux-nat.c (ia64_linux_fetch_register,
8380 ia64_linux_store_register): Likewise.
8381 * inf-ptrace.c (inf_ptrace_fetch_register,
8382 inf_ptrace_store_register): Likewise.
8383 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
8384 m32r_linux_store_inferior_registers): Likewise.
8385 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
8386 m68kbsd_store_inferior_registers): Likewise.
8387 * m68k-linux-nat.c (fetch_register, store_register,
8388 m68k_linux_fetch_inferior_registers,
8389 m68k_linux_store_inferior_registers): Likewise.
8390 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
8391 m88kbsd_store_inferior_registers): Likewise.
8392 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
8393 mips_fbsd_store_inferior_registers): Likewise.
8394 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
8395 mips64_linux_regsets_store_registers): Likewise.
8396 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
8397 mipsnbsd_store_inferior_registers): Likewise.
8398 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
8399 mips64obsd_store_inferior_registers): Likewise.
8400 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
8401 Likewise.
8402 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
8403 ppcfbsd_store_inferior_registers): Likewise.
8404 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
8405 ppc_linux_store_inferior_registers): Likewise.
8406 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
8407 ppcnbsd_store_inferior_registers): Likewise.
8408 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
8409 ppcobsd_store_registers): Likewise.
8410 * procfs.c (procfs_fetch_registers, procfs_store_registers):
8411 Likewise.
8412 * ravenscar-thread.c (ravenscar_fetch_registers,
8413 ravenscar_store_registers, ravenscar_prepare_to_store):
8414 Likewise.
8415 * record-btrace.c (record_btrace_fetch_registers,
8416 record_btrace_store_registers, record_btrace_prepare_to_store):
8417 Likewise.
8418 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
8419 Lookup inferior using ptid from regcache, instead of
8420 current_inferior.
8421 * remote.c (remote_fetch_registers, remote_store_registers): Use
8422 ptid from regcache.
8423 * rs6000-nat.c (fetch_register, store_register): Likewise.
8424 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
8425 s390_linux_store_inferior_registers): Likewise.
8426 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
8427 shnbsd_store_inferior_registers): Likewise.
8428 * sol-thread.c (sol_thread_fetch_registers,
8429 sol_thread_store_registers): Likewise.
8430 * sparc-nat.c (sparc_fetch_inferior_registers,
8431 sparc_store_inferior_registers): Likewise.
8432 * tilegx-linux-nat.c (fetch_inferior_registers,
8433 store_inferior_registers): Likewise.
8434 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
8435 vaxbsd_store_inferior_registers): Likewise.
8436 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
8437 store_xtregs): Likewise.
8438
8439 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8440
8441 PR gdb/14441
8442 * NEWS: Mention support for rvalue references in GDB and python.
8443 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
8444 supports both lvalue and rvalue references.
8445
8446 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8447
8448 PR gdb/14441
8449 * gdbtypes.c (rank_one_type): Implement overloading
8450 resolution rules regarding rvalue references.
8451
8452 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8453
8454 PR gdb/14441
8455 * aarch64-tdep.c (aarch64_type_align)
8456 (aarch64_extract_return_value, aarch64_store_return_value): Change
8457 lvalue reference type checks to general reference type checks.
8458 * amd64-tdep.c (amd64_classify): Likewise.
8459 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
8460 Likewise.
8461 * arm-tdep.c (arm_type_align, arm_extract_return_value)
8462 (arm_store_return_value): Likewise.
8463 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
8464 * c-typeprint.c (c_print_type): Likewise.
8465 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
8466 (cplus_number_of_children, cplus_describe_child): Likewise.
8467 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
8468 * completer.c (expression_completer): Likewise.
8469 * cp-support.c (make_symbol_overload_list_adl_namespace):
8470 Likewise.
8471 * darwin-nat-info.c (info_mach_region_command): Likewise.
8472 * dwarf2loc.c (entry_data_value_coerce_ref)
8473 (value_of_dwarf_reg_entry): Likewise.
8474 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
8475 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
8476 Likewise.
8477 * findvar.c (extract_typed_address, store_typed_address):
8478 Likewise.
8479 * gdbtypes.c (rank_one_type): Likewise.
8480 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
8481 * infcall.c (value_arg_coerce): Likewise.
8482 * language.c (pointer_type): Likewise.
8483 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
8484 Likewise.
8485 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
8486 * mn10300-tdep.c (mn10300_type_align): Likewise.
8487 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
8488 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
8489 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
8490 Likewise.
8491 * printcmd.c (print_formatted, x_command): Likewise.
8492 * python/py-type.c (typy_get_composite, typy_template_argument):
8493 Likewise.
8494 * python/py-value.c (valpy_referenced_value)
8495 (valpy_get_dynamic_type, value_has_field): Likewise.
8496 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
8497 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
8498 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
8499 * spu-tdep.c (spu_scalar_value_p): Likewise.
8500 * symtab.c (lookup_symbol_aux): Likewise.
8501 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
8502 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
8503 Likewise.
8504 * valops.c (value_cast_pointers, value_cast)
8505 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
8506 (value_struct_elt, value_struct_elt_bitpos)
8507 (value_find_oload_method_list, find_overload_match)
8508 (value_rtti_indirect_type): Likewise.
8509 * valprint.c (val_print_scalar_type_p, generic_val_print):
8510 Likewise.
8511 * value.c (value_actual_type, value_as_address, unpack_long)
8512 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
8513 (coerce_ref): Likewise.
8514 * varobj.c (varobj_get_value_type): Likewise.
8515
8516 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8517
8518 PR gdb/14441
8519 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
8520 table of constants.
8521 * python/lib/gdb/command/explore.py: Support exploring values
8522 of rvalue reference types.
8523 * python/lib/gdb/types.py: Implement get_basic_type() for
8524 rvalue reference types.
8525 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
8526 constant.
8527 * python/py-value.c (valpy_getitem): Add an rvalue reference
8528 check.
8529 (valpy_reference_value): Add new parameter "refcode".
8530 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
8531 New wrappers for valpy_reference_value().
8532 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
8533 (gdbpy_invoke_xmethod): Likewise.
8534
8535 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8536
8537 PR gdb/14441
8538 * dwarf2read.c (process_die, read_type_die_1): Handle the
8539 DW_TAG_rvalue_reference_type DIE.
8540 (read_tag_reference_type): Add new parameter "refcode".
8541
8542 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8543
8544 PR gdb/14441
8545 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
8546 (c_type_print_modifier, c_type_print_varspec_suffix)
8547 (c_type_print_base): Support printing rvalue reference types.
8548 * c-valprint.c (c_val_print, c_value_print): Support printing
8549 rvalue reference values.
8550
8551 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8552
8553 PR gdb/14441
8554 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
8555 typename.
8556 * cp-support.c (replace_typedefs): Handle
8557 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
8558 * python/py-type.c (typy_lookup_type): Likewise.
8559
8560 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8561
8562 PR gdb/14441
8563 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
8564 * parse.c (insert_type): Change assert statement.
8565 (follow_types): Handle rvalue reference types.
8566 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
8567 constant.
8568
8569 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8570
8571 PR gdb/14441
8572 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
8573 value_ref() interface.
8574 * c-valprint.c (c_value_print): Likewise.
8575 * infcall.c (value_arg_coerce): Likewise.
8576 * python/py-value.c (valpy_reference_value): Likewise.
8577 * valops.c (value_cast, value_reinterpret_cast)
8578 (value_dynamic_cast, typecmp): Likewise.
8579 (value_ref): Parameterize by kind of return value reference type.
8580 * value.h (value_ref): Add new parameter "refcode".
8581
8582 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8583
8584 PR gdb/14441
8585 * dwarf2read.c (read_tag_reference_type): Use
8586 lookup_lvalue_reference_type() instead of lookup_reference_type().
8587 * eval.c (evaluate_subexp_standard): Likewise.
8588 * f-exp.y: Likewise.
8589 * gdbtypes.c (make_reference_type, lookup_reference_type):
8590 Generalize with rvalue reference types.
8591 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
8592 convenience wrappers for lookup_reference_type().
8593 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
8594 reference kind parameter.
8595 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
8596 wrappers for lookup_reference_type().
8597 * guile/scm-type.c (gdbscm_type_reference): Use
8598 lookup_lvalue_reference_type() instead of lookup_reference_type().
8599 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
8600 * parse.c (follow_types): Likewise.
8601 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
8602 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
8603 Likewise.
8604 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
8605 (gdbpy_invoke_xmethod): Likewise.
8606 * stabsread.c: Provide extra argument to make_reference_type()
8607 call.
8608 * valops.c (value_ref, value_rtti_indirect_type): Use
8609 lookup_lvalue_reference_type() instead of lookup_reference_type().
8610
8611 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
8612
8613 PR gdb/14441
8614 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
8615 (TYPE_IS_REFERENCE): New macro.
8616 (struct type): Add rvalue_reference_type field.
8617 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
8618
8619 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
8620
8621 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
8622 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
8623 New function definition.
8624 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
8625 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
8626 New function declaration.
8627 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
8628 * mi/mi-interp.h: New file.
8629 * solib.c (info_sharedlibrary_command): Replace for loop with
8630 ALL_SO_LIBS macro
8631 * solib.h (update_solib_list): New function declaration.
8632 (so_list_head): Move macro.
8633 * solist.h (ALL_SO_LIBS): New macro.
8634
8635 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
8636
8637 * infcmd.c (post_create_inferior): Remove unused argument in
8638 call to solib_add.
8639 * remote.c (remote_start_remote): Likewise.
8640 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
8641 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
8642 (enable_break): Likewise.
8643 * solib.c (update_solib_list): Remove unused target argument
8644 and its documentation.
8645 (solib_add): Remove unused target argument. Remove unused
8646 argument in call to update_solib_list.
8647 (info_sharedlibrary_command): Remove unused argument in call
8648 to update_solib_list.
8649 (sharedlibrary_command): Remove unused argument in call to
8650 solib_add.
8651 (handle_solib_event): Likewise.
8652 (reload_shared_libraries): Likewise.
8653 * solib.h (solib_add): Remove unused target argument.
8654
8655 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
8656
8657 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
8658 (s390_displaced_step_fixup): Cover relative branches with the
8659 default fixup handling. This fixes lack of support for some
8660 relative branch instructions.
8661
8662 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8663
8664 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
8665 ptid from regcache.
8666
8667 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8668
8669 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
8670 i386_darwin_store_inferior_registers): Use ptid from regcache.
8671
8672 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8673
8674 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
8675 i386bsd_store_inferior_registers): Use ptid from regcache.
8676
8677 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8678
8679 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
8680 hppaobsd_store_registers): Use ptid from regcache.
8681
8682 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8683
8684 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
8685 hppanbsd_store_registers): Use ptid from regcache.
8686
8687 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8688
8689 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
8690 from regcache. Use get_ptrace_pid.
8691
8692 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8693
8694 * corelow.c (get_core_register_section): Use ptid from regcache,
8695 update doc.
8696
8697 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8698
8699 * bsd-uthread.c (bsd_uthread_fetch_registers,
8700 bsd_uthread_store_registers): Use ptid from regcache, set and
8701 restore inferior_ptid.
8702
8703 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8704
8705 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
8706 fetch_fp_regs, store_register, store_regs, store_fp_register,
8707 store_fp_regs): Use ptid from regcache.
8708
8709 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
8710
8711 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
8712 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
8713 store_vfp_regs): Use ptid from regcache.
8714
8715 2017-03-17 Pedro Alves <palves@redhat.com>
8716
8717 PR remote/21188
8718 * ser-base.c (ser_base_wait_for): Add comment.
8719 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
8720 version.
8721 * ser-unix.c (hardwire_raw): Remove reference to
8722 scb->current_timeout.
8723 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
8724 (hardwire_ops): Install ser_base_readchar instead of
8725 hardwire_readchar.
8726 * serial.h (struct serial) <current_timeout, timeout_remaining>:
8727 Remove fields.
8728
8729 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
8730
8731 PR gdb/19637
8732 * python/lib/gdb/printer/bound_registers.py: Add support for
8733 Python 3.
8734
8735 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
8736
8737 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
8738 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
8739 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
8740 byte_offset to subobj_byte_offset. Fix the handling of
8741 DWARF_VALUE_STACK on big-endian targets when coming via an
8742 implicit pointer.
8743 (dwarf2_evaluate_loc_desc): Adjust call to
8744 dwarf2_evaluate_loc_desc_full.
8745 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
8746 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
8747
8748 2017-03-16 Yao Qi <yao.qi@linaro.org>
8749
8750 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
8751 and REVSH instructions.
8752
8753 2017-03-16 Yao Qi <yao.qi@linaro.org>
8754
8755 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
8756 (arm_record_test): Declare.
8757 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
8758 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
8759 align with the manual.
8760 (thumb_record_misc): Adjust the code order to align with the
8761 manual.
8762 (thumb2_record_decode_insn_handler): Fix instruction matching.
8763 (instruction_reader_thumb): New class.
8764 (arm_record_test): New function.
8765
8766 2017-03-16 Yao Qi <yao.qi@linaro.org>
8767
8768 * arm-tdep.c (abstract_memory_reader): New class.
8769 (instruction_reader): New class.
8770 (extract_arm_insn): Add argument 'reader'. Callers updated.
8771 (decode_insn): Likewise.
8772
8773 2017-03-16 Doug Evans <dje@google.com>
8774
8775 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
8776 member. Change type of TYPE member to SCM. All uses updated.
8777 (lsscm_make_lazy_string_smob): Add assert.
8778 (lsscm_make_lazy_string): Flag bad length values.
8779 (lsscm_elt_type): New function.
8780 (gdbscm_lazy_string_to_value): Rewrite to use
8781 lsscm_safe_lazy_string_to_value.
8782 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
8783 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
8784 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
8785 in incoming type.
8786 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
8787 * guile/scm-type.c (tyscm_scm_to_type): New function.
8788
8789 2017-03-15 Doug Evans <dje@google.com>
8790
8791 PR python/17728, python/18439, python/18779
8792 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
8793 member. Change type of TYPE member to PyObject *. All uses updated.
8794 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
8795 (gdbpy_create_lazy_string_object): Flag bad length values.
8796 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
8797 Handle typedefs in incoming type.
8798 (stpy_lazy_string_elt_type): New function.
8799 (gdbpy_extract_lazy_string): Call it.
8800 * python/py-value.c (valpy_lazy_string): Flag bad length values.
8801 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
8802 typedefs in incoming type.
8803
8804 2017-03-16 Doug Evans <dje@google.com>
8805
8806 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
8807 * guile/scm-type.c (tyscm_scm_to_type): New function.
8808
8809 2017-03-16 Jiong Wang <jiong.wang@arm.com>
8810
8811 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
8812 "ULONGEST" for "skip".
8813
8814 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
8815
8816 PR gdb/21220
8817 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
8818 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
8819 (inf_ptrace_peek_poke): ...here. New function. Now also loop
8820 over ptrace peek/poke until end of buffer or error.
8821
8822 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
8823
8824 * parse.c (length_of_subexp): Make static.
8825 * parser-defs.h (length_of_subexp): Remove.
8826
8827 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
8828
8829 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
8830 as well.
8831
8832 2017-03-14 Pedro Alves <palves@redhat.com>
8833
8834 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
8835 (main): Use std::unique_ptr. Remove calls to
8836 cp_demangled_name_parse_free.
8837
8838 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8839
8840 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
8841 alphabsd_store_inferior_registers): Use regcache->ptid instead
8842 of inferior_ptid.
8843
8844 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8845
8846 * aix-thread.c (aix_thread_fetch_registers,
8847 aix_thread_store_registers): Use regcache->ptid instead of
8848 inferior_ptid.
8849
8850 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8851
8852 * aarch64-linux-nat.c (fetch_gregs_from_thread,
8853 store_gregs_to_thread, fetch_fpregs_from_thread,
8854 store_fpregs_to_thread): Use regcache->ptid instead of
8855 inferior_ptid.
8856
8857 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8858
8859 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
8860 amd64_linux_fetch_inferior_registers): Use regcache->ptid
8861 instead of inferior_ptid.
8862
8863 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8864
8865 * target.c (target_fetch_registers, target_store_registers): Add
8866 assert.
8867
8868 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8869
8870 * regcache.h (regcache_get_ptid): New function.
8871 * regcache.c (regcache_get_ptid): New function.
8872
8873 2017-03-13 Mark Wielaard <mark@klomp.org>
8874
8875 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
8876
8877 2017-03-10 Keith Seitz <keiths@redhat.com>
8878
8879 PR c++/8218
8880 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
8881
8882 2017-03-08 Pedro Alves <palves@redhat.com>
8883
8884 PR gdb/18360
8885 * infrun.c (start_step_over, do_target_resume, resume)
8886 (restart_threads): Assert we're not resuming a thread that is
8887 meant to be stopped.
8888 (infrun_thread_stop_requested_callback): Delete.
8889 (infrun_thread_stop_requested): If the thread is internally
8890 stopped, queue a pending stop event and clear the thread's
8891 inline-frame state.
8892 (handle_stop_requested): New function.
8893 (handle_syscall_event, handle_inferior_event_1): Use
8894 handle_stop_requested.
8895 (handle_stop_requested): New function.
8896 (handle_signal_stop): Set the thread's stop_signal here instead of
8897 at caller.
8898 (finish_step_over): Clear step over info unconditionally.
8899 (handle_signal_stop): If the user had interrupted the event
8900 thread, consider the stop a random signal.
8901 (handle_signal_stop) <signal arrived while stepping over
8902 breakpoint>: Don't restart threads here.
8903 (stop_waiting): Don't clear step-over info here.
8904
8905 2017-03-08 Pedro Alves <palves@redhat.com>
8906
8907 PR 21206
8908 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
8909 goes to argument 2, not 1.
8910
8911 2017-03-08 Pedro Alves <palves@redhat.com>
8912
8913 PR cli/21218
8914 * top.c (gdb_readline_wrapper): Avoid passing NULL to
8915 display_gdb_prompt.
8916 (command_line_input): Add comment.
8917
8918 2017-03-08 Pedro Alves <palves@redhat.com>
8919
8920 PR tui/21216
8921 * tui/tui-file.c (tui_file::write): New.
8922 * tui/tui-file.h (tui_file): Override "write".
8923 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
8924 factored out from ...
8925 (tui_puts): ... here.
8926 (tui_putc): Use them.
8927 (tui_write): New function.
8928 * tui/tui-io.h (tui_write): Declare.
8929
8930 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
8931
8932 * Makefile.in (SFILES): Replace "environ.c" with
8933 "common/environ.c".
8934 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
8935 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
8936 to...
8937 * common/environ.c: ... here.
8938 * environ.h: Moved to...
8939 * common/environ.h: ... here.
8940
8941 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
8942
8943 * gdbarch.sh (pstring_ptr): New static function.
8944 (gdbarch_disassembler_options): Use it.
8945 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
8946 not valid_disassembler_option->name.
8947 * gdbarch.c: Regenerate.
8948
8949 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
8950
8951 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
8952
8953 2017-03-07 Pedro Alves <palves@redhat.com>
8954
8955 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
8956
8957 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
8958
8959 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
8960 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
8961 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
8962 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
8963
8964 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
8965
8966 * xtensa-linux-nat.c (fetch_gregs): Remove const.
8967
8968 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
8969
8970 * remote.c (remote_add_target_side_commands): Use range-based
8971 for loop.
8972
8973 2017-03-03 Yao Qi <yao.qi@linaro.org>
8974
8975 PR gdb/21165
8976 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
8977 value is lazy.
8978 * valprint.c (common_val_print): Likewise.
8979
8980 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
8981
8982 * NEWS: Mention new set/show disassembler-options commands.
8983 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
8984 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
8985 (prospective_options): New static variable.
8986 (gdb_disassembler::gdb_disassembler): Initialize
8987 m_di.disassembler_options.
8988 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
8989 (get_disassembler_options): New function.
8990 (set_disassembler_options): Likewise.
8991 (set_disassembler_options_sfunc): Likewise.
8992 (show_disassembler_options_sfunc): Likewise.
8993 (disassembler_options_completer): Likewise.
8994 (_initialize_disasm): Likewise.
8995 * disasm.h (get_disassembler_options): New prototype.
8996 (set_disassembler_options): Likewise.
8997 * gdbarch.sh (gdbarch_disassembler_options): New variable.
8998 (gdbarch_verify_disassembler_options): Likewise.
8999 * gdbarch.c: Regenerate.
9000 * gdbarch.h: Likewise.
9001 * arm-tdep.c (num_disassembly_options): Delete.
9002 (set_disassembly_style): Likewise.
9003 (arm_disassembler_options): New static variable.
9004 (set_disassembly_style_sfunc): Convert short style name into long
9005 option name. Call set_disassembler_options.
9006 (show_disassembly_style_sfunc): New function.
9007 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
9008 set_gdbarch_verify_disassembler_options.
9009 (_initialize_arm_tdep): Delete regnames variable and update callers.
9010 (arm_disassembler_options): Initialize.
9011 (disasm_options): New variable.
9012 (num_disassembly_options): Rename from this...
9013 (num_disassembly_styles): ...to this. Compute by scanning through
9014 disasm_options.
9015 (valid_disassembly_styles): Initialize using disasm_options.
9016 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
9017 set_arm_regname_option.
9018 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
9019 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
9020 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
9021 set_gdbarch_verify_disassembler_options.
9022 * s390-tdep.c (s390_disassembler_options): New static variable.
9023 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
9024 set_gdbarch_verify_disassembler_options.
9025
9026 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9027
9028 * remote.c (remote_add_target_side_condition): Remove "struct"
9029 keyword from range-based for loop.
9030
9031 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
9032
9033 * remote.c (remote_add_target_side_condition): Use range-based
9034 for loop. Update comment.
9035
9036 2017-02-27 Yao Qi <yao.qi@linaro.org>
9037
9038 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
9039
9040 2017-02-26 Alan Hayward <alan.hayward@arm.com>
9041
9042 * regcache.c (regcache_raw_update): New function.
9043 (regcache_raw_read): Move code to regcache_raw_update.
9044 * regcache.h (regcache_raw_update): New declaration.
9045 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
9046
9047 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
9048
9049 * dwarf2read.c (create_debug_type_hash_table): Initialize
9050 header.signature and header.type_offset_in_tu.
9051
9052 2017-02-24 Pedro Alves <palves@redhat.com>
9053
9054 * symtab.c (make_file_symbol_completion_list_1): Use
9055 add_symtab_completions.
9056
9057 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9058
9059 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
9060
9061 2017-02-24 Alan Hayward <alan.hayward@arm.com>
9062
9063 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
9064 I386_MAX_REGISTER_SIZE.
9065 (i386_pseudo_register_write): Likewise.
9066 (i386_process_record): Likewise.
9067 * i387-tdep.c (i387_supply_xsave): Likewise.
9068 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
9069 (store_register): Likewise.
9070
9071 2017-02-23 Pedro Alves <palves@redhat.com>
9072
9073 * ada-lang.c: Include "common/function-view.h".
9074 (ada_iterate_over_symbols): Adjust to use function_view as
9075 callback type.
9076 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
9077 (ada_make_symbol_completion_list): Use a lambda.
9078 (ada_exc_search_name_matches): Delete.
9079 (name_matches_regex): New.
9080 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
9081 * compile/compile-c-support.c: Include "common/function-view.h".
9082 (print_one_macro): Change prototype to accept a ui_file pointer.
9083 (write_macro_definitions): Use a lambda.
9084 * dwarf2read.c: Include "common/function-view.h".
9085 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
9086 (dw2_expand_symtabs_matching): Adjust to use function_view as
9087 callback type.
9088 * language.h: Include "common/function-view.h".
9089 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
9090 function_view as callback type.
9091 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
9092 * linespec.c: Include "common/function-view.h".
9093 (collect_info::add_symbol): New method.
9094 (struct symbol_and_data_callback, iterate_inline_only, struct
9095 symbol_matcher_data, iterate_name_matcher): Delete.
9096 (iterate_over_all_matching_symtabs): Adjust to use function_view
9097 as callback type and lambdas.
9098 (iterate_over_file_blocks): Adjust to use function_view as
9099 callback type.
9100 (decode_compound_collector): Now a class with private fields.
9101 (decode_compound_collector::release_symbols): New method.
9102 (collect_one_symbol): Rename to...
9103 (decode_compound_collector::operator()): ... this and adjust.
9104 (lookup_prefix_sym): decode_compound_collector construction bits
9105 move to decode_compound_collector ctor. Pass the
9106 decode_compound_collector object directly as callback. Remove
9107 cleanups and use decode_compound_collector::release_symbols
9108 instead.
9109 (symtab_collector): Now a class with private fields.
9110 (symtab_collector::release_symtabs): New method.
9111 (add_symtabs_to_list): Rename to...
9112 (symtab_collector::operator()): ... this and adjust.
9113 (collect_symtabs_from_filename): symtab_collector construction
9114 bits move to symtab_collector ctor. Pass the symtab_collector
9115 object directly as callback. Remove cleanups and use
9116 symtab_collector::release_symtabs instead.
9117 (collect_symbols): Delete.
9118 (add_matching_symbols_to_info): Use lambdas.
9119 * macrocmd.c (print_macro_callback): Delete.
9120 (info_macro_command): Use a lambda.
9121 (info_macros_command): Pass print_macro_definition as callable
9122 directly.
9123 (print_one_macro): Remove 'ignore' parameter.
9124 (macro_list_command): Adjust.
9125 * macrotab.c (macro_for_each_data::fn): Now a function_view.
9126 (macro_for_each_data::user_data): Delete field.
9127 (foreach_macro): Adjust to call the function_view.
9128 (macro_for_each): Adjust to use function_view as callback type.
9129 (foreach_macro_in_scope): Adjust to call the function_view.
9130 (macro_for_each_in_scope): Adjust to use function_view as callback
9131 type.
9132 * macrotab.h: Include "common/function-view.h".
9133 (macro_callback_fn): Declare a prototype instead of a pointer.
9134 Remove "user_data" parameter.
9135 (macro_for_each, macro_for_each_in_scope): Adjust to use
9136 function_view as callback type.
9137 * psymtab.c (partial_map_expand_apply)
9138 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
9139 Adjust to use function_view as callback type and to return bool.
9140 (psym_expand_symtabs_matching): Adjust to use function_view as
9141 callback types.
9142 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
9143 to use function_view as callback type and to return bool.
9144 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
9145 callback types.
9146 * symfile.c (expand_symtabs_matching): Adjust to use function_view
9147 as callback types.
9148 * symfile.h: Include "common/function-view.h".
9149 (expand_symtabs_file_matcher_ftype)
9150 (expand_symtabs_symbol_matcher_ftype)
9151 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
9152 return bool.
9153 (quick_symbol_functions::map_symtabs_matching_filename)
9154 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
9155 function_view as callback type and return bool.
9156 (expand_symtabs_matching): Adjust to use function_view as callback
9157 type.
9158 (maintenance_expand_name_matcher)
9159 (maintenance_expand_file_matcher): Delete.
9160 (maintenance_expand_symtabs): Use lambdas.
9161 * symtab.c (iterate_over_some_symtabs): Adjust to use
9162 function_view as callback types and return bool.
9163 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
9164 of a cleanup.
9165 (lookup_symtab_callback): Delete.
9166 (lookup_symtab): Use a lambda.
9167 (iterate_over_symbols): Adjust to use function_view as callback
9168 type.
9169 (struct search_symbols_data, search_symbols_file_matches)
9170 (search_symbols_name_matches): Delete.
9171 (search_symbols): Use a pair of lambdas.
9172 (struct add_name_data, add_macro_name, symbol_completion_matcher)
9173 (symtab_expansion_callback): Delete.
9174 (default_make_symbol_completion_list_break_on_1): Use lambdas.
9175 * symtab.h: Include "common/function-view.h".
9176 (iterate_over_some_symtabs): Adjust to use function_view as
9177 callback type and return bool.
9178 (iterate_over_symtabs): Adjust to use function_view as callback
9179 type.
9180 (symbol_found_callback_ftype): Remove 'data' parameter and return
9181 bool.
9182 (iterate_over_symbols): Adjust to use function_view as callback
9183 type.
9184
9185 2017-02-23 Pedro Alves <palves@redhat.com>
9186
9187 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
9188 (%.o) <unittests/%.c>: New pattern.
9189 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
9190 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
9191 * common/function-view.h: New file.
9192 * unittests/function-view-selftests.c: New file.
9193 * configure: Regenerate.
9194
9195 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
9196
9197 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
9198 inferior_ptid.
9199 * go32-nat.c (go32_thread_alive): Likewise.
9200
9201 2017-02-23 Yao Qi <yao.qi@linaro.org>
9202
9203 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
9204 delete.
9205
9206 2017-02-23 Yao Qi <yao.qi@linaro.org>
9207
9208 * varobj.c (varobj_clear_saved_item): Use delete instead of
9209 xfree.
9210 (update_dynamic_varobj_children): Likewise.
9211
9212 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9213
9214 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
9215
9216 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
9217
9218 * common/enum-flags.h (enum_flags::enum_flags): Initialize
9219 m_enum_value to 0 in default constructor.
9220
9221 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9222
9223 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
9224 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
9225 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
9226 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
9227 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
9228 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
9229 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
9230 IS_STORE_CONDITIONAL_INSN.
9231
9232 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9233
9234 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
9235
9236 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9237
9238 * NEWS (Changes since GDB 7.12): Add DWARF-5.
9239
9240 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9241
9242 * dwarf2read.c (skip_one_die, read_attribute_value)
9243 (dwarf2_const_value_attr, dump_die_shallow)
9244 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9245 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
9246
9247 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9248
9249 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
9250 (dwarf_parse_macro_header): Accept DWARF version 5.
9251 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
9252
9253 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9254
9255 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
9256 DW_AT_GNU_*.
9257 * common/common-exceptions.h (enum errors): Likewise.
9258 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
9259 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
9260 (dwarf_expr_context::execute_stack_op): Likewise.
9261 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
9262 Likewise.
9263 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
9264 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
9265 (show_entry_values_debug, call_site_to_target_addr)
9266 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
9267 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
9268 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
9269 (value_of_dwarf_block_entry, indirect_pieced_value)
9270 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
9271 (disassemble_dwarf_expression): Likewise.
9272 * dwarf2read.c (process_die, inherit_abstract_dies)
9273 (read_call_site_scope): Likewise.
9274 * gdbtypes.h (struct func_type, struct call_site_parameter)
9275 (struct call_site): Likewise.
9276 * stack.c (read_frame_arg): Likewise.
9277 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
9278
9279 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9280
9281 * defs.h (read_unsigned_leb128): New declaration.
9282 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
9283 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
9284 (dwarf2_find_location_expression): Call also
9285 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
9286 * dwarf2loc.h (dwarf2_version): New declaration.
9287 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
9288 rnglists.
9289 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
9290 .debug_rnglists.
9291 (struct dwop_section_names): Add loclists_dwo.
9292 (dwop_section_names): Add .debug_loclists.dwo.
9293 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
9294 (struct dwarf2_per_cu_data): Add dwarf_version.
9295 (struct dwo_sections): Add loclists.
9296 (struct attr_abbrev): Add implicit_const.
9297 (read_indirect_line_string): New declaration.
9298 (read_unsigned_leb128): Delete declaration.
9299 (rcuh_kind): New definition.
9300 (read_and_check_comp_unit_head): Change parameter
9301 is_debug_types_section to section_kind.
9302 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
9303 (read_comp_unit_head): Change parameter abfd to section, add parameter
9304 section_kind. Handle DWARF-5.
9305 (error_check_comp_unit_head): Accept also DWARF version 5.
9306 (read_and_check_comp_unit_head): Change parameter
9307 is_debug_types_section to section_kind.
9308 (read_and_check_type_unit_head): Delete function.
9309 (read_abbrev_offset): Handle DWARF-5.
9310 (create_debug_type_hash_table): Add parameter section_kind. Process
9311 only DW_UT_type. Use signature and type_offset_in_tu from struct
9312 comp_unit_head.
9313 (create_debug_types_hash_table): Update create_debug_type_hash_table
9314 caller.
9315 (create_all_type_units): Call create_debug_type_hash_table.
9316 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
9317 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
9318 caller.
9319 (skip_one_die): Handle DW_FORM_implicit_const.
9320 (dwarf2_rnglists_process): New function.
9321 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
9322 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
9323 (read_attribute_value): Handle DW_FORM_implicit_const,
9324 DW_FORM_line_strp.
9325 (read_attribute): Handle DW_FORM_implicit_const.
9326 (read_indirect_string_at_offset_from): New function from
9327 read_indirect_string_at_offset.
9328 (read_indirect_string_at_offset): Call
9329 read_indirect_string_at_offset_from.
9330 (read_indirect_line_string_at_offset): New function.
9331 (read_indirect_string): New function comment.
9332 (read_indirect_line_string): New function.
9333 (read_unsigned_leb128): Make it global.
9334 (dwarf2_string_attr): Handle DWARF-5.
9335 (add_include_dir_stub, read_formatted_entries): New functions.
9336 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
9337 Handle DWARF-5.
9338 (per_cu_header_read_in): Update read_comp_unit_head caller.
9339 (dwarf2_version): New function.
9340 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
9341 rnglists.
9342 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
9343 fields.
9344
9345 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9346
9347 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
9348
9349 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9350
9351 * dwarf2read.c (dwarf2_ranges_process): New function from
9352 dwarf2_ranges_read.
9353 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
9354 dwarf2_ranges_process.
9355
9356 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9357
9358 * dwarf2read.c (create_debug_type_hash_table): New function from
9359 create_debug_types_hash_table.
9360 (create_debug_types_hash_table): Call create_debug_type_hash_table.
9361 (create_all_type_units, open_and_init_dwo_file): Update
9362 create_debug_types_hash_table callers.
9363
9364 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9365
9366 PR gdb/16188
9367 * fork-child.c (trace_start_error): Fix thinko. va_end should
9368 refer to 'ap', not 'args'.
9369
9370 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9371 Pedro Alves <palves@redhat.com>
9372
9373 PR gdb/16188
9374 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
9375 calls succeeded.
9376 * fork-child.c (trace_start_error): New function.
9377 (trace_start_error_with_name): Likewise.
9378 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
9379 * inf-ptrace.c (inf_ptrace_me): Likewise.
9380 * inferior.h (trace_start_error): New prototype.
9381 (trace_start_error_with_name): Likewise.
9382
9383 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
9384
9385 PR gdb/21164
9386 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
9387 NULL before using it.
9388 * symmisc.c (maintenance_print_symbols): Likewise.
9389 (maintenance_print_msymbols): Likewise.
9390
9391 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9392
9393 * NEWS: Add record Python bindings entry.
9394
9395 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9396
9397 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
9398 py-record-full.o.
9399 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
9400 * python/py-record-btrace.c, python/py-record-btrace.h,
9401 python/py-record-full.c, python/py-record-full.h: New file.
9402 * python/py-record.c: Add include for py-record-btrace.h and
9403 py-record-full.h.
9404 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
9405 recpy_instruction_history, recpy_function_call_history, recpy_begin,
9406 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
9407 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
9408 New definition.
9409 (gdbpy_initialize_btrace): New export.
9410 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
9411
9412 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9413
9414 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
9415 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
9416 * python/py-record.c: New file.
9417 * python/python-internal.h (gdbpy_start_recording,
9418 gdbpy_current_recording, gdpy_stop_recording,
9419 gdbpy_initialize_record): New export.
9420 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
9421 (python_GdbMethods): Add gdbpy_start_recording,
9422 gdbpy_current_recording and gdbpy_stop_recording.
9423
9424 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9425
9426 * record-btrace.c (record_btrace_record_method): New function.
9427 (init_record_btrace_ops): Initialize to_record_method.
9428 * record-full.c (record_full_record_method): New function.
9429 (init_record_full_ops, init_record_full_core_ops): Add
9430 record_full_record_method.
9431 * record.h (enum record_method): New enum.
9432 * target-debug.h (target_debug_print_enum_record_method: New define.
9433 * target-delegates.c: Regenerate.
9434 * target.c (target_record_method): New function.
9435 * target.h: Include record.h.
9436 (struct target_ops) <to_record_method>: New field.
9437 (target_record_method): New export.
9438
9439 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9440
9441 * record.h (record_start, record_stop): New export.
9442 * record.c (record_start, record_stop): New function.
9443
9444 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9445
9446 * btrace.c (btrace_fetch): Copy function call segments pointer
9447 into a vector.
9448 (btrace_clear): Clear the vector.
9449 (btrace_find_insn_by_number): Use binary search to find the correct
9450 function call segment.
9451 * btrace.h (brace_fun_p): New typedef.
9452 (struct btrace_thread_info) <functions>: New field.
9453
9454 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9455
9456 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
9457 * btrace.c (btrace_decode_error): ... here. New function.
9458 * btrace.h (btrace_decode_error): New export.
9459
9460 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
9461
9462 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
9463 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
9464 btrace_find_insn_by_number): Remove special case for gaps.
9465 * btrace.h (btrace_insn_get_error): New export.
9466 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
9467 * record-btrace.c (btrace_insn_history): Print number for gaps.
9468 (record_btrace_info, record_btrace_goto): Handle gaps.
9469
9470 2017-02-14 Tom Tromey <tom@tromey.com>
9471
9472 PR python/13598:
9473 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
9474 event.
9475 * python/py-evts.c (gdbpy_initialize_py_events): Add
9476 before_prompt registry.
9477 * python/py-events.h (events_object) <before_prompt>: New field.
9478
9479 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
9480
9481 * btrace.c (ftrace_new_switch): Preserve up link and flags.
9482
9483 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
9484
9485 * symfile (_initialize_symfile): Add usage text to the load command's
9486 help text.
9487
9488 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
9489
9490 * utils.c (defaulted_query): Don't query on secondary UIs.
9491
9492 2017-02-10 Tom Tromey <tom@tromey.com>
9493
9494 * rust-lang.c (rust_get_disr_info): Remove unused variable.
9495
9496 2017-02-10 Tom Tromey <tom@tromey.com>
9497
9498 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
9499 "cleanup" local.
9500 * python/py-type.c (typy_legacy_template_argument): Remove
9501 unnecessary "cleanup" local.
9502
9503 2017-02-10 Tom Tromey <tom@tromey.com>
9504
9505 * python/python.c (do_start_initialization): New function, from
9506 _initialize_python.
9507 (_initialize_python): Call do_start_initialization.
9508 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
9509 goto.
9510
9511 2017-02-10 Tom Tromey <tom@tromey.com>
9512
9513 * python/py-prettyprint.c (pretty_print_one_value): Use
9514 gdbpy_ref.
9515
9516 2017-02-10 Tom Tromey <tom@tromey.com>
9517
9518 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
9519 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
9520 gdbpy_ref.
9521 * python/py-type.c (field_new): Use gdbpy_ref.
9522 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
9523 gdbpy_ref.
9524 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
9525 (py_free_pspace): Likewise.
9526 (pspace_to_pspace_object): Likewise.
9527 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
9528 (py_free_objfile): Likewise.
9529 (objfile_to_objfile_object): Likewise.
9530 * python/py-inferior.c (delete_thread_object): Use
9531 gdbpy_ref.
9532 (infpy_read_memory): Likewise.
9533 (py_free_inferior): Likewise.
9534 * python/py-evtregistry.c (create_eventregistry_object): Use
9535 gdbpy_ref.
9536 * python/py-event.c (create_event_object): Use gdbpy_ref.
9537
9538 2017-02-10 Tom Tromey <tom@tromey.com>
9539
9540 * python/py-ref.h (gdbpy_ref_policy): Now a template.
9541 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
9542 used.
9543 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
9544 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
9545 python/py-exitedevent.c, python/py-finishbreakpoint.c,
9546 python/py-framefilter.c, python/py-function.c,
9547 python/py-inferior.c, python/py-infevents.c,
9548 python/py-linetable.c, python/py-newobjfileevent.c,
9549 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
9550 python/py-signalevent.c, python/py-stopevent.c,
9551 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
9552 python/py-unwind.c, python/py-utils.c, python/py-value.c,
9553 python/py-varobj.c, python/py-xmethods.c, python/python.c,
9554 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
9555
9556 2017-02-10 Tom Tromey <tom@tromey.com>
9557
9558 * ui-out.h (ui_out_emit_type): New class.
9559 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
9560 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
9561 and ui_out_emit_tuple.
9562 (enumerate_locals): Likewise.
9563 (py_mi_print_variables, py_print_locals, py_print_args): Use
9564 ui_out_emit_list.
9565 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
9566 ui_out_emit_list.
9567 * common/gdb_optional.h: New file.
9568
9569 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
9570
9571 * MAINTAINERS (Write After Approval): Update my e-mail address.
9572
9573 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
9574
9575 PR gdb/21122
9576 * breakpoint.c (_initialize_breakpoint): Update the help description
9577 of the 'commands' command to indicate that it takes a list argument.
9578
9579 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
9580
9581 * interps.c (current_interp_set_logging): Remove "return".
9582
9583 2017-02-09 Gary Benson <gbenson@redhat.com>
9584
9585 * symtab.c (add_symtab_completions): Prevent NULL pointer
9586 dereference.
9587
9588 2017-02-08 Pedro Alves <palves@redhat.com>
9589
9590 * interps.c (interp::interp): Remove reference to quiet_p.
9591 (interp_set): Make static. Remove dead "Switching to" output
9592 code.
9593 (interp_quiet_p, interp_set_quiet): Delete.
9594 (interpreter_exec_cmd): Don't set the interpreter quiet.
9595 * interps.h (interp_quiet_p): Make static.
9596 (class interp) <quiet_p>: Remove field
9597
9598 2017-02-08 Jerome Guitton <guitton@adacore.com>
9599
9600 * cli/cli-decode.c (find_command_name_length): Make it extern.
9601 * cli/cli-decode.h (find_command_name_length): Declare.
9602 * cli/cli-script.c (command_name_equals, line_first_arg):
9603 New functions.
9604 (process_next_line): Use cli-decode to parse command names.
9605 (build_command_line): Make args a constant pointer.
9606
9607 2017-02-08 Jerome Guitton <guitton@adacore.com>
9608
9609 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
9610 Remove case-insensitive search.
9611
9612 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
9613
9614 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
9615 at the end of the line. Avoids an ARI warning.
9616
9617 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
9618
9619 * NEWS: Mention support for record/replay of Intel 64 rdrand and
9620 rdseed instructions.
9621 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
9622
9623 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
9624
9625 PR tdep/20936
9626 Provide and use sparc32 and sparc64 target description XML files.
9627 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
9628 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
9629 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
9630 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
9631 * features/sparc/sparc32-solaris.xml: New file.
9632 * features/sparc/sparc64-solaris.xml: New file.
9633 * features/sparc/sparc32-solaris.c: Generated.
9634 * features/sparc/sparc64-solaris.c: Generated.
9635 * sparc-tdep.h: Account for differences in target descriptions.
9636 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
9637 (sparc32_register_type): Use target provided registers.
9638 (validate_tdesc_registers): New function.
9639 (sparc32_gdbarch_init): Use tdesc_has_registers.
9640 Set pseudoregister functions.
9641 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
9642 (sparc64_register_type): Use target provided registers.
9643 (sparc64_init_abi): Set pseudoregister functions.
9644
9645 2017-02-03 Tom Tromey <tom@tromey.com>
9646
9647 PR rust/21097:
9648 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
9649 with a single member.
9650
9651 2017-02-03 Pedro Alves <palves@redhat.com>
9652
9653 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
9654 (cli_interp_base::~cli_interp_base): New.
9655 (cli_interp): New struct.
9656 (as_cli_interp): Cast the interp itself to cli_interp.
9657 (cli_interpreter_pre_command_loop): Rename to ...
9658 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
9659 parameter.
9660 (cli_interpreter_init): Rename to ...
9661 (cli_interp::init): ... this. Remove 'self' parameter. Use
9662 boolean. Make extern.
9663 (cli_interpreter_resume): Rename to ...
9664 (cli_interp::resume): ... this. Remove 'data' parameter. Make
9665 extern.
9666 (cli_interpreter_suspend): Rename to ...
9667 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
9668 extern.
9669 (cli_interpreter_exec): Rename to ...
9670 (cli_interp::exec): ... this. Remove 'data' parameter. Make
9671 extern.
9672 (cli_interpreter_supports_command_editing): Rename to ...
9673 (cli_interp_base::supports_command_editing): ... this. Remove
9674 'interp' parameter. Make extern.
9675 (cli_ui_out): Rename to ...
9676 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
9677 Make extern.
9678 (cli_set_logging): Rename to ...
9679 (cli_interp_base::set_logging): ... this. Remove 'interp'
9680 parameter. Make extern.
9681 (cli_interp_procs): Delete.
9682 (cli_interp_factory): Adjust to use "new".
9683 * cli/cli-interp.h: Include "interps.h".
9684 (struct cli_interp_base): New struct.
9685 * interps.c (struct interp): Delete. Fields moved to interps.h.
9686 (interp_new): Delete.
9687 (interp::interp, interp::~interp): New.
9688 (interp_set): Use bool, and return void. Assume the interpreter
9689 has suspend, init and resume methods, and that the all return
9690 void.
9691 (set_top_level_interpreter): interp_set returns void.
9692 (interp_ui_out): Adapt.
9693 (current_interp_set_logging): Adapt.
9694 (interp_data): Delete.
9695 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
9696 (interp_exec): Adapt.
9697 (top_level_interpreter_data): Delete.
9698 * interps.h (interp_init_ftype, interp_resume_ftype)
9699 (interp_suspend_ftype, interp_exec_ftype)
9700 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
9701 (class interp): New.
9702 (interp_new): Delete.
9703 (interp_set): Now returns void. Use bool.
9704 (interp_data, top_level_interpreter_data): Delete.
9705 * mi/mi-common.h: Include interps.h.
9706 (class mi_interp): Inherit from interp. Define a ctor. Declare
9707 init, resume, suspect, exec, interp_ui_out, set_logging and
9708 pre_command_loop methods.
9709 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
9710 (mi_interpreter_init): Rename to ...
9711 (mi_interp::init): ... this. Remove the 'interp' parameter, use
9712 bool, return void and make extern. Adjust.
9713 (mi_interpreter_resume): ... Rename to ...
9714 (mi_interp::resume): ... this. Remove the 'data' parameter,
9715 return void and make extern. Adjust.
9716 (mi_interpreter_suspend): ... Rename to ...
9717 (mi_interp::suspend): ... this. Remove the 'data' parameter,
9718 return void and make extern. Adjust.
9719 (mi_interpreter_exec): ... Rename to ...
9720 (mi_interp::exec): ... this. Remove the 'data' parameter and make
9721 extern. Adjust.
9722 (mi_interpreter_pre_command_loop): ... Rename to ...
9723 (mi_interp::pre_command_loop): ... this. Remove the 'self'
9724 parameter and make extern.
9725 (mi_on_normal_stop_1): Adjust.
9726 (mi_ui_out): Rename to ...
9727 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
9728 parameter and make extern. Adjust.
9729 (mi_set_logging): Rename to ...
9730 (mi_interp::set_logging): ... this. Remove the 'interp'
9731 parameter and make extern. Adjust.
9732 (mi_interp_procs): Delete.
9733 (mi_interp_factory): Adjust to use 'new'.
9734 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
9735 (mi_print_exception, mi_execute_command, mi_load_progress):
9736 Adjust.
9737 * tui/tui-interp.c (tui_interp): New class.
9738 (as_tui_interp): Return a tui_interp pointer.
9739 (tui_on_normal_stop, tui_on_signal_received)
9740 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
9741 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
9742 to use interp::interp_ui_out.
9743 (tui_init): Rename to ...
9744 (tui_interp::init): ... this. Remove the 'self' parameter, use
9745 bool, return void and make extern. Adjust.
9746 (tui_resume): Rename to ...
9747 (tui_interp::resume): ... this. Remove the 'data' parameter,
9748 return void and make extern. Adjust.
9749 (tui_suspend): Rename to ...
9750 (tui_interp::suspend): ... this. Remove the 'data' parameter,
9751 return void and make extern. Adjust.
9752 (tui_ui_out): Rename to ...
9753 (tui_interp::interp_ui_out): ... this. Remove the 'self'
9754 parameter, and make extern. Adjust.
9755 (tui_exec): Rename to ...
9756 (tui_interp::exec): ... this. Remove the 'data' parameter and
9757 make extern.
9758 (tui_interp_procs): Delete.
9759 (tui_interp_factory): Use "new".
9760
9761 2017-02-02 Tom Tromey <tom@tromey.com>
9762
9763 * rust-exp.y (ends_raw_string, space_then_number)
9764 (rust_identifier_start_p): Return bool.
9765 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
9766 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
9767 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
9768 (rust_chartype_p): Return bool.
9769 (val_print_struct, rust_print_struct_def, rust_print_type):
9770 Update.
9771 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
9772 Return bool.
9773
9774 2017-02-02 Tom Tromey <tom@tromey.com>
9775
9776 * rust-lang.c: Reindent.
9777
9778 2017-02-02 Tom Tromey <tom@tromey.com>
9779
9780 * rust-lang.h (rust_crate_for_block): Update.
9781 * rust-lang.c (rust_crate_for_block): Return std::string.
9782 (rust_get_disr_info): Use std:;string, not
9783 gdb::unique_xmalloc_ptr.
9784 * rust-exp.y (crate_name): Update.
9785
9786 2017-02-02 Pedro Alves <palves@redhat.com>
9787
9788 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
9789 field out of gdb_disassembler_test and make it static.
9790
9791 2017-02-02 Pedro Alves <palves@redhat.com>
9792
9793 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
9794 mi1_interp and mi_interp fields.
9795
9796 2017-02-02 Pedro Alves <palves@redhat.com>
9797
9798 * cli/cli-interp.c (struct saved_output_files, saved_output):
9799 Moved from cli/cli-logging.c.
9800 (cli_set_logging): New function.
9801 (cli_interp_procs): Install cli_set_logging.
9802 * cli/cli-interp.h (make_logging_output, cli_set_logging):
9803 Declare.
9804 * cli/cli-logging.c (struct saved_output_files, saved_output):
9805 Moved to cli/cli-interp.c.
9806 (pop_output_files): Don't save outputs here.
9807 (make_logging_output): New function.
9808 (handle_redirections): Don't build tee nor save previous outputs
9809 here.
9810 * interps.c (current_interp_set_logging): Change prototype.
9811 Assume there's always a set_logging_proc method installed.
9812 * interps.h (interp_set_logging_ftype): Change prototype.
9813 (current_interp_set_logging): Change prototype and adjust comment.
9814 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
9815 use make_logging_output.
9816 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
9817 2017-02-02 Pedro Alves <palves@redhat.com>
9818
9819 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
9820 from ...
9821 (set_logging_overwrite): ... here.
9822 (logging_no_redirect_file): Delete.
9823 (set_logging_redirect): Don't handle redirection on the fly.
9824 Instead warn that "logging off" / "logging on" is necessary.
9825 (pop_output_files): Delete references to logging_no_redirect_file.
9826 (show_logging_command): Always speak in terms of what will happen
9827 once logging is reenabled.
9828
9829 2017-02-02 Pedro Alves <palves@redhat.com>
9830
9831 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
9832
9833 2017-02-02 Pedro Alves <palves@redhat.com>
9834
9835 * disasm.c (gdb_pretty_print_insn): Rename to ...
9836 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
9837 Remove gdbarch parameter. Adapt to clear the object's buffers
9838 instead of allocating new buffers, and to print using the object's
9839 gdb_disassembler instead of calling gdb_print_insn.
9840 (dump_insns): Use gdb_pretty_print_disassembler.
9841 * disasm.h (gdb_pretty_print_insn): Delete declaration.
9842 (gdb_pretty_print_disassembler): New class.
9843 * record-btrace.c (btrace_insn_history): Use
9844 gdb_pretty_print_disassembler.
9845
9846 2017-02-02 Pedro Alves <palves@redhat.com>
9847
9848 * ada-lang.c (type_as_string): Use string_file.
9849 * ada-valprint.c (ada_print_floating): Use string_file.
9850 * ada-varobj.c (ada_varobj_scalar_image)
9851 (ada_varobj_get_value_image): Use string_file.
9852 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
9853 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
9854 * breakpoint.c (update_inserted_breakpoint_locations)
9855 (insert_breakpoint_locations, reattach_breakpoints)
9856 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
9857 (print_it_watchpoint): Use string_file.
9858 (save_breakpoints): Use stdio_file.
9859 * c-exp.y (oper): Use string_file.
9860 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
9861 tee_file.
9862 (pop_output_files): Use delete.
9863 (handle_redirections): Use stdio_file and tee_file.
9864 * cli/cli-setshow.c (do_show_command): Use string_file.
9865 * compile/compile-c-support.c (c_compute_program): Use
9866 string_file.
9867 * compile/compile-c-symbols.c (generate_vla_size): Take a
9868 'string_file &' instead of a 'ui_file *'.
9869 (generate_c_for_for_one_variable): Take a 'string_file &' instead
9870 of a 'ui_file *'. Use string_file.
9871 (generate_c_for_variable_locations): Take a 'string_file &'
9872 instead of a 'ui_file *'.
9873 * compile/compile-internal.h (generate_c_for_for_one_variable):
9874 Take a 'string_file &' instead of a 'ui_file *'.
9875 * compile/compile-loc2c.c (push, pushf, unary, binary)
9876 (print_label, pushf_register_address, pushf_register)
9877 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
9878 'ui_file *'. Adjust.
9879 * compile/compile.c (compile_to_object): Use string_file.
9880 * compile/compile.h (compile_dwarf_expr_to_c)
9881 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
9882 'ui_file *'.
9883 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
9884 (replace_typedefs_qualified_name): Use string_file and
9885 obstack_copy0.
9886 * disasm.c (gdb_pretty_print_insn): Use string_file.
9887 (gdb_disassembly): Adjust reference the null_stream global.
9888 (do_ui_file_delete): Delete.
9889 (gdb_insn_length): Use null_stream.
9890 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
9891 * dwarf2loc.c (dwarf2_compile_property_to_c)
9892 (locexpr_generate_c_location, loclist_generate_c_location): Take a
9893 'string_file &' instead of a 'ui_file *'.
9894 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
9895 * dwarf2read.c (do_ui_file_peek_last): Delete.
9896 (dwarf2_compute_name): Use string_file.
9897 * event-top.c (gdb_setup_readline): Use stdio_file.
9898 * gdbarch.sh (verify_gdbarch): Use string_file.
9899 * gdbtypes.c (safe_parse_type): Use null_stream.
9900 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
9901 string_file.
9902 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
9903 'string_file *' instead of a 'ui_file *'.
9904 (gdbscm_arch_disassemble): Use string_file.
9905 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
9906 * guile/scm-ports.c (class ioscm_file_port): Now a class that
9907 inherits from ui_file.
9908 (ioscm_file_port_delete, ioscm_file_port_rewind)
9909 (ioscm_file_port_put): Delete.
9910 (ioscm_file_port_write): Rename to ...
9911 (ioscm_file_port::write): ... this. Remove file_port_magic
9912 checks.
9913 (ioscm_file_port_new): Delete.
9914 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
9915 ui_file_up.
9916 * guile/scm-type.c (tyscm_type_name): Use string_file.
9917 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
9918 Use string_file.
9919 * infcmd.c (print_return_value_1): Use string_file.
9920 * infrun.c (print_target_wait_results): Use string_file.
9921 * language.c (add_language): Use string_file.
9922 * location.c (explicit_to_string_internal): Use string_file.
9923 * main.c (captured_main_1): Use null_file.
9924 * maint.c (maintenance_print_architecture): Use stdio_file.
9925 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
9926 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
9927 event_channel>: Change type to mi_console_file pointer.
9928 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
9929 (mi_console_file_delete): Delete.
9930 (struct mi_console_file): Delete.
9931 (mi_console_file_magic): Delete.
9932 (mi_console_file_new): Delete.
9933 (mi_console_file::mi_console_file): New.
9934 (mi_console_file_delete): Delete.
9935 (mi_console_file_fputs): Delete.
9936 (mi_console_file::write): New.
9937 (mi_console_raw_packet): Delete.
9938 (mi_console_file::flush): New.
9939 (mi_console_file_flush): Delete.
9940 (mi_console_set_raw): Rename to ...
9941 (mi_console_file::set_raw): ... this.
9942 * mi/mi-console.h (class mi_console_file): New class.
9943 (mi_console_file_new, mi_console_set_raw): Delete.
9944 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
9945 (mi_set_logging): Use delete and tee_file. Adjust.
9946 * mi/mi-main.c (output_register): Use string_file.
9947 (mi_cmd_data_evaluate_expression): Use string_file.
9948 (mi_cmd_data_read_memory): Use string_file.
9949 (mi_cmd_execute, print_variable_or_computed): Use string_file.
9950 * mi/mi-out.c (mi_ui_out::main_stream): New.
9951 (mi_ui_out::rewind): Use main_stream and
9952 string_file.
9953 (mi_ui_out::put): Use main_stream and string_file.
9954 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
9955 Allocate a 'string_file' instead.
9956 (mi_out_new): Don't allocate a mem_fileopen stream here.
9957 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
9958 (mi_ui_out::main_stream): Declare method.
9959 * printcmd.c (eval_command): Use string_file.
9960 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
9961 * python/py-arch.c (archpy_disassemble): Use string_file.
9962 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
9963 * python/py-frame.c (frapy_str): Use string_file.
9964 * python/py-framefilter.c (py_print_type, py_print_single_arg):
9965 Use string_file.
9966 * python/py-type.c (typy_str): Use string_file.
9967 * python/py-unwind.c (unwind_infopy_str): Use string_file.
9968 * python/py-value.c (valpy_str): Use string_file.
9969 * record-btrace.c (btrace_insn_history): Use string_file.
9970 * regcache.c (regcache_print): Use stdio_file.
9971 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
9972 * remote.c (escape_buffer): Use string_file.
9973 * rust-lang.c (rust_get_disr_info): Use string_file.
9974 * serial.c (serial_open_ops_1): Use stdio_file.
9975 (do_serial_close): Use delete.
9976 * stack.c (print_frame_arg): Use string_file.
9977 (print_frame_args): Remove local mem_fileopen stream, not used.
9978 (print_frame): Use string_file.
9979 * symmisc.c (maintenance_print_symbols): Use stdio_file.
9980 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
9981 Take a 'string_file *' instead of a 'ui_file *'.
9982 * top.c (new_ui): Use stdio_file and stderr_file.
9983 (free_ui): Use delete.
9984 (execute_command_to_string): Use string_file.
9985 (quit_confirm): Use string_file.
9986 * tracepoint.c (collection_list::append_exp): Use string_file.
9987 * tui/tui-disasm.c (tui_disassemble): Use string_file.
9988 * tui/tui-file.c: Don't include "ui-file.h".
9989 (enum streamtype, struct tui_stream): Delete.
9990 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
9991 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
9992 (tui_file::tui_file): New method.
9993 (tui_file_fputs): Delete.
9994 (tui_file_get_strbuf): Delete.
9995 (tui_file::puts): New method.
9996 (tui_file_adjust_strbuf): Delete.
9997 (tui_file_flush): Delete.
9998 (tui_file::flush): New method.
9999 * tui/tui-file.h: Tweak intro comment.
10000 Include ui-file.h.
10001 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
10002 (tui_file_adjust_strbuf): Delete declarations.
10003 (class tui_file): New class.
10004 * tui/tui-io.c (tui_initialize_io): Use tui_file.
10005 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
10006 (tui_register_format): Use string_stream.
10007 * tui/tui-stack.c (tui_make_status_line): Use string_file.
10008 (tui_get_function_from_frame): Use string_file.
10009 * typeprint.c (type_to_string): Use string_file.
10010 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
10011 (null_stream): New global.
10012 (ui_file_delete): Delete.
10013 (ui_file::ui_file): New.
10014 (null_file_isatty): Delete.
10015 (ui_file::~ui_file): New.
10016 (null_file_rewind): Delete.
10017 (ui_file::printf): New.
10018 (null_file_put): Delete.
10019 (null_file_flush): Delete.
10020 (ui_file::putstr): New.
10021 (null_file_write): Delete.
10022 (ui_file::putstrn): New.
10023 (null_file_read): Delete.
10024 (ui_file::putc): New.
10025 (null_file_fputs): Delete.
10026 (null_file_write_async_safe): Delete.
10027 (ui_file::vprintf): New.
10028 (null_file_delete): Delete.
10029 (null_file::write): New.
10030 (null_file_fseek): Delete.
10031 (null_file::puts): New.
10032 (ui_file_data): Delete.
10033 (null_file::write_async_safe): New.
10034 (gdb_flush, ui_file_isatty): Adjust.
10035 (ui_file_put, ui_file_rewind): Delete.
10036 (ui_file_write): Adjust.
10037 (ui_file_write_for_put): Delete.
10038 (ui_file_write_async_safe, ui_file_read): Adjust.
10039 (ui_file_fseek): Delete.
10040 (fputs_unfiltered): Adjust.
10041 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
10042 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
10043 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
10044 (set_ui_file_data): Delete.
10045 (string_file::~string_file, string_file::write)
10046 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
10047 (do_ui_file_as_string, ui_file_as_string): Delete.
10048 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
10049 (struct mem_file): Delete.
10050 (mem_file_new): Delete.
10051 (stdio_file::stdio_file): New.
10052 (mem_file_delete): Delete.
10053 (stdio_file::stdio_file): New.
10054 (mem_fileopen): Delete.
10055 (stdio_file::~stdio_file): New.
10056 (mem_file_rewind): Delete.
10057 (stdio_file::set_stream): New.
10058 (mem_file_put): Delete.
10059 (stdio_file::open): New.
10060 (mem_file_write): Delete.
10061 (stdio_file_magic, struct stdio_file): Delete.
10062 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
10063 (stdio_file::flush): New.
10064 (stdio_file_read): Rename to ...
10065 (stdio_file::read): ... this. Adjust.
10066 (stdio_file_write): Rename to ...
10067 (stdio_file::write): ... this. Adjust.
10068 (stdio_file_write_async_safe): Rename to ...
10069 (stdio_file::write_async_safe) ... this. Adjust.
10070 (stdio_file_fputs): Rename to ...
10071 (stdio_file::puts) ... this. Adjust.
10072 (stdio_file_isatty): Delete.
10073 (stdio_file_fseek): Delete.
10074 (stdio_file::isatty): New.
10075 (stderr_file_write): Rename to ...
10076 (stderr_file::write) ... this. Adjust.
10077 (stderr_file_fputs): Rename to ...
10078 (stderr_file::puts) ... this. Adjust.
10079 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
10080 (stderr_file::stderr_file): New.
10081 (tee_file_magic): Delete.
10082 (struct tee_file): Delete.
10083 (tee_file::tee_file): New.
10084 (tee_file_new): Delete.
10085 (tee_file::~tee_file): New.
10086 (tee_file_delete): Delete.
10087 (tee_file_flush): Rename to ...
10088 (tee_file::flush): ... this. Adjust.
10089 (tee_file_write): Rename to ...
10090 (tee_file::write): ... this. Adjust.
10091 (tee_file::write_async_safe): New.
10092 (tee_file_fputs): Rename to ...
10093 (tee_file::puts): ... this. Adjust.
10094 (tee_file_isatty): Rename to ...
10095 (tee_file::isatty): ... this. Adjust.
10096 * ui-file.h (struct obstack, struct ui_file): Don't
10097 forward-declare.
10098 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
10099 (ui_file_write_ftype)
10100 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
10101 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
10102 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
10103 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
10104 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
10105 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
10106 (set_ui_file_fseek): Delete.
10107 (ui_file_data, ui_file_delete, ui_file_rewind)
10108 (struct ui_file): New.
10109 (ui_file_up): New.
10110 (class null_file): New.
10111 (null_stream): Declare.
10112 (ui_file_write_for_put, ui_file_put): Delete.
10113 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
10114 Delete.
10115 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
10116 (gdb_fopen, tee_file_new): Delete.
10117 (struct string_file): New.
10118 (struct stdio_file): New.
10119 (stdio_file_up): New.
10120 (struct stderr_file): New.
10121 (class tee_file): New.
10122 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
10123 of a 'ui_file *'. Adjust.
10124 * ui-out.h (class ui_out) <field_stream>: Likewise.
10125 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
10126 (null_stream): Delete.
10127 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
10128 Adjust.
10129 * utils.h (struct ui_file): Delete forward declaration..
10130 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
10131 (error_stream): Take a 'string_file &' instead of a
10132 'ui_file *'.
10133 * varobj.c (varobj_value_get_print_value): Use string_file.
10134 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
10135 * gdbarch.c: Regenerate.
10136
10137 2017-02-02 Pedro Alves <palves@redhat.com>
10138
10139 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
10140 (gdb_pretty_print_insn): ... this. Now a free function. Add back
10141 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
10142 Adjust to call gdb_print_insn instead of
10143 gdb_disassembler::print_insn.
10144 (dump_insns, do_mixed_source_and_assembly_deprecated)
10145 (do_mixed_source_and_assembly, do_assembly_only): Add back a
10146 'gdbarch' parameter. Remove gdb_disassembler parameter.
10147 (gdb_disassembly): Don't allocate a gdb_disassembler here.
10148 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
10149 declaration.
10150 (gdb_pretty_print_insn): Re-add declaration.
10151 * record-btrace.c (btrace_insn_history): Don't allocate a
10152 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
10153
10154 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
10155
10156 * disasm.h (gdb_disassembly): Remove file_string parameter.
10157 * disasm.c (gdb_disassembly): Likewise.
10158 * cli/cli-cmds.c (print_disassembly): Adapt.
10159 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
10160 * stack.c (do_gdb_disassembly): Likewise.
10161
10162 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
10163
10164 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
10165 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
10166 targets. And if the implicit value is longer than needed, extract
10167 the first bytes instead of the "least significant" ones.
10168
10169 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10170
10171 * btrace.c (btrace_enable): Do not call btrace_add_pc for
10172 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
10173 (btrace_fetch): Assert can_access_registers_ptid.
10174 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
10175 validate_registers_access.
10176
10177 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
10178
10179 * gdbthread.h (can_access_registers_ptid): New.
10180 * thread.c (can_access_registers_ptid): New.
10181
10182 2017-02-01 Pedro Alves <palves@redhat.com>
10183
10184 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
10185
10186 2017-01-31 Pedro Alves <palves@redhat.com>
10187
10188 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
10189 Fix typos.
10190
10191 2017-01-31 Pedro Alves <palves@redhat.com>
10192
10193 * stack.c (print_frame_args): Remove local mem_fileopen stream,
10194 not used.
10195
10196 2017-01-31 Pedro Alves <palves@redhat.com>
10197
10198 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
10199
10200 2017-01-31 Pedro Alves <palves@redhat.com>
10201
10202 * common/scoped_restore.h
10203 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
10204 change the value's parameter type to T2.
10205 (make_scoped_restore): Likewise.
10206
10207 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10208 Richard Henderson <rth@redhat.com>
10209
10210 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
10211 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
10212 GS_BASE for older kernels.
10213 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
10214 GS_BASE for older kernels.
10215 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
10216 and GS_BASE to the offset table.
10217 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
10218 system register group.
10219 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
10220 for older kernels.
10221 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
10222 amd64 ABI.
10223 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
10224 AMD64_GSBASE_REGNUM.
10225 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
10226 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
10227 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
10228 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
10229 i386/64bit-segments.xml in those rules.
10230 * features/i386/64bit-segments.xml: New file.
10231 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
10232 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
10233 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
10234 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
10235 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
10236 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
10237 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
10238 * features/i386/amd64-avx-linux.c: Regenerated.
10239 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
10240 * features/i386/amd64-avx-mpx.c: Regenerated.
10241 * features/i386/amd64-avx512-linux.c: Regenerated.
10242 * features/i386/amd64-linux.c: Regenerated.
10243 * features/i386/amd64-mpx-linux.c: Regenerated.
10244 * features/i386/i386-avx-mpx-linux.c: Regenerated.
10245 * features/i386/i386-avx-mpx.c: Regenerated.
10246 * features/i386/x32-avx-linux.c: Regenerated.
10247 * features/i386/x32-avx512-linux.c: Regenerated.
10248 * regformats/i386/amd64-avx-linux.dat: Regenerated.
10249 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
10250 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
10251 * regformats/i386/amd64-linux.dat: Regenerated.
10252 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
10253 * regformats/i386/x32-avx-linux.dat: Regenerated.
10254 * regformats/i386/x32-avx512-linux.dat: Regenerated.
10255 * regformats/i386/x32-linux.dat: Regenerated.
10256
10257 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10258
10259 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
10260 Set to AMD64_NUM_REGS.
10261
10262 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
10263
10264 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
10265 that checks validity of a register number.
10266
10267 2017-01-27 Kees Cook <keescook@google.com>
10268
10269 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
10270 fetch_fpregs if target has fpa registers.
10271 (arm_linux_store_inferior_registers): Call store_fpregs if target
10272 has fpa registers.
10273
10274 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
10275
10276 * cris-tdep.c (cris_gdbarch_init): Remove check for
10277 info.byte_order and force it to BFD_ENDIAN_LITTLE.
10278
10279 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
10280
10281 * corelow.c (get_core_register_section): Check for regset
10282 existence before checking for REGSET_VARIABLE_SIZE.
10283
10284 2017-01-26 Yao Qi <yao.qi@linaro.org>
10285 Pedro Alves <palves@redhat.com>
10286
10287 PR gdb/20939
10288 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
10289 call memory_error, save memaddr instead.
10290 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
10291 negative, cal memory_error.
10292 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
10293
10294 2017-01-26 Yao Qi <yao.qi@linaro.org>
10295
10296 * disasm-selftests.c (memory_error_test): New function.
10297 (_initialize_disasm_selftests): Register memory_error_test.
10298
10299 2017-01-26 Yao Qi <yao.qi@linaro.org>
10300
10301 * Makefile.in (SFILES): Add disasm-selftests.c and
10302 selftest-arch.c.
10303 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
10304 * disasm-selftests.c: New file.
10305 * selftest-arch.c: New file.
10306 * selftest-arch.h: New file.
10307
10308 2017-01-26 Yao Qi <yao.qi@linaro.org>
10309
10310 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
10311 to bfd_arch_mep. Don't return 0 if section is not
10312 found. Call print_insn_mep.
10313
10314 2017-01-26 Pedro Alves <palves@redhat.com>
10315 Yao Qi <yao.qi@linaro.org>
10316
10317 * arm-tdep.c: Include "disasm.h".
10318 (gdb_print_insn_arm): Update code to get gdbarch.
10319 * disasm.c (dis_asm_read_memory): Change it to
10320 gdb_disassembler::dis_asm_read_memory.
10321 (dis_asm_memory_error): Likewise.
10322 (dis_asm_print_address): Likewise.
10323 (gdb_pretty_print_insn): Change it to
10324 gdb_disassembler::pretty_print_insn.
10325 (dump_insns): Add one argument gdb_disassemlber. All
10326 callers updated.
10327 (do_mixed_source_and_assembly_deprecated): Likewise.
10328 (do_mixed_source_and_assembly): Likewise.
10329 (do_assembly_only): Likewise.
10330 (gdb_disassembler::gdb_disassembler): New.
10331 (gdb_disassembler::print_insn): New.
10332 * disasm.h (class gdb_disassembler): New.
10333 (gdb_pretty_print_insn): Remove declaration.
10334 (gdb_disassemble_info): Likewise.
10335 * guile/scm-disasm.c (class gdbscm_disassembler): New.
10336 (gdbscm_disasm_read_memory_worker): Update.
10337 (gdbscm_disasm_read_memory): Update.
10338 (gdbscm_disasm_memory_error): Remove.
10339 (gdbscm_disasm_print_address): Remove.
10340 (gdbscm_disassembler::gdbscm_disassembler): New.
10341 (gdbscm_print_insn_from_port): Update.
10342 * mips-tdep.c: Include disasm.h.
10343 (gdb_print_insn_mips): Update code to get gdbarch.
10344 * record-btrace.c (btrace_insn_history): Update.
10345 * spu-tdep.c: Include disasm.h.
10346 (struct spu_dis_asm_data): Remove.
10347 (struct spu_dis_asm_info): New.
10348 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
10349 SPU id.
10350 (gdb_print_insn_spu): Cast disassemble_info to
10351 spu_dis_asm_info.
10352
10353 2017-01-26 Yao Qi <yao.qi@linaro.org>
10354
10355 * disasm.c (do_ui_file_delete): Delete.
10356 (gdb_insn_length): Move code creating stream to ...
10357 * utils.c (null_stream): ... here. New function.
10358 * utils.h (null_stream): Declare.
10359
10360 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
10361
10362 * python/py-inferior.c (find_thread_object): Return directly
10363 from the loop. Remove "found" variable.
10364
10365 2017-01-21 Joel Brobecker <brobecker@adacore.com>
10366
10367 GDB 7.12.1 released.
10368
10369 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10370
10371 * python/py-function.c (fnpy_call): Reorder declarations to have
10372 the gdbpy_enter object declared first.
10373 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
10374
10375 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
10376
10377 PR python/21068
10378 * python/python-internal.h (PyMem_RawMalloc): Define for
10379 Python < 3.4.
10380 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
10381 PyMem_RawMalloc instead of PyMem_Malloc.
10382
10383 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
10384 Luis Machado <lgustavo@codesourcery.com>
10385
10386 * NEWS (New commands): Mention flash-erase.
10387 (New MI commands): Mention target-flash-erase.
10388 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
10389 command.
10390 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
10391 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
10392 * target.c (flash_erase_command): New function.
10393 (initialize_targets): Add new flash-erase command.
10394 * target.h (flash_erase_command): New declaration.
10395
10396 2017-01-20 Joel Brobecker <brobecker@adacore.com>
10397
10398 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
10399 HAVE_SYS_PROCFS_H is defined.
10400
10401 2017-01-18 Alan Hayward <alan.hayward@arm.com>
10402
10403 * remote.c (struct cached_reg): Change data into a pointer.
10404 * (stop_reply_dtr): Free data pointers before deleting vector.
10405 (process_stop_reply): Likewise.
10406 (remote_parse_stop_reply): Allocate space for data
10407
10408 2017-01-18 Alan Hayward <alan.hayward@arm.com>
10409
10410 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
10411 MAX_REGISTER_SIZE.
10412 (amd64_pseudo_register_read_value): Likewise.
10413 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
10414 (store_register_using_P): Likewise.
10415 * regcache.c (regcache_xfer_part): Likewise.
10416
10417 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
10418
10419 Split real and pseudo registers.
10420 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
10421 (sparc32_pseudo_regnum): New enum.
10422 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
10423 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
10424 (SPARC32_CP0_REGISTERS): New macro.
10425 (sparc32_pseudo_register_name): New function.
10426 (sparc32_register_name): Use sparc32_pseudo_register_name.
10427 (sparc32_pseudo_register_type): New function.
10428 (sparc32_register_type): Use sparc32_pseudo_register_type.
10429 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
10430 pseudo register numbers.
10431 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
10432 (SPARC64_CP0_REGISTERS): New macro.
10433 (sparc64_pseudo_register_name): New function.
10434 (sparc64_register_name): Use sparc64_pseudo_register_name.
10435 (sparc64_pseudo_register_type): New function.
10436 (sparc64_register_type): Use sparc64_pseudo_register_type.
10437 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
10438 pseudo register numbers.
10439 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
10440 sparc64_store_arguments): Handle pseudo register numbers.
10441
10442 2017-01-13 Yao Qi <yao.qi@linaro.org>
10443
10444 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
10445 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
10446 output.
10447 (getpkt_or_notif_sane_1): Likewise.
10448
10449 2017-01-13 Yao Qi <yao.qi@linaro.org>
10450
10451 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
10452 of CC. Pass "-x c++-header" instead of "-x c".
10453
10454 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10455
10456 * remote.c (remote_can_async_p): Update comment.
10457
10458 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10459
10460 * linux-nat.c (linux_nat_can_async_p): Update comment.
10461
10462 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
10463
10464 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
10465
10466 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
10467
10468 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
10469
10470 2017-01-10 Tom Tromey <tom@tromey.com>
10471
10472 * python/py-type.c (typy_legacy_template_argument): Update.
10473 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
10474 ~demangle_parse_info): Declare new members.
10475 (cp_demangled_name_to_comp): Return unique_ptr.
10476 (cp_demangled_name_parse_free)
10477 (make_cleanup_cp_demangled_name_parse_free)
10478 (cp_new_demangle_parse_info): Remove.
10479 * cp-support.c (do_demangled_name_parse_free_cleanup)
10480 (make_cleanup_cp_demangled_name_parse_free): Remove.
10481 (inspect_type, cp_canonicalize_string_full)
10482 (cp_canonicalize_string): Update.
10483 (mangled_name_to_comp): Change return type.
10484 (cp_class_name_from_physname, method_name_from_physname)
10485 (cp_func_name, cp_remove_params): Update.
10486 * cp-name-parser.y (demangle_parse_info): New constructor, from
10487 cp_new_demangle_parse_info.
10488 (~demangle_parse_info): New destructor, from
10489 cp_demangled_name_parse_free.
10490 (cp_merge_demangle_parse_infos): Update.
10491 (cp_demangled_name_to_comp): Change return type.
10492
10493 2017-01-10 Tom Tromey <tom@tromey.com>
10494
10495 * top.c (prevent_dont_repeat): Change return type.
10496 * python/python.c (execute_gdb_command): Use std::string.
10497 Update.
10498 * guile/guile.c (gdbscm_execute_gdb_command): Update.
10499 * command.h (prevent_dont_repeat): Change return type.
10500 * breakpoint.c (bpstat_do_actions_1): Update.
10501
10502 2017-01-10 Tom Tromey <tom@tromey.com>
10503
10504 * value.h (scoped_value_mark::~scoped_value_mark): Call
10505 free_to_mark.
10506 (scoped_value_mark::free_to_mark): New method.
10507 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
10508 scoped_value_mark.
10509
10510 2017-01-10 Tom Tromey <tom@tromey.com>
10511
10512 * python/py-value.c (valpy_dereference, valpy_referenced_value)
10513 (valpy_reference_value, valpy_const_value, valpy_get_address)
10514 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
10515 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
10516 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
10517 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
10518 scoped_value_mark.
10519 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
10520 * value.h (scoped_value_mark): New class.
10521
10522 2017-01-10 Tom Tromey <tom@tromey.com>
10523
10524 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
10525 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
10526 * psymtab.c (discard_psymtabs_upto): Remove.
10527 (make_cleanup_discard_psymtabs): Remove.
10528 (struct psymtab_state): Remove.
10529
10530 2017-01-10 Tom Tromey <tom@tromey.com>
10531
10532 * record-full.c (record_full_save_cleanups): Remove.
10533 (record_full_save): Use gdb::unlinker.
10534 * gcore.c (do_bfd_delete_cleanup): Remove.
10535 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
10536 cleanups.
10537 * dwarf2read.c (unlink_if_set): Remove.
10538 (write_psymtabs_to_index): Use gdb::unlinker.
10539 * common/gdb_unlinker.h: New file.
10540
10541 2017-01-10 Tom Tromey <tom@tromey.com>
10542
10543 * windows-tdep.c (windows_xfer_shared_library): Update.
10544 * windows-nat.c (windows_make_so): Update.
10545 * utils.h (make_cleanup_bfd_unref): Remove.
10546 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
10547 * symfile.h (symfile_bfd_open)
10548 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
10549 * symfile.c (read_symbols, symbol_file_add)
10550 (separate_debug_file_exists): Update.
10551 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
10552 (generic_load, reread_symbols): Update.
10553 * symfile-mem.c (symbol_file_add_from_memory): Update.
10554 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
10555 (spu_symbol_file_add_from_memory): Update.
10556 * solist.h (struct target_so_ops) <bfd_open>: Return
10557 gdb_bfd_ref_ptr.
10558 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
10559 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
10560 gdb_bfd_ref_ptr.
10561 (solib_map_sections, reload_shared_libraries_1): Update.
10562 * solib-svr4.c (enable_break): Update.
10563 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
10564 * solib-frv.c (enable_break2): Update.
10565 * solib-dsbt.c (enable_break): Update.
10566 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
10567 gdb_bfd_ref_ptr.
10568 (darwin_solib_get_all_image_info_addr_at_init): Update.
10569 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
10570 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
10571 * record-full.c (record_full_save): Update.
10572 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
10573 * procfs.c (insert_dbx_link_bpt_in_file): Update.
10574 * minidebug.c (find_separate_debug_file_in_section): Return
10575 gdb_bfd_ref_ptr.
10576 * machoread.c (macho_add_oso_symfile): Change abfd to
10577 gdb_bfd_ref_ptr.
10578 (macho_symfile_read_all_oso): Update.
10579 (macho_check_dsym): Return gdb_bfd_ref_ptr.
10580 (macho_symfile_read): Update.
10581 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
10582 (jit_bfd_try_read_symtab): Update.
10583 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10584 (gdb_bfd_openw, gdb_bfd_openr_iovec)
10585 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
10586 gdb_bfd_ref_ptr.
10587 (gdb_bfd_ref_policy): New struct.
10588 (gdb_bfd_ref_ptr): New typedef.
10589 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10590 (gdb_bfd_openw, gdb_bfd_openr_iovec)
10591 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
10592 gdb_bfd_ref_ptr.
10593 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
10594 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
10595 (gcore_command): Update.
10596 * exec.c (exec_file_attach): Update.
10597 * elfread.c (elf_symfile_read): Update.
10598 * dwarf2read.c (dwarf2_get_dwz_file): Update.
10599 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
10600 (open_and_init_dwo_file): Update.
10601 (open_dwp_file): Return gdb_bfd_ref_ptr.
10602 (open_and_init_dwp_file): Update.
10603 * corelow.c (core_open): Update.
10604 * compile/compile-object-load.c (compile_object_load): Update.
10605 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
10606 * coffread.c (coff_symfile_read): Update.
10607 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
10608 gdb_bfd_ref_ptr. Rename.
10609 (dump_bfd_file, restore_command): Update.
10610 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
10611 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
10612 (find_separate_debug_file_by_buildid): Update.
10613
10614 2017-01-10 Tom Tromey <tom@tromey.com>
10615
10616 * common/gdb_ref_ptr.h: New file.
10617 * python/py-ref.h (struct gdbpy_ref_policy): New.
10618 (gdbpy_ref): Now a typedef.
10619
10620 2017-01-10 Tom Tromey <tom@tromey.com>
10621
10622 * utils.h (make_cleanup_htab_delete): Don't declare.
10623 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
10624 Remove.
10625 * linespec.c (decode_compound_collector): Add constructor,
10626 destructor.
10627 (lookup_prefix_sym): Remove cleanup.
10628 (symtab_collector): Add constructor, destructor.
10629 (collect_symtabs_from_filename): Remove cleanup.
10630 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
10631 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
10632 Use htab_up.
10633 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
10634 * dwarf2read.c (dw2_expand_symtabs_matching)
10635 (dw2_map_symbol_filenames, dwarf_decode_macros)
10636 (write_psymtabs_to_index): Use htab_up.
10637 * dwarf2loc.c (func_verify_no_selftailcall)
10638 (call_site_find_chain_1, func_verify_no_selftailcall)
10639 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
10640 std::vector, gdb::unique_xmalloc_ptr.
10641 (call_sitep): Remove typedef.
10642 (dwarf2_locexpr_baton_eval): Remove unused variable.
10643
10644 2017-01-10 Tom Tromey <tom@tromey.com>
10645
10646 * python/python-internal.h (make_cleanup_py_decref)
10647 (make_cleanup_py_xdecref): Don't declare.
10648 * python/py-utils.c (py_decref, make_cleanup_py_decref)
10649 (py_xdecref, make_cleanup_py_xdecref): Remove.
10650
10651 2017-01-10 Tom Tromey <tom@tromey.com>
10652
10653 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
10654 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
10655
10656 2017-01-10 Tom Tromey <tom@tromey.com>
10657
10658 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
10659
10660 2017-01-10 Tom Tromey <tom@tromey.com>
10661
10662 * python/py-utils.c (unicode_to_encoded_string)
10663 (python_string_to_target_string)
10664 (python_string_to_target_python_string)
10665 (python_string_to_host_string, gdbpy_obj_to_string)
10666 (get_addr_from_python): Use gdbpy_ref.
10667
10668 2017-01-10 Tom Tromey <tom@tromey.com>
10669
10670 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
10671 gdbpy_ref.
10672
10673 2017-01-10 Tom Tromey <tom@tromey.com>
10674
10675 * python/python.c (eval_python_command, gdbpy_decode_line)
10676 (gdbpy_run_events, gdbpy_start_type_printers)
10677 (gdbpy_apply_type_printers): Use gdbpy_ref.
10678
10679 2017-01-10 Tom Tromey <tom@tromey.com>
10680
10681 * python/py-param.c (get_doc_string, compute_enum_values): Use
10682 gdbpy_ref.
10683
10684 2017-01-10 Tom Tromey <tom@tromey.com>
10685
10686 * python/py-inferior.c (find_thread_object, build_inferior_list):
10687 Use gdbpy_ref.
10688
10689 2017-01-10 Tom Tromey <tom@tromey.com>
10690
10691 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
10692
10693 2017-01-10 Tom Tromey <tom@tromey.com>
10694
10695 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
10696 gdbpy_ref.
10697
10698 2017-01-10 Tom Tromey <tom@tromey.com>
10699
10700 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
10701 extra incref.
10702 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
10703 Use gdbpy_ref.
10704
10705 2017-01-10 Tom Tromey <tom@tromey.com>
10706
10707 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
10708 gdbpy_ref.
10709
10710 2017-01-10 Tom Tromey <tom@tromey.com>
10711
10712 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
10713 decref results of PyArg_ParseTupleAndKeywords.
10714
10715 2017-01-10 Tom Tromey <tom@tromey.com>
10716
10717 * python/python.c (python_run_simple_file): Use
10718 unique_xmalloc_ptr, gdbpy_ref.
10719
10720 2017-01-10 Tom Tromey <tom@tromey.com>
10721
10722 * python/py-prettyprint.c (print_stack_unless_memory_error)
10723 (print_string_repr, print_children): Use gdbpy_ref.
10724 (dummy_python_frame): New class.
10725 (dummy_python_frame::dummy_python_frame): Rename from
10726 push_dummy_python_frame.
10727 (py_restore_tstate): Remove.
10728
10729 2017-01-10 Tom Tromey <tom@tromey.com>
10730
10731 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
10732
10733 2017-01-10 Tom Tromey <tom@tromey.com>
10734
10735 * python/python.c (ensure_python_env, restore_python_env):
10736 Remove.
10737 * python/python-internal.h (ensure_python_env): Don't declare.
10738 * varobj.h (varobj_ensure_python_env): Don't declare.
10739 * varobj.c (varobj_ensure_python_env): Remove.
10740
10741 2017-01-10 Tom Tromey <tom@tromey.com>
10742
10743 * varobj.c (varobj_value_get_print_value): Use
10744 gdbpy_enter_varobj.
10745
10746 2017-01-10 Tom Tromey <tom@tromey.com>
10747
10748 * python/py-prettyprint.c (print_string_repr, print_children):
10749 Update.
10750 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
10751 of "encoding".
10752 * varobj.c (varobj_value_get_print_value): Update.
10753 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
10754
10755 2017-01-10 Tom Tromey <tom@tromey.com>
10756
10757 * varobj.c (varobj_get_display_hint)
10758 (dynamic_varobj_has_child_method, install_new_value_visualizer)
10759 (varobj_set_visualizer, free_variable): Use
10760 gdbpy_enter_varobj.
10761
10762 2017-01-10 Tom Tromey <tom@tromey.com>
10763
10764 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
10765 (do_finish_initialization): New function. Use gdbpy_ref.
10766 (gdbpy_finish_initialization): Use gdbpy_enter. Call
10767 do_finish_initialization.
10768
10769 2017-01-10 Tom Tromey <tom@tromey.com>
10770
10771 * python/py-param.c (get_set_value, get_show_value): Use
10772 gdbpy_enter, gdbpy_ref.
10773
10774 2017-01-10 Tom Tromey <tom@tromey.com>
10775
10776 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
10777
10778 2017-01-10 Tom Tromey <tom@tromey.com>
10779
10780 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
10781
10782 2017-01-10 Tom Tromey <tom@tromey.com>
10783
10784 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
10785 Use gdbpy_enter_varobj.
10786
10787 2017-01-10 Tom Tromey <tom@tromey.com>
10788
10789 * varobj.c (gdbpy_enter_varobj): New constructor.
10790 * python/python-internal.h (gdbpy_enter_varobj): New class.
10791 * python/py-varobj.c (py_varobj_get_iterator): Use
10792 gdbpy_enter_varobj.
10793
10794 2017-01-10 Tom Tromey <tom@tromey.com>
10795
10796 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
10797 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
10798 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
10799 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
10800 unique_xmalloc_ptr.
10801 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
10802
10803 2017-01-10 Tom Tromey <tom@tromey.com>
10804
10805 * python/py-xmethods.c (invoke_match_method): Use
10806 gdbpy_ref.
10807
10808 2017-01-10 Tom Tromey <tom@tromey.com>
10809
10810 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
10811 gdbpy_enter, gdbpy_ref.
10812
10813 2017-01-10 Tom Tromey <tom@tromey.com>
10814
10815 * python/python.c (python_interactive_command): Use gdbpy_enter.
10816
10817 2017-01-10 Tom Tromey <tom@tromey.com>
10818
10819 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
10820 gdbpy_ref.
10821
10822 2017-01-10 Tom Tromey <tom@tromey.com>
10823
10824 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
10825 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
10826
10827 2017-01-10 Tom Tromey <tom@tromey.com>
10828
10829 * utils.h (htab_deleter): New struct.
10830 (htab_up): New typedef.
10831 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
10832 gdbpy_enter, gdbpy_ref, htab_up.
10833
10834 2017-01-10 Tom Tromey <tom@tromey.com>
10835
10836 * python/py-unwind.c (pending_frame_invalidate): Remove.
10837 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
10838
10839 2017-01-10 Tom Tromey <tom@tromey.com>
10840
10841 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
10842 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
10843
10844 2017-01-10 Tom Tromey <tom@tromey.com>
10845
10846 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
10847
10848 2017-01-10 Tom Tromey <tom@tromey.com>
10849
10850 * python/python.c (gdbpy_eval_from_control_command)
10851 (gdbpy_source_script, gdbpy_run_events)
10852 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
10853 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
10854 gdbpy_enter.
10855
10856 2017-01-10 Tom Tromey <tom@tromey.com>
10857
10858 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
10859
10860 2017-01-10 Tom Tromey <tom@tromey.com>
10861
10862 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
10863
10864 2017-01-10 Tom Tromey <tom@tromey.com>
10865
10866 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
10867 (python_on_inferior_call_pre, python_on_inferior_call_post)
10868 (python_on_memory_change, python_on_register_change)
10869 (python_inferior_exit, python_new_objfile, add_thread_object)
10870 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
10871
10872 2017-01-10 Tom Tromey <tom@tromey.com>
10873
10874 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
10875 (bpfinishpy_handle_exit): Use gdbpy_enter.
10876
10877 2017-01-10 Tom Tromey <tom@tromey.com>
10878
10879 * python/py-cmd.c (cmdpy_destroyer)
10880 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
10881 gdbpy_enter.
10882
10883 2017-01-10 Tom Tromey <tom@tromey.com>
10884
10885 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
10886 gdbpy_enter.
10887 (gdbpy_breakpoint_has_cond): Likewise.
10888
10889 2017-01-10 Tom Tromey <tom@tromey.com>
10890
10891 * python/python.c (gdbpy_enter): New constructor.
10892 (~gdbpy_enter): New destructor.
10893 (restore_python_env, ensure_python_env): Rewrite.
10894 * python/python-internal.h (gdbpy_enter): New class.
10895
10896 2017-01-10 Tom Tromey <tom@tromey.com>
10897
10898 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
10899
10900 2017-01-10 Tom Tromey <tom@tromey.com>
10901
10902 * python/py-value.c (value_has_field, get_field_flag)
10903 (get_field_type, valpy_getitem, convert_value_from_python): Use
10904 gdbpy_ref.
10905
10906 2017-01-10 Tom Tromey <tom@tromey.com>
10907
10908 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
10909 gdbpy_ref.
10910
10911 2017-01-10 Tom Tromey <tom@tromey.com>
10912
10913 * python/py-prettyprint.c (search_pp_list)
10914 (find_pretty_printer_from_objfiles)
10915 (find_pretty_printer_from_progspace)
10916 (find_pretty_printer_from_gdb, find_pretty_printer)
10917 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
10918 gdbpy_ref.
10919
10920 2017-01-10 Tom Tromey <tom@tromey.com>
10921
10922 * python/py-param.c (call_doc_function): Use gdbpy_ref.
10923
10924 2017-01-10 Tom Tromey <tom@tromey.com>
10925
10926 * python/py-linetable.c (build_line_table_tuple_from_pcs)
10927 (ltpy_get_all_source_lines): Use gdbpy_ref.
10928
10929 2017-01-10 Tom Tromey <tom@tromey.com>
10930
10931 * python/py-framefilter.c (extract_sym, extract_value)
10932 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
10933 gdbpy_ref.
10934
10935 2017-01-10 Tom Tromey <tom@tromey.com>
10936
10937 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
10938
10939 2017-01-10 Tom Tromey <tom@tromey.com>
10940
10941 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
10942
10943 2017-01-10 Tom Tromey <tom@tromey.com>
10944
10945 * python/py-function.c (convert_values_to_python, fnpy_init): Use
10946 gdbpy_ref.
10947
10948 2017-01-10 Tom Tromey <tom@tromey.com>
10949
10950 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
10951
10952 2017-01-10 Tom Tromey <tom@tromey.com>
10953
10954 * python/py-type.c (convert_field, make_fielditem, typy_fields)
10955 (typy_range): Use gdbpy_ref.
10956
10957 2017-01-10 Tom Tromey <tom@tromey.com>
10958
10959 * python/py-threadevent.c (create_thread_event_object): Use
10960 gdbpy_ref.
10961 * python/py-stopevent.c (create_stop_event_object): Simplify.
10962 (emit_stop_event): Use gdbpy_ref.
10963 * python/py-signalevent.c (create_signal_event_object): Use
10964 gdbpy_ref.
10965 * python/py-newobjfileevent.c (create_new_objfile_event_object)
10966 (emit_new_objfile_event, create_clear_objfiles_event_object)
10967 (emit_clear_objfiles_event): Use gdbpy_ref.
10968 * python/py-infevents.c (create_inferior_call_event_object)
10969 (create_register_changed_event_object)
10970 (create_memory_changed_event_object, emit_inferior_call_event)
10971 (emit_memory_changed_event, emit_register_changed_event): Use
10972 gdbpy_ref.
10973 * python/py-exitedevent.c (create_exited_event_object)
10974 (emit_exited_event): Use gdbpy_ref.
10975 * python/py-event.h (evpy_emit_event): Remove
10976 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
10977 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
10978 * python/py-continueevent.c (emit_continue_event): Use
10979 gdbpy_ref.
10980 * python/py-breakpoint.c (gdbpy_breakpoint_created)
10981 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
10982 gdbpy_ref.
10983 * python/py-bpevent.c (create_breakpoint_event_object): Use
10984 gdbpy_ref.
10985
10986 2017-01-10 Tom Tromey <tom@tromey.com>
10987
10988 * python/py-ref.h: New file.
10989
10990 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
10991
10992 * cli-out.c (cli_ui_out::do_redirect): Change return type to
10993 void.
10994 * cli-out.h (cli_ui_out::do_redirect): Likewise.
10995 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
10996 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
10997 * ui-out.c (ui_out::redirect): Likewise.
10998 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
10999 * cli/cli-logging.c (set_logging_redirect): Update call site of
11000 ui_out::redirect.
11001 (handle_redirections): Likewise.
11002 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
11003 * top.c (execute_command_to_string): Likewise.
11004 * utils.c (do_ui_out_redirect_pop): Likewise.
11005
11006 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
11007
11008 * stack.c (_initialize_stack): Update "frame" command help message.
11009
11010 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
11011
11012 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
11013
11014 2017-01-06 Yao Qi <yao.qi@linaro.org>
11015
11016 * x86-linux-nat.h: Include gdb_proc_service.h.
11017
11018 2017-01-06 Yao Qi <yao.qi@linaro.org>
11019
11020 * ser-base.h: Include serial.h.
11021
11022 2017-01-06 Yao Qi <yao.qi@linaro.org>
11023
11024 * ppc-linux-tdep.h: Include ppc-tdep.h.
11025
11026 2017-01-06 Yao Qi <yao.qi@linaro.org>
11027
11028 * nat/amd64-linux-siginfo.h: Include signal.h.
11029
11030 2017-01-06 Yao Qi <yao.qi@linaro.org>
11031
11032 * nat/aarch64-linux-hw-point.h: Include break-common.h.
11033
11034 2017-01-06 Yao Qi <yao.qi@linaro.org>
11035
11036 * mi/mi-parse.h: Include mi-cmds.h.
11037
11038 2017-01-06 Yao Qi <yao.qi@linaro.org>
11039
11040 * inf-loop.c: Don't include "target.h".
11041 * inf-loop.h: Include it here.
11042
11043 2017-01-06 Yao Qi <yao.qi@linaro.org>
11044
11045 * dfp.h: Include "dboulest.h" and "expression.h".
11046
11047 2017-01-06 Yao Qi <yao.qi@linaro.org>
11048
11049 * ax-gdb.h: Include "ax.h".
11050
11051 2017-01-06 Yao Qi <yao.qi@linaro.org>
11052
11053 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
11054 with nat/gdb_ptrace.h.
11055
11056 2017-01-05 Yao Qi <yao.qi@linaro.org>
11057
11058 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
11059 new line.
11060 (mips64_fbsd_sigframe_init): Likewise.
11061
11062 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11063
11064 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
11065 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
11066
11067 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11068
11069 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
11070 * NEWS: Mention new FreeBSD/mips native configuration.
11071 * config/mips/fbsd.mh: New file.
11072 * configure.host: Add mips*-*-freebsd*.
11073 * mips-fbsd-nat.c: New file.
11074
11075 2017-01-04 John Baldwin <jhb@FreeBSD.org>
11076
11077 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
11078 (ALLDEPFILES): Add mips-fbsd-tdep.c.
11079 * NEWS: Mention new FreeBSD/mips target.
11080 * configure.tgt: Add mips*-*-freebsd*.
11081 * mips-fbsd-tdep.c: New file.
11082 * mips-fbsd-tdep.h: New file.
11083
11084 2017-01-04 Yao Qi <yao.qi@linaro.org>
11085
11086 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
11087 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
11088
11089 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11090
11091 Update copyright year range in all GDB files.
11092
11093 2017-01-01 Joel Brobecker <brobecker@adacore.com>
11094
11095 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
11096
11097 For older changes see ChangeLog-2016.
11098 \f
11099 Local Variables:
11100 mode: change-log
11101 left-margin: 8
11102 fill-column: 74
11103 version-control: never
11104 coding: utf-8
11105 End: