[Lldb-commits] [PATCH] D153734: [lldb][LocateModuleCallback] Call locate module callback

2023-07-14 Thread Shubham Sandeep Rastogi via Phabricator via lldb-commits
rastogishubham added a comment.

In D153734#4501034 , @rastogishubham 
wrote:

> I am reverting both fb087c17c8230 
>  and 
> 7f1028e9df52b 
>  to see 
> if the bot becomes green again. I apologize for any incovenience

Okay, so reverting those two changes cause other build failures, and I don't 
think it is a good idea to revert a bunch of changes, I am not sure what a good 
way to disable the test for arm64 is? Since these failures only appear on arm64

Would it be just adding a

  #if !defined(__aarch64__)

to the top of the file work?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153734/new/

https://reviews.llvm.org/D153734

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D153734: [lldb][LocateModuleCallback] Call locate module callback

2023-07-14 Thread Shubham Sandeep Rastogi via Phabricator via lldb-commits
rastogishubham added a comment.

I am reverting both fb087c17c8230 
 and 
7f1028e9df52b 
 to see if 
the bot becomes green again


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153734/new/

https://reviews.llvm.org/D153734

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D153734: [lldb][LocateModuleCallback] Call locate module callback

2023-07-14 Thread Shubham Sandeep Rastogi via Phabricator via lldb-commits
rastogishubham added a comment.

The unit test LocateModuleCallbackTest.cpp is very flaky and is failing on the 
lldb arm64 incremental bot

Notice build https://green.lab.llvm.org/green/view/LLDB/job/as-lldb-cmake/2259/ 
passes
and https://green.lab.llvm.org/green/view/LLDB/job/as-lldb-cmake/2260/ fails, 
even though the changes in 2260 have nothing to do with lldb.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153734/new/

https://reviews.llvm.org/D153734

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D154030: [lldb-vscode] Creating a new flag for adjusting the behavior of evaluation repl expressions to allow users to more easily invoke lldb commands.

2023-07-11 Thread Shubham Sandeep Rastogi via Phabricator via lldb-commits
rastogishubham added a comment.

I am reverting the change for now, I apologize for any inconvenience


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154030/new/

https://reviews.llvm.org/D154030

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D154030: [lldb-vscode] Creating a new flag for adjusting the behavior of evaluation repl expressions to allow users to more easily invoke lldb commands.

2023-07-11 Thread Shubham Sandeep Rastogi via Phabricator via lldb-commits
rastogishubham added a comment.

It looks like this change is breaking some lldb tests. 
https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/57586/consoleFull#-1731262255a1ca8a51-895e-46c6-af87-ce24fa4cd561

- TEST 'lldb-api :: tools/lldb-vscode/console/TestVSCode_console.py' FAILED 


Script:
---

/usr/local/Frameworks/Python.framework/Versions/3.10/bin/python3.10 
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/lldb/test/API/dotest.py
 -u CXXFLAGS -u CFLAGS --codesign-identity lldb_codesign --env 
LLVM_LIBS_DIR=/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/./lib 
--env 
LLVM_INCLUDE_DIR=/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/include
 --env 
LLVM_TOOLS_DIR=/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/./bin 
--libcxx-include-dir 
/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/include/c++/v1 
--libcxx-library-dir 
/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/lib --arch x86_64 
--build-dir 
/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/lldb-test-build.noindex
 --lldb-module-cache-dir 
/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/lldb-test-build.noindex/module-cache-lldb/lldb-api
 --clang-module-cache-dir 
/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/lldb-test-build.noindex/module-cache-clang/lldb-api
 --executable 
/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/./bin/lldb --compiler 
/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/./bin/clang 
--dsymutil 
/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/./bin/dsymutil 
--llvm-tools-dir 
/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/./bin --lldb-libs-dir 
/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/./lib --build-dir 
/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/lldb-test-build.noindex
 -t --env TERM=vt100 
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/lldb/test/API/tools/lldb-vscode/console
 -p TestVSCode_console.py


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154030/new/

https://reviews.llvm.org/D154030

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D150363: [lldb][nfc] Simplify DebugRanges class

2023-05-11 Thread Shubham Sandeep Rastogi via Phabricator via lldb-commits
rastogishubham added inline comments.



Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.h:32
 
-  typedef std::map range_map;
-  typedef range_map::iterator range_map_iterator;
-  typedef range_map::const_iterator range_map_const_iterator;
-  range_map m_range_map;
+  std::map m_range_map;
 };

fdeazeve wrote:
> rastogishubham wrote:
> > Any reason why the name was changed to `m_range_map`?
> It was also `m_range_map` before. Maybe you're confusing it with name of the 
> typedef that got deleted? The diff highlighting here is misleading
Yes you are right, I got a bit confused there, sorry


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150363/new/

https://reviews.llvm.org/D150363

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D150363: [lldb][nfc] Simplify DebugRanges class

2023-05-11 Thread Shubham Sandeep Rastogi via Phabricator via lldb-commits
rastogishubham accepted this revision.
rastogishubham added inline comments.
This revision is now accepted and ready to land.



Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.h:32
 
-  typedef std::map range_map;
-  typedef range_map::iterator range_map_iterator;
-  typedef range_map::const_iterator range_map_const_iterator;
-  range_map m_range_map;
+  std::map m_range_map;
 };

Any reason why the name was changed to `m_range_map`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150363/new/

https://reviews.llvm.org/D150363

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D150228: [lldb][NFCI] Replace dw_form_t with llvm::dwarf::Form

2023-05-09 Thread Shubham Sandeep Rastogi via Phabricator via lldb-commits
rastogishubham accepted this revision.
rastogishubham added a comment.
This revision is now accepted and ready to land.
Herald added a subscriber: JDevlieghere.

Great refactoring!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150228/new/

https://reviews.llvm.org/D150228

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D150222: [lldb][NFCI] Remove custom dwarf LEB128 types

2023-05-09 Thread Shubham Sandeep Rastogi via Phabricator via lldb-commits
rastogishubham accepted this revision.
rastogishubham added a comment.

LGTM!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150222/new/

https://reviews.llvm.org/D150222

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D134817: Remove the dependency between lib/DebugInfoDWARF and MC

2022-12-15 Thread Shubham Sandeep Rastogi via Phabricator via lldb-commits
rastogishubham updated this revision to Diff 483403.
rastogishubham added a comment.

Fix the lldb test failures:

  lldb-shell :: SymbolFile/DWARF/x86/DW_AT_loclists_base.s
  lldb-shell :: SymbolFile/DWARF/x86/debug_loc.s
  lldb-shell :: SymbolFile/DWARF/x86/debug_loc_and_loclists.s
  lldb-shell :: SymbolFile/DWARF/x86/debug_loclists-dwo.s
  lldb-shell :: SymbolFile/DWARF/x86/debug_loclists-dwp.s
  lldb-shell :: SymbolFile/DWARF/x86/dwp.s
  lldb-shell :: SymbolFile/DWARF/x86/unused-inlined-params.test
  lldb-shell :: SymbolFile/NativePDB/inline_sites.test
  lldb-shell :: SymbolFile/NativePDB/local-variables-registers.s
  lldb-shell :: SymbolFile/NativePDB/nested-blocks-same-address.s


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134817/new/

https://reviews.llvm.org/D134817

Files:
  lldb/source/Expression/DWARFExpression.cpp
  lldb/source/Symbol/UnwindPlan.cpp
  lldb/unittests/Symbol/PostfixExpressionTest.cpp
  lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
  llvm/include/llvm/DebugInfo/DIContext.h
  llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
  llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h
  llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h
  llvm/include/llvm/DebugInfo/DWARF/DWARFExpression.h
  llvm/lib/DebugInfo/DWARF/CMakeLists.txt
  llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
  llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
  llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
  llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
  llvm/lib/DebugInfo/DWARF/DWARFExpression.cpp
  llvm/lib/DebugInfo/LogicalView/Readers/LVELFReader.cpp
  llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
  llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
  llvm/tools/llvm-objdump/SourcePrinter.cpp
  llvm/tools/llvm-objdump/SourcePrinter.h
  llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h
  llvm/unittests/DebugInfo/DWARF/DWARFDebugFrameTest.cpp
  llvm/unittests/DebugInfo/DWARF/DWARFExpressionCompactPrinterTest.cpp

Index: llvm/unittests/DebugInfo/DWARF/DWARFExpressionCompactPrinterTest.cpp
===
--- llvm/unittests/DebugInfo/DWARF/DWARFExpressionCompactPrinterTest.cpp
+++ llvm/unittests/DebugInfo/DWARF/DWARFExpressionCompactPrinterTest.cpp
@@ -60,7 +60,17 @@
   raw_string_ostream OS(Result);
   DataExtractor DE(ExprData, true, 8);
   DWARFExpression Expr(DE, 8);
-  Expr.printCompact(OS, *MRI);
+
+  auto GetRegName = [&](uint64_t DwarfRegNum, bool IsEH) -> StringRef {
+if (std::optional LLVMRegNum =
+this->MRI->getLLVMRegNum(DwarfRegNum, IsEH))
+  if (const char *RegName = this->MRI->getName(*LLVMRegNum))
+return llvm::StringRef(RegName);
+OS << "";
+return {};
+  };
+
+  Expr.printCompact(OS, GetRegName);
   EXPECT_EQ(OS.str(), Expected);
 }
 
Index: llvm/unittests/DebugInfo/DWARF/DWARFDebugFrameTest.cpp
===
--- llvm/unittests/DebugInfo/DWARF/DWARFDebugFrameTest.cpp
+++ llvm/unittests/DebugInfo/DWARF/DWARFDebugFrameTest.cpp
@@ -41,7 +41,9 @@
   StringRef ExpectedFirstLine) {
   std::string Output;
   raw_string_ostream OS(Output);
-  TestCIE.dump(OS, DIDumpOptions(), /*MRI=*/nullptr, IsEH);
+  auto DumpOpts = DIDumpOptions();
+  DumpOpts.IsEH = IsEH;
+  TestCIE.dump(OS, DumpOpts);
   OS.flush();
   StringRef FirstLine = StringRef(Output).split('\n').first;
   EXPECT_EQ(FirstLine, ExpectedFirstLine);
@@ -51,7 +53,9 @@
   StringRef ExpectedFirstLine) {
   std::string Output;
   raw_string_ostream OS(Output);
-  TestFDE.dump(OS, DIDumpOptions(), /*MRI=*/nullptr, IsEH);
+  auto DumpOpts = DIDumpOptions();
+  DumpOpts.IsEH = IsEH;
+  TestFDE.dump(OS, DumpOpts);
   OS.flush();
   StringRef FirstLine = StringRef(Output).split('\n').first;
   EXPECT_EQ(FirstLine, ExpectedFirstLine);
Index: llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h
===
--- llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h
+++ llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h
@@ -226,8 +226,9 @@
 W.getOStream() << "\n";
 W.startLine() << "Program:\n";
 W.indent();
-Entry.cfis().dump(W.getOStream(), DIDumpOptions(), nullptr,
-  W.getIndentLevel());
+auto DumpOpts = DIDumpOptions();
+DumpOpts.IsEH = true;
+Entry.cfis().dump(W.getOStream(), DumpOpts, W.getIndentLevel());
 W.unindent();
 W.unindent();
 W.getOStream() << "\n";
Index: llvm/tools/llvm-objdump/SourcePrinter.h
===
--- llvm/tools/llvm-objdump/SourcePrinter.h
+++ llvm/tools/llvm-objdump/SourcePrinter.h
@@ -13,6 +13,7 @@
 #include "llvm/ADT/StringSet.h"
 #include "llvm/DebugInfo/DWARF/DWARFContext.h"
 #include "llvm/DebugInfo/Symbolize/Symbolize.h"
+#include "llvm/MC/MCRegisterInfo.h"
 #include "llvm/MC/MCSubtargetInfo.h"
 #include "llvm/Support/FormattedStream.h"
 #include 
Index: llvm/tools/llvm-objdump/SourcePrinter.cpp

[Lldb-commits] [PATCH] D134817: Remove the dependency between lib/DebugInfoDWARF and MC

2022-12-14 Thread Shubham Sandeep Rastogi via Phabricator via lldb-commits
rastogishubham updated this revision to Diff 483042.
rastogishubham added a comment.
Herald added subscribers: Michael137, JDevlieghere.

I was not able to land this patch earlier because of some bot failures and then 
I got busy with some other stuff, this is just an update of the patch with 
merge conflicts resolved


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134817/new/

https://reviews.llvm.org/D134817

Files:
  lldb/source/Expression/DWARFExpression.cpp
  lldb/source/Symbol/UnwindPlan.cpp
  lldb/unittests/Symbol/PostfixExpressionTest.cpp
  lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
  llvm/include/llvm/DebugInfo/DIContext.h
  llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
  llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h
  llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h
  llvm/include/llvm/DebugInfo/DWARF/DWARFExpression.h
  llvm/lib/DebugInfo/DWARF/CMakeLists.txt
  llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
  llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
  llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
  llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
  llvm/lib/DebugInfo/DWARF/DWARFExpression.cpp
  llvm/lib/DebugInfo/LogicalView/Readers/LVELFReader.cpp
  llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
  llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
  llvm/tools/llvm-objdump/SourcePrinter.cpp
  llvm/tools/llvm-objdump/SourcePrinter.h
  llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h
  llvm/unittests/DebugInfo/DWARF/DWARFDebugFrameTest.cpp
  llvm/unittests/DebugInfo/DWARF/DWARFExpressionCompactPrinterTest.cpp

Index: llvm/unittests/DebugInfo/DWARF/DWARFExpressionCompactPrinterTest.cpp
===
--- llvm/unittests/DebugInfo/DWARF/DWARFExpressionCompactPrinterTest.cpp
+++ llvm/unittests/DebugInfo/DWARF/DWARFExpressionCompactPrinterTest.cpp
@@ -60,7 +60,17 @@
   raw_string_ostream OS(Result);
   DataExtractor DE(ExprData, true, 8);
   DWARFExpression Expr(DE, 8);
-  Expr.printCompact(OS, *MRI);
+
+  auto GetRegName = [&](uint64_t DwarfRegNum, bool IsEH) -> StringRef {
+if (std::optional LLVMRegNum =
+this->MRI->getLLVMRegNum(DwarfRegNum, IsEH))
+  if (const char *RegName = this->MRI->getName(*LLVMRegNum))
+return llvm::StringRef(RegName);
+OS << "";
+return {};
+  };
+
+  Expr.printCompact(OS, GetRegName);
   EXPECT_EQ(OS.str(), Expected);
 }
 
Index: llvm/unittests/DebugInfo/DWARF/DWARFDebugFrameTest.cpp
===
--- llvm/unittests/DebugInfo/DWARF/DWARFDebugFrameTest.cpp
+++ llvm/unittests/DebugInfo/DWARF/DWARFDebugFrameTest.cpp
@@ -41,7 +41,9 @@
   StringRef ExpectedFirstLine) {
   std::string Output;
   raw_string_ostream OS(Output);
-  TestCIE.dump(OS, DIDumpOptions(), /*MRI=*/nullptr, IsEH);
+  auto DumpOpts = DIDumpOptions();
+  DumpOpts.IsEH = IsEH;
+  TestCIE.dump(OS, DumpOpts);
   OS.flush();
   StringRef FirstLine = StringRef(Output).split('\n').first;
   EXPECT_EQ(FirstLine, ExpectedFirstLine);
@@ -51,7 +53,9 @@
   StringRef ExpectedFirstLine) {
   std::string Output;
   raw_string_ostream OS(Output);
-  TestFDE.dump(OS, DIDumpOptions(), /*MRI=*/nullptr, IsEH);
+  auto DumpOpts = DIDumpOptions();
+  DumpOpts.IsEH = IsEH;
+  TestFDE.dump(OS, DumpOpts);
   OS.flush();
   StringRef FirstLine = StringRef(Output).split('\n').first;
   EXPECT_EQ(FirstLine, ExpectedFirstLine);
Index: llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h
===
--- llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h
+++ llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h
@@ -226,8 +226,9 @@
 W.getOStream() << "\n";
 W.startLine() << "Program:\n";
 W.indent();
-Entry.cfis().dump(W.getOStream(), DIDumpOptions(), nullptr,
-  W.getIndentLevel());
+auto DumpOpts = DIDumpOptions();
+DumpOpts.IsEH = true;
+Entry.cfis().dump(W.getOStream(), DumpOpts, W.getIndentLevel());
 W.unindent();
 W.unindent();
 W.getOStream() << "\n";
Index: llvm/tools/llvm-objdump/SourcePrinter.h
===
--- llvm/tools/llvm-objdump/SourcePrinter.h
+++ llvm/tools/llvm-objdump/SourcePrinter.h
@@ -13,6 +13,7 @@
 #include "llvm/ADT/StringSet.h"
 #include "llvm/DebugInfo/DWARF/DWARFContext.h"
 #include "llvm/DebugInfo/Symbolize/Symbolize.h"
+#include "llvm/MC/MCRegisterInfo.h"
 #include "llvm/MC/MCSubtargetInfo.h"
 #include "llvm/Support/FormattedStream.h"
 #include 
Index: llvm/tools/llvm-objdump/SourcePrinter.cpp
===
--- llvm/tools/llvm-objdump/SourcePrinter.cpp
+++ llvm/tools/llvm-objdump/SourcePrinter.cpp
@@ -42,7 +42,17 @@
   DataExtractor Data({LocExpr.Expr.data(), LocExpr.Expr.size()},
  Unit->getContext().isLittleEndian(), 0);
   DWARFExpression Expression(Data, Unit->getAddressByteSize());
-  

[Lldb-commits] [PATCH] D137582: [lldb] Fix issue with re.Pattern availability

2022-11-07 Thread Shubham Sandeep Rastogi via Phabricator via lldb-commits
rastogishubham accepted this revision.
rastogishubham added a comment.
This revision is now accepted and ready to land.

LGTM!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137582/new/

https://reviews.llvm.org/D137582

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D134817: Remove the dependency between lib/DebugInfoDWARF and MC

2022-10-06 Thread Shubham Sandeep Rastogi via Phabricator via lldb-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG0008990479a2: Remove the dependency between 
lib/DebugInfoDWARF and MC. (authored by rastogishubham).
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134817/new/

https://reviews.llvm.org/D134817

Files:
  lldb/source/Expression/DWARFExpression.cpp
  lldb/source/Symbol/UnwindPlan.cpp
  lldb/unittests/Symbol/PostfixExpressionTest.cpp
  lldb/unittests/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpressionTests.cpp
  llvm/include/llvm/DebugInfo/DIContext.h
  llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
  llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h
  llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h
  llvm/include/llvm/DebugInfo/DWARF/DWARFExpression.h
  llvm/lib/DebugInfo/DWARF/CMakeLists.txt
  llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
  llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
  llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
  llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
  llvm/lib/DebugInfo/DWARF/DWARFExpression.cpp
  llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
  llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
  llvm/tools/llvm-objdump/SourcePrinter.cpp
  llvm/tools/llvm-objdump/SourcePrinter.h
  llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h
  llvm/unittests/DebugInfo/DWARF/DWARFDebugFrameTest.cpp
  llvm/unittests/DebugInfo/DWARF/DWARFExpressionCompactPrinterTest.cpp

Index: llvm/unittests/DebugInfo/DWARF/DWARFExpressionCompactPrinterTest.cpp
===
--- llvm/unittests/DebugInfo/DWARF/DWARFExpressionCompactPrinterTest.cpp
+++ llvm/unittests/DebugInfo/DWARF/DWARFExpressionCompactPrinterTest.cpp
@@ -60,7 +60,17 @@
   raw_string_ostream OS(Result);
   DataExtractor DE(ExprData, true, 8);
   DWARFExpression Expr(DE, 8);
-  Expr.printCompact(OS, *MRI);
+
+  auto GetRegName = [&](uint64_t DwarfRegNum, bool IsEH) -> StringRef {
+if (llvm::Optional LLVMRegNum =
+this->MRI->getLLVMRegNum(DwarfRegNum, IsEH))
+  if (const char *RegName = this->MRI->getName(*LLVMRegNum))
+return llvm::StringRef(RegName);
+OS << "";
+return {};
+  };
+
+  Expr.printCompact(OS, GetRegName);
   EXPECT_EQ(OS.str(), Expected);
 }
 
