summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.h
Commit message (Collapse)AuthorAgeFilesLines
* llvm-symbolizer: Untag addresses in object files by default.Peter Collingbourne2019-08-051-2/+5
| | | | | | | | | | Any addresses that we pass to llvm-symbolizer are going to be untagged, while any HWASAN instrumented globals are going to be tagged in the symbol table. Therefore we need to untag the addresses before using them. Differential Revision: https://reviews.llvm.org/D65769 llvm-svn: 367926
* Teach the symbolizer lib symbolize objects directly.Yuanfang Chen2019-07-081-3/+3
| | | | | | | | | | | | | | Currently, the symbolizer lib can only symbolize a file on disk. This patch teaches the symbolizer lib to symbolize objects. llvm-objdump needs this to support archive disassembly with source info. https://bugs.llvm.org/show_bug.cgi?id=41871 Reviewed by: jhenderson, grimar, MaskRay Differential Revision: https://reviews.llvm.org/D63521 llvm-svn: 365376
* llvm-symbolizer: Add a FRAME command.Peter Collingbourne2019-06-241-0/+2
| | | | | | | | | | | | | | | | | | | This command prints a description of the referenced function's stack frame. For each formal parameter and local variable, the tool prints: - function name - variable name - file/line of declaration - FP-relative variable location (if available) - size in bytes - HWASAN tag offset This information will be used by the HWASAN runtime to identify local variables in UAR reports. Differential Revision: https://reviews.llvm.org/D63468 llvm-svn: 364225
* [Symbolize] Uniquify sorted vector<pair<SymbolDesc, StringRef>>Fangrui Song2019-04-061-3/+0
| | | | llvm-svn: 357833
* [Symbolize] Replace map<SymbolDesc, StringRef> with sorted vectorFangrui Song2019-04-051-2/+5
| | | | llvm-svn: 357758
* [Symbolize] Keep SymbolDescs with the same address and improve ↵Fangrui Song2019-04-041-2/+2
| | | | | | | | getNameFromSymbolTable heuristic I'll follow up with better heuristics or tests. llvm-svn: 357683
* [DebugInfo] follow up for "add SectionedAddress to DebugInfo interfaces"Alexey Lapshin2019-03-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | [Symbolizer] Add getModuleSectionIndexForAddress() helper routine The https://reviews.llvm.org/D58194 patch changed symbolizer interface. Particularily it requires not only Address but SectionIndex also. Note object::SectionedAddress parameter: Expected<DILineInfo> symbolizeCode(const std::string &ModuleName, object::SectionedAddress ModuleOffset, StringRef DWPName = ""); There are callers of symbolizer which do not know particular section index. That patch creates getModuleSectionIndexForAddress() routine which will detect section index for the specified address. Thus if caller set ModuleOffset.SectionIndex into object::SectionedAddress::UndefSection state then symbolizer would detect section index using getModuleSectionIndexForAddress routine. Differential Revision: https://reviews.llvm.org/D58848 llvm-svn: 356829
* [DebugInfo] add SectionedAddress to DebugInfo interfaces.Alexey Lapshin2019-02-271-3/+4
| | | | | | | | | | | | | | | | | That patch is the fix for https://bugs.llvm.org/show_bug.cgi?id=40703 "wrong line number info for obj file compiled with -ffunction-sections" bug. The problem happened with only .o files. If object file contains several .text sections then line number information showed incorrectly. The reason for this is that DwarfLineTable could not detect section which corresponds to specified address(because address is the local to the section). And as the result it could not select proper sequence in the line table. The fix is to pass SectionIndex with the address. So that it would be possible to differentiate addresses from various sections. With this fix llvm-objdump shows correct line numbers for disassembled code. Differential review: https://reviews.llvm.org/D58194 llvm-svn: 354972
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [MC] Fix some Clang-tidy modernize and Include What You Use warnings in ↵Eugene Zelenko2017-02-091-6/+14
| | | | | | | | SubtargetFeature; other minor fixes (NFC). Same changes in files affected by reduced SubtargetFeature.h dependencies. llvm-svn: 294548
* [Symbolizer] Don't use PE symbol tables to override PDB symbolsReid Kleckner2015-11-131-0/+3
| | | | | | | | | | | | | | | | | | | | | Summary: PE files are stripped by default, and only contain the names of exported symbols. The actual reason that we bother to do this override by default is actually due to a quirk of the way -gline-tables-only is implemented, so I phrased the check as "if we are symbolizing from dwarf, do the symtab override". This fixes lots of Windows ASan tests that I broke in r250582. Reviewers: samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14594 llvm-svn: 253051
* [LLVMSymbolize] Move printing the description of a global into a separate ↵Alexey Samsonov2015-10-291-2/+1
| | | | | | function. NFC. llvm-svn: 251669
* [LLVMSymbolize] Move ModuleInfo into a separate class (SymbolizableModule).Alexey Samsonov2015-10-291-0/+80
Summary: This is mostly NFC. It is a first step in cleaning up LLVMSymbolize library. It removes "ModuleInfo" class which bundles together ObjectFile and its debug info context in favor of: * abstract SymbolizableModule in public headers; * SymbolizableObjectFile subclass in implementation. Additionally, SymbolizableObjectFile is now created via factory, so we can properly detect object parsing error at this stage instead of keeping the broken half-parsed object. As a next step, we would be able to propagate the error all the way back to the library user. Further improvements might include: * factoring out the logic of finding appropriate file with debug info for a given object file, and caching all parsed object files into a separate class [A]. * factoring out DILineInfo rendering [B]. This would make what is now a heavyweight "LLVMSymbolizer" a relatively straightforward class, that calls into [A] to turn filepath into a SymbolizableModule, delegates actual symbolization to concrete SymbolizableModule implementation, and lets [C] render the result. Reviewers: dblaikie, echristo, rafael Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14099 llvm-svn: 251662
OpenPOWER on IntegriCloud