Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
magic-lantern
magic-lantern
Commits
880b848bb628
Commit
2bde0683
authored
Mar 04, 2019
by
alex@thinkpad
Browse files
QEMU: fixed indentation of multiline debug strings (-d debugmsg)
--HG-- branch : qemu
parent
ea90e9af2d78
Changes
2
Hide whitespace changes
Inline
Side-by-side
contrib/qemu/eos/dbi/debugmsg.c
View file @
880b848b
...
...
@@ -36,8 +36,9 @@ void DebugMsg_log(EOSState * s)
int
arg_i
=
0
;
char
c
;
uint32_t
address
=
r2
;
eos_print_location_gdb
(
s
);
int
spaces
=
eos_print_location_gdb
(
s
);
APPEND
(
"(%02x:%02x) "
,
r0
,
r1
);
spaces
+=
len
;
c
=
eos_get_mem_b
(
s
,
address
++
);
while
(
c
)
...
...
@@ -46,10 +47,14 @@ void DebugMsg_log(EOSState * s)
while
(
c
!=
'\0'
&&
c
!=
'%'
)
{
if
(
c
==
'\n'
)
{
APPEND
(
"
\n
"
);
APPEND
(
"
\n
"
);
for
(
int
i
=
0
;
i
<
spaces
;
i
++
)
{
APPEND
(
" "
);
}
}
else
if
(
c
!=
'\r'
)
else
if
(
c
!=
'\r'
)
{
APPEND
(
"%c"
,
c
);
}
c
=
eos_get_mem_b
(
s
,
address
++
);
}
...
...
contrib/qemu/eos/dbi/logging.c
View file @
880b848b
...
...
@@ -650,6 +650,7 @@ int eos_print_location(EOSState *s, uint32_t pc, uint32_t lr, const char * prefi
int
eos_print_location_gdb
(
EOSState
*
s
)
{
int
len
=
0
;
uint32_t
ret
=
CURRENT_CPU
->
env
.
regs
[
14
]
-
4
;
if
(
qemu_loglevel_mask
(
EOS_LOG_CALLSTACK
))
{
...
...
@@ -661,16 +662,18 @@ int eos_print_location_gdb(EOSState *s)
/* on multicore machines, print CPU index for each message */
if
(
CPU_NEXT
(
first_cpu
))
{
fprintf
(
stderr
,
"[CPU%d] "
,
current_cpu
->
cpu_index
);
len
+=
fprintf
(
stderr
,
"[CPU%d] "
,
current_cpu
->
cpu_index
);
}
if
(
interrupt_level
)
{
return
fprintf
(
stderr
,
"[%s INT-%02Xh:%08x %s] "
,
KCYN
,
s
->
irq_id
,
ret
,
KRESET
);
len
+=
fprintf
(
stderr
,
"[%s INT-%02Xh:%08x %s] "
,
KCYN
,
s
->
irq_id
,
ret
,
KRESET
)
-
strlen
(
KCYN
KRESET
);
}
else
{
const
char
*
task_name
=
eos_get_current_task_name
(
s
);
if
(
!
task_name
)
task_name
=
""
;
return
fprintf
(
stderr
,
"[%s%12s:%08x %s] "
,
KCYN
,
task_name
,
ret
,
KRESET
);
len
+=
fprintf
(
stderr
,
"[%s%12s:%08x %s] "
,
KCYN
,
task_name
,
ret
,
KRESET
)
-
strlen
(
KCYN
KRESET
);
}
return
len
;
}
static
int
print_call_location
(
EOSState
*
s
,
uint32_t
pc
,
uint32_t
lr
)
...
...
Write
Preview
Supports
Markdown
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