gdb.rb 0.1.3 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README +7 -1
- data/bin/gdb.rb +4 -3
- data/ext/extconf.rb +1 -3
- data/ext/src/{gdb-7.0.tar.bz2 → gdb-7.2.tar.bz2} +0 -0
- data/gdb.rb.gemspec +5 -18
- data/patches/gdb-leak.patch +41 -61
- data/scripts/ruby-gdb.py +54 -27
- metadata +20 -10
- data/patches/gdb-breakpoints.patch +0 -744
- data/patches/gdb-eval.patch +0 -57
data/patches/gdb-eval.patch
DELETED
@@ -1,57 +0,0 @@
|
|
1
|
-
diff --git a/python/py-value.c b/python/py-value.c
|
2
|
-
index 0146593..8f8c610 100644
|
3
|
-
--- a/python/py-value.c
|
4
|
-
+++ b/python/py-value.c
|
5
|
-
@@ -972,6 +972,27 @@ gdbpy_history (PyObject *self, PyObject *args)
|
6
|
-
return value_to_value_object (res_val);
|
7
|
-
}
|
8
|
-
|
9
|
-
+/* Returns value object for a given expression. */
|
10
|
-
+PyObject *
|
11
|
-
+gdbpy_eval (PyObject *self, PyObject *args)
|
12
|
-
+{
|
13
|
-
+ char *arg;
|
14
|
-
+ struct value *res_val = NULL; /* Initialize to appease gcc warning. */
|
15
|
-
+ volatile struct gdb_exception except;
|
16
|
-
+
|
17
|
-
+ if (! PyArg_ParseTuple (args, "s", &arg))
|
18
|
-
+ return NULL;
|
19
|
-
+
|
20
|
-
+ TRY_CATCH (except, RETURN_MASK_ALL)
|
21
|
-
+ {
|
22
|
-
+ res_val = parse_and_eval (arg);
|
23
|
-
+ }
|
24
|
-
+ GDB_PY_HANDLE_EXCEPTION (except);
|
25
|
-
+
|
26
|
-
+ return value_to_value_object (res_val);
|
27
|
-
+}
|
28
|
-
+
|
29
|
-
+
|
30
|
-
void
|
31
|
-
gdbpy_initialize_values (void)
|
32
|
-
{
|
33
|
-
diff --git a/python/python-internal.h b/python/python-internal.h
|
34
|
-
index 67a78af..fbf8247 100644
|
35
|
-
--- a/python/python-internal.h
|
36
|
-
+++ b/python/python-internal.h
|
37
|
-
@@ -68,6 +68,7 @@ extern PyObject *gdb_module;
|
38
|
-
extern PyTypeObject value_object_type;
|
39
|
-
|
40
|
-
PyObject *gdbpy_history (PyObject *self, PyObject *args);
|
41
|
-
+PyObject *gdbpy_eval (PyObject *self, PyObject *args);
|
42
|
-
PyObject *gdbpy_frame_stop_reason_string (PyObject *, PyObject *);
|
43
|
-
PyObject *gdbpy_selected_frame (PyObject *self, PyObject *args);
|
44
|
-
PyObject *gdbpy_lookup_type (PyObject *self, PyObject *args, PyObject *kw);
|
45
|
-
diff --git a/python/python.c b/python/python.c
|
46
|
-
index 254bd28..c96fa29 100644
|
47
|
-
--- a/python/python.c
|
48
|
-
+++ b/python/python.c
|
49
|
-
@@ -651,6 +651,8 @@ static PyMethodDef GdbMethods[] =
|
50
|
-
{
|
51
|
-
{ "history", gdbpy_history, METH_VARARGS,
|
52
|
-
"Get a value from history" },
|
53
|
-
+ { "eval", gdbpy_eval, METH_VARARGS,
|
54
|
-
+ "Get a value of an expression" },
|
55
|
-
{ "execute", execute_gdb_command, METH_VARARGS,
|
56
|
-
"Execute a gdb command" },
|
57
|
-
{ "parameter", gdbpy_parameter, METH_VARARGS,
|