Re: [PATCH] meson.build: Add --enable-use-pdb option

Mohamed Mediouni <[email protected]>
Newsgroups org.nongnu.qemu-trivial,org.nongnu.qemu-devel
Message-ID <[email protected]>

> On 30. Mar 2026, at 18:33, Paolo Bonzini <[email protected]> wrote:
> 
> On 3/18/26 20:18, Steve Aarnio wrote:
>> This option will (attempt to) modify the QEMU compile and link flags to
>> emit PDB symbol files rather than the standard (DWARF?) symbol output
>> from gcc/clang.
>> This enables using native Windows debug tools (Windbg/Visual Studio) for
>> debugging QEMU.
>> Signed-off-by: Steve Aarnio <[email protected]>
> 
> I would prefer to have support for this in Meson itself, but anyway, I have some questions below
> 
>> +if get_option('debug') and get_option('use_pdb')
>> +  qemu_common_flags += cc.get_supported_arguments('-g','-gcodeview','- gcolumn-info','-fno-omit-frame-pointer')
> 
> GCC documentation says -gcolumn-info enabled by default, also who is enabling -fomit-frame-pointer so that you have to drop it?

Hello,

https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-fomit-frame-pointer

Clang documentation says:
On many targets, -O1 and higher omit the frame pointer by default

> 
>> +  qemu_ldflags += cc.get_supported_link_arguments('-g','-Wl,--pdb=')
> 
> What linkers support --pdb=, and what goes after the equal sign?

lld, and pdb= is enough to have an autogenerated path (output[.pdb]).

gcc and GNU ld don't support this.

> 
> Also, the update to scripts/meson-buildoptions.sh is missing, just running "make" will regenerate it.
> 
> Paolo
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.