1 2017-01-10 Tom Tromey <tom@tromey.com>
3 * windows-tdep.c (windows_xfer_shared_library): Update.
4 * windows-nat.c (windows_make_so): Update.
5 * utils.h (make_cleanup_bfd_unref): Remove.
6 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
7 * symfile.h (symfile_bfd_open)
8 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
9 * symfile.c (read_symbols, symbol_file_add)
10 (separate_debug_file_exists): Update.
11 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
12 (generic_load, reread_symbols): Update.
13 * symfile-mem.c (symbol_file_add_from_memory): Update.
14 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15 (spu_symbol_file_add_from_memory): Update.
16 * solist.h (struct target_so_ops) <bfd_open>: Return
18 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
19 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
21 (solib_map_sections, reload_shared_libraries_1): Update.
22 * solib-svr4.c (enable_break): Update.
23 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
24 * solib-frv.c (enable_break2): Update.
25 * solib-dsbt.c (enable_break): Update.
26 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
28 (darwin_solib_get_all_image_info_addr_at_init): Update.
29 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
30 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
31 * record-full.c (record_full_save): Update.
32 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
33 * procfs.c (insert_dbx_link_bpt_in_file): Update.
34 * minidebug.c (find_separate_debug_file_in_section): Return
36 * machoread.c (macho_add_oso_symfile): Change abfd to
38 (macho_symfile_read_all_oso): Update.
39 (macho_check_dsym): Return gdb_bfd_ref_ptr.
40 (macho_symfile_read): Update.
41 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
42 (jit_bfd_try_read_symtab): Update.
43 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
44 (gdb_bfd_openw, gdb_bfd_openr_iovec)
45 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
47 (gdb_bfd_ref_policy): New struct.
48 (gdb_bfd_ref_ptr): New typedef.
49 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
50 (gdb_bfd_openw, gdb_bfd_openr_iovec)
51 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
53 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
54 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
55 (gcore_command): Update.
56 * exec.c (exec_file_attach): Update.
57 * elfread.c (elf_symfile_read): Update.
58 * dwarf2read.c (dwarf2_get_dwz_file): Update.
59 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
60 (open_and_init_dwo_file): Update.
61 (open_dwp_file): Return gdb_bfd_ref_ptr.
62 (open_and_init_dwp_file): Update.
63 * corelow.c (core_open): Update.
64 * compile/compile-object-load.c (compile_object_load): Update.
65 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
66 * coffread.c (coff_symfile_read): Update.
67 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
68 gdb_bfd_ref_ptr. Rename.
69 (dump_bfd_file, restore_command): Update.
70 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
71 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
72 (find_separate_debug_file_by_buildid): Update.
74 2017-01-10 Tom Tromey <tom@tromey.com>
76 * common/gdb_ref_ptr.h: New file.
77 * python/py-ref.h (struct gdbpy_ref_policy): New.
78 (gdbpy_ref): Now a typedef.
80 2017-01-10 Tom Tromey <tom@tromey.com>
82 * utils.h (make_cleanup_htab_delete): Don't declare.
83 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
85 * linespec.c (decode_compound_collector): Add constructor,
87 (lookup_prefix_sym): Remove cleanup.
88 (symtab_collector): Add constructor, destructor.
89 (collect_symtabs_from_filename): Remove cleanup.
90 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
91 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
93 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
94 * dwarf2read.c (dw2_expand_symtabs_matching)
95 (dw2_map_symbol_filenames, dwarf_decode_macros)
96 (write_psymtabs_to_index): Use htab_up.
97 * dwarf2loc.c (func_verify_no_selftailcall)
98 (call_site_find_chain_1, func_verify_no_selftailcall)
99 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
100 std::vector, gdb::unique_xmalloc_ptr.
101 (call_sitep): Remove typedef.
102 (dwarf2_locexpr_baton_eval): Remove unused variable.
104 2017-01-10 Tom Tromey <tom@tromey.com>
106 * python/python-internal.h (make_cleanup_py_decref)
107 (make_cleanup_py_xdecref): Don't declare.
108 * python/py-utils.c (py_decref, make_cleanup_py_decref)
109 (py_xdecref, make_cleanup_py_xdecref): Remove.
111 2017-01-10 Tom Tromey <tom@tromey.com>
113 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
114 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
116 2017-01-10 Tom Tromey <tom@tromey.com>
118 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
120 2017-01-10 Tom Tromey <tom@tromey.com>
122 * python/py-utils.c (unicode_to_encoded_string)
123 (python_string_to_target_string)
124 (python_string_to_target_python_string)
125 (python_string_to_host_string, gdbpy_obj_to_string)
126 (get_addr_from_python): Use gdbpy_ref.
128 2017-01-10 Tom Tromey <tom@tromey.com>
130 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
133 2017-01-10 Tom Tromey <tom@tromey.com>
135 * python/python.c (eval_python_command, gdbpy_decode_line)
136 (gdbpy_run_events, gdbpy_start_type_printers)
137 (gdbpy_apply_type_printers): Use gdbpy_ref.
139 2017-01-10 Tom Tromey <tom@tromey.com>
141 * python/py-param.c (get_doc_string, compute_enum_values): Use
144 2017-01-10 Tom Tromey <tom@tromey.com>
146 * python/py-inferior.c (find_thread_object, build_inferior_list):
149 2017-01-10 Tom Tromey <tom@tromey.com>
151 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
153 2017-01-10 Tom Tromey <tom@tromey.com>
155 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
158 2017-01-10 Tom Tromey <tom@tromey.com>
160 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
162 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
165 2017-01-10 Tom Tromey <tom@tromey.com>
167 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
170 2017-01-10 Tom Tromey <tom@tromey.com>
172 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
173 decref results of PyArg_ParseTupleAndKeywords.
175 2017-01-10 Tom Tromey <tom@tromey.com>
177 * python/python.c (python_run_simple_file): Use
178 unique_xmalloc_ptr, gdbpy_ref.
180 2017-01-10 Tom Tromey <tom@tromey.com>
182 * python/py-prettyprint.c (print_stack_unless_memory_error)
183 (print_string_repr, print_children): Use gdbpy_ref.
184 (dummy_python_frame): New class.
185 (dummy_python_frame::dummy_python_frame): Rename from
186 push_dummy_python_frame.
187 (py_restore_tstate): Remove.
189 2017-01-10 Tom Tromey <tom@tromey.com>
191 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
193 2017-01-10 Tom Tromey <tom@tromey.com>
195 * python/python.c (ensure_python_env, restore_python_env):
197 * python/python-internal.h (ensure_python_env): Don't declare.
198 * varobj.h (varobj_ensure_python_env): Don't declare.
199 * varobj.c (varobj_ensure_python_env): Remove.
201 2017-01-10 Tom Tromey <tom@tromey.com>
203 * varobj.c (varobj_value_get_print_value): Use
206 2017-01-10 Tom Tromey <tom@tromey.com>
208 * python/py-prettyprint.c (print_string_repr, print_children):
210 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
212 * varobj.c (varobj_value_get_print_value): Update.
213 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
215 2017-01-10 Tom Tromey <tom@tromey.com>
217 * varobj.c (varobj_get_display_hint)
218 (dynamic_varobj_has_child_method, install_new_value_visualizer)
219 (varobj_set_visualizer, free_variable): Use
222 2017-01-10 Tom Tromey <tom@tromey.com>
224 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
225 (do_finish_initialization): New function. Use gdbpy_ref.
226 (gdbpy_finish_initialization): Use gdbpy_enter. Call
227 do_finish_initialization.
229 2017-01-10 Tom Tromey <tom@tromey.com>
231 * python/py-param.c (get_set_value, get_show_value): Use
232 gdbpy_enter, gdbpy_ref.
234 2017-01-10 Tom Tromey <tom@tromey.com>
236 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
238 2017-01-10 Tom Tromey <tom@tromey.com>
240 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
242 2017-01-10 Tom Tromey <tom@tromey.com>
244 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
245 Use gdbpy_enter_varobj.
247 2017-01-10 Tom Tromey <tom@tromey.com>
249 * varobj.c (gdbpy_enter_varobj): New constructor.
250 * python/python-internal.h (gdbpy_enter_varobj): New class.
251 * python/py-varobj.c (py_varobj_get_iterator): Use
254 2017-01-10 Tom Tromey <tom@tromey.com>
256 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
257 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
258 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
259 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
261 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
263 2017-01-10 Tom Tromey <tom@tromey.com>
265 * python/py-xmethods.c (invoke_match_method): Use
268 2017-01-10 Tom Tromey <tom@tromey.com>
270 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
271 gdbpy_enter, gdbpy_ref.
273 2017-01-10 Tom Tromey <tom@tromey.com>
275 * python/python.c (python_interactive_command): Use gdbpy_enter.
277 2017-01-10 Tom Tromey <tom@tromey.com>
279 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
282 2017-01-10 Tom Tromey <tom@tromey.com>
284 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
285 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
287 2017-01-10 Tom Tromey <tom@tromey.com>
289 * utils.h (htab_deleter): New struct.
290 (htab_up): New typedef.
291 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
292 gdbpy_enter, gdbpy_ref, htab_up.
294 2017-01-10 Tom Tromey <tom@tromey.com>
296 * python/py-unwind.c (pending_frame_invalidate): Remove.
297 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
299 2017-01-10 Tom Tromey <tom@tromey.com>
301 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
302 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
304 2017-01-10 Tom Tromey <tom@tromey.com>
306 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
308 2017-01-10 Tom Tromey <tom@tromey.com>
310 * python/python.c (gdbpy_eval_from_control_command)
311 (gdbpy_source_script, gdbpy_run_events)
312 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
313 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
316 2017-01-10 Tom Tromey <tom@tromey.com>
318 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
320 2017-01-10 Tom Tromey <tom@tromey.com>
322 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
324 2017-01-10 Tom Tromey <tom@tromey.com>
326 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
327 (python_on_inferior_call_pre, python_on_inferior_call_post)
328 (python_on_memory_change, python_on_register_change)
329 (python_inferior_exit, python_new_objfile, add_thread_object)
330 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
332 2017-01-10 Tom Tromey <tom@tromey.com>
334 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
335 (bpfinishpy_handle_exit): Use gdbpy_enter.
337 2017-01-10 Tom Tromey <tom@tromey.com>
339 * python/py-cmd.c (cmdpy_destroyer)
340 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
343 2017-01-10 Tom Tromey <tom@tromey.com>
345 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
347 (gdbpy_breakpoint_has_cond): Likewise.
349 2017-01-10 Tom Tromey <tom@tromey.com>
351 * python/python.c (gdbpy_enter): New constructor.
352 (~gdbpy_enter): New destructor.
353 (restore_python_env, ensure_python_env): Rewrite.
354 * python/python-internal.h (gdbpy_enter): New class.
356 2017-01-10 Tom Tromey <tom@tromey.com>
358 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
360 2017-01-10 Tom Tromey <tom@tromey.com>
362 * python/py-value.c (value_has_field, get_field_flag)
363 (get_field_type, valpy_getitem, convert_value_from_python): Use
366 2017-01-10 Tom Tromey <tom@tromey.com>
368 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
371 2017-01-10 Tom Tromey <tom@tromey.com>
373 * python/py-prettyprint.c (search_pp_list)
374 (find_pretty_printer_from_objfiles)
375 (find_pretty_printer_from_progspace)
376 (find_pretty_printer_from_gdb, find_pretty_printer)
377 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
380 2017-01-10 Tom Tromey <tom@tromey.com>
382 * python/py-param.c (call_doc_function): Use gdbpy_ref.
384 2017-01-10 Tom Tromey <tom@tromey.com>
386 * python/py-linetable.c (build_line_table_tuple_from_pcs)
387 (ltpy_get_all_source_lines): Use gdbpy_ref.
389 2017-01-10 Tom Tromey <tom@tromey.com>
391 * python/py-framefilter.c (extract_sym, extract_value)
392 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
395 2017-01-10 Tom Tromey <tom@tromey.com>
397 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
399 2017-01-10 Tom Tromey <tom@tromey.com>
401 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
403 2017-01-10 Tom Tromey <tom@tromey.com>
405 * python/py-function.c (convert_values_to_python, fnpy_init): Use
408 2017-01-10 Tom Tromey <tom@tromey.com>
410 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
412 2017-01-10 Tom Tromey <tom@tromey.com>
414 * python/py-type.c (convert_field, make_fielditem, typy_fields)
415 (typy_range): Use gdbpy_ref.
417 2017-01-10 Tom Tromey <tom@tromey.com>
419 * python/py-threadevent.c (create_thread_event_object): Use
421 * python/py-stopevent.c (create_stop_event_object): Simplify.
422 (emit_stop_event): Use gdbpy_ref.
423 * python/py-signalevent.c (create_signal_event_object): Use
425 * python/py-newobjfileevent.c (create_new_objfile_event_object)
426 (emit_new_objfile_event, create_clear_objfiles_event_object)
427 (emit_clear_objfiles_event): Use gdbpy_ref.
428 * python/py-infevents.c (create_inferior_call_event_object)
429 (create_register_changed_event_object)
430 (create_memory_changed_event_object, emit_inferior_call_event)
431 (emit_memory_changed_event, emit_register_changed_event): Use
433 * python/py-exitedevent.c (create_exited_event_object)
434 (emit_exited_event): Use gdbpy_ref.
435 * python/py-event.h (evpy_emit_event): Remove
436 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
437 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
438 * python/py-continueevent.c (emit_continue_event): Use
440 * python/py-breakpoint.c (gdbpy_breakpoint_created)
441 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
443 * python/py-bpevent.c (create_breakpoint_event_object): Use
446 2017-01-10 Tom Tromey <tom@tromey.com>
448 * python/py-ref.h: New file.
450 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
452 * cli-out.c (cli_ui_out::do_redirect): Change return type to
454 * cli-out.h (cli_ui_out::do_redirect): Likewise.
455 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
456 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
457 * ui-out.c (ui_out::redirect): Likewise.
458 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
459 * cli/cli-logging.c (set_logging_redirect): Update call site of
461 (handle_redirections): Likewise.
462 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
463 * top.c (execute_command_to_string): Likewise.
464 * utils.c (do_ui_out_redirect_pop): Likewise.
466 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
468 * stack.c (_initialize_stack): Update "frame" command help message.
470 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
472 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
474 2017-01-06 Yao Qi <yao.qi@linaro.org>
476 * x86-linux-nat.h: Include gdb_proc_service.h.
478 2017-01-06 Yao Qi <yao.qi@linaro.org>
480 * ser-base.h: Include serial.h.
482 2017-01-06 Yao Qi <yao.qi@linaro.org>
484 * ppc-linux-tdep.h: Include ppc-tdep.h.
486 2017-01-06 Yao Qi <yao.qi@linaro.org>
488 * nat/amd64-linux-siginfo.h: Include signal.h.
490 2017-01-06 Yao Qi <yao.qi@linaro.org>
492 * nat/aarch64-linux-hw-point.h: Include break-common.h.
494 2017-01-06 Yao Qi <yao.qi@linaro.org>
496 * mi/mi-parse.h: Include mi-cmds.h.
498 2017-01-06 Yao Qi <yao.qi@linaro.org>
500 * inf-loop.c: Don't include "target.h".
501 * inf-loop.h: Include it here.
503 2017-01-06 Yao Qi <yao.qi@linaro.org>
505 * dfp.h: Include "dboulest.h" and "expression.h".
507 2017-01-06 Yao Qi <yao.qi@linaro.org>
509 * ax-gdb.h: Include "ax.h".
511 2017-01-06 Yao Qi <yao.qi@linaro.org>
513 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
514 with nat/gdb_ptrace.h.
516 2017-01-05 Yao Qi <yao.qi@linaro.org>
518 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
520 (mips64_fbsd_sigframe_init): Likewise.
522 2017-01-04 John Baldwin <jhb@FreeBSD.org>
524 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
525 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
527 2017-01-04 John Baldwin <jhb@FreeBSD.org>
529 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
530 * NEWS: Mention new FreeBSD/mips native configuration.
531 * config/mips/fbsd.mh: New file.
532 * configure.host: Add mips*-*-freebsd*.
533 * mips-fbsd-nat.c: New file.
535 2017-01-04 John Baldwin <jhb@FreeBSD.org>
537 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
538 (ALLDEPFILES): Add mips-fbsd-tdep.c.
539 * NEWS: Mention new FreeBSD/mips target.
540 * configure.tgt: Add mips*-*-freebsd*.
541 * mips-fbsd-tdep.c: New file.
542 * mips-fbsd-tdep.h: New file.
544 2017-01-04 Yao Qi <yao.qi@linaro.org>
546 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
547 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
549 2017-01-01 Joel Brobecker <brobecker@adacore.com>
551 Update copyright year range in all GDB files.
553 2017-01-01 Joel Brobecker <brobecker@adacore.com>
555 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
557 For older changes see ChangeLog-2016.
563 version-control: never