Skip to contentSkip to conversation

Fixes for 11.2: docker + plugins + gdbstub

GIT PULL Applied Pierrick Bouvier 3 participants 8 messages Nov 27 – Nov 30

lore
Share & tools
lore
#0 lore raw

The following changes since commit 9751c62358073580cbf330a4df22077a7c6a407c:

Update version for v11.2.0-rc2 release (2026-11-25 21:39:27 -0800)

are available in the Git repository at:

https://gitlab.com/p-b-o/qemu tags/pbouvier/pr/fixes_11.2-20261127

for you to fetch changes up to ff4c3cf7ca6afd7f3da1a011be304f897d2d5fab:

gdbstub: reset supported features on Supported request (2026-11-27 16:58:43 +0000)

----------------------------------------------------------------
Changes:
- [PATCH] tests/lcitool: Switch to a newer version of netmap and check (Thomas Huth <[email protected]>)

- [PATCH] contrib/plugins/uftrace_symbols.py: ignore warning reported (Pierrick Bouvier <[email protected]>)

- [PATCH v2] gdbstub: reset supported features on Supported request (Pierrick Bouvier <[email protected]>)

----------------------------------------------------------------
Justin Sapp (1):
gdbstub: reset supported features on Supported request

Pierrick Bouvier (1):
contrib/plugins/uftrace_symbols.py: ignore warning reported by llvm-addr2line

Thomas Huth (1):
tests/lcitool: Switch to a newer version of netmap and check it out faster

 contrib/plugins/uftrace_symbols.py     |  3 ++-
 gdbstub/gdbstub.c                      | 15 +++++++--------
 gdbstub/user.c                         |  4 +---
 tests/docker/dockerfiles/debian.docker |  4 ++--
 tests/lcitool/refresh                  |  4 ++--
 5 files changed, 14 insertions(+), 16 deletions(-)
#1 lore raw

[PULL 1/3] tests/lcitool: Switch to a newer version of netmap and check it out faster

From: Thomas Huth <[email protected]>

Netmap v11.3 is from 2017, so this is way older than the oldest version of other features that we support in QEMU. The newest tagged version is v13.0 which is from 2019 - still old, but at least it's the newest one with a version number, so let's use that instead.

While we're at it, also make sure to check out only the revision that we need, so we don't waste bandwidth by downloading the whole repository here.

---
 tests/docker/dockerfiles/debian.docker | 4 ++--
 tests/lcitool/refresh                  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
tests/docker/dockerfiles/debian.docker +2 -2
index ce591feec21..aeed90523c7 100644
@@ -161,8 +161,8 @@ RUN apt update && \
   cscope\
   global\
   linux-headers-generic
-RUN git clone https://github.com/luigirizzo/netmap.git /usr/src/netmap
-RUN cd /usr/src/netmap && git checkout v11.3
+RUN git clone -cadvice.detachedHead=false --branch=v13.0 --depth=1 \
+              https://github.com/luigirizzo/netmap.git /usr/src/netmap
 RUN cd /usr/src/netmap/LINUX && \
   ./configure --no-drivers --no-apps \
   --kernel-dir=$(ls -d /usr/src/linux-headers-*-$(dpkg --print-architecture)) \
tests/lcitool/refresh +2 -2
index 075acb82e1d..57593e6ded1 100755
@@ -117,8 +117,8 @@ RUN apt update && \
   cscope\
   global\
   linux-headers-generic
-RUN git clone https://github.com/luigirizzo/netmap.git /usr/src/netmap
-RUN cd /usr/src/netmap && git checkout v11.3
+RUN git clone -cadvice.detachedHead=false --branch=v13.0 --depth=1 \
+              https://github.com/luigirizzo/netmap.git /usr/src/netmap
 RUN cd /usr/src/netmap/LINUX && \
   ./configure --no-drivers --no-apps \
   --kernel-dir=$(ls -d /usr/src/linux-headers-*-$(dpkg --print-architecture)) \
Signature · 1 line
2.43.0
#2 lore raw

[PULL 3/3] gdbstub: reset supported features on Supported request

In reply to Pierrick Bouvier

From: Justin Sapp <[email protected]>

https://sourceware.org/gdb/current/onlinedocs/gdb.html/General-Query-Packets.html#qSupported

```
Whenever the stub receives a ‘qSupported’ request, the supplied set
of GDB features should override any previous request. This allows GDB to
put the stub in a known state, even if the stub had previously been
communicating with a different version of GDB.
```

We exposed this by connecting to gdbstub using a gdb client first, and then WinDbg (EXDI) for windows kernel debugging. Since they both differ in their multiprocess support, this was confusing EXDI.

While we are here, fix the same for fork_events in user mode. Simplify control flow to always call gdb_handle_query_supported_user.

---
 gdbstub/gdbstub.c | 15 +++++++--------
 gdbstub/user.c    |  4 +---
 2 files changed, 8 insertions(+), 11 deletions(-)
gdbstub/gdbstub.c +7 -8
index 0a328b0dd48..38fe56a5d36 100644
@@ -1679,6 +1679,11 @@ void gdb_extend_qsupported_features(char *qflags)
 
 static void handle_query_supported(GArray *params, void *user_ctx)
 {
+    const char *gdb_supported = "";
+    if (params->len) {
+        gdb_supported = gdb_get_cmd_param(params, 0)->data;
+    }
+
     g_string_printf(gdbserver_state.str_buf, "PacketSize=%x", MAX_PACKET_LENGTH);
     if (gdb_get_core_xml_file(first_cpu)) {
         g_string_append(gdbserver_state.str_buf, ";qXfer:features:read+");
@@ -1701,16 +1706,10 @@ static void handle_query_supported(GArray *params, void *user_ctx)
     g_string_append(gdbserver_state.str_buf, ";qXfer:exec-file:read+");
 #endif
 
-    if (params->len) {
-        const char *gdb_supported = gdb_get_cmd_param(params, 0)->data;
-
-        if (strstr(gdb_supported, "multiprocess+")) {
-            gdbserver_state.multiprocess = true;
-        }
+    gdbserver_state.multiprocess = strstr(gdb_supported, "multiprocess+");
 #if defined(CONFIG_USER_ONLY)
-        gdb_handle_query_supported_user(gdb_supported);
+    gdb_handle_query_supported_user(gdb_supported);
 #endif
-    }
 
     g_string_append(gdbserver_state.str_buf, ";vContSupported+;multiprocess+");
 
gdbstub/user.c +1 -3
index d810f0f38c3..6526200a360 100644
@@ -701,9 +701,7 @@ fail:
 
 void gdb_handle_query_supported_user(const char *gdb_supported)
 {
-    if (strstr(gdb_supported, "fork-events+")) {
-        gdbserver_user_state.fork_events = true;
-    }
+    gdbserver_user_state.fork_events = strstr(gdb_supported, "fork-events+");
     g_string_append(gdbserver_state.str_buf, ";fork-events+");
 }
 
Signature · 1 line
2.43.0
#3 lore raw

[PULL 2/3] contrib/plugins/uftrace_symbols.py: ignore warning reported by llvm-addr2line

In reply to Pierrick Bouvier

When trying to trace a riscv64 stack, addr2line reported warning on
stdout when symbolizing addresses:
warning: address range table at offset 0x8a0 has a premature terminator entry at offset 0x9c0
warning: address range table at offset 0x1700 has a premature terminator entry at offset 0x1750

Ignore any warning, similar to the error we ignored previously.

---
 contrib/plugins/uftrace_symbols.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
contrib/plugins/uftrace_symbols.py +2 -1
index 9f0095e73b9..2b931c49a83 100755
@@ -63,7 +63,8 @@ def find_symbols_locations(elf_file, symbols):
     out = out.strip().split('\n')
     # filter out some addr2line error messages
     skip_err='addr2line: DWARF error: mangled line number section (bad file number)'
-    out = [src for src in out if src != skip_err]
+    out = [src for src in out
+           if src != skip_err and not src.startswith('warning:')]
     assert len(out) == len(symbols)
     for i in range(len(symbols)):
         s = symbols[i]
Signature · 1 line
2.43.0
#4 lore raw
In reply to Pierrick Bouvier
Quoted 31 lines · Pierrick Bouvier

The following changes since commit 9751c62358073580cbf330a4df22077a7c6a407c:

Update version for v11.2.0-rc2 release (2026-11-25 21:39:27 -0800)

are available in the Git repository at:

https://gitlab.com/p-b-o/qemu tags/pbouvier/pr/fixes_11.2-20261127

for you to fetch changes up to ff4c3cf7ca6afd7f3da1a011be304f897d2d5fab:

gdbstub: reset supported features on Supported request (2026-11-27 16:58:43 +0000)

----------------------------------------------------------------
Changes:
- [PATCH] tests/lcitool: Switch to a newer version of netmap and check (Thomas Huth <[email protected]>)

- [PATCH] contrib/plugins/uftrace_symbols.py: ignore warning reported (Pierrick Bouvier <[email protected]>)

- [PATCH v2] gdbstub: reset supported features on Supported request (Pierrick Bouvier <[email protected]>)

----------------------------------------------------------------
Justin Sapp (1):
gdbstub: reset supported features on Supported request

Pierrick Bouvier (1):
contrib/plugins/uftrace_symbols.py: ignore warning reported by llvm-addr2line

Thomas Huth (1):
tests/lcitool: Switch to a newer version of netmap and check it out faster

Quoted 6 lines
 contrib/plugins/uftrace_symbols.py     |  3 ++-
 gdbstub/gdbstub.c                      | 15 +++++++--------
 gdbstub/user.c                         |  4 +---
 tests/docker/dockerfiles/debian.docker |  4 ++--
 tests/lcitool/refresh                  |  4 ++--
 5 files changed, 14 insertions(+), 16 deletions(-)

Disclaimer: This PR contains one patch for gdbstub, for which I'm not an official maintainer.

Despite multiple pings on v2, I could not get any answer from Alex, so sending this now directly, as the fix was tested and reviewed. He reviewed the v1, and v2 was a small fix on top.

Regards,
Pierrick

#5 lore raw
Quoted 39 lines · Pierrick Bouvier
Quoted 31 lines · Pierrick Bouvier

The following changes since commit 9751c62358073580cbf330a4df22077a7c6a407c:

Update version for v11.2.0-rc2 release (2026-11-25 21:39:27 -0800)

are available in the Git repository at:

https://gitlab.com/p-b-o/qemu tags/pbouvier/pr/fixes_11.2-20261127

for you to fetch changes up to ff4c3cf7ca6afd7f3da1a011be304f897d2d5fab:

gdbstub: reset supported features on Supported request (2026-11-27 16:58:43 +0000)

----------------------------------------------------------------
Changes:
- [PATCH] tests/lcitool: Switch to a newer version of netmap and check (Thomas Huth <[email protected]>)

- [PATCH] contrib/plugins/uftrace_symbols.py: ignore warning reported (Pierrick Bouvier <[email protected]>)

- [PATCH v2] gdbstub: reset supported features on Supported request (Pierrick Bouvier <[email protected]>)

----------------------------------------------------------------
Justin Sapp (1):
gdbstub: reset supported features on Supported request

Pierrick Bouvier (1):
contrib/plugins/uftrace_symbols.py: ignore warning reported by llvm-addr2line

Thomas Huth (1):
tests/lcitool: Switch to a newer version of netmap and check it out faster

Quoted 6 lines
 contrib/plugins/uftrace_symbols.py     |  3 ++-
 gdbstub/gdbstub.c                      | 15 +++++++--------
 gdbstub/user.c                         |  4 +---
 tests/docker/dockerfiles/debian.docker |  4 ++--
 tests/lcitool/refresh                  |  4 ++--
 5 files changed, 14 insertions(+), 16 deletions(-)
Quoted 6 lines

Disclaimer: This PR contains one patch for gdbstub, for which I'm not an official maintainer.

Despite multiple pings on v2, I could not get any answer from Alex, so sending this now directly, as the fix was tested and reviewed. He reviewed the v1, and v2 was a small fix on top.

Because it's not a bug fix so has to wait until after the tree is re-opened. Please don't bypass the normal tree next time.

Quoted 3 lines

Regards,
Pierrick

Signature · 2 lines
Alex Bennée
Virtualisation Tech Lead @ Linaro
#6 lore raw
Quoted 44 lines · Alex Bennée
Quoted 42 lines · Pierrick Bouvier
Quoted 31 lines · Pierrick Bouvier

The following changes since commit 9751c62358073580cbf330a4df22077a7c6a407c:

Update version for v11.2.0-rc2 release (2026-11-25 21:39:27 -0800)

are available in the Git repository at:

https://gitlab.com/p-b-o/qemu tags/pbouvier/pr/fixes_11.2-20261127

for you to fetch changes up to ff4c3cf7ca6afd7f3da1a011be304f897d2d5fab:

gdbstub: reset supported features on Supported request (2026-11-27 16:58:43 +0000)

----------------------------------------------------------------
Changes:
- [PATCH] tests/lcitool: Switch to a newer version of netmap and check (Thomas Huth <[email protected]>)

- [PATCH] contrib/plugins/uftrace_symbols.py: ignore warning reported (Pierrick Bouvier <[email protected]>)

- [PATCH v2] gdbstub: reset supported features on Supported request (Pierrick Bouvier <[email protected]>)

----------------------------------------------------------------
Justin Sapp (1):
gdbstub: reset supported features on Supported request

Pierrick Bouvier (1):
contrib/plugins/uftrace_symbols.py: ignore warning reported by llvm-addr2line

Thomas Huth (1):
tests/lcitool: Switch to a newer version of netmap and check it out faster

Quoted 6 lines
 contrib/plugins/uftrace_symbols.py     |  3 ++-
 gdbstub/gdbstub.c                      | 15 +++++++--------
 gdbstub/user.c                         |  4 +---
 tests/docker/dockerfiles/debian.docker |  4 ++--
 tests/lcitool/refresh                  |  4 ++--
 5 files changed, 14 insertions(+), 16 deletions(-)

Disclaimer: This PR contains one patch for gdbstub, for which I'm not an official maintainer.

Quoted 7 lines
Quoted 3 lines

Despite multiple pings on v2, I could not get any answer from Alex, so sending this now directly, as the fix was tested and reviewed. He reviewed the v1, and v2 was a small fix on top.

Because it's not a bug fix so has to wait until after the tree is re-opened. Please don't bypass the normal tree next time.

As mentioned on the thread, this is bug fix. Please check the commit description and link to gdb doc, any gdbstub implementation has to honor this behavior.

Regards,
Pierrick

#7 lore raw
In reply to Pierrick Bouvier
Quoted 15 lines · Pierrick Bouvier

The following changes since commit 9751c62358073580cbf330a4df22077a7c6a407c:

   Update version for v11.2.0-rc2 release (2026-11-25 21:39:27 -0800)

are available in the Git repository at:

   https://gitlab.com/p-b-o/qemu tags/pbouvier/pr/fixes_11.2-20261127

for you to fetch changes up to ff4c3cf7ca6afd7f3da1a011be304f897d2d5fab:

gdbstub: reset supported features on Supported request (2026-11-27 16:58:43 +0000)

----------------------------------------------------------------
Changes:
- [PATCH] tests/lcitool: Switch to a newer version of netmap and check (Thomas Huth<[email protected]>)

Quoted 7 lines

- [PATCH] contrib/plugins/uftrace_symbols.py: ignore warning reported (Pierrick Bouvier<[email protected]>)

[email protected]
- [PATCH v2] gdbstub: reset supported features on Supported request (Pierrick Bouvier<[email protected]>)

[email protected]

Applied, thanks.

r~