* Failure of test 'basic gdbstub support'
@ 2020-06-10 14:39 Robert Henry
2020-06-10 16:21 ` Alex Bennée
0 siblings, 1 reply; 2+ messages in thread
From: Robert Henry @ 2020-06-10 14:39 UTC (permalink / raw)
To: qemu-devel@nongnu.org; +Cc: Alex Bennée
[-- Attachment #1: Type: text/plain, Size: 1299 bytes --]
The newish test 'basic gdbstub support' fails for me on an out-of-the-box build on a host x86_64. (See below for the config.log head.)
Is this failure expected? If so, where can I see that in the various CI engines you have running them?
In digging through the test driver python code in tests/tcg/multiarch/gdbstub/sha1.py I see that the test assumes that a breakpoint on the function SHA1Init is a breakpoint at the 1st assignment statement; the 1st next executes the 1st assignment statement, etc.
This is a very fragile assumption. It depends on the compiler used to compile sha1.c; it depends on the optimization level; it depends on the accuracy of the pc mapping in the debug info; it depends on gdb.
Better would be to change SHA1Init to do its work, and then call another non-inlined function taking a context pointer, and then examine context->state[0] and context->state[1].
Thanks in advance
TEST basic gdbstub support
make[2]: *** [/mnt/robhenry/qemu_robhenry_amd64/qemu/tests/tcg/multiarch/Makefile.target:51: run-gdbstub-sha1] Error 2
QEMU configure log Tue 09 Jun 2020 02:45:06 PM PDT
# Configured with: '../configure' '--disable-sdl' '--enable-gtk' '--extra-ldflags=-L/usr/lib' '--enable-plugins' '--target-list=x86_64-softmmu x86_64-linux-user'
[-- Attachment #2: Type: text/html, Size: 3343 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Failure of test 'basic gdbstub support'
2020-06-10 14:39 Failure of test 'basic gdbstub support' Robert Henry
@ 2020-06-10 16:21 ` Alex Bennée
0 siblings, 0 replies; 2+ messages in thread
From: Alex Bennée @ 2020-06-10 16:21 UTC (permalink / raw)
To: Robert Henry; +Cc: qemu-devel@nongnu.org
Robert Henry <robhenry@microsoft.com> writes:
> The newish test 'basic gdbstub support' fails for me on an out-of-the-box build on a host x86_64. (See below for the config.log head.)
>
> Is this failure expected? If so, where can I see that in the various
> CI engines you have running them?
No it shouldn't fail - if the GDB doesn't attach we should be skipping
the test.
>
> In digging through the test driver python code in tests/tcg/multiarch/gdbstub/sha1.py I see that the test assumes that a breakpoint on the function SHA1Init is a breakpoint at the 1st assignment statement; the 1st next executes the 1st assignment statement, etc.
>
> This is a very fragile assumption. It depends on the compiler used to
> compile sha1.c;
True - certainly for "native" built test images.
>it depends on the optimization level; it depends on the accuracy of the
>pc mapping in the debug info;
All test cases are built -O0 -g3 so should have full debug info.
>it depends on gdb.
This is out biggest problem at the moment because it seems support for
socket based debug is fairly new for gdb.
>
> Better would be to change SHA1Init to do its work, and then call
> another non-inlined function taking a context pointer, and then
> examine context->state[0] and context->state[1].
We are also trying to test the step and next functionality is working
here.
>
> Thanks in advance
>
> TEST basic gdbstub support
> make[2]: ***
> [/mnt/robhenry/qemu_robhenry_amd64/qemu/tests/tcg/multiarch/Makefile.target:51:
> run-gdbstub-sha1] Error 2
Can you let me know what the contents of:
cat tests/tcg/x86_64-linux-user/run-gdbstub-sha1.out
is please?
>
> QEMU configure log Tue 09 Jun 2020 02:45:06 PM PDT
> # Configured with: '../configure' '--disable-sdl' '--enable-gtk' '--extra-ldflags=-L/usr/lib' '--enable-plugins' '--target-list=x86_64-softmmu x86_64-linux-user'
--
Alex Bennée
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-10 16:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-10 14:39 Failure of test 'basic gdbstub support' Robert Henry
2020-06-10 16:21 ` Alex Bennée
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.