diff options
author | Tim Wiederhake <tim.wiederhake@intel.com> | 2016-11-21 16:39:57 +0100 |
---|---|---|
committer | Tim Wiederhake <tim.wiederhake@intel.com> | 2017-02-14 10:57:56 +0100 |
commit | 4726b2d82c89fe6f8e769d1ae9f9e5e528f91156 (patch) | |
tree | dddfdf23b6f67d7593b5bbef33f6c2c47d683dd4 /gdb/python/python-internal.h | |
parent | b158a20f26f1d226088122e8c4fa5a23bb893a48 (diff) | |
download | gdb-4726b2d82c89fe6f8e769d1ae9f9e5e528f91156.zip gdb-4726b2d82c89fe6f8e769d1ae9f9e5e528f91156.tar.gz gdb-4726b2d82c89fe6f8e769d1ae9f9e5e528f91156.tar.bz2 |
python: Create Python bindings for record history.
This patch adds three new functions to the gdb module in Python:
- start_recording
- stop_recording
- current_recording
start_recording and current_recording return an object of the new type
gdb.Record, which can be used to access the recorded data.
Signed-off-by: Tim Wiederhake <tim.wiederhake@intel.com>
gdb/ChangeLog
* Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
(SUBDIR_PYTHON_SRCS): Add python/py-record.c.
* python/py-record.c: New file.
* python/python-internal.h (gdbpy_start_recording,
gdbpy_current_recording, gdpy_stop_recording,
gdbpy_initialize_record): New export.
* python/python.c (_initialize_python): Add gdbpy_initialize_record.
(python_GdbMethods): Add gdbpy_start_recording,
gdbpy_current_recording and gdbpy_stop_recording.
Change-Id: I772aa9aa068621443f10a330b11dc7dc9a63face
Diffstat (limited to 'gdb/python/python-internal.h')
-rw-r--r-- | gdb/python/python-internal.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h index e2ebc1b..c6af9f7 100644 --- a/gdb/python/python-internal.h +++ b/gdb/python/python-internal.h @@ -369,6 +369,9 @@ PyObject *gdbpy_frame_stop_reason_string (PyObject *, PyObject *); PyObject *gdbpy_lookup_symbol (PyObject *self, PyObject *args, PyObject *kw); PyObject *gdbpy_lookup_global_symbol (PyObject *self, PyObject *args, PyObject *kw); +PyObject *gdbpy_start_recording (PyObject *self, PyObject *args); +PyObject *gdbpy_current_recording (PyObject *self, PyObject *args); +PyObject *gdbpy_stop_recording (PyObject *self, PyObject *args); PyObject *gdbpy_newest_frame (PyObject *self, PyObject *args); PyObject *gdbpy_selected_frame (PyObject *self, PyObject *args); PyObject *gdbpy_block_for_pc (PyObject *self, PyObject *args); @@ -436,6 +439,8 @@ int gdbpy_initialize_values (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION; int gdbpy_initialize_frames (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION; +int gdbpy_initialize_record (void) + CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION; int gdbpy_initialize_symtabs (void) CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION; int gdbpy_initialize_commands (void) |