#
aae6e9a6 |
| 03-Feb-2011 |
Greg Clayton <gclayton@apple.com> |
Fixed the SendInterrupt logic to return the true if the target was halted (regardless if the interrupt was sent), and false of not.
llvm-svn: 124766
|
#
7fb56d0a |
| 01-Feb-2011 |
Greg Clayton <gclayton@apple.com> |
Endian patch from Kirk Beitz that allows better cross platform building.
llvm-svn: 124643
|
#
513c26ce |
| 29-Jan-2011 |
Greg Clayton <gclayton@apple.com> |
Finished up the async attach support. This allows us to request to attach by name or by pid (with or without waiting for a process to launch) and catch the response asynchronously.
llvm-svn: 124530
|
#
7ec3d40e |
| 27-Jan-2011 |
Greg Clayton <gclayton@apple.com> |
Finally tracked down the racy condition that would hose up our debug sessions: When continue packet has been sent and an interrupt packet was quickly sent, it would get read at the same time:
$c#00\
Finally tracked down the racy condition that would hose up our debug sessions: When continue packet has been sent and an interrupt packet was quickly sent, it would get read at the same time:
$c#00\x03
There was an error where the packet end index was always being computed incorrectly by debugserver, but it wouldn't matter if there weren't extra bytes on the end (the hex \x03 interrupt byte in this case). The first '$' last 3 bytes of the data in the packet buffer were being trimmed (trying to trim the '#' + checksum (#XX)) which made:
c#
And this would then be passed to the handle routine for the 'c' packet which would see an extra character at the end and assume it was going to be in the form c[addr] where "[addr]" was a hex address to resume at and this would result in a malformed packet response. This is now fixed and everything works great.
Another issue was issuing async packets correctly by doing correct handshakes between the thread that wants to send the async packet, and the thread that is tracking the current run.
Added a write lock to the communication class as well to make sure you never get two threads trying to write data at the same time. This wasn't happening, but it is a good idea to make sure it doesn't.
llvm-svn: 124369
show more ...
|
#
414f5d3f |
| 25-Jan-2011 |
Greg Clayton <gclayton@apple.com> |
Fixed ProcessGDBRemote to kill the process correctly when it is either running or stopped.
Added support for sections to be able to state if they are encrypted or not.
llvm-svn: 124171
|
#
6779606a |
| 22-Jan-2011 |
Greg Clayton <gclayton@apple.com> |
Fixed an issue in "SBError SBProcess::Destroy ()" where it wasn't properly checking the validity of the shared pointer prior to using it.
Fixed the GDB remote plug-in to once again watch for a reply
Fixed an issue in "SBError SBProcess::Destroy ()" where it wasn't properly checking the validity of the shared pointer prior to using it.
Fixed the GDB remote plug-in to once again watch for a reply from the "k" packet, and fixed the logic to make sure the thread requesting the kill and the async thread play nice (and very quickly) by synchronizing the packet sending and reply. I also tweaked some of the shut down packet ("k" kill, "D" detach, and the halt packet) to make sure they do the right thing.
Fixed "StateType Process::WaitForProcessStopPrivate (...)" to correctly pass the timeout along to WaitForStateChangedEventsPrivate() and made the function behave correctly with respect to timing out.
Added separate STDIN, STDOUT, and STDERR support to debugserver. Also added the start of being able to set the working directory for the inferior process.
llvm-svn: 124049
show more ...
|
#
6ed95945 |
| 22-Jan-2011 |
Greg Clayton <gclayton@apple.com> |
Sped up the shutdown time on MacOSX by quite a bit by making sure any threads that we spawn let us know when they are going away and that we don't timeout waiting for a message from threads that have
Sped up the shutdown time on MacOSX by quite a bit by making sure any threads that we spawn let us know when they are going away and that we don't timeout waiting for a message from threads that have gone away. We also now don't expect the "k" packet (kill) to send a response. This greatly speeds up debugger shutdown performance. The test suite now runs quite a bit faster.
Added a fix to the variable display code that fixes the display of base classes. We were assuming the virtual or normal base class offsets were being given in bit sizes, but they were being given as character sizes, so we needed to multiply the offset by 8. This wasn't affecting the expression parser, but it was affecting the correct display of C++ class base classes and all of their children.
llvm-svn: 124024
show more ...
|
#
4dc72284 |
| 20-Jan-2011 |
Greg Clayton <gclayton@apple.com> |
Fixed the async packets (packets that need to be sent to the GDB server while the inferior is running) to be fast. The previous code would always cause the sender to timeout, yet still return succes
Fixed the async packets (packets that need to be sent to the GDB server while the inferior is running) to be fast. The previous code would always cause the sender to timeout, yet still return success due to the way we were waiting for a value (incorrect value) to change. Now the ProcessGDBRemote plug-in has a public and private "is running" predicate. This allows things that need to send async packets to interrupt and wait for the private "is running" state to be flipped to false, and then resume quickly with no timeout.
llvm-svn: 123903
show more ...
|
#
c4e411ff |
| 18-Jan-2011 |
Greg Clayton <gclayton@apple.com> |
Thread safety changes in debugserver and also in the process GDB remote plugin. I added support for asking if the GDB remote server supports thread suffixes for packets that should be thread specific
Thread safety changes in debugserver and also in the process GDB remote plugin. I added support for asking if the GDB remote server supports thread suffixes for packets that should be thread specific (register read/write packets) because the way the GDB remote protocol does it right now is to have a notion of a current thread for register and memory reads/writes (set via the "$Hg%x" packet) and a current thread for running ("$Hc%x"). Now we ask the remote GDB server if it supports adding the thread ID to the register packets and we enable that feature in LLDB if supported. This stops us from having to send a bunch of packets that update the current thread ID to some value which is prone to error, or extra packets.
llvm-svn: 123762
show more ...
|
#
92adcac9 |
| 13-Jan-2011 |
Sean Callanan <scallanan@apple.com> |
Implemented a major overhaul of the way variables are handled by LLDB. Instead of being materialized into the input structure passed to the expression, variables are left in place and pointers to th
Implemented a major overhaul of the way variables are handled by LLDB. Instead of being materialized into the input structure passed to the expression, variables are left in place and pointers to them are materialzied into the structure. Variables not resident in memory (notably, registers) get temporary memory regions allocated for them.
Persistent variables are the most complex part of this, because they are made in various ways and there are different expectations about their lifetime. Persistent variables now have flags indicating their status and what the expectations for longevity are. They can be marked as residing in target memory permanently -- this is the default for result variables from expressions entered on the command line and for explicitly declared persistent variables (but more on that below). Other result variables have their memory freed.
Some major improvements resulting from this include being able to properly take the address of variables, better and cleaner support for functions that return references, and cleaner C++ support in general. One problem that remains is the problem of explicitly declared persistent variables; I have not yet implemented the code that makes references to them into indirect references, so currently materialization and dematerialization of these variables is broken.
llvm-svn: 123371
show more ...
|
#
710dd5ae |
| 08-Jan-2011 |
Greg Clayton <gclayton@apple.com> |
Spelling changes applied from lldb_spelling.diffs from Bruce Mitchener.
Thanks Bruce!
llvm-svn: 123083
|
#
de9d0494 |
| 08-Jan-2011 |
Greg Clayton <gclayton@apple.com> |
Modified the stop reply packet to be able to send the thread name using the new "hexname" key for the "key:value;" duple that is part of the packet. This allows for thread names to contain special ch
Modified the stop reply packet to be able to send the thread name using the new "hexname" key for the "key:value;" duple that is part of the packet. This allows for thread names to contain special characters such as $ # : ; + -
Debugserver now detects if the thread name contains special characters and sends the chars in hex format if needed.
llvm-svn: 123053
show more ...
|
#
d46c87a1 |
| 04-Dec-2010 |
Greg Clayton <gclayton@apple.com> |
More reverting of the EOF stuff as the API was changed which we don't want to do. Closing on EOF is an option that can be set on the lldb_private::Communication or the lldb::SBCommunication objects
More reverting of the EOF stuff as the API was changed which we don't want to do. Closing on EOF is an option that can be set on the lldb_private::Communication or the lldb::SBCommunication objects after they are created. Of course the EOF support isn't hooked up, so they don't do anything at the moment, but they are left in so when the code is fixed, it will be easy to get working again.
llvm-svn: 120885
show more ...
|
#
e5219660 |
| 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
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.
llvm-svn: 120793
show more ...
|
#
a9759901 |
| 03-Dec-2010 |
Greg Clayton <gclayton@apple.com> |
Fixed bad logic that was trying to determine if the gdb remote resumed a process or not.
llvm-svn: 120761
|
#
82305fc5 |
| 02-Dec-2010 |
Caroline Tice <ctice@apple.com> |
Add proper EOF handling to Communication & Connection classes:
Add bool member to Communication class indicating whether the Connection should be closed on receiving an EOF or not. Update the Conne
Add proper EOF handling to Communication & Connection classes:
Add bool member to Communication class indicating whether the Connection should be closed on receiving an EOF or not. Update the Connection read to return an EOF status when appropriate. Modify the Communication class to pass the EOF along or not, and to close the Connection or not, as appropriate.
llvm-svn: 120723
show more ...
|
#
efed6131 |
| 19-Nov-2010 |
Caroline Tice <ctice@apple.com> |
Add the ability to catch and do the right thing with Interrupts (often control-c) and end-of-file (often control-d).
llvm-svn: 119837
|
#
0d8bcc79 |
| 17-Nov-2010 |
Jim Ingham <jingham@apple.com> |
Added an "Interrupted" bit to the ProcessEventData. Halt now generates an event with the Interrupted bit set. Process::HandlePrivateEvent ignores Interrupted events. DoHalt is changed to ensure tha
Added an "Interrupted" bit to the ProcessEventData. Halt now generates an event with the Interrupted bit set. Process::HandlePrivateEvent ignores Interrupted events. DoHalt is changed to ensure that the stop even is processed, and an event with the Interrupted event is posted. Finally ClangFunction is rationalized to use this facility so the that Halt is handled more deterministically.
llvm-svn: 119453
show more ...
|
#
2d4edfbc |
| 06-Nov-2010 |
Greg Clayton <gclayton@apple.com> |
Modified all logging calls to hand out shared pointers to make sure we don't crash if we disable logging when some code already has a copy of the logger. Prior to this fix, logs were handed out as po
Modified all logging calls to hand out shared pointers to make sure we don't crash if we disable logging when some code already has a copy of the logger. Prior to this fix, logs were handed out as pointers and if they were held onto while a log got disabled, then it could cause a crash. Now all logs are handed out as shared pointers so this problem shouldn't happen anymore. We are also using our new shared pointers that put the shared pointer count and the object into the same allocation for a tad better performance.
llvm-svn: 118319
show more ...
|
#
20ad3c40 |
| 29-Oct-2010 |
Caroline Tice <ctice@apple.com> |
Add the ability to disable individual log categories, rather than just the entire log channel.
Add checks, where appropriate, to make sure a log channel/category has not been disabled before attemp
Add the ability to disable individual log categories, rather than just the entire log channel.
Add checks, where appropriate, to make sure a log channel/category has not been disabled before attempting to write to it.
llvm-svn: 117715
show more ...
|
Revision tags: llvmorg-2.8.0, llvmorg-2.8.0-rc3, llvmorg-2.8.0-rc2 |
|
#
f5e56de0 |
| 14-Sep-2010 |
Greg Clayton <gclayton@apple.com> |
Moved the section load list up into the target so we can use the target to symbolicate things without the need for a valid process subclass.
llvm-svn: 113895
|
#
d0c40ddf |
| 14-Sep-2010 |
Johnny Chen <johnny.chen@apple.com> |
Added logging of an error message in GDBRemoteCommunication::SendPacketNoLock() if sending of the packet fails for any reason.
llvm-svn: 113874
|
Revision tags: llvmorg-2.8.0-rc1, llvmorg-2.8.0-rc0 |
|
#
ef3cf2b9 |
| 03-Sep-2010 |
Greg Clayton <gclayton@apple.com> |
Added some extra logging to track asynchronous packet activity.
llvm-svn: 113012
|
#
54512bd6 |
| 03-Sep-2010 |
Greg Clayton <gclayton@apple.com> |
Fixed a case where we might be able to acquire a mutex with a try lock and not release it by making sure a mutex locker object is appropriately used.
llvm-svn: 112996
|
#
471b31ce |
| 20-Jul-2010 |
Greg Clayton <gclayton@apple.com> |
Remove use of STL collection class use of the "data()" method since it isn't part of C++'98. Most of these were "std::vector<T>::data()" and "std::string::data()".
llvm-svn: 108957
|