projects
/
platform
/
framework
/
web
/
crosswalk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git]
/
src
/
tools
/
memory_inspector
/
memory_inspector
/
core
/
stacktrace.py
diff --git
a/src/tools/memory_inspector/memory_inspector/core/stacktrace.py
b/src/tools/memory_inspector/memory_inspector/core/stacktrace.py
index
b137a03
..
3f64e82
100644
(file)
--- a/
src/tools/memory_inspector/memory_inspector/core/stacktrace.py
+++ b/
src/tools/memory_inspector/memory_inspector/core/stacktrace.py
@@
-2,7
+2,7
@@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import
os
+import
posixpath
from memory_inspector.core import symbol
from memory_inspector.core import symbol
@@
-37,7
+37,7
@@
class Frame(object):
address: the absolute (virtual) address of the stack frame in the
original process virtual address space.
"""
address: the absolute (virtual) address of the stack frame in the
original process virtual address space.
"""
- assert(isinstance(address,
int
))
+ assert(isinstance(address,
(long, int)
))
self.address = address
self.symbol = None
self.exec_file_rel_path = None
self.address = address
self.symbol = None
self.exec_file_rel_path = None
@@
-54,7
+54,7
@@
class Frame(object):
relative to the target device (e.g., /system/lib/libc.so).
offset: the offset in the executable.
"""
relative to the target device (e.g., /system/lib/libc.so).
offset: the offset in the executable.
"""
- assert(isinstance(offset,
int
))
+ assert(isinstance(offset,
(long, int)
))
self.exec_file_rel_path = exec_file_rel_path
self.offset = offset
self.exec_file_rel_path = exec_file_rel_path
self.offset = offset
@@
-67,7
+67,9
@@
class Frame(object):
@property
def exec_file_name(self):
"""Returns the file name (stripped of the path) of the executable."""
@property
def exec_file_name(self):
"""Returns the file name (stripped of the path) of the executable."""
- return os.path.basename(self.exec_file_rel_path)
+ if not self.exec_file_rel_path:
+ return None
+ return posixpath.basename(self.exec_file_rel_path.replace('\\', '/'))
@property
def raw_address(self):
@property
def raw_address(self):