https://github.com/Michael137 commented:
Would be great to have a simpler of getting to the vtable info! I left some nits
Don't see an issue with the the general approach, but i'll let others chime in
https://github.com/llvm/llvm-project/pull/130255
_
@@ -2518,6 +2518,59 @@ StringRef CGDebugInfo::getVTableName(const CXXRecordDecl
*RD) {
return internString("_vptr$", RD->getNameAsString());
}
+// Emit symbol for the debugger that points to the vtable address for
+// the given class. The symbol is named as '_vtable$'.
+//
https://github.com/Michael137 edited
https://github.com/llvm/llvm-project/pull/130255
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Michael137 closed
https://github.com/llvm/llvm-project/pull/127056
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Michael137 wrote:
let me know if you need me to merge this for you
https://github.com/llvm/llvm-project/pull/115005
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Michael137 wrote:
Fixed in `0feb00f17cbaac7428dcb7aed13d903b65974978`
https://github.com/llvm/llvm-project/pull/115005
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Michael137 updated
https://github.com/llvm/llvm-project/pull/133448
>From 732a9b611bb4b6c49a0b4bf1d616870ffa051d8f Mon Sep 17 00:00:00 2001
From: Michael Buch
Date: Fri, 28 Mar 2025 13:29:27 +
Subject: [PATCH 1/2] [clang][Sema] Fix typo in 'offsetof' diagnostics
Before:
https://github.com/Michael137 updated
https://github.com/llvm/llvm-project/pull/133448
>From 732a9b611bb4b6c49a0b4bf1d616870ffa051d8f Mon Sep 17 00:00:00 2001
From: Michael Buch
Date: Fri, 28 Mar 2025 13:29:27 +
Subject: [PATCH 1/3] [clang][Sema] Fix typo in 'offsetof' diagnostics
Before:
https://github.com/Michael137 closed
https://github.com/llvm/llvm-project/pull/133448
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Michael137 edited
https://github.com/llvm/llvm-project/pull/115245
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Michael137 updated
https://github.com/llvm/llvm-project/pull/115245
>From 63ca211312cd9dcbf28d30866a429262b504bdb3 Mon Sep 17 00:00:00 2001
From: Michael Buch
Date: Tue, 5 Nov 2024 00:22:07 +
Subject: [PATCH] Init
---
clang/include/clang/Basic/Attr.td | 7
https://github.com/Michael137 updated
https://github.com/llvm/llvm-project/pull/133448
>From 732a9b611bb4b6c49a0b4bf1d616870ffa051d8f Mon Sep 17 00:00:00 2001
From: Michael Buch
Date: Fri, 28 Mar 2025 13:29:27 +
Subject: [PATCH 1/4] [clang][Sema] Fix typo in 'offsetof' diagnostics
Before:
https://github.com/Michael137 created
https://github.com/llvm/llvm-project/pull/133448
Before:
```
offset of on non-POD type
```
After:
```
offsetof on non-POD type
```
>From 732a9b611bb4b6c49a0b4bf1d616870ffa051d8f Mon Sep 17 00:00:00 2001
From: Michael Buch
Date: Fri, 28 Mar 2025 13:29:27 +0
@@ -2518,6 +2518,59 @@ StringRef CGDebugInfo::getVTableName(const CXXRecordDecl
*RD) {
return internString("_vptr$", RD->getNameAsString());
}
+// Emit symbol for the debugger that points to the vtable address for
+// the given class. The symbol is named as '_vtable$'.
+//
https://github.com/Michael137 approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/130255
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Michael137 edited
https://github.com/llvm/llvm-project/pull/130255
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2518,6 +2518,57 @@ StringRef CGDebugInfo::getVTableName(const CXXRecordDecl
*RD) {
return internString("_vptr$", RD->getNameAsString());
}
+// Emit symbol for the debugger that points to the vtable address for
+// the given class. The symbol is named as '_vtable$'.
+//
https://github.com/Michael137 updated
https://github.com/llvm/llvm-project/pull/142164
>From 662e07aa9bb6560f37c079ba6f13be17e7885b48 Mon Sep 17 00:00:00 2001
From: Michael Buch
Date: Fri, 30 May 2025 15:44:09 +0100
Subject: [PATCH 1/6] [clang][Frontend] Add overload to ASTPrinter that doesn't
https://github.com/Michael137 closed
https://github.com/llvm/llvm-project/pull/142163
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -124,7 +124,7 @@ static void resolveTopLevelMetadata(llvm::Function *Fn,
auto *DIS = Fn->getSubprogram();
if (!DIS)
return;
- auto *NewDIS = DIS->replaceWithDistinct(DIS->clone());
+ auto *NewDIS = llvm::MDNode::replaceWithDistinct(DIS->clone());
M
@@ -912,29 +912,14 @@ void coro::BaseCloner::create() {
assert(SP != OrigF.getSubprogram() && SP->isDistinct());
updateScopeLine(ActiveSuspend, *SP);
-// Update the linkage name to reflect the modified symbol name. It
-// is necessary to update the linkage name
https://github.com/Michael137 approved this pull request.
LGTM
The LLDB test failure seems expected. The demangled frame name changed
https://github.com/llvm/llvm-project/pull/141889
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://list
@@ -4041,7 +4133,8 @@ void CodeGenFunction::EmitUnreachable(SourceLocation Loc)
{
void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked,
SanitizerHandler CheckHandlerID,
-bool NoMerge) {
+
https://github.com/Michael137 edited
https://github.com/llvm/llvm-project/pull/143758
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4051,6 +4144,14 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked,
llvm::BasicBlock *&TrapBB = TrapBBs[CheckHandlerID];
+ llvm::DILocation *TrapLocation = Builder.getCurrentDebugLocation();
+ llvm::StringRef Category = GetTrapMessageForHandler(CheckHandlerID
https://github.com/Michael137 edited
https://github.com/llvm/llvm-project/pull/143758
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,16 @@
+// RUN: %clang -O0 -g -debug-info-kind=standalone -dwarf-version=5
-fsanitize=undefined \
+// RUN: -fsanitize-trap=undefined -emit-llvm -S -c %s -o - | FileCheck %s
+
+void target() { }
+
+int function_type_mismatch() {
+int (*fp_int)(int);
+
+fp_int = (
Michael137 wrote:
> While logically correct I think we might have to teach LLDB how to handle
> this. LLDB has a special "frame recognizer" where it looks for frames using
> this fake debug info mechanism (e.g. __builtin_verbose_trap) and it assumes
> the frame below it is the real source code
https://github.com/Michael137 updated
https://github.com/llvm/llvm-project/pull/142164
>From 662e07aa9bb6560f37c079ba6f13be17e7885b48 Mon Sep 17 00:00:00 2001
From: Michael Buch
Date: Fri, 30 May 2025 15:44:09 +0100
Subject: [PATCH 1/6] [clang][Frontend] Add overload to ASTPrinter that doesn't
https://github.com/Michael137 closed
https://github.com/llvm/llvm-project/pull/142164
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Michael137 created
https://github.com/llvm/llvm-project/pull/142163
We're planning on using the ASTPrinter in LLDB for AST dumping. But it
currently takes the output stream via `unique_ptr`. In LLDB we don't have the
output stream available in this form and instead it would
https://github.com/Michael137 edited
https://github.com/llvm/llvm-project/pull/142164
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Michael137 edited
https://github.com/llvm/llvm-project/pull/142164
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Michael137 created
https://github.com/llvm/llvm-project/pull/142164
Depends on https://github.com/llvm/llvm-project/pull/142163
This patch makes the `-ast-dump-filter` Clang option available to the
`target modules dump ast` command. This allows us to selectively dump
parts of
Michael137 wrote:
thanks for the quick review!
https://github.com/llvm/llvm-project/pull/142163
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2235,11 +2235,22 @@ class CommandObjectTargetModulesDumpClangAST
: CommandObjectTargetModulesModuleAutoComplete(
interpreter, "target modules dump ast",
"Dump the clang ast for a given module's symbol file.",
-//"target modules dump
@@ -2235,11 +2235,22 @@ class CommandObjectTargetModulesDumpClangAST
: CommandObjectTargetModulesModuleAutoComplete(
interpreter, "target modules dump ast",
"Dump the clang ast for a given module's symbol file.",
-//"target modules dump
@@ -8511,8 +8512,16 @@ TypeSystemClang::dump(lldb::opaque_compiler_type_t type)
const {
}
#endif
-void TypeSystemClang::Dump(llvm::raw_ostream &output) {
- GetTranslationUnitDecl()->dump(output);
+void TypeSystemClang::Dump(llvm::raw_ostream &output,
+
@@ -8511,8 +8512,16 @@ TypeSystemClang::dump(lldb::opaque_compiler_type_t type)
const {
}
#endif
-void TypeSystemClang::Dump(llvm::raw_ostream &output) {
- GetTranslationUnitDecl()->dump(output);
+void TypeSystemClang::Dump(llvm::raw_ostream &output,
+
https://github.com/Michael137 updated
https://github.com/llvm/llvm-project/pull/142164
>From 662e07aa9bb6560f37c079ba6f13be17e7885b48 Mon Sep 17 00:00:00 2001
From: Michael Buch
Date: Fri, 30 May 2025 15:44:09 +0100
Subject: [PATCH 1/5] [clang][Frontend] Add overload to ASTPrinter that doesn't
https://github.com/Michael137 updated
https://github.com/llvm/llvm-project/pull/142164
>From 662e07aa9bb6560f37c079ba6f13be17e7885b48 Mon Sep 17 00:00:00 2001
From: Michael Buch
Date: Fri, 30 May 2025 15:44:09 +0100
Subject: [PATCH 1/4] [clang][Frontend] Add overload to ASTPrinter that doesn't
https://github.com/Michael137 updated
https://github.com/llvm/llvm-project/pull/142164
>From 662e07aa9bb6560f37c079ba6f13be17e7885b48 Mon Sep 17 00:00:00 2001
From: Michael Buch
Date: Fri, 30 May 2025 15:44:09 +0100
Subject: [PATCH 1/3] [clang][Frontend] Add overload to ASTPrinter that doesn't
https://github.com/Michael137 commented:
LGTM (modulo the question about one of the message strings)
I'll let @delcypher comment on whether all his concerns have been addressed
https://github.com/llvm/llvm-project/pull/145967
___
cfe-commits mailing l
@@ -85,6 +85,94 @@ enum VariableTypeDescriptorKind : uint16_t {
//Miscellaneous Helper Methods
//======//
+static llvm::StringRef GetUBSanTrapForHandler(SanitizerHandler ID) {
+ switch
@@ -4051,6 +4141,14 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked,
llvm::BasicBlock *&TrapBB = TrapBBs[CheckHandlerID];
+ llvm::DILocation *TrapLocation = Builder.getCurrentDebugLocation();
+ llvm::StringRef TrapMessage = GetUBSanTrapForHandler(CheckHandlerI
Michael137 wrote:
> Crash report from clang/test/CodeGen/cfi-check-fail-debuginfo.c:
>
> ```
> PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/
> and include the crash backtrace, preprocessed source, and associated run
> script.
> Stack dump:
> 0.Program arguments
Michael137 wrote:
This broke the LLDB CI:
```
13:02:41
/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp:834:59:
error: too few arguments to function call, expected 3, have 2
13:02:41
https://github.com/Michael137 deleted
https://github.com/llvm/llvm-project/pull/145967
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4051,6 +4141,14 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked,
llvm::BasicBlock *&TrapBB = TrapBBs[CheckHandlerID];
+ llvm::DILocation *TrapLocation = Builder.getCurrentDebugLocation();
+ llvm::StringRef TrapMessage = GetUBSanTrapForHandler(CheckHandlerI
https://github.com/Michael137 edited
https://github.com/llvm/llvm-project/pull/145967
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Michael137 wrote:
Yea I think what we need is to just set the current DebugLocation. We usually
do this using `ApplyDebugLocation::CreateArtificial` so that the artificial
function we're generating has some artificial debug-location.
When I do this in `EmitCfiCheckFail` the crash disappears an
Michael137 wrote:
> I'm not sure if I should update
> `llvm/include/llvm/Testing/Demangle/DemangleTestCases.inc` and
> `libcxxabi/test/DemangleTestCases.inc`.
Why would you need to? There are no changes to mangling/demangling here AFAICT
https://github.com/llvm/llvm-project/pull/148195
__
Michael137 wrote:
> What is debug info size impact?
Realistically this will add a few more abbreviations into `.debug_abbrev` and
only a few extra bytes per-UBSAN trap (abbreviation code + 1 ULEB128 for the
index into the string offset table) into `.debug_info`. The rest of the
`DW_TAG_subpro
Michael137 wrote:
Yea this even works when the typedef is not template-dependent but used outside
of the class only:
```
template
struct Y {
typedef int outside;
int o;
};
Y<> y;
501 - 554 of 554 matches
Mail list logo