Comments (7)
Please share the error being encountered.
from llvm-mctoll.
Please share the error being encountered.
I receive expected unqualifield-id error.
/home/llvm-mctoll/llvm/tools/llvm-mctoll/Raiser/IncludedFileInfo.cpp:51:11: error: expected unqualified-id
llvm::setCurrentDebugType(DEBUG_TYPE);
/home/llvm-mctoll/llvm/include/llvm/Support/Debug.h:70:32: note: expanded from macro 'setCurrentDebugType'
#define setCurrentDebugType(X) do { (void)(X); } while (false)
/home/llvm-mctoll/llvm/tools/llvm-mctoll/Raiser/IncludedFileInfo.cpp:47:22: warning: private field 'Context' is not used [-Wunused-private-field]
clang::ASTContext &Context;
^
1 warning and 1 error generated.
gmake[3]: *** [tools/llvm-mctoll/Raiser/CMakeFiles/mctollRaiser.dir/build.make:90: tools/llvm-mctoll/Raiser/CMakeFiles/mctollRaiser.dir/IncludedFileInfo.cpp.o] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:81628: tools/llvm-mctoll/Raiser/CMakeFiles/mctollRaiser.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:81490: tools/llvm-mctoll/CMakeFiles/llvm-mctoll.dir/rule] Error 2
gmake: *** [Makefile:18376: llvm-mctoll] Error 2
from llvm-mctoll.
I comment the line and get the same error in another place.
And I comment it again.
/home/llvm-mctoll/llvm/tools/llvm-mctoll/llvm-mctoll.cpp:1589:9: error: expected unqualified-id
llvm::setCurrentDebugType(DEBUG_TYPE);
^
/home/llvm-mctoll/llvm/include/llvm/Support/Debug.h:70:32: note: expanded from macro 'setCurrentDebugType'
#define setCurrentDebugType(X) do { (void)(X); } while (false)
^
1 warning and 1 error generated.
gmake[3]: *** [tools/llvm-mctoll/CMakeFiles/llvm-mctoll.dir/build.make:76: tools/llvm-mctoll/CMakeFiles/llvm-mctoll.dir/llvm-mctoll.cpp.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
gmake[2]: *** [CMakeFiles/Makefile2:81483: tools/llvm-mctoll/CMakeFiles/llvmmctoll.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:81490: tools/llvm-mctoll/CMakeFiles/llvm-mctoll.dir/rule] Error 2
gmake: *** [Makefile:18376: llvm-mctoll] Error 2
In the end, I get following result.
[100%] Linking CXX executable ../../bin/llvm-mctoll
/usr/bin/ld: ../../lib/libmctollX86Raiser.a(X86MachineInstructionRaiser.cpp.o): in function `llvm::mctoll::X86MachineInstructionRaiser::raiseBinaryOpRegToRegMachineInstr(llvm::MachineInstr const& )':
X86MachineInstructionRaiser.cpp:(.text._ZN4llvm6mctoll27X86MachineInstructionRaiser33raiseBinaryOpRegToRegMachineInstrERKNS_12MachineInstrE+0x26ec): undefined reference to `llvm::MachineInstr::dump() const' /usr/bin/ld: X86MachineInstructionRaiser.cpp:(.text._ZN4llvm6mctoll27X86MachineInstructionRaiser33raiseBinaryOpRegToRegMachineInstrERKNS_12MachineInstrE+0x2895): undefined reference to `llvm::Mac
hineInstr::dump() const'
/usr/bin/ld: X86MachineInstructionRaiser.cpp:(.text._ZN4llvm6mctoll27X86MachineInstructionRaiser33raiseBinaryOpRegToRegMachineInstrERKNS_12MachineInstrE+0x289d): undefined reference to `llvm::Mac
hineInstr::dump() const'
/usr/bin/ld: ../../lib/libmctollX86Raiser.a(X86MachineInstructionRaiser.cpp.o): in function `llvm::mctoll::X86MachineInstructionRaiser::raiseBinaryOpMemToRegInstr(llvm::MachineInstr const&, llvm::Value*)':X86MachineInstructionRaiser.cpp:(.text._ZN4llvm6mctoll27X86MachineInstructionRaiser26raiseBinaryOpMemToRegInstrERKNS_12MachineInstrEPNS_5ValueE+0x199a): undefined reference to `llvm::MachineInstr
::dump() const'
/usr/bin/ld: ../../lib/libmctollX86Raiser.a(X86MachineInstructionRaiser.cpp.o): in function `llvm::mctoll::X86MachineInstructionRaiser::raiseCallMachineInstr(llvm::MachineInstr const&)':
X86MachineInstructionRaiser.cpp:(.text._ZN4llvm6mctoll27X86MachineInstructionRaiser21raiseCallMachineInstrERKNS_12MachineInstrE+0x1603): undefined reference to `llvm::Type::dump() const'
/usr/bin/ld: ../../lib/libmctollX86Raiser.a(X86MachineInstructionRaiserSSE.cpp.o): in function `llvm::mctoll::X86MachineInstructionRaiser::raiseSSEConvertPrecisionMachineInstr(llvm::MachineInstr const&)':
X86MachineInstructionRaiserSSE.cpp:(.text._ZN4llvm6mctoll27X86MachineInstructionRaiser36raiseSSEConvertPrecisionMachineInstrERKNS_12MachineInstrE+0x282): undefined reference to `llvm::MachineInstr::dump() const'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[3]: *** [tools/llvm-mctoll/CMakeFiles/llvm-mctoll.dir/build.make:258: bin/llvm-mctoll] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:81483: tools/llvm-mctoll/CMakeFiles/llvm-mctoll.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:81490: tools/llvm-mctoll/CMakeFiles/llvm-mctoll.dir/rule] Error 2
gmake: *** [Makefile:18376: llvm-mctoll] Error 2
from llvm-mctoll.
Thanks. I'll take a look as soon as I get a chance. In the meantime, can you make sure that the tip of your llvm-project
tree matches the commit listed in llvm-project-git-commit-to-use.txt
.
from llvm-mctoll.
Thanks. I'll take a look as soon as I get a chance. In the meantime, can you make sure that the tip of your
llvm-project
tree matches the commit listed inllvm-project-git-commit-to-use.txt
.
Thanks. Yes, I'm sure llvm-project
tree matches the commit listed in llvm-project-git-commit-to-use.txt
because I compiled the mctoll project many times and only failed when disable assertions.
from llvm-mctoll.
Can you please try
- applying the following patch
diff --git a/Raiser/IncludedFileInfo.cpp b/Raiser/IncludedFileInfo.cpp
index 9b9e1e9..e3d4ca2 100644
--- a/Raiser/IncludedFileInfo.cpp
+++ b/Raiser/IncludedFileInfo.cpp
@@ -48,7 +48,9 @@ class FuncDeclVisitor : public clang::RecursiveASTVisitor<FuncDeclVisitor> {
public:
FuncDeclVisitor(clang::ASTContext &Context) : Context(Context) {
+#ifndef NDEBUG
llvm::setCurrentDebugType(DEBUG_TYPE);
+#endif
}
bool VisitFunctionDecl(clang::FunctionDecl *FuncDecl) {
diff --git a/llvm-mctoll.cpp b/llvm-mctoll.cpp
index ecea0fb..77c5a3a 100644
--- a/llvm-mctoll.cpp
+++ b/llvm-mctoll.cpp
@@ -1585,8 +1584,9 @@ int main(int argc, char **argv) {
// Disassemble contents of .text section.
Disassemble = true;
FilterSections.push_back(".text");
-
+#ifndef NDEBUG
llvm::setCurrentDebugType(DEBUG_TYPE);
+#endif
std::for_each(InputFNames.begin(), InputFNames.end(), dumpInput);
return EXIT_SUCCESS;
- followed by configuring the build using the following command?
cmake -S llvm -B <build-dir> -G "Ninja" \
-DLLVM_TARGETS_TO_BUILD="X86;ARM" \
-DLLVM_ENABLE_PROJECTS="clang;lld" \
-DCLANG_DEFAULT_PIE_ON_LINUX=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_DUMP=true
Thanks!
from llvm-mctoll.
Can you please try
- applying the following patch
diff --git a/Raiser/IncludedFileInfo.cpp b/Raiser/IncludedFileInfo.cpp index 9b9e1e9..e3d4ca2 100644 --- a/Raiser/IncludedFileInfo.cpp +++ b/Raiser/IncludedFileInfo.cpp @@ -48,7 +48,9 @@ class FuncDeclVisitor : public clang::RecursiveASTVisitor<FuncDeclVisitor> { public: FuncDeclVisitor(clang::ASTContext &Context) : Context(Context) { +#ifndef NDEBUG llvm::setCurrentDebugType(DEBUG_TYPE); +#endif } bool VisitFunctionDecl(clang::FunctionDecl *FuncDecl) { diff --git a/llvm-mctoll.cpp b/llvm-mctoll.cpp index ecea0fb..77c5a3a 100644 --- a/llvm-mctoll.cpp +++ b/llvm-mctoll.cpp @@ -1585,8 +1584,9 @@ int main(int argc, char **argv) { // Disassemble contents of .text section. Disassemble = true; FilterSections.push_back(".text"); - +#ifndef NDEBUG llvm::setCurrentDebugType(DEBUG_TYPE); +#endif std::for_each(InputFNames.begin(), InputFNames.end(), dumpInput); return EXIT_SUCCESS;
- followed by configuring the build using the following command?
cmake -S llvm -B <build-dir> -G "Ninja" \ -DLLVM_TARGETS_TO_BUILD="X86;ARM" \ -DLLVM_ENABLE_PROJECTS="clang;lld" \ -DCLANG_DEFAULT_PIE_ON_LINUX=OFF \ -DCMAKE_BUILD_TYPE=Release \ -DLLVM_ENABLE_DUMP=true
Thanks!
THX a lot! It works!
from llvm-mctoll.
Related Issues (20)
- Unable to raise arm binary containing an array HOT 3
- Adapt mctoll to use Opaque pointers HOT 1
- This repo is missing important files
- Unknown prototype for function : _ZNSaIcEC1Ev HOT 1
- Failing to lift binaries HOT 2
- TEST8rr instruction failing to lift properly HOT 1
- Failed to lift binary (core dumped) HOT 1
- Failed to lift simple ARM binary HOT 1
- Build without LLVM source? HOT 1
- Supported LLVM version HOT 1
- assert failed at X86FuncPrototypeDiscovery.cpp:227 HOT 2
- Does Mctoll Translator support Weak Memory Model Architectures ? HOT 1
- Error while lifting. HOT 6
- Error when lifting. HOT 1
- is this project still on-going? HOT 1
- i need to install llvm mctoll HOT 3
- generate invalid llir instructions HOT 4
- Cannot get step #4 to work HOT 1
- [x86] pointer type support HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from llvm-mctoll.