summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Disassembler/llvm
Commit message (Collapse)AuthorAgeFilesLines
* Consolidate the knowledge of what arm cores are always executingJason Molenda2016-04-051-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in thumb mode into one method in ArchSpec, replace checks for specific cores in the disassembler with calls to this. Also call this from the arm instruction emulation code. The determination of whether a given ArchSpec is thumb-only is still a bit of a hack, but at least the hack is consolidated into a single place. In my original version of this patch http://reviews.llvm.org/D13578 I was calling into llvm's feature arm feature tables to make this determination, like #include "llvm/Support/TargetRegistry.h" #include "llvm/MC/MCSubtargetInfo.h" #include "llvm/../../lib/Target/ARM/ARMGenRegisterInfo.inc" #include "llvm/../../lib/Target/ARM/ARMFeatures.h" [...] std::string triple (GetTriple().getTriple()); const char *cpu = ""; const char *features_str = ""; const llvm::Target *curr_target = llvm::TargetRegistry::lookupTarget(triple.c_str(), Error); std::unique_ptr<llvm::MCSubtargetInfo> subtarget_info_up (curr_target->createMCSubtargetInfo(triple.c_str(), cpu, features_str)); if (subtarget_info_up->getFeatureBits()[llvm::ARM::FeatureNoARM]) { return true; } but those tables are post-llvm-build generated and linking against them for all of our different build system methods was a big hiccup that I haven't had time to revisit convincingly. I'll keep that reviews.llvm.org patch around to remind myself that I need to take another run at linking against the necessary tables again in llvm. <rdar://problem/23022803> llvm-svn: 265377
* Upgrade the arm/thumb architecture used by the disassemblerTamas Berghammer2016-03-021-2/+2
| | | | | | | | | Previously we were using thumbv7 and armv8.1a what ended up showing a few undefined instruction when disassembling code. This CL update the architectures used to armv8.2a and thumbv8.2a (newest available) so we display all instruction in the disassambly. llvm-svn: 262482
* Remove autoconf support from source directories.Eugene Zelenko2016-01-281-14/+0
| | | | | | Differential revision: http://reviews.llvm.org/D16662 llvm-svn: 259098
* Update for LLVM changeBenjamin Kramer2016-01-261-4/+4
| | | | llvm-svn: 258819
* DisassemblerLLVMC now gets the disassembler comments for an instructionSean Callanan2015-12-112-19/+29
| | | | | | | and appends them to our list of comments (which can additionally include things like decoded addresses). llvm-svn: 255358
* Fix Clang-tidy modernize-use-override warnings in include/lldb/Disassembler ↵Eugene Zelenko2015-10-222-79/+76
| | | | | | | | and OperatingSystem; other minor fixes. Second attempt which should work for MSVC. llvm-svn: 251066
* Revert r250872 in source/Plugins/Disassembler to fix MSVC builds failures.Eugene Zelenko2015-10-212-45/+53
| | | | llvm-svn: 250874
* Fix Clang-tidy modernize-use-override warnings in some files in ↵Eugene Zelenko2015-10-212-53/+45
| | | | | | | | source/Plugins; other minor fixes. Differential Revision: http://reviews.llvm.org/D13916 llvm-svn: 250872
* Re-commit the (fixed) changes from r248985 which were reverted by PavelJason Molenda2015-10-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when they introduced android testsuite regressions. Pavel has run the testsuite against the updated patch and it completes cleanly now. The original commit message: Fixing a subtle issue on Mac OS X systems with dSYMs (possibly introduced by r235737 but I didn't look into it too closely). A dSYM can have a per-UUID plist in it which tells lldb where to find an executable binary for the dSYM (DBGSymbolRichExecutable) - other information can be included in this plist, like how to remap the source file paths from their build pathnames to their long-term storage pathnames. This per-UUID plist is a unusual; it is used probably exclusively inside apple with our build system. It is not created by default in normal dSYMs. The problem was like this: 1. lldb wants to find an executable, given only a UUID (this happens when lldb is doing cross-host debugging and doesn't have a copy of the target system's binaries) 2. It eventually calls LocateMacOSXFilesUsingDebugSymbols which does a spotlight search for the dSYM on the local system, and failing that, tries the DBGShellCommands command to find the dSYM. 3. It gets a dSYM. It reads the per-UUID plist in the dSYM. The dSYM has a DBGSymbolRichExecutable kv pair pointing to the binary on a network filesystem. 4. Using the binary on the network filesystem, lldb now goes to find the dSYM. 5. It starts by looking for a dSYM next to the binary it found. 6. lldb is now reading the dSYM over a network filesystem, ignoring the one it found on its local filesystem earlier. Everything still *works* but it's much slower. This would be a tricky one to write up in a testsuite case; you really need the binary to not exist on the local system. And LocateMacOSXFilesUsingDebugSymbols will only compile on Mac OS X - even if I found a way to write up a test case, it would not run anywhere but on a mac. One change Greg wanted while I was touching this code was to have LocateMacOSXFilesUsingDebugSymbols (which could be asked to find a binary OR find a dSYM) to instead return a ModuleSpec with the sum total of everything it could find. This change of passing around a ModuleSpec instead of a FileSpec was percolated up into ModuleList::GetSharedModule. The changes to LocateMacOSXFilesUsingDebugSymbols look larger than they really are - there's a lot of simple whitespace changes in there. I ran the testsuites on mac, no new regressions introduced <rdar://problem/21993813> llvm-svn: 249755
* [LLDB][MIPS] microMIPS breakpoints, disassembly and compressed addressesJaydeep Patil2015-09-221-5/+22
| | | | | | | | | | | | SUMMARY: This patch detects microMIPS symbols, sets breakpoints using un-compressed address and display disassembly in mixed mode for microMIPS applications (running on bare-iron targets). Reviewers: clayborg Subscribers: nitesh.jain, mohit.bhakkad, sagar, bhushan and lldb-commits Differential Revision: http://reviews.llvm.org/D12079 llvm-svn: 248248
* Fix build after llvm r247683 was reverted.Daniel Sanders2015-09-151-1/+1
| | | | llvm-svn: 247703
* Fix build after llvm r247683Pavel Labath2015-09-151-1/+1
| | | | llvm-svn: 247687
* Remove a call to deleted function.Greg Clayton2015-09-091-1/+0
| | | | llvm-svn: 247193
* Make sure to flush the stream to make sure the string is up to date when we ↵Greg Clayton2015-09-091-0/+1
| | | | | | query its size. llvm-svn: 247175
* [cmake] Remove LLVM_NO_RTTI.Bruce Mitchener2015-09-031-2/+0
| | | | | | | | | | | | | | Summary: This doesn't exist in other LLVM projects any longer and doesn't do anything. Reviewers: chaoren, labath Subscribers: emaste, tberghammer, lldb-commits, danalbert Differential Revision: http://reviews.llvm.org/D12586 llvm-svn: 246749
* Only create alternative thumb disassembler if the main one is armTamas Berghammer2015-09-021-2/+2
| | | | | | | | This fixes a regression caused by r245645 where creating alternative thumb disassembler was enabled even when the main disassembler is already thumb. llvm-svn: 246649
* Fix arm disassambler with specifying armv8.1a architectureTamas Berghammer2015-09-021-10/+18
| | | | | | | | | | | | | | | If no architecture is defined for the disassambler command then it uses the architecture of the target. In case of arm it will be "arm" what is treated as the oldest arm version by the LLVM disassambler causing a lot of invalid opcode in the output. This change forces the use of "armv8.1a" (the newest arm architecture) if no sub architecure was specified (either by the user or by the target) to disassamble all instruction. Differential revision: http://reviews.llvm.org/D12553 llvm-svn: 246648
* [MIPS] Avoid breakpoint in delay slotBhushan D. Attarde2015-08-262-0/+46
| | | | | | | | | | | | | | SUMMARY: This patch implements Target::GetBreakableLoadAddress() method that takes an address and checks for any reason there is a better address than this to put a breakpoint on. If there is then return that address. MIPS uses this method to avoid breakpoint in delay slot. Reviewers: clayborg, jingham Subscribers: jingham, mohit.bhakkad, sagar, jaydeep, nitesh.jain, lldb-commits Differential Revision: http://http://reviews.llvm.org/D12184 llvm-svn: 246015
* The llvm Triple for an armv6m now comes back as llvm::Triple::thumb.Jason Molenda2015-08-211-3/+3
| | | | | | | | | | | | | | This was breaking disassembly for arm machines that we force to be thumb mode all the time because we were only checking for llvm::Triple::arm. i.e. armv6m (ARM Cortex-M0) armv7m (ARM Cortex-M3) armv7em (ARM Cortex-M4) <rdar://problem/22334522> llvm-svn: 245645
* Remove more uses of raw_svector_ostream::flush() call following r244928.Yaron Keren2015-08-131-1/+0
| | | | llvm-svn: 244936
* [LLDB][MIPS] Detect MIPS application specific extensions like micromipsJaydeep Patil2015-07-162-6/+21
| | | | | | | | | | | | | | SUMMARY: The patch detects MIPS application specific extensions (ASE) like micromips by reading ELF header.e_flags and SHT_MIPS_ABIFLAGS section. MIPS triple does not contain ASE information like micromips, mips16, DSP, MSA etc. These can be read from header.e_flags or SHT_MIPS_ABIFLAGS section. Reviewers: clayborg Subscribers: mohit.bhakkad, sagar, lldb-commits Differential Revision: http://reviews.llvm.org/D11133 llvm-svn: 242381
* Fix test regression TestDisassemble_VST1_64 (caused by r239996)Tamas Berghammer2015-06-181-1/+1
| | | | llvm-svn: 240029
* [LLDB][MIPS] Emulation of MIPS64 floating-point branch instructionsMohit K. Bhakkad2015-06-182-5/+43
| | | | | | | | | | | | | | | | | Patch by Jaydeep Patil SUMMARY: 1. Added emulation of MIPS64 floating-point branch instructions 2. Updated GetRegisterInfo to recognize floating-point registers 3. Provided CPU information while creating createMCSubtargetInfo in disassembler 4. Bug fix in emulation of JIC and JIALC 5. Correct identification of breakpoint when set in a delay slot of a branch instruction Reviewers: clayborg Subscribers: bhushan, mohit.bhakkad, sagar, nitesh.jain, lldb-commits. Differential Revision: http://reviews.llvm.org/D10355 llvm-svn: 239996
* Switch from setPrintImmHex to setPrintHexStyle to follow changes from r239263.Oleksiy Vyalov2015-06-081-2/+2
| | | | llvm-svn: 239310
* Fix call to llvm::Target::createMCInstPrinter.Chaoren Lin2015-03-311-3/+3
| | | | llvm-svn: 233655
* Fix call to MCInstPrinter::printInst to pass MCSubtargetInfo.Akira Hatanaka2015-03-271-1/+2
| | | | | | The interface of this function was changed in r233411. llvm-svn: 233429
* Change the default disassembly format again. First attempt atJason Molenda2015-02-131-4/+42
| | | | | | | | | | | | | | | | changing it was in r219544 - after living on that for a few months, I wanted to take another crack at this. The disassembly-format setting still exists and the old format can be user specified with a setting like ${current-pc-arrow}${addr-file-or-load}{ <${function.name-without-args}${function.concrete-only-addr-offset-no-padding}>}: This patch was discussed in http://reviews.llvm.org/D7578 <rdar://problem/19726421> llvm-svn: 229186
* Abstract the details from regex.h a bit more by not allowing people to ↵Greg Clayton2015-01-211-1/+1
| | | | | | | | | | specify compile and execute flags for regular expressions. Also enable better regular expressions if they are available by check if the REG_ENHANCED is available and using it if it is. Since REG_ENHANCED is available on MacOSX, this allow the use of \d (digits) \b (word boundaries) and much more without affecting other systems. <rdar://problem/12082562> llvm-svn: 226704
* Update to reflect the API change to createMCSymbolizer in LLVM r226416.Chandler Carruth2015-01-191-1/+1
| | | | | | This should fix the LLDB build since that change. llvm-svn: 226427
* Update for llvm API change.Rafael Espindola2014-11-121-4/+2
| | | | llvm-svn: 221752
* Use llvm::StringRefMemoryObject NFC.Rafael Espindola2014-11-071-24/+3
| | | | llvm-svn: 221509
* Add a new disassembly-format specification so that the disassemblerJason Molenda2014-10-101-1/+9
| | | | | | | | | | | | | | | | | | | | | output style can be customized. Change the built-in default to be more similar to gdb's disassembly formatting. The disassembly-format for a gdb-like output is ${addr-file-or-load} <${function.name-without-args}${function.concrete-only-addr-offset-no-padding}>: The disassembly-format for the lldb style output is {${function.initial-function}{${module.file.basename}`}{${function.name-without-args}}:\n}{${function.changed}\n{${module.file.basename}`}{${function.name-without-args}}:\n}{${current-pc-arrow} }{${addr-file-or-load}}: The two backticks in the lldb style formatter triggers the sub-expression evaluation in CommandInterpreter::PreprocessCommand() so you can't use that one as-is ... changing to use ' characters instead of ` would work around that. <rdar://problem/9885398> llvm-svn: 219544
* Update how we create our MCSymbolizer to keep working correctlyJason Molenda2014-05-171-1/+5
| | | | | | | | on arm64 binaries after the llvm r206063 changes. Patch written by Jim Ingham and Lang Hames. <rdar://problem/16935671> llvm-svn: 209051
* Remove trailing spacesSylvestre Ledru2014-04-152-84/+83
| | | | llvm-svn: 206278
* Make LLDB builds against the current LLVM sources (modification on ↵Sylvestre Ledru2014-04-151-1/+1
| | | | | | createMCDisassembler introduced by r206241) llvm-svn: 206277
* Fix LLDB to build with top of tree LLVM/Clang.Greg Clayton2014-04-141-5/+3
| | | | | | Patch from Michael Tao. llvm-svn: 206213
* lldb arm64 import.Jason Molenda2014-03-291-1/+1
| | | | | | | | | | | | | | | | These changes were written by Greg Clayton, Jim Ingham, Jason Molenda. It builds cleanly against TOT llvm with xcodebuild. I updated the cmake files by visual inspection but did not try a build. I haven't built these sources on any non-Mac platforms - I don't think this patch adds any code that requires darwin, but please let me know if I missed something. In debugserver, MachProcess.cpp and MachTask.cpp were renamed to MachProcess.mm and MachTask.mm as they picked up some new Objective-C code needed to launch processes when running on iOS. llvm-svn: 205113
* Replace uses of OwningPtr<T> with std::unique_ptr<T>.Ahmed Charles2014-03-071-2/+1
| | | | llvm-svn: 203200
* Stop leaking MCRegisterInfo.Jean-Daniel Dupas2013-12-291-1/+2
| | | | llvm-svn: 198177
* Handle endianness in the Opcode classEd Maste2013-12-091-12/+14
| | | | | | | | | Previously, an opcode set via SetOpcode32 (for example) was later extracted via GetData() as a byte sequence in host order rather than target order. Review: http://llvm-reviews.chandlerc.com/D1838 llvm-svn: 196808
* For logical backtrace work, lldb needs to track Module unloads etc & ↵Greg Clayton2013-12-061-0/+1
| | | | | | | | | | symoblicate an address based on a point in time <rdar://problem/15314403> This patch adds a new lldb_private::SectionLoadHistory class that tracks what shared libraries were loaded given a process stop ID. This allows us to keep a history of the sections that were loaded for a time T. Many items in history objects will rely upon the process stop ID in the future. llvm-svn: 196557
* Roll back the changes I made in r193907 which created a new FrameJason Molenda2013-11-041-1/+1
| | | | | | | | | | pure virtual base class and made StackFrame a subclass of that. As I started to build on top of that arrangement today, I found that it wasn't working out like I intended. Instead I'll try sticking with the single StackFrame class -- there's too much code duplication to make a more complicated class hierarchy sensible I think. llvm-svn: 193983
* Add a new base class, Frame. It is a pure virtual function whichJason Molenda2013-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | | defines a protocol that all subclasses will implement. StackFrame is currently the only subclass and the methods that Frame vends are nearly identical to StackFrame's old methods. Update all callers to use Frame*/Frame& instead of pointers to StackFrames. This is almost entirely a mechanical change that touches a lot of the code base so I'm committing it alone. No new functionality is added with this patch, no new subclasses of Frame exist yet. I'll probably need to tweak some of the separation, possibly moving some of StackFrame's methods up in to Frame, but this is a good starting point. <rdar://problem/15314068> llvm-svn: 193907
* Add definitions for "armv6m", which indicates a Cortex-M0 processor.Jason Molenda2013-09-271-2/+8
| | | | | | | It uses the T16 and a few T32 instructions from the ARMv7-A ISA. <rdar://problem/15099306> llvm-svn: 191587
* Convert to UNIX line endings.Joerg Sonnenberger2013-09-251-5/+5
| | | | llvm-svn: 191367
* Moved the static s_regex into a function body to allow it to be lazily ↵Greg Clayton2013-08-271-7/+2
| | | | | | initialized when/if it is ever used. We try to avoid global constructors when building shared libraries on Darwin. llvm-svn: 189397
* MingW compilation (windows). Includes various refactoring to improve ↵Virgile Bello2013-08-231-15/+10
| | | | | | portability. llvm-svn: 189107
* New settings: target.use-hex-immediates and target.hex-immediates-styleDaniel Malea2013-08-072-7/+28
| | | | | | | | | | - Immediates can be shown as hex (either Intel or MASM style) - See TestSettings.py for usage examples - Verified to cause no regressions on Linux x86_64 (Ubuntu 12.10) Patch by Richard Mitton! llvm-svn: 187921
* When a Cortex-M3 target is selected (armv7m), force disassembly to be inJason Molenda2013-07-221-9/+22
| | | | | | | thumb mode. <rdar://problem/14107444>, <rdar://problem/14107405> llvm-svn: 186881
* Fix "source list -n printf" on Linux (printf is symbol alias for __printf)Michael Sartain2013-07-111-1/+1
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1109 llvm-svn: 186104
OpenPOWER on IntegriCloud