System notice: In light of the Debian OpenSSL security issue we've regenerated the server keys. See this thread for instructions and the new key fingerprints.

Commit 9f760cf5a8aa8506af6c4dc416feadbf622d738d

Use constants for GDB version, host and target configs.

Commit diff

gdb/python/python.c

 
4343static PyObject *execute_gdb_command (PyObject *, PyObject *);
4444static PyObject *gdbpy_solib_address (PyObject *, PyObject *);
4545static PyObject *gdbpy_decode_line (PyObject *, PyObject *);
46static PyObject *gdbpy_version (PyObject *, PyObject *);
47static PyObject *gdbpy_host_conf (PyObject *, PyObject *);
48static PyObject *gdbpy_target_conf (PyObject *, PyObject *);
4946static PyObject *gdbpy_find_pc_function (PyObject *, PyObject *);
5047static PyObject *gdbpy_get_threads (PyObject *, PyObject *);
5148static PyObject *gdbpy_get_current_thread (PyObject *, PyObject *);
9191Return a tuple holding the file name (or None) and line number (or None).\n\
9292Note: may later change to return an object." },
9393
94 { "version", gdbpy_version, METH_NOARGS,
95 "Return the GDB version." },
96 { "host_config", gdbpy_host_conf, METH_NOARGS,
97 "Return the GDB host configuration triplet." },
98 { "target_config", gdbpy_target_conf, METH_NOARGS,
99 "Return the GDB target configuration triplet." },
100
10194 { "get_threads", gdbpy_get_threads, METH_NOARGS,
10295 "Return a tuple holding all the valid thread IDs." },
10396 { "get_current_thread", gdbpy_get_current_thread, METH_NOARGS,
105105
106106 gdb_module = Py_InitModule ("gdb", GdbMethods);
107107
108 PyModule_AddStringConstant (gdb_module, "VERSION", version);
109 PyModule_AddStringConstant (gdb_module, "HOST_CONFIG", host_name);
110 PyModule_AddStringConstant (gdb_module, "TARGET_CONFIG", target_name);
111
108112 gdbpy_initialize_hooks ();
109113 gdbpy_initialize_values ();
110114 gdbpy_initialize_breakpoints ();
596596 return make_cleanup (py_decref, (void *)py);
597597}
598598
599static PyObject *
600gdbpy_version (PyObject *self, PyObject *args)
601{
602 return PyString_FromString (version);
603}
604
605static PyObject *
606gdbpy_host_conf (PyObject *self, PyObject *args)
607{
608 return PyString_FromString (host_name);
609}
610
611static PyObject *
612gdbpy_target_conf (PyObject *self, PyObject *args)
613{
614 return PyString_FromString (target_name);
615}
616
617599
618600
619601/* Threads. */
toggle raw diff