search for: getfilename

Displaying 20 results from an estimated 50 matches for "getfilename".

2002 Oct 10
0
GetFileName 95 Flag
I recently installed wine successfully and installed my application.every time I use the application's dialog box to browse for a file I get the following error Flag GetFileName 95.Ideas on how to fix this.I am using wine version 20021007. Thanks Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.winehq.org/pipermail/wine-users/attachments/20021010/d1efc32d/attachment.html
2017 Jun 09
2
Get segfault with ModulePass
...loc; for (auto &F : M) { for (auto &B : F) { for (auto &I : B) { errs() << "op_code: " << I.getOpcodeName() << '\n'; loc = I.getDebugLoc(); if (loc != nullptr) { errs() << "file: " << loc->getFilename() << '\n'; } for (const auto& use : I.uses()) { if (const CallInst* c = dyn_cast<CallInst>(use.getUser())) { const Function* f = c->getCalledFunction(); if (f != nullptr) { for (unsigned i = 0; i < c->getNumArgOperands();...
2009 Apr 30
2
[LLVMdev] Pulling line number/file/path information from DbgStopPointInst instructions
Hmm... if I do a print() on the result of getFileName(), I get i8 * getelementptr ([9 x i8]* @.str, i32 0, i32 0) back, but if I try to dyn_cast this to GetElementPtrInst it fails (returning null), so presumably I'm seeing a GetElementPtrConstantExpr... so how can I get at that constant i8 array without casting to a GetElementPtrInst, and...
2015 Nov 04
2
how to add the location debug info for each instruction
> On Nov 3, 2015, at 5:00 PM, Hui Zhang <wayne.huizhang at gmail.com> wrote: > > Hello, > > I found a weird thing in llvm 3.3: > > For exactly the same MDNode *space, if I cast it to DILocation loc(space) and call loc.getFileName(), or I cast it to DIScope sco(space) and call sco.getFilename(), the return value would be different ! Totally two different files > > I don't know if it's a bug or why it is happening like this, and what's the conceptual difference between these two classes: DIScope and DIL...
2015 Aug 06
2
[LLVMdev] DebugInfo from LLVM Instruction
...tract the debug information from an LLVM Instruction in the following way: if (MDNode *N = I->getMetadata("dbg")) { // Here I is an LLVM instruction DILocation Loc(N); // DILocation is in DebugInfo.h unsigned Line = Loc.getLineNumber(); StringRef File = Loc.getFilename(); StringRef Dir = Loc.getDirectory(); } As specified also at http://llvm.org/docs/SourceLevelDebugging.html <http://llvm.org/docs/SourceLevelDebugging.html> However, looks like that the instruction " DILocation Loc(N);” is not valid anymore, Since the DILocation class is changed. I...
2009 Apr 30
2
[LLVMdev] Pulling line number/file/path information from DbgStopPointInst instructions
...nstructions to my own entry points in an opt pass, but it's currently failing to get the file name and path back, though it is still correctly getting line numbers. If you happen to have a code fragment that is known to work, it would be much appreciated. What it used to work was calling getFileName()->getNameStr() on the DbgStopPointInst, which returned a std::string, but in LLVM 2.5 the code compiles, but that string is empty. Any clues? [s]
2010 Jul 07
2
[LLVMdev] source line number for instruction
...at http://llvm.org/docs/SourceLevelDebugging.html#ccxx_frontend: if (MDNode *N = I->getMetadata("dbg")) { // Here I is an LLVM instruction DILocation Loc(N); // DILocation is in DebugInfo.h unsigned Line = Loc.getLineNumber(); StringRef File = Loc.getFilename(); StringRef Dir = Loc.getDirectory(); } Does this also work for release 2.7? I did not see the same thing at the documentation for release 2.7. Thanks, Guoliang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/att...
2012 Feb 28
0
[LLVMdev] Getting corresponding c-instruction line number along with ir-instruction in a function's CFG
...tion. Out << " "; if (MDNode *N = I.getMetadata("dbg")) { // Code DILocation Loc(N); // inserted unsigned Line = Loc.getLineNumber(); // by Out<<"LN@"<<Line; // me StringRef File = Loc.getFilename(); // to Out<<"FN@"<<File; // get StringRef Dir = Loc.getDirectory(); // the Out<<"DN@"<<Dir; // mapping } // // Print out name if it exists........Code compiles well but i get following linking problem :(llvm[2]: Lin...
2009 Apr 30
0
[LLVMdev] Pulling line number/file/path information from DbgStopPointInst instructions
...take a look at how DwarfWriter::getOrCreateSourceID is used. Unfortunately, I don't see how to get the file name from a DbgStopPointInstr right offhand. Things in the CodeGen/AsmPrinter/DwarfWriter.cpp file have changed quite a bit in recent months... -bw > What it used to work was calling getFileName()->getNameStr() on the > DbgStopPointInst, which returned a std::string, but in LLVM 2.5 the > code compiles, but that string is empty. Any clues? > > [s] > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu         http:/...
2010 Mar 16
2
[LLVMdev] Replacement for findStopPoint() in LLVM 2.7
...t; llvm::MetadataContext *TheMetadata = M->getContext().getMetadata(); > MDDbgKind = TheMetadata->getMDKind("dbg"); > if (MDDbgKind) { > if (MDNode *Dbg = TheMetadata->getMD(MDDbgKind, I)) { > DILocation Loc(Dbg); > ... > Loc.getDirectory() > Loc.getFilename() > Loc.getLineNumber() > Loc.getColumnNumber() > .... > } > A grep through my LLVM 2.7 source tree does not find MetadataContext anywhere. Is this something that was added to LLVM mainline after the LLVM 2.7 branch was created? I'm using the release_27 branch...
2015 Nov 03
3
how to add the location debug info for each instruction
Hello, For some reason, I have to stick on llvm 3.3 for a language compiler, I find that the location debug info is attached to each instruction using !dbg, however, I found some of that information is mis-attched and need to be changed, so I want to *know what functions(I checked all funcs in DIBuilder.h but didn't find a appropriate one) are used to attach those !dbg nodes to each
2014 Jan 24
2
[LLVMdev] How to read v3.3 dbg metadata using v3.4 LLVM
...;> >> unsigned dbgKind = llvmContext.getMDKindID("dbg"); >> >> if (MDNode *N = instruction.getMetadata(dbgKind)){ >> >> DILocation location(N); >> >> fileDirectoryName = location.getDirectory(); >> >> fileName = location.getFilename(); >> >> lineNumber = location.getLineNumber(); >> >> columnNumber = location.getColumnNumber(); >> >> } >> [1] >> >> int main(int argc, char **argv){ >> >> return 0; >> >> } >> >> [2] >> >...
2017 Jun 11
2
Get segfault with ModulePass
...t;< '\n'; > > loc = I.getDebugLoc(); > > if (loc != nullptr) { > > errs() << "file: " << loc->getFilename() << '\n'; > > } > > for (const auto& use : I.uses()) { > > if (const CallInst* c = dyn_cast<CallInst>(us...
2011 Apr 27
1
[LLVMdev] LLVM internal getDirectory() for LexicalBlock debug information returns filename?
...etadata !14, i32 11, i32 3, metadata !1, i32 1} ; [ DW_TAG_lexical_block ] ... In llvm/Analysis/DebugInfo.h, I see some exception code in DISubProgram for LLVMDebugVersion7: StringRef getDirectory() const { if (getVersion() == llvm::LLVMDebugVersion7) return getCompileUnit().getFilename(); return getFieldAs<DIFile>(6).getDirectory(); } The DILexicalBlock code does not include such exceptions, but even if I try to add such code, the result is still the filename iso directory. I am at a loss how to address this. Any help would be greatly appreciated! Regards, M...
2011 Dec 19
2
[LLVMdev] DwarfDebug craziness
...> DirName = ""; The last snippet weirds me out and breaks Rust debug information generation. Specifically, when creating a new compile unit, we see this: >CompileUnit *DwarfDebug::constructCompileUnit(const MDNode *N) { > DICompileUnit DIUnit(N); > StringRef FN = DIUnit.getFilename(); > CompilationDir = DIUnit.getDirectory(); > unsigned ID = GetOrCreateSourceID(FN, CompilationDir); Note how CompilationDir is passed to GetOrCreateSourceID as DirName? That means that the map of compilation units is created entirely based on file names excluding the path, so two compila...
2010 Mar 16
2
[LLVMdev] Replacement for findStopPoint() in LLVM 2.7
Dear LLVMers, I'm updating some code to use the new LLVM 2.7 API. One piece of this code uses the findStopPoint() function to find the source filename and line number information of an instruction. What is the best way to do this under LLVM 2.7 now that the stop point intrinsic has been removed? It appears that the debug information is attached as metadata, but what is the easiest way
2010 Mar 16
0
[LLVMdev] Replacement for findStopPoint() in LLVM 2.7
...rse cache TheMetadata and MDDbgKind) llvm::MetadataContext *TheMetadata = M->getContext().getMetadata(); MDDbgKind = TheMetadata->getMDKind("dbg"); if (MDDbgKind) { if (MDNode *Dbg = TheMetadata->getMD(MDDbgKind, I)) { DILocation Loc(Dbg); ... Loc.getDirectory() Loc.getFilename() Loc.getLineNumber() Loc.getColumnNumber() .... } } Best regards, --Edwin
2010 Mar 16
0
[LLVMdev] Replacement for findStopPoint() in LLVM 2.7
...= M->getContext().getMetadata(); >> MDDbgKind = TheMetadata->getMDKind("dbg"); >> if (MDDbgKind) { >> if (MDNode *Dbg = TheMetadata->getMD(MDDbgKind, I)) { >> DILocation Loc(Dbg); >> ... >> Loc.getDirectory() >> Loc.getFilename() >> Loc.getLineNumber() >> Loc.getColumnNumber() >> .... >> } >> > > A grep through my LLVM 2.7 source tree does not find MetadataContext > anywhere. Is this something that was added to LLVM mainline after the > LLVM 2.7 branch was c...
2010 Mar 16
2
[LLVMdev] Replacement for findStopPoint() in LLVM 2.7
...adata(); >>> MDDbgKind = TheMetadata->getMDKind("dbg"); >>> if (MDDbgKind) { >>> if (MDNode *Dbg = TheMetadata->getMD(MDDbgKind, I)) { >>> DILocation Loc(Dbg); >>> ... >>> Loc.getDirectory() >>> Loc.getFilename() >>> Loc.getLineNumber() >>> Loc.getColumnNumber() >>> .... >>> } >>> >>> >> A grep through my LLVM 2.7 source tree does not find MetadataContext >> anywhere. Is this something that was added to LLVM mai...
2010 Jul 07
0
[LLVMdev] source line number for instruction
...lDebugging.html#ccxx_frontend > : > if (MDNode *N = I->getMetadata("dbg")) { // Here I is an LLVM > instruction > DILocation Loc(N); // DILocation is in > DebugInfo.h > unsigned Line = Loc.getLineNumber(); > StringRef File = Loc.getFilename(); > StringRef Dir = Loc.getDirectory(); > } > Does this also work for release 2.7? Yes. > I did not see the same thing at the documentation for release 2.7. The link you cited is the documentation for release 2.7. Trevor