Skip to content
  1. Nov 13, 2010
    • Greg Clayton's avatar
      Modified the lldb_private::Type clang type resolving code to handle three · 526e5afb
      Greg Clayton authored
      cases when getting the clang type:
      - need only a forward declaration
      - need a clang type that can be used for layout (members and args/return types)
      - need a full clang type
      
      This allows us to partially parse the clang types and be as lazy as possible.
      The first case is when we just need to declare a type and we will complete it
      later. The forward declaration happens only for class/union/structs and enums.
      The layout type allows us to resolve the full clang type _except_ if we have
      any modifiers on a pointer or reference (both R and L value). In this case
      when we are adding members or function args or return types, we only need to
      know how the type will be laid out and we can defer completing the pointee
      type until we later need it. The last type means we need a full definition for
      the clang type.
      
      Did some renaming of some enumerations to get rid of the old "DC" prefix (which
      stands for DebugCore which is no longer around).
      
      Modified the clang namespace support to be almost ready to be fed to the
      expression parser. I made a new ClangNamespaceDecl class that can carry around
      the AST and the namespace decl so we can copy it into the expression AST. I
      modified the symbol vendor and symbol file plug-ins to use this new class.
      
      llvm-svn: 118976
      526e5afb
  2. Nov 10, 2010
  3. Nov 09, 2010
    • Greg Clayton's avatar
      Fixed an issue in the DWARF parser that was causing forward declarations · c615ce49
      Greg Clayton authored
      to not get resolved.
      
      Fixed the "void **isa_ptr" variable inside the objective C verifier to start
      with a '$' character so we don't go looking for it in our program.
      
      Moved the lookup for "$__lldb_class" into the part that knows we are looking
      for internal types that start with a '$'.
      
      llvm-svn: 118488
      c615ce49
  4. Nov 08, 2010
  5. Nov 06, 2010
    • Greg Clayton's avatar
      Modified all logging calls to hand out shared pointers to make sure we · 2d4edfbc
      Greg Clayton authored
      don't crash if we disable logging when some code already has a copy of the
      logger. Prior to this fix, logs were handed out as pointers and if they were
      held onto while a log got disabled, then it could cause a crash. Now all logs
      are handed out as shared pointers so this problem shouldn't happen anymore.
      We are also using our new shared pointers that put the shared pointer count
      and the object into the same allocation for a tad better performance.
      
      llvm-svn: 118319
      2d4edfbc
    • Sean Callanan's avatar
      Fixed a bug where variables in the source operands · c70f8ff4
      Sean Callanan authored
      of store statements were not being marked for
      resolution.
      
      llvm-svn: 118316
      c70f8ff4
  6. Nov 05, 2010
  7. Nov 04, 2010
    • Greg Clayton's avatar
      Added support for loading and unloading shared libraries. This was done by · 8f343b09
      Greg Clayton authored
      adding support into lldb_private::Process:
      
          virtual uint32_t
          lldb_private::Process::LoadImage (const FileSpec &image_spec, 
                                            Error &error);
      
          virtual Error
          lldb_private::Process::UnloadImage (uint32_t image_token);
      
      There is a default implementation that should work for both linux and MacOSX.
      This ability has also been exported through the SBProcess API:
      
          uint32_t
          lldb::SBProcess::LoadImage (lldb::SBFileSpec &image_spec, 
                                      lldb::SBError &error);
      
          lldb::SBError
          lldb::SBProcess::UnloadImage (uint32_t image_token);
      
      Modified the DynamicLoader plug-in interface to require it to be able to 
      tell us if it is currently possible to load/unload a shared library:
      
          virtual lldb_private::Error
          DynamicLoader::CanLoadImage () = 0;
      
      This way the dynamic loader plug-ins are allows to veto whether we can 
      currently load a shared library since the dynamic loader might know if it is
      currenlty loading/unloading shared libraries. It might also know about the
      current host system and know where to check to make sure runtime or malloc
      locks are currently being held.
      
      Modified the expression parser to have ClangUserExpression::Evaluate() be
      the one that causes the dynamic checkers to be loaded instead of other code
      that shouldn't have to worry about it.
      
      llvm-svn: 118227
      8f343b09
    • Sean Callanan's avatar
      Re-enabled LLDB's pointer checkers, and moved the · 10af7c43
      Sean Callanan authored
      implementation of the Objective-C object checkers
      into the Objective-C language runtime.
      
      llvm-svn: 118226
      10af7c43
  8. Nov 03, 2010
  9. Nov 02, 2010
  10. Nov 01, 2010
  11. Oct 29, 2010
  12. Oct 27, 2010
    • Greg Clayton's avatar
      Updated the lldb_private::Flags class to have better method names and made · 73b472d4
      Greg Clayton authored
      all of the calls inlined in the header file for better performance.
      
      Fixed the summary for C string types (array of chars (with any combo if
      modifiers), and pointers to chars) work in all cases.
      
      Fixed an issue where a forward declaration to a clang type could cause itself
      to resolve itself more than once if, during the resolving of the type itself
      it caused something to try and resolve itself again. We now remove the clang
      type from the forward declaration map in the DWARF parser when we start to 
      resolve it and avoid this additional call. This should stop any duplicate
      members from appearing and throwing all the alignment of structs, unions and
      classes.
      
      llvm-svn: 117437
      73b472d4
  13. Oct 26, 2010
  14. Oct 24, 2010
    • Sean Callanan's avatar
      Added a hack so that "unichar" is resolved to · 64186e7f
      Sean Callanan authored
      "unsigned short."  As discussed in the comments,
      this is pending a better solution to the problem
      of types not in the debug information but readily
      available through headers.
      
      llvm-svn: 117247
      64186e7f
  15. Oct 23, 2010
  16. Oct 22, 2010
  17. Oct 20, 2010
  18. Oct 19, 2010
  19. Oct 18, 2010
    • Greg Clayton's avatar
      Added a new Host call to find LLDB related paths: · dd36defd
      Greg Clayton authored
          static bool
          Host::GetLLDBPath (lldb::PathType path_type, FileSpec &file_spec);
          
      This will fill in "file_spec" with an appropriate path that is appropriate
      for the current Host OS. MacOSX will return paths within the LLDB.framework,
      and other unixes will return the paths they want. The current PathType
      enums are:
      
      typedef enum PathType
      {
          ePathTypeLLDBShlibDir,          // The directory where the lldb.so (unix) or LLDB mach-o file in LLDB.framework (MacOSX) exists
          ePathTypeSupportExecutableDir,  // Find LLDB support executable directory (debugserver, etc)
          ePathTypeHeaderDir,             // Find LLDB header file directory
          ePathTypePythonDir              // Find Python modules (PYTHONPATH) directory
      } PathType;
      
      All places that were finding executables are and python paths are now updated
      to use this Host call.
      
      Added another new host call to launch the inferior in a terminal. This ability
      will be very host specific and doesn't need to be supported on all systems.
      MacOSX currently will create a new .command file and tell Terminal.app to open
      the .command file. It also uses the new "darwin-debug" app which is a small
      app that uses posix to exec (no fork) and stop at the entry point of the 
      program. The GDB remote plug-in is almost able launch a process and attach to
      it, it currently will spawn the process, but it won't attach to it just yet.
      This will let LLDB not have to share the terminal with another process and a
      new terminal window will pop up when you launch. This won't get hooked up
      until we work out all of the kinks. The new Host function is:
      
          static lldb::pid_t
          Host::LaunchInNewTerminal (
              const char **argv,   // argv[0] is executable
              const char **envp,
              const ArchSpec *arch_spec,
              bool stop_at_entry,
              bool disable_aslr);
      
      Cleaned up FileSpec::GetPath to not use strncpy() as it was always zero 
      filling the entire path buffer.
      
      Fixed an issue with the dynamic checker function where I missed a '$' prefix
      that should have been added.
      
      llvm-svn: 116690
      dd36defd
  20. Oct 16, 2010
    • Greg Clayton's avatar
      prefix more stuff with '$' to make sure we don't go trying to lookup anything · d59cea2d
      Greg Clayton authored
      we don't need to.
      
      llvm-svn: 116676
      d59cea2d
    • Greg Clayton's avatar
      Made many ConstString functions inlined in the header file. · 7b462cc1
      Greg Clayton authored
      Changed all of our synthesized "___clang" functions, types and variables
      that get used in expressions over to have a prefix of "$_lldb". Now when we
      do name lookups we can easily switch off of the first '$' character to know
      if we should look through only our internal (when first char is '$') stuff,
      or when we should look through program variables, functions and types.
      
      Converted all of the clang expression code over to using "const ConstString&" 
      values for names instead of "const char *" since there were many places that
      were converting the "const char *" names into ConstString names and them
      throwing them away. We now avoid making a lot of ConstString conversions and
      benefit from the quick comparisons in a few extra spots.
      
      Converted a lot of code from LLVM coding conventions into LLDB coding 
      conventions.
      
      llvm-svn: 116634
      7b462cc1
  21. Oct 15, 2010
    • Greg Clayton's avatar
      Skip checking for a bunch of built-ins when evaluating an expression. · ee4b5dd6
      Greg Clayton authored
      llvm-svn: 116565
      ee4b5dd6
    • Jim Ingham's avatar
      Added support for breakpoint conditions. I also had to separate the "run the... · 36f3b369
      Jim Ingham authored
      Added support for breakpoint conditions.  I also had to separate the "run the expression" part of ClangFunction::Execute from the "Gather the expression result" so that in the case of the Breakpoint condition I can move the condition evaluation into the normal thread plan processing.
      
      Also added support for remembering the "last set breakpoint" so that "break modify" will act on the last set breakpoint.
      
      llvm-svn: 116542
      36f3b369
    • Greg Clayton's avatar
      Fixed an expression parsing issue where if you were stopped somewhere without · 8f92f0a3
      Greg Clayton authored
      debug information and you evaluated an expression, a crash would occur as a
      result of an unchecked pointer.
      
      Added the ability to get the expression path for a ValueObject. For a rectangle
      point child "x" the expression path would be something like: "rect.top_left.x".
      This will allow GUI and command lines to get ahold of the expression path for
      a value object without having to explicitly know about the hierarchy. This
      means the ValueObject base class now has a "ValueObject *m_parent;" member.
      All ValueObject subclasses now correctly track their lineage and are able
      to provide value expression paths as well.
      
      Added a new "--flat" option to the "frame variable" to allow for flat variable
      output. An example of the current and new outputs:
      
      (lldb) frame variable 
      argc = 1
      argv = 0x00007fff5fbffe80
      pt = {
        x = 2
        y = 3
      }
      rect = {
        bottom_left = {
          x = 1
          y = 2
        }
        top_right = {
          x = 3
          y = 4
        }
      }
      (lldb) frame variable --flat 
      argc = 1
      argv = 0x00007fff5fbffe80
      pt.x = 2
      pt.y = 3
      rect.bottom_left.x = 1
      rect.bottom_left.y = 2
      rect.top_right.x = 3
      rect.top_right.y = 4
      
      
      As you can see when there is a lot of hierarchy it can help flatten things out.
      Also if you want to use a member in an expression, you can copy the text from
      the "--flat" output and not have to piece it together manually. This can help
      when you want to use parts of the STL in expressions:
      
      (lldb) frame variable --flat
      argc = 1
      argv = 0x00007fff5fbffea8
      hello_world._M_dataplus._M_p = 0x0000000000000000
      (lldb) expr hello_world._M_dataplus._M_p[0] == '\0'
      
      llvm-svn: 116532
      8f92f0a3
  22. Oct 13, 2010
    • Greg Clayton's avatar
      Fixed C++ class clang type creation and display by making sure we omit · 24739923
      Greg Clayton authored
      artifical members (like the vtable pointer member that shows up in the DWARF).
      We were adding this to each class which was making all member variables be off
      by a pointer size.
      
      Added a test case so we can track this with "test/forward".
      
      Fixed the type name index in DWARF to include all the types after finding
      some types were being omitted due to the DW_AT_specification having the
      DW_AT_declaration attribute which was being read into the real type instances
      when there were forward declarations in the DWARF, causing the type to be
      omitted. We now check to make sure any DW_AT_declaration values are only
      respected when parsing types if the attribute is from the current DIE.
      
      After fixing the missing types, we ran into some issues with the expression
      parser finding duplicate entries for __va_list_tag since they are built in
      types and would result in a "duplicate __va_list_tag definition" error. We
      are now just ignoring this name during lookup, but we will need to see if
      we can get the name lookup function to not get called in these cases.
      
      Fixed an issue that would cause an assertion where DW_TAG_subroutine_types
      that had no children, would not properly make a clang function type of:
      "void (*) (void)".
      
      llvm-svn: 116392
      24739923
  23. Oct 12, 2010
  24. Oct 08, 2010
  25. Oct 07, 2010
Loading