Alex Bennée <alex.ben...@linaro.org> writes: > Dominik 'Disconnect3d' Czarnota <dominik.b.czarn...@gmail.com> writes: > >> This commit adds support for the `qGDBServerVersion` packet to the qemu >> gdbstub which could be used by clients to detect the QEMU version >> (and, e.g., use a workaround for known bugs). >> >> This packet is not documented/standarized by GDB but it was implemented >> by LLDB gdbstub [0] and is helpful for projects like Pwndbg [1]. >> >> This has been implemented by Patryk, who I included in Co-authored-by >> and who asked me to send the patch. >> >> [0] https://lldb.llvm.org/resources/lldbgdbremote.html#qgdbserverversion >> [1] https://github.com/pwndbg/pwndbg/issues/2648 >> >> Co-authored-by: Patryk 'patryk4815' Sondej <patryk.son...@gmail.com> >> Signed-off-by: Dominik 'Disconnect3d' Czarnota >> <dominik.b.czarn...@gmail.com> > > Hmm: > > cc -m64 -Ilibuser.a.p -I. -I../.. -Iqapi -Itrace -Iui -Iui/shader > -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include > -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g > -fstack-protector-strong -Wempty-body -Wendif-labels > -Wexpansion-to-defined -Wformat-security -Wformat-y2k > -Wignored-qualifiers -Wimplicit-fallthrough=2 -Winit-self > -Wmissing-format-attribute -Wmissing-prototypes -Wnested-externs > -Wold-style-declaration -Wold-style-definition -Wredundant-decls > -Wshadow=local -Wstrict-prototypes -Wtype-limits -Wundef -Wvla > -Wwrite-strings -Wno-missing-include-dirs -Wno-psabi > -Wno-shift-negative-value -isystem > /home/alex/lsrc/qemu.git/linux-headers -isystem linux-headers -iquote > . -iquote /home/alex/lsrc/qemu.git -iquote > /home/alex/lsrc/qemu.git/include -iquote > /home/alex/lsrc/qemu.git/host/include/x86_64 -iquote > /home/alex/lsrc/qemu.git/host/include/generic -iquote > /home/alex/lsrc/qemu.git/tcg/i386 -pthread -mcx16 -msse2 -D_GNU_SOURCE > -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing > -fno-common -fwrapv -ftrivial-auto-var-init=zero > -fzero-call-used-regs=used-gpr -fPIE -DCONFIG_USER_ONLY > -DCOMPILING_SYSTEM_VS_USER -MD -MQ libuser.a.p/gdbstub_gdbstub.c.o -MF > libuser.a.p/gdbstub_gdbstub.c.o.d -o libuser.a.p/gdbstub_gdbstub.c.o > -c ../../gdbstub/gdbstub.c > ../../gdbstub/gdbstub.c: In function ‘handle_query_gdb_server_version’: > ../../gdbstub/gdbstub.c:1603:74: error: implicit declaration of function > ‘target_name’ [-Werror=implicit-function-declaration] > 1603 | g_string_printf(gdbserver_state.str_buf, > "name:qemu-%s;version:%s;", target_name(), QEMU_VERSION); > | > ^~~~~~~~~~~ > ../../gdbstub/gdbstub.c:1603:74: error: nested extern declaration of > ‘target_name’ [-Werror=nested-externs] > ../../gdbstub/gdbstub.c:1603:46: error: format ‘%s’ expects argument of type > ‘char *’, but argument 3 has type ‘int’ [-Werror=format=] > 1603 | g_string_printf(gdbserver_state.str_buf, > "name:qemu-%s;version:%s;", target_name(), QEMU_VERSION); > | > ^~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~ > | > | > | > int > cc1: all warnings being treated as errors > > where did target_name() come from and/or go to?
I fixed the include so queued to gdbstub/next, thanks. -- Alex Bennée Virtualisation Tech Lead @ Linaro