Re: [Qemu-devel] [PATCH v3] dump: Set correct vaddr for ELF dump

2019-01-21 Thread Jon Doron
ping, so this means that the patch will be merged in? Thanks, -- Jon. On Wed, Jan 9, 2019 at 12:38 PM Laszlo Ersek wrote: > > On 01/09/19 09:25, Marc-André Lureau wrote: > > On Wed, Jan 9, 2019 at 12:22 PM Jon Doron wrote: > >> > >> vaddr needs to be equal to

[Qemu-devel] [PATCH v1] dump: Set correct vaddr for ELF dump

2018-12-25 Thread Jon Doron
vaddr needs to be equal to the paddr since the dump file represents the physical memory image. Without setting vaddr correctly, GDB would load all the different memory regions on top of each other to vaddr 0, thus making GDB showing the wrong memory data for a given address. Signed-off-by: Jon

Re: [Qemu-devel] [PATCH v1] dump: Set correct vaddr for ELF dump

2019-01-07 Thread Jon Doron
apping->virt_addr) : phdr.p_paddr; So in the case of paging where virt_addr is available we will use it Thanks, -- Jon. On Mon, Jan 7, 2019 at 8:04 PM Laszlo Ersek wrote: > > On 01/07/19 13:14, Marc-André Lureau wrote: > > Hi > > > > On Tue, Dec 25, 2018 at 5:52 PM Jon Do

[Qemu-devel] [PATCH v3] dump: Set correct vaddr for ELF dump

2019-01-09 Thread Jon Doron
vaddr needs to be equal to the paddr since the dump file represents the physical memory image. Without setting vaddr correctly, GDB would load all the different memory regions on top of each other to vaddr 0, thus making GDB showing the wrong memory data for a given address. Signed-off-by: Jon

[Qemu-devel] [PATCH v2] dump: Set correct vaddr for ELF dump

2019-01-08 Thread Jon Doron
vaddr needs to be equal to the paddr since the dump file represents the physical memory image. Without setting vaddr correctly, GDB would load all the different memory regions on top of each other to vaddr 0, thus making GDB showing the wrong memory data for a given address. Signed-off-by: Jon

[Qemu-devel] [PATCH v12 00/20] gdbstub: Refactor command packets handler

2019-05-29 Thread Jon Doron
Henderson version 3 changes - Split the single patch to many individual patches for easier reviewing version 2 changes - Code convention fixes Jon Doron (20): gdbstub: Add infrastructure to parse cmd packets gdbstub: Implement deatch (D pkt) with new infra gdbstub: Implement thread_al

[Qemu-devel] [PATCH v12 09/20] gdbstub: Implement get register (p pkt) with new infra

2019-05-29 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 50 ++ 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index fc9526b3f5..07740ec0af 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1672,6 +1672,36 @@ static void

[Qemu-devel] [PATCH v12 01/20] gdbstub: Add infrastructure to parse cmd packets

2019-05-29 Thread Jon Doron
Signed-off-by: Jon Doron Reviewed-by: Alex Bennée --- gdbstub.c | 195 ++ 1 file changed, 195 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index d54abd17cc..e6d895177b 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1268,6 +1268,201 @@ out

[Qemu-devel] [PATCH v12 07/20] gdbstub: Implement breakpoint commands (Z/z pkt) with new infra

2019-05-29 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 86 +++ 1 file changed, 67 insertions(+), 19 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index db213cf173..57bfa4 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -950,7 +950,7 @@ static inline int

[Qemu-devel] [PATCH v12 06/20] gdbstub: Implement set_thread (H pkt) with new infra

2019-05-29 Thread Jon Doron
Signed-off-by: Jon Doron Reviewed-by: Alex Bennée --- gdbstub.c | 83 +++ 1 file changed, 53 insertions(+), 30 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 5df4d58427..db213cf173 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1560,6

[Qemu-devel] [PATCH v12 18/20] gdbstub: Implement target halted (? pkt) with new infra

