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
6edfe05766c6
Commit
8802b693
authored
Jul 21, 2018
by
alex@thinkpad
Browse files
QEMU logging: moved IDC files into model subdirectories
(for consistency with romcpy shell files) --HG-- branch : qemu
parent
5a933e70396f
Changes
2
Hide whitespace changes
Inline
Side-by-side
contrib/qemu/eos/dbi/logging.c
View file @
6edfe057
...
@@ -279,7 +279,7 @@ static FILE * idc = NULL;
...
@@ -279,7 +279,7 @@ static FILE * idc = NULL;
static
void
close_idc
(
void
)
static
void
close_idc
(
void
)
{
{
fprintf
(
idc
,
"}
\n
"
);
fprintf
(
idc
,
"}
\n
"
);
fclose
(
idc
);
fclose
(
idc
);
idc
=
0
;
fprintf
(
stderr
,
"%s saved.
\n
"
,
idc_path
);
fprintf
(
stderr
,
"%s saved.
\n
"
,
idc_path
);
}
}
...
@@ -290,7 +290,7 @@ static void eos_idc_log_call(EOSState *s, CPUState *cpu, CPUARMState *env,
...
@@ -290,7 +290,7 @@ static void eos_idc_log_call(EOSState *s, CPUState *cpu, CPUARMState *env,
if
(
!
idc
)
if
(
!
idc
)
{
{
snprintf
(
idc_path
,
sizeof
(
idc_path
),
"%s.idc"
,
MACHINE_GET_CLASS
(
current_machine
)
->
name
);
snprintf
(
idc_path
,
sizeof
(
idc_path
),
"%s
/calls
.idc"
,
s
->
model
->
name
);
fprintf
(
stderr
,
"Exporting called functions to %s.
\n
"
,
idc_path
);
fprintf
(
stderr
,
"Exporting called functions to %s.
\n
"
,
idc_path
);
idc
=
fopen
(
idc_path
,
"w"
);
idc
=
fopen
(
idc_path
,
"w"
);
assert
(
idc
);
assert
(
idc
);
...
...
contrib/qemu/tests/run_tests.sh
View file @
6edfe057
...
@@ -577,7 +577,7 @@ function test_calls_main {
...
@@ -577,7 +577,7 @@ function test_calls_main {
echo
-n
' '
echo
-n
' '
# wait until it the IDC no longer grows, up to 5 minutes
# wait until it the IDC no longer grows, up to 5 minutes
./wait_log.sh
$CAM
.idc 300 5
-q
"^}"
./wait_log.sh
$CAM
/calls
.idc 300 5
-q
"^}"
echo
echo
echo
-n
" "
echo
-n
" "
...
@@ -593,7 +593,7 @@ function test_calls_main {
...
@@ -593,7 +593,7 @@ function test_calls_main {
# let's trim until matching the MD5 of $TEST-basic.idc
# let's trim until matching the MD5 of $TEST-basic.idc
# this assumes the needles (expected test results) were created on a slower PC and/or using a smaller timeout
# this assumes the needles (expected test results) were created on a slower PC and/or using a smaller timeout
cat
$CAM
.idc |
grep
-o
"MakeFunction(.*)"
\
cat
$CAM
/calls
.idc |
grep
-o
"MakeFunction(.*)"
\
>
tests/
$CAM
/
$TEST
-basic
.idc
>
tests/
$CAM
/
$TEST
-basic
.idc
# compute the MD5 of $TEST-basic.idc, line by line, until it matches its reference MD5
# compute the MD5 of $TEST-basic.idc, line by line, until it matches its reference MD5
...
@@ -636,8 +636,8 @@ function test_calls_main {
...
@@ -636,8 +636,8 @@ function test_calls_main {
# also copy the IDC file for checking its MD5
# also copy the IDC file for checking its MD5
# this works on old CF models too (40D), even if some nondeterminism is present
# this works on old CF models too (40D), even if some nondeterminism is present
# the IDC needs trimming, too, as it doesn't always stop at the same line
# the IDC needs trimming, too, as it doesn't always stop at the same line
cat
$CAM
.idc |
sed
-n
"1,/MakeFunction(
$last_call
/ p"
>
tests/
$CAM
/
$TEST
.idc
cat
$CAM
/calls
.idc |
sed
-n
"1,/MakeFunction(
$last_call
/ p"
>
tests/
$CAM
/
$TEST
.idc
cat
$CAM
.idc |
tail
-n
2
>>
tests/
$CAM
/
$TEST
.idc
cat
$CAM
/calls
.idc |
tail
-n
2
>>
tests/
$CAM
/
$TEST
.idc
# extract only the call address from IDC
# extract only the call address from IDC
# useful for checking when some additional info changes (e.g. comments)
# useful for checking when some additional info changes (e.g. comments)
...
@@ -741,7 +741,7 @@ function test_calls_from {
...
@@ -741,7 +741,7 @@ function test_calls_from {
# also copy the IDC file for checking its MD5
# also copy the IDC file for checking its MD5
# this works on CF models too, even if some nondeterminism is present
# this works on CF models too, even if some nondeterminism is present
cp
$CAM
.idc tests/
$CAM
/
$TEST
.idc
cp
$CAM
/calls
.idc tests/
$CAM
/
$TEST
.idc
# extract only the call address from IDC
# extract only the call address from IDC
# useful for checking when some additional info changes (e.g. comments)
# useful for checking when some additional info changes (e.g. comments)
...
...
Write
Preview
Markdown
is supported
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