summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote
Commit message (Collapse)AuthorAgeFilesLines
...
* Got the ARM version of debugserver up to date. Greg Clayton2010-09-091-1/+1
| | | | | | | | | 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 an lldb infrastructure bug, where the debugger should reaaly update itsJohnny Chen2010-09-031-0/+1
| | | | | | | | | | | execution context only when the process is still alive. When running the test suite, the debugger is launching and killing processes constantly. This might be the cause of the test hang as reported in rdar://problem/8377854, where the debugger was looping infinitely trying to update a supposedly stale thread list. llvm-svn: 113022
* Added some extra logging to track asynchronous packet activity.Greg Clayton2010-09-033-0/+28
| | | | llvm-svn: 113012
* Fixed a case where we might be able to acquire a mutex with a try lock andGreg Clayton2010-09-033-8/+23
| | | | | | not release it by making sure a mutex locker object is appropriately used. llvm-svn: 112996
* Pacify operator precedence warnings. No functionality change because ↵Benjamin Kramer2010-09-031-2/+2
| | | | | | eLaunchFlagDisableASLR happens to be 1. llvm-svn: 112985
* Fixed the StackFrame to correctly resolve the StackID's SymbolContextScope.Greg Clayton2010-09-031-0/+1
| | | | | | | | | Added extra logging for stepping. Fixed an issue where cached stack frame data could be lost between runs when the thread plans read a stack frame. llvm-svn: 112973
* Added the ability to disable ASLR (Address Space Layout Randomization). ASLRGreg Clayton2010-08-312-12/+25
| | | | | | | | is disabled by default, and can be enabled using: (lldb) set disable-aslr 0 llvm-svn: 112616
* Added support for inlined stack frames being represented as real stack framesGreg Clayton2010-08-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | which is now on by default. Frames are gotten from the unwinder as concrete frames, then if inline frames are to be shown, extra information to track and reconstruct these frames is cached with each Thread and exanded as needed. I added an inline height as part of the lldb_private::StackID class, the class that helps us uniquely identify stack frames. This allows for two frames to shared the same call frame address, yet differ only in inline height. Fixed setting breakpoint by address to not require addresses to resolve. A quick example: % cat main.cpp % ./build/Debug/lldb test/stl/a.out Current executable set to 'test/stl/a.out' (x86_64). (lldb) breakpoint set --address 0x0000000100000d31 Breakpoint created: 1: address = 0x0000000100000d31, locations = 1 (lldb) r Launching 'a.out' (x86_64) (lldb) Process 38031 Stopped * thread #1: tid = 0x2e03, pc = 0x0000000100000d31, where = a.out`main [inlined] std::string::_M_data() const at /usr/include/c++/4.2.1/bits/basic_string.h:280, stop reason = breakpoint 1.1, queue = com.apple.main-thread 277 278 _CharT* 279 _M_data() const 280 -> { return _M_dataplus._M_p; } 281 282 _CharT* 283 _M_data(_CharT* __p) (lldb) bt thread #1: tid = 0x2e03, stop reason = breakpoint 1.1, queue = com.apple.main-thread frame #0: pc = 0x0000000100000d31, where = a.out`main [inlined] std::string::_M_data() const at /usr/include/c++/4.2.1/bits/basic_string.h:280 frame #1: pc = 0x0000000100000d31, where = a.out`main [inlined] std::string::_M_rep() const at /usr/include/c++/4.2.1/bits/basic_string.h:288 frame #2: pc = 0x0000000100000d31, where = a.out`main [inlined] std::string::size() const at /usr/include/c++/4.2.1/bits/basic_string.h:606 frame #3: pc = 0x0000000100000d31, where = a.out`main [inlined] operator<< <char, std::char_traits<char>, std::allocator<char> > at /usr/include/c++/4.2.1/bits/basic_string.h:2414 frame #4: pc = 0x0000000100000d31, where = a.out`main + 33 at /Volumes/work/gclayton/Documents/src/lldb/test/stl/main.cpp:14 frame #5: pc = 0x0000000100000d08, where = a.out`start + 52 Each inline frame contains only the variables that they contain and each inlined stack frame is treated as a single entity. llvm-svn: 111877
* Modified the host process monitor callback function ↵Greg Clayton2010-08-212-40/+42
| | | | | | | | | | | | | | | | | | 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. llvm-svn: 111706
* Now that we are using the Unwinder (or Jason's new unwinder when that comes ↵Jim Ingham2010-08-122-65/+2
| | | | | | | | about) all the plugin-specific details of getting stack frames should be hidden behind that, and the "GetStackFrameAtIndex" and "GetStackFrameCount" algorithms become generic. So I moved them to Thread.cpp. llvm-svn: 110899
* Change Target & Process so they can really be initialized with an invalid ↵Jim Ingham2010-08-092-35/+64
| | | | | | | | | | | | 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. llvm-svn: 110624
* Abtracted the old "lldb_private::Thread::StopInfo" into an abtract class.Greg Clayton2010-08-043-41/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will allow debugger plug-ins to make any instance of "lldb_private::StopInfo" that can completely describe any stop reason. It also provides a framework for doing intelligent things with the stop info at important times in the lifetime of the inferior. Examples include the signal stop info in StopInfoUnixSignal. It will check with the process to see that the current action is for the signal. These actions include wether to stop for the signal, wether the notify that the signal was hit, and wether to pass the signal along to the inferior process. The StopInfoUnixSignal class overrides the "ShouldStop()" method of StopInfo and this allows the stop info to determine if it should stop at the signal or continue the process. StopInfo subclasses must override the following functions: virtual lldb::StopReason GetStopReason () const = 0; virtual const char * GetDescription () = 0; StopInfo subclasses can override the following functions: // If the subclass returns "false", the inferior will resume. The default // version of this function returns "true" which means the default stop // info will stop the process. The breakpoint subclass will check if // the breakpoint wants us to stop by calling any installed callback on // the breakpoint, and also checking if the breakpoint is for the current // thread. Signals will check if they should stop based off of the // UnixSignal settings in the process. virtual bool ShouldStop (Event *event_ptr); // Sublasses can state if they want to notify the debugger when "ShouldStop" // returns false. This would be handy for breakpoints where you want to // log information and continue and is also used by the signal stop info // to notify that a signal was received (after it checks with the process // signal settings). virtual bool ShouldNotify (Event *event_ptr) { return false; } // Allow subclasses to do something intelligent right before we resume. // The signal class will figure out if the signal should be propagated // to the inferior process and pass that along to the debugger plug-ins. virtual void WillResume (lldb::StateType resume_state) { // By default, don't do anything } The support the Mach exceptions was moved into the lldb/source/Plugins/Process/Utility folder and now doesn't polute the lldb_private::Thread class with platform specific code. llvm-svn: 110184
* Added support for objective C built-in types: id, Class, and SEL. This Greg Clayton2010-08-031-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | involved watching for the objective C built-in types in DWARF and making sure when we convert the DWARF types into clang types that we use the appropriate ASTContext types. Added a way to find and dump types in lldb (something equivalent to gdb's "ptype" command): image lookup --type <TYPENAME> This only works for looking up types by name and won't work with variables. It also currently dumps out verbose internal information. I will modify it to dump more appropriate user level info in my next submission. Hookup up the "FindTypes()" functions in the SymbolFile and SymbolVendor so we can lookup types by name in one or more images. Fixed "image lookup --address <ADDRESS>" to be able to correctly show all symbol context information, but it will only show this extra information when the new "--verbose" flag is used. Updated to latest LLVM to get a few needed fixes. llvm-svn: 110089
* Centralized the Mach exception stop info code by adding it as a firstGreg Clayton2010-07-231-234/+6
| | | | | | class citizen on the StopInfo class. llvm-svn: 109235
* Added Mach exception stop descriptions. The chunk of code I just added needs ↵Greg Clayton2010-07-231-37/+215
| | | | | | to be placed into a utility location so it can be used by ProcessMacOSX and debugserver. llvm-svn: 109214
* Change over to using the definitions for mach-o types and defines to theGreg Clayton2010-07-211-6/+0
| | | | | | | | | | | defines that are in "llvm/Support/MachO.h". This should allow ObjectFileMachO and ObjectContainerUniversalMachO to be able to be cross compiled in Linux. Also did some cleanup on the ASTType by renaming it to ClangASTType and renaming the header file. Moved a lot of "AST * + opaque clang type *" functionality from lldb_private::Type over into ClangASTType. llvm-svn: 109046
* Remove use of STL collection class use of the "data()" method since it isn'tGreg Clayton2010-07-203-5/+5
| | | | | | | part of C++'98. Most of these were "std::vector<T>::data()" and "std::string::data()". llvm-svn: 108957
* Merged Eli Friedman's linux build changes where he added Makefile files thatGreg Clayton2010-07-0911-1313/+51
| | | | | | | 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
* Applied pid.patch from Jean-Daniel Dupas.Greg Clayton2010-07-061-1/+1
| | | | llvm-svn: 107692
* More leaks detection:Greg Clayton2010-07-021-0/+3
| | | | | | | | | | - 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
* Very large changes that were needed in order to allow multiple connectionsGreg Clayton2010-06-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to the debugger from GUI windows. Previously there was one global debugger instance that could be accessed that had its own command interpreter and current state (current target/process/thread/frame). When a GUI debugger was attached, if it opened more than one window that each had a console window, there were issues where the last one to setup the global debugger object won and got control of the debugger. To avoid this we now create instances of the lldb_private::Debugger that each has its own state: - target list for targets the debugger instance owns - current process/thread/frame - its own command interpreter - its own input, output and error file handles to avoid conflicts - its own input reader stack So now clients should call: SBDebugger::Initialize(); // (static function) SBDebugger debugger (SBDebugger::Create()); // Use which ever file handles you wish debugger.SetErrorFileHandle (stderr, false); debugger.SetOutputFileHandle (stdout, false); debugger.SetInputFileHandle (stdin, true); // main loop SBDebugger::Terminate(); // (static function) SBDebugger::Initialize() and SBDebugger::Terminate() are ref counted to ensure nothing gets destroyed too early when multiple clients might be attached. Cleaned up the command interpreter and the CommandObject and all subclasses to take more appropriate arguments. llvm-svn: 106615
* Initialize member so GDBRemoteRegisterContext::ReadRegisterBytes doesn't rely onBenjamin Kramer2010-06-211-0/+1
| | | | | | | | an unitialized variable. valgrind_errors -= 1; llvm-svn: 106418
* Add a "thread specification" class that specifies thread specific ↵Jim Ingham2010-06-161-4/+13
| | | | | | | | | | | | breakpoints by name, index, queue or TID. Push this through all the breakpoint management code. Allow this to be set when the breakpoint is created. Fix the Process classes so that a breakpoint hit that is not for a particular thread is not reported as a breakpoint hit event for that thread. Added a "breakpoint configure" command to allow you to reset any of the thread specific options (or the ignore count.) llvm-svn: 106078
* Move Args.{cpp,h} and Options.{cpp,h} to Interpreter where they really belong.Jim Ingham2010-06-153-3/+3
| | | | llvm-svn: 106034
* Applied PluginManager.cpp patch from Jean-Daniel Dupas.Jason Molenda2010-06-111-2/+2
| | | | | | Fixed problem Jean-Daniel Dupas found in ProcessGDBRemote.cpp. llvm-svn: 105857
* Made lldb_private::ArchSpec more generic so that it can take a mach-o cpuGreg Clayton2010-06-111-34/+40
| | | | | | | | | | | | | | | | type and sub-type, or an ELF e_machine value. Also added a generic CPU type to the arch spec class so we can have a single arch definition that the LLDB core code can use. Previously a lot of places in the code were using the mach-o definitions from a macosx header file. Switches over to using "llvm/Support/MachO.h" for the llvm::MachO::XXX for the CPU types and sub types for mach-o ArchSpecs. Added "llvm/Support/ELF.h" so we can use the "llvm::ELF::XXX" defines for the ELF ArchSpecs. Got rid of all CPU_TYPE_ and CPU_SUBTYPE_ defines that were previously being used in LLDB. llvm-svn: 105806
* Move source/Utility/PseudoTerminal.h into include/lldb/Utility.Jason Molenda2010-06-091-1/+1
| | | | | | | | The top of the header file seems to indicate that this was intended to be over at include/lldb/Core but we should be in line with the .cpp file's location so it's include/lldb/Utility for now. llvm-svn: 105753
* Initial checkin of lldb code from internal Apple repo.Chris Lattner2010-06-0813-0/+6426
llvm-svn: 105619
OpenPOWER on IntegriCloud