[Lldb-commits] [lldb] [lldb][X86] Fix setting target features in ClangExpressionParser (PR #82364)

2024-02-20 Thread Daniil Kovalev via lldb-commits
https://github.com/kovdan01 created https://github.com/llvm/llvm-project/pull/82364 Currently, for x86 and x86_64 triples, "+sse" and "+sse2" are appended to `Features` vector of `TargetOptions` unconditionally. This vector is later reset in `TargetInfo::CreateTargetInfo` and filled using info

[Lldb-commits] [lldb] [lldb][X86] Fix setting target features in ClangExpressionParser (PR #82364)

2024-02-20 Thread Daniil Kovalev via lldb-commits
https://github.com/kovdan01 ready_for_review https://github.com/llvm/llvm-project/pull/82364 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix nullptr dereference on running x86 binary with x86-disabled llvm (PR #82603)

2024-02-22 Thread Daniil Kovalev via lldb-commits
https://github.com/kovdan01 created https://github.com/llvm/llvm-project/pull/82603 If `LLVM_TARGETS_TO_BUILD` does not contain `X86` and we try to run an x86 binary in lldb, we get a `nullptr` dereference in `LLVMDisasmInstruction(...)`. We try to call `getDisAsm()` method on a `LLVMDisasmCon

[Lldb-commits] [lldb] [lldb] Fix nullptr dereference on running x86 binary with x86-disabled llvm (PR #82603)

2024-02-22 Thread Daniil Kovalev via lldb-commits
kovdan01 wrote: Please suggest ideas how this could be tested. It looks like that UnwindAssembly unittests is the right place for it - but UnwindAssemblyx86Tests cmake target is not built without X86 in `LLVM_TARGETS_TO_BUILD`, which is the pre-condition of the issue this PR is fixing. https:

[Lldb-commits] [lldb] [lldb] Fix nullptr dereference on running x86 binary with x86-disabled llvm (PR #82603)

2024-02-22 Thread Daniil Kovalev via lldb-commits
https://github.com/kovdan01 ready_for_review https://github.com/llvm/llvm-project/pull/82603 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix nullptr dereference on running x86 binary with x86-disabled llvm (PR #82603)

2024-02-28 Thread Daniil Kovalev via lldb-commits
kovdan01 wrote: > tbh I have no problems with the patch, but I think it's fixing something that > I think should be reconsidered altogether, I'm interested to hear more about > what the use case looks like that led to this being a problem. @jasonmolenda The use case is very simple, describing

[Lldb-commits] [lldb] [lldb][X86] Fix setting target features in ClangExpressionParser (PR #82364)

2024-02-28 Thread Daniil Kovalev via lldb-commits
kovdan01 wrote: > Would this change be observable by a test? @adrian-prantl Theoretically, it should be: in `ClangExpressionParser::ClangExpressionParser`, we try to hardcode sse and sse2 for both x86 and x86_64, while in `X86TargetInfo::initFeatureMap`, sse2 (implying sse) is only hardcoded

[Lldb-commits] [lldb] [lldb] Fix nullptr dereference on running x86 binary with x86-disabled llvm (PR #82603)

2024-02-28 Thread Daniil Kovalev via lldb-commits
kovdan01 wrote: > Can this code be hit when using an x86 core file? Thanks for suggestion! I'll try that and notify here if such approach succeeded. https://github.com/llvm/llvm-project/pull/82603 ___ lldb-commits mailing list lldb-commits@lists.llvm.

[Lldb-commits] [lldb] [lldb][X86] Fix setting target features in ClangExpressionParser (PR #82364)

2024-03-02 Thread Daniil Kovalev via lldb-commits
https://github.com/kovdan01 closed https://github.com/llvm/llvm-project/pull/82364 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [PAC][lldb][Dwarf] Support `__ptrauth`-qualified types in user expressions (PR #84387)

2024-03-07 Thread Daniil Kovalev via lldb-commits
https://github.com/kovdan01 created https://github.com/llvm/llvm-project/pull/84387 Depends on #84384 This adds support for `DW_TAG_LLVM_ptrauth_type` entries corresponding to explicitly signed types (e.g. free function pointers) in lldb user expressions. Applies PR https://github.com/apple/ll

[Lldb-commits] [lldb] [PAC][lldb][Dwarf] Support `__ptrauth`-qualified types in user expressions (PR #84387)

2024-03-07 Thread Daniil Kovalev via lldb-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/84387 >From 728f5644aebfafd2114e7e47a9b83ef057423997 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Tue, 20 Feb 2024 10:57:54 -0800 Subject: [PATCH 1/4] Upstream ptrauth changes to DWARFASTParserClang --- ..

[Lldb-commits] [lldb] [PAC][lldb][Dwarf] Support `__ptrauth`-qualified types in user expressions (PR #84387)

2024-03-07 Thread Daniil Kovalev via lldb-commits
https://github.com/kovdan01 ready_for_review https://github.com/llvm/llvm-project/pull/84387 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix nullptr dereference on running x86 binary with x86-disabled llvm (PR #82603)

2024-03-11 Thread Daniil Kovalev via lldb-commits
kovdan01 wrote: > Can this code be hit when using an x86 core file? Then you could write a > shell test thatis `UNSUPPORTED: x86-registered-target` (whatever the proper > syntax is) and assert that it does not crash. @DavidSpickett The issue is present when loading an x86 core files via `lldb

[Lldb-commits] [lldb] [lldb] Fix nullptr dereference on running x86 binary with x86-disabled llvm (PR #82603)

2024-03-11 Thread Daniil Kovalev via lldb-commits
@@ -0,0 +1,10 @@ +# UNSUPPORTED: x86 kovdan01 wrote: Yes, I've checked that with `X86` in `LLVM_TARGETS_TO_BUILD`, the test becomes unsupported. So, it looks like it's currently OK https://github.com/llvm/llvm-project/pull/82603

[Lldb-commits] [lldb] [lldb] Fix nullptr dereference on running x86 binary with x86-disabled llvm (PR #82603)

2024-03-11 Thread Daniil Kovalev via lldb-commits
kovdan01 wrote: > As this plugin seems related to backtrace perhaps the test should at least > run `bt` and check for the first line of the output. I had similar thoughts, but I'm not sure if placing the test in `lldb/test/Shell/Commands` as `command-backtrace-missing-x86.test` is a nice idea

[Lldb-commits] [lldb] [lldb] Fix nullptr dereference on running x86 binary with x86-disabled llvm (PR #82603)

2024-03-14 Thread Daniil Kovalev via lldb-commits
kovdan01 wrote: @jasonmolenda Just in case you've missed - I've provided the use case description leading to the issue (as you requested) above https://github.com/llvm/llvm-project/pull/82603#issuecomment-1970019956. Would be glad if you let me know if it gives you enough info & if this partic

[Lldb-commits] [lldb] [PAC][lldb][Dwarf] Support `__ptrauth`-qualified types in user expressions (PR #84387)

2024-03-20 Thread Daniil Kovalev via lldb-commits
kovdan01 wrote: A kind reminder regarding the PR - would be glad to see feedback from everyone interested. https://github.com/llvm/llvm-project/pull/84387 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[Lldb-commits] [clang] [lldb] [PAC][lldb][Dwarf] Support `__ptrauth`-qualified types in user expressions (PR #84387)

2024-03-28 Thread Daniil Kovalev via lldb-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/84387 >From 728f5644aebfafd2114e7e47a9b83ef057423997 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Tue, 20 Feb 2024 10:57:54 -0800 Subject: [PATCH 01/10] Upstream ptrauth changes to DWARFASTParserClang ---

[Lldb-commits] [lldb] [PAC][lldb][Dwarf] Support `__ptrauth`-qualified types in user expressions (PR #84387)

2024-03-28 Thread Daniil Kovalev via lldb-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/84387 >From 728f5644aebfafd2114e7e47a9b83ef057423997 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Tue, 20 Feb 2024 10:57:54 -0800 Subject: [PATCH 1/6] Upstream ptrauth changes to DWARFASTParserClang --- ..

[Lldb-commits] [lldb] [PAC][lldb][Dwarf] Support `__ptrauth`-qualified types in user expressions (PR #84387)

2024-03-28 Thread Daniil Kovalev via lldb-commits
@@ -664,6 +685,17 @@ CompilerType CompilerType::GetPointerType() const { return CompilerType(); } +CompilerType +CompilerType::AddPtrAuthModifier(unsigned key, bool isAddressDiscriminated, kovdan01 wrote: > Also, whose this user of this API? I've updated t

[Lldb-commits] [lldb] [PAC][lldb][Dwarf] Support `__ptrauth`-qualified types in user expressions (PR #84387)

2024-03-28 Thread Daniil Kovalev via lldb-commits
@@ -216,6 +216,16 @@ class TypeSystem : public PluginInterface, virtual uint32_t GetPointerByteSize() = 0; + // TODO: are we allowed to insert virtual functions in the middle of the class + // interface and break ABI? kovdan01 wrote: Thanks, deleted TOD

[Lldb-commits] [lldb] [PAC][lldb][Dwarf] Support `__ptrauth`-qualified types in user expressions (PR #84387)

2024-03-28 Thread Daniil Kovalev via lldb-commits
@@ -676,6 +677,62 @@ DWARFASTParserClang::ParseTypeModifier(const SymbolContext &sc, case DW_TAG_volatile_type: encoding_data_type = Type::eEncodingIsVolatileUID; break; + case DW_TAG_LLVM_ptrauth_type: { +DWARFDIE ptr_die = die.GetReferencedDIE(DW_AT_type); ---

[Lldb-commits] [lldb] [lldb] Fix nullptr dereference on running x86 binary with x86-disabled llvm (PR #82603)

2024-03-28 Thread Daniil Kovalev via lldb-commits
kovdan01 wrote: @jasonmolenda Would be glad to see your feedback - see answers to your previous comments above https://github.com/llvm/llvm-project/pull/82603 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[Lldb-commits] [lldb] [lldb] Fix nullptr dereference on running x86 binary with x86-disabled llvm (PR #82603)

2024-04-12 Thread Daniil Kovalev via lldb-commits
kovdan01 wrote: @jasonmolenda A kind reminder regarding the PR - see answers to your previous comments above https://github.com/llvm/llvm-project/pull/82603 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[Lldb-commits] [lldb] [lldb] Fix nullptr dereference on running x86 binary with x86-disabled llvm (PR #82603)

2024-04-15 Thread Daniil Kovalev via lldb-commits
kovdan01 wrote: Thanks @jasonmolenda for your feedback and suggestion! See f96989dd1f832284b74d07d1e457a15a0b16c199 - I've deleted the test with corefile and added the test you've mentioned. Basically, I've just left the most simple test from "normal" `Testx86AssemblyInspectionEngine` and chec

[Lldb-commits] [lldb] [lldb] Fix nullptr dereference on running x86 binary with x86-disabled llvm (PR #82603)

2024-04-15 Thread Daniil Kovalev via lldb-commits
https://github.com/kovdan01 closed https://github.com/llvm/llvm-project/pull/82603 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [PAC][lldb][Dwarf] Support `__ptrauth`-qualified types in user expressions (PR #84387)

2024-04-26 Thread Daniil Kovalev via lldb-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/84387 >From 728f5644aebfafd2114e7e47a9b83ef057423997 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Tue, 20 Feb 2024 10:57:54 -0800 Subject: [PATCH 1/6] Upstream ptrauth changes to DWARFASTParserClang --- ..

[Lldb-commits] [lldb] [PAC][lldb][Dwarf] Support `__ptrauth`-qualified types in user expressions (PR #84387)

2024-04-27 Thread Daniil Kovalev via lldb-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/84387 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [PAC][lldb][Dwarf] Support `__ptrauth`-qualified types in user expressions (PR #84387)

2024-04-30 Thread Daniil Kovalev via lldb-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/84387 >From 728f5644aebfafd2114e7e47a9b83ef057423997 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Tue, 20 Feb 2024 10:57:54 -0800 Subject: [PATCH 1/6] Upstream ptrauth changes to DWARFASTParserClang --- ..

[Lldb-commits] [lldb] [PAC][lldb][Dwarf] Support `__ptrauth`-qualified types in user expressions (PR #84387)

2024-04-30 Thread Daniil Kovalev via lldb-commits
kovdan01 wrote: Merging this previously approved PR since prerequisites are now met https://github.com/llvm/llvm-project/pull/84387 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [PAC][lldb][Dwarf] Support `__ptrauth`-qualified types in user expressions (PR #84387)

2024-04-30 Thread Daniil Kovalev via lldb-commits
https://github.com/kovdan01 closed https://github.com/llvm/llvm-project/pull/84387 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits