Commit Graph

93 Commits

Author SHA1 Message Date
Dimitry Andric
8d93ab88a9 Reduce diffs between upstream lldb and ours. 2016-01-09 17:33:13 +00:00
Dimitry Andric
58df0addff Remove a few files missed in the last lldb import. 2016-01-09 17:31:16 +00:00
Dimitry Andric
a1bd240c5d Update lldb to trunk r256945. 2016-01-06 22:02:08 +00:00
Ed Maste
9f2f44ceeb Merge LLDB 3.8
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
2016-01-04 01:16:32 +00:00
Andrew Turner
b1eb23b26b Don't adjust the program counter to an invalid address after reaching a
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
2015-12-22 17:18:40 +00:00
Ed Maste
1638c73018 lldb: Add arm64 FreeBSD ProcessMonitor register context
This is an adaptation of upstream LLDB commit r251088.

Sponsored by:	The FreeBSD Foundation
2015-10-23 17:30:41 +00:00
Dimitry Andric
b6c25e0ef3 Update llvm, clang and lldb to 3.7.0 release. 2015-09-06 19:58:48 +00:00
Dimitry Andric
b91a7dfcc6 Update lldb to upstream trunk r242221. 2015-09-06 15:21:47 +00:00
Dimitry Andric
3dac3a9bad Update llvm/clang to r241361. 2015-07-05 22:34:42 +00:00
Ed Maste
1c3bbb013d Update LLDB snapshot to upstream r241361
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)
2015-07-04 01:02:43 +00:00
Ed Maste
e3327e3942 Import lldb r233478: Fix build failure on Freebsd with gcc 4.9.
llvm.org/pr23051

Submitted by:	rodrigc
2015-03-28 18:29:13 +00:00
Ed Maste
acf33b5c74 lldb: Move debug register output into __amd64__
This debug register diagnostic is really only applicable to amd64 at
present.

Sponsored by:	The FreeBSD Foundation
2015-03-27 19:42:38 +00:00
Dimitry Andric
714e3c812d Merge ^/head r278756 through r278915. 2015-02-17 19:53:41 +00:00
Ed Maste
b153f37ffc lldb: workaround to permit cross-arch core file debugging
FreeBSD core files have no section table and thus LLDB's OS and vendor
detection logic does not work. If we encounter such an ELF file, update
an unknown OS to match the host.

This is not really the correct way to handle this, but more extensive
rework of ObjectFileELF will be needed and this change restores cross-
arch core debugging until that can be completed.
2015-02-17 18:33:17 +00:00
Ed Maste
17832a58a4 Use FreeBSD ProcessMonitor.h on FreeBSD
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.
2015-02-08 16:18:46 +00:00
Ed Maste
60903fda75 Revert LLDB compatibility changes for Clang 3.5 API
This reverts FreeBSD SVN r275134 and r275127, restoring the following
upstream revisions:

     SVN       git
    214335  59a1f270
    214340  42f16b1e
    214501  26d6f063
    215969  a083c0db
    216603  ee9cd340
    216810  f534f503

Sponsored by:	DARPA, AFRL
2015-02-08 14:28:43 +00:00
Ed Maste
7aa51b7949 Update LLDB snapshot to upstream r225923 (git 2b588ecd)
Sponsored by:	DARPA, AFRL
2015-02-06 22:25:21 +00:00
Ed Maste
10b16cca63 Remove additional platform-specific LLDB code 2014-11-26 18:03:25 +00:00
Ed Maste
dcb99b2156 Revert LLDB changes for Clang/LLVM 3.5 API compatibility
This reverts the following upstream revisions:

      SVN      git
    214335  59a1f270
    214340  42f16b1e
2014-11-26 18:02:22 +00:00
Ed Maste
2691e63cfa Remove LLDB platform support not currently of interest to us 2014-11-26 17:32:20 +00:00
Ed Maste
5dd0c6d9b9 Update paths for FreeBSD build infrastructure
This same change was applied upstream in a later verison.
2014-11-26 17:29:01 +00:00
Ed Maste
7f04dba99f There is no Python in the FreeBSD base system 2014-11-26 17:24:12 +00:00
Ed Maste
a01d545e93 Avoid need for AppleObjCRuntime on FreeBSD
Since it is unlikely to provide much value to us, just #if 0 it away

Sponsored by:	DARPA, AFRL
2014-11-26 17:22:37 +00:00
Ed Maste
85dd3ec148 Revert LLDB changes for Clang/LLVM 3.5 API compatibility
This reverts the following upstream revisions:

     SVN       git
    214501  26d6f063
    215969  a083c0db
    216603  ee9cd340
    216810  f534f503

Sponsored by:	DARPA, AFRL
2014-11-26 17:09:58 +00:00
Ed Maste
0127ef0f2c Update LLDB snapshot to upstream r216948 (git 50f7fe44)
This is approximately "LLDB 3.5" although with a little bit of skew,
and will go along with the Clang 3.5 import.

Sponsored by:	DARPA, AFRL
2014-11-26 16:48:12 +00:00
Ed Maste
fc8fb3476a Revert Clang 3.4 API compatibility changes
Re-apply previously reverted changes to restore LLDB to parity with
the last update as of upstream revision 202189. This is the first step
an LLDB update to correspond with the Clang 3.5 import and re-applies
the following upstream revisions:

      SVN      git
    199408  3ad0a1a1
    199689  05be72c3
    200085  9ad47a93

Sponsored by:	DARPA, AFRL
2014-11-26 16:23:32 +00:00
Ed Maste
52c52d38d5 lldb: Invoke PT_KILL from ProcessPosix::DoDestroy
We previously sent SIGKILL to the debuggee in DoDestroy, but did not
actually detach or kill via ptrace.  It seems that this somehow didn't
matter on Linux, but did on FreeBSD.

This would happen when quitting LLDB while stopped at a breakpoint, for
example.  The debuggee remained stopped in ptrace (with the signal
either pending or lost).  After a timeout of a second or two LLDB exits,
which caused the debuggee to resume and dump core from an unhandled
SIGTRAP.

BringProcessIntoLimbo is a poorly named wrapper for ptrace(PT_KILL)
which is the desired behaviour from DoDestroy.

http://llvm.org/pr18894

Sponsored by:	DARPA, AFRL
2014-03-24 01:21:37 +00:00
Ed Maste
6fcb82420b Update LLDB snapshot to upstream r202189
Highlights include:

- Support hardware watchpoints on FreeBSD
  (r201706)

- Improved unwinding through hand-written assembly functions
  (r201839)

- Handle DW_TAG_unspecified_parameters for variadic functions
  (r202061)

- Fix Ctrl+C interrupting a running inferior process
  (r202086, r202154)

- Various bug fixes, including to the remote GDB protocol client

Sponsored by:	DARPA, AFRL
2014-02-25 22:13:51 +00:00
Ed Maste
bc7f8367e6 Clang/LLVM 3.4 compatibility for the LLDB snapshot
Revert commits that tracked Clang/LLVM API changes after the 3.4 branch
point:

  Git    SVN
3ad0a1a 199408
05be72c 199689
9ad47a9 200085
2014-02-18 20:31:51 +00:00
Ed Maste
12b93ac689 Update LLDB snapshot to upstream r201577
Highlights include:

- Improvements to the remote GDB protocol client
  (r196610, r197579, r197857, r200072)

- Bug fixes for big-endian targets
  (r196808)

- Initial support for libdispatch (GCD) queues in the debuggee
  (r197190)

- Add "step-avoid-libraries" setting
  (r199943)

- IO subsystem improvements (including initial work on a curses gui)
  (r200263)

- Various bug fixes for memory leaks, LLDB segfaults, the C++ demangler,
  ELF core files, DWARF debug info, and others.

Sponsored by:	DARPA, AFRL
2014-02-18 19:52:51 +00:00
Ed Maste
adacc0725e Update lldb for clang/llvm 3.4 import
This commit largely restores the lldb source to the upstream r196259
snapshot with the addition of threaded inferior support and a few bug
fixes.

Specific upstream lldb revisions restored include:
   SVN      git
  181387  779e6ac
  181703  7bef4e2
  182099  b31044e
  182650  f2dcf35
  182683  0d91b80
  183862  15c1774
  183929  99447a6
  184177  0b2934b
  184948  4dc3761
  184954  007e7bc
  186990  eebd175