2019-05-29 Thread Jon Doron
Note: The user-mode thread-id has been correctly reported since bd88c780e6 Signed-off-by: Jon Doron --- gdbstub.c | 35 +-- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 80fe5b2d0c..a474f2c755 100644 --- a/gdbstub.c

[Qemu-devel] [PATCH v12 02/20] gdbstub: Implement deatch (D pkt) with new infra

2019-05-29 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 101 +- 1 file changed, 61 insertions(+), 40 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index e6d895177b..1db322c15a 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1413,11 +1413,6 @@ static inline int

[Qemu-devel] [PATCH v12 13/20] gdbstub: Implement read all registers (g pkt) with new infra

2019-05-29 Thread Jon Doron
Signed-off-by: Jon Doron Reviewed-by: Alex Bennée --- gdbstub.c | 31 +++ 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index a487e549d1..8a401e6527 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1774,6 +1774,21 @@ static void

[Qemu-devel] [PATCH v12 03/20] gdbstub: Implement thread_alive (T pkt) with new infra

2019-05-29 Thread Jon Doron
Signed-off-by: Jon Doron Reviewed-by: Alex Bennée --- gdbstub.c | 43 --- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 1db322c15a..7801f2f260 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1507,6 +1507,30

[Qemu-devel] [PATCH v12 04/20] gdbstub: Implement continue (c pkt) with new infra

2019-05-29 Thread Jon Doron
Signed-off-by: Jon Doron Reviewed-by: Alex Bennée --- gdbstub.c | 25 +++-- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 7801f2f260..99b78aa426 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1531,6 +1531,16 @@ static void

[Qemu-devel] [PATCH v12 10/20] gdbstub: Implement write memory (M pkt) with new infra

2019-05-29 Thread Jon Doron
Signed-off-by: Jon Doron Reviewed-by: Alex Bennée --- gdbstub.c | 51 +-- 1 file changed, 33 insertions(+), 18 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 07740ec0af..f2ea5bdd5c 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1702,6 +1702,31

[Qemu-devel] [PATCH v12 11/20] gdbstub: Implement read memory (m pkt) with new infra

2019-05-29 Thread Jon Doron
Signed-off-by: Jon Doron Reviewed-by: Alex Bennée --- gdbstub.c | 48 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index f2ea5bdd5c..3d8c2f8f42 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1727,6 +1727,30

[Qemu-devel] [PATCH v12 16/20] gdbstub: Implement v commands with new infra

2019-05-29 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 170 +++--- 1 file changed, 110 insertions(+), 60 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 3fd1a1cddb..648191a3b0 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1818,6 +1818,106 @@ static void

[Qemu-devel] [PATCH v12 14/20] gdbstub: Implement file io (F pkt) with new infra

2019-05-29 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 48 ++-- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 8a401e6527..ea85966b27 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1789,6 +1789,25 @@ static void

[Qemu-devel] [PATCH v12 15/20] gdbstub: Implement step (s pkt) with new infra

2019-05-29 Thread Jon Doron
Signed-off-by: Jon Doron Reviewed-by: Alex Bennée --- gdbstub.c | 25 +++-- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index ea85966b27..3fd1a1cddb 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1808,6 +1808,16 @@ static void

[Qemu-devel] [PATCH v12 05/20] gdbstub: Implement continue with signal (C pkt) with new infra

2019-05-29 Thread Jon Doron
Signed-off-by: Jon Doron Reviewed-by: Alex Bennée --- gdbstub.c | 34 +- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 99b78aa426..5df4d58427 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1541,6 +1541,25 @@ static void

[Qemu-devel] [PATCH v12 12/20] gdbstub: Implement write all registers (G pkt) with new infra

2019-05-29 Thread Jon Doron
Signed-off-by: Jon Doron Reviewed-by: Alex Bennée --- gdbstub.c | 41 +++-- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 3d8c2f8f42..a487e549d1 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1751,6 +1751,29 @@ static

[Qemu-devel] [PATCH v12 19/20] gdbstub: Clear unused variables in gdb_handle_packet

