Skip to content
  1. Oct 31, 2012
  2. Apr 24, 2012
    • Enrico Granata's avatar
      This patch fixes a bug where LLDB was incorrectly setting the address-size on... · b046e032
      Enrico Granata authored
      This patch fixes a bug where LLDB was incorrectly setting the address-size on a DataExtractor to be sizeof(void*) when the ValueObject came out of the expression parser
      This worked correctly for 64-bit targets, but broke down data formatters in i386 mode. The formatters would try to read pointers out of the frozen-dried objects,
      but were unable to do so because they would try fetching 8 bytes from a DataExtractor with only 4 bytes in it. This patch fixes the issue by always making the pointer-size
      for a DataExtractor match the target setting.
      
      llvm-svn: 155418
      b046e032
  3. Feb 02, 2012
  4. Dec 22, 2011
  5. Sep 22, 2011
    • Greg Clayton's avatar
      Converted the lldb_private::Process over to use the intrusive · c14ee32d
      Greg Clayton authored
      shared pointers.
      
      Changed the ExecutionContext over to use shared pointers for
      the target, process, thread and frame since these objects can
      easily go away at any time and any object that was holding onto
      an ExecutionContext was running the risk of using a bad object.
      
      Now that the shared pointers for target, process, thread and
      frame are just a single pointer (they all use the instrusive
      shared pointers) the execution context is much safer and still
      the same size. 
      
      Made the shared pointers in the the ExecutionContext class protected
      and made accessors for all of the various ways to get at the pointers,
      references, and shared pointers.
      
      llvm-svn: 140298
      c14ee32d
  6. Jul 07, 2011
    • Greg Clayton's avatar
      Added "target variable" command that allows introspection of global · 644247c1
      Greg Clayton authored
      variables prior to running your binary. Zero filled sections now get
      section data correctly filled with zeroes when Target::ReadMemory
      reads from the object file section data.
      
      Added new option groups and option values for file lists. I still need
      to hook up all of the options to "target variable" to allow more complete
      introspection by file and shlib.
      
      Added the ability for ValueObjectVariable objects to be created with
      only the target as the execution context. This allows them to be read
      from the object files through Target::ReadMemory(...). 
      
      Added a "virtual Module * GetModule()" function to the ValueObject
      class. By default it will look to the parent variable object and
      return its module. The module is needed when we have global variables
      that have file addresses (virtual addresses that are specific to
      module object files) and in turn allows global variables to be displayed
      prior to running.
      
      Removed all of the unused proxy object support that bit rotted in 
      lldb_private::Value.
      
      Replaced a lot of places that used "FileSpec::Compare (lhs, rhs) == 0" code
      with the more efficient "FileSpec::Equal (lhs, rhs)".
      
      Improved logging in GDB remote plug-in.
      
      llvm-svn: 134579
      644247c1
  7. Jun 30, 2011
    • Greg Clayton's avatar
      Added support for finding and global variables in the SBTarget and SBModule · dea8cb4f
      Greg Clayton authored
      level in the public API. 
      
      Also modified the ValueObject values to be able to display global variables
      without having a valid running process. The globals will read themselves from
      the object file section data if there is no process, and from the process if
      there is one.
      
      Also fixed an issue where modifications for dynamic types could cause child
      values of ValueObjects to not show up if the value was unable to evaluate
      itself (children of NULL pointer objects).
      
      llvm-svn: 134102
      dea8cb4f
  8. Mar 24, 2011
  9. Feb 24, 2011
  10. Feb 17, 2011
  11. Feb 15, 2011
  12. Feb 01, 2011
  13. Jan 26, 2011
  14. Jan 25, 2011
  15. Dec 14, 2010
    • Greg Clayton's avatar
      Modified LLDB expressions to not have to JIT and run code just to see variable · 8b2fe6dc
      Greg Clayton authored
      values or persistent expression variables. Now if an expression consists of
      a value that is a child of a variable, or of a persistent variable only, we
      will create a value object for it and make a ValueObjectConstResult from it to
      freeze the value (for program variables only, not persistent variables) and
      avoid running JITed code. For everything else we still parse up and JIT code
      and run it in the inferior. 
      
      There was also a lot of clean up in the expression code. I made the 
      ClangExpressionVariables be stored in collections of shared pointers instead
      of in collections of objects. This will help stop a lot of copy constructors on
      these large objects and also cleans up the code considerably. The persistent
      clang expression variables were moved over to the Target to ensure they persist
      across process executions.
      
      Added the ability for lldb_private::Target objects to evaluate expressions.
      We want to evaluate expressions at the target level in case we aren't running
      yet, or we have just completed running. We still want to be able to access the
      persistent expression variables between runs, and also evaluate constant 
      expressions. 
      
      Added extra logging to the dynamic loader plug-in for MacOSX. ModuleList objects
      can now dump their contents with the UUID, arch and full paths being logged with
      appropriate prefix values.
      
      Thread hardened the Communication class a bit by making the connection auto_ptr
      member into a shared pointer member and then making a local copy of the shared
      pointer in each method that uses it to make sure another thread can't nuke the
      connection object while it is being used by another thread.
      
      Added a new file to the lldb/test/load_unload test that causes the test a.out file
      to link to the libd.dylib file all the time. This will allow us to test using
      the DYLD_LIBRARY_PATH environment variable after moving libd.dylib somewhere else.
      
      llvm-svn: 121745
      8b2fe6dc
  16. 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
  17. Nov 02, 2010
  18. Sep 29, 2010
    • Greg Clayton's avatar
      Fixed the forward declaration issue that was present in the DWARF parser after · 1be10fca
      Greg Clayton authored
      adding methods to C++ and objective C classes. In order to make methods, we
      need the function prototype which means we need the arguments. Parsing these
      could cause a circular reference that caused an  assertion.
      
      Added a new typedef for the clang opaque types which are just void pointers:
      lldb::clang_type_t. This appears in lldb-types.h.
      
      This was fixed by enabling struct, union, class, and enum types to only get
      a forward declaration when we make the clang opaque qual type for these
      types. When they need to actually be resolved, lldb_private::Type will call
      a new function in the SymbolFile protocol to resolve a clang type when it is
      not fully defined (clang::TagDecl::getDefinition() returns NULL). This allows
      us to be a lot more lazy when parsing clang types and keeps down the amount
      of data that gets parsed into the ASTContext for each module. 
      
      Getting the clang type from a "lldb_private::Type" object now takes a boolean
      that indicates if a forward declaration is ok:
      
          clang_type_t lldb_private::Type::GetClangType (bool forward_decl_is_ok);
          
      So function prototypes that define parameters that are "const T&" can now just
      parse the forward declaration for type 'T' and we avoid circular references in
      the type system.
      
      llvm-svn: 115012
      1be10fca
  19. Sep 28, 2010
  20. Sep 15, 2010
  21. Aug 18, 2010
    • Greg Clayton's avatar
      Changed "Error Value::GetValueAsData (...)" to set the data extractor byte · ad3843c9
      Greg Clayton authored
      order and address size correctly when the value comes from a file address.
      Values have "file" addresses when they are globals and the debug information
      specifies that they live in the object file at a given address (DWARF will
      represent this as a location "DW_OP_addr <addr>"). This causes global pointers
      to correctly extract their children on 64 bit programs.
      
      llvm-svn: 111380
      ad3843c9
  22. Aug 03, 2010
    • Greg Clayton's avatar
      Added support for objective C built-in types: id, Class, and SEL. This · b0b9fe61
      Greg Clayton authored
      involved watching for the objective C built-in types in DWARF and making sure
      when we convert the DWARF types into clang types that we use the appropriate
      ASTContext types.
      
      Added a way to find and dump types in lldb (something equivalent to gdb's 
      "ptype" command):
      
          image lookup --type <TYPENAME>
      
      This only works for looking up types by name and won't work with variables.
      It also currently dumps out verbose internal information. I will modify it
      to dump more appropriate user level info in my next submission.
      
      Hookup up the "FindTypes()" functions in the SymbolFile and SymbolVendor so
      we can lookup types by name in one or more images.
      
      Fixed "image lookup --address <ADDRESS>" to be able to correctly show all
      symbol context information, but it will only show this extra information when
      the new "--verbose" flag is used.
      
      Updated to latest LLVM to get a few needed fixes.
      
      llvm-svn: 110089
      b0b9fe61
  23. Jul 22, 2010
    • Greg Clayton's avatar
      Change over to using the definitions for mach-o types and defines to the · e1a916a7
      Greg Clayton authored
      defines that are in "llvm/Support/MachO.h". This should allow ObjectFileMachO
      and ObjectContainerUniversalMachO to be able to be cross compiled in Linux.
      
      Also did some cleanup on the ASTType by renaming it to ClangASTType and
      renaming the header file. Moved a lot of "AST * + opaque clang type *"
      functionality from lldb_private::Type over into ClangASTType.
      
      llvm-svn: 109046
      e1a916a7
  24. Jul 09, 2010
  25. Jun 08, 2010
Loading