summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* No functionality changes, mostly cleanup.Greg Clayton2012-04-111-1/+1
| | | | | | | | Cleaned up the Mutex::Locker and the ReadWriteLock classes a bit. Also cleaned up the GDBRemoteCommunication class to not have so many packet functions. Used the "NoLock" versions of send/receive packet functions when possible for a bit of performance. llvm-svn: 154458
* Trying to solve our disappearing thread issues by making thread list updates ↵Greg Clayton2012-04-101-1/+1
| | | | | | | | | | | | | | | | safer. The current ProcessGDBRemote function that updates the threads could end up with an empty list if any other thread had the sequence mutex. We now don't clear the thread list when we can't access it, and we also have changed how lldb_private::Process handles the return code from the: virtual bool Process::UpdateThreadList (lldb_private::ThreadList &old_thread_list, lldb_private::ThreadList &new_thread_list) = 0; A bool is now returned to indicate if the list was actually updated or not and the lldb_private::Process class will only update the stop ID of the validity of the thread list if "true" is returned. The ProcessGDBRemote also got an extra assertion that will hopefully assert when running debug builds so we can find the source of this issue. llvm-svn: 154365
* Fixed the Xcode project building of LLVM to be a bit more user friendly:Greg Clayton2011-11-041-2/+0
| | | | | | | | | | | | | | | | | | | - If you download and build the sources in the Xcode project, x86_64 builds by default using the "llvm.zip" checkpointed LLVM. - If you delete the "lldb/llvm.zip" and the "lldb/llvm" folder, and build the Xcode project will download the right LLVM sources and build them from scratch - If you have a "lldb/llvm" folder already that contains a "lldb/llvm/lib" directory, we will use the sources you have placed in the LLDB directory. Python can now be disabled for platforms that don't support it. Changed the way the libllvmclang.a files get used. They now all get built into arch specific directories and never get merged into universal binaries as this was causing issues where you would have to go and delete the file if you wanted to build an extra architecture slice. llvm-svn: 143678
* Update declarations for all functions/methods that accept printf-styleJason Molenda2011-09-201-1/+1
| | | | | | | | 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. llvm-svn: 140185
* Logging and return code fixes.Greg Clayton2011-07-291-11/+16
| | | | llvm-svn: 136530
* Initialize the all important automatic variable 'lldb::ConnectionStatus ↵Johnny Chen2011-07-211-1/+1
| | | | | | | | status' before invoking the Read(...) method to read in bytes. Similar to r135461. llvm-svn: 135695
* More KDP fixes and logging cleanup.Greg Clayton2011-07-211-114/+142
| | | | llvm-svn: 135652
* Added KDP resume, suspend, set/remove breakpoint, and kernel version support.Greg Clayton2011-07-201-14/+181
| | | | | | Also we now display a live update of the kexts that we are loading. llvm-svn: 135563
* Added register reading support for ARM, i386 and x86_64.Greg Clayton2011-07-201-21/+108
| | | | llvm-svn: 135557
* Modified the LocateMacOSXFilesUsingDebugSymbols(...) function to locateGreg Clayton2011-07-191-26/+353
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | an executable file if it is right next to a dSYM file that is found using DebugSymbols. The code also looks into a bundle if the dSYM file is right next to a bundle. Modified the MacOSX kernel dynamic loader plug-in to correctly set the load address for kext sections. This is a tad tricky because of how LLDB chooses to treat mach-o segments with no name. Also modified the loader to properly handle the older version 1 kext summary info. Fixed a crasher in the Mach-o object file parser when it is trying to set the section size correctly for dSYM sections. Added packet dumpers to the CommunicationKDP class. We now also properly detect address byte sizes based on the cpu type and subtype that is provided. Added a read memory and read register support to CommunicationKDP. Added a ThreadKDP class that now uses subclasses of the RegisterContextDarwin_XXX for arm, i386 and x86_64. Fixed some register numbering issues in the RegisterContextDarwin_arm class and added ARM GDB numbers to the ARM_GCC_Registers.h file. Change the RegisterContextMach_XXX classes over to subclassing their RegisterContextDarwin_XXX counterparts so we can share the mach register contexts between the user and kernel plug-ins. llvm-svn: 135466
* Added a boolean to the pure virtual lldb_private::Process::CanDebug(...)Greg Clayton2011-07-171-14/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | method so process plug-ins that are requested by name can answer yes when asked if they can debug a target that might not have any file in the target. Modified the ConnectionFileDescriptor to have both a read and a write file descriptor. This allows us to support UDP, and eventually will allow us to support pipes. The ConnectionFileDescriptor class also has a file descriptor type for each of the read and write file decriptors so we can use the correct read/recv/recvfrom call when reading, or write/send/sendto for writing. Finished up an initial implementation of UDP where you can use the "udp://" URL to specify a host and port to connect to: (lldb) process connect --plugin kdp-remote udp://host:41139 This will cause a ConnectionFileDescriptor to be created that can send UDP packets to "host:41139", and it will also bind to a localhost port that can be given out to receive the connectionless UDP reply. Added the ability to get to the IPv4/IPv6 socket port number from a ConnectionFileDescriptor instance if either file descriptor is a socket. The ProcessKDP can now successfully connect to a remote kernel and detach using the above "processs connect" command!!! So far we have the following packets working: KDP_CONNECT KDP_DISCONNECT KDP_HOSTINFO KDP_VERSION KDP_REATTACH Now that the packets are working, adding new packets will go very quickly. llvm-svn: 135363
* Completed more work on the KDP darwin kernel debugging Process plug-in.Greg Clayton2011-07-161-48/+262
| | | | | | | | | | | | | | | Implemented connect, disconnect, reattach, version, and hostinfo. Modified the ConnectionFileDescriptor class to be able to handle UDP. Added a new Stream subclass called StreamBuffer that is backed by a llvm::SmallVector for better efficiency. Modified the DataExtractor class to have a static function that can dump hex bytes into a stream. This is currently being used to dump incoming binary packet data in the KDP plug-in. llvm-svn: 135338
* Fixed the comment lines in the file comment headers.Greg Clayton2011-07-151-1/+1
| | | | llvm-svn: 135284
* Added the ability to connect using "tcp://<host>:<port>" which is theGreg Clayton2011-07-151-222/+71
| | | | | | | | | | | | | | | | | | | | | same as the old "connect://<host>:<port>". Also added the ability to connect using "udp://<host>:<port>" which will open a connected datagram socket. I need to find a way to specify a non connected datagram socket as well. We might need to start setting some settings in the URL itself, maybe something like: udp://<host>:<port>?connected=yes udp://<host>:<port>?connected=no I am open to suggestions for URL settings. Also did more work on the KDP darwin kernel plug-in. llvm-svn: 135277
* Hollowed out process plug-in to do KDP darwin kernel debugging.Greg Clayton2011-07-151-0/+403
llvm-svn: 135240
OpenPOWER on IntegriCloud