Skip to content
  1. Feb 10, 2011
  2. Feb 09, 2011
  3. Feb 08, 2011
  4. Feb 07, 2011
  5. Feb 05, 2011
  6. Feb 04, 2011
  7. Feb 03, 2011
  8. Feb 02, 2011
    • Greg Clayton's avatar
      Modified the PluginManager to be ready for loading plug-ins from a system · 4272cc7d
      Greg Clayton authored
      LLDB plugin directory and a user LLDB plugin directory. We currently still
      need to work out at what layer the plug-ins will be, but at least we are 
      prepared for plug-ins. Plug-ins will attempt to be loaded from the 
      "/Developer/Library/PrivateFrameworks/LLDB.framework/Resources/Plugins" 
      folder, and from the "~/Library/Application Support/LLDB/Plugins" folder on
      MacOSX. Each plugin will be scanned for:
      
      extern "C" bool LLDBPluginInitialize(void);
      extern "C" void LLDBPluginTerminate(void);
      
      If at least LLDBPluginInitialize is found, the plug-in will be loaded. The
      LLDBPluginInitialize function returns a bool that indicates if the plug-in
      should stay loaded or not (plug-ins might check the current OS, current
      hardware, or anything else and determine they don't want to run on the current
      host). The plug-in is uniqued by path and added to a static loaded plug-in
      map. The plug-in scanning happens during "lldb_private::Initialize()" which
      calls to the PluginManager::Initialize() function. Likewise with termination
      lldb_private::Terminate() calls PluginManager::Terminate(). The paths for the
      plug-in directories is fetched through new Host calls:
      
          bool Host::GetLLDBPath (ePathTypeLLDBSystemPlugins, dir_spec);
          bool Host::GetLLDBPath (ePathTypeLLDBUserPlugins, dir_spec);
      
      This way linux and other systems can define their own appropriate locations
      for plug-ins to be loaded.
      
      To allow dynamic shared library loading, the Host layer has also been modified
      to include shared library open, close and get symbol:
      
          static void *
          Host::DynamicLibraryOpen (const FileSpec &file_spec, 
                                    Error &error);
      
          static Error
          Host::DynamicLibraryClose (void *dynamic_library_handle);
      
          static void *
          Host::DynamicLibraryGetSymbol (void *dynamic_library_handle, 
                                        const char *symbol_name, 
                                        Error &error);
      
      lldb_private::FileSpec also has been modified to support directory enumeration
      in an attempt to abstract the directory enumeration into one spot in the code.
      The directory enumertion function is static and takes a callback:
      
      
          typedef enum EnumerateDirectoryResult
          {
              eEnumerateDirectoryResultNext,  // Enumerate next entry in the current directory
              eEnumerateDirectoryResultEnter, // Recurse into the current entry if it is a directory or symlink, or next if not
              eEnumerateDirectoryResultExit,  // Exit from the current directory at the current level.
              eEnumerateDirectoryResultQuit   // Stop directory enumerations at any level
          };
      
          typedef FileSpec::EnumerateDirectoryResult (*EnumerateDirectoryCallbackType) (void *baton,
                                                                                        FileSpec::FileType file_type,
                                                                                        const FileSpec &spec);
      
          static FileSpec::EnumerateDirectoryResult
          FileSpec::EnumerateDirectory (const char *dir_path,
                                        bool find_directories,
                                        bool find_files,
                                        bool find_other,
                                        EnumerateDirectoryCallbackType callback,
                                        void *callback_baton);
      
      This allow clients to specify the directory to search, and specifies if only
      files, directories or other (pipe, symlink, fifo, etc) files will cause the
      callback to be called. The callback also gets to return with the action that
      should be performed after this directory entry. eEnumerateDirectoryResultNext
      specifies to continue enumerating through a directory with the next entry.
      eEnumerateDirectoryResultEnter specifies to recurse down into a directory
      entry, or if the file is not a directory or symlink/alias to a directory, then
      just iterate to the next entry. eEnumerateDirectoryResultExit specifies to 
      exit the current directory and skip any entries that might be remaining, yet
      continue enumerating to the next entry in the parent directory. And finally
      eEnumerateDirectoryResultQuit means to abort all directory enumerations at 
      all levels.
      
      Modified the Declaration class to not include column information currently
      since we don't have any compilers that currently support column based 
      declaration information. Columns support can be re-enabled with the
      additions of a #define.
      
      Added the ability to find an EmulateInstruction plug-in given a target triple
      and optional plug-in name in the plug-in manager.
      
      Fixed a few cases where opendir/readdir was being used, but yet not closedir
      was being used. Soon these will be deprecated in favor of the new directory
      enumeration call that was added to the FileSpec class.
      
      llvm-svn: 124716
      4272cc7d
  9. Feb 01, 2011
  10. Jan 29, 2011
  11. Jan 27, 2011
    • Greg Clayton's avatar
      Finally tracked down the racy condition that would hose up our debug · 7ec3d40e
      Greg Clayton authored
      sessions: When continue packet has been sent and an interrupt packet was
      quickly sent, it would get read at the same time:
      
      $c#00\x03
      
      There was an error where the packet end index was always being computed 
      incorrectly by debugserver, but it wouldn't matter if there weren't extra
      bytes on the end (the hex \x03 interrupt byte in this case). The first
      '$' last 3 bytes of the data in the packet buffer were being trimmed
      (trying to trim the '#' + checksum (#XX)) which made:
      
      c#
      
      And this would then be passed to the handle routine for the 'c' packet which
      would see an extra character at the end and assume it was going to be in the
      form c[addr] where "[addr]" was a hex address to resume at and this would
      result in a malformed packet response. This is now fixed and everything works
      great.
      
      Another issue was issuing async packets correctly by doing correct handshakes
      between the thread that wants to send the async packet, and the thread that
      is tracking the current run.
      
      Added a write lock to the communication class as well to make sure you never
      get two threads trying to write data at the same time. This wasn't happening,
      but it is a good idea to make sure it doesn't.
      
      llvm-svn: 124369
      7ec3d40e
    • Greg Clayton's avatar
      Changed the SymbolFile::FindFunction() function calls to only return · 931180e6
      Greg Clayton authored
      lldb_private::Function objects. Previously the SymbolFileSymtab subclass
      would return lldb_private::Symbol objects when it was asked to find functions.
      
      The Module::FindFunctions (...) now take a boolean "bool include_symbols" so
      that the module can track down functions and symbols, yet functions are found
      by the SymbolFile plug-ins (through the SymbolVendor class), and symbols are
      gotten through the ObjectFile plug-ins.
      
      Fixed and issue where the DWARF parser might run into incomplete class member
      function defintions which would make clang mad when we tried to make certain
      member functions with invalid number of parameters (such as an operator=
      operator that had no parameters). Now we just avoid and don't complete these
      incomplete functions.
      
      llvm-svn: 124359
      931180e6
  12. Jan 26, 2011
  13. Jan 25, 2011
  14. Jan 24, 2011
  15. Jan 23, 2011
    • Jim Ingham's avatar
      A little less noise, please. · dfac4ccd
      Jim Ingham authored
      llvm-svn: 124086
      dfac4ccd
    • Jim Ingham's avatar
      Add some more logging of broadcaster and Process. Also, protect the event... · 1e7a9ee7
      Jim Ingham authored
      Add some more logging of broadcaster and Process.  Also, protect the event broadcasting against hijacking in mid-event delivery.
      
      llvm-svn: 124084
      1e7a9ee7
    • Greg Clayton's avatar
      Added a new variant of SBTarget::Launch() that deprectates the old one that · bd82a5d2
      Greg Clayton authored
      takes separate file handles for stdin, stdout, and stder and also allows for
      the working directory to be specified.
      
      Added support to "process launch" to a new option: --working-dir=PATH. We
      can now set the working directory. If this is not set, it defaults to that
      of the process that has LLDB loaded. Added the working directory to the
      host LaunchInNewTerminal function to allows the current working directory 
      to be set in processes that are spawned in their own terminal. Also hooked this
      up to the lldb_private::Process and all mac plug-ins. The linux plug-in had its
      API changed, but nothing is making use of it yet. Modfied "debugserver" and
      "darwin-debug" to also handle the current working directory options and modified
      the code in LLDB that spawns these tools to pass the info along.
      
      Fixed ProcessGDBRemote to properly pass along all file handles for stdin, stdout
      and stderr. 
      
      After clearing the default values for the stdin/out/err file handles for
      process to be NULL, we had a crasher in UserSettingsController::UpdateStringVariable
      which is now fixed. Also fixed the setting of boolean values to be able to
      be set as "true", "yes", "on", "1" for true (case insensitive) and "false", "no",
      "off", or "0" for false.
      
      Fixed debugserver to properly handle files for STDIN, STDOUT and STDERR that are not
      already opened. Previous to this fix debugserver would only correctly open and dupe
      file handles for the slave side of a pseudo terminal. It now correctly handles
      getting STDIN for the inferior from a file, and spitting STDOUT and STDERR out to
      files. Also made sure the file handles were correctly opened with the NOCTTY flag
      for terminals.
      
      llvm-svn: 124060
      bd82a5d2
  16. Jan 22, 2011
Loading