Sponsored by:	DARPA, AFRL
2014-02-17 18:50:03 +00:00
Ed Maste
a4849615b2 Update LLDB to upstream r196322 snapshot
Upstream revisions of note:
r196298 - Fix use of std::lower_bound
r196322 - Fix log message for new invalidation checks

Sponsored by:	DARPA, AFRL
2013-12-03 22:26:38 +00:00
Ed Maste
04c171520d lldb: Threaded inferior support for FreeBSD
This is in the process of being submitted to the upstream LLDB
repository.  The thread list functionality is modelled in part on
GDBRemoteCommunicationClient.

LLDB bug pr16696 and code review D2267

Sponsored by:	DARPA, AFRL
2013-12-03 21:29:45 +00:00
Ed Maste
b952cd584f Update LLDB to upstream r196259 snapshot
Sponsored by:	DARPA, AFRL
2013-12-03 19:23:54 +00:00
Ed Maste
9151c81ccb Workaround lldb issue with main module base address
On FreeBSD lldb sometimes reloads the the main module's (executable's)
symbols at the wrong address.  Work around this for now by explicitly
reloading at base_address=0 when it happens.

A proper fix is needed but early testers have reported this issue so
this workaround should allow them to make further progress.

http://llvm.org/bugs/show_bug.cgi?id=17880
2013-12-03 18:12:51 +00:00
Ed Maste
afda932a71 Merge upstream LLDB r194487:
Log failure to restore thread state in ThreadPlanCallFunction::DoTakedown

  In order to help track down llvm.org/pr17226.

Sponsored by:	DARPA, AFRL
2013-11-13 17:06:26 +00:00
Ed Maste
4d1da75392 lldb: Correct a standalone debug file path
For a file /bin/ls with a .gnu_debuglink entry of "ls.debug" the path
should be /usr/lib/debug/bin/ls.debug, not /usr/lib/debug/bin/ls.

ref: https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html

Upstream defect pr17903 (http://llvm.org/pr17903)

Sponsored by:	DARPA, AFRL
2013-11-13 14:46:41 +00:00
Ed Maste
3561791104 Update LLDB to upstream r194122 snapshot
ludes minor changes relative to upstream, for compatibility with
FreeBSD's in-tree LLVM 3.3:

- Reverted LLDB r191806, restoring use of previous API.
- Reverted part of LLDB r189317, restoring previous enum names.
- Work around missing LLVM r192504, using previous registerEHFrames API
  (limited functionality).
- Removed PlatformWindows header include and init/terminate calls.

Sponsored by:	DARPA, AFRL
2013-11-12 17:25:33 +00:00
Ed Maste
34ff737fae Disable LLDB OSX ABI plugin
Approved by:	re (blanket)
2013-09-20 01:18:50 +00:00
Ed Maste
d09607dfdb Disable lldb target support not (currently) of interest
- Remote iOS debugging
- OS X symbol provider, core files
- PECOFF object files
- Linux platform support

Sponsored by:	DARPA, AFRL
2013-08-25 12:07:34 +00:00
Ed Maste
3979636f6f Revert lldb change for Attribute::NoBuiltin
NoBuiltin was introduced after clang/llvm 3.3 and thus does not exist in
FreeBSD.  Thus special handling for the attribute is not needed in lldb.

This reverts lldb r186990 (git eebd175)

Sponsored by:	DARPA, AFRL
2013-08-24 16:09:52 +00:00
Ed Maste
7e7299d197 Revert lldb changes due to post-3.3 clang and llvm API changes
Revisions:
svn	git
183929	99447a6
183862	15c1774
  source/Host/common/FileSpec.cpp

184954	007e7bc
184948	4dc3761
  source/Expression/ClangExpressionParser.cpp

182099	b31044e
181387	779e6ac
  include/lldb/Expression/IRExecutionUnit.h
  source/Expression/IRExecutionUnit.cpp

184177	0b2934b
182650	f2dcf35
181703	7bef4e2
  source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp

182683	0d91b80
  source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp

Sponsored by:	DARPA, AFRL
2013-08-24 10:06:51 +00:00
Ed Maste
ac7ddfbf72 Merge lldb r188801 to contrib/llvm/tools/lldb/ 2013-08-23 18:06:42 +00:00