1 2017-01-10 Tom Tromey <tom@tromey.com>
3 * record-full.c (record_full_save_cleanups): Remove.
4 (record_full_save): Use gdb::unlinker.
5 * gcore.c (do_bfd_delete_cleanup): Remove.
6 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
8 * dwarf2read.c (unlink_if_set): Remove.
9 (write_psymtabs_to_index): Use gdb::unlinker.
10 * common/gdb_unlinker.h: New file.
12 2017-01-10 Tom Tromey <tom@tromey.com>
14 * windows-tdep.c (windows_xfer_shared_library): Update.
15 * windows-nat.c (windows_make_so): Update.
16 * utils.h (make_cleanup_bfd_unref): Remove.
17 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
18 * symfile.h (symfile_bfd_open)
19 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
20 * symfile.c (read_symbols, symbol_file_add)
21 (separate_debug_file_exists): Update.
22 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
23 (generic_load, reread_symbols): Update.
24 * symfile-mem.c (symbol_file_add_from_memory): Update.
25 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
26 (spu_symbol_file_add_from_memory): Update.
27 * solist.h (struct target_so_ops) <bfd_open>: Return
29 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
30 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
32 (solib_map_sections, reload_shared_libraries_1): Update.
33 * solib-svr4.c (enable_break): Update.
34 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
35 * solib-frv.c (enable_break2): Update.
36 * solib-dsbt.c (enable_break): Update.
37 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
39 (darwin_solib_get_all_image_info_addr_at_init): Update.
40 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
41 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
42 * record-full.c (record_full_save): Update.
43 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
44 * procfs.c (insert_dbx_link_bpt_in_file): Update.
45 * minidebug.c (find_separate_debug_file_in_section): Return
47 * machoread.c (macho_add_oso_symfile): Change abfd to
49 (macho_symfile_read_all_oso): Update.
50 (macho_check_dsym): Return gdb_bfd_ref_ptr.
51 (macho_symfile_read): Update.
52 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
53 (jit_bfd_try_read_symtab): Update.
54 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
55 (gdb_bfd_openw, gdb_bfd_openr_iovec)
56 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
58 (gdb_bfd_ref_policy): New struct.
59 (gdb_bfd_ref_ptr): New typedef.
60 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
61 (gdb_bfd_openw, gdb_bfd_openr_iovec)
62 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
64 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
65 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
66 (gcore_command): Update.
67 * exec.c (exec_file_attach): Update.
68 * elfread.c (elf_symfile_read): Update.
69 * dwarf2read.c (dwarf2_get_dwz_file): Update.
70 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
71 (open_and_init_dwo_file): Update.
72 (open_dwp_file): Return gdb_bfd_ref_ptr.
73 (open_and_init_dwp_file): Update.
74 * corelow.c (core_open): Update.
75 * compile/compile-object-load.c (compile_object_load): Update.
76 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
77 * coffread.c (coff_symfile_read): Update.
78 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
79 gdb_bfd_ref_ptr. Rename.
80 (dump_bfd_file, restore_command): Update.
81 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
82 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
83 (find_separate_debug_file_by_buildid): Update.
85 2017-01-10 Tom Tromey <tom@tromey.com>
87 * common/gdb_ref_ptr.h: New file.
88 * python/py-ref.h (struct gdbpy_ref_policy): New.
89 (gdbpy_ref): Now a typedef.
91 2017-01-10 Tom Tromey <tom@tromey.com>
93 * utils.h (make_cleanup_htab_delete): Don't declare.
94 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
96 * linespec.c (decode_compound_collector): Add constructor,
98 (lookup_prefix_sym): Remove cleanup.
99 (symtab_collector): Add constructor, destructor.
100 (collect_symtabs_from_filename): Remove cleanup.
101 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
102 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
104 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
105 * dwarf2read.c (dw2_expand_symtabs_matching)
106 (dw2_map_symbol_filenames, dwarf_decode_macros)
107 (write_psymtabs_to_index): Use htab_up.
108 * dwarf2loc.c (func_verify_no_selftailcall)
109 (call_site_find_chain_1, func_verify_no_selftailcall)
110 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
111 std::vector, gdb::unique_xmalloc_ptr.
112 (call_sitep): Remove typedef.
113 (dwarf2_locexpr_baton_eval): Remove unused variable.
115 2017-01-10 Tom Tromey <tom@tromey.com>
117 * python/python-internal.h (make_cleanup_py_decref)
118 (make_cleanup_py_xdecref): Don't declare.
119 * python/py-utils.c (py_decref, make_cleanup_py_decref)
120 (py_xdecref, make_cleanup_py_xdecref): Remove.
122 2017-01-10 Tom Tromey <tom@tromey.com>
124 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
125 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
127 2017-01-10 Tom Tromey <tom@tromey.com>
129 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
131 2017-01-10 Tom Tromey <tom@tromey.com>
133 * python/py-utils.c (unicode_to_encoded_string)
134 (python_string_to_target_string)
135 (python_string_to_target_python_string)
136 (python_string_to_host_string, gdbpy_obj_to_string)
137 (get_addr_from_python): Use gdbpy_ref.
139 2017-01-10 Tom Tromey <tom@tromey.com>
141 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
144 2017-01-10 Tom Tromey <tom@tromey.com>
146 * python/python.c (eval_python_command, gdbpy_decode_line)
147 (gdbpy_run_events, gdbpy_start_type_printers)
148 (gdbpy_apply_type_printers): Use gdbpy_ref.
150 2017-01-10 Tom Tromey <tom@tromey.com>
152 * python/py-param.c (get_doc_string, compute_enum_values): Use
155 2017-01-10 Tom Tromey <tom@tromey.com>
157 * python/py-inferior.c (find_thread_object, build_inferior_list):
160 2017-01-10 Tom Tromey <tom@tromey.com>
162 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
164 2017-01-10 Tom Tromey <tom@tromey.com>
166 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
169 2017-01-10 Tom Tromey <tom@tromey.com>
171 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
173 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
176 2017-01-10 Tom Tromey <tom@tromey.com>
178 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
181 2017-01-10 Tom Tromey <tom@tromey.com>
183 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
184 decref results of PyArg_ParseTupleAndKeywords.
186 2017-01-10 Tom Tromey <tom@tromey.com>
188 * python/python.c (python_run_simple_file): Use
189 unique_xmalloc_ptr, gdbpy_ref.
191 2017-01-10 Tom Tromey <tom@tromey.com>
193 * python/py-prettyprint.c (print_stack_unless_memory_error)
194 (print_string_repr, print_children): Use gdbpy_ref.
195 (dummy_python_frame): New class.
196 (dummy_python_frame::dummy_python_frame): Rename from
197 push_dummy_python_frame.
198 (py_restore_tstate): Remove.
200 2017-01-10 Tom Tromey <tom@tromey.com>
202 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
204 2017-01-10 Tom Tromey <tom@tromey.com>
206 * python/python.c (ensure_python_env, restore_python_env):
208 * python/python-internal.h (ensure_python_env): Don't declare.
209 * varobj.h (varobj_ensure_python_env): Don't declare.
210 * varobj.c (varobj_ensure_python_env): Remove.
212 2017-01-10 Tom Tromey <tom@tromey.com>
214 * varobj.c (varobj_value_get_print_value): Use
217 2017-01-10 Tom Tromey <tom@tromey.com>
219 * python/py-prettyprint.c (print_string_repr, print_children):
221 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
223 * varobj.c (varobj_value_get_print_value): Update.
224 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
226 2017-01-10 Tom Tromey <tom@tromey.com>
228 * varobj.c (varobj_get_display_hint)
229 (dynamic_varobj_has_child_method, install_new_value_visualizer)
230 (varobj_set_visualizer, free_variable): Use
233 2017-01-10 Tom Tromey <tom@tromey.com>
235 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
236 (do_finish_initialization): New function. Use gdbpy_ref.
237 (gdbpy_finish_initialization): Use gdbpy_enter. Call
238 do_finish_initialization.
240 2017-01-10 Tom Tromey <tom@tromey.com>
242 * python/py-param.c (get_set_value, get_show_value): Use
243 gdbpy_enter, gdbpy_ref.
245 2017-01-10 Tom Tromey <tom@tromey.com>
247 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
249 2017-01-10 Tom Tromey <tom@tromey.com>
251 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
253 2017-01-10 Tom Tromey <tom@tromey.com>
255 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
256 Use gdbpy_enter_varobj.
258 2017-01-10 Tom Tromey <tom@tromey.com>
260 * varobj.c (gdbpy_enter_varobj): New constructor.
261 * python/python-internal.h (gdbpy_enter_varobj): New class.
262 * python/py-varobj.c (py_varobj_get_iterator): Use
265 2017-01-10 Tom Tromey <tom@tromey.com>
267 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
268 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
269 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
270 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
272 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
274 2017-01-10 Tom Tromey <tom@tromey.com>
276 * python/py-xmethods.c (invoke_match_method): Use
279 2017-01-10 Tom Tromey <tom@tromey.com>
281 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
282 gdbpy_enter, gdbpy_ref.
284 2017-01-10 Tom Tromey <tom@tromey.com>
286 * python/python.c (python_interactive_command): Use gdbpy_enter.
288 2017-01-10 Tom Tromey <tom@tromey.com>
290 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
293 2017-01-10 Tom Tromey <tom@tromey.com>
295 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
296 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
298 2017-01-10 Tom Tromey <tom@tromey.com>
300 * utils.h (htab_deleter): New struct.
301 (htab_up): New typedef.
302 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
303 gdbpy_enter, gdbpy_ref, htab_up.
305 2017-01-10 Tom Tromey <tom@tromey.com>
307 * python/py-unwind.c (pending_frame_invalidate): Remove.
308 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
310 2017-01-10 Tom Tromey <tom@tromey.com>
312 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
313 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
315 2017-01-10 Tom Tromey <tom@tromey.com>
317 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
319 2017-01-10 Tom Tromey <tom@tromey.com>
321 * python/python.c (gdbpy_eval_from_control_command)
322 (gdbpy_source_script, gdbpy_run_events)
323 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
324 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
327 2017-01-10 Tom Tromey <tom@tromey.com>
329 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
331 2017-01-10 Tom Tromey <tom@tromey.com>
333 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
335 2017-01-10 Tom Tromey <tom@tromey.com>
337 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
338 (python_on_inferior_call_pre, python_on_inferior_call_post)
339 (python_on_memory_change, python_on_register_change)
340 (python_inferior_exit, python_new_objfile, add_thread_object)
341 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
343 2017-01-10 Tom Tromey <tom@tromey.com>
345 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
346 (bpfinishpy_handle_exit): Use gdbpy_enter.
348 2017-01-10 Tom Tromey <tom@tromey.com>
350 * python/py-cmd.c (cmdpy_destroyer)
351 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
354 2017-01-10 Tom Tromey <tom@tromey.com>
356 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
358 (gdbpy_breakpoint_has_cond): Likewise.
360 2017-01-10 Tom Tromey <tom@tromey.com>
362 * python/python.c (gdbpy_enter): New constructor.
363 (~gdbpy_enter): New destructor.
364 (restore_python_env, ensure_python_env): Rewrite.
365 * python/python-internal.h (gdbpy_enter): New class.
367 2017-01-10 Tom Tromey <tom@tromey.com>
369 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
371 2017-01-10 Tom Tromey <tom@tromey.com>
373 * python/py-value.c (value_has_field, get_field_flag)
374 (get_field_type, valpy_getitem, convert_value_from_python): Use
377 2017-01-10 Tom Tromey <tom@tromey.com>
379 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
382 2017-01-10 Tom Tromey <tom@tromey.com>
384 * python/py-prettyprint.c (search_pp_list)
385 (find_pretty_printer_from_objfiles)
386 (find_pretty_printer_from_progspace)
387 (find_pretty_printer_from_gdb, find_pretty_printer)
388 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
391 2017-01-10 Tom Tromey <tom@tromey.com>
393 * python/py-param.c (call_doc_function): Use gdbpy_ref.
395 2017-01-10 Tom Tromey <tom@tromey.com>
397 * python/py-linetable.c (build_line_table_tuple_from_pcs)
398 (ltpy_get_all_source_lines): Use gdbpy_ref.
400 2017-01-10 Tom Tromey <tom@tromey.com>
402 * python/py-framefilter.c (extract_sym, extract_value)
403 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
406 2017-01-10 Tom Tromey <tom@tromey.com>
408 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
410 2017-01-10 Tom Tromey <tom@tromey.com>
412 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
414 2017-01-10 Tom Tromey <tom@tromey.com>
416 * python/py-function.c (convert_values_to_python, fnpy_init): Use
419 2017-01-10 Tom Tromey <tom@tromey.com>
421 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
423 2017-01-10 Tom Tromey <tom@tromey.com>
425 * python/py-type.c (convert_field, make_fielditem, typy_fields)
426 (typy_range): Use gdbpy_ref.
428 2017-01-10 Tom Tromey <tom@tromey.com>
430 * python/py-threadevent.c (create_thread_event_object): Use
432 * python/py-stopevent.c (create_stop_event_object): Simplify.
433 (emit_stop_event): Use gdbpy_ref.
434 * python/py-signalevent.c (create_signal_event_object): Use
436 * python/py-newobjfileevent.c (create_new_objfile_event_object)
437 (emit_new_objfile_event, create_clear_objfiles_event_object)
438 (emit_clear_objfiles_event): Use gdbpy_ref.
439 * python/py-infevents.c (create_inferior_call_event_object)
440 (create_register_changed_event_object)
441 (create_memory_changed_event_object, emit_inferior_call_event)
442 (emit_memory_changed_event, emit_register_changed_event): Use
444 * python/py-exitedevent.c (create_exited_event_object)
445 (emit_exited_event): Use gdbpy_ref.
446 * python/py-event.h (evpy_emit_event): Remove
447 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
448 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
449 * python/py-continueevent.c (emit_continue_event): Use
451 * python/py-breakpoint.c (gdbpy_breakpoint_created)
452 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
454 * python/py-bpevent.c (create_breakpoint_event_object): Use
457 2017-01-10 Tom Tromey <tom@tromey.com>
459 * python/py-ref.h: New file.
461 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
463 * cli-out.c (cli_ui_out::do_redirect): Change return type to
465 * cli-out.h (cli_ui_out::do_redirect): Likewise.
466 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
467 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
468 * ui-out.c (ui_out::redirect): Likewise.
469 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
470 * cli/cli-logging.c (set_logging_redirect): Update call site of
472 (handle_redirections): Likewise.
473 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
474 * top.c (execute_command_to_string): Likewise.
475 * utils.c (do_ui_out_redirect_pop): Likewise.
477 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
479 * stack.c (_initialize_stack): Update "frame" command help message.
481 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
483 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
485 2017-01-06 Yao Qi <yao.qi@linaro.org>
487 * x86-linux-nat.h: Include gdb_proc_service.h.
489 2017-01-06 Yao Qi <yao.qi@linaro.org>
491 * ser-base.h: Include serial.h.
493 2017-01-06 Yao Qi <yao.qi@linaro.org>
495 * ppc-linux-tdep.h: Include ppc-tdep.h.
497 2017-01-06 Yao Qi <yao.qi@linaro.org>
499 * nat/amd64-linux-siginfo.h: Include signal.h.
501 2017-01-06 Yao Qi <yao.qi@linaro.org>
503 * nat/aarch64-linux-hw-point.h: Include break-common.h.
505 2017-01-06 Yao Qi <yao.qi@linaro.org>
507 * mi/mi-parse.h: Include mi-cmds.h.
509 2017-01-06 Yao Qi <yao.qi@linaro.org>
511 * inf-loop.c: Don't include "target.h".
512 * inf-loop.h: Include it here.
514 2017-01-06 Yao Qi <yao.qi@linaro.org>
516 * dfp.h: Include "dboulest.h" and "expression.h".
518 2017-01-06 Yao Qi <yao.qi@linaro.org>
520 * ax-gdb.h: Include "ax.h".
522 2017-01-06 Yao Qi <yao.qi@linaro.org>
524 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
525 with nat/gdb_ptrace.h.
527 2017-01-05 Yao Qi <yao.qi@linaro.org>
529 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
531 (mips64_fbsd_sigframe_init): Likewise.
533 2017-01-04 John Baldwin <jhb@FreeBSD.org>
535 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
536 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
538 2017-01-04 John Baldwin <jhb@FreeBSD.org>
540 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
541 * NEWS: Mention new FreeBSD/mips native configuration.
542 * config/mips/fbsd.mh: New file.
543 * configure.host: Add mips*-*-freebsd*.
544 * mips-fbsd-nat.c: New file.
546 2017-01-04 John Baldwin <jhb@FreeBSD.org>
548 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
549 (ALLDEPFILES): Add mips-fbsd-tdep.c.
550 * NEWS: Mention new FreeBSD/mips target.
551 * configure.tgt: Add mips*-*-freebsd*.
552 * mips-fbsd-tdep.c: New file.
553 * mips-fbsd-tdep.h: New file.
555 2017-01-04 Yao Qi <yao.qi@linaro.org>
557 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
558 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
560 2017-01-01 Joel Brobecker <brobecker@adacore.com>
562 Update copyright year range in all GDB files.
564 2017-01-01 Joel Brobecker <brobecker@adacore.com>
566 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
568 For older changes see ChangeLog-2016.
574 version-control: never