Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tools
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
public-release-test-restored
platform
vendor
qcom-opensource
tools
Commits
e6f9d44b
Commit
e6f9d44b
authored
9 years ago
by
Linux Build Service Account
Committed by
Gerrit - the friendly Code Review server
9 years ago
Browse files
Options
Downloads
Plain Diff
Merge "lrdp-v2: Add accessor for pointer variables"
parents
9fe813a1
fb5e7dda
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
linux-ramdump-parser-v2/ramdump.py
+10
-0
10 additions, 0 deletions
linux-ramdump-parser-v2/ramdump.py
with
10 additions
and
0 deletions
linux-ramdump-parser-v2/ramdump.py
+
10
−
0
View file @
e6f9d44b
...
...
@@ -1142,6 +1142,16 @@ class RamDump():
s
=
self
.
read_string
(
addr_or_name
,
'
<H
'
,
virtual
,
cpu
)
return
s
[
0
]
if
s
is
not
None
else
None
def
read_pointer
(
self
,
addr_or_name
,
virtual
=
True
,
cpu
=
None
):
"""
Reads `addr_or_name
'
as a pointer variable.
The read length is either 32-bit or 64-bit depending on the
architecture. This returns the *value* of the pointer variable
(i.e. the address it contains), not the data it points to.
"""
fn
=
self
.
read_u32
if
self
.
sizeof
(
'
void *
'
)
==
4
else
self
.
read_u64
return
fn
(
addr_or_name
,
virtual
,
cpu
)
def
read_structure_field
(
self
,
addr_or_name
,
struct_name
,
field
):
"""
reads a 4 or 8 byte field from a structure
"""
size
=
self
.
sizeof
(
"
(({0} *)0)->{1}
"
.
format
(
struct_name
,
field
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment