<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qemu/include/gdbstub, branch master</title>
<subtitle>QEMU development tree</subtitle>
<id>https://git.zx2c4.com/qemu/atom/include/gdbstub?h=master</id>
<link rel='self' href='https://git.zx2c4.com/qemu/atom/include/gdbstub?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/'/>
<updated>2024-07-22T08:37:44Z</updated>
<entry>
<title>gdbstub: Re-factor gdb command extensions</title>
<updated>2024-07-22T08:37:44Z</updated>
<author>
<name>Alex Bennée</name>
<email>alex.bennee@linaro.org</email>
</author>
<published>2024-07-18T09:45:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=e8122a7118eb22ace9e60c91bfbf2d4bbfc6f15a'/>
<id>urn:sha1:e8122a7118eb22ace9e60c91bfbf2d4bbfc6f15a</id>
<content type='text'>
Coverity reported a memory leak (CID 1549757) in this code and its
admittedly rather clumsy handling of extending the command table.
Instead of handing over a full array of the commands lets use the
lighter weight GPtrArray and simply test for the presence of each
entry as we go. This avoids complications of transferring ownership of
arrays and keeps the final command entries as static entries in the
target code.

Cc: Akihiko Odaki &lt;akihiko.odaki@daynix.com&gt;
Cc: Gustavo Bueno Romero &lt;gustavo.romero@linaro.org&gt;
Cc: Peter Maydell &lt;peter.maydell@linaro.org&gt;
Reviewed-by: Gustavo Romero &lt;gustavo.romero@linaro.org&gt;
Signed-off-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-Id: &lt;20240718094523.1198645-4-alex.bennee@linaro.org&gt;
</content>
</entry>
<entry>
<title>gdbstub: Pass CPU context to command handler</title>
<updated>2024-07-05T11:35:23Z</updated>
<author>
<name>Gustavo Romero</name>
<email>gustavo.romero@linaro.org</email>
</author>
<published>2024-07-05T08:40:44Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=2be4d5db1e50f5aabdeea6d1e63ef75cccd0bbdb'/>
<id>urn:sha1:2be4d5db1e50f5aabdeea6d1e63ef75cccd0bbdb</id>
<content type='text'>
Allow passing the current CPU context to command handlers via user_ctx
when the handler requires it.

Signed-off-by: Gustavo Romero &lt;gustavo.romero@linaro.org&gt;
Message-Id: &lt;20240628050850.536447-9-gustavo.romero@linaro.org&gt;
Reviewed-by: Manos Pitsidianakis &lt;manos.pitsidianakis@linaro.org&gt;
Signed-off-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-Id: &lt;20240705084047.857176-38-alex.bennee@linaro.org&gt;
</content>
</entry>
<entry>
<title>gdbstub: Make hex conversion function non-internal</title>
<updated>2024-07-05T11:35:19Z</updated>
<author>
<name>Gustavo Romero</name>
<email>gustavo.romero@linaro.org</email>
</author>
<published>2024-07-05T08:40:43Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=3ce0fc57a0e7d528ce0435c93205f9f6558c38ff'/>
<id>urn:sha1:3ce0fc57a0e7d528ce0435c93205f9f6558c38ff</id>
<content type='text'>
Make gdb_hextomem non-internal so it's not confined to use only in
gdbstub.c.

Signed-off-by: Gustavo Romero &lt;gustavo.romero@linaro.org&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Message-Id: &lt;20240628050850.536447-8-gustavo.romero@linaro.org&gt;
Signed-off-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-Id: &lt;20240705084047.857176-37-alex.bennee@linaro.org&gt;
</content>
</entry>
<entry>
<title>gdbstub: Add support for target-specific stubs</title>
<updated>2024-07-05T11:35:05Z</updated>
<author>
<name>Gustavo Romero</name>
<email>gustavo.romero@linaro.org</email>
</author>
<published>2024-07-05T08:40:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=60f4ce8e2cb9afebc7f3e40062087b91b7243c36'/>
<id>urn:sha1:60f4ce8e2cb9afebc7f3e40062087b91b7243c36</id>
<content type='text'>
Currently, it's not possible to have stubs specific to a given target,
even though there are GDB features which are target-specific, like, for
instance, memory tagging.

This commit introduces gdb_extend_qsupported_features,
gdb_extend_query_table, and gdb_extend_set_table functions as interfaces
to extend the qSupported string, the query handler table, and the set
handler table, allowing target-specific stub implementations.

Signed-off-by: Gustavo Romero &lt;gustavo.romero@linaro.org&gt;
Reviewed-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-Id: &lt;20240628050850.536447-4-gustavo.romero@linaro.org&gt;
Signed-off-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-Id: &lt;20240705084047.857176-33-alex.bennee@linaro.org&gt;
</content>
</entry>
<entry>
<title>gdbstub: Move GdbCmdParseEntry into a new header file</title>
<updated>2024-07-05T11:35:01Z</updated>
<author>
<name>Gustavo Romero</name>
<email>gustavo.romero@linaro.org</email>
</author>
<published>2024-07-05T08:40:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=133f202b19d8332de8d433c627fe6354e2ecf889'/>
<id>urn:sha1:133f202b19d8332de8d433c627fe6354e2ecf889</id>
<content type='text'>
Move GdbCmdParseEntry and its associated types into a separate header
file to allow the use of GdbCmdParseEntry and other gdbstub command
functions outside of gdbstub.c.

Since GdbCmdParseEntry and get_param are now public, kdoc
GdbCmdParseEntry and rename get_param to gdb_get_cmd_param.

This commit also makes gdb_put_packet public since is used in gdbstub
command handling.

Signed-off-by: Gustavo Romero &lt;gustavo.romero@linaro.org&gt;
Reviewed-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-Id: &lt;20240628050850.536447-3-gustavo.romero@linaro.org&gt;
Signed-off-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-Id: &lt;20240705084047.857176-32-alex.bennee@linaro.org&gt;
</content>
</entry>
<entry>
<title>gdbstub: move enums into separate header</title>
<updated>2024-06-24T09:14:17Z</updated>
<author>
<name>Alex Bennée</name>
<email>alex.bennee@linaro.org</email>
</author>
<published>2024-06-20T15:22:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=5b7d54d4ed7857b8b27fb040c6027ba59e003889'/>
<id>urn:sha1:5b7d54d4ed7857b8b27fb040c6027ba59e003889</id>
<content type='text'>
This is an experiment to further reduce the amount we throw into the
exec headers. It might not be as useful as I initially thought because
just under half of the users also need gdbserver_start().

Reviewed-by: Pierrick Bouvier &lt;pierrick.bouvier@linaro.org&gt;
Signed-off-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Message-Id: &lt;20240620152220.2192768-3-alex.bennee@linaro.org&gt;
</content>
</entry>
<entry>
<title>gdbstub: Avoid including 'cpu.h' in 'gdbstub/helpers.h'</title>
<updated>2024-04-26T13:31:37Z</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
<email>philmd@linaro.org</email>
</author>
<published>2024-04-18T14:45:33Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=0654c79416f346d967fbc7dad7ca451b49bbd822'/>
<id>urn:sha1:0654c79416f346d967fbc7dad7ca451b49bbd822</id>
<content type='text'>
We only need the "exec/tswap.h" and "cpu-param.h" headers.
Only include "cpu.h" in the target gdbstub.c source files.

Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Message-Id: &lt;20240418192525.97451-20-philmd@linaro.org&gt;
</content>
</entry>
<entry>
<title>gdbstub: Simplify #ifdef'ry in helpers.h</title>
<updated>2024-04-26T13:31:37Z</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
<email>philmd@linaro.org</email>
</author>
<published>2024-03-22T15:11:47Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=94326e4f217991102770667f684156bdbef599e6'/>
<id>urn:sha1:94326e4f217991102770667f684156bdbef599e6</id>
<content type='text'>
Slightly simplify by checking NEED_CPU_H definition in header.

Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Message-Id: &lt;20240322161439.6448-2-philmd@linaro.org&gt;
</content>
</entry>
<entry>
<title>exec: Rename NEED_CPU_H -&gt; COMPILING_PER_TARGET</title>
<updated>2024-04-26T07:49:51Z</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
<email>philmd@linaro.org</email>
</author>
<published>2023-06-13T14:29:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=7d7a21ba691d3f52fdcf123adf2b79f7ce88174d'/>
<id>urn:sha1:7d7a21ba691d3f52fdcf123adf2b79f7ce88174d</id>
<content type='text'>
'NEED_CPU_H' guard target-specific code; it is defined by meson
altogether with the 'CONFIG_TARGET' definition. Rename NEED_CPU_H
as COMPILING_PER_TARGET to clarify its meaning.

Mechanical change running:

 $ sed -i s/NEED_CPU_H/COMPILING_PER_TARGET/g $(git grep -l NEED_CPU_H)

then manually add a /* COMPILING_PER_TARGET */ comment
after the '#endif' when the block is large.

Inspired-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Message-Id: &lt;20240322161439.6448-4-philmd@linaro.org&gt;
</content>
</entry>
<entry>
<title>gdbstub: Save target's siginfo</title>
<updated>2024-03-13T11:43:52Z</updated>
<author>
<name>Gustavo Romero</name>
<email>gustavo.romero@linaro.org</email>
</author>
<published>2024-03-09T03:08:59Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=f84e313e0278222eb88b9ca29311f0df71abd001'/>
<id>urn:sha1:f84e313e0278222eb88b9ca29311f0df71abd001</id>
<content type='text'>
Save target's siginfo into gdbserver_state so it can be used later, for
example, in any stub that requires the target's si_signo and si_code.

This change affects only linux-user mode.

Signed-off-by: Gustavo Romero &lt;gustavo.romero@linaro.org&gt;
Suggested-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Message-Id: &lt;20240309030901.1726211-4-gustavo.romero@linaro.org&gt;
Signed-off-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
</content>
</entry>
</feed>
