Example #1
0
def string(infofunc, data=None):
    weenix.assert_type("&" + infofunc, _dbg_infofunc_type)

    if data == None:
        data = "0"

    npages = 8
    buf = weenix.eval_func("page_alloc_n", npages)

    weenix.eval_func(infofunc, data, buf, "PAGE_SIZE")
    res = buf.cast(_char_p_type).string()

    weenix.eval_func("page_free_n", buf, npages)
    return res
Example #2
0
def string(infofunc, data=None):
    weenix.assert_type("&" + infofunc, _dbg_infofunc_type)

    if (data == None):
        data = "0"

    npages = 8
    buf = weenix.eval_func("page_alloc_n", npages)

    weenix.eval_func(infofunc, data, buf, "PAGE_SIZE")
    res = buf.cast(_char_p_type).string()

    weenix.eval_func("page_free_n", buf, npages)
    return res
Example #3
0
 def invoke(self, arg, tty):
     if len(arg.strip()) == 0:
         info = weenix.info.string("dbg_modes_info")
         if len(info) == 0:
             gdb.write("No active modes.\n")
         else:
             gdb.write("{0}\n".format(weenix.info.string("dbg_modes_info")))
     else:
         modes = self._modes()
         for mode in arg.split():
             name = mode[1:] if (mode.startswith("-")) else mode
             if not name in modes:
                 gdb.write('warning: skipping non-existant mode "{0}"\n'.format(name))
             else:
                 weenix.eval_func("dbg_add_mode", '"{0}"'.format(mode))
Example #4
0
 def invoke(self, arg, tty):
     if (len(arg.strip()) == 0):
         info = weenix.info.string("dbg_modes_info")
         if (len(info) == 0):
             gdb.write("No active modes.\n")
         else:
             gdb.write("{0}\n".format(weenix.info.string("dbg_modes_info")))
     else:
         modes = self._modes()
         for mode in arg.split():
             name = mode[1:] if (mode.startswith("-")) else mode
             if (not name in modes):
                 gdb.write(
                     "warning: skipping non-existant mode \"{0}\"\n".format(
                         name))
             else:
                 weenix.eval_func("dbg_add_mode", "\"{0}\"".format(mode))
Example #5
0
def lookup(pid):
	return Proc(weenix.eval_func("proc_lookup", pid).dereference())
Example #6
0
def lookup(pid):
    return Proc(weenix.eval_func("proc_lookup", pid).dereference())