2019-05-29 Thread Jon Doron
Signed-off-by: Jon Doron Reviewed-by: Alex Bennée --- gdbstub.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index a474f2c755..a0ff0017f6 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -2284,17 +2284,11 @@ static void handle_target_halt

[Qemu-devel] [PATCH v12 20/20] gdbstub: Implement qemu physical memory mode

2019-05-29 Thread Jon Doron
isable Signed-off-by: Jon Doron --- gdbstub.c | 62 +-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index a0ff0017f6..d46e21bf70 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -46,11 +46,27 @@ #define GDB_ATTAC

[Qemu-devel] [PATCH v12 08/20] gdbstub: Implement set register (P pkt) with new infra

2019-05-29 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 39 ++- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 57bfa4..fc9526b3f5 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1651,6 +1651,27 @@ static void handle_remove_bp

[Qemu-devel] [PATCH v12 17/20] gdbstub: Implement generic set/query (Q/q pkt) with new infra

2019-05-29 Thread Jon Doron
ing. gdb> maintenance packet Qqemu.sstep:HEX_VALUE Will change the single step mask. Signed-off-by: Jon Doron --- gdbstub.c | 559 -- 1 file changed, 373 insertions(+), 186 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 648191a3b0..80fe5

Re: [Qemu-devel] [PATCH v9 02/27] gdbstub: Implement deatch (D pkt) with new infra

2019-05-20 Thread Jon Doron
return RS_IDLE; } +process_string_cmd(s, NULL, line_buf, cmd_parser, 1); -- Jon. On Tue, May 14, 2019 at 9:54 PM Alex Bennée wrote: > > > Jon Doron writes: > > > Signed-off-by: Jon Doron > > --- > > gdbstub.c | 90 ++---

[Qemu-devel] [PATCH v11 08/20] gdbstub: Implement set register (P pkt) with new infra

2019-05-24 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 39 ++- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index c59a6765cd..1c210d671a 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1637,6 +1637,27 @@ static void handle_remove_bp

[Qemu-devel] [PATCH v11 05/20] gdbstub: Implement continue with signal (C pkt) with new infra

2019-05-24 Thread Jon Doron
Signed-off-by: Jon Doron Reviewed-by: Alex Bennée --- gdbstub.c | 34 +- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 698d6f558a..f74a30da03 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1527,6 +1527,25 @@ static void

[Qemu-devel] [PATCH v11 19/20] gdbstub: Clear unused variables in gdb_handle_packet

2019-05-24 Thread Jon Doron
Signed-off-by: Jon Doron Reviewed-by: Alex Bennée --- gdbstub.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 097b7d1231..9dd934a079 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -2270,17 +2270,11 @@ static void handle_target_halt

[Qemu-devel] [PATCH v11 06/20] gdbstub: Implement set_thread (H pkt) with new infra

2019-05-24 Thread Jon Doron
Signed-off-by: Jon Doron Reviewed-by: Alex Bennée --- gdbstub.c | 83 +++ 1 file changed, 53 insertions(+), 30 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index f74a30da03..129a47230f 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1546,6

[Qemu-devel] [PATCH v11 15/20] gdbstub: Implement step (s pkt) with new infra

2019-05-24 Thread Jon Doron
Signed-off-by: Jon Doron Reviewed-by: Alex Bennée --- gdbstub.c | 25 +++-- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index b35acc679c..a8b81121c5 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1794,6 +1794,16 @@ static void

[Qemu-devel] [PATCH v11 01/20] gdbstub: Add infrastructure to parse cmd packets

2019-05-24 Thread Jon Doron
Signed-off-by: Jon Doron Reviewed-by: Alex Bennée --- gdbstub.c | 195 ++ 1 file changed, 195 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index d54abd17cc..e6d895177b 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1268,6 +1268,201 @@ out

[Qemu-devel] [PATCH v11 07/20] gdbstub: Implement breakpoint commands (Z/z pkt) with new infra

2019-05-24 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 84 +++ 1 file changed, 66 insertions(+), 18 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 129a47230f..c59a6765cd 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -950,7 +950,7 @@ static inline int

