From: Steve Aarnio <saarnio@qti.qualcomm.com>
To: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: "qemu-trivial@nongnu.org" <qemu-trivial@nongnu.org>
Subject: [PATCH] meson.build: Add --enable-use-pdb option
Date: Wed, 18 Mar 2026 19:18:20 +0000 [thread overview]
Message-ID: <MN2PR02MB6622718572E2A2B5E4EE3C039B4EA@MN2PR02MB6622.namprd02.prod.outlook.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1611 bytes --]
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 <saarnio@qti.qualcomm.com>
---
meson.build | 5 +++++
meson_options.txt | 2 ++
2 files changed, 7 insertions(+)
diff --git a/meson.build b/meson.build
index d7c4095b39..d27581e0c2 100644
--- a/meson.build
+++ b/meson.build
@@ -692,6 +692,11 @@ endif
qemu_common_flags += hardening_flags
+if get_option('debug') and get_option('use_pdb')
+ qemu_common_flags += cc.get_supported_arguments('-g','-gcodeview','-gcolumn-info','-fno-omit-frame-pointer')
+ qemu_ldflags += cc.get_supported_link_arguments('-g','-Wl,--pdb=')
+endif
+
# Collect warning flags we want to set, sorted alphabetically
warn_flags = [
# First enable interesting warnings
diff --git a/meson_options.txt b/meson_options.txt
index 31d5916cfc..b1f3250d5c 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -372,6 +372,8 @@ option('debug_stack_usage', type: 'boolean', value: false,
description: 'measure coroutine stack usage')
option('qom_cast_debug', type: 'boolean', value: true,
description: 'cast debugging support')
+option('use_pdb', type: 'boolean', value: false,
+ description: 'use pdb symbol format on debug windows builds')
option('slirp_smbd', type : 'feature', value : 'auto',
description: 'use smbd (at path --smbd=*) in slirp networking')
--
2.53.0
[-- Attachment #2: Type: text/html, Size: 9915 bytes --]
next reply other threads:[~2026-03-18 19:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-18 19:18 Steve Aarnio [this message]
2026-03-19 1:24 ` [PATCH] meson.build: Add --enable-use-pdb option Mohamed Mediouni
2026-03-19 15:55 ` Steve Aarnio
2026-03-22 11:56 ` Michael Tokarev
2026-03-22 12:21 ` Mohamed Mediouni
2026-03-23 17:44 ` [PATCH v2 1/1] meson.build: Add --enable-pdb option Steve Aarnio
2026-03-23 21:32 ` Mohamed Mediouni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=MN2PR02MB6622718572E2A2B5E4EE3C039B4EA@MN2PR02MB6622.namprd02.prod.outlook.com \
--to=saarnio@qti.qualcomm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox