[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Failure of test 'basic gdbstub support'
From: |
Alex Bennée |
Subject: |
Re: Failure of test 'basic gdbstub support' |
Date: |
Wed, 10 Jun 2020 17:21:47 +0100 |
User-agent: |
mu4e 1.5.2; emacs 28.0.50 |
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