f476592805f813aa7a94f7d6770481503140aae2 |
|
25-Jul-2013 |
Ed Maste <emaste@freebsd.org> |
Set thread names on FreeBSD Also move the logic to shorten thread names from linux/Host.cpp to a new SetShortThreadName as both FreeBSD and Linux need the functionality. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187149 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
c350e13fd3351613345141bee7d8b2543df54636 |
|
01-Jun-2013 |
Matt Kopec <Matt.Kopec@intel.com> |
Add ability to attach/detach to multi-threaded inferiors on Linux. All running threads will be detected and stopped on attach and all threads get resumed on detach. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183049 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
024497728739eedffc9b79c28337fba22f07f8b4 |
|
13-May-2013 |
Matt Kopec <Matt.Kopec@intel.com> |
Add setting of lldb thread names on Linux. Patch by Mike Sartain. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
6f0165b3dc0ecc689f565c792e53dd3397b4a432 |
|
27-Feb-2013 |
Greg Clayton <gclayton@apple.com> |
Fixed a case where the result of std::string's c_str() method was being called on a local variable and returned as a const char * incorrectly. We used to cache the thread names for threads in the current host process, but we shoudn't be caching that as the names can change over time, so now a std::string is returned from Host::GetThreadName(). git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176217 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
132c49a1c94927a2e1da9e7b383a2512af3b75ee |
|
17-Feb-2013 |
Greg Clayton <gclayton@apple.com> |
Added a host call to get the number of CPUs. It should work on all POSIX unixes, linux and Windows. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175405 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
b924eb6c5250a9909dc55ac736d231f7ccae423b |
|
27-Sep-2012 |
Greg Clayton <gclayton@apple.com> |
Added the ability to download a symboled executable and symbol file given a UUID. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164753 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
97471184b8823c949bc68bbf54ea3edf3845a750 |
|
14-Apr-2012 |
Greg Clayton <gclayton@apple.com> |
Added a new host function that allows us to run shell command and get the output from them along with the status and signal: Error Host::RunShellCommand (const char *command, const char *working_dir, int *status_ptr, int *signo_ptr, std::string *command_output_ptr, uint32_t timeout_sec); This will allow us to use this functionality in the host lldb_private::Platform, and also use it in our lldb-platform binary. It leverages the existing code in Host::LaunchProcess and ProcessLaunchInfo. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154730 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
1831e78a6253392fca1c99e555e7adaa3f372647 |
|
07-Apr-2012 |
Jim Ingham <jingham@apple.com> |
We sometimes need to be able to call functions (via Process::RunThreadPlan) from code run on the private state thread. To do that we have to spin up a temporary "private state thread" that will respond to events from the lower level process plugins. This check-in should work to do that, but it is still buggy. However, if you don't call functions on the private state thread, these changes make no difference. This patch also moves the code in the AppleObjCRuntime step-through-trampoline handler that might call functions (in the case where the debug server doesn't support the memory allocate/deallocate packet) out to a safe place to do that call. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154230 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
d1040dd360c07305a30d33b5d4501cb9dfb03114 |
|
25-Feb-2012 |
Han Ming Ong <hanming@apple.com> |
<rdar://problem/3535148> Added ability to debug root processes on OS X. This uses XPC service that is available on Lion and above only. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151419 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
9ce953807eb814a93b449dc243de4f7bf32c3115 |
|
14-Feb-2012 |
Greg Clayton <gclayton@apple.com> |
Full core file support has been added for mach-o core files. Tracking modules down when you have a UUID and a path has been improved. DynamicLoaderDarwinKernel no longer parses mach-o load commands and it now uses the memory based modules now that we can load modules from memory. Added a target setting named "target.exec-search-paths" which can be used to supply a list of directories to use when trying to look for executables. This allows one or more directories to be used when searching for modules that may not exist in the SDK/PDK. The target automatically adds the directory for the main executable to this list so this should help us in tracking down shared libraries and other binaries. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150426 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
0b862e488d2fab178b48dc1ea6b1e94b3ef8c7e2 |
|
10-Jan-2012 |
Greg Clayton <gclayton@apple.com> |
Fix for linux build. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147834 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
7e9964783acae183c23a7ea470cedd64472eb233 |
|
05-Jan-2012 |
Johnny Chen <johnny.chen@apple.com> |
This patch combines common code from Linux and FreeBSD into a new POSIX platform. It also contains fixes for 64bit FreeBSD. The patch is based on changes by Mark Peek <mp@FreeBSD.org> and "K. Macy" <kmacy@freebsd.org> in their github repo located at https://github.com/fbsd/lldb. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147609 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
df6dc88322f103b263092d752db4490e628a1cbd |
|
05-Jan-2012 |
Greg Clayton <gclayton@apple.com> |
Added code in the Host layer that can report system log messages so that we don't have "fprintf (stderr, ...)" calls sprinkled everywhere. Changed all needed locations over to using this. For non-darwin, we log to stderr only. On darwin, we log to stderr _and_ to ASL (Apple System Log facility). This will allow GUI apps to have a place for these error and warning messages to go, and also allows the command line apps to log directly to the terminal. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147596 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
1c4642c6ab741d85c98d4288cf922c9a2ef77007 |
|
16-Nov-2011 |
Greg Clayton <gclayton@apple.com> |
Made the darwin host layer properly reap any child processes that it spawns. After recent changes we weren't reaping child processes resulting in many zombie processes. This was fixed by adding more settings to the ProcessLaunchOptions class that allow clients to specify a callback function and baton to be notified when their process dies. If one is not supplied a default callback will be used that "does the right thing". Cleaned up a race condition in the ProcessGDBRemote class that would attempt to monitor when debugserver died. Added an extra boolean to the process monitor callbacks that indicate if a process exited or not. If your process exited with a zero exit status and no signal, both items could be zero. Modified the process monitor functions to not require a callback function in order to reap the child process. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144780 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
f35a96c63732a1b3adf875ea44c7d3d7de6f8eec |
|
27-Oct-2011 |
Sean Callanan <scallanan@apple.com> |
Added a function to the Host that gets a dummy target for it, so that people who want to use LLDB as a calculator can run simple expressions without needing a target or process. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@143147 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
7e5fa7fc1f8efd24c078e063b2c4b5e13ba5be20 |
|
20-Sep-2011 |
Jason Molenda <jmolenda@apple.com> |
Update declarations for all functions/methods that accept printf-style stdarg formats to use __attribute__ format so the compiler can flag incorrect uses. Fix all incorrect uses. Most of these are innocuous, a few were resulting in crashes. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140185 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
b72d0f098e45936fa72e26b1a026c603e17e2d6c |
|
12-Apr-2011 |
Greg Clayton <gclayton@apple.com> |
Moved the execution context that was in the Debugger into the CommandInterpreter where it was always being used. Make sure that Modules can track their object file offsets correctly to allow opening of sub object files (like the "__commpage" on darwin). Modified the Platforms to be able to launch processes. The first part of this move is the platform soon will become the entity that launches your program and when it does, it uses a new ProcessLaunchInfo class which encapsulates all process launching settings. This simplifies the internal APIs needed for launching. I want to slowly phase out process launching from the process classes, so for now we can still launch just as we used to, but eventually the platform is the object that should do the launching. Modified the Host::LaunchProcess in the MacOSX Host.mm to correctly be able to launch processes with all of the new eLaunchFlag settings. Modified any code that was manually launching processes to use the Host::LaunchProcess functions. Fixed an issue where lldb_private::Args had implicitly defined copy constructors that could do the wrong thing. This has now been fixed by adding an appropriate copy constructor and assignment operator. Make sure we don't add empty ModuleSP entries to a module list. Fixed the commpage module creation on MacOSX, but we still need to train the MacOSX dynamic loader to not get rid of it when it doesn't have an entry in the all image infos. Abstracted many more calls from in ProcessGDBRemote down into the GDBRemoteCommunicationClient subclass to make the classes cleaner and more efficient. Fixed the default iOS ARM register context to be correct and also added support for targets that don't support the qThreadStopInfo packet by selecting the current thread (only if needed) and then sending a stop reply packet. Debugserver can now start up with a --unix-socket (-u for short) and can then bind to port zero and send the port it bound to to a listening process on the other end. This allows the GDB remote platform to spawn new GDB server instances (debugserver) to allow platform debugging. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129351 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
24bc5d9bfad2a1c562c27e7cf37e1c56d85c45e7 |
|
30-Mar-2011 |
Greg Clayton <gclayton@apple.com> |
Many improvements to the Platform base class and subclasses. The base Platform class now implements the Host functionality for a lot of things that make sense by default so that subclasses can check: int PlatformSubclass::Foo () { if (IsHost()) return Platform::Foo (); // Let the platform base class do the host specific stuff // Platform subclass specific code... int result = ... return result; } Added new functions to the platform: virtual const char *Platform::GetUserName (uint32_t uid); virtual const char *Platform::GetGroupName (uint32_t gid); The user and group names are cached locally so that remote platforms can avoid sending packets multiple times to resolve this information. Added the parent process ID to the ProcessInfo class. Added a new ProcessInfoMatch class which helps us to match processes up and changed the Host layer over to using this new class. The new class allows us to search for processs: 1 - by name (equal to, starts with, ends with, contains, and regex) 2 - by pid 3 - And further check for parent pid == value, uid == value, gid == value, euid == value, egid == value, arch == value, parent == value. This is all hookup up to the "platform process list" command which required adding dumping routines to dump process information. If the Host class implements the process lookup routines, you can now lists processes on your local machine: machine1.foo.com % lldb (lldb) platform process list PID PARENT USER GROUP EFF USER EFF GROUP TRIPLE NAME ====== ====== ========== ========== ========== ========== ======================== ============================ 99538 1 username usergroup username usergroup x86_64-apple-darwin FileMerge 94943 1 username usergroup username usergroup x86_64-apple-darwin mdworker 94852 244 username usergroup username usergroup x86_64-apple-darwin Safari 94727 244 username usergroup username usergroup x86_64-apple-darwin Xcode 92742 92710 username usergroup username usergroup i386-apple-darwin debugserver This of course also works remotely with the lldb-platform: machine1.foo.com % lldb-platform --listen 1234 machine2.foo.com % lldb (lldb) platform create remote-macosx Platform: remote-macosx Connected: no (lldb) platform connect connect://localhost:1444 Platform: remote-macosx Triple: x86_64-apple-darwin OS Version: 10.6.7 (10J869) Kernel: Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 Hostname: machine1.foo.com Connected: yes (lldb) platform process list PID PARENT USER GROUP EFF USER EFF GROUP TRIPLE NAME ====== ====== ========== ========== ========== ========== ======================== ============================ 99556 244 username usergroup username usergroup x86_64-apple-darwin trustevaluation 99548 65539 username usergroup username usergroup x86_64-apple-darwin lldb 99538 1 username usergroup username usergroup x86_64-apple-darwin FileMerge 94943 1 username usergroup username usergroup x86_64-apple-darwin mdworker 94852 244 username usergroup username usergroup x86_64-apple-darwin Safari The lldb-platform implements everything with the Host:: layer, so this should "just work" for linux. I will probably be adding more stuff to the Host layer for launching processes and attaching to processes so that this support should eventually just work as well. Modified the target to be able to be created with an architecture that differs from the main executable. This is needed for iOS debugging since we can have an "armv6" binary which can run on an "armv7" machine, so we want to be able to do: % lldb (lldb) platform create remote-ios (lldb) file --arch armv7 a.out Where "a.out" is an armv6 executable. The platform then can correctly decide to open all "armv7" images for all dependent shared libraries. Modified the disassembly to show the current PC value. Example output: (lldb) disassemble --frame a.out`main: 0x1eb7: pushl %ebp 0x1eb8: movl %esp, %ebp 0x1eba: pushl %ebx 0x1ebb: subl $20, %esp 0x1ebe: calll 0x1ec3 ; main + 12 at test.c:18 0x1ec3: popl %ebx -> 0x1ec4: calll 0x1f12 ; getpid 0x1ec9: movl %eax, 4(%esp) 0x1ecd: leal 199(%ebx), %eax 0x1ed3: movl %eax, (%esp) 0x1ed6: calll 0x1f18 ; printf 0x1edb: leal 213(%ebx), %eax 0x1ee1: movl %eax, (%esp) 0x1ee4: calll 0x1f1e ; puts 0x1ee9: calll 0x1f0c ; getchar 0x1eee: movl $20, (%esp) 0x1ef5: calll 0x1e6a ; sleep_loop at test.c:6 0x1efa: movl $12, %eax 0x1eff: addl $20, %esp 0x1f02: popl %ebx 0x1f03: leave 0x1f04: ret This can be handy when dealing with the new --line options that was recently added: (lldb) disassemble --line a.out`main + 13 at test.c:19 18 { -> 19 printf("Process: %i\n\n", getpid()); 20 puts("Press any key to continue..."); getchar(); -> 0x1ec4: calll 0x1f12 ; getpid 0x1ec9: movl %eax, 4(%esp) 0x1ecd: leal 199(%ebx), %eax 0x1ed3: movl %eax, (%esp) 0x1ed6: calll 0x1f18 ; printf Modified the ModuleList to have a lookup based solely on a UUID. Since the UUID is typically the MD5 checksum of a binary image, there is no need to give the path and architecture when searching for a pre-existing image in an image list. Now that we support remote debugging a bit better, our lldb_private::Module needs to be able to track what the original path for file was as the platform knows it, as well as where the file is locally. The module has the two following functions to retrieve both paths: const FileSpec &Module::GetFileSpec () const; const FileSpec &Module::GetPlatformFileSpec () const; git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128563 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
b344843f75ef893762c93fd0a22d2d45712ce74d |
|
24-Mar-2011 |
Greg Clayton <gclayton@apple.com> |
Fixed the LLDB build so that we can have private types, private enums and public types and public enums. This was done to keep the SWIG stuff from parsing all sorts of enums and types that weren't needed, and allows us to abstract our API better. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
58e26e0935138225477fd61283215ceff2068899 |
|
24-Mar-2011 |
Greg Clayton <gclayton@apple.com> |
Did a lot more work on abtracting and organizing the platforms. On Mac OS X we now have 3 platforms: PlatformDarwin - must be subclassed to fill in the missing pure virtual funcs but this implements all the common functionality between remote-macosx and remote-ios. It also allows for another platform to be used (remote-gdb-server for now) when doing remote connections. Keeping this pluggable will allow for flexibility. PlatformMacOSX - Now implements both local and remote macosx desktop platforms. PlatformRemoteiOS - Remote only iOS that knows how to locate SDK files in the cached SDK locations on the host. A new agnostic platform has been created: PlatformRemoteGDBServer - this implements the platform using the GDB remote protocol and uses the built in lldb_private::Host static functions to implement many queries. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128193 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
b1888f24fa181489840b9acf193e224d125d0776 |
|
19-Mar-2011 |
Greg Clayton <gclayton@apple.com> |
Added more platform support. There are now some new commands: platform status -- gets status information for the selected platform platform create <platform-name> -- creates a new instance of a remote platform platform list -- list all available platforms platform select -- select a platform instance as the current platform (not working yet) When using "platform create" it will create a remote platform and make it the selected platform. For instances for iPhone OS debugging on Mac OS X one can do: (lldb) platform create remote-ios --sdk-version=4.0 Remote platform: iOS platform SDK version: 4.0 SDK path: "/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0" Not connected to a remote device. (lldb) file ~/Documents/a.out Current executable set to '~/Documents/a.out' (armv6). (lldb) image list [ 0] /Volumes/work/gclayton/Documents/devb/attach/a.out [ 1] /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0/Symbols/usr/lib/dyld [ 2] /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0/Symbols/usr/lib/libSystem.B.dylib Note that this is all happening prior to running _or_ connecting to a remote platform. Once connected to a remote platform the OS version might change which means we will need to update our dependecies. Also once we run, we will need to match up the actualy binaries with the actualy UUID's to files in the SDK, or download and cache them locally. This is just the start of the remote platforms, but this modification is the first iteration in getting the platforms really doing something. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127934 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
e4b9c1fb338ee1ada72e6a3c198afb342d68c5c1 |
|
08-Mar-2011 |
Greg Clayton <gclayton@apple.com> |
LLDB now has "Platform" plug-ins. Platform plug-ins are plug-ins that provide an interface to a local or remote debugging platform. By default each host OS that supports LLDB should be registering a "default" platform that will be used unless a new platform is selected. Platforms are responsible for things such as: - getting process information by name or by processs ID - finding platform files. This is useful for remote debugging where there is an SDK with files that might already or need to be cached for debug access. - getting a list of platform supported architectures in the exact order they should be selected. This helps the native x86 platform on MacOSX select the correct x86_64/i386 slice from universal binaries. - Connect to remote platforms for remote debugging - Resolving an executable including finding an executable inside platform specific bundles (macosx uses .app bundles that contain files) and also selecting the appropriate slice of universal files for a given platform. So by default there is always a local platform, but remote platforms can be connected to. I will soon be adding a new "platform" command that will support the following commands: (lldb) platform connect --name machine1 macosx connect://host:port Connected to "machine1" platform. (lldb) platform disconnect macosx This allows LLDB to be well setup to do remote debugging and also once connected process listing and finding for things like: (lldb) process attach --name x<TAB> The currently selected platform plug-in can now auto complete any available processes that start with "x". The responsibilities for the platform plug-in will soon grow and expand. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127286 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
395fc33dc4b06c048ed35047ec461bc092ef2df3 |
|
15-Feb-2011 |
Greg Clayton <gclayton@apple.com> |
Made lldb_private::ArchSpec contain much more than just an architecture. It now, in addition to cpu type/subtype and architecture flavor, contains: - byte order (big endian, little endian) - address size in bytes - llvm::Triple for true target triple support and for more powerful plug-in selection. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
14ef59fe5728d862c040cf5a6b99c384229a34ee |
|
08-Feb-2011 |
Greg Clayton <gclayton@apple.com> |
Cleaned up the dynamic library open/getsymbol/close code to use abstracted 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. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125064 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
52fd984f7e67c3a0ab18d5565f40356bcfa84822 |
|
02-Feb-2011 |
Greg Clayton <gclayton@apple.com> |
Modified the PluginManager to be ready for loading plug-ins from a system 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. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124716 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
de915beb5febe597505ba33fdc2c39eea2abdbd4 |
|
23-Jan-2011 |
Greg Clayton <gclayton@apple.com> |
Added a new variant of SBTarget::Launch() that deprectates the old one that 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. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124060 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
638351aee118e89c658ca295cb4e9d1db7849bef |
|
04-Dec-2010 |
Greg Clayton <gclayton@apple.com> |
Added the ability for a process to inherit the current host environment. This was done as an settings variable in the process for now. We will eventually move all environment stuff over to the target, but we will leave it with the process for now. The default setting is for a process to inherit the host environment. This can be disabled by setting the "inherit-env" setting to false in the process. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@120862 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
b749a265a2b97f9cef71c362dfd6dae26c8f2973 |
|
03-Dec-2010 |
Greg Clayton <gclayton@apple.com> |
Fixed a race condition that could cause ProcessGDBRemote::DoResume() to return an error saying the resume timed out. Previously the thread that was trying to resume the process would eventually call ProcessGDBRemote::DoResume() which would broadcast an event over to the async GDB remote thread which would sent the continue packet to the remote gdb server. Right after this was sent, it would set a predicate boolean value (protected by a mutex and condition) and then the thread that issued the ProcessGDBRemote::DoResume() would then wait for that condition variable to be set. If the async gdb thread was too quick though, the predicate boolean value could have been set to true and back to false by the time the thread that issued the ProcessGDBRemote::DoResume() checks the boolean value. So we can't use the predicate value as a handshake. I have changed the code over to using a Event by having the GDB remote communication object post an event: GDBRemoteCommunication::eBroadcastBitRunPacketSent This allows reliable handshaking between the two threads and avoids the erroneous ProcessGDBRemote::DoResume() errors. Added a host backtrace service to allow in process backtraces when trying to track down tricky issues. I need to see if LLVM has any backtracing abilities abstracted in it already, and if so, use that, but I needed something ASAP for the current issue I was working on. The static function is: void Host::Backtrace (Stream &strm, uint32_t max_frames); And it will backtrace at most "max_frames" frames for the current thread and can be used with any of the Stream subclasses for logging. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@120793 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
e98ac25604b3d967158917f6fdd5289b3096fd80 |
|
10-Nov-2010 |
Greg Clayton <gclayton@apple.com> |
Modified lldb_private::SymboleFile to be able to override where its TypeList comes from by using a virtual function to provide it from the Module's SymbolVendor by default. This allows the DWARF parser, when being used to parse DWARF in .o files with a parent DWARF + debug map parser, to get its type list from the DWARF + debug map parser so when we go and find full definitions for types (that might come from other .o files), we can use the type list from the debug map parser. Otherwise we ended up mixing clang types from one .o file (say a const pointer to a forward declaration "class A") with the a full type from another .o file. This causes expression parsing, when copying the clang types from those parsed by the DWARF parser into the expression AST, to fail -- for good reason. Now all types are created in the same list. Also added host support for crash description strings that can be set before doing a piece of work. On MacOSX, this ties in with CrashReporter support that allows a string to be dispalyed when the app crashes and allows LLDB.framework to print a description string in the crash log. Right now this is hookup up the the CommandInterpreter::HandleCommand() where each command notes that it is about to be executed, so if we crash while trying to do this command, we should be able to see the command that caused LLDB to exit. For all other platforms, this is a nop. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118672 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
bb0c91fa5e8516016908dbd4cb79542ea4312b41 |
|
20-Oct-2010 |
Greg Clayton <gclayton@apple.com> |
Ok, last commit for the running processes in a new window. Now you can optionally specify the tty you want to use if you want to use an existing terminal window by giving a partial or full path name: (lldb) process launch --tty=ttys002 This would find the terminal window (or tab on MacOSX) that has ttys002 in its tty path and use it. If it isn't found, it will use a new terminal window. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
24b48ff28b7c60dd4598212c3e77935a0fc1142d |
|
18-Oct-2010 |
Greg Clayton <gclayton@apple.com> |
Added a new Host call to find LLDB related paths: 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. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116690 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
4b40711e7950310afb74835820eb669004cd8c44 |
|
30-Sep-2010 |
Greg Clayton <gclayton@apple.com> |
Cleaned up a unused member variable in Debugger. Added the start of Host specific launch services, though it currently isn't hookup up to anything. We want to be able to launch a process and use the native launch services to launch an app like it would be launched by the user double clicking on the app. We also eventually want to be able to run a command line app in a newly spawned terminal to avoid terminal sharing. Fixed an issue with the new DWARF forward type declaration stuff. A crasher was found that was happening when trying to properly expand the forward declarations. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115213 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
e9ca3a4130bfb76765256549e01c759da8ec2f1d |
|
12-Sep-2010 |
Caroline Tice <ctice@apple.com> |
Remove Host::ResolveExecutableLocation (very recent addition); replace use of it with llvm::sys::Program::FindProgramByName. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
eddffe93d2c9ebb575e7b03fe1c5e71f9ecaf9f1 |
|
10-Sep-2010 |
Caroline Tice <ctice@apple.com> |
If the file the user specifies can't be found in the current directory, and the user didn't specify a particular directory, search for the file using the $PATH environment variable. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113575 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
8f3b21daa0d509ac49b2b82f45aaed35f6874502 |
|
07-Sep-2010 |
Greg Clayton <gclayton@apple.com> |
Patch from Jay Cornwall that modifies the LLDB "Host" layer to reuse more code between linux, darwin and BSD. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113263 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
74989e88af7e04f3fe0bb3a800163113d7e0ca12 |
|
30-Aug-2010 |
Jim Ingham <jingham@apple.com> |
Added a way to open the current source file & line in an external editor, and you can turn this on with: lldb -e git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112502 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
75ccf50c3371d8c8e293af25461705b86fb10a46 |
|
21-Aug-2010 |
Greg Clayton <gclayton@apple.com> |
Modified the host process monitor callback function Host::StartMonitoringChildProcess to spawn a thread for each process that is being monitored. Previously LLDB would spawn a single thread that would wait for any child process which isn't ok to do as a shared library (LLDB.framework on Mac OSX, or lldb.so on linux). The old single thread used to call wait4() with a pid of -1 which could cause it to reap child processes that it shouldn't have. Re-wrote the way Function blocks are handles. Previously I attempted to keep all blocks in a single memory allocation (in a std::vector). This made the code somewhat efficient, but hard to work with. I got rid of the old BlockList class, and went to a straight parent with children relationship. This new approach will allow for partial parsing of the blocks within a function. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111706 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
7508e732818c32e1cfeaaf7d1d507fe3834ce9d2 |
|
10-Aug-2010 |
Jim Ingham <jingham@apple.com> |
Change Target & Process so they can really be initialized with an invalid architecture. Arrange that this then gets properly set on attach, or when a "file" is set. Add a completer for "process attach -n". Caveats: there isn't currently a way to handle multiple processes with the same name. That will have to wait on a way to pass annotations along with the completion strings. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110624 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|
24943d2ee8bfaa7cf5893e4709143924157a5c1e |
|
08-Jun-2010 |
Chris Lattner <sabre@nondot.org> |
Initial checkin of lldb code from internal Apple repo. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105619 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Host/Host.h
|