Skip to content

Commit 9f9b19b

Browse files
committed
Fix #19 - Fix #18
1 parent 99fe5bd commit 9f9b19b

File tree

5 files changed

+18
-8
lines changed

5 files changed

+18
-8
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
## Current Changes
2-
* 2.2.10
3-
* Better search for Windbg DLLs using registry and allowing user override
2+
* 2.2.11
3+
* Fix #18 - Fix SetImplicitProcessDataOffset
4+
* Fix #19 - Implement CreateProcess2

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ k.attach("net:port=50000,key=1.2.3.4")
5555

5656

5757
## Release History
58+
* 2.2.11
59+
* Fix #18 - Fix SetImplicitProcessDataOffset
60+
* Fix #19 - Implement CreateProcess2
5861
* 2.2.10
5962
* Better search for Windbg DLLs using registry and allowing user override
6063
* 2.2.9

pybag/dbgeng/idebugclient.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -451,10 +451,16 @@ def SetEventCallbacksWide(self, *args):
451451
raise exception.E_NOTIMPL_Error
452452

453453
def CreateProcess2(self, cmdline, options, initial_dir, env):
454-
raise exception.E_NOTIMPL_Error
455-
#self._proc_server_hndl
456-
#hr = self._cli.CreateProcess2()
457-
#exception.check_err(hr)
454+
if isinstance(cmdline, str):
455+
cmdline = cmdline.encode()
456+
if isinstance(initial_dir, str):
457+
initial_dir = initial_dir.encode()
458+
if isinstance(env, str):
459+
env = env.encode()
460+
# env is \0 delineated key=value pairs
461+
# options is instance of DbgEng._DEBUG_CREATE_PROCESS_OPTIONS()
462+
hr = self._cli.CreateProcess2(self._proc_server_hndl, cmdline, byref(options), sizeof(options), initial_dir, env)
463+
exception.check_err(hr)
458464

459465
def CreateProcess2Wide(self, *args):
460466
raise exception.E_NOTIMPL_Error

pybag/dbgeng/idebugsystemobjects.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def GetImplicitProcessDataOffset(self):
186186
exception.check_err(hr)
187187
return offset.value
188188

189-
def SetImplicitProcessDataOffset(self):
189+
def SetImplicitProcessDataOffset(self, offset):
190190
hr = self._sys.SetImplicitProcessDataOffset(offset)
191191
exception.check_err(hr)
192192

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
README = (HERE / "README.md").read_text()
77

88
setup(name='Pybag',
9-
version='2.2.10',
9+
version='2.2.11',
1010
description='Python wrappers for DbgEng from Windbg',
1111
long_description=README,
1212
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)