* [PATCH v3 0/2] gdbstub: Generate a single gdbstub-xml.c / gdb_static_features[]
@ 2026-02-27 10:10 Philippe Mathieu-Daudé
2026-02-27 10:10 ` [PATCH v3 1/2] meson: Restrict gdbstub to user/system builds Philippe Mathieu-Daudé
2026-02-27 10:10 ` [PATCH v3 2/2] gdbstub: Generate a single gdbstub-xml.c / gdb_static_features[] Philippe Mathieu-Daudé
0 siblings, 2 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-02-27 10:10 UTC (permalink / raw)
To: qemu-devel
Cc: Philippe Mathieu-Daudé, Gustavo Romero,
Daniel P. Berrangé, Pierrick Bouvier, Paolo Bonzini,
Alex Bennée, Marc-André Lureau
v3: Restrict meson to gdbstub/
v2: Check array length
Philippe Mathieu-Daudé (2):
meson: Restrict gdbstub to user/system builds
gdbstub: Generate a single gdbstub-xml.c / gdb_static_features[]
meson.build | 12 +-----------
stubs/gdbstub.c => gdbstub/gdb-xml-stub.c | 0
gdbstub/meson.build | 19 +++++++++++++++++++
stubs/meson.build | 2 --
4 files changed, 20 insertions(+), 13 deletions(-)
rename stubs/gdbstub.c => gdbstub/gdb-xml-stub.c (100%)
--
2.52.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v3 1/2] meson: Restrict gdbstub to user/system builds
2026-02-27 10:10 [PATCH v3 0/2] gdbstub: Generate a single gdbstub-xml.c / gdb_static_features[] Philippe Mathieu-Daudé
@ 2026-02-27 10:10 ` Philippe Mathieu-Daudé
2026-02-27 11:45 ` Jim MacArthur
2026-02-27 10:10 ` [PATCH v3 2/2] gdbstub: Generate a single gdbstub-xml.c / gdb_static_features[] Philippe Mathieu-Daudé
1 sibling, 1 reply; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-02-27 10:10 UTC (permalink / raw)
To: qemu-devel
Cc: Philippe Mathieu-Daudé, Gustavo Romero,
Daniel P. Berrangé, Pierrick Bouvier, Paolo Bonzini,
Alex Bennée, Marc-André Lureau
Limited builds (tools, documentation) don't need to generate /
build gdbstub files. Only process the gdbstub/ folder when
user / system emulation / acceleration is built.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 3cd1d8dbc66..60415df69a1 100644
--- a/meson.build
+++ b/meson.build
@@ -3724,7 +3724,6 @@ subdir('qom')
subdir('authz')
subdir('crypto')
subdir('ui')
-subdir('gdbstub')
if have_system
subdir('hw')
else
@@ -3767,6 +3766,7 @@ if have_system or have_user
output: 'decode-@BASENAME@.c.inc',
arguments: ['@INPUT@', '@EXTRA_ARGS@', '-o', '@OUTPUT@'])
subdir('libdecnumber')
+ subdir('gdbstub')
subdir('target')
endif
--
2.52.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v3 2/2] gdbstub: Generate a single gdbstub-xml.c / gdb_static_features[]
2026-02-27 10:10 [PATCH v3 0/2] gdbstub: Generate a single gdbstub-xml.c / gdb_static_features[] Philippe Mathieu-Daudé
2026-02-27 10:10 ` [PATCH v3 1/2] meson: Restrict gdbstub to user/system builds Philippe Mathieu-Daudé
@ 2026-02-27 10:10 ` Philippe Mathieu-Daudé
2026-02-27 11:46 ` Jim MacArthur
1 sibling, 1 reply; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-02-27 10:10 UTC (permalink / raw)
To: qemu-devel
Cc: Philippe Mathieu-Daudé, Gustavo Romero,
Daniel P. Berrangé, Pierrick Bouvier, Paolo Bonzini,
Alex Bennée, Marc-André Lureau
gdb_static_features[] only contains strings, nothing target-specific.
Instead of generating one file per target, generate a single file
with a single gdb_static_features[] array.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
meson.build | 10 ----------
stubs/gdbstub.c => gdbstub/gdb-xml-stub.c | 0
gdbstub/meson.build | 19 +++++++++++++++++++
stubs/meson.build | 2 --
4 files changed, 19 insertions(+), 12 deletions(-)
rename stubs/gdbstub.c => gdbstub/gdb-xml-stub.c (100%)
diff --git a/meson.build b/meson.build
index 60415df69a1..875a0bb1999 100644
--- a/meson.build
+++ b/meson.build
@@ -4221,7 +4221,6 @@ if have_rust
endif
-feature_to_c = find_program('scripts/feature_to_c.py')
rust_root_crate = find_program('scripts/rust/rust_root_crate.sh')
if host_os == 'darwin'
@@ -4301,15 +4300,6 @@ foreach target : target_dirs
endif
endif
- if 'TARGET_XML_FILES' in config_target
- gdbstub_xml = custom_target(target + '-gdbstub-xml.c',
- output: target + '-gdbstub-xml.c',
- input: files(config_target['TARGET_XML_FILES'].split()),
- command: [feature_to_c, '@INPUT@'],
- capture: true)
- arch_srcs += gdbstub_xml
- endif
-
if target in config_target_info
arch_srcs += config_target_info[target]
else
diff --git a/stubs/gdbstub.c b/gdbstub/gdb-xml-stub.c
similarity index 100%
rename from stubs/gdbstub.c
rename to gdbstub/gdb-xml-stub.c
diff --git a/gdbstub/meson.build b/gdbstub/meson.build
index 15c666f5752..06fa4d1b6f0 100644
--- a/gdbstub/meson.build
+++ b/gdbstub/meson.build
@@ -4,6 +4,25 @@
# types such as hwaddr.
#
+gdbstub_xml = []
+foreach target : target_dirs
+ config_target = config_target_mak[target]
+ if 'TARGET_XML_FILES' in config_target
+ gdbstub_xml += config_target['TARGET_XML_FILES'].split()
+ endif
+endforeach
+if gdbstub_xml.length() > 0
+ feature_to_c = find_program('../scripts/feature_to_c.py')
+ gdbstub_xml = custom_target('gdbstub-xml.c',
+ output: 'gdbstub-xml.c',
+ input: files(gdbstub_xml),
+ command: [feature_to_c, '@INPUT@'],
+ capture: true)
+else
+ gdbstub_xml = files('gdb-xml-stub.c')
+endif
+common_ss.add(gdbstub_xml)
+
# We build two versions of gdbstub, one for each mode
user_ss.add(files(
'gdbstub.c',
diff --git a/stubs/meson.build b/stubs/meson.build
index 8a07059500d..1e0f6f47377 100644
--- a/stubs/meson.build
+++ b/stubs/meson.build
@@ -89,8 +89,6 @@ if have_system
endif
if have_system or have_user
- stub_ss.add(files('gdbstub.c'))
-
# Also included in have_system for --disable-tcg builds
stub_ss.add(files('replay.c'))
--
2.52.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v3 1/2] meson: Restrict gdbstub to user/system builds
2026-02-27 10:10 ` [PATCH v3 1/2] meson: Restrict gdbstub to user/system builds Philippe Mathieu-Daudé
@ 2026-02-27 11:45 ` Jim MacArthur
0 siblings, 0 replies; 5+ messages in thread
From: Jim MacArthur @ 2026-02-27 11:45 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé
On Fri, Feb 27, 2026 at 11:10:38AM +0100, Philippe Mathieu-Daudé wrote:
> Limited builds (tools, documentation) don't need to generate /
> build gdbstub files. Only process the gdbstub/ folder when
> user / system emulation / acceleration is built.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> meson.build | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meson.build b/meson.build
> index 3cd1d8dbc66..60415df69a1 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -3724,7 +3724,6 @@ subdir('qom')
> subdir('authz')
> subdir('crypto')
> subdir('ui')
> -subdir('gdbstub')
> if have_system
> subdir('hw')
> else
> @@ -3767,6 +3766,7 @@ if have_system or have_user
> output: 'decode-@BASENAME@.c.inc',
> arguments: ['@INPUT@', '@EXTRA_ARGS@', '-o', '@OUTPUT@'])
> subdir('libdecnumber')
> + subdir('gdbstub')
> subdir('target')
> endif
>
> --
> 2.52.0
>
>
Reviewed-by: Jim MacArthur <jim.macarthur@linaro.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3 2/2] gdbstub: Generate a single gdbstub-xml.c / gdb_static_features[]
2026-02-27 10:10 ` [PATCH v3 2/2] gdbstub: Generate a single gdbstub-xml.c / gdb_static_features[] Philippe Mathieu-Daudé
@ 2026-02-27 11:46 ` Jim MacArthur
0 siblings, 0 replies; 5+ messages in thread
From: Jim MacArthur @ 2026-02-27 11:46 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé
On Fri, Feb 27, 2026 at 11:10:39AM +0100, Philippe Mathieu-Daudé wrote:
> gdb_static_features[] only contains strings, nothing target-specific.
> Instead of generating one file per target, generate a single file
> with a single gdb_static_features[] array.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> meson.build | 10 ----------
> stubs/gdbstub.c => gdbstub/gdb-xml-stub.c | 0
> gdbstub/meson.build | 19 +++++++++++++++++++
> stubs/meson.build | 2 --
> 4 files changed, 19 insertions(+), 12 deletions(-)
> rename stubs/gdbstub.c => gdbstub/gdb-xml-stub.c (100%)
>
LGTM
Reviewed-by: Jim MacArthur <jim.macarthur@linaro.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-02-27 11:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-27 10:10 [PATCH v3 0/2] gdbstub: Generate a single gdbstub-xml.c / gdb_static_features[] Philippe Mathieu-Daudé
2026-02-27 10:10 ` [PATCH v3 1/2] meson: Restrict gdbstub to user/system builds Philippe Mathieu-Daudé
2026-02-27 11:45 ` Jim MacArthur
2026-02-27 10:10 ` [PATCH v3 2/2] gdbstub: Generate a single gdbstub-xml.c / gdb_static_features[] Philippe Mathieu-Daudé
2026-02-27 11:46 ` Jim MacArthur
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.