mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
bitkeeper revision 1.1389.1.16 (4273458eyxEjHSppjkQyDsXHHxOY9Q)
coredump.patch Extend libxc and gdb server to coredump a domain. Signed-off-by: Kip Macy <kmacy@fsmware.com>
This commit is contained in:
1 parent
927084f0d4
commit
b61e6cb4e9
10 files changed
+1134
-21
No files matched your search
@@ -36,6 +36,33 @@ typedef struct {
|
||||
* Definitions for the 'xc' object type.
|
||||
*/
|
||||
|
||||
static PyObject *pyxc_domain_dumpcore(PyObject *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
XcObject *xc = (XcObject *)self;
|
||||
|
||||
u32 dom;
|
||||
char *corefile;
|
||||
|
||||
static char *kwd_list[] = { "dom", "corefile", NULL };
|
||||
|
||||
if ( !PyArg_ParseTupleAndKeywords(args, kwds, "is", kwd_list, &dom, &corefile) )
|
||||
goto exit;
|
||||
|
||||
if ( (corefile == NULL) || (corefile[0] == '\0') )
|
||||
goto exit;
|
||||
|
||||
if ( xc_domain_dumpcore(xc->xc_handle, dom, corefile) != 0 )
|
||||
return PyErr_SetFromErrno(xc_error);
|
||||
|
||||
Py_INCREF(zero);
|
||||
return zero;
|
||||
|
||||
exit:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static PyObject *pyxc_domain_create(PyObject *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
@@ -854,6 +881,14 @@ static PyMethodDef pyxc_methods[] = {
|
||||
" mem_kb [int, 0]: Memory allocation, in kilobytes.\n"
|
||||
"Returns: [int] new domain identifier; -1 on error.\n" },
|
||||
|
||||
{ "domain_dumpcore",
|
||||
(PyCFunction)pyxc_domain_dumpcore,
|
||||
METH_VARARGS | METH_KEYWORDS, "\n"
|
||||
"dump core of a domain.\n"
|
||||
" dom [int]: Identifier of domain to be paused.\n\n"
|
||||
" corefile [string]: Name of corefile to be created.\n\n"
|
||||
"Returns: [int] 0 on success; -1 on error.\n" },
|
||||
|
||||
{ "domain_pause",
|
||||
(PyCFunction)pyxc_domain_pause,
|
||||
METH_VARARGS | METH_KEYWORDS, "\n"
|
||||
|
||||