[Qemu-devel] [PATCH v11 10/20] gdbstub: Implement write memory (M pkt) with new infra

2019-05-24 Thread Jon Doron
Signed-off-by: Jon Doron Reviewed-by: Alex Bennée --- gdbstub.c | 51 +-- 1 file changed, 33 insertions(+), 18 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 3284b3e01d..c798d93e22 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1688,6 +1688,31

[Qemu-devel] [PATCH v11 11/20] gdbstub: Implement read memory (m pkt) with new infra

2019-05-24 Thread Jon Doron
Signed-off-by: Jon Doron Reviewed-by: Alex Bennée --- gdbstub.c | 48 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index c798d93e22..c957b0d8a7 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1713,6 +1713,30

[Qemu-devel] [PATCH v11 17/20] gdbstub: Implement generic set/query (Q/q pkt) with new infra

2019-05-24 Thread Jon Doron
ing. gdb> maintenance packet Qqemu.sstep:HEX_VALUE Will change the single step mask. Signed-off-by: Jon Doron --- gdbstub.c | 559 -- 1 file changed, 373 insertions(+), 186 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 3773b23581..57a05

[Qemu-devel] [PATCH v11 02/20] gdbstub: Implement deatch (D pkt) with new infra

2019-05-24 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 93 +++ 1 file changed, 53 insertions(+), 40 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index e6d895177b..307366b250 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1413,11 +1413,6 @@ static inline int

[Qemu-devel] [PATCH v11 09/20] gdbstub: Implement get register (p pkt) with new infra

2019-05-24 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 50 ++ 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 1c210d671a..3284b3e01d 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1658,6 +1658,36 @@ static void

[Qemu-devel] [PATCH v11 04/20] gdbstub: Implement continue (c pkt) with new infra

2019-05-24 Thread Jon Doron
Signed-off-by: Jon Doron Reviewed-by: Alex Bennée --- gdbstub.c | 25 +++-- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index b4c4bd4b08..698d6f558a 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1517,6 +1517,16 @@ static void

[Qemu-devel] [PATCH v11 00/20] gdbstub: Refactor command packets handler

2019-05-24 Thread Jon Doron
from Alex Bennee version 4-6 changes: - mostly feedback from Richard Henderson version 3 changes - Split the single patch to many individual patches for easier reviewing version 2 changes - Code convention fixes Jon Doron (20): gdbstub: Add infrastructure to parse cmd packets gdbstub

[Qemu-devel] [PATCH v11 12/20] gdbstub: Implement write all registers (G pkt) with new infra

2019-05-24 Thread Jon Doron
Signed-off-by: Jon Doron Reviewed-by: Alex Bennée --- gdbstub.c | 41 +++-- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index c957b0d8a7..1afad31b49 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1737,6 +1737,29 @@ static

[Qemu-devel] [PATCH v11 18/20] gdbstub: Implement target halted (? pkt) with new infra

2019-05-24 Thread Jon Doron
Note: The user-mode thread-id has been correctly reported since bd88c780e6 Signed-off-by: Jon Doron --- gdbstub.c | 35 +-- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 57a05fd6a4..097b7d1231 100644 --- a/gdbstub.c

[Qemu-devel] [PATCH v11 16/20] gdbstub: Implement v commands with new infra

2019-05-24 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 170 +++--- 1 file changed, 110 insertions(+), 60 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index a8b81121c5..3773b23581 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1804,6 +1804,106 @@ static void

[Qemu-devel] [PATCH v11 13/20] gdbstub: Implement read all registers (g pkt) with new infra

2019-05-24 Thread Jon Doron
Signed-off-by: Jon Doron Reviewed-by: Alex Bennée --- gdbstub.c | 31 +++ 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 1afad31b49..781f5882ac 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1760,6 +1760,21 @@ static void

[Qemu-devel] [PATCH v11 03/20] gdbstub: Implement thread_alive (T pkt) with new infra

2019-05-24 Thread Jon Doron
Signed-off-by: Jon Doron Reviewed-by: Alex Bennée --- gdbstub.c | 43 --- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 307366b250..b4c4bd4b08 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1493,6 +1493,30

