Re: [PULL 00/30] testing, gdbstub and semihosting

2021-01-18 Thread Alex Bennée


Philippe Mathieu-Daudé  writes:

> Hi Alex,
>
> On 1/18/21 1:18 PM, Alex Bennée wrote:
>> 
>> Peter Maydell  writes:
>> 
>>> On Fri, 15 Jan 2021 at 13:08, Alex Bennée  wrote:

 The following changes since commit 
 7c79721606be11b5bc556449e5bcbc331ef6867d:

   Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210113' 
 into staging (2021-01-14 09:54:29 +)

 are available in the Git repository at:

   https://github.com/stsquad/qemu.git tags/pull-testing-and-misc-150121-1

 for you to fetch changes up to be846761ca8b5a7e2e7b7108c8c156126b799824:

   semihosting: Implement SYS_ISERROR (2021-01-15 11:12:34 +)

 
 Testing, gdbstub and semihosting patches:

   - clean-ups to docker images
   - drop duplicate jobs from shippable
   - prettier tag generation (+gtags)
   - generate browsable source tree
   - more Travis->GitLab migrations
   - fix checkpatch to deal with commits
   - gate gdbstub tests on 8.3.1, expand tests
   - support Xfer:auxv:read gdb packet
   - better gdbstub cleanup
   - use GDB's SVE register layout
   - make arm-compat-semihosting common
   - add riscv semihosting support
   - add HEAPINFO, ELAPSED, TICKFREQ, TMPNAM and ISERROR to semihosting
>>>
>>> Fails to build, netbsd:
>>>
>>> ../src/gdbstub.c: In function 'handle_query_xfer_auxv':
>>> ../src/gdbstub.c:2258:26: error: 'struct image_info' has no member
>>> named 'saved_auxv'
>>>  saved_auxv = ts->info->saved_auxv;
>>>   ^~
>>> ../src/gdbstub.c:2259:24: error: 'struct image_info' has no member
>>> named 'auxv_len'
>>>  auxv_len = ts->info->auxv_len;
>> 
>> I've:
>> 
>> #if defined(CONFIG_USER_ONLY) && defined(CONFIG_LINUX_USER)
>> 
>> around the code so it won't build for the *BSDs.
>
> CONFIG_LINUX_USER implies CONFIG_USER_ONLY, right?

Probably could in a clean-up patch.

>
> Maybe long-term this can become:
>
> #if defined(CONFIG_LINUX_USER)
> #elif defined(...BSD...)
> #endif

Well the failure is missing the data in our own structures. I don't know
if BSD does support auxv, I guess if it's a POSIX thing. I guess we'll
see when we get the BSD rewrite.

> (maybe worth to fix if the pullreq isn't processed,
> else not a big deal).

Already merged so ¯\_(ツ)_/¯...

-- 
Alex Bennée



Re: [PULL 00/30] testing, gdbstub and semihosting

2021-01-18 Thread Philippe Mathieu-Daudé
Hi Alex,

On 1/18/21 1:18 PM, Alex Bennée wrote:
> 
> Peter Maydell  writes:
> 
>> On Fri, 15 Jan 2021 at 13:08, Alex Bennée  wrote:
>>>
>>> The following changes since commit 7c79721606be11b5bc556449e5bcbc331ef6867d:
>>>
>>>   Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210113' 
>>> into staging (2021-01-14 09:54:29 +)
>>>
>>> are available in the Git repository at:
>>>
>>>   https://github.com/stsquad/qemu.git tags/pull-testing-and-misc-150121-1
>>>
>>> for you to fetch changes up to be846761ca8b5a7e2e7b7108c8c156126b799824:
>>>
>>>   semihosting: Implement SYS_ISERROR (2021-01-15 11:12:34 +)
>>>
>>> 
>>> Testing, gdbstub and semihosting patches:
>>>
>>>   - clean-ups to docker images
>>>   - drop duplicate jobs from shippable
>>>   - prettier tag generation (+gtags)
>>>   - generate browsable source tree
>>>   - more Travis->GitLab migrations
>>>   - fix checkpatch to deal with commits
>>>   - gate gdbstub tests on 8.3.1, expand tests
>>>   - support Xfer:auxv:read gdb packet
>>>   - better gdbstub cleanup
>>>   - use GDB's SVE register layout
>>>   - make arm-compat-semihosting common
>>>   - add riscv semihosting support
>>>   - add HEAPINFO, ELAPSED, TICKFREQ, TMPNAM and ISERROR to semihosting
>>
>> Fails to build, netbsd:
>>
>> ../src/gdbstub.c: In function 'handle_query_xfer_auxv':
>> ../src/gdbstub.c:2258:26: error: 'struct image_info' has no member
>> named 'saved_auxv'
>>  saved_auxv = ts->info->saved_auxv;
>>   ^~
>> ../src/gdbstub.c:2259:24: error: 'struct image_info' has no member
>> named 'auxv_len'
>>  auxv_len = ts->info->auxv_len;
> 
> I've:
> 
> #if defined(CONFIG_USER_ONLY) && defined(CONFIG_LINUX_USER)
> 
> around the code so it won't build for the *BSDs.

