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 713d9927c6a1ca518396ce4813bef064bc2842dc

Add functions to get GDB version, host and target configs.

Commit diff

gdb/python/python.c

 
3131#include "linespec.h"
3232#include "symtab.h"
3333#include "source.h"
34#include "version.h"
3435
3536#include <ctype.h>
3637
4141static PyObject *execute_gdb_command (PyObject *, PyObject *);
4242static PyObject *gdbpy_solib_address (PyObject *, PyObject *);
4343static PyObject *gdbpy_decode_line (PyObject *, PyObject *);
44static PyObject *gdbpy_version (PyObject *, PyObject *);
45static PyObject *gdbpy_host_conf (PyObject *, PyObject *);
46static PyObject *gdbpy_target_conf (PyObject *, PyObject *);
4447
4548
4649void
8181Return a tuple holding the file name (or None) and line number (or None).\n\
8282Note: may later change to return an object." },
8383
84 { "version", gdbpy_version, METH_NOARGS,
85 "Return the GDB version." },
86 { "host_config", gdbpy_host_conf, METH_NOARGS,
87 "Return the GDB host configuration triplet." },
88 { "target_config", gdbpy_target_conf, METH_NOARGS,
89 "Return the GDB target configuration triplet." },
90
8491 {NULL, NULL, 0, NULL}
8592 };
8693
560560 Py_RETURN_NONE;
561561}
562562
563static PyObject *
564gdbpy_version (PyObject *self, PyObject *args)
565{
566 return PyString_FromString (version);
567}
568
569static PyObject *
570gdbpy_host_conf (PyObject *self, PyObject *args)
571{
572 return PyString_FromString (host_name);
573}
574
575static PyObject *
576gdbpy_target_conf (PyObject *self, PyObject *args)
577{
578 return PyString_FromString (target_name);
579}
580
563581
564582
565583void
toggle raw diff