[Qemu-devel] [PATCH v11 20/20] gdbstub: Implement qemu physical memory mode

2019-05-24 Thread Jon Doron
isable Signed-off-by: Jon Doron --- gdbstub.c | 62 +-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 9dd934a079..c9269319d8 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -46,11 +46,27 @@ #define GDB_ATTAC

[Qemu-devel] [PATCH v11 14/20] gdbstub: Implement file io (F pkt) with new infra

2019-05-24 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 48 ++-- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 781f5882ac..b35acc679c 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1775,6 +1775,25 @@ static void

Re: [Qemu-devel] [PATCH v9 09/27] gdbstub: Implement set register (P pkt) with new infra

2019-05-19 Thread Jon Doron
hes and add error replays accordingly -- Jon. On Wed, May 15, 2019 at 3:14 PM Alex Bennée wrote: > > > Jon Doron writes: > > > Signed-off-by: Jon Doron > > --- > > gdbstub.c | 39 ++- > > 1 file changed, 30 insertion

Re: [Qemu-devel] [PATCH v9 15/27] gdbstub: Implement file io (F pkt) with new infra

2019-05-19 Thread Jon Doron
ake a look at it and see how the schema should really look like. -- Jon. On Wed, May 15, 2019 at 7:54 PM Alex Bennée wrote: > > > Jon Doron writes: > > There is a bit more going on here than a simple conversion. I think we > need some additional commentary about the form

Re: [Qemu-devel] [PATCH v9 14/27] gdbstub: Implement read all registers (g pkt) with new infra

2019-05-19 Thread Jon Doron
I agree but I guess to really fix it we need to change gdb_read_register implementation to support returning the size of the register for mem_buffer = NULL Let's leave it for another patchset? On Wed, May 15, 2019 at 7:10 PM Alex Bennée wrote: > > > Jon Doron writes: > > >

Re: [Qemu-devel] [PATCH v9 24/27] gdbstub: Add another handler for setting qemu.sstep

2019-05-19 Thread Jon Doron
On Wed, May 15, 2019 at 8:44 PM Alex Bennée wrote: > > > Jon Doron writes: > > > Follow GDB general query/set packet conventions, qemu.sstep can now > > be set with the following command as well: > > gdb> maint packet Qqemu.sstep:Value > > I;m

Re: [Qemu-devel] [PATCH v9 20/27] gdbstub: Implement target halted (? pkt) with new infra

2019-05-19 Thread Jon Doron
On Wed, May 15, 2019 at 8:20 PM Alex Bennée wrote: > > > Jon Doron writes: > > > Signed-off-by: Jon Doron > > --- > > gdbstub.c | 36 ++-- > > 1 file changed, 26 insertions(+), 10 deletions(-) > > > > diff --

Re: [Qemu-devel] [PATCH v9 17/27] gdbstub: Implement v commands with new infra

2019-05-19 Thread Jon Doron
On Wed, May 15, 2019 at 8:06 PM Alex Bennée wrote: > > > Jon Doron writes: > > > Signed-off-by: Jon Doron > > --- > > gdbstub.c | 170 +++--- > > 1 file changed, 110 insertions(+), 60 deletions(-) > &

Re: [Qemu-devel] [PATCH v9 22/27] gdbstub: Implement generic query qemu.Supported

2019-05-19 Thread Jon Doron
I suggest then that I'll squash this commit into the commit that refactors the the Q/q packets and will add the required documentation about this in the commit message. Do you agree? -- Jon. On Wed, May 15, 2019 at 8:41 PM Alex Bennée wrote: > > > Jon Doron writes: > > > qe

Re: [Qemu-devel] [PATCH v9 26/27] gdbstub: Add support to read a MSR for KVM target

2019-05-19 Thread Jon Doron
Ah cool did not know about that I will look into it and perhaps can do a different patchset just for this no need to add it on top of this patchset On Wed, May 15, 2019 at 8:48 PM Alex Bennée wrote: > > > Jon Doron writes: > > > gdb> maint packet qqemu.kvm.Rdmsr:MsrIndex

