summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/macosx
Commit message (Collapse)AuthorAgeFilesLines
...
* <rdar://problem/14701270>Han Ming Ong2013-09-231-4/+5
| | | | | | When logged in as root, just launch debugserver regularly. llvm-svn: 191230
* Fix some names in the wake of my Mach-O changes to LLVM.Charles Davis2013-08-272-22/+21
| | | | llvm-svn: 189317
* merge lldb-platform-work branch (and assorted fixes) into trunkDaniel Malea2013-08-261-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This merge brings in the improved 'platform' command that knows how to interface with remote machines; that is, query OS/kernel information, push and pull files, run shell commands, etc... and implementation for the new communication packets that back that interface, at least on Darwin based operating systems via the POSIXPlatform class. Linux support is coming soon. Verified the test suite runs cleanly on Linux (x86_64), build OK on Mac OS X Mountain Lion. Additional improvements (not in the source SVN branch 'lldb-platform-work'): - cmake build scripts for lldb-platform - cleanup test suite - documentation stub for qPlatform_RunCommand - use log class instead of printf() directly - reverted work-in-progress-looking changes from test/types/TestAbstract.py that work towards running the test suite remotely. - add new logging category 'platform' Reviewers: Matt Kopec, Greg Clayton Review: http://llvm-reviews.chandlerc.com/D1493 llvm-svn: 189295
* Fixed a potential crash in the GetOSVersion codeSean Callanan2013-07-231-1/+1
| | | | | | caused by a CFStringRef going out of scope. llvm-svn: 186912
* Bump version number to 310.99.0.Jason Molenda2013-07-152-2/+2
| | | | llvm-svn: 186304
* Add support for listing inferior thread names on Linux.Matt Kopec2013-07-101-0/+33
| | | | llvm-svn: 186033
* <rdar://problem/14083928>Enrico Granata2013-06-061-0/+6
| | | | | | Making sure that if you invoke LLDB as lldb ./someBinary you can then launch the inferior with process launch —tty llvm-svn: 183453
* <rdar://problem/13752848>Han Ming Ong2013-05-311-0/+2
| | | | | | Add 'JoinExistingSession' to XPC for root debugging. llvm-svn: 183037
* Remove the UUID::GetAsCString() method which required a buffer to save the Jason Molenda2013-05-031-11/+7
| | | | | | | UUID string in; added UUID::GetAsString() which returns the uuid string in a std::string. Updated callers to use the new method. llvm-svn: 181078
* Cleanup logging to use the new "std::string FileSpec::GetPath()" function. ↵Greg Clayton2013-04-291-3/+2
| | | | | | | | | | | Also added a similar function for modules: std::string Module::GetSpecificationDescription () const; This returns the module as "/usr/lib/libfoo.dylib" for normal files (calls "std::string FileSpec::GetPath()" on m_file) but it also might include the object name in case the module is for a .o file in a BSD archive ("/usr/lib/libfoo.a(bar.o)"). Cleaned up necessary logging code to use it. llvm-svn: 180717
* More CMake fixes for OS X.Filipe Cabecinhas2013-04-251-1/+9
| | | | llvm-svn: 180243
* <rdar://problem/13665446>Greg Clayton2013-04-241-0/+26
| | | | | | Pass the user set target.env-vars when launching through a terminal. llvm-svn: 180201
* <rdar://problem/13521159>Greg Clayton2013-03-271-18/+18
| | | | | | | | LLDB is crashing when logging is enabled from lldb-perf-clang. This has to do with the global destructor chain as the process and its threads are being torn down. All logging channels now make one and only one instance that is kept in a global pointer which is never freed. This guarantees that logging can correctly continue as the process tears itself down. llvm-svn: 178191
* Initial checkin of a new project: LLDB Performance Testing InfrastructureEnrico Granata2013-03-082-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a very basic implementation of a library that easily allows to drive LLDB.framework to write test cases for performance This is separate from the LLDB testsuite in test/ in that: a) this uses C++ instead of Python to avoid measures being affected by SWIG b) this is in very early development and needs lots of tweaking before it can be considered functionally complete c) this is not meant to test correctness but to help catch performance regressions There is a sample application built against the library (in darwin/sketch) that uses the famous sample app Sketch as an inferior to measure certain basic parameters of LLDB's behavior. The resulting output is a PLIST much like the following: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <array> <dict> <key>fetch-frames</key> <real>0.13161715522222225</real> </dict> <dict> <key>file-line-bkpt</key> <real>0.029111678750000002</real> </dict> <dict> <key>fetch-modules</key> <real>0.00026376766666666668</real> </dict> <dict> <key>fetch-vars</key> <real>0.17820429311111111</real> </dict> <dict> <key>run-expr</key> <real>0.029676525769230768</real> </dict> </array> </plist> Areas for improvement: - code cleanups (I will be out of the office for a couple days this coming week, but please keep ideas coming!) - more metrics and test cases - better error checking This toolkit also comprises a simple event-loop-driven controller for LLDB, similar yet much simpler to what the Driver does to implement the lldb command-line tool. llvm-svn: 176715
* Updated Apple LLDB version to lldb-300.99.0. AlsoSean Callanan2013-03-072-2/+2
| | | | | | | updated the build system to support the new Apple LLDB versioning scheme. llvm-svn: 176662
* <rdar://problem/13119170>Han Ming Ong2013-03-061-0/+30
| | | | | | Reap the child process (debugserver) when it is done. llvm-svn: 176594
* Adding CMake build system to LLDB. Some known issues remain:Daniel Malea2013-02-211-0/+6
| | | | | | | | | | | | | | - generate-vers.pl has to be called by cmake to generate the version number - parallel builds not yet supported; dependency on clang must be explicitly specified Tested on Linux. - Building on Mac will require code-signing logic to be implemented. - Building on Windows will require OS-detection logic and some selective directory inclusion Thanks to Carlo Kok (who originally prepared these CMakefiles for Windows) and Ben Langmuir who ported them to Linux! llvm-svn: 175795
* Fixed a crash when we didn't get a plist but triedSean Callanan2013-02-081-1/+1
| | | | | | | | to pass it to CFGetTypeID() anyway. <rdar://problem/13181904> llvm-svn: 174772
* <rdar://problem/13092722>Greg Clayton2013-02-011-12/+0
| | | | | | | | | | Fix in loading mach files from memory when using DynamicLoaderMacOSXDYLD. Removed the uuid mismatch warning that could be spit out and any time during debugging and removed the test case that was looking for that. Currently the "add-dsym" or "target symbols add" command will report an error when the UUID's don't match. Be more careful when checking and resolving section + offset addresses to make sure none of the base addresses are invalid. llvm-svn: 174222
* <rdar://problem/13069948>Greg Clayton2013-01-252-7/+7
| | | | | | | | | | | | Major fixed to allow reading files that are over 4GB. The main problems were that the DataExtractor was using 32 bit offsets as a data cursor, and since we mmap all of our object files we could run into cases where if we had a very large core file that was over 4GB, we were running into the 4GB boundary. So I defined a new "lldb::offset_t" which should be used for all file offsets. After making this change, I enabled warnings for data loss and for enexpected implicit conversions temporarily and found a ton of things that I fixed. Any functions that take an index internally, should use "size_t" for any indexes and also should return "size_t" for any sizes of collections. llvm-svn: 173463
* Fixed a bug where we could accept the wrongSean Callanan2012-12-211-1/+1
| | | | | | | | slice of a fat dSYM in certain cases. <rdar://problem/12921206> llvm-svn: 170926
* Fixed two conditionals that I accidentallySean Callanan2012-12-141-2/+2
| | | | | | | | reversed in r170152. <rdar://problem/12886584> llvm-svn: 170256
* Removed the == and != operators from ArchSpec, sinceSean Callanan2012-12-131-3/+3
| | | | | | | | | | | | equality can be strict or loose and we want code to explicitly choose one or the other. Also renamed the Compare function to IsEqualTo, to avoid confusion. <rdar://problem/12856749> llvm-svn: 170152
* Removed debugging code.Han Ming Ong2012-12-111-1/+0
| | | | llvm-svn: 169799
* <rdar://problem/12850287>Han Ming Ong2012-12-101-20/+33
| | | | | | When there is XPC connection error, we will report it now. llvm-svn: 169787
* Change the MacOSX Symbols::DownloadObjectAndSymbolFile to look upJason Molenda2012-10-301-3/+19
| | | | | | | | | "~rc" via getpwnam() instead of doing tilde expansion and doing soft-link dereferencing via realpath() - if we're pointing to a softlink, leave it as-is. <rdar://problem/12597698> llvm-svn: 167052
* Add a parameter to Symbols::DownloadObjectAndSymbolFile() to controlJason Molenda2012-10-091-2/+38
| | | | | | | | | | | | | | | | | | | whether we try to call an external program to load symbols unconditionally, or if we check the user's preferences before calling it. ProcessMachCore now sets CanJIT to false - we can't execute code in a core file. DynamicLoaderDarwinKernel::OSKextLoadedKextSummary::LoadImageUsingMemoryModule changed to load the kernel from an on-disk file if at all possible. Don't load the kext binaries out of memory from the remote systems - their linkedit doesn't seem to be in a good state and we'll error out down in SymbolVendorMacOSX if we try to use the in-memory images. Call Symbols::DownloadObjectAndSymbolFile to get the kext/kernel binary -- the external program may be able to give us a file path on the local filesystem instead of reading the binary / dSYM over a network drive every time. Fall back to calling Target::GetSharedModule() like before if DownloadObjectAndSymbolFile fails. llvm-svn: 165471
* Symbols::LocateMacOSXFilesUsingDebugSymbols() - perform tildeJason Molenda2012-10-051-1/+1
| | | | | | expansion on the dSYM path we find if it starts with a tilde. llvm-svn: 165299
* Change DynamicLoaderDarwinKernel::OSKextLoadedKextSummary to useJason Molenda2012-10-021-3/+3
| | | | | | | | | | | | | | | | | the Symbols::LocateExecutableObjectFile method to locate kexts and kernels instead of copying them out of the memory of the remote system. This is the fix for <rdar://problem/12416384>. Fix a variable shadowing problem in Symbols::LocateMacOSXFilesUsingDebugSymbols which caused the symbol rich executable binaries to not be found even if they were listed in the dSYM Info.plist. Change Symbols::DownloadObjectAndSymbolFile to ignore dsymForUUID's negative cache - this is typically being called by the user and we should try even if there's a incorrect entry in the negative cache. llvm-svn: 165061
* Wrapped up the work I am going to do for now for the "add-dsym" or "target ↵Greg Clayton2012-09-271-42/+123
| | | | | | | | | | | | | | | | | | | | symfile add" command. We can now do: Specify a path to a debug symbols file: (lldb) add-dsym <path-to-dsym> Go and download the dSYM file for the "libunc.dylib" module in your target: (lldb) add-dsym --shlib libunc.dylib Go and download the dSYM given a UUID: (lldb) add-dsym --uuid <UUID> Go and download the dSYM file for the current frame: (lldb) add-dsym --frame llvm-svn: 164806
* Added the ability to download a symboled executable and symbol file given a ↵Greg Clayton2012-09-272-3/+117
| | | | | | UUID. llvm-svn: 164753
* Bump to lldb-168, debugserver-193.Jason Molenda2012-09-202-2/+2
| | | | llvm-svn: 164291
* Stop using the "%z" size_t modifier and cast all size_t values to uint64_t. ↵Greg Clayton2012-09-181-1/+1
| | | | | | Some platforms don't support this modification. llvm-svn: 164148
* <rdar://problem/11374963>Greg Clayton2012-09-141-3/+13
| | | | | | When attaching on ARM hosted debuggers we were incorrectly setting the triple to "arm-apple-ios". This was happening because in the post attach code, we would lookup the process info through the platform, and if successful, we would get the architecture of the process. This code uses sysctl() calls, but we can only get the CPU type, not the subtype, so we would get ARM for CPU type and nothing for the cpu subtype, so this would map to "arm-apple-ios". I fixed the code to get the cpu subtype from "hw.cpusubtype" which is what we really want for ARM, and not the architecture is already correct. "add-dsym" then works like a charm. I also improved the command output when the architecture changes to show the entire triple instead of just the arch name. llvm-svn: 163868
* <rdar://problem/11374963>Greg Clayton2012-09-121-7/+5
| | | | | | Partial fix for the above radar where we now resolve dsym mach-o files within the dSYM bundle when using "add-dsym" through the platform. llvm-svn: 163676
* <rdar://problem/11757916>Greg Clayton2012-08-291-0/+1
| | | | | | | | | | | | Make breakpoint setting by file and line much more efficient by only looking for inlined breakpoint locations if we are setting a breakpoint in anything but a source implementation file. Implementing this complex for a many reasons. Turns out that parsing compile units lazily had some issues with respect to how we need to do things with DWARF in .o files. So the fixes in the checkin for this makes these changes: - Add a new setting called "target.inline-breakpoint-strategy" which can be set to "never", "always", or "headers". "never" will never try and set any inlined breakpoints (fastest). "always" always looks for inlined breakpoint locations (slowest, but most accurate). "headers", which is the default setting, will only look for inlined breakpoint locations if the breakpoint is set in what are consudered to be header files, which is realy defined as "not in an implementation source file". - modify the breakpoint setting by file and line to check the current "target.inline-breakpoint-strategy" setting and act accordingly - Modify compile units to be able to get their language and other info lazily. This allows us to create compile units from the debug map and not have to fill all of the details in, and then lazily discover this information as we go on debuggging. This is needed to avoid parsing all .o files when setting breakpoints in implementation only files (no inlines). Otherwise we would need to parse the .o file, the object file (mach-o in our case) and the symbol file (DWARF in the object file) just to see what the compile unit was. - modify the "SymbolFileDWARFDebugMap" to subclass lldb_private::Module so that the virtual "GetObjectFile()" and "GetSymbolVendor()" functions can be intercepted when the .o file contenst are later lazilly needed. Prior to this fix, when we first instantiated the "SymbolFileDWARFDebugMap" class, we would also make modules, object files and symbol files for every .o file in the debug map because we needed to fix up the sections in the .o files with information that is in the executable debug map. Now we lazily do this in the DebugMapModule::GetObjectFile() Cleaned up header includes a bit as well. llvm-svn: 162860
* rdar://problem/11324515Johnny Chen2012-08-221-2/+6
| | | | | | | 'add-dsym' (aka 'target symbols add') should display error messages when dsym file is not found or the dsym uuid does not match any existing modules. Add TestAddDsymCommand.py test file. llvm-svn: 162332
* Updating Xcode project version numbers for lldb-165 and debugserver-192Sean Callanan2012-08-072-2/+2
| | | | llvm-svn: 161374
* Updating Xcode project version numbers for lldb-164 and debugserver-191Sean Callanan2012-08-022-2/+2
| | | | llvm-svn: 161209
* Updating Xcode project version numbers for lldb-163 and debugserver-190Sean Callanan2012-07-262-2/+2
| | | | llvm-svn: 160770
* Call "drain" on the auto release pool as it will do the right thing for both ↵Greg Clayton2012-07-171-5/+1
| | | | | | GC and non-GC apps. It will also quiet the static analyzer. llvm-svn: 160390
* Ran the static analyzer on the codebase and found a few things.Greg Clayton2012-07-171-185/+190
| | | | llvm-svn: 160338
* Bump to lldb-162 / debugserver-189.Jason Molenda2012-07-142-2/+2
| | | | llvm-svn: 160212
* Resolve source paths that start with ~ when doing substitutions.Greg Clayton2012-07-131-0/+5
| | | | llvm-svn: 160158
* Unify how we get host version on Mac OS X & iOS.Jim Ingham2012-07-121-43/+57
| | | | | | | | | Also remove our dependency on UIKit & AppKit. Cleaned up the project files a bit. <rdar://problem/11814498> llvm-svn: 160147
* Provide more information when process launch can't change directory to theFilipe Cabecinhas2012-07-121-1/+10
| | | | | | | | path passed with -w Test this functionality. llvm-svn: 160130
* Bump versions to lldb-161, debugserver-188.Jason Molenda2012-07-062-2/+2
| | | | llvm-svn: 159798
* Bump version number to lldb-160.Jason Molenda2012-06-212-2/+2
| | | | llvm-svn: 158890
* When the Platform launches a process for debugging, make sure it goes into a ↵Jim Ingham2012-06-011-0/+3
| | | | | | | | separate process group, otherwise ^C will both cause us to try to Stop it manually, AND send it a SIGINT, which can confuse us. rdar://problem/11369230 llvm-svn: 157791
* Bump to lldb 152.Jason Molenda2012-05-252-2/+2
| | | | llvm-svn: 157456
OpenPOWER on IntegriCloud