#
816ae4b0 |
| 01-Feb-2017 |
Kamil Rytarowski <n54@gmx.com> |
Transform ProcessLauncherLinux to ProcessLauncherPosixFork
Summary: Use ProcessLauncherPosixFork in Linux and NetBSD.
Changes to ProcessLauncherLinux: - Limit personality.h and ASLR code to Linux.
Transform ProcessLauncherLinux to ProcessLauncherPosixFork
Summary: Use ProcessLauncherPosixFork in Linux and NetBSD.
Changes to ProcessLauncherLinux: - Limit personality.h and ASLR code to Linux. - Reuse portable ptrace(2) PT_TRACE_ME operation available on Linux and BSDs. - Limit ETXTBSY error path from execve(2) to Linux. - In LaunchProcess declaration change virtual to override.
This code should be readily available for FreeBSD.
Sponsored by <The NetBSD Foundation>
Reviewers: joerg, clayborg, labath, emaste
Reviewed By: labath
Subscribers: danalbert, srhines, mgorny, #lldb
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D29347
llvm-svn: 293768
show more ...
|
#
8198db30 |
| 24-Jan-2017 |
Pavel Labath <labath@google.com> |
Add format_provider for lldb::StateType
Reviewers: clayborg
Subscribers: mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D29036
llvm-svn: 292920
|
#
b1554311 |
| 20-Jan-2017 |
Hafiz Abid Qadeer <hafiz_abid@mentor.com> |
Fix more unused variable warnings when asserts are disabled.
llvm-svn: 292598
|
#
a6321a8e |
| 19-Jan-2017 |
Pavel Labath <labath@google.com> |
Refactor logging in NativeProcessLinux
Use the LLDB_LOG macro instead of the more verbose if(log) ... syntax.
I have also consolidated the log channels (everything now goes to the posix channel, in
Refactor logging in NativeProcessLinux
Use the LLDB_LOG macro instead of the more verbose if(log) ... syntax.
I have also consolidated the log channels (everything now goes to the posix channel, instead of a mixture of posix and lldb), and cleaned up some of the more convoluted log statements.
llvm-svn: 292489
show more ...
|
Revision tags: llvmorg-4.0.0-rc1 |
|
#
a6f5795a |
| 03-Jan-2017 |
Tamas Berghammer <tberghammer@google.com> |
Improve the performance of jModulesInfo in lldb-server
Previously it parsed /proc/<pid>/maps for every module separately resulting in a very slow response time. This CL add some caching and optimize
Improve the performance of jModulesInfo in lldb-server
Previously it parsed /proc/<pid>/maps for every module separately resulting in a very slow response time. This CL add some caching and optimizes the implementation to improve the code from O(n*m) to O(n+m) where n is the number of modules requested and m is the number of files mapped into memory.
Differential revision: https://reviews.llvm.org/D28233
llvm-svn: 290895
show more ...
|
#
1f2c1b6c |
| 15-Dec-2016 |
Pavel Labath <labath@google.com> |
Remove linux/personality.h wrapper
This code is currently unused.
Removing it should make porting of the linux plugin to NetBSD easier, and we can always add it later if needed.
llvm-svn: 289801
|
Revision tags: llvmorg-3.9.1, llvmorg-3.9.1-rc3, llvmorg-3.9.1-rc2, llvmorg-3.9.1-rc1 |
|
#
665be50e |
| 11-Nov-2016 |
Mehdi Amini <mehdi.amini@apple.com> |
Revert unwanted changes in lldb when updating llvm::Error()
My script updated lldb::Errors, and I failed to fix it entirely before pushing. This restore everything in lldb as it was before r286561.
Revert unwanted changes in lldb when updating llvm::Error()
My script updated lldb::Errors, and I failed to fix it entirely before pushing. This restore everything in lldb as it was before r286561.
llvm-svn: 286565
show more ...
|
#
41af4309 |
| 11-Nov-2016 |
Mehdi Amini <mehdi.amini@apple.com> |
Make the Error class constructor protected
This is forcing to use Error::success(), which is in a wide majority of cases a lot more readable.
Differential Revision: https://reviews.llvm.org/D26481
Make the Error class constructor protected
This is forcing to use Error::success(), which is in a wide majority of cases a lot more readable.
Differential Revision: https://reviews.llvm.org/D26481
llvm-svn: 286561
show more ...
|
#
771ef6d4 |
| 02-Nov-2016 |
Malcolm Parsons <malcolm.parsons@gmail.com> |
Fix Clang-tidy readability-redundant-string-cstr warnings
Reviewers: zturner, labath
Subscribers: tberghammer, danalbert, lldb-commits Differential Revision: https://reviews.llvm.org/D26233
l
Fix Clang-tidy readability-redundant-string-cstr warnings
Reviewers: zturner, labath
Subscribers: tberghammer, danalbert, lldb-commits Differential Revision: https://reviews.llvm.org/D26233
llvm-svn: 285855
show more ...
|
#
42eb6908 |
| 26-Oct-2016 |
Pavel Labath <labath@google.com> |
Don't set a software stepping breakpoint at 0 on arm or mips.
Summary: Check whether the setting the breakpoint failed during instruction emulation. If it did, the next pc is likely in unmapped memo
Don't set a software stepping breakpoint at 0 on arm or mips.
Summary: Check whether the setting the breakpoint failed during instruction emulation. If it did, the next pc is likely in unmapped memory, and the inferior will crash anyway after the next instruction. Do not return an error in this case, but just continue stepping. Reenabled the crash during step test for android/linux.
Reviewers: labath
Subscribers: aemerson, rengolin, tberghammer, danalbert, srhines, lldb-commits
Differential Revision: https://reviews.llvm.org/D25926 Author: Jason Majors <jmajors@google.com>
llvm-svn: 285187
show more ...
|
#
b9c1b51e |
| 06-Sep-2016 |
Kate Stone <katherine.stone@apple.com> |
*** This commit represents a complete reformatting of the LLDB source code *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications:
Firstly, merging t
*** This commit represents a complete reformatting of the LLDB source code *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications:
Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository):
find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ;
The version of clang-format used was 3.9.0, and autopep8 was 1.2.4.
Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV.
llvm-svn: 280751
show more ...
|
#
e77fce0a |
| 04-Sep-2016 |
Todd Fiala <todd.fiala@gmail.com> |
[NFC] Darwin llgs support from Week of Code
This code represents the Week of Code work I did on bringing up lldb-server LLGS support for Darwin. It does not include the Xcode project changes needed
[NFC] Darwin llgs support from Week of Code
This code represents the Week of Code work I did on bringing up lldb-server LLGS support for Darwin. It does not include the Xcode project changes needed, as we don't want to throw that switch until more support is implemented (i.e. this change is inert, no build systems use it yet. I've verified on Ubuntu 16.04, macOS Xcode and macOS cmake builds).
This change does some minimal refactoring of code that is shared with the Linux LLGS portion, moving it from NativeProcessLinux into NativeProcessProtocol. That code is also used by NativeProcessDarwin.
Current state on Darwin: * Process launching is implemented. (Attach is not). Launching on devices has not yet been tested (FBS/BKS might need a bit of work). * Inferior waitpid monitoring and communication of exit status via MainLoop callback is implemented. * Memory read/write, breakpoints, thread register context, etc. are not yet implemented. This impacts process stop/resume, as the initial launch suspended immediately starts the process up and running because it doesn't know it is supposed to remain stopped. * I implemented the equivalent of MachThreadList as NativeThreadListDarwin, in anticipation that we might want to factor out common parts into NativeThreadList{Protocol} and share some code here. After writing it, though, the fallout from merging Mach Task/Process into a single concept plus some other minor changes makes the whole NativeThreadListDarwin concept nothing more than dead weight. I am likely going to get rid of this class and just manage it directly in NativeProcessDarwin, much like I did for NativeProcessLinux. * There is a stub-out call for starting a STDIO thread. That will go away and adopt the MainLoop pselect-based IOObject reading.
I am developing the fully-integrated changes in the following repo, which contains the necessary Xcode bits and the glue that enables lldb-debugserver on a macOS system:
https://github.com/tfiala/lldb/tree/llgs-darwin
This change also breaks out a few of the lldb-server tests into their own directory, and adds some $qHostInfo tests (not sure why I didn't write those tests back when I initially implemented that on the Linux side).
llvm-svn: 280604
show more ...
|
#
b9739d40 |
| 31-Aug-2016 |
Pavel Labath <labath@google.com> |
Revert r280137 and 280139 and subsequent build fixes
The rewrite of StringExtractor::GetHexMaxU32 changes functionality in a way which makes lldb-server crash. The crash (assert) happens when parsin
Revert r280137 and 280139 and subsequent build fixes
The rewrite of StringExtractor::GetHexMaxU32 changes functionality in a way which makes lldb-server crash. The crash (assert) happens when parsing the "qRegisterInfo0" packet, because the function tries to drop_front more bytes than the packet contains. It's not clear to me whether we should consider this a bug in the caller or the callee, but it any case, it worked before, so I am reverting this until we can figure out what the proper interface should be.
llvm-svn: 280207
show more ...
|
#
1e3b0867 |
| 31-Aug-2016 |
Pavel Labath <labath@google.com> |
Revert r280200 and put it a proper fix
PeekChar returns a character, we want the whole string there.
llvm-svn: 280204
|
#
2c07a069 |
| 31-Aug-2016 |
Sylvestre Ledru <sylvestre@debian.org> |
Update the Linux code to reflect the changes done by zturner in r280139
llvm-svn: 280200
|
Revision tags: llvmorg-3.9.0, llvmorg-3.9.0-rc3, llvmorg-3.9.0-rc2 |
|
#
c923a3dc |
| 08-Aug-2016 |
Pavel Labath <labath@google.com> |
Remove SYS_tgkill from Android.h
instead, use __NR_tgkill directly, which seems to be the preferred form in the codebase anyway.
llvm-svn: 277999
|
Revision tags: llvmorg-3.9.0-rc1 |
|
#
d7d69f80 |
| 22-Jul-2016 |
Tamas Berghammer <tberghammer@google.com> |
Support loading files even when incorrect file name specified by the linker
"Incorrect" file name seen on Android whene the main executable is called "app_process32" (or 64) but the linker specifies
Support loading files even when incorrect file name specified by the linker
"Incorrect" file name seen on Android whene the main executable is called "app_process32" (or 64) but the linker specifies the package name (e.g. com.android.calculator2). Additionally it can be present in case of some linker bugs.
This CL adds logic to try to fetch the correct file name from the proc file system based on the base address sepcified by the linker in case we are failed to load the module by name.
Differential revision: http://reviews.llvm.org/D22219
llvm-svn: 276411
show more ...
|
#
5ad891f7 |
| 21-Jul-2016 |
Pavel Labath <labath@google.com> |
Unify process launching code on linux
Summary: We've had two copies of code for launching processes: - one in NativeProcessLinux, used for launching debugged processes - one in ProcessLauncherAndroi
Unify process launching code on linux
Summary: We've had two copies of code for launching processes: - one in NativeProcessLinux, used for launching debugged processes - one in ProcessLauncherAndroid, used on android for launching all other kinds of processes
These have over time acquired support for various launch options, but neither supported all of them. I now replace them with a single implementation ProcessLauncherLinux, which supports all the options the individual versions supported and set it to be used to launch all processes on linux.
This also works around the ETXTBSY issue on android when the process is started from the platform instance, as that used to go through the version which did not contain the workaround.
Reviewers: tberghammer
Subscribers: tberghammer, danalbert, srhines, lldb-commits
Differential Revision: https://reviews.llvm.org/D22457
llvm-svn: 276288
show more ...
|
#
4abe5d69 |
| 15-Jul-2016 |
Pavel Labath <labath@google.com> |
[NPL] Simplify process launch code
Summary: This removes one level of indirection, which was just packing and repacking launch args into different structures. NFC.
Reviewers: tberghammer
Subscribe
[NPL] Simplify process launch code
Summary: This removes one level of indirection, which was just packing and repacking launch args into different structures. NFC.
Reviewers: tberghammer
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D22357
llvm-svn: 275544
show more ...
|
#
3be0a3a1 |
| 12-Jul-2016 |
Pavel Labath <labath@google.com> |
[NPL] Increase ETXTBSY workaround sleep
10ms does not seem to be enough all the time, go to 50.
llvm-svn: 275175
|
#
c73301bb |
| 11-Jul-2016 |
Tamas Berghammer <tberghammer@google.com> |
Change the /proc/<pid>/maps to not assert on incorrect input
If LLDB reads some incorrect input form /proc/<pid>/maps then it should report an error instead of assert-ing as we don't want to crash i
Change the /proc/<pid>/maps to not assert on incorrect input
If LLDB reads some incorrect input form /proc/<pid>/maps then it should report an error instead of assert-ing as we don't want to crash in case of an incorrect maps file.
Differential revision: http://reviews.llvm.org/D22211
llvm-svn: 275060
show more ...
|
#
ca92aed5 |
| 07-Jul-2016 |
Pavel Labath <labath@google.com> |
[LLGS] Work around an adb bug on Android <=M
On android M it can happen that we get a ETXTBSY, when we try to launch the inferior. Sleeping and retrying should help us get more stable results.
llvm
[LLGS] Work around an adb bug on Android <=M
On android M it can happen that we get a ETXTBSY, when we try to launch the inferior. Sleeping and retrying should help us get more stable results.
llvm-svn: 274763
show more ...
|
#
ad007563 |
| 07-Jul-2016 |
Howard Hellyer <hhellyer@uk.ibm.com> |
Implement GetMemoryRegions() for Linux and Mac OSX core files.
Summary: This patch fills in the implementation of GetMemoryRegions() on the Linux and Mac OS core file implementations of lldb_private
Implement GetMemoryRegions() for Linux and Mac OSX core files.
Summary: This patch fills in the implementation of GetMemoryRegions() on the Linux and Mac OS core file implementations of lldb_private::Process (ProcessElfCore::GetMemoryRegions and ProcessMachCore::GetMemoryRegions.) The GetMemoryRegions API was added under: http://reviews.llvm.org/D20565
The patch re-uses the m_core_range_infos list that was recently added to implement GetMemoryRegionInfo in both ProcessElfCore and ProcessMachCore to ensure the returned regions match the regions returned by Process::GetMemoryRegionInfo(addr_t load_addr, MemoryRegionInfo ®ion_info).
Reviewers: clayborg
Subscribers: labath, lldb-commits
Differential Revision: http://reviews.llvm.org/D21751
llvm-svn: 274741
show more ...
|
#
0c4f01d4 |
| 06-Jul-2016 |
Pavel Labath <labath@google.com> |
[LLGS] Log more precise errors during inferior launch
Summary: We are seeing infrequent failures to launch the inferior process on android. The failing call seems to be execve(). This adds more logg
[LLGS] Log more precise errors during inferior launch
Summary: We are seeing infrequent failures to launch the inferior process on android. The failing call seems to be execve(). This adds more logging to see the actual error reported by the call.
Reviewers: tberghammer
Subscribers: tberghammer, lldb-commits, danalbert
Differential Revision: http://reviews.llvm.org/D22039
llvm-svn: 274624
show more ...
|
#
2a86b555 |
| 14-Jun-2016 |
Pavel Labath <labath@google.com> |
Remove Platform usages from NativeProcessLinux
Summary: This removes the last usage of the Platform plugin in NPL. It was being used for determining the architecture of the debugged process. I repla
Remove Platform usages from NativeProcessLinux
Summary: This removes the last usage of the Platform plugin in NPL. It was being used for determining the architecture of the debugged process. I replace the call that went through the Platform plugin with a lower level call on the ObjectFile directly.
Reviewers: tberghammer
Subscribers: uweigand, nitesh.jain, omjavaid, lldb-commits
Differential Revision: http://reviews.llvm.org/D21324
llvm-svn: 272686
show more ...
|