[Qemu-devel] [PATCH v10 13/20] gdbstub: Implement read all registers (g pkt) with new infra

2019-05-21 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 31 +++ 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 1afad31b49..781f5882ac 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1760,6 +1760,21 @@ static void handle_write_all_regs

[Qemu-devel] [PATCH v10 00/20] gdbstub: Refactor command packets handler

2019-05-21 Thread Jon Doron
checkpatch complaints - Feedback from Alex Bennee version 4-6 changes: - mostly feedback from Richard Henderson version 3 changes - Split the single patch to many individual patches for easier reviewing version 2 changes - Code convention fixes Jon Doron (20): gdbstub: Add infrastructure

[Qemu-devel] [PATCH v10 02/20] gdbstub: Implement deatch (D pkt) with new infra

2019-05-21 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 93 +++ 1 file changed, 53 insertions(+), 40 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index e6d895177b..307366b250 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1413,11 +1413,6 @@ static inline int

[Qemu-devel] [PATCH v10 01/20] gdbstub: Add infrastructure to parse cmd packets

2019-05-21 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 195 ++ 1 file changed, 195 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index d54abd17cc..e6d895177b 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1268,6 +1268,201 @@ out: return res

[Qemu-devel] [PATCH v10 04/20] gdbstub: Implement continue (c pkt) with new infra

