| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
The main issue was if you didn't specify all three (stdin/out/err), you would get file actions added to the launch that would always use the pseudo terminal. This is now fixed.
Also fixed the test suite test that handles IO to test redirecting things individually and all together and in other combinations to make sure we don't regress.
<rdar://problem/18638226>
llvm-svn: 219711
|
|
|
|
|
|
|
|
| |
based build since the subdirectories all appear to
have no inter-directory dependencies. This speeds
up parallel makefile builds greatly.
llvm-svn: 219660
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
quit the debugger
after all the commands have been executed except if one of the commands was an execution control
command that stopped because of a signal or exception.
Also adds a variant of SBCommandInterpreter::HandleCommand that takes an SBExecutionContext. That
way you can run an lldb command targeted at a particular target, thread or process w/o having to
select same before running the command.
Also exposes CommandInterpreter::HandleCommandsFromFile to the SBCommandInterpreter API, since that
seemed generally useful.
llvm-svn: 219654
|
|
|
|
|
|
|
| |
Patch by Enrico Granata.
<rdar://problem/18618298>
llvm-svn: 219641
|
|
|
|
|
|
|
|
| |
if a process is resumed or halted, it will try to push/pop the process IOHandler and it will deadlock.
<rdar://problem/18610852>
llvm-svn: 219620
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this change, both local-process llgs and remote-target llgs stdout/stderr
handling from inferior work correctly.
Several log lines have been added around PTY and stdout/stderr redirection
logic on the lldb client side.
Regarding remote llgs execution, see the following:
With these changes, remote llgs with $O now works properly:
$ lldb
(lldb) platform select remote-linux
(lldb) target create ~/some/inferior/exe
(lldb) gdb-remote {some-target}:{port}
(lldb) run
The sequence above will correctly redirect stdout/stderr over gdb-remote $O,
as is needed for remote debugging. That sequence assumes there is a lldb-gdbserver
exe running on the target with {some-host}:{port}.
You can replace the gdb-remote command with a '(lldb) platform connect
connect://{target-ip}:{target-port}'. If you do this and have a
lldb-platform running on the remote end, it will go ahead and launch
llgs for lldb for each target instance that is run/attached.
For local debugging with llgs, the following sequence also works, and
uses local PTYs instead to avoid $O and extra gdb-remote messages:
$ lldb
(lldb) settings set platform.plugin.linux.use-llgs true
(lldb) target create ~/some/inferior/exe
(lldb) run
The above will run the inferior using llgs on the local host, and
will use PTYs rather than $O redirection.
This change also removes the logging that happened after the fork but
before the exec when llgs is launching a new inferior process. Some
aspect of the file handling during that portion of code would not do
the right thing with log handling. We might want to go back later
and have that communicate over a pipe from the child to parent to pass
along any messages that previously were logged in that section of code.
llvm-svn: 219578
|
|
|
|
| |
llvm-svn: 219576
|
|
|
|
|
|
|
|
|
|
| |
Reviewed at http://reviews.llvm.org/D5738
This adds an SB API into SBProcess:
bool SBProcess::IsInstrumentationRuntimePresent(InstrumentationRuntimeType type);
which simply tells whether a particular InstrumentationRuntime (read "ASan") plugin is present and active.
llvm-svn: 219560
|
|
|
|
|
|
| |
AddressSanitizer by adding dependencies and definitions.
llvm-svn: 219554
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
do that (RunCommandInterpreter, HandleCommands, HandleCommandsFromFile) to gather
the options into an options class. Also expose that to the SB API's.
Change the way the "-o" options to the lldb driver are processed so:
1) They are run synchronously - didn't really make any sense to run the asynchronously.
2) The stop on error
3) "quit" in one of the -o commands will not quit lldb - not the command interpreter
that was running the -o commands.
I added an entry to the run options to stop-on-crash, but I haven't implemented that yet.
llvm-svn: 219553
|
|
|
|
|
|
| |
but in the conditional rather than at initialization time.
llvm-svn: 219549
|
|
|
|
| |
llvm-svn: 219548
|
|
|
|
| |
llvm-svn: 219547
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
report data extraction
Reviewed at http://reviews.llvm.org/D5592
This patch gives LLDB some ability to interact with AddressSanitizer runtime library, on top of what we already have (historical memory stack traces provided by ASan). Namely, that's the ability to stop on an error caught by ASan, and access the report information that are associated with it. The report information is also exposed into SB API.
More precisely this patch...
adds a new plugin type, InstrumentationRuntime, which should serve as a generic superclass for other instrumentation runtime libraries, these plugins get notified when modules are loaded, so they get a chance to "activate" when a specific dynamic library is loaded
an instance of this plugin type, AddressSanitizerRuntime, which activates itself when it sees the ASan dynamic library or founds ASan statically linked in the executable
adds a collection of these plugins into the Process class
AddressSanitizerRuntime sets an internal breakpoint on __asan::AsanDie(), and when this breakpoint gets hit, it retrieves the report information from ASan
this breakpoint is then exposed as a new StopReason, eStopReasonInstrumentation, with a new StopInfo subclass, InstrumentationRuntimeStopInfo
the StopInfo superclass is extended with a m_extended_info field (it's a StructuredData::ObjectSP), that can hold arbitrary JSON-like data, which is the way the new plugin provides the report data
the "thread info" command now accepts a "-s" flag that prints out the JSON data of a stop reason (same way the "-j" flag works now)
SBThread has a new API, GetStopReasonExtendedInfoAsJSON, which dumps the JSON string into a SBStream
adds a test case for all of this
I plan to also get rid of the original ASan plugin (memory history stack traces) and use an instance of AddressSanitizerRuntime for that purpose.
Kuba
llvm-svn: 219546
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
output style can be customized. Change the built-in default to be
more similar to gdb's disassembly formatting.
The disassembly-format for a gdb-like output is
${addr-file-or-load} <${function.name-without-args}${function.concrete-only-addr-offset-no-padding}>:
The disassembly-format for the lldb style output is
{${function.initial-function}{${module.file.basename}`}{${function.name-without-args}}:\n}{${function.changed}\n{${module.file.basename}`}{${function.name-without-args}}:\n}{${current-pc-arrow} }{${addr-file-or-load}}:
The two backticks in the lldb style formatter triggers the sub-expression evaluation in
CommandInterpreter::PreprocessCommand() so you can't use that one as-is ... changing to
use ' characters instead of ` would work around that.
<rdar://problem/9885398>
llvm-svn: 219544
|
|
|
|
|
|
|
|
|
| |
^? combination gets resolved to no type, while we could resolve it to void*
I don't think on any of the platforms where ObjC matters sizeof(T*) depends on T, so even if we never figured out the pointee type, the pointer type should still be sane
This might also allow some limited inspection where previously none was possible, so a win
llvm-svn: 219540
|
|
|
|
|
|
| |
This accounts for the case where a dlopen() call fails when loading a library with a missing dependency.
llvm-svn: 219520
|
|
|
|
|
|
|
|
|
| |
Addresses pr/21190 (http://llvm.org/bugs/show_bug.cgi?id=21190).
r219169 implemented this change list:
http://reviews.llvm.org/D5472 for more details.
llvm-svn: 219461
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
enabled.
See http://reviews.llvm.org/D5695 for details.
This change does the following:
Enable lldb-gdbserver (llgs) usage for local-process Linux debugging.
To turn on local llgs debugging support, which is disabled by default, enable this setting:
(lldb) settings set platform.plugin.linux.use-llgs-for-local true
Adds a stream-based Dump() function to FileAction.
Pushes some platform methods that Linux (and FreeBSD) will want to share with MacOSX from PlatformDarwin into PlatformPOSIX.
Reviewed by Greg Clayton.
llvm-svn: 219457
|
|
|
|
|
|
| |
command, be ready to use synthetic children if they are there. Those are now a source of values, so worth checking for
llvm-svn: 219452
|
|
|
|
|
|
| |
loops until asked to actually fetch children. Also, if you're going to read child X, only look for a loop in the first X nodes. Loops further down the road won't really matter. This should speed things up for large lists and fix rdar://18583790
llvm-svn: 219447
|
|
|
|
| |
llvm-svn: 219435
|
|
|
|
|
|
| |
to generate a value for itself, that's not a disqualifier from one-line printing. Also, fetch synthetic values if available and requested for children as well while printing them
llvm-svn: 219427
|
|
|
|
|
|
| |
combination all at once, if available, working somewhat hard to avoid returning an invalid ValueObject in the process
llvm-svn: 219423
|
|
|
|
|
|
|
|
|
|
| |
Adds a test to verify that a thread resume request marks the thread as running
after doing the resume callback. This test fails without the corresponding
ThreadStateCoordinator.cpp change.
Fixes the code where that state was not maintained.
llvm-svn: 219412
|
|
|
|
| |
llvm-svn: 219377
|
|
|
|
|
|
| |
GDBRemoteCommunicationClient::SendGDBStoppointTypePacket.
llvm-svn: 219374
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
handling on entry callback.
This change adds some logging around dynamic loader handling.
It also fixes an issue where the dynamic loader entry breakpoint can end
up being re-inserted, showing the wrong (i.e. software breakpoint) instruction
at the stop location when a backtrace is displayed at program startup.
I discussed with Jim Ingham a few weeks back. Essentially the
one-hit breakpoints need to make it back to public state handling before
the software breakpoint gets cleared. The flow I was hitting was that
the breakpoint would get set, it would get hit, it would get cleared to
step over, then it would get reapplied, when we never wanted it reapplied.
Stops at the beginning of execution would then show backtraces with
software breakpoint instructions in it, erroneously. This change fixes it.
There might be a more elegant way to do this, or a flow change somewhere else
to avoid, but it does fix an issue I experienced in startup breakpoint handling.
llvm-svn: 219371
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Python one-line execution was using ConnectionFileDescriptor to do
a non-blocking read against a pipe. This won't work on Windows,
as CFD is implemented using select(), and select() only works with
sockets on Windows.
The solution is to use ConnectionGenericFile on Windows, which uses
the native API to do overlapped I/O on the pipe. This in turn
requires re-implementing Host::Pipe on Windows using native OS
handles instead of the more portable _pipe CRT api.
Reviewed by: Greg Clayton
Differential Revision: http://reviews.llvm.org/D5679
llvm-svn: 219339
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GetValueAsUnsigned(), GetValueAsCString() would return)
The way to do this is to write a synthetic child provider for your type, and have it vend the (optional) get_value function.
If get_value is defined, and it returns a valid SBValue, that SBValue's value (as in lldb_private::Value) will be used as the synthetic ValueObject's Value
The rationale for doing things this way is twofold:
- there are many possible ways to define a "value" (SBData, a Python number, ...) but SBValue seems general enough as a thing that stores a "value", so we just trade values that way and that keeps our currency trivial
- we could introduce a new level of layering (ValueObjectSyntheticValue), a new kind of formatter (synthetic value producer), but that would complicate the model (can I have a dynamic with no synthetic children but synthetic value? synthetic value with synthetic children but no dynamic?), and I really couldn't see much benefit to be reaped from this added complexity in the matrix
On the other hand, just defining a synthetic child provider with a get_value but returning no actual children is easy enough that it's not a significant road-block to adoption of this feature
Comes with a test case
llvm-svn: 219330
|
|
|
|
|
|
|
|
| |
and restored.
Useful for verifying what bytes a software breakpoint clobbers/restores.
llvm-svn: 219318
|
|
|
|
| |
llvm-svn: 219269
|
|
|
|
|
|
|
|
| |
also contains a breakpoint.
<rdar://problem/18519712>
llvm-svn: 219263
|
|
|
|
|
|
|
|
| |
the backtrace, try falling back to the architecture default
unwind plan and see if we can backtrace a little further.
<rdar://problem/18556719>
llvm-svn: 219247
|
|
|
|
|
|
| |
happened. While that will most likely be true in practice, the consequences of this not being the case will be a crash. I fix the crash by doing two things: 1) don't let already-enabled categories be enabled anyway; 2) if a category were disabled but with a bogus last-enabled position - highly highly unlikely - just put it in the first empty slot. I am not so sure 2) is bulletproof perfect, but I also don't think 2) will practically ever happen
llvm-svn: 219245
|
|
|
|
| |
llvm-svn: 219232
|
|
|
|
|
|
|
|
| |
See http://reviews.llvm.org/D5632 for details.
Change by Shawn Best.
llvm-svn: 219213
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This setting contains the following:
A list containing all the arguments to be passed to the expression parser compiler.
This change also ensures quoted arguments are handled appropriately.
See http://reviews.llvm.org/D5472 for more details.
Change by Tong Shen.
llvm-svn: 219169
|
|
|
|
|
|
| |
<rdar://problem/18560328>
llvm-svn: 219152
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the first step in getting ConnectionFileDescriptor ported
to Windows. It implements a connection against a disk file for
windows. This supports connection strings of the form file://PATH
which are currently supported only on posix platforms in
ConnectionFileDescriptor.
Reviewed by: Greg Clayton
Differential Revision: http://reviews.llvm.org/D5608
llvm-svn: 219145
|
|
|
|
|
|
|
|
|
|
|
|
| |
As part of getting ConnectionFileDescriptor working on Windows,
there is going to be alot of platform specific work to be done.
As a result, the implementation is moving into Host. This patch
performs the code move and fixes up call-sites appropriately.
Reviewed by: Greg Clayton
Differential Revision: http://reviews.llvm.org/D5548
llvm-svn: 219143
|
|
|
|
|
|
| |
type as the static type. Instead use the TypeImpl() constructor correctly
llvm-svn: 219142
|
|
|
|
| |
llvm-svn: 219120
|
|
|
|
|
|
|
| |
The above change permits developers using the lldb C++ API to
code applications in a more logical manner.
llvm-svn: 219102
|
|
|
|
|
|
| |
that matter, also skip running the test on Darwin. libstdc++ is more relevant on non-Apple platforms
llvm-svn: 218952
|
|
|
|
|
|
|
|
|
|
| |
enable *" command does not honor the order in which categories were previously enabled
While we didn't really promise it would, it seems like it should
This checkin enables just that, and fixes rdar://18527468
llvm-svn: 218949
|
|
|
|
|
|
|
|
| |
Added tests and impl to make sure the following errors are reported:
* Notifying a created thread that we are already tracking.
* Notifying a thread death for a thread we don't know about.
llvm-svn: 218900
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that ThreadStateCoordinator errors out on threads in unexpected states,
it has enough information to know which threads need stop requests fired
when we want to do a deferred callback on a thread's behalf. This change
adds a new method, CallAfterRunningThreadsStop(...), which no longer
takes a set of thread ids that require stop requests. It's much harder
to misuse this method and (with newer error logic) it's harder to
correctly use the original method. Expect the original method that takes
the set of thread ids to stop to disappear in the near future.
Adds several tests for CallAfterRunningThreadsStop().
llvm-svn: 218897
|
|
|
|
|
|
|
|
|
|
| |
Added tests to verify that the coordinator signals an error if
the given thread to resume is unknown, and if the thread is through to
be running already.
Modified resume handling code to match tests.
llvm-svn: 218872
|
|
|
|
|
|
|
|
|
| |
updating its ivars. We've had a lot of crash reports and careful
analysis shows that we've got multiple threads operating on the
same StackFrame objects, changing their m_sc and m_flags ivars.
<rdar://problem/18406111>
llvm-svn: 218845
|