python: Make gdb.execute("show commands") work (PR 23669)
[external/binutils.git] / gdb / ChangeLog
index b673acd..7fb64d6 100644 (file)
@@ -1,3 +1,133 @@
+2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       PR python/23669
+       * breakpoint.c (commands_cmd_element): New.
+       (_initialize_breakpoint): Assign commands_cmd_element.
+       * breakpoint.h (commands_cmd_element): New.
+       * cli/cli-script.c (while_cmd_element, if_command,
+       define_cmd_element): New.
+       (command_name_equals): Remove.
+       (process_next_line): Compare commands by pointer, not by name.
+       (_initialize_cli_script): Assign the various cmd_list_element
+       variables.
+       * compile/compile.c (compile_cmd_element): New.
+       (_initialize_compile): Assign compile_cmd_element.
+       * compile/compile.h (compile_cmd_element): New.
+       * guile/guile.c (guile_cmd_element): New.
+       (install_gdb_commands): Assign guile_cmd_element.
+       * guile/guile.h (guile_cmd_element): New.
+       * python/python.c (python_cmd_element): New.
+       (_initialize_python): Assign python_cmd_element.
+       * python/python.h (python_cmd_element): New.
+       * tracepoint.c (while_stepping_cmd_element): New.
+       (_initialize_tracepoint): Assign while_stepping_cmd_element.
+       * tracepoint.h (while_stepping_cmd_element): New.
+
+2018-09-17  Tom Tromey  <tom@tromey.com>
+
+       * infrun.c (save_infcall_suspend_state): Return
+       infcall_suspend_state_up.
+       (save_infcall_control_state): Return infcall_control_state_up.
+       * inferior.h (save_infcall_suspend_state)
+       (save_infcall_control_state): Declare later.  Return unique
+       pointers.
+
+2018-09-17  Tom Tromey  <tom@tromey.com>
+
+       * infrun.c (struct stop_context): Declare constructor,
+       destructor, "changed" method.
+       (stop_context::stop_context): Rename from save_stop_context.
+       (stop_context::~stop_context): Rename from
+       release_stop_context_cleanup.
+       (normal_stop): Update.
+       (stop_context::changed): Rename from stop_context_changed.  Return
+       bool.
+
+2018-09-17  Tom Tromey  <tom@tromey.com>
+
+       * inferior.h (struct infcall_suspend_state_deleter): New.
+       (infcall_suspend_state_up): New typedef.
+       (struct infcall_control_state_deleter): New.
+       (infcall_control_state_up): New typedef.
+       (make_cleanup_restore_infcall_suspend_state)
+       (make_cleanup_restore_infcall_control_state): Don't declare.
+       * infcall.c (call_function_by_hand_dummy): Update.
+       * infrun.c (do_restore_infcall_suspend_state_cleanup)
+       (make_cleanup_restore_infcall_suspend_state): Remove.
+       (do_restore_infcall_control_state_cleanup)
+       (make_cleanup_restore_infcall_control_state): Remove.
+
+2018-09-17  Tom Tromey  <tom@tromey.com>
+
+       * gdbthread.h (struct thread_control_state): Add initializer.
+       (class thread_info) <control>: Remove initializer.
+       * inferior.h (struct inferior_control_state): Add initializer.
+       (class inferior) <control>: Remove initializer.
+       (exit_inferior_1): Update.
+       * infrun.c (struct infcall_control_state): Add constructors.
+       (save_infcall_control_state): Use new.
+       (restore_infcall_control_state, discard_infcall_control_state):
+       Use delete.
+
+2018-09-17  Tom Tromey  <tom@tromey.com>
+
+       * infrun.c (struct infcall_suspend_state) <registers>: Now a
+       unique_ptr.
+       <siginfo_data>: Now a unique_xmalloc_ptr.
+       (save_infcall_suspend_state, restore_infcall_suspend_state)
+       (discard_infcall_suspend_state)
+       (get_infcall_suspend_state_regcache): Update.
+
+2018-09-17  Tom Tromey  <tom@tromey.com>
+
+       * gdbthread.h (struct thread_suspend_state): Add initializers.
+       (class thread_info) <suspend>: Remove initializer.
+       * infrun.c (struct infcall_suspend_state): Add initializers.
+       (save_infcall_suspend_state): Use new.
+       (discard_infcall_suspend_state): Use delete.
+
+2018-09-16  Tom Tromey  <tom@tromey.com>
+
+       * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
+       Remove.
+       * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
+       rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
+       (py_varobj_iter_new): Likewise.
+       (py_varobj_get_iterator): Use gdbpy_ref.
+
+2018-09-16  Tom Tromey  <tom@tromey.com>
+
+       * python/py-threadevent.c (py_get_event_thread): Simplify.
+       * python/py-inferior.c (infpy_thread_from_thread_handle):
+       Return immediately after calling thread_to_thread_object.  Use
+       Py_RETURN_NONE.
+       (thread_to_thread_object): Set the exception on a NULL return.
+
+2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
+
+2018-09-16  Tom Tromey  <tom@tromey.com>
+
+       * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
+       Remove.
+
+2018-09-16  Tom Tromey  <tom@tromey.com>
+
+       * python/python-internal.h (thread_to_thread_object): Change
+       return type.
+       * python/py-inferior.c (thread_to_thread_object): Return a new
+       reference.
+       (infpy_thread_from_thread_handle): Update.
+       * python/py-infthread.c (gdbpy_selected_thread): Update.
+       * python/py-stopevent.c (create_stop_event_object): Update.
+       * python/py-threadevent.c (py_get_event_thread): Return a new
+       reference.
+       (py_get_event_thread): Update.
+       * python/py-event.h (py_get_event_thread): Change return type.
+       * python/py-continueevent.c (create_continue_event_object):
+       Update.
+
 2018-09-16  Tom Tromey  <tom@tromey.com>
 
        * python/py-progspace.c (pspy_get_objfiles): Update.