2019-05-21 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 25 +++-- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index b4c4bd4b08..698d6f558a 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1517,6 +1517,16 @@ static void handle_thread_alive(GdbCmdContext

[Qemu-devel] [PATCH v10 17/20] gdbstub: Implement generic set/query (Q/q pkt) with new infra

2019-05-21 Thread Jon Doron
ing. gdb> maintenance packet Qqemu.sstep:HEX_VALUE Will change the single step mask. Signed-off-by: Jon Doron --- gdbstub.c | 559 -- 1 file changed, 373 insertions(+), 186 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 3773b23581..57a05

[Qemu-devel] [PATCH v10 06/20] gdbstub: Implement set_thread (H pkt) with new infra

2019-05-21 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 83 +++ 1 file changed, 53 insertions(+), 30 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index f74a30da03..129a47230f 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1546,6 +1546,51 @@ static void

[Qemu-devel] [PATCH v10 03/20] gdbstub: Implement thread_alive (T pkt) with new infra

2019-05-21 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 43 --- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 307366b250..b4c4bd4b08 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1493,6 +1493,30 @@ static void handle_detach

[Qemu-devel] [PATCH v10 11/20] gdbstub: Implement read memory (m pkt) with new infra

2019-05-21 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 48 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index c798d93e22..c957b0d8a7 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1713,6 +1713,30 @@ static void

[Qemu-devel] [PATCH v10 20/20] gdbstub: Implement qemu physical memory mode

2019-05-21 Thread Jon Doron
isable Signed-off-by: Jon Doron --- gdbstub.c | 62 +-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 9dd934a079..c9269319d8 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -46,11 +46,27 @@ #define GDB_ATTAC

[Qemu-devel] [PATCH v10 09/20] gdbstub: Implement get register (p pkt) with new infra

2019-05-21 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 50 ++ 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 1c210d671a..3284b3e01d 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1658,6 +1658,36 @@ static void

[Qemu-devel] [PATCH v10 08/20] gdbstub: Implement set register (P pkt) with new infra

2019-05-21 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 39 ++- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index c59a6765cd..1c210d671a 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1637,6 +1637,27 @@ static void handle_remove_bp

[Qemu-devel] [PATCH v10 19/20] gdbstub: Clear unused variables in gdb_handle_packet

2019-05-21 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 097b7d1231..9dd934a079 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -2270,17 +2270,11 @@ static void handle_target_halt(GdbCmdContext *gdb_ctx, void

[Qemu-devel] [PATCH v10 18/20] gdbstub: Implement target halted (? pkt) with new infra

2019-05-21 Thread Jon Doron
Note: The user-mode thread-id has been correctly reported since bd88c780e6 Signed-off-by: Jon Doron --- gdbstub.c | 35 +-- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 57a05fd6a4..097b7d1231 100644 --- a/gdbstub.c

[Qemu-devel] [PATCH v10 15/20] gdbstub: Implement step (s pkt) with new infra

2019-05-21 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 25 +++-- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index b35acc679c..a8b81121c5 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1794,6 +1794,16 @@ static void handle_file_io(GdbCmdContext *gdb_ctx

[Qemu-devel] [PATCH v10 05/20] gdbstub: Implement continue with signal (C pkt) with new infra

2019-05-21 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 34 +- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 698d6f558a..f74a30da03 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1527,6 +1527,25 @@ static void handle_continue

[Qemu-devel] [PATCH v10 10/20] gdbstub: Implement write memory (M pkt) with new infra

2019-05-21 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 51 +-- 1 file changed, 33 insertions(+), 18 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 3284b3e01d..c798d93e22 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1688,6 +1688,31 @@ static void

[Qemu-devel] [PATCH v10 07/20] gdbstub: Implement breakpoint commands (Z/z pkt) with new infra

2019-05-21 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 84 +++ 1 file changed, 66 insertions(+), 18 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 129a47230f..c59a6765cd 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -950,7 +950,7 @@ static inline int

[Qemu-devel] [PATCH v10 14/20] gdbstub: Implement file io (F pkt) with new infra

2019-05-21 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 48 ++-- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 781f5882ac..b35acc679c 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1775,6 +1775,25 @@ static void

[Qemu-devel] [PATCH v10 16/20] gdbstub: Implement v commands with new infra

2019-05-21 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 170 +++--- 1 file changed, 110 insertions(+), 60 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index a8b81121c5..3773b23581 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1804,6 +1804,106 @@ static void

[Qemu-devel] [PATCH v10 12/20] gdbstub: Implement write all registers (G pkt) with new infra

2019-05-21 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 41 +++-- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index c957b0d8a7..1afad31b49 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1737,6 +1737,29 @@ static void handle_read_mem

[Qemu-devel] [PATCH v9 01/27] gdbstub: Add infrastructure to parse cmd packets

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 200 ++ 1 file changed, 200 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index d54abd17cc..d5e0f3878a 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1268,6 +1268,206 @@ out: return res

[Qemu-devel] [PATCH v9 02/27] gdbstub: Implement deatch (D pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 90 ++- 1 file changed, 50 insertions(+), 40 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index d5e0f3878a..621d689868 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1418,11 +1418,6 @@ static inline int

[Qemu-devel] [PATCH v9 00/27] gdbstub: Refactor command packets handler

2019-05-02 Thread Jon Doron
Richard Henderson version 3 changes - Split the single patch to many individual patches for easier reviewing version 2 changes - Code convention fixes Jon Doron (27): gdbstub: Add infrastructure to parse cmd packets gdbstub: Implement deatch (D pkt) with new infra gdbstub: Implement

[Qemu-devel] [PATCH v9 03/27] gdbstub: Implement thread_alive (T pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 43 --- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 621d689868..c47ef7dd9c 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1498,6 +1498,30 @@ static void handle_detach

[Qemu-devel] [PATCH v9 05/27] gdbstub: Implement continue with signal (C pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 30 +- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 89f1ab6524..469aaeb875 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1532,6 +1532,21 @@ static void handle_continue(GdbCmdContext

[Qemu-devel] [PATCH v9 09/27] gdbstub: Implement set register (P pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 39 ++- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index b42425b24c..10e3f12a68 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1634,6 +1634,27 @@ static void handle_remove_bp

[Qemu-devel] [PATCH v9 04/27] gdbstub: Implement continue (c pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 25 +++-- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index c47ef7dd9c..89f1ab6524 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1522,6 +1522,16 @@ static void handle_thread_alive(GdbCmdContext

[Qemu-devel] [PATCH v9 12/27] gdbstub: Implement read memory (m pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 48 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 8dc2e1d507..daa602edc3 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1710,6 +1710,30 @@ static void

[Qemu-devel] [PATCH v9 14/27] gdbstub: Implement read all registers (g pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 31 +++ 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index adfe39b3a3..3478ac778d 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1757,6 +1757,21 @@ static void handle_write_all_regs

[Qemu-devel] [PATCH v9 07/27] gdbstub: Implement insert breakpoint (Z pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 33 + 1 file changed, 33 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index 21cdaf4678..36c7353a22 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1588,6 +1588,29 @@ static void handle_set_thread(GdbCmdContext *gdb_ctx

[Qemu-devel] [PATCH v9 16/27] gdbstub: Implement step (s pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 25 +++-- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 9fe130f30d..9b0556f8be 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1805,6 +1805,16 @@ static void handle_file_io(GdbCmdContext *gdb_ctx

[Qemu-devel] [PATCH v9 17/27] gdbstub: Implement v commands with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 170 +++--- 1 file changed, 110 insertions(+), 60 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 9b0556f8be..d56d0fd235 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1815,6 +1815,106 @@ static void

[Qemu-devel] [PATCH v9 22/27] gdbstub: Implement generic query qemu.Supported

2019-05-02 Thread Jon Doron
qemu.Supported query reply back with the supported qemu query/set commands (commands are seperated with a semicolon from each other). gdb> maint packet qqemu.Supported Signed-off-by: Jon Doron --- gdbstub.c | 9 + 1 file changed, 9 insertions(+) diff --git a/gdbstub.c b/gdbstu

[Qemu-devel] [PATCH v9 10/27] gdbstub: Implement get register (p pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 50 ++ 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 10e3f12a68..e9a3d0c2bc 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1655,6 +1655,36 @@ static void

[Qemu-devel] [PATCH v9 08/27] gdbstub: Implement remove breakpoint (z pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 49 - 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 36c7353a22..b42425b24c 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1611,6 +1611,29 @@ static void

[Qemu-devel] [PATCH v9 11/27] gdbstub: Implement write memory (M pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 51 +-- 1 file changed, 33 insertions(+), 18 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index e9a3d0c2bc..8dc2e1d507 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1685,6 +1685,31 @@ static void

[Qemu-devel] [PATCH v9 15/27] gdbstub: Implement file io (F pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 62 +++ 1 file changed, 40 insertions(+), 22 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 3478ac778d..9fe130f30d 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1772,6 +1772,39 @@ static void

[Qemu-devel] [PATCH v9 06/27] gdbstub: Implement set_thread (H pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 79 ++- 1 file changed, 49 insertions(+), 30 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 469aaeb875..21cdaf4678 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1547,6 +1547,47 @@ static void

[Qemu-devel] [PATCH v9 20/27] gdbstub: Implement target halted (? pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 36 ++-- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 2fd0d66f4d..d678191705 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -2239,13 +2239,30 @@ static void handle_gen_set

[Qemu-devel] [PATCH v9 23/27] gdbstub: Implement qemu physical memory mode

2019-05-02 Thread Jon Doron
isable Signed-off-by: Jon Doron --- gdbstub.c | 58 --- 1 file changed, 55 insertions(+), 3 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 00c07d6ec0..88ff6224e6 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -46,11 +46,23 @@ #define GDB_ATTAC

[Qemu-devel] [PATCH v9 13/27] gdbstub: Implement write all registers (G pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 41 +++-- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index daa602edc3..adfe39b3a3 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1734,6 +1734,29 @@ static void handle_read_mem

[Qemu-devel] [PATCH v9 18/27] gdbstub: Implement generic query (q pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 327 ++ 1 file changed, 327 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index d56d0fd235..83ae8738cc 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1915,6 +1915,323 @@ static void handle_v_commands

[Qemu-devel] [PATCH v9 25/27] kvm: Add API to read/write a CPU MSR value

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- accel/kvm/kvm-all.c | 39 +++ include/sysemu/kvm.h | 2 ++ 2 files changed, 41 insertions(+) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 524c4ddfbd..35207d910b 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm

  1   2   3   4   >