aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm/tools/lldb/source/Plugins/Process
Commit message (Collapse)AuthorAgeFilesLines
* Move all sources from the llvm project into contrib/llvm-project.Dimitry Andric2019-12-20243-69253/+0
| | | | | | | | | | | | | This uses the new layout of the upstream repository, which was recently migrated to GitHub, and converted into a "monorepo". That is, most of the earlier separate sub-projects with their own branches and tags were consolidated into one top-level directory, and are now branched and tagged together. Updating the vendor area to match this layout is next. Notes: svn path=/head/; revision=355940
* Pull in r374444 from upstream lldb trunk (by me):Dimitry Andric2019-10-102-26/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix process launch failure on FreeBSD after r365761 Summary: After rLLDB365761, and with `LLVM_ENABLE_ABI_BREAKING_CHECKS` enabled, launching any process on FreeBSD crashes lldb with: ``` Expected<T> must be checked before access or destruction. Expected<T> value was in success state. (Note: Expected<T> values in success mode must still be checked prior to being destroyed). ``` This is because `m_operation_thread` and `m_monitor_thread` were wrapped in `llvm::Expected<>`, but this requires the objects to be correctly initialized before accessing them. To fix the crashes, use `llvm::Optional<>` for the members (as indicated by labath), and use local variables to store the return values of `LaunchThread` and `StartMonitoringChildProcess`. Then, only assign to the member variables after checking if the return values indicated success. Reviewers: devnexen, emaste, MaskRay, mgorny Reviewed By: devnexen Subscribers: jfb, labath, krytarowski, lldb-commits Differential Revision: https://reviews.llvm.org/D68723 PR: 241137 MFC after: 1 month X-MFC-With: r353358 Notes: svn path=/head/; revision=353416
* Revert r353363 in preparation for applying upstream fix:Dimitry Andric2019-10-102-30/+25
| | | | | | | | | | | | | Put in a band-aid fix for lldb 9 exiting with "Expected<T> must be checked before access or destruction" when launching executables, while we sort this out with upstream. PR: 241137 MFC after: 1 month X-MFC-With: r353358 Notes: svn path=/head/; revision=353415
* Put in a band-aid fix for lldb 9 exiting with "Expected<T> must beDimitry Andric2019-10-092-25/+30
| | | | | | | | | | | | | checked before access or destruction" when launching executables, while we sort this out with upstream. Reported by: jbeich PR: 241137 MFC after: 1 month X-MFC-With: r353358 Notes: svn path=/head/; revision=353363
* Merge ^/head r351317 through r351731.Dimitry Andric2019-09-031-2/+2
|\ | | | | | | Notes: svn path=/projects/clang900-import/; revision=351732
| * lldb: shorten thread names to make logs easier to followEd Maste2019-09-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | lldb prepends the thread name to log entries, and the existing thread name for the FreeBSD ProcessMonitor thread was longer than the kernel's supported thread name length, and so was truncated. This made logs hard to read, as the truncated thread name ran into the log message. Shorten "lldb.process.freebsd.operation" to just "freebsd.op" so that logs are more readable. (Upstreaming to lldb still to be done). Notes: svn path=/head/; revision=351662
* | Merge lldb trunk r366426, resolve conflicts, and update FREEBSD-Xlist.Dimitry Andric2019-08-22243-3545/+3280
|/ | | | Notes: svn path=/projects/clang900-import/; revision=351400
* Merge lldb trunk r351319, resolve conflicts, and update FREEBSD-Xlist.Dimitry Andric2019-01-20140-1140/+3572
| | | | Notes: svn path=/projects/clang800-import/; revision=343218
* Merge lldb trunk r338150, and resolve conflicts.Dimitry Andric2018-07-3175-1855/+2668
| | | | Notes: svn path=/projects/clang700-import/; revision=336985
* lldb: remove assertion that target_arch is FreeBSDEd Maste2018-04-241-1/+0
| | | | | | | | | | | The target is not necessarily a FreeBSD binary - for example, it may be a Linux binary running under the linuxulator. Basic ptrace (live) debugging already worked in this case, except for the assertion. Sponsored by: Turing Robotic Industries Inc. Notes: svn path=/head/; revision=332965
* lldb: propagate error to user if memory read failsEd Maste2018-04-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | | Previously, an attempt to read an unreadable access reported zeros: (lldb) memory read -format hex -size 8 0 0x00000000: 0x0000000000000000 0x0000000000000000 0x00000010: 0x0000000000000000 0x0000000000000000 ... Now, if DoReadMemory encounters error then return 0 (bytes read) so we report the error to the user: (lldb) memory read -format hex -size 8 0 error: Bad address LLVM PR: 37190 MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=332849
* Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ toDimitry Andric2018-02-161-1/+1
| | | | | | | | | | | 6.0.0 (branches/release_60 r325330). MFC after: 3 months X-MFC-With: r327952 PR: 224669 Notes: svn path=/head/; revision=329410
* For our lldb customizations, instead of commenting out lines, use #ifdefDimitry Andric2017-12-241-3/+5
| | | | | | | | LLDB_ENABLE_ALL / #endif preprocess directives instead, so our diffs against upstream only consist of added lines. Notes: svn path=/projects/clang600-import/; revision=327151
* Merge lldb trunk r321414 to contrib/llvm/tools/lldb.Dimitry Andric2017-12-241-0/+1
| | | | Notes: svn path=/projects/clang600-import/; revision=327137
* Merge lldb trunk r321017 to contrib/llvm/tools/lldb.Dimitry Andric2017-12-2078-1002/+2210
| | | | Notes: svn path=/projects/clang600-import/; revision=327030
* Upgrade our copies of clang, llvm, lldb and compiler-rt to r311606 fromDimitry Andric2017-08-242-4/+2
| | | | | | | | | | | | | | the upstream release_50 branch. As of this version, lib/msun's trig test should also work correctly again (see bug 220989 for more information). PR: 220989 MFC after: 2 months X-MFC-with: r321369 Notes: svn path=/head/; revision=322855
* lldb: Report inferior signals as signals, not exceptions, on FreeBSDEd Maste2017-08-104-50/+12
| | | | | | | | | | | | | | | | | | | | | | | | | This is the FreeBSD equivalent of LLVM r238549. This serves 2 purposes: * LLDB should handle inferior process signals SIGSEGV/SIGILL/SIGBUS/ SIGFPE the way it is suppose to be handled. Prior to this fix these signals will neither create a coredump, nor exit from the debugger or work for signal handling scenario. * eInvalidCrashReason need not report "unknown crash reason" if we have a valid si_signo llvm.org/pr23699 Patch by Karnajit Wangkhem Differential Revision: https://reviews.llvm.org/D35223 Submitted by: Karnajit Wangkhem Obtained from: LLVM r310591 Notes: svn path=/head/; revision=322360
* lldb: Make i386-*-freebsd expression work on JIT pathEd Maste2017-08-091-7/+5
| | | | | | | | | | | | | | | | * Enable i386 ABI creation for freebsd * Added an extra argument in ABISysV_i386::PrepareTrivialCall for mmap syscall * Unlike linux, the last argument of mmap is actually 64-bit(off_t). This requires us to push an additional word for the higher order bits. * Prior to this change, ktrace dump will show mmap failures due to invalid argument coming from the 6th mmap argument. Submitted by: Karnajit Wangkhem Differential Revision: https://reviews.llvm.org/D34776 Notes: svn path=/head/; revision=322326
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r308421, and updateDimitry Andric2017-07-198-368/+244
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=321238
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r307894, and updateDimitry Andric2017-07-1311-271/+206
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=320970
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r306956, and updateDimitry Andric2017-07-029-26/+27
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=320572
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r306325, and updateDimitry Andric2017-06-274-114/+28
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=320397
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r305145, and updateDimitry Andric2017-06-104-30/+29
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=319799
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304149, and updateDimitry Andric2017-05-299-13/+540
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=319164
* Merge ^/head r318658 through r318963.Dimitry Andric2017-05-261-0/+2
|\ | | | | | | Notes: svn path=/projects/clang500-import/; revision=318964
| * lldb: map TRAP_CAP to a trace trapEd Maste2017-05-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the absense of a more specific handler for TRAP_CAP (generated by ENOTCAPABLE or ECAPMODE while in capability mode) treat it as a trace trap. Example usage (testing the bug in PR219173): % proccontrol -m trapcap lldb usr.bin/hexdump/obj/hexdump -- -Cv -s 1 /bin/ls ... (lldb) run Process 12980 launching Process 12980 launched: '.../usr.bin/hexdump/obj/hexdump' (x86_64) Process 12980 stopped * thread #1, stop reason = trace frame #0: 0x0000004b80c65f1a libc.so.7`__sys_lseek + 10 ... In the future we should have LLDB control the trapcap procctl itself (as it does with ASLR), as well as report a specific stop reason. This change eliminates an assertion failure from LLDB for now. Notes: svn path=/head/; revision=318884
* | Merge llvm, clang, lld, lldb, compiler-rt and libc++ r303197, and updateDimitry Andric2017-05-1661-941/+948
| | | | | | | | | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=318384
* | Merge llvm, clang, lld and lldb trunk r300890, and update build glue.Dimitry Andric2017-04-2011-45/+697
| | | | | | | | Notes: svn path=/projects/clang500-import/; revision=317230
* | Merge lldb trunk r300422 and resolve conflicts.Dimitry Andric2017-04-16115-1469/+4021
|/ | | | Notes: svn path=/projects/clang500-import/; revision=317032
* Merge llvm, clang, lld and lldb trunk r291274, and resolve conflicts.Dimitry Andric2017-01-064-14/+9
| | | | Notes: svn path=/projects/clang400-import/; revision=311544
* Merge llvm, clang, lld and lldb trunk r291012, and resolve conflicts.Dimitry Andric2017-01-041-95/+52
| | | | Notes: svn path=/projects/clang400-import/; revision=311327
* Fix printf format warning on i386.Dimitry Andric2017-01-031-1/+1
| | | | Notes: svn path=/projects/clang400-import/; revision=311164
* Update lldb to trunk r290819 and resolve conflicts.Dimitry Andric2017-01-02209-41813/+47935
| | | | Notes: svn path=/projects/clang400-import/; revision=311145
* Update llvm, clang, lld and lldb to release_39 branch r287912.Dimitry Andric2016-11-265-252/+577
| | | | Notes: svn path=/projects/clang391-import/; revision=309175
* Slightly reduce diffs against upstream lldb, and comment out PDB support.Dimitry Andric2016-08-254-3/+4
| | | | Notes: svn path=/projects/clang390-import/; revision=304818
* Update build glue for lldb. Also comment out parts of theDimitry Andric2016-08-201-10/+10
| | | | | | | | initialization and termination code which reference plugins and components that we don't use. Notes: svn path=/projects/clang390-import/; revision=304536
* Update lldb to release_39 branch r278877.Dimitry Andric2016-08-1719-225/+345
| | | | Notes: svn path=/projects/clang390-import/; revision=304312
* Update lldb to release_39 branch r276489 and resolve immediate conflicts.Ed Maste2016-08-1742-597/+2154
| | | | Notes: svn path=/projects/clang390-import/; revision=304274
* Update llvm, clang and lldb to trunk r257626, and update build glue.Dimitry Andric2016-01-149-160/+277
| | | | Notes: svn path=/projects/clang380-import/; revision=294024
* Remove a few files missed in the last lldb import.Dimitry Andric2016-01-092-870/+0
| | | | Notes: svn path=/projects/clang380-import/; revision=293577
* Update lldb to trunk r256945.Dimitry Andric2016-01-063-148/+148
| | | | Notes: svn path=/projects/clang380-import/; revision=293283
* Merge LLDB 3.8Ed Maste2016-01-04122-5421/+6690
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As with previous imports a number of plugins not immediately relevant to FreeBSD have been excluded: ABIMacOSX_i386 ABIMacOSX_arm ABIMacOSX_arm64 ABISysV_hexagon AppleObjCRuntimeV2 AppleObjCRuntimeV1 SystemRuntimeMacOSX RenderScriptRuntime GoLanguageRuntime GoLanguage ObjCLanguage ObjCPlusPlusLanguage ObjectFilePECOFF DynamicLoaderWindowsDYLD platform_linux platform_netbsd PlatformWindows PlatformKalimba platform_android DynamicLoaderMacOSXDYLD ObjectContainerUniversalMachO PlatformRemoteiOS PlatformMacOSX OperatingSystemGo Notes: svn path=/projects/clang380-import/; revision=293127
* Don't adjust the program counter to an invalid address after reaching aAndrew Turner2015-12-221-5/+1
| | | | | | | | | | | | | breakpoint. The value doesn't need to be adjusted as it is already correctly returned from the kernel. This allows lldb to set breakpoints, and stop on them, however more work is needed, for example single stepping fails to stop. Discussed with: emaste Notes: svn path=/head/; revision=292611
* lldb: Add arm64 FreeBSD ProcessMonitor register contextEd Maste2015-10-231-0/+4
| | | | | | | | | This is an adaptation of upstream LLDB commit r251088. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=289840
* Update llvm, clang and lldb to 3.7.0 release.Dimitry Andric2015-09-0614-239/+848
| | | | Notes: svn path=/projects/clang370-import/; revision=287521
* Update lldb to upstream trunk r242221.Dimitry Andric2015-09-0630-2540/+520
| | | | Notes: svn path=/projects/clang-trunk/; revision=287505
* Update LLDB snapshot to upstream r241361Ed Maste2015-07-04108-7204/+16398
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notable upstream commits (upstream revision in parens): - Add a JSON producer to LLDB (228636) - Don't crash on bad DWARF expression (228729) - Add support of DWARFv3 DW_OP_form_tls_address (231342) - Assembly profiler for MIPS64 (232619) - Handle FreeBSD/arm64 core files (233273) - Read/Write register for MIPS64 (233685) - Rework LLDB system initialization (233758) - SysV ABI for aarch64 (236098) - MIPS software single stepping (236696) - FreeBSD/arm live debugging support (237303) - Assembly profiler for mips32 (237420) - Parse function name from DWARF DW_AT_abstract_origin (238307) - Improve LLDB prompt handling (238313) - Add real time signals support to FreeBSDSignals (238316) - Fix race in IOHandlerProcessSTDIO (238423) - MIPS64 Branch instruction emulation for SW single stepping (238820) - Improve OSType initialization in elf object file's arch_spec (239148) - Emulation of MIPS64 floating-point branch instructions (239996) - ABI Plugin for MIPS32 (239997) - ABI Plugin for MIPS64 (240123) - MIPS32 branch emulation and single stepping (240373) - Improve instruction emulation based stack unwinding on ARM (240533) - Add branch emulation to aarch64 instruction emulator (240769) Notes: svn path=/projects/clang-trunk/; revision=285116
* lldb: Move debug register output into __amd64__Ed Maste2015-03-271-2/+0
| | | | | | | | | | This debug register diagnostic is really only applicable to amd64 at present. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=280770
* Use FreeBSD ProcessMonitor.h on FreeBSDEd Maste2015-02-084-0/+16
| | | | | | | | | | There's an unfortunate layering issue between LLDB's Process/POSIX and Process/{FreeBSD,Linux}, exposed by a refactoring in upstream revision 218568. Work around it by adding explicit #if defined(__FreeBSD__) guards to include the correct header. Notes: svn path=/projects/clang360-import/; revision=278386
* Update LLDB snapshot to upstream r225923 (git 2b588ecd)Ed Maste2015-02-0652-1376/+3480
| | | | | | | Sponsored by: DARPA, AFRL Notes: svn path=/projects/clang360-import/; revision=278334