| Commit message (Collapse) | Author | Age | Files | Lines | 
| ... |  | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
Reviewers: clayborg, ovyalov, chaoren
Reviewed By: chaoren
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D8689
llvm-svn: 233768
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
Affected paths:
* Plugins/Platform/Android/*
* Plugins/Platform/Linux/*
* Plugins/Platform/gdb-server/*
* Plugins/Process/Linux/*
* Plugins/Process/gdb-remote/*
Differential revision: http://reviews.llvm.org/D8654
llvm-svn: 233679
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
Previously the remote module sepcification was fetched only from the
remote platform. With this CL if we have a remote process then we ask it
if it have any information from a given module. It is required because
on android the dynamic linker only reports the name of the SO file and
the platform can't always find it without a full path (the process can
do it based on /proc/<pid>/maps).
Differential revision: http://reviews.llvm.org/D8547
llvm-svn: 233061
 | 
| | 
| 
| 
|  | 
llvm-svn: 232952
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
Some application on Linux an all application on android close stdout and
stderr during the libc exit stage. Previously the master file descriptor
of the pseudo terminal used to communicate with the inferior was closed
on an EOF causing a race condition and a possible SIGHUP on process
exit. After this change the master file descriptor will be closed by the
destructor of the GDBRemoteCommunicationServerLLGS class.
Differential revision: http://reviews.llvm.org/D8436
llvm-svn: 232724
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
This moves the conversion of the open options to the target platform. On mac fcntl.h has different values for O_CREAT and O_TRUNC than on linux so by transmitting the standardized lldb open options we can correctly convert them on the target platform.
Test Plan:
On linux:
  lldb-server p --listen *:1234
On mac:
  lldb
  platform select remote-linux
  platform connect connect://ip-of-linux-box:1234
  target create ~/path/to/linux/binary
  b main
  process launch
Binary is successfully pushed to linux remote, process successfully launches and break in the main method.
Differential Revision: http://reviews.llvm.org/D8395
llvm-svn: 232634
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
This removes ScriptInterpreterObject from the codebase completely.
Places that used to rely on ScriptInterpreterObject now use
StructuredData::Object and its derived classes.  To support this,
a new type of StructuredData object is introduced, called
StructuredData::Generic, which stores a void*.  Internally within
the python library, StructuredPythonObject subclasses this
StructuredData::Generic class so that it can addref and decref
the python object on construction and destruction.
Additionally, all of the classes in PythonDataObjects.h such
as PythonList, PythonDictionary, etc now provide a method to
create an instance of the corresponding StructuredData type.  For
example, there is PythonDictionary::CreateStructuredDictionary.
To eliminate dependencies on PythonDataObjects for external
callers, all ScriptInterpreter methods now return only
StructuredData classes
The rest of the changes in this CL are focused on fixing up
users of PythonDataObjects classes to use the new StructuredData
classes.
llvm-svn: 232534
 | 
| | 
| 
| 
|  | 
llvm-svn: 232488
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
The file path is currently required on android because the executables
only contain the name of the system libraries without their path. This
CL add an extra field to the qModuleInfo packet to return the full path
of a modul and add logic to locate a shared module on android.
Differential revision: http://reviews.llvm.org/D8221
llvm-svn: 232156
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
Previously it was fetched only if the architecture isn't valid, but the
architecture can be valid without containing all information about the
current target (e.g. missing os).
Differential revision: http://reviews.llvm.org/D8057
llvm-svn: 232153
 | 
| | 
| 
| 
| 
| 
| 
|  | 
The architecture of a target should be updated only by the
SetArchitecture method so the target can correctly manage its modules.
llvm-svn: 232152
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
This was previously initialized by ProcessGDBRemote::Initialize but lldb-server does not contain ProcessGDBRemote anymore so this needs to be initialized directly.
Differential Revision: http://reviews.llvm.org/D8186
llvm-svn: 231966
 | 
| | 
| 
| 
| 
| 
|  | 
http://reviews.llvm.org/D8239
llvm-svn: 231949
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
Summary:
ProcessGDBRemote::AsyncThread nuked its own thread handle upon exiting. This prevented the main
thread from joining it correctly in StopAsyncThread. I address this by moving the Reset() call to
StopAsyncThread, after the join.
Reviewers: clayborg, zturner
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D8218
llvm-svn: 231915
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
- in order to allow modules caching from remote targets.
http://reviews.llvm.org/D8037
llvm-svn: 231734
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
Setting it from the Target architecture cause problems when the target
archiutecture is filled just by examining the executable because in that
case the OS isn't set.
Differential revision: http://reviews.llvm.org/D8035
llvm-svn: 231234
 | 
| | 
| 
| 
|  | 
llvm-svn: 231202
 | 
| | 
| 
| 
|  | 
llvm-svn: 231169
 | 
| | 
| 
| 
| 
| 
| 
|  | 
No functional change here, only deletes unnecessary headers
and moves one function's body from the .h file to the .cpp.
llvm-svn: 231145
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
Summary:
Before this fix the FileSpec::GetPath() returned string which might be without '\0' at the end.
It could have happened if the size of buffer for path was less than actual path.
Test case:
```
FileSpec test("/path/to/file", false);
char buf[]="!!!!!!";
test.GetPath(buf, 3);
```
Before fix:
```
   233          FileSpec test("/path/to/file", false);
   234          char buf[]="!!!!!!";
   235          test.GetPath(buf, 3);
   236
-> 237          if (core_file)
   238          {
   239              if (!core_file.Exists())
   240              {
(lldb) print buf
(char [7]) $0 = "/pa!!!"
```
After fix:
```
   233          FileSpec test("/path/to/file", false);
   234          char buf[]="!!!!!!";
   235          test.GetPath(buf, 3);
   236
-> 237          if (core_file)
   238          {
   239              if (!core_file.Exists())
   240              {
(lldb) print buf
(char [7]) $0 = "/p"
```
Reviewers: zturner, abidh, clayborg
Reviewed By: abidh, clayborg
Subscribers: tberghammer, vharron, lldb-commits, clayborg, zturner, abidh
Differential Revision: http://reviews.llvm.org/D7553
llvm-svn: 230787
 | 
| | 
| 
| 
| 
| 
|  | 
Differential revision: http://reviews.llvm.org/D7853
llvm-svn: 230626
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
by module path from remote platform.
http://reviews.llvm.org/D7709
llvm-svn: 230556
 | 
| | 
| 
| 
|  | 
llvm-svn: 230418
 | 
| | 
| 
| 
|  | 
llvm-svn: 230390
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
This new class makes it easier to change the timeout of a
GDBRemoteCommunication instance for a short time and then restore it to
its original value.
Differential revision: http://reviews.llvm.org/D7826
llvm-svn: 230319
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
With the previous implementation the protocol used by the client and the
server for the response was different and worked only by an accident.
With this change the communication is fixed and the return code from
mkdir and chmod correctly captured by lldb. The change also add
documentation for the qPlatform__[mkdir,chmod] packages.
Differential revision: http://reviews.llvm.org/D7786
llvm-svn: 230213
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
until ThreadStateCoordinator is fully stopped before entering ~NativeProcessLinux.
http://reviews.llvm.org/D7692
llvm-svn: 229875
 | 
| | 
| 
| 
|  | 
llvm-svn: 229718
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
This commit merges lldb-platform and lldb-gdbserver into a single binary
of the same size as each of the previous individual binaries. Execution
mode is controlled by the first argument being either platform or
gdbserver.
Patch from: flackr <flackr@google.com>
Differential revision: http://reviews.llvm.org/D7545
llvm-svn: 229683
 | 
| | 
| 
| 
| 
| 
| 
|  | 
It is required because MSVC 2013 doesn't generate correct code for
template aliases.
llvm-svn: 229666
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
Summary:
Using GDB register numbers confuses ProcessGDBRemote since the rest of
LLGS (qRegisterInfo, p, P) uses the default register numbers instead.
Test Plan: dosep.py --options --arch x86 ...
Reviewers: ovyalov, vharron, sivachandra
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D7635
llvm-svn: 229505
 | 
| | 
| 
| 
|  | 
llvm-svn: 229503
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
Fixed test case to copy redirected stdout/stderr files from remote
target to host
llgs wasn't bothering to put the pty master file handle in the right
place if stdout/stderr were redirected to a file. It is still needed
for stdin.
Corrected some log message text
llvm-svn: 229141
 | 
| | 
| 
| 
|  | 
llvm-svn: 228828
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
GDBRemoteCommunicationServer: Basic packet handling, handler registration
LLDBCommonPacketHandler: Common packet handling for lldb-platform and lldb-gdbserver
LLDBPlatformPacketHandler: lldb-platform specific packet handling
LLGSPacketHandler: lldb-gdbserver specific packet handling
Differential Revision: http://reviews.llvm.org/D7538
llvm-svn: 228823
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
We want to forward stdin when stdio is not disabled and when we're not
redirecting stdin from a file.
renamed m_stdio_disable to m_stdin_forward and inverted value because
that's what we want to remember.
There was previously a bug that if you redirected stdin from a file,
stdout and stderr would also be redirected to /dev/null
Adds support for remote target to TestProcessIO.py
Fixes ProcessIOTestCase.test_stdin_redirection_with_dwarf for remote
Linux targets
llvm-svn: 228744
 | 
| | 
| 
| 
| 
| 
|  | 
request - otherwise subsequent process launches will reuse data from previous launch.
llvm-svn: 228430
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
Processes running on a remote target can already send $O messages
to send stdout but there is no way to send stdin to a remote
inferior.
This allows processes using the API to pump stdin into a remote
inferior process.
It fixes a hang in TestProcessIO.py when running against a remote
target.
llvm-svn: 228419
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
using PipeBase::CreateWithUniqueName - on behalf of flackr.
http://reviews.llvm.org/D7348
llvm-svn: 228307
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
Integrate this change into test framework in order to spawn processes on a remote target.
http://reviews.llvm.org/D7263
llvm-svn: 228230
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
Remove implicit stop action on $vCont package for threads where no
explicit action or default action specified based on the specification
(they have to stay in there original state).
llvm-svn: 227933
 | 
| | 
| 
| 
|  | 
llvm-svn: 227931
 | 
| | 
| 
| 
|  | 
llvm-svn: 227930
 | 
| | 
| 
| 
|  | 
llvm-svn: 227929
 | 
| | 
| 
| 
| 
| 
| 
|  | 
CrashReason class. Deliver crash information from LLGS to lldb via
description field of thread stop packet.
llvm-svn: 227926
 | 
| | 
| 
| 
|  | 
llvm-svn: 227919
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
lldb-platform - commit on behalf of flackr.
http://reviews.llvm.org/D7211
llvm-svn: 227329
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
This patch fixes TestRegisters on Linux with LLGS
Introduce GetUserRegisterCount on RegisterInfoInterface to distinguish
lldb internal registers (e.g.: DR0-DR7) during register counting.
Update GDBRemoteCommunicationServer to skip lldb internal registers on
read/write register and on discover register.
Submitted for Tamas Berghammer
llvm-svn: 226959
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
Make sure the selected platform is always used
Make sure that the host uses the connect://hostname to connect to both
the lldb-platform and the lldb-gdbserver rather than what the platform
reports as the hostname of the lldb-gdbserver
Make sure that lldb-platform uses the IP address on it's connection
back to the host instead of the hostname that the host sends to it
when launching lldb-gdbserver with the remote host information
Tested on OSX and Linux
llvm-svn: 226712
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
The refactor was motivated by some comments that Greg made
http://reviews.llvm.org/D6918
and also to break a dependency cascade that caused functions linking
in string->int conversion functions to pull in most of lldb
llvm-svn: 226199
 |