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
42a97a4b
Commit
42a97a4b
authored
10 years ago
by
Linux Build Service Account
Committed by
Gerrit - the friendly Code Review server
10 years ago
Browse files
Options
Downloads
Plain Diff
Merge "lrdpv2: parser_util: improve xxd docstring"
parents
4abc9641
89491fd8
No related branches found
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/parser_util.py
+9
-2
9 additions, 2 deletions
linux-ramdump-parser-v2/parser_util.py
with
9 additions
and
2 deletions
linux-ramdump-parser-v2/parser_util.py
+
9
−
2
View file @
42a97a4b
...
...
@@ -180,12 +180,19 @@ def _xxd_line(addr, data):
)
def
xxd
(
address
,
data
,
file_object
=
None
):
"""
Dumps data to stdout, in the format of `xxd
'
. data
should be a list
of integers.
"""
Dumps data to
`file_object
'
or
stdout, in the format of `xxd
'
. data
should be a list
of integers.
>>>
xxd
(
0x1000
,
[
0xde
,
0xad
,
0xbe
,
0xef
,
112
,
105
,
122
,
122
,
97
,
0
,
0
,
42
,
43
,
44
,
45
,
90
])
00001000
:
dead
beef
7069
7
a7a
6100
002
a
2
b2c
2
d5a
....
pizza
..
*+
,
-
Z
>>>
import
StringIO
>>>
sio
=
StringIO
.
StringIO
()
>>>
xxd
(
0x400
,
range
(
45
,
76
),
sio
)
>>>
print
(
sio
.
getvalue
().
strip
())
00000400
:
2
d2e
2
f30
3132
3334
3536
3738
393
a
3
b3c
-
.
/
0123456789
:;
<
00000410
:
3
d3e
3
f40
4142
4344
4546
4748
494
a
4
b
=>
?
@ABCDEFGHIJK
"""
f
=
file_object
or
sys
.
stdout
bb
=
[]
...
...
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