Skip to content
  1. Jan 25, 2013
  2. Jan 24, 2013
  3. Jan 23, 2013
    • Enrico Granata's avatar
      <rdar://problem/12711206> · f7b1a34e
      Enrico Granata authored
      Extending ValueObjectDynamicValue so that it stores a TypeAndOrName instead of a TypeSP.
      This change allows us to reflect the notion that a ValueObject can have a dynamic type for which we have no debug information.
      Previously, we would coalesce that to the static type of the object, potentially losing relevant information or even getting it wrong.
      This fix ensures we can correctly report the class name for Cocoa objects whose types are hidden classes that we know nothing about (e.g. __NSArrayI for immutable arrays).
      As a side effect, our --show-types argument to frame variable no longer needs to append custom dynamic type information.
      
      llvm-svn: 173216
      f7b1a34e
  4. Jan 22, 2013
  5. Jan 21, 2013
    • Greg Clayton's avatar
      <rdar://problem/13020634> · ce1ffcf8
      Greg Clayton authored
      Fixed the 32, 16, and 8 bit pseudo regs for x86_64 (real reg of "rax" which subvalues "eax", "ax", etc...) to correctly get updated when stepping. Also fixed it so actual registers can specify what other registers must be invalidated when a register is modified. Previously, only pseudo registers could invalidate other registers.
      
      Modified the LLDB qRegisterInfo extension to the GDB remote interface to support specifying the containing registers with the new "container-regs" key whose value is a comma separated list of register numbers. Also added a "invalidate-regs" key whose value is also a comma separated list of register numbers. 
      
      Removed the hack GDBRemoteDynamicRegisterInfo::Addx86_64ConvenienceRegisters() function and modified "debugserver" to specify the registers correctly using the new "container-regs" and "invalidate-regs" keys.
      
      llvm-svn: 173096
      ce1ffcf8
    • Enrico Granata's avatar
      <rdar://problem/12437929> · 6b4ddc65
      Enrico Granata authored
      Providing a special mode of operator for "memory read -f c-str" which actually works in most common cases
      Where the old behavior would provide:
      (lldb) mem read --format s `foo`
      0x100000f5d: NULL
      
      Now we do:
      (lldb) mem read --format s `foo`
      0x100000f5d: "hello world"
      
      You can also specify a count and that many strings will be showed starting at the initial address:
      (lldb) mem read -c 2 -f c-str `foo`
      0x100000f1d: "hello world"
      0x100000f29: "short"
      
      llvm-svn: 173076
      6b4ddc65
  6. Jan 19, 2013
    • Jason Molenda's avatar
      <rdar://problem/12350715> · 4c781fd7
      Jason Molenda authored
      Modify UnwindLLDB::SearchForSavedLocationForRegister so if the register
      save locations for a register mid-stack is in another register (or in the
      same register, indicating the reg wasn't modified in this frame), don't
      return that as a found location.  Keep iterating down the array of frames
      until a concrete location/value for the register is found, or until we
      get to frame 0 where the reg value can be used as-is.
      
      If lldb was trying to backtrace a program that blew out its stack via
      recursion and the unwind instructions had some kind of 
      this-reg-is-saved-in-that-reg instruction, lldb would revert to doing 
      a recursive search for a concrete value and blow out its own stack.
      
      llvm-svn: 172887
      4c781fd7
    • Sean Callanan's avatar
      Extended LLDB to handle blocks capturing 'self' · a2868d4c
      Sean Callanan authored
      in an Objective-C class method.  Before, errors
      of the form
      
      error: cannot find interface declaration for '$__lldb_objc_class'
      
      would appear when running any expression when
      the current frame is a block that captures 'self'
      from an Objective-C class method.
      
      <rdar://problem/12905561>
      
      llvm-svn: 172880
      a2868d4c
    • Greg Clayton's avatar
      <rdar://problem/13010007> · a4d8747d
      Greg Clayton authored
      Added the ability for OS plug-ins to lazily populate the thread this. The python OS plug-in classes can now implement the following method:
      
      class OperatingSystemPlugin:
        def create_thread(self, tid, context):
          # Return a dictionary for a new thread to create it on demand
      
      This will add a new thread to the thread list if it doesn't already exist. The example code in lldb/examples/python/operating_system.py has been updated to show how this call us used.
      
      Cleaned up the code in PythonDataObjects.cpp/h:
      - renamed all classes that started with PythonData* to be Python*. 
      - renamed PythonArray to PythonList. Cleaned up the code to use inheritance where
      - Centralized the code that does ref counting in the PythonObject class to a single function.
      - Made the "bool PythonObject::Reset(PyObject *)" function be virtual so each subclass can correctly check to ensure a PyObject is of the right type before adopting the object.
      - Cleaned up all APIs and added new constructors for the Python* classes to they can all construct form:
      	- PyObject *
      	- const PythonObject &
      	- const lldb::ScriptInterpreterObjectSP &
      
      Cleaned up code in ScriptInterpreterPython:
      - Made calling python functions safer by templatizing the production of value formats. Python specifies the value formats based on built in C types (long, long long, etc), and code often uses typedefs for uint32_t, uint64_t, etc when passing arguments down to python. We will now always produce correct value formats as the templatized code will "do the right thing" all the time.
      - Fixed issues with the ScriptInterpreterPython::Locker where entering the session and leaving the session had a bunch of issues that could cause the "lldb" module globals lldb.debugger, lldb.target, lldb.process, lldb.thread, and lldb.frame to not be initialized.
      
      llvm-svn: 172873
      a4d8747d
    • Han Ming Ong's avatar
      <rdar://problem/12976277> · 4b6459f3
      Han Ming Ong authored
      Swap in index ids for thread ids in GDBRemoteCommunicationClient. Besides dealing with the async logic, I have to take care of the situation when the inferior paused as well.
      
      llvm-svn: 172869
      4b6459f3
  7. Jan 18, 2013
  8. Jan 17, 2013
    • Enrico Granata's avatar
      <rdar://problem/12786725> · bcba2b2b
      Enrico Granata authored
      If there is any alive process being debugged, the user is asked for confirmation before quitting LLDB
      This should prevent situations where the user mistakenly types "q" and LLDB slaughters their process without any mercy whatsoever
      Since it can quickly get tedious, there is a new setting on the command interpreter to disable this and replicate the previous behavior
      
      llvm-svn: 172757
      bcba2b2b
    • Enrico Granata's avatar
      Converting lambdas to plain old static function pointers · ef6b06d7
      Enrico Granata authored
      llvm-svn: 172755
      ef6b06d7
    • Enrico Granata's avatar
      Adding a custom summary for libc++ std::vector<bool> · 17fd63c6
      Enrico Granata authored
      vector<bool> is specialized and the existing general summary for vectors would lie to the user.
      Tackling libstdc++ and synthetic children is the following, less critical, part of this task
      
      llvm-svn: 172671
      17fd63c6
  9. Jan 16, 2013
    • Greg Clayton's avatar
      Removed unused variable. · 09420335
      Greg Clayton authored
      llvm-svn: 172662
      09420335
    • Greg Clayton's avatar
      Remove std::string input arguments and replace with "const char *". · b14bed80
      Greg Clayton authored
      llvm-svn: 172647
      b14bed80
    • Enrico Granata's avatar
      <rdar://problem/13021266> · bcd80b47
      Enrico Granata authored
      Adding FindFirstGlobalVariable to SBModule and SBTarget
      These calls work like FindGlobalVariables but they only return the first match found and so they can return an SBValue instead of an SBValueList for added convenience of use
      
      llvm-svn: 172636
      bcd80b47
    • Greg Clayton's avatar
      <rdar://problem/13009943> · 949e8221
      Greg Clayton authored
      Added a unique integer identifier to processes. Some systems, like JTAG or other simulators, might always assign the same process ID (pid) to the processes that are being debugged. In order for scripts and the APIs to uniquely identify the processes, there needs to be another ID. Now the SBProcess class has:
      
      uint32_t SBProcess::GetUniqueID();
      
      This integer ID will help to truly uniquely identify a process and help with appropriate caching that can be associated with a SBProcess object.
      
      llvm-svn: 172628
      949e8221
    • Sean Callanan's avatar
      Fixes to the code I just committed to reflect · caa7df49
      Sean Callanan authored
      that we now also have to ignore breakpoints
      when running the expression to collect isas.
      
      llvm-svn: 172575
      caa7df49
    • Sean Callanan's avatar
      Modified the Objective-C runtime to fetch Objective-C · 5a9cd0c8
      Sean Callanan authored
      isas and corresponding names from the underlying process
      in a manner much quicker than the current approach.
      
      The current approach accesses memory in the underlying
      process with a random-access pattern as it walks across
      the data structures associated with each isa.  This
      involves a great deal of back-and-forth with debugserver,
      resulting in performance problems, especially with iOS
      targets.
      
      The new approach attempts to run an expression in the
      target that collects the isas and names into two large
      buffers, which LLDB then collects in one shot.
      
      <rdar://problem/12914539>
      
      llvm-svn: 172574
      5a9cd0c8
    • Sean Callanan's avatar
      ClangExpressionVariable previously was not capable of · 3c495c18
      Sean Callanan authored
      handling multiple clients.  However, occasionally an
      expression must be run in the service of another
      expression, and in this case two parsers need to access
      the same list of persistent variables.
      
      To allow this, persistent variables now provide state
      for multiple parsers, and parsers must allocate, access,
      and deallocate this state by providing their own ID
      (at the moment, simply the value of the "this" pointer).
      
      <rdar://problem/12914539>
      
      llvm-svn: 172573
      3c495c18
  10. Jan 15, 2013
    • Greg Clayton's avatar
      <rdar://problem/13010909> · 0ed3e447
      Greg Clayton authored
      Don't accidentally sign extend unsigned bitfields.
      
      llvm-svn: 172506
      0ed3e447
    • Jim Ingham's avatar
      Separated the "expr --unwind-on-error" behavior into two parts, actual errors... · 184e9811
      Jim Ingham authored
      Separated the "expr --unwind-on-error" behavior into two parts, actual errors (i.e. crashes) which continue to be
      controlled by the --unwind-on-error flag, and --ignore-breakpoint which separately controls behavior when a called
      function hits a breakpoint.  For breakpoints, we don't unwind, we either stop, or ignore the breakpoint, which makes
      more sense.  
      Also make both these behaviors globally settable through "settings set".
      Also handle the case where a breakpoint command calls code that ends up re-hitting the breakpoint.  We were recursing
      and crashing.  Now we just stop without calling the second command.
      
      <rdar://problem/12986644>
      <rdar://problem/9119325>
      
      llvm-svn: 172503
      184e9811
    • Enrico Granata's avatar
      <rdar://problem/12790664> · 93d59665
      Enrico Granata authored
      Single-character Unicode data formatters
      
      llvm-svn: 172492
      93d59665
  11. Jan 14, 2013
  12. Jan 12, 2013
    • Jason Molenda's avatar
      Add ifdef LLDB_DISABLE_PYTHON around newly added use of · 1a100cd7
      Jason Molenda authored
      AddCXXSummary in FormatManager::LoadSystemFormatters(); 
      that function pulls in code that assumes python; can't
      be used without the ifdef.
      
      llvm-svn: 172300
      1a100cd7
    • Sean Callanan's avatar
      Removed the hack that uses "frame variable" to · 0bf0bafb
      Sean Callanan authored
      evaluate expressions.  The expression parser and
      IR interpreter are now fully capable of evaluating
      expressions with as much (or better) fidelity.
      
      <rdar://problem/12879364>
      
      llvm-svn: 172293
      0bf0bafb
    • Greg Clayton's avatar
      Don't always strip the first extension from the module basename when looking... · 399bf618
      Greg Clayton authored
      Don't always strip the first extension from the module basename when looking for python scripts. Now we take a name like "a.b.c" and look for scripts that are "a_b_c.py", "a_b.py" and "a.py" inside the dSYM.
      
      llvm-svn: 172291
      399bf618
    • Enrico Granata's avatar
      <rdar://problem/12239827> · e274088d
      Enrico Granata authored
      Making a summary for std::wstring as provided by libstdc++ along with a relevant test case
      
      llvm-svn: 172286
      e274088d
    • Enrico Granata's avatar
      <rdar://problem/12239827> · 3309d881
      Enrico Granata authored
      Providing a data formatter for libc++ std::wstring
      In the process, refactoring the std::string data formatter to be written in C++ so that commonalities between the two can be exploited
      Also, providing a new API on the ValueObject to navigate a hierarchy by index-path
      Lastly, an appropriate test case is included
      
      llvm-svn: 172282
      3309d881
    • Greg Clayton's avatar
      <rdar://problem/12973809> · 91c0e749
      Greg Clayton authored
      Fixed an issue with the auto loading of script resources in debug info files. Any platform can add support for this, and on MacOSX we allow dSYM files to contain python modules that get automatically loaded when a dSYM file is associated with an executable or shared library. 
      
      The modifications will now:
      - Let the module locate the symbol file naturally instead of using a function that only works in certain cases. This helps us to locate the script resources as long as the dSYM file can be found.
      - Don't try and do any of this if the script interpreter has scripting disabled.
      - Allow more than one scripting resource to be found in a symbol file by returning the list
      - Load the scripting resources when a symbol file is added via the "target symbols add" command.
      - Be smarter about matching the dSYM mach-o file to an existing executable in the target images by stripping extensions on the symfile basname if needed.
      
      llvm-svn: 172275
      91c0e749
  13. Jan 11, 2013
    • Greg Clayton's avatar
      <rdar://problem/12990038> · 1e0c8840
      Greg Clayton authored
      Fixed an issue where the platform auto select code was changing the architecture and causing the wrong architecture to be assigned to the target.
      
      llvm-svn: 172251
      1e0c8840
    • Greg Clayton's avatar
      Modified Value.cpp to share the code that gets the values as bytes... · c0e8a85e
      Greg Clayton authored
      Modified Value.cpp to share the code that gets the values as bytes (Value::GetValueAsData()) so now Value::ResolveValue() doesn't do its own thing by reading memory directly.
      
      Also modified the Value class so that you can evaluate expressions without a process, yet with some sections loaded in the target. This allows casting pointers that are in data sections to types and being able to evaluate expressions in the data. For example:
      
      (lldb) target create a.out
      (lldb) target modules load --file a.out --slide 0
      ... find address of something in data ...
      (lldb) script
      expr_opts = lldb.SBExpressionOptions()
      v = lldb.target.EvaluateExpression('(foo *)0x1230000', expr_opts)
      print v
      vv = lldb.value(v)
      print v.pt.x
      
      Above we were able to cast a pointer to an address which was in a.out's data
      section and print out entire structures and navigate to the child ivars of the expression.
      
      llvm-svn: 172227
      c0e8a85e
    • Enrico Granata's avatar
      Making the Unicode formatters visually nicer by using the same prefix... · 2500e767
      Enrico Granata authored
      Making the Unicode formatters visually nicer by using the same prefix characters as the compiler expects in C++ code
      Also, marking the Unicode data formatters test cases as dataformatter related for the benefit for the --category flag in dotest.py
      
      llvm-svn: 172167
      2500e767
    • Enrico Granata's avatar
      <rdar://problem/11383764> · 3835204a
      Enrico Granata authored
      Making a data formatter for wchar_t *
      
      llvm-svn: 172165
      3835204a
  14. Jan 10, 2013
    • Enrico Granata's avatar
      <rdar://problem/12725746> · f68df12f
      Enrico Granata authored
      Providing data formatters for char16_t* and char32_t* C++11-style Unicode strings
      Using this chance to refactor the UTF data reader used for data formatters for added generality
      Added a relevant test case
      
      llvm-svn: 172119
      f68df12f
    • Enrico Granata's avatar
      <rdar://problem/11146929> · c921e34c
      Enrico Granata authored
      Enabling support for the wchar_t type.
      Without the proper language option setup, clang's ASTContexts will be configured to have wchar_t == int
      This patch enables the correct options to make sure that we report wchar_t as itself
      Added a test case to make sure we do not regress 
      
      Adding files missing from the previous commit
      
      llvm-svn: 172039
      c921e34c
  15. Jan 09, 2013
Loading