Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
P
pykd-ext
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Todd Hartman
pykd-ext
Commits
4889327b
Commit
4889327b
authored
Dec 12, 2019
by
ussrhero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed issue #6 ( wrong exception output if it description has special symbols )
parent
7a8748ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
sources/pyapi.h
sources/pyapi.h
+6
-1
sources/windbgext.cpp
sources/windbgext.cpp
+8
-9
No files found.
sources/pyapi.h
View file @
4889327b
...
...
@@ -151,7 +151,7 @@ class PyObjectRef
{
public:
PyObjectRef
()
:
m_obj
(
0
)
PyObjectRef
()
:
m_obj
(
nullptr
)
{}
PyObjectRef
(
PyObject
*
obj
)
...
...
@@ -170,6 +170,11 @@ public:
return
m_obj
;
}
PyObject
**
operator
&
()
{
return
&
m_obj
;
}
PyObjectRef
&
operator
=
(
const
PyObjectRef
&
ref
)
{
if
(
m_obj
)
...
...
sources/windbgext.cpp
View file @
4889327b
...
...
@@ -580,8 +580,7 @@ pip(
void
handleException
()
{
//
PyObject
*
errtype
=
NULL
,
*
errvalue
=
NULL
,
*
traceback
=
NULL
;
PyObjectRef
errtype
,
errvalue
,
traceback
;
PyErr_Fetch
(
&
errtype
,
&
errvalue
,
&
traceback
);
...
...
@@ -596,9 +595,9 @@ void handleException()
PyObjectRef
format_exception
=
PyObject_GetAttrString
(
traceback_module
,
"format_exception"
);
PyObjectRef
args
=
PyTuple_New
(
3
);
PyTuple_SetItem
(
args
,
0
,
errtype
?
errtype
:
Py_None
());
PyTuple_SetItem
(
args
,
1
,
errvalue
?
errvalue
:
Py_None
());
PyTuple_SetItem
(
args
,
2
,
traceback
?
traceback
:
Py_None
());
PyTuple_SetItem
(
args
,
0
,
errtype
?
static_cast
<
PyObject
*>
(
errtype
)
:
Py_None
());
PyTuple_SetItem
(
args
,
1
,
errvalue
?
static_cast
<
PyObject
*>
(
errvalue
)
:
Py_None
());
PyTuple_SetItem
(
args
,
2
,
traceback
?
static_cast
<
PyObject
*>
(
traceback
)
:
Py_None
());
PyObjectRef
lst
=
PyObject_Call
(
format_exception
,
args
,
NULL
);
...
...
@@ -612,10 +611,6 @@ void handleException()
throw
std
::
exception
(
sstr
.
str
().
c_str
());
}
if
(
errtype
)
Py_DecRef
(
errtype
);
if
(
errvalue
)
Py_DecRef
(
errvalue
);
if
(
traceback
)
Py_DecRef
(
traceback
);
}
///////////////////////////////////////////////////////////////////////////////
...
...
@@ -786,6 +781,10 @@ void printString(PDEBUG_CLIENT client, ULONG mask, const char* str)
if
(
prefer_dml
&&
mask
==
DEBUG_OUTPUT_ERROR
)
{
line
=
std
::
regex_replace
(
line
,
std
::
regex
(
"&"
),
"&"
);
line
=
std
::
regex_replace
(
line
,
std
::
regex
(
"<"
),
"<"
);
line
=
std
::
regex_replace
(
line
,
std
::
regex
(
">"
),
">"
);
control
->
ControlledOutput
(
DEBUG_OUTCTL_AMBIENT_DML
,
mask
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment