https://github.com/kastiglione updated
https://github.com/llvm/llvm-project/pull/81196
>From 81a2034ff2b41e30a1f5b82c86b4d5d4c429ed52 Mon Sep 17 00:00:00 2001
From: Dave Lee
Date: Thu, 8 Feb 2024 13:59:12 -0800
Subject: [PATCH 1/5] [lldb] Support custom printf formatting for variables
---
@@ -883,8 +906,17 @@ static bool DumpValue(Stream , const SymbolContext *sc,
}
if (!is_array_range) {
-LLDB_LOGF(log,
- "[Debugger::FormatPrompt] dumping ordinary printable output");
+if (!entry.printf_format.empty()) {
+ if
@@ -658,6 +658,29 @@ static char ConvertValueObjectStyleToChar(
return '\0';
}
+static bool DumpValueWithPrintf(Stream , llvm::StringRef format,
+ValueObject ) {
+ auto type_info = target.GetTypeInfo();
+ if (type_info & eTypeIsInteger) {
kastiglione wrote:
@jimingham I've updated the PR to a non-draft form if you want to check out the
implementation.
https://github.com/llvm/llvm-project/pull/81196
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
kastiglione wrote:
@adrian-prantl good call, done.
https://github.com/llvm/llvm-project/pull/81196
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/kastiglione updated
https://github.com/llvm/llvm-project/pull/81196
>From 81a2034ff2b41e30a1f5b82c86b4d5d4c429ed52 Mon Sep 17 00:00:00 2001
From: Dave Lee
Date: Thu, 8 Feb 2024 13:59:12 -0800
Subject: [PATCH 1/4] [lldb] Support custom printf formatting for variables
---
adrian-prantl wrote:
Should this be documented in `lldb/docs/use/variable.rst` or a similar place on
the website?
https://github.com/llvm/llvm-project/pull/81196
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://github.com/kastiglione updated
https://github.com/llvm/llvm-project/pull/81196
>From 81a2034ff2b41e30a1f5b82c86b4d5d4c429ed52 Mon Sep 17 00:00:00 2001
From: Dave Lee
Date: Thu, 8 Feb 2024 13:59:12 -0800
Subject: [PATCH 1/3] [lldb] Support custom printf formatting for variables
---
https://github.com/kastiglione ready_for_review
https://github.com/llvm/llvm-project/pull/81196
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/kastiglione updated
https://github.com/llvm/llvm-project/pull/81196
>From 81a2034ff2b41e30a1f5b82c86b4d5d4c429ed52 Mon Sep 17 00:00:00 2001
From: Dave Lee
Date: Thu, 8 Feb 2024 13:59:12 -0800
Subject: [PATCH 1/2] [lldb] Support custom printf formatting for variables
---
jimingham wrote:
The way the current FormatEntity strings work, the first `%` says "formatter
coming next" then say `S` is "the kind of formatter" (in this case "return
summary instead of value". So in your case, like:
${var%%1x}
The "kind of formatter" is "%" which seems like a
https://github.com/kastiglione edited
https://github.com/llvm/llvm-project/pull/81196
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/kastiglione edited
https://github.com/llvm/llvm-project/pull/81196
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/kastiglione edited
https://github.com/llvm/llvm-project/pull/81196
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
kastiglione wrote:
Note that the implementation here is a draft for illustration. I am first
interested in high level agreement that allowing custom printf formatting of
variables is good.
https://github.com/llvm/llvm-project/pull/81196
___
https://github.com/kastiglione edited
https://github.com/llvm/llvm-project/pull/81196
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: Dave Lee (kastiglione)
Changes
---
Full diff: https://github.com/llvm/llvm-project/pull/81196.diff
1 Files Affected:
- (modified) lldb/source/Core/FormatEntity.cpp (+23-2)
``diff
diff --git
https://github.com/kastiglione converted_to_draft
https://github.com/llvm/llvm-project/pull/81196
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/kastiglione created
https://github.com/llvm/llvm-project/pull/81196
None
>From 81a2034ff2b41e30a1f5b82c86b4d5d4c429ed52 Mon Sep 17 00:00:00 2001
From: Dave Lee
Date: Thu, 8 Feb 2024 13:59:12 -0800
Subject: [PATCH] [lldb] Support custom printf formatting for variables
---
19 matches
Mail list logo