- Feb 10, 2011
-
-
Greg Clayton authored
llvm-svn: 125269
-
Caroline Tice authored
input reader. Always make sure the input reader stack is not empty before trying to get the top element from the stack. llvm-svn: 125255
-
- Feb 09, 2011
-
-
Greg Clayton authored
llvm-svn: 125199
-
Greg Clayton authored
layer a bit more. llvm-svn: 125149
-
- Feb 08, 2011
-
-
Greg Clayton authored
llvm-svn: 125093
-
Greg Clayton authored
the lldb/source/Host/*.cpp and lldb/source/Host/*/*.cpp directories. The only offenders are the command completion and the StreamFile.cpp. I will soon modify StreamFile.cpp to use a lldb/source/Host/File.cpp so that all file open, close, read, write, seek, are abstracted into the host layer as well, then this will be gone. llvm-svn: 125082
-
Jim Ingham authored
llvm-svn: 125080
-
Greg Clayton authored
We have a common unix implementation in lldb/source/Host/common/FileSpec.cpp. llvm-svn: 125078
-
Greg Clayton authored
integer. Modified patch from Kirk Beitz. llvm-svn: 125067
-
Greg Clayton authored
flags such that symbols can be searched for within a shared library if desired. Platforms that support the RTLD_FIRST flag can still take advantage of their quicker lookups, and other platforms can still get the same fucntionality with a little extra work. Also changed LLDB_CONFIG flags over to either being defined, or not being defined to stay in line with current open source practices and to prepare for using autoconf or cmake to configure LLDB builds. llvm-svn: 125064
-
Greg Clayton authored
where the implementation is hidden in the host layer. This avoids a slew of "#if LLDB_CONFIG_TERMIOS_SUPPORTED" statements in the code and keeps things cleaner. llvm-svn: 125057
-
- Feb 07, 2011
-
-
Jim Ingham authored
llvm-svn: 125031
-
Greg Clayton authored
#include "lldb/Host/Config.h" Or the LLDB_CONFIG_TERMIOS_SUPPORTED defined won't be set. I will fix all of this Termios stuff later today by moving lldb/Core/TTYState.* into the host layer and then we conditionalize all of this inside TTYState.cpp and then we get rid of LLDB_CONFIG_TERMIOS_SUPPORTED all together. Typically, when we start to see too many "#if LLDB_CONFIG_XXXX" preprocessor directives, this is a good indicator that something needs to be moved over to the host layer. TTYState can be modified to do all of the things that many areas of the code are currently doing, and it will avoid all of the preprocessor noise. llvm-svn: 125027
-
Greg Clayton authored
llvm-svn: 125024
-
Greg Clayton authored
that aren't always available (sometimes d_namlen or d_reclen). Now strlen is used to avoid such issues. llvm-svn: 125008
-
- Feb 05, 2011
-
-
Greg Clayton authored
llvm-svn: 124944
-
Greg Clayton authored
llvm-svn: 124943
-
Greg Clayton authored
llvm-svn: 124931
-
Greg Clayton authored
Patch from Kirk Beitz. llvm-svn: 124927
-
- Feb 04, 2011
-
-
Greg Clayton authored
llvm-svn: 124897
-
Greg Clayton authored
build issues on MinGW. llvm-svn: 124888
-
Greg Clayton authored
(lldb) process connect <remote-url> Currently when you specify a file with the file command it helps us to find a process plug-in that is suitable for debugging. If you specify a file you can rely upon this to find the correct debugger plug-in: % lldb a.out Current executable set to 'a.out' (x86_64). (lldb) process connect connect://localhost:2345 ... If you don't specify a file, you will need to specify the plug-in name that you wish to use: % lldb (lldb) process connect --plugin process.gdb-remote connect://localhost:2345 Other connection URL examples: (lldb) process connect connect://localhost:2345 (lldb) process connect tcp://127.0.0.1 (lldb) process connect file:///dev/ttyS1 We are currently treating the "connect://host:port" as a way to do raw socket connections. If there is a URL for this already, please let me know and we will adopt it. So now you can connect to a remote debug server with the ProcessGDBRemote plug-in. After connection, it will ask for the pid info using the "qC" packet and if it responds with a valid process ID, it will be equivalent to attaching. If it response with an error or invalid process ID, the LLDB process will be in a new state: eStateConnected. This allows us to then download a program or specify the program to run (using the 'A' packet), or specify a process to attach to (using the "vAttach" packets), or query info about the processes that might be available. llvm-svn: 124846
-
Caroline Tice authored
llvm-svn: 124836
-
- Feb 03, 2011
-
-
Caroline Tice authored
llvm-svn: 124810
-
- Feb 02, 2011
-
-
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
-
- Feb 01, 2011
-
-
Greg Clayton authored
llvm-svn: 124644
-
Greg Clayton authored
llvm-svn: 124643
-
Greg Clayton authored
source files around into the places they need to go. llvm-svn: 124631
-
- Jan 29, 2011
-
-
Greg Clayton authored
by name or by pid (with or without waiting for a process to launch) and catch the response asynchronously. llvm-svn: 124530
-
- Jan 27, 2011
-
-
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
-
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
-
- Jan 26, 2011
-
-
Greg Clayton authored
llvm-svn: 124250
-
- Jan 25, 2011
-
-
Greg Clayton authored
Removed incorrect enumeration from switch. llvm-svn: 124232
-
Greg Clayton authored
Fixed bug reported by Ken Ryall. llvm-svn: 124231
-
- Jan 24, 2011
-
-
Jim Ingham authored
Add a method to StreamFile to line buffer the file. Use that in "log enable -f file" to line buffer the log output. llvm-svn: 124107
-
- Jan 23, 2011
-
-
Jim Ingham authored
llvm-svn: 124086
-
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
-
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
-
- Jan 22, 2011
-
-
Jim Ingham authored
Make "log enable -v" work. We were only checking the log's stream's verbosity, not the log's verbosity... llvm-svn: 124013
-
Caroline Tice authored
llvm-svn: 124011
-