summaryrefslogtreecommitdiffstats
path: root/lldb/tools/debugserver
Commit message (Collapse)AuthorAgeFilesLines
* Fixed an issue where the UserSettingsControllers were being created out ofGreg Clayton2010-11-191-0/+1
| | | | | | | order and this was causing the target, process and thread trees to not be available. llvm-svn: 119784
* Added the ability to get more information on the SBThread's stop reasonGreg Clayton2010-11-181-1/+0
| | | | | | | | | | | | | | by being able to get the data count and data. Each thread stop reason has one or more data words that can help describe the stop. To do this I added: size_t SBThread::GetStopReasonDataCount(); uint64_t SBThread::GetStopReasonDataAtIndex(uint32_t idx); llvm-svn: 119720
* Added missing file.Greg Clayton2010-11-181-0/+89
| | | | llvm-svn: 119709
* Fixed Process::Halt() as it was broken for "process halt" after recent changesGreg Clayton2010-11-1819-314/+467
| | | | | | | | | | | | | | | | | | | | | | | | | | | | to the DoHalt down in ProcessGDBRemote. I also moved the functionality that was in ProcessGDBRemote::DoHalt up into Process::Halt so not every class has to implement a tricky halt/resume on the internal state thread. The functionality is the same as it was before with two changes: - when we eat the event we now just reuse the event we consume when the private state thread is paused and set the interrupted bool on the event if needed - we also properly update the Process::m_public_state with the state of the event we consume. Prior to this, if you issued a "process halt" it would eat the event, not update the process state, and then produce a new event with the interrupted bit set and send it. Anyone listening to the event would get the stopped event with a process that whose state was set to "running". Fixed debugserver to not have to be spawned with the architecture of the inferior process. This worked fine for launching processes, but when attaching to processes by name or pid without a file in lldb, it would fail. Now debugserver can support multiple architectures for a native debug session on the current host. This currently means i386 and x86_64 are supported in the same binary and a x86_64 debugserver can attach to a i386 executable. This change involved a lot of changes to make sure we dynamically detect the correct registers for the inferior process. llvm-svn: 119680
* Fixed more thread suspend/resume issues.Greg Clayton2010-11-121-35/+40
| | | | llvm-svn: 118877
* Fixed an issue with the MachThread class where we might not get the initialGreg Clayton2010-11-123-2/+42
| | | | | | | | | thread basic info state and not realize that a thread was already suspended or if a thread was starting up and not ready to be displayed to the user (in an uninterruptable state). If it is not user ready yet, we don't add it to our list of threads that can be played with. llvm-svn: 118866
* Bumped Xcode versions to lldb-32 and debugserver-119.Greg Clayton2010-11-111-6/+6
| | | | llvm-svn: 118772
* Bumped versions in Xcode projects to lldb-31 and debugserver-118.Greg Clayton2010-11-091-6/+6
| | | | llvm-svn: 118489
* Added copy constructors and assignment operators to all lldb::SB* classesGreg Clayton2010-11-051-6/+6
| | | | | | so we don't end up with weak exports with some compilers. llvm-svn: 118312
* If debugserver is running on the local machine, pass it aCaroline Tice2010-11-052-7/+11
| | | | | | | | pseudoterminal to pass to the inferior for the inferior's I/O (to allow direct writing, rather than passing all the I/O around via packets). llvm-svn: 118308
* Bumped version for lldb-29 and debugserver-116 in the Xcode projects.Greg Clayton2010-11-041-6/+6
| | | | llvm-svn: 118229
* Fix problem where "process detach" was not working properly. TheCaroline Tice2010-11-022-9/+26
| | | | | | | | | | ptrace thread update that was replying to the SIGSTOP was also causing the process to not really be sigstop'd any more so then the call to ptrace detach was failing, and when debugserver exited the attached process was being killed. Now the ptrace thread update does not disturb the sigstop state of the thread, so the detach works properly. llvm-svn: 118018
* Bumped version in Xcode project to lldb-27, and debugserver to debugserver-115.Greg Clayton2010-10-311-6/+6
| | | | llvm-svn: 117852
* Updated the lldb_private::Flags class to have better method names and madeGreg Clayton2010-10-271-0/+1
| | | | | | | | | | | | | | | | | all of the calls inlined in the header file for better performance. Fixed the summary for C string types (array of chars (with any combo if modifiers), and pointers to chars) work in all cases. Fixed an issue where a forward declaration to a clang type could cause itself to resolve itself more than once if, during the resolving of the type itself it caused something to try and resolve itself again. We now remove the clang type from the forward declaration map in the DWARF parser when we start to resolve it and avoid this additional call. This should stop any duplicate members from appearing and throwing all the alignment of structs, unions and classes. llvm-svn: 117437
* Fixed vAttachWait by fixing a missed "else if".Greg Clayton2010-10-261-1/+1
| | | | llvm-svn: 117395
* Use AppleScript when lauching inferior in terminal so the command thatGreg Clayton2010-10-191-1/+0
| | | | | | | is being run is visible in the terminal as opposed to just seeing a path to a .command file. llvm-svn: 116814
* Still trying to get detach to work with debugserver. Got a bit closer,Greg Clayton2010-10-186-35/+62
| | | | | | | | | | | but something is still killing our inferior. Fixed an issue with darwin-debug where it wasn't passing all needed arguments to the inferior. Fixed a race condition with the attach to named process code. llvm-svn: 116697
* Fixed debugserver to properly attach to a process by name with the Greg Clayton2010-10-184-5/+36
| | | | | | | | | | | | | | | | | | | "vAttachName;<PROCNAME>" packet, and wait for a new process by name to launch with the "vAttachWait;<PROCNAME>". Fixed a few issues with attaching where if DoAttach() returned no error, yet there was no valid process ID, we would deadlock waiting for an event that would never happen. Added a new "process launch" option "--tty" that will launch the process in a new terminal if the Host layer supports the "Host::LaunchInNewTerminal(...)" function. This currently works on MacOSX and will allow the debugging of terminal applications that do complex operations with the terminal. Cleaned up the output when the process resumes, stops and halts to be consistent with the output format. llvm-svn: 116693
* Added a new Host call to find LLDB related paths:Greg Clayton2010-10-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 116690
* Fixed an issue with MachTask::TaskResume () where if the task was alreadyGreg Clayton2010-10-161-2/+6
| | | | | | | suspended, we would call "int ::task_resume (task_t task);" as many times as it took to resume the task which isn't what we want to do. llvm-svn: 116674
* Bumped versions to lldb-26 and debugserver-114 for a build.Greg Clayton2010-10-081-6/+6
| | | | llvm-svn: 116019
* More SWIG cleanup. Moved the breakpoint callback function back to theGreg Clayton2010-10-071-6/+0
| | | | | | | | | | ScriptInterpreterPython class and made a simple callback function that ScriptInterpreterPython::BreakpointCallbackFunction() now calls so we don't include any internal API stuff into the cpp file that is generated by SWIG. Fixed a few build warnings in debugserver. llvm-svn: 115926
* Cleaned up a unused member variable in Debugger.Greg Clayton2010-09-301-0/+1
| | | | | | | | | | | | | | 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. llvm-svn: 115213
* Retry task_for_pid a few times to avoid some cases where task_for_pid fails.Greg Clayton2010-09-302-23/+34
| | | | llvm-svn: 115184
* Fixed the forward declaration issue that was present in the DWARF parser afterGreg Clayton2010-09-291-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Another patch from Jean-Daniel. Thanks.Johnny Chen2010-09-285-7/+7
| | | | | | Error in dbg server -> MachProcess::SetProcessID() and misc changes to make clang++ happy. llvm-svn: 114962
* Bumped Xcode lldb build number to 25 for lldb-25 and debugserver build toGreg Clayton2010-09-251-6/+6
| | | | | | 113 for debugserver-113. llvm-svn: 114777
* Got the ARM version of debugserver up to date. Greg Clayton2010-09-0910-194/+738
| | | | | | | | | Renamed the "dispatchqaddr" setting that was coming back for stop reply packets to be named "qaddr" so that gdb doesn't thing it is a register number. gdb was checking the first character and assuming "di" was a hex register number because 'd' is a hex digit. It has been shortened so gdb can safely ignore it. llvm-svn: 113475
* Fixed a case where we might be able to acquire a mutex with a try lock andGreg Clayton2010-09-031-0/+7
| | | | | | not release it by making sure a mutex locker object is appropriately used. llvm-svn: 112996
* Added the ability to disable ASLR (Address Space Layout Randomization). ASLRGreg Clayton2010-08-316-16/+29
| | | | | | | | is disabled by default, and can be enabled using: (lldb) set disable-aslr 0 llvm-svn: 112616
* Fixed debugserver to not exit when we are able to spawn the process, yet notGreg Clayton2010-07-304-55/+39
| | | | | | | | launch it due to not being able to get the task port. A SIGHUP was killing us and also an error string wasn't properly being passed along. Got rid of a class error variable that can only lead to multi-threaded crashes. llvm-svn: 109930
* Merged Eli Friedman's linux build changes where he added Makefile files thatGreg Clayton2010-07-092-4/+4
| | | | | | | enabled LLVM make style building and made this compile LLDB on Mac OS X. We can now iterate on this to make the build work on both linux and macosx. llvm-svn: 108009
* Added "-Wparentheses" so we catch possible errors like:Greg Clayton2010-07-061-0/+3
| | | | | | | | | | | | if (a = 0) instead of: if (a == 0) Thanks to Jean-Daniel Dupas. llvm-svn: 107672
* More leaks detection:Greg Clayton2010-07-021-0/+2
| | | | | | | | | | - fixed 3 posix spawn attributes leaks - fixed us always leaking CXXBaseSpecifier objects when we create class base classes. Clang apparently copies the base classes we pass in. Fixed some code formatting in ClangASTContext.cpp. llvm-svn: 107459
* Initial checkin of lldb code from internal Apple repo.Chris Lattner2010-06-0884-0/+27587
llvm-svn: 105619
OpenPOWER on IntegriCloud