CONFIG_LINUX_USER implies CONFIG_USER_ONLY, right?

Maybe long-term this can become:

#if defined(CONFIG_LINUX_USER)
#elif defined(...BSD...)
#endif

(maybe worth to fix if the pullreq isn't processed,
else not a big deal).




Re: [PULL 00/30] testing, gdbstub and semihosting

2021-01-18 Thread Alex Bennée


Peter Maydell  writes:

> On Fri, 15 Jan 2021 at 13:08, Alex Bennée  wrote:
>>
>> The following changes since commit 7c79721606be11b5bc556449e5bcbc331ef6867d:
>>
>>   Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210113' 
>> into staging (2021-01-14 09:54:29 +)
>>
>> are available in the Git repository at:
>>
>>   https://github.com/stsquad/qemu.git tags/pull-testing-and-misc-150121-1
>>
>> for you to fetch changes up to be846761ca8b5a7e2e7b7108c8c156126b799824:
>>
>>   semihosting: Implement SYS_ISERROR (2021-01-15 11:12:34 +)
>>
>> 
>> Testing, gdbstub and semihosting patches:
>>
>>   - clean-ups to docker images
>>   - drop duplicate jobs from shippable
>>   - prettier tag generation (+gtags)
>>   - generate browsable source tree
>>   - more Travis->GitLab migrations
>>   - fix checkpatch to deal with commits
>>   - gate gdbstub tests on 8.3.1, expand tests
>>   - support Xfer:auxv:read gdb packet
>>   - better gdbstub cleanup
>>   - use GDB's SVE register layout
>>   - make arm-compat-semihosting common
>>   - add riscv semihosting support
>>   - add HEAPINFO, ELAPSED, TICKFREQ, TMPNAM and ISERROR to semihosting
>
> Fails to build, netbsd:
>
> ../src/gdbstub.c: In function 'handle_query_xfer_auxv':
> ../src/gdbstub.c:2258:26: error: 'struct image_info' has no member
> named 'saved_auxv'
>  saved_auxv = ts->info->saved_auxv;
>   ^~
> ../src/gdbstub.c:2259:24: error: 'struct image_info' has no member
> named 'auxv_len'
>  auxv_len = ts->info->auxv_len;

I've:

#if defined(CONFIG_USER_ONLY) && defined(CONFIG_LINUX_USER)

around the code so it won't build for the *BSDs.

Sent v2

> ^~
>
> thanks
> -- PMM


-- 
Alex Bennée



Re: [PULL 00/30] testing, gdbstub and semihosting

2021-01-15 Thread Peter Maydell
On Fri, 15 Jan 2021 at 13:08, Alex Bennée  wrote:
>
> The following changes since commit 7c79721606be11b5bc556449e5bcbc331ef6867d:
>
>   Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210113' 
> into staging (2021-01-14 09:54:29 +)
>
> are available in the Git repository at:
>
>   https://github.com/stsquad/qemu.git tags/pull-testing-and-misc-150121-1
>
> for you to fetch changes up to be846761ca8b5a7e2e7b7108c8c156126b799824:
>
>   semihosting: Implement SYS_ISERROR (2021-01-15 11:12:34 +)
>
> 
> Testing, gdbstub and semihosting patches:
>
>   - clean-ups to docker images
>   - drop duplicate jobs from shippable
>   - prettier tag generation (+gtags)
>   - generate browsable source tree
>   - more Travis->GitLab migrations
>   - fix checkpatch to deal with commits
>   - gate gdbstub tests on 8.3.1, expand tests
>   - support Xfer:auxv:read gdb packet
>   - better gdbstub cleanup
>   - use GDB's SVE register layout
>   - make arm-compat-semihosting common
>   - add riscv semihosting support
>   - add HEAPINFO, ELAPSED, TICKFREQ, TMPNAM and ISERROR to semihosting

Fails to build, netbsd:

../src/gdbstub.c: In function 'handle_query_xfer_auxv':
../src/gdbstub.c:2258:26: error: 'struct image_info' has no member
named 'saved_auxv'
 saved_auxv = ts->info->saved_auxv;
  ^~
../src/gdbstub.c:2259:24: error: 'struct image_info' has no member
named 'auxv_len'
 auxv_len = ts->info->auxv_len;
^~

thanks
-- PMM



[PULL 00/30] testing, gdbstub and semihosting

2021-01-15 Thread Alex Bennée
The following changes since commit 7c79721606be11b5bc556449e5bcbc331ef6867d:

  Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210113' into 
staging (2021-01-14 09:54:29 +)

are available in the Git repository at:

  https://github.com/stsquad/qemu.git tags/pull-testing-and-misc-150121-1

for you to fetch changes up to be846761ca8b5a7e2e7b7108c8c156126b799824:

  semihosting: Implement SYS_ISERROR (2021-01-15 11:12:34 +)


Testing, gdbstub and semihosting patches:

  - clean-ups to docker images
  - drop duplicate jobs from shippable
  - prettier tag generation (+gtags)
  - generate browsable source tree
  - more Travis->GitLab migrations
  - fix checkpatch to deal with commits
  - gate gdbstub tests on 8.3.1, expand tests
  - support Xfer:auxv:read gdb packet
  - better gdbstub cleanup
  - use GDB's SVE register layout
  - make arm-compat-semihosting common
  - add riscv semihosting support
  - add HEAPINFO, ELAPSED, TICKFREQ, TMPNAM and ISERROR to semihosting


Alessandro Di Federico (1):
  Add newline when generating Dockerfile

Alex Bennée (16):
  Makefile: add GNU global tags support
  Makefile: wrap ctags in quiet-command calls
  Makefile: wrap etags in quiet-command calls
  Makefile: wrap cscope in quiet-command calls
  docker: expand debian-amd64 image to include tag tools
  gitlab: move docs and tools build across from Travis
  gitlab: migrate the minimal tools and unit tests from Travis
  scripts/checkpatch.pl: fix git-show invocation to include diffstat
  test/guest-debug: echo QEMU command as well
  configure: gate our use of GDB to 8.3.1 or above
  Revert "tests/tcg/multiarch/Makefile.target: Disable run-gdbstub-sha1 
test"
  gdbstub: implement a softmmu based test
  gdbstub: drop CPUEnv from gdb_exit()
  gdbstub: drop gdbserver_cleanup in favour of gdb_exit
  gdbstub: ensure we clean-up when terminated
  target/arm: use official org.gnu.gdb.aarch64.sve layout for registers

Keith Packard (8):
  semihosting: Move ARM semihosting code to shared directories
  semihosting: Change common-semi API to be architecture-independent
  semihosting: Change internal common-semi interfaces to use CPUState *
  semihosting: Support SYS_HEAPINFO when env->boot_info is not set
  riscv: Add semihosting support
  semihosting: Implement SYS_ELAPSED and SYS_TICKFREQ
  semihosting: Implement SYS_TMPNAM
  semihosting: Implement SYS_ISERROR

Kito Cheng (1):
  riscv: Add semihosting support for user mode

Lirong Yuan (1):
  gdbstub: add support to Xfer:auxv:read: packet

Lukas Straub (1):
  Fix build with new yank feature by adding stubs

Philippe Mathieu-Daudé (2):
  tests/docker: Remove Debian 9 remnant lines
  shippable.yml: Remove jobs duplicated on Gitlab-CI

 configure  |   7 +-
 Makefile   |  46 +-
 default-configs/devices/arm-softmmu.mak|   1 +
 default-configs/devices/riscv32-softmmu.mak|   2 +
 default-configs/devices/riscv64-softmmu.mak|   2 +
 default-configs/targets/aarch64-linux-user.mak |   1 +
 default-configs/targets/aarch64_be-linux-user.mak  |   1 +
 default-configs/targets/arm-linux-user.mak |   1 +
 default-configs/targets/armeb-linux-user.mak   |   1 +
 default-configs/targets/riscv32-linux-user.mak |   1 +
 default-configs/targets/riscv64-linux-user.mak |   1 +
 hw/semihosting/common-semi.h   |  39 ++
 include/exec/gdbstub.h |  14 +-
 include/qemu/timer.h   |   2 +
 linux-user/qemu.h  |   4 +-
 target/arm/cpu.h   |   8 -
 target/riscv/cpu_bits.h|   1 +
 bsd-user/syscall.c |   6 +-
 gdbstub.c  |  65 ++-
 .../arm-semi.c => hw/semihosting/arm-compat-semi.c | 525 ++---
 linux-user/aarch64/cpu_loop.c  |   3 +-
 linux-user/arm/cpu_loop.c  |   3 +-
 linux-user/exit.c  |   2 +-
 linux-user/riscv/cpu_loop.c|   5 +
 linux-user/{arm => }/semihost.c|   8 +-
 softmmu/runstate.c |   2 +-
 stubs/yank.c   |  29 ++
 target/arm/gdbstub.c   |  75 ++-
 target/arm/helper.c|   7 +-
 target/arm/m_helper.c  |   7 +-
 target/m68k/m68k-semi.c|   2 +-
 target/nios2/nios2-semi.c  |   2 +-
 target/riscv/cpu_helper.c  |  10 +