summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Disassembler/llvm
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Update to new API.Bill Wendling2013-06-181-1/+1
| | | | llvm-svn: 184177
* Added a parameter for relocation info to keep lldb in step with llvm due to ↵Ashok Thirumurthi2013-05-241-4/+13
| | | | | | | | r182625, which takes a first step towards symbolization of disassembled instructions. llvm-svn: 182650
* Also pass the MCRegInfo to createMCAsmInfo. Follow the modification ↵Sylvestre Ledru2013-05-131-2/+2
| | | | | | introduced in commit r181680 of llvm llvm-svn: 181703
* <rdar://problem/13854277>Greg Clayton2013-05-102-24/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <rdar://problem/13594769> Main changes in this patch include: - cleanup plug-in interface and use ConstStrings for plug-in names - Modfiied the BSD Archive plug-in to be able to pick out the correct .o file when .a files contain multiple .o files with the same name by using the timestamp - Modified SymbolFileDWARFDebugMap to properly verify the timestamp on .o files it loads to ensure we don't load updated .o files and cause problems when debugging The plug-in interface changes: Modified the lldb_private::PluginInterface class that all plug-ins inherit from: Changed: virtual const char * GetPluginName() = 0; To: virtual ConstString GetPluginName() = 0; Removed: virtual const char * GetShortPluginName() = 0; - Fixed up all plug-in to adhere to the new interface and to return lldb_private::ConstString values for the plug-in names. - Fixed all plug-ins to return simple names with no prefixes. Some plug-ins had prefixes and most ones didn't, so now they all don't have prefixed names, just simple names like "linux", "gdb-remote", etc. llvm-svn: 181631
* <rdar://problem/13751683> Greg Clayton2013-05-031-2/+12
| | | | | | Make sure to handle all thumb variants correctly. llvm-svn: 180984
* After discussing with Chris Lattner, we require C++11, so lets get rid of ↵Greg Clayton2013-04-182-10/+10
| | | | | | the macros and just use C++11. llvm-svn: 179805
* Since we use C++11, we should switch over to using std::unique_ptr when ↵Greg Clayton2013-04-182-12/+16
| | | | | | | | C++11 is being used. To do this, we follow what we have done for shared pointers and we define a STD_UNIQUE_PTR macro that can be used and it will "do the right thing". Due to some API differences in std::unique_ptr and due to the fact that we need to be able to compile without C++11, we can't use move semantics so some code needed to change so that it can compile with either C++. Anyone wanting to use a unique_ptr or auto_ptr should now use the "STD_UNIQUE_PTR(TYPE)" macro. llvm-svn: 179779
* <rdar://problem/11730263>Greg Clayton2013-03-282-104/+104
| | | | | | | | | | PC relative loads are missing disassembly comments when disassembled in a live process. This issue was because some sections, like __TEXT and __DATA in libobjc.A.dylib, were being moved when they were put into the dyld shared cache. This could also affect any other system that slides sections individually. The solution is to keep track of wether the bytes we will disassemble are from an executable file (file address), or from a live process (load address). We now do the right thing based off of this input in all cases. llvm-svn: 178315
* DoesBranch needs to compute the instruction if it isn't already done.Jim Ingham2013-03-131-5/+55
| | | | | | Handle the "alternate_isa" correctly. llvm-svn: 176922
* Misc. clang build warning fixes.Matt Kopec2013-03-121-1/+1
| | | | llvm-svn: 176879
* Convert from the C-based LLVM Disassembler shim to the full MC Disassembler ↵Jim Ingham2013-03-022-139/+279
| | | | | | | | | | | | API's. Calculate "can branch" using the MC API's rather than our hand-rolled regex'es. As extra credit, allow setting the disassembly flavor for x86 based architectures to intel or att. <rdar://problem/11319574> <rdar://problem/9329275> llvm-svn: 176392
* Adding CMake build system to LLDB. Some known issues remain:Daniel Malea2013-02-211-0/+5
| | | | | | | | | | | | | | - generate-vers.pl has to be called by cmake to generate the version number - parallel builds not yet supported; dependency on clang must be explicitly specified Tested on Linux. - Building on Mac will require code-signing logic to be implemented. - Building on Windows will require OS-detection logic and some selective directory inclusion Thanks to Carlo Kok (who originally prepared these CMakefiles for Windows) and Ben Langmuir who ported them to Linux! llvm-svn: 175795
* <rdar://problem/13069948>Greg Clayton2013-01-252-6/+6
| | | | | | | | | | | | Major fixed to allow reading files that are over 4GB. The main problems were that the DataExtractor was using 32 bit offsets as a data cursor, and since we mmap all of our object files we could run into cases where if we had a very large core file that was over 4GB, we were running into the 4GB boundary. So I defined a new "lldb::offset_t" which should be used for all file offsets. After making this change, I enabled warnings for data loss and for enexpected implicit conversions temporarily and found a ton of things that I fixed. Any functions that take an index internally, should use "size_t" for any indexes and also should return "size_t" for any sizes of collections. llvm-svn: 173463
* Rmoved the old LLVM disassembler based on libedis.Sean Callanan2012-12-142-634/+0
| | | | llvm-svn: 170171
* Resolve printf formatting warnings on Linux:Daniel Malea2012-11-292-5/+5
| | | | | | | | - use macros from inttypes.h for format strings instead of OS-specific types Patch from Matt Kopec! llvm-svn: 168945
OpenPOWER on IntegriCloud