示例#1
0
 def test_d_path(self):
     task = find_task(self.prog, os.getpid())
     self.assertEqual(d_path(task.fs.pwd.address_of_()), os.fsencode(os.getcwd()))
示例#2
0
 def test_fget(self):
     with tempfile.NamedTemporaryFile(prefix="drgn-tests-") as f:
         file = fget(find_task(self.prog, os.getpid()), f.fileno())
         self.assertEqual(d_path(file.f_path), os.fsencode(os.path.abspath(f.name)))
示例#3
0
文件: path.py 项目: jgallag88/sdb
 def call(self, objs: Iterable[drgn.Object]) -> None:
     # TODO validate that each input is a struct path or struct path*
     for obj in objs:
         print(d_path(obj).decode("utf-8", "backslashreplace"))