summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Scalar.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Added a SetData() method to ValueObject. ThisSean Callanan2013-04-131-0/+64
| | | | | | | | | | | | | | lets a ValueObject's contents be set from raw data. This has certain limitations (notably, registers can only be set to data that is as large as the register) but will be useful for the new Materializer. I also exposed this interface through SBValue. I have added a testcase that exercises various special cases of SBValue::SetData(). llvm-svn: 179437
* <rdar://problem/13069948>Greg Clayton2013-01-251-85/+85
| | | | | | | | | | | | 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
* <rdar://problem/13010909>Greg Clayton2013-01-151-2/+2
| | | | | | Don't accidentally sign extend unsigned bitfields. llvm-svn: 172506
* Added emulation of shifts to the IR interpreter.Sean Callanan2013-01-091-0/+16
| | | | | | <rdar://problem/12978619> llvm-svn: 172013
* More Linux warnings fixes (remove default labels as needed):Daniel Malea2012-12-071-80/+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
* Resolve printf formatting warnings on Linux:Daniel Malea2012-11-291-2/+3
| | | | | | | | - use macros from inttypes.h for format strings instead of OS-specific types Patch from Matt Kopec! llvm-svn: 168945
* Reverting the changes to Scalar since this class needs to follow C rules for ↵Enrico Granata2012-10-241-9/+9
| | | | | | type promotion llvm-svn: 166626
* Reimplementing SBValue/ValueObject.GetValueAsUnsigned() in terms of ↵Enrico Granata2012-10-241-9/+9
| | | | | | appropriate calls in Scalar - Making sure Scalar does the right thing when casting signed values to unsigned ones. llvm-svn: 166618
* <rdar://problem/10546739>Greg Clayton2011-12-291-0/+81
| | | | | | | Fixed SBValue::GetValueAsUnsigned() and SBValue::GetValueAsSigned() calls to work for bitfields. llvm-svn: 147332
* Cleaned up many error codes. For any who is filling in error strings intoGreg Clayton2011-10-261-13/+13
| | | | | | | | | | | | | lldb_private::Error objects the rules are: - short strings that don't start with a capitol letter unless the name is a class or anything else that is always capitolized - no trailing newline character - should be one line if possible Implemented a first pass at adding "--gdb-format" support to anything that accepts format with optional size/count. llvm-svn: 142999
* Fix a logic error caught by the static analyzer.Johnny Chen2011-08-111-1/+1
| | | | llvm-svn: 137328
* Added new lldb_private::Process memory read/write functions to stop a bunchGreg Clayton2011-05-221-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of duplicated code from appearing all over LLDB: lldb::addr_t Process::ReadPointerFromMemory (lldb::addr_t vm_addr, Error &error); bool Process::WritePointerToMemory (lldb::addr_t vm_addr, lldb::addr_t ptr_value, Error &error); size_t Process::ReadScalarIntegerFromMemory (lldb::addr_t addr, uint32_t byte_size, bool is_signed, Scalar &scalar, Error &error); size_t Process::WriteScalarToMemory (lldb::addr_t vm_addr, const Scalar &scalar, uint32_t size, Error &error); in lldb_private::Process the following functions were renamed: From: uint64_t Process::ReadUnsignedInteger (lldb::addr_t load_addr, size_t byte_size, Error &error); To: uint64_t Process::ReadUnsignedIntegerFromMemory (lldb::addr_t load_addr, size_t byte_size, uint64_t fail_value, Error &error); Cleaned up a lot of code that was manually doing what the above functions do to use the functions listed above. Added the ability to get a scalar value as a buffer that can be written down to a process (byte swapping the Scalar value if needed): uint32_t Scalar::GetAsMemoryData (void *dst, uint32_t dst_len, lldb::ByteOrder dst_byte_order, Error &error) const; The "dst_len" can be smaller that the size of the scalar and the least significant bytes will be written. "dst_len" can also be larger and the most significant bytes will be padded with zeroes. Centralized the code that adds or removes address bits for callable and opcode addresses into lldb_private::Target: lldb::addr_t Target::GetCallableLoadAddress (lldb::addr_t load_addr, AddressClass addr_class) const; lldb::addr_t Target::GetOpcodeLoadAddress (lldb::addr_t load_addr, AddressClass addr_class) const; All necessary lldb_private::Address functions now use the target versions so changes should only need to happen in one place if anything needs updating. Fixed up a lot of places that were calling : addr_t Address::GetLoadAddress(Target*); to call the Address::GetCallableLoadAddress() or Address::GetOpcodeLoadAddress() as needed. There were many places in the breakpoint code where things could go wrong for ARM if these weren't used. llvm-svn: 131878
* Fixed an issue with the sign extend code so it uses the correct m_data member.Greg Clayton2011-05-191-4/+4
| | | | llvm-svn: 131613
* Added the ability to sign extend a Scalar at any bit position for integerGreg Clayton2011-05-191-0/+68
| | | | | | | | | | | | | | types. Added the abilty to set a RegisterValue type via accessor and enum. Added the ability to read arguments for a function for ARM if you are on the first instruction in ABIMacOSX_arm. Fixed an issue where a file descriptor becoming invalid could cause an inifnite loop spin in the libedit thread. llvm-svn: 131610
* Endian patch from Kirk Beitz that allows better cross platform building.Greg Clayton2011-02-011-5/+6
| | | | llvm-svn: 124643
* Move Args.{cpp,h} and Options.{cpp,h} to Interpreter where they really belong.Jim Ingham2010-06-151-1/+1
| | | | llvm-svn: 106034
* Initial checkin of lldb code from internal Apple repo.Chris Lattner2010-06-081-0/+2084
llvm-svn: 105619
OpenPOWER on IntegriCloud