Commit 03ab742942d21da6d69ca11d9ba9b5d7f15f337b
- Date: Sun Apr 27 15:01:53 +0000 2008
- Committer: Thiago Jung Bauermann (bauerman@br.ibm.com)
- Author: Thiago Jung Bauermann (bauerman@br.ibm.com)
- Commit SHA1: 03ab742942d21da6d69ca11d9ba9b5d7f15f337b
- Tree SHA1: bb15cd5db10892c45f48fb2d10026f1e3fc74875
- gdb/python/frame.c 19 +++++++++++++++++++
- gdb/python/python.c 2 ++
- gdb/python/python-internal.h 1 +
Commit diff
- Diff rendering mode:
- inline
- side by side
gdb/python/frame.c
|   | ||
| 521 | 521 | } |
| 522 | 522 | |
| 523 | 523 | PyObject * |
| 524 | gdbpy_get_selected_frame (PyObject *self, PyObject *args) | |
| 525 | { | |
| 526 | struct frame_info *frame; | |
| 527 | frame_object *frame_obj = NULL; /* Initialize to appease gcc warning. */ | |
| 528 | volatile struct gdb_exception except; | |
| 529 | ||
| 530 | TRY_CATCH (except, RETURN_MASK_ALL) | |
| 531 | { | |
| 532 | frame = get_selected_frame ("No frame is currently selected."); | |
| 533 | frame_obj = frame_info_to_frame_object (frame); | |
| 534 | if (frame_obj == NULL) | |
| 535 | return NULL; | |
| 536 | } | |
| 537 | GDB_PY_HANDLE_EXCEPTION (except); | |
| 538 | ||
| 539 | return (PyObject *) frame_obj; | |
| 540 | } | |
| 541 | ||
| 542 | PyObject * | |
| 524 | 543 | gdbpy_frame_stop_reason_string (PyObject *self, PyObject *args) |
| 525 | 544 | { |
| 526 | 545 | int reason; |
| toggle raw diff | ||
gdb/python/python-internal.h
|   | ||
| 38 | 38 | PyObject *gdbpy_current_frame (PyObject *, PyObject *); |
| 39 | 39 | PyObject *gdbpy_frame_stop_reason_string (PyObject *, PyObject *); |
| 40 | 40 | PyObject *gdbpy_lookup_symbol (PyObject *self, PyObject *args); |
| 41 | PyObject *gdbpy_get_selected_frame (PyObject *self, PyObject *args); | |
| 41 | 42 | |
| 42 | 43 | PyObject *value_from_value (struct value *v); |
| 43 | 44 | PyObject *variable_to_python (struct cmd_list_element *); |
| toggle raw diff | ||
gdb/python/python.c
|   | ||
| 76 | 76 | "Return a tuple of all frame objects" }, |
| 77 | 77 | { "current_frame", gdbpy_current_frame, METH_NOARGS, |
| 78 | 78 | "Return the current frame object" }, |
| 79 | { "get_selected_frame", gdbpy_get_selected_frame, METH_NOARGS, | |
| 80 | "Return the selected frame object" }, | |
| 79 | 81 | { "frame_stop_reason_string", gdbpy_frame_stop_reason_string, |
| 80 | 82 | METH_VARARGS, "Return a string explaining unwind stop reason" }, |
| 81 | 83 | |
| toggle raw diff | ||
