summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Instruction
Commit message (Collapse)AuthorAgeFilesLines
...
* A correction in rL239996Mohit K. Bhakkad2015-06-181-0/+1
| | | | llvm-svn: 239998
* [LLDB][MIPS] Emulation of MIPS64 floating-point branch instructionsMohit K. Bhakkad2015-06-182-7/+529
| | | | | | | | | | | | | | | | | 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
* [LLDB][MIPS] MIPS64 Branch instruction emulation for SW single steppingMohit K. Bhakkad2015-06-022-16/+1870
| | | | | | | | | | Patch by Jaydeep Patil Reviewers: clayborg, jasonmolenda Subscribers: bhushan, mohit.bhakkad, sagar, lldb-commits. Differential Revision: http://reviews.llvm.org/D10155 llvm-svn: 238820
* Fix write register context in EmulateInstructionARM::EmulateMOVRdRmTamas Berghammer2015-05-281-1/+4
| | | | llvm-svn: 238431
* Fix write register context in EmulateInstructionARM::EmulateADDRdSPImmTamas Berghammer2015-05-281-2/+5
| | | | llvm-svn: 238410
* Fix write register context in EmulateInstructionARM::EmulateMOVRdRmTamas Berghammer2015-05-271-3/+3
| | | | llvm-svn: 238312
* Fix encoding of BX instrucion in EmulateInstructionARMTamas Berghammer2015-05-181-1/+1
| | | | llvm-svn: 237570
* Assembly profiler for mips32Bhushan D. Attarde2015-05-155-0/+759
| | | | | | | | | | | Summary: Implementation of assembly profiler for MIPS32 using EmulateInstruction which currently scans only prologue/epilogue assembly instructions. It uses llvm::MCDisassembler to decode assembly instructions. Reviewers: clayborg, jasonmolenda Differential Revision: http://reviews.llvm.org/D9769 llvm-svn: 237420
* Fix arm instruction emulation of add (imm) and sub (imm)Tamas Berghammer2015-05-131-35/+48
| | | | | | Differential revision: http://reviews.llvm.org/D9704 llvm-svn: 237240
* Fixed a ton of gcc compile warningsVince Harron2015-05-131-1/+1
| | | | | | | | | | Removed some unused variables, added some consts, changed some casts to const_cast. I don't think any of these changes are very controversial. Differential Revision: http://reviews.llvm.org/D9674 llvm-svn: 237218
* Fix thumb condition extraction in ARM instrcution emulatorTamas Berghammer2015-05-111-2/+2
| | | | llvm-svn: 236988
* A small fix in rL236696Mohit K. Bhakkad2015-05-071-0/+4
| | | | llvm-svn: 236716
* [LLDB][MIPS] Software single steppingMohit K. Bhakkad2015-05-072-3/+65
| | | | | | | | | | Patch by Jaydeep Patil Reviewers: clayborg, jasonmolenda Subscribers: bhushan, mohit.bhakkad, sagar, lldb-commits. Differential Revision: http://reviews.llvm.org/D9519 llvm-svn: 236696
* [LLDB][MIPS] Emulate instruction using MCDisassemblerMohit K. Bhakkad2015-05-042-104/+312
| | | | | | | | | | | | | Patch by Jaydeep Patil EmulateInstructionMIPS64 has been modified to use llvm::MCDisassembler instead of duplicating the decoding logic. Added emulation of few branch instructions for software single stepping Reviewers: clayborg, jasonmolenda Subscribers: bhushan, mohit.bhakkad, sagar, lldb-commits. Differential Revision: http://reviews.llvm.org/D9319 llvm-svn: 236411
* Fix condition detection in EmulateInstructionARMTamas Berghammer2015-04-241-2/+1
| | | | | | | | | | | | | The condition detection code is calculating the result of the condition based on the first 3 bit of the condition and then negate it if the LSB of the condition is set. It works for the normal conditions but 0b1110 and 0b1111 are special as both of them should evaluate to true independently the value of CPSR. This CL removes the negating logic from those cases. Differential revision: http://reviews.llvm.org/D9219 llvm-svn: 235715
* Fix order of b and blx instrction in EmulateInstructionARMTamas Berghammer2015-04-241-2/+2
| | | | | | | | | | In the previous ordering some "blx <label>" instruction was recognised as "b #imm24" instructions causing a failure in the instruction emulator. Differential revision: http://reviews.llvm.org/D9218 llvm-svn: 235714
* Fix write register context for arm "add<c> <Rd>, sp, #imm"Tamas Berghammer2015-04-241-1/+5
| | | | | | Differential revision: http://reviews.llvm.org/D9213 llvm-svn: 235713
* Update cpsr register in BLX instruction emulationTamas Berghammer2015-04-231-0/+7
| | | | | | | | | Write the new cpsr value into the cpsr register if the BL or the BLX instruction change the instruction set on arm. Differential revision: http://reviews.llvm.org/D9188 llvm-svn: 235585
* [LLDB][MIPS] Add MIPS32 and MIPS64 core revisionsMohit K. Bhakkad2015-04-231-2/+4
| | | | | | | | | | | | | | | Patch by Jaydeep Patil Added MIPS32 and MIPS64 core revisions. This would be followed by register context and emulate-instruction for MIPS32. DYLDRendezvous.cpp: On Linux link map struct does not contain extra load offset field. Reviewers: clayborg Subscribers: bhushan, mohit.bhakkad, sagar, lldb-commits. Differential Revision: http://reviews.llvm.org/D9190 llvm-svn: 235574
* Fix a typo in EmulateInstructioinMIPS64Pavel Labath2015-03-181-1/+1
| | | | llvm-svn: 232620
* Initial Assembly profiler for mips64Bhushan D. Attarde2015-03-185-0/+598
| | | | | | | | | | | Summary: This is initial implementation of assembly profiler which only scans prologue/epilogue assembly instructions to create CFI instructions. Reviewers: clayborg, jasonmolenda Differential Revision: http://reviews.llvm.org/D7696 llvm-svn: 232619
* UnwindPlan::Row refactor -- add support for CFA set by a DWARF expressionPavel Labath2015-02-232-2/+2
| | | | | | | | | | | | | | | | | | | Summary: This change refactors UnwindPlan::Row to be able to store the fact that the CFA is value is set by evaluating a dwarf expression (DW_CFA_def_cfa_expression). This is achieved by creating a new class CFAValue and moving all CFA setting/getting code there. Note that code using the new CFAValue::isDWARFExpression is not yet present and will be added in a follow-up patch. Therefore, this patch should not change the functionality in any way. Test Plan: Ran tests on Mac and Linux. No regressions detected. Reviewers: jasonmolenda, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7755 llvm-svn: 230210
* Add #if 0 around unreachable block of code to suppress warnings.Jason Molenda2014-10-171-0/+2
| | | | | | clang warnings. llvm-svn: 220025
* Update lldb to track recent Triple arm64 enum removal and collapse into aarch64.Todd Fiala2014-07-231-1/+1
| | | | | | | | | | | See the following llvm change for details: r213743 | tnorthover | 2014-07-23 05:32:47 -0700 (Wed, 23 Jul 2014) | 9 lines AArch64: remove arm64 triple enumerator. This change fixes build breaks on Linux and MacOSX lldb. llvm-svn: 213755
* Replace uint32_t by lldb::RegisterKing in register context API.Jean-Daniel Dupas2014-07-024-6/+8
| | | | llvm-svn: 212172
* lldb: remove adhoc implementation of array_sizeofSaleem Abdulrasool2014-06-272-3/+5
| | | | | | | | Replace adhoc inline implementation of llvm::array_lengthof in favour of the implementation in LLVM. This is simply a cleanup change, no functional change intended. llvm-svn: 211868
* Fix a few typos.Bruce Mitchener2014-06-271-9/+9
| | | | llvm-svn: 211851
* Fix Windows warnings.Todd Fiala2014-05-281-1/+1
| | | | | | | | | | This fixes a number of trivial warnings in the Windows build. This is part of a larger effort to make the Windows build warning-free. See http://reviews.llvm.org/D3914 for more details. Change by Zachary Turner llvm-svn: 209749
* Args::StringToGenericRegister will now accept "lr" as Jason Molenda2014-05-091-0/+2
| | | | | | | | | | | | | another way to indicate that this register is a generic Return Address register (in addition to "ra") - this is used primarily by OperatingSystem plugins. Correctly annotate the UnwindPlan created by EmulateInstructionARM64 to indicate that it was not sourced from a compiler and it is valid at every instruction. <rdar://problem/16639754> llvm-svn: 208390
* Address warnings in EmulateInstructionARM64Ed Maste2014-04-282-11/+2
| | | | | | | | | | | | - Remove default for switch which covers all enumeration values - Remove unused functions LSL_C is left in the source under #if 0, as it may be needed in the future for emulating other instructions. Differential Revision: http://reviews.llvm.org/D3528 llvm-svn: 207449
* lldb arm64 import.Jason Molenda2014-03-295-0/+1042
| | | | | | | | | | | | | | | | 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
* Update the checks in EmulateInstructionARM::GetFramePointerRegisterNumber Jason Molenda2014-01-061-12/+40
| | | | | | | | | | and EmulateInstructionARM::GetFramePointerDWARFRegisterNumber to recognize the Apple arm convention (of using r7 for the frame pointer, regardless of thumb or arm) even if the OS does not match Darwin/MacOSX/iOS. Also corrects the behavior for thumb code on non-Apple platforms. <rdar://problem/14661537> llvm-svn: 198648
* Handle endianness in the Opcode classEd Maste2013-12-091-6/+6
| | | | | | | | | 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
* Fix header comment line lengthEd Maste2013-11-111-1/+1
| | | | llvm-svn: 194397
* Roll back the changes I made in r193907 which created a new FrameJason Molenda2013-11-042-3/+3
| | | | | | | | | | 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-022-3/+3
| | | | | | | | | | | | | | | | | | | | | 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
* Correct typo: Intructions -> InstructionsEd Maste2013-10-042-4/+4
| | | | llvm-svn: 191972
* Convert to UNIX line endings.Joerg Sonnenberger2013-09-252-7/+7
| | | | llvm-svn: 191367
* Rename EmulationStateARM::sd_regs to avoid name clash (MSVC).Virgile Bello2013-08-271-1/+1
| | | | llvm-svn: 189366
* Fixed the instruction emulation so that it doesn'tSean Callanan2013-06-251-0/+6
| | | | | | | | | print to standard output as part of normal operation. <rdar://problem/14247606> llvm-svn: 184797
* Fix some more mismatched integer types causing compiler warnings.Andy Gibbs2013-06-242-14/+14
| | | | llvm-svn: 184737
* Update countTrailingZeros function usage to match llvm's r182667.Filipe Cabecinhas2013-05-241-2/+2
| | | | llvm-svn: 182683
* <rdar://problem/13854277>Greg Clayton2013-05-102-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <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
* After discussing with Chris Lattner, we require C++11, so lets get rid of ↵Greg Clayton2013-04-181-2/+2
| | | | | | 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-181-2/+2
| | | | | | | | 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
* Adding CMake build system to LLDB. Some known issues remain:Daniel Malea2013-02-212-0/+7
| | | | | | | | | | | | | | - 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
* More Linux warnings fixes (remove default labels as needed):Daniel Malea2012-12-072-4/+0
| | | | | | | | - as per http://llvm.org/docs/CodingStandards.html#don-t-use-default-labels-in-fully-covered-switches-over-enumerations Patch by Matt Kopec! llvm-svn: 169633
* Fix the bit pattern for vst1 in ↵Jason Molenda2012-10-311-1/+1
| | | | | | | | EmulateInstructionARM::GetThumbOpcodeForInstruction so it is recognized correctly. The second patch needed for <rdar://problem/10652166>. llvm-svn: 167094
* Add a new capability to RegisterContextLLDB: To recognize when theJason Molenda2012-10-261-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Full UnwindPlan is trying to do an impossible unwind; in that case invalidate the Full UnwindPlan and replace it with the architecture default unwind plan. This is a scenario that happens occasionally with arm unwinds in particular; the instruction analysis based full unwindplan can mis-parse the functions and the stack walk stops prematurely. Now we can do a simpleminded frame-chain walk to find the caller frame and continue the unwind. It's not ideal but given the complicated nature of analyzing the arm functions, and the lack of eh_frame information on iOS, it is a distinct improvement and fixes some long-standing problems with the unwinder on that platform. This is fixing <rdar://problem/12091421>. I may re-use this invalidate feature in the future if I can identify other cases where the full unwindplan's unwind information is clearly incorrect. This checkin also includes some cleanup for the volatile register definition in the arm ABI plugin for <rdar://problem/10652166> although work remains to be done for that bug. llvm-svn: 166757
* Reimplemented the code that backed the "settings" in lldb. There were many ↵Greg Clayton2012-08-224-2/+4
| | | | | | | | | | | | | issues with the previous implementation: - no setting auto completion - very manual and error prone way of getting/setting variables - tons of code duplication - useless instance names for processes, threads Now settings can easily be defined like option values. The new settings makes use of the "OptionValue" classes so we can re-use the option value code that we use to set settings in command options. No more instances, just "does the right thing". llvm-svn: 162366
OpenPOWER on IntegriCloud