Index: llvm/unittests/DebugInfo/DWARF/DWARFDebugFrameTest.cpp
===
--- llvm/unittests/DebugInfo/DWARF/DWARFDebugFrameTest.cpp
+++ llvm/unittests/DebugInfo/DWARF/DWARFDebugFrameTest.cpp
@@ -41,7 +41,9 @@
   StringRef ExpectedFirstLine) {
   std::string Output;
   raw_string_ostream OS(Output);
-  TestCIE.dump(OS, DIDumpOptions(), /*MRI=*/nullptr, IsEH);
+  auto DumpOpts = DIDumpOptions();
+  DumpOpts.IsEH = IsEH;
+  TestCIE.dump(OS, DumpOpts);
   OS.flush();
   StringRef FirstLine = StringRef(Output).split('\n').first;
   EXPECT_EQ(FirstLine, ExpectedFirstLine);
@@ -51,7 +53,9 @@
   StringRef ExpectedFirstLine) {
   std::string Output;
   raw_string_ostream OS(Output);
-  TestFDE.dump(OS, DIDumpOptions(), /*MRI=*/nullptr, IsEH);
+  auto DumpOpts = DIDumpOptions();
+  DumpOpts.IsEH = IsEH;
+  TestFDE.dump(OS, DumpOpts);
   OS.flush();
   StringRef FirstLine = StringRef(Output).split('\n').first;
   EXPECT_EQ(FirstLine, ExpectedFirstLine);
Index: llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h
===
--- llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h
+++ llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h
@@ -226,8 +226,9 @@
 W.getOStream() << "\n";
 W.startLine() << "Program:\n";
 W.indent();
-Entry.cfis().dump(W.getOStream(), DIDumpOptions(), nullptr,
-  W.getIndentLevel());
+auto DumpOpts = DIDumpOptions();
+DumpOpts.IsEH = true;
+Entry.cfis().dump(W.getOStream(), DumpOpts, W.getIndentLevel());
 W.unindent();
 W.unindent();
 W.getOStream() << "\n";
Index: llvm/tools/llvm-objdump/SourcePrinter.h
===
--- llvm/tools/llvm-objdump/SourcePrinter.h
+++ llvm/tools/llvm-objdump/SourcePrinter.h
@@ -13,6 +13,7 @@
 #include "llvm/ADT/StringSet.h"
 #include "llvm/DebugInfo/DWARF/DWARFContext.h"
 #include "llvm/DebugInfo/Symbolize/Symbolize.h"
+#include "llvm/MC/MCRegisterInfo.h"
 #include "llvm/MC/MCSubtargetInfo.h"
 #include "llvm/Support/FormattedStream.h"
 #include 
Index: llvm/tools/llvm-objdump/SourcePrinter.cpp
===
--- llvm/tools/llvm-objdump/SourcePrinter.cpp
+++ llvm/tools/llvm-objdump/SourcePrinter.cpp
@@ -42,7 +42,16 @@
   DataExtractor Data({LocExpr.Expr.data(), LocExpr.Expr.size()},
  Unit->getContext().isLittleEndian(), 0);
   DWARFExpression Expression(Data, Unit->getAddressByteSize());
-  

[Lldb-commits] [PATCH] D118395: Disable TestLldbGdbServer on Dwarf2 and clang versions below 14

2022-01-27 Thread Shubham Sandeep Rastogi via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rGcd317637708d: Disable TestLldbGdbServer on Dwarf2 and clang 
versions below 14 (authored by rastogishubham).
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118395/new/

https://reviews.llvm.org/D118395

Files:
  lldb/test/API/tools/lldb-server/TestLldbGdbServer.py

Index: lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
===
--- lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
+++ lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
@@ -28,6 +28,8 @@
 
 mydir = TestBase.compute_mydir(__file__)
 
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_thread_suffix_supported(self):
 server = self.connect_to_debug_monitor()
 self.assertIsNotNone(server)
@@ -41,6 +43,8 @@
 self.expect_gdbremote_sequence()
 
 
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_list_threads_in_stop_reply_supported(self):
 server = self.connect_to_debug_monitor()
 self.assertIsNotNone(server)
@@ -52,6 +56,8 @@
 True)
 self.expect_gdbremote_sequence()
 
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<'3 '4'])
 def test_c_packet_works(self):
 self.build()
 procs = self.prep_debug_monitor_and_inferior()
@@ -63,6 +69,8 @@
 self.expect_gdbremote_sequence()
 
 @skipIfWindows # No pty support to test any inferior output
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_inferior_print_exit(self):
 self.build()
 procs = self.prep_debug_monitor_and_inferior(
@@ -76,6 +84,8 @@
 context = self.expect_gdbremote_sequence()
 self.assertIsNotNone(context)
 
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_first_launch_stop_reply_thread_matches_first_qC(self):
 self.build()
 procs = self.prep_debug_monitor_and_inferior()
@@ -91,6 +101,8 @@
 context = self.expect_gdbremote_sequence()
 self.assertEqual(context.get("thread_id_QC"), context.get("thread_id_?"))
 
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_attach_commandline_continue_app_exits(self):
 self.build()
 self.set_inferior_startup_attach()
@@ -116,6 +128,8 @@
 lldbgdbserverutils.process_is_running(
 procs["inferior"].pid, False))
 
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_qRegisterInfo_returns_one_valid_result(self):
 self.build()
 self.prep_debug_monitor_and_inferior()
@@ -133,6 +147,8 @@
 self.assert_valid_reg_info(
 lldbgdbserverutils.parse_reg_info_response(reg_info_packet))
 
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_qRegisterInfo_returns_all_valid_results(self):
 self.build()
 self.prep_debug_monitor_and_inferior()
@@ -146,6 +162,8 @@
 for reg_info in self.parse_register_info_packets(context):
 self.assert_valid_reg_info(reg_info)
 
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_qRegisterInfo_contains_required_generics_debugserver(self):
 self.build()
 self.prep_debug_monitor_and_inferior()
@@ -175,6 +193,8 @@
 # Ensure we have a flags register.
 self.assertIn('flags', generic_regs)
 
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_qRegisterInfo_contains_at_least_one_register_set(self):
 self.build()
 self.prep_debug_monitor_and_inferior()
@@ -215,6 +235,8 @@
 @expectedFailureAll(oslist=["windows"]) # no avx for now.
 @skipIf(archs=no_match(['amd64', 'i386', 'x86_64']))
 @add_test_categories(["llgs"])
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_qRegisterInfo_contains_avx_registers(self):
 self.build()
 self.prep_debug_monitor_and_inferior()
@@ -249,12 +271,16 @@
 # We should have exactly one thread.
 self.assertEqual(len(threads), 1)
 
+@skipIf(compiler="clang", compiler_version=['<', '14.0'])
+@skipIf(dwarf_version=['<', '3'])
 def test_qThreadInfo_contains_thread_launch(self):
 self.build()
 self.set_inferior_startup_launch()
 self.qThreadInfo_contains_thread()