spyffe created this revision.
Many times a user wants to access a type when there's a variable of the same
name, or a variable when there's a type of the same name. Depending on the
precise context, currently the expression parser can fail to resolve one or the
other.
This is because `ClangEx
spyffe created this revision.
spyffe added a project: LLDB.
LLDB uses `clang::DeclContext`s for lookups, and variables get put into the
`DeclContext` for their //abstract origin//. (The abstract origin is a DWARF
pointer that indicates the unique definition of inlined code.) When the
expressi
spyffe added inline comments.
Comment at: source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:3723-3742
+static DWARFDIE FindAnyChildWithAbstractOrigin(const DWARFDIE &context) {
+ for (DWARFDIE candidate = context.GetFirstChild(); candidate.IsValid();
+ candidate = ca
This revision was automatically updated to reflect the committed changes.
Closed by commit rL301263: [DWARF] Fix lookup in the abstract origins of
inlined blocks/functions (authored by spyffe).
Changed prior to commit:
https://reviews.llvm.org/D32375?vs=96229&id=96477#toc
Repository:
rL LLVM
spyffe closed this revision.
spyffe added a comment.
Closed by r301273
https://reviews.llvm.org/D32100
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
spyffe created this revision.
Templates can end in parameter packs, like this
template struct MyStruct { /*...*/ };
LLDB does not currently support these parameter packs; it does not emit them
into the template argument list at all. This causes problems when you
specialize, e.g.:
templa
spyffe created this revision.
`ptr_refs` exposed a problem in ClangASTContext's implementation; it uses an
accessor to convert a `QualType` into an `ObjCObjectPointerType`, but the
accessor is not fully general. `getAs()` is the safer way to go.
I've added a test case that uses `ptr_refs` in a
spyffe created this revision.
When it resolved symbol-only variables, the expression parser currently looks
only in the global module list. It should prefer the current module.
I've fixed that behavior by making it search the current module first, and only
search globally if it finds nothing.
spyffe added a comment.
I also would flip 2 and 3. I'll give this a shot.
https://reviews.llvm.org/D33083
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
spyffe updated this revision to Diff 98672.
spyffe added a comment.
Improved symbol lookup per Greg and Jim's suggestion, with flipped steps 2 and
3.
Also added testing for the error case.
https://reviews.llvm.org/D33083
Files:
packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Makefil
This revision was automatically updated to reflect the committed changes.
Closed by commit rL302833: [DWARF parser] Produce correct template parameter
packs (authored by spyffe).
Changed prior to commit:
https://reviews.llvm.org/D33025?vs=98388&id=98687#toc
Repository:
rL LLVM
https://revie
spyffe updated this revision to Diff 99052.
spyffe marked an inline comment as done.
spyffe added a comment.
Updated the Makefile to fix a problem caught by Pavel Labath.
Also relocated the new test to lang/objc.
https://reviews.llvm.org/D33077
Files:
packages/Python/lldbsuite/test/lang/objc/
spyffe closed this revision.
spyffe added a comment.
Committed r303110.
https://reviews.llvm.org/D33077
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
spyffe updated this revision to Diff 99084.
spyffe added a comment.
Two changes after Greg and Pavel's suggestions:
- Moved the symbol lookup function into the global context; and
- Rewrote the test case's build system to be more generic.
https://reviews.llvm.org/D33083
Files:
include/lldb/S
spyffe updated this revision to Diff 99186.
spyffe added a comment.
Updated to reflect Pavel Labath's suggestions:
- Used `CFLAGS_NO_DEBUG` where appropriate
- Marked the testcase as having no debug info variants
https://reviews.llvm.org/D33083
Files:
include/lldb/Symbol/SymbolContext.h
pa
spyffe updated this revision to Diff 99211.
spyffe added a comment.
Used `CFLAGS_EXTRAS` instead of `CFLAGS` at Greg Clayton's suggestion.
https://reviews.llvm.org/D33083
Files:
include/lldb/Symbol/SymbolContext.h
packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Makefile
packages/
This revision was automatically updated to reflect the committed changes.
Closed by commit rL303223: [Expression parser] Look up module symbols before
hunting globally (authored by spyffe).
Changed prior to commit:
https://reviews.llvm.org/D33083?vs=99211&id=99227#toc
Repository:
rL LLVM
ht
spyffe created this revision.
When parsing types originating in modules, it is possible to encounter
`AttributedType`s (such as the type generated for `NSString *_Nonnull`). Some
of LLDB's `ClangASTContext` methods deal with them; others do not. In
particular, one function that did not was `G
spyffe added a comment.
`ModifiedType` gets assigned during construction and `getModifiedType()` is
just an accessor, so if that is `nullptr` something very bad is happening. We
should not expect that except in case of a parser bug of some sort.
`AttributedType` checks that a `Type*` is an `At
This revision was automatically updated to reflect the committed changes.
Closed by commit rL304510: [TypeSystem] Handle Clang AttributedTypes (authored
by spyffe).
Changed prior to commit:
https://reviews.llvm.org/D33812?vs=101140&id=101158#toc
Repository:
rL LLVM
https://reviews.llvm.org/
spyffe created this revision.
`s_source_map` in `ClangExternalASTSourceCommon.cpp` is unguarded and therefore
can break in multithreaded conditions. This can cause crashes in particular if
multiple targets are being set up at once.
This patch wraps `s_source_map` in a function that ensures exc
spyffe added a comment.
Responded to Lang's comments inline.
**Jim**: you say this patch "doesn't actually enforce that you take the lock to
get the SourceMap." How do you get the source map otherwise? It's static
inside the function so nothing can see it outside. Do you mean that it's still
spyffe updated this revision to Diff 106087.
spyffe added a comment.
Upon reflection, it's not worth coming up with a new pattern if
- that pattern does not considerably reduce the incidence of bugs in the source
file I'm applying it in (and indeed that seems quite unlikely), and
- that pattern
This revision was automatically updated to reflect the committed changes.
Closed by commit rL308993: [TypeSystem] Guard the global `ASTSourceMap` with a
mutex (authored by spyffe).
Changed prior to commit:
https://reviews.llvm.org/D35083?vs=106087&id=108116#toc
Repository:
rL LLVM
https://r
spyffe created this revision.
spyffe added a project: LLDB.
Herald added subscribers: arichardson, aprantl, sdardis.
The IR dynamic checks are self-contained functions whose job is to
- verify that pointers referenced in an expression are valid at runtime; and
- verify that selectors sent to Obje
spyffe marked 5 inline comments as done.
spyffe added a comment.
Thank you. I am testing a new revision with your suggestions.
Repository:
rL LLVM
https://reviews.llvm.org/D38153
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://l
spyffe updated this revision to Diff 116444.
spyffe added a comment.
Applied Greg's and Zachary's suggestions:
- Used `R"(...)"` for multiline strings.
- Used `StringRef`s appropriately.
- Factored out symbol-ignoring into a function shared between `ClangASTSource`
and `ClangExpressionDeclMap`.
spyffe abandoned this revision.
spyffe added a comment.
Committed as LLDB r314225
Repository:
rL LLVM
https://reviews.llvm.org/D38153
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-co
This revision was automatically updated to reflect the committed changes.
Closed by commit rL314225: [Expression Parser] Inhibit global lookups for
symbols in the IR dynamic checks (authored by spyffe).
Changed prior to commit:
https://reviews.llvm.org/D38153?vs=116444&id=116727#toc
Repository
spyffe created this revision.
spyffe added a reviewer: jingham.
spyffe added a subscriber: LLDB.
spyffe set the repository for this revision to rL LLVM.
We have a longstanding issue where the expression parser does not handle wide
CFStrings (e.g., `@"凸凹"`) correctly, producing the useless error m
spyffe updated this revision to Diff 79935.
spyffe added a comment.
Updated to reflect Jim's comments.
Repository:
rL LLVM
https://reviews.llvm.org/D27291
Files:
packages/Python/lldbsuite/test/lang/objc/unicode-string/TestUnicodeString.py
packages/Python/lldbsuite/test/lang/objc/unicode-
spyffe added a subscriber: aprantl.
spyffe added a comment.
How does Clang-emitted debug information express the region in which a type is
declared if it has been moved to the containing Decl? I'm thinking
specifically of this case:
int foo() {
return
[]() { struct A { int a; } a1;
32 matches
Mail list logo