Skip to content
  1. May 25, 2011
    • Johnny Chen's avatar
      3cd1e551
    • Greg Clayton's avatar
      Bumping Xcode project versions for lldb-55 and debugserver-139. · 60d4d9eb
      Greg Clayton authored
      llvm-svn: 132067
      60d4d9eb
    • Greg Clayton's avatar
      Added some comments. · 1cbc52cd
      Greg Clayton authored
      llvm-svn: 132066
      1cbc52cd
    • Greg Clayton's avatar
      ABI plug-ins must implement the following pure virtual functions: · 9b72eb71
      Greg Clayton authored
      virtual bool
      ABI::StackUsesFrames () = 0;
      
      Should return true if your ABI uses frames when doing stack backtraces. This
      means a frame pointer is used that points to the previous stack frame in some
      way or another.
      
      virtual bool
      ABI::CallFrameAddressIsValid (lldb::addr_t cfa) = 0;
      
      Should take a look at a call frame address (CFA) which is just the stack
      pointer value upon entry to a function. ABIs usually impose alignment
      restrictions (4, 8 or 16 byte aligned), and zero is usually not allowed.
      This function should return true if "cfa" is valid call frame address for
      the ABI, and false otherwise. This is used by the generic stack frame unwinding
      code to help determine when a stack ends.
      
      virtual bool
      ABI::CodeAddressIsValid (lldb::addr_t pc) = 0;    
      
      Validates a possible PC value and returns true if an opcode can be at "pc".
      Some ABIs or architectures have fixed width instructions and must be aligned
      to a 2 or 4 byte boundary. "pc" can be an opcode or a callable address which
      means the load address might be decorated with extra bits (such as bit zero
      to indicate a thumb function call for ARM targets), so take this into account
      when returning true or false. The address should also be validated to ensure
      it is a valid address for the address size of the inferior process. 32 bit
      targets should make sure the address is less than UINT32_MAX.
      
      Modified UnwindLLDB to use the new ABI functions to help it properly terminate
      stacks.
      
      
      Modified the mach-o function that extracts dependent files to not resolve the
      path as the paths inside a binary might not match those on the current
      host system.
      
      llvm-svn: 132021
      9b72eb71
    • Johnny Chen's avatar
      Added comment. · 624ddf2f
      Johnny Chen authored
      llvm-svn: 132019
      624ddf2f
    • Johnny Chen's avatar
      Comment change. · 2f1ee9a0
      Johnny Chen authored
      llvm-svn: 132018
      2f1ee9a0
    • Johnny Chen's avatar
      Fix a potential bug resulting from the wrong assumption that SWIG puts out the __init__ · 93e7b3a8
      Johnny Chen authored
      method definition before other method definitions.  Instead, do without it and process
      the class with IsValid() method definition in all possible states.
      
      llvm-svn: 132016
      93e7b3a8
  2. May 24, 2011
  3. May 23, 2011
    • Johnny Chen's avatar
      Fix usage comment. · a542f100
      Johnny Chen authored
      llvm-svn: 131925
      a542f100
    • Johnny Chen's avatar
      Add a Python utility to help convert the Mail.app saved 'Raw Message Source'... · b5aa97ec
      Johnny Chen authored
      Add a Python utility to help convert the Mail.app saved 'Raw Message Source' .eml file to a git-am friendly file.
      
      llvm-svn: 131924
      b5aa97ec
    • Sean Callanan's avatar
      This commit integrates support for the LLVM MCJIT · 79763a42
      Sean Callanan authored
      into the mainline LLDB codebase.  MCJIT introduces
      API improvements and better architectural support.
      
      This commit adds a new subsystem, the
      ProcessDataAllocator, which is responsible for
      performing static data allocations on behalf of the
      IR transformer.  MCJIT currently does not support
      the relocations required to store the constant pool
      in the same allocation as the function body, so we
      allocate a heap region separately and redirect
      static data references from the expression to that
      heap region in a new IR modification pass.
      
      This patch also fixes bugs in the IR
      transformations that were exposed by the transition
      to the MCJIT.  Finally, the patch also pulls in a
      more recent revision of LLVM so that the MCJIT is
      available for use.
      
      llvm-svn: 131923
      79763a42
    • Greg Clayton's avatar
      Calculate the dyld slide from all in memory info without having to use the · cdbf8667
      Greg Clayton authored
      lldb module.
      
      llvm-svn: 131914
      cdbf8667
    • Johnny Chen's avatar
      Add more workarounds for "bl #..." and "blx #..." where the ARMAsmParser fails to parse/recognize · 54dc3006
      Johnny Chen authored
      the (PC-relative) immediate operand.
      
      llvm-svn: 131913
      54dc3006
    • Greg Clayton's avatar
      Fixed an issue in the EmulateInstructionARM there the IT opcode was trying to · 8d400e17
      Greg Clayton authored
      parse NOP instructions. I added the new table entries for the NOP for the
      plain NOP, Yield, WFE, WFI, and SEV variants. Modified the opcode emulation
      function EmulateInstructionARM::EmulateMOVRdSP(...) to notify us when it is
      creating a frame. Also added an abtract way to detect the frame pointer 
      register for both the standard ARM ABI and for Darwin.
      
      Fixed GDBRemoteRegisterContext::WriteAllRegisterValues(...) to correctly be
      able to individually write register values back if case the 'G' packet is
      not implemented or returns an error.
      
      Modified the StopInfoMachException to "trace" stop reasons. On ARM we currently
      use the BVR/BCR register pairs to say "stop when the PC is not equal to the 
      current PC value", and this results in a EXC_BREAKPOINT mach exception that
      has 0x102 in the code.
      
      Modified debugserver to create the short option string from long option
      definitions to make sure it doesn't get out of date. The short option string
      was missing many of the newer short option values due to a modification of
      the long options defs, and not modifying the short option string.
      
      llvm-svn: 131911
      8d400e17
    • Johnny Chen's avatar
      Fix the Align() utility which tries to align the raw disassembly with the edis'ed disassembly · feb961b8
      Johnny Chen authored
      so that both the opcode and the operands are aligned with the rest of output.
      
      Comment out the code related to force_raw mode when disassembling arm or thumb for now.
      It testing goes ok, we will remove the section of code related to force_raw.
      
      llvm-svn: 131910
      feb961b8
    • Greg Clayton's avatar
      Added new lldb_private::Process memory read/write functions to stop a bunch · f3ef3d2a
      Greg Clayton authored
      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
      f3ef3d2a
  4. May 22, 2011
    • Jim Ingham's avatar
      Change the m_update_state to an int, and only trigger the "on removal" · a8604693
      Jim Ingham authored
      action the second time the event is removed (the first is the internal -> 
      external transition, the second when it is pulled off the public event
      queue, and further times when it is put back because we are faking a
      stop reason to hide the expression evaluation stops.
      
      llvm-svn: 131869
      a8604693
    • Caroline Tice's avatar
      · 93e0f19f
      Caroline Tice authored
      Change the command 'breakpoint command remove' to 'breakpoint command delete',
      to be more consistent with other commands.
      
      llvm-svn: 131848
      93e0f19f
    • Greg Clayton's avatar
      Added functions to lldb_private::Address to set an address from a load address · cff851ab
      Greg Clayton authored
      and set the address as an opcode address or as a callable address. This is
      needed in various places in the thread plans to make sure that addresses that
      might be found in symbols or runtime might already have extra bits set (ARM/Thumb).
      The new functions are:
      
      bool
      Address::SetCallableLoadAddress (lldb::addr_t load_addr, Target *target);
      
      bool
      Address::SetOpcodeLoadAddress (lldb::addr_t load_addr, Target *target);
      
      SetCallableLoadAddress will initialize a section offset address if it can,
      and if so it might possibly set some bits in the address to make the address
      callable (bit zero might get set for ARM for Thumb functions).
      
      SetOpcodeLoadAddress will initialize a section offset address using the
      specified target and it will strip any special address bits if needed 
      depending on the target.
      
      Fixed the ABIMacOSX_arm::GetArgumentValues() function to require arguments
      1-4 to be in the needed registers (previously this would incorrectly fallback
      to the stack) and return false if unable to get the register values. The
      function was also modified to first look for the generic argument registers
      and then fall back to finding the registers by name.
      
      Fixed the objective trampoline handler to use the new Address::SetOpcodeLoadAddress
      function when needed to avoid address mismatches when trying to complete 
      steps into objective C methods. Make similar fixes inside the
      AppleThreadPlanStepThroughObjCTrampoline::ShouldStop() function.
      
      Modified ProcessGDBRemote::BuildDynamicRegisterInfo(...) to be able to deal with
      the new generic argument registers.
      
      Modified RNBRemote::HandlePacket_qRegisterInfo() to handle the new generic
      argument registers on the debugserver side.
      
      Modified DNBArchMachARM::NumSupportedHardwareBreakpoints() to be able to 
      detect how many hardware breakpoint registers there are using a darwin sysctl.
      Did the same for hardware watchpoints in 
      DNBArchMachARM::NumSupportedHardwareWatchpoints().
      
      llvm-svn: 131834
      cff851ab
  5. May 21, 2011
  6. May 20, 2011
    • Charles Davis's avatar
      Better way to build the CFCPP sources as part of liblldbHostMacOSX. · 0b965227
      Charles Davis authored
      llvm-svn: 131742
      0b965227
    • Charles Davis's avatar
      When installing the binary part of the LLDB Python modules, symlink to the · dae31daf
      Charles Davis authored
      installed liblldb instead of the built one. Now Python support won't break if
      you clean your build directories.
      
      llvm-svn: 131741
      dae31daf
    • Johnny Chen's avatar
      Workaround the issue of llvm:tB (A8.6.16 B Encoding T2) not being processed as · 02cefc2c
      Johnny Chen authored
      a branch instruction and therefore the symbolic information is not being dumped for
      non-raw mode.
      
      The problem is that the ARMAsmParser is not recognizing the "#274" in "b	#274"
      as a valid operand when doing disassembly in non-raw mode.
      
      llvm-svn: 131738
      02cefc2c
    • Stephen Wilson's avatar
      Do not parse DIE's outside a compilation units range. · 8063a4a4
      Stephen Wilson authored
      In DWARFCompileUnit::ExtractDIEsIfNeeded we are relying on a compilation units
      DIEs to be terminated by a null entry.  I think the standard is fairly clear
      that all sibling chains are to be terminated by null, but at least gcc 4.5.2
      disagrees -- the top level chain drops the final entry.  This results in us
      interpreting the next compilation unit header as a DIE.
      
      Regardless of whether gcc is right or wrong, we should not overstep a
      compilation units extent.  This patch ensures that we do not attempt to extract
      a DIE beyond the length specified for a given DWARFCompileUnit by ensuring our
      current offset is strictly less than the start of the next CU.
      
      llvm-svn: 131721
      8063a4a4
    • Charles Davis's avatar
      Fix typo. Stupid 'n' key... · f663741d
      Charles Davis authored
      llvm-svn: 131720
      f663741d
    • Charles Davis's avatar
      Some makefile fixes for the Interpreter: · 53c976d9
      Charles Davis authored
      - Make the generation of LLDBWrapPython.cpp respect the VERBOSE setting.
      - Use -classic mode when generating. LLDPWrapPython.cpp #errors out if -classic
        wasn't set when it was generated with recent Swig.
      - Install the Python modules. Now we shouldn't get loads of Python errors
        trying to run LLDB.
      
      Last of my build fixes. The LLDB that I built works, except that I can't debug
      anything with it until debugserver gets built.
      
      llvm-svn: 131719
      53c976d9
    • Charles Davis's avatar
      Fix the Host library build on Mac OS X with makefiles. · 31341480
      Charles Davis authored
      llvm-svn: 131718
      31341480
    • Greg Clayton's avatar
      Fixed an issue in GDBRemoteCommunicationClient where we weren't listening to · 5fe15d2d
      Greg Clayton authored
      the "payload_length" argument for the "payload" packet data. This meant we 
      could end up sending random extra data with a packet depending on how the 
      packet was constructed.
      
      Fixed GDBRemoteRegisterContext to properly save and restore all registers. 
      Previous fixes had been added to work around the "payload_length" issues fixed
      above and aren't needed anymore.
      
      Fix logging in GDBRemoteCommunication to make sure we log the correct packet
      data being sent by using the packet length when dumping the packet contents.
      
      Added register definitions for 'arm-lldb' in the "disasm-gdb-remote.pl" script
      so if you have a register dump from the GDB remote that doesn't include the
      qRegisterInfo packets, you can manually tell the script which registers are
      which.
      
      llvm-svn: 131715
      5fe15d2d
    • Greg Clayton's avatar
      Added a perl script to disassemble, into human readable form, the GDB remote · e51dc6f3
      Greg Clayton authored
      packet output from "log enable gdb-remote packets". This should help people
      track down and see what is going wrong more easily when you have log output
      that includes GDB remote packets.
      
      llvm-svn: 131713
      e51dc6f3
Loading