gdbstub: introduce GDB processes
commit8f468636189303358da3b365c53cb03ae5497eca
authorLuc Michel <luc.michel@greensocs.com>
Mon, 7 Jan 2019 15:23:45 +0000 (7 15:23 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 7 Jan 2019 15:23:45 +0000 (7 15:23 +0000)
treef1a9374a4bd481d24959e71c575e4ef41ba52f9b
parent335d52f457e7b3d959b2ddc93f83a36d75484d88
gdbstub: introduce GDB processes

Add a structure GDBProcess that represents processes from the GDB
semantic point of view.

CPUs can be split into different processes, by grouping them under
different cpu-cluster objects.  Each occurrence of a cpu-cluster object
implies the existence of the corresponding process in the GDB stub. The
GDB process ID is derived from the corresponding cluster ID as follows:

  GDB PID = cluster ID + 1

This is because PIDs -1 and 0 are reserved in GDB and cannot be used by
processes.

A default process is created to handle CPUs that are not in a cluster.
This process gets the PID of the last process PID + 1.

Signed-off-by: Luc Michel <luc.michel@greensocs.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20181207090135.7651-3-luc.michel@greensocs.com
[PMM: fixed checkpatch nit about block comment style]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
gdbstub.c