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
6f4d70cf
Commit
6f4d70cf
authored
11 years ago
by
Linux Build Service Account
Committed by
Gerrit - the friendly Code Review server
11 years ago
Browse files
Options
Downloads
Plain Diff
Merge "linux-ramdump-parser-v2: Correct sizes for binary logbuf"
parents
ebbc0a67
3821a276
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/parsers/dmesg.py
+5
-5
5 additions, 5 deletions
linux-ramdump-parser-v2/parsers/dmesg.py
with
5 additions
and
5 deletions
linux-ramdump-parser-v2/parsers/dmesg.py
+
5
−
5
View file @
6f4d70cf
...
@@ -33,7 +33,7 @@ class Dmesg(RamParser):
...
@@ -33,7 +33,7 @@ class Dmesg(RamParser):
len_offset
=
ramdump
.
field_offset
(
'
struct log
'
,
'
len
'
)
len_offset
=
ramdump
.
field_offset
(
'
struct log
'
,
'
len
'
)
msg
=
logbuf
+
idx
msg
=
logbuf
+
idx
msg_len
=
ramdump
.
read_
word
(
msg
+
len_offset
)
msg_len
=
ramdump
.
read_
u16
(
msg
+
len_offset
)
if
(
msg_len
==
0
):
if
(
msg_len
==
0
):
return
logbuf
return
logbuf
else
:
else
:
...
@@ -43,7 +43,7 @@ class Dmesg(RamParser):
...
@@ -43,7 +43,7 @@ class Dmesg(RamParser):
len_offset
=
ramdump
.
field_offset
(
'
struct log
'
,
'
len
'
)
len_offset
=
ramdump
.
field_offset
(
'
struct log
'
,
'
len
'
)
msg
=
idx
msg
=
idx
msg_len
=
ramdump
.
read_
halfword
(
msg
+
len_offset
)
msg_len
=
ramdump
.
read_
u16
(
msg
+
len_offset
)
if
(
msg_len
==
0
):
if
(
msg_len
==
0
):
self
.
wrap_cnt
+=
1
self
.
wrap_cnt
+=
1
return
logbuf
return
logbuf
...
@@ -59,14 +59,14 @@ class Dmesg(RamParser):
...
@@ -59,14 +59,14 @@ class Dmesg(RamParser):
text_len_offset
=
ramdump
.
field_offset
(
'
struct log
'
,
'
text_len
'
)
text_len_offset
=
ramdump
.
field_offset
(
'
struct log
'
,
'
text_len
'
)
log_size
=
ramdump
.
sizeof
(
'
struct log
'
)
log_size
=
ramdump
.
sizeof
(
'
struct log
'
)
first_idx
=
ramdump
.
read_
word
(
first_idx_addr
)
first_idx
=
ramdump
.
read_
u32
(
first_idx_addr
)
last_idx
=
ramdump
.
read_
word
(
last_idx_addr
)
last_idx
=
ramdump
.
read_
u32
(
last_idx_addr
)
curr_idx
=
logbuf_addr
+
first_idx
curr_idx
=
logbuf_addr
+
first_idx
while
curr_idx
!=
logbuf_addr
+
last_idx
and
self
.
wrap_cnt
<
2
:
while
curr_idx
!=
logbuf_addr
+
last_idx
and
self
.
wrap_cnt
<
2
:
timestamp
=
ramdump
.
read_dword
(
curr_idx
+
time_offset
)
timestamp
=
ramdump
.
read_dword
(
curr_idx
+
time_offset
)
text_len
=
ramdump
.
read_
halfword
(
curr_idx
+
text_len_offset
)
text_len
=
ramdump
.
read_
u16
(
curr_idx
+
text_len_offset
)
text_str
=
ramdump
.
read_cstring
(
curr_idx
+
log_size
,
text_len
)
text_str
=
ramdump
.
read_cstring
(
curr_idx
+
log_size
,
text_len
)
for
partial
in
text_str
.
split
(
'
\n
'
):
for
partial
in
text_str
.
split
(
'
\n
'
):
f
=
'
[{0:>5}.{1:0>6d}] {2}
'
.
format
(
f
=
'
[{0:>5}.{1:0>6d}] {2}
'
.
format
(
...
...
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