Commit Graph

7689 Commits

Author SHA1 Message Date
Greg Clayton c74c497649 Set the byte order for data in the GDB remote register context.
llvm-svn: 189827
2013-09-03 16:36:52 +00:00
Eric Christopher 2828122583 Revert part of my previous patch, we should be using libedit under
linux for command line editing.

llvm-svn: 189820
2013-09-03 15:38:37 +00:00
Hafiz Abid Qadeer 4fe4a999a4 Fix a few typos in the comments.
llvm-svn: 189803
2013-09-03 13:28:01 +00:00
Jason Molenda 744608596a Make the default shell /bin/sh on all platforms. I think any system with /bin/bash
will at least have it linked to /bin/sh for shell script compatibility.

llvm-svn: 189703
2013-08-30 23:02:56 +00:00
Ed Maste 62dd8a4d30 Clean up warnings in ProcessFreeBSD::UpdateThreadList
llvm-svn: 189695
2013-08-30 20:41:42 +00:00
Ed Maste 8b4c82f0fe Don't hide errors in PlatformFreeBSD::ResolveExecutable
If error is already set then there's no reason to replace it with a
generic "<file> does not exist" message.

llvm-svn: 189686
2013-08-30 18:00:50 +00:00
Ed Maste 9b05d80632 Use /bin/sh on FreeBSD
llvm-svn: 189684
2013-08-30 17:53:18 +00:00
Eric Christopher 2490f5c9f6 Fix a bunch of compile time warnings and a build failure on ubuntu.
llvm-svn: 189683
2013-08-30 17:50:57 +00:00
Ed Maste 8607c24638 Attach by name tests now pass on FreeBSD
A FreeBSD implementation of Host::FindProcesses was added in r189295.
Contrary to my earlier report of failing tests it seems all attach by
name tests now pass.

http://www.llvm.org/pr16699

llvm-svn: 189680
2013-08-30 15:35:32 +00:00
Ed Maste 6f9c7743cd Skip two tests that hang the FreeBSD buildbot
llvm.org/pr16684

llvm-svn: 189679
2013-08-30 15:34:41 +00:00
Ashok Thirumurthi 89457cfc67 Skipping two tests that hang consistently on Linux while investigating the issue in more depth.
llvm-svn: 189678
2013-08-30 15:27:30 +00:00
Ashok Thirumurthi e22defe905 Moving "using namespace" statements out of header files.
llvm-svn: 189675
2013-08-30 14:58:00 +00:00
Ed Maste fcdab16d24 Expression evaluation works on FreeBSD after switch to MCJIT
http://www.llvm.org/pr16697

llvm-svn: 189668
2013-08-30 14:05:22 +00:00
Ed Maste 119ce53202 Remove annotation for a test that now passes on FreeBSD
A FreeBSD implementation of Host::FindProcesses was added in r189295.
Note that some tests still fail as the implementation returns a truncated
name for processes with long names.

http://www.llvm.org/pr16699

llvm-svn: 189667
2013-08-30 13:25:37 +00:00
Ed Maste 7dcb77de06 Move detach to FreeBSD- and Linux-specific classes.
On Linux there is no separate notion of a process (vs. a thread) for
ptrace(); each thread needs to be individually detached.  On FreeBSD
we have a separate process context, and we detach just it.

Review: http://llvm-reviews.chandlerc.com/D1418
llvm-svn: 189666
2013-08-30 13:11:30 +00:00
Ed Maste c4dff6feea Enable MCJIT on FreeBSD
Testing shows it works for at least trivial cases, while the
USE_STANDARD_JIT case does not even work for those.  Thus, don't define
USE_STANDARD_JIT on FreeBSD.

I've left the #if block choosing the appropriate #include in case it's
useful for testing.

llvm-svn: 189611
2013-08-29 21:02:33 +00:00
Ed Maste 825d2084da Fix FreeBSD build after r189295
llvm-svn: 189608
2013-08-29 20:41:39 +00:00
Ed Maste 685fea93ca Perform thread lookup after RefreshStateAfterStop()
This fixes a crash on FreeBSD

llvm-svn: 189607
2013-08-29 20:40:11 +00:00
Ed Maste 47e575e267 Disable stub Host::FindProcesses on FreeBSD
A FreeBSD implementation was added in r189295.

llvm-svn: 189598
2013-08-29 18:44:27 +00:00
Daniel Malea 70e7e19e57 fix FreeBSD build error
- s/LogSP/Log */ in ProcessMonitorFreeBSD.cpp

llvm-svn: 189589
2013-08-29 15:54:34 +00:00
Hafiz Abid Qadeer 9a78cdf825 Discover support of 'p' packet.
Some stubs only support g/G packets for registers.
This change makes sure that we check if remote stub supports 'p' packet before using it.

llvm-svn: 189576
2013-08-29 09:09:45 +00:00
Daniel Malea b89d049d13 Add missing "sys/stat.h" include
- should help with FreeBSD buildbot

llvm-svn: 189487
2013-08-28 16:06:16 +00:00
Hafiz Abid Qadeer e5fd5e1092 Clear 'packet_str' before putting new packet.
llvm-svn: 189484
2013-08-28 15:10:37 +00:00
Virgile Bello bdae3787ef Cleanup/rearrange includes:
- factorize unistd.h and stdbool.h in lldb-types.h.
- Add <functional> and <string> where required.

llvm-svn: 189477
2013-08-28 12:14:27 +00:00
Hafiz Abid Qadeer da96ef20b4 Handle run-length-encoding.
The change was taken from a patch by Virgile Bello.

llvm-svn: 189470
2013-08-28 10:31:52 +00:00
Daniel Malea bb247fb58a Fix 'platform shell' command for Linux host and remote lldb-platform connections
- add default timeout of 10s (unil qPlatform_RunCommand supports timeout packets and CommandObjectPlatform is updated to read a timeout flag/setting)
- add a few tests for platform shell

llvm-svn: 189405
2013-08-27 21:01:01 +00:00
Daniel Malea 4244cbd9be Enable Host::LaunchProcess on Linux
- move LaunchProcessPosixSpawn() and Host::LaunchProcess() from freebsd host plugin to common (linux/freebsd section)
- modify MonitorChildProcessThreadFunction to use pid_t from sys/types.h to avoid Linux/FreeBSD/Mac warnings when calling waitpid()

llvm-svn: 189404
2013-08-27 20:58:59 +00:00
Greg Clayton df96dd754e Moved the static s_regex into a function body to allow it to be lazily initialized when/if it is ever used. We try to avoid global constructors when building shared libraries on Darwin.
llvm-svn: 189397
2013-08-27 19:53:47 +00:00
Michael Sartain 338803fa23 warning cleanup (use LLDB_INVALID_HOST_THREAD instead of NULL)
llvm-svn: 189393
2013-08-27 18:59:54 +00:00
Daniel Malea 60caaae9a7 Fix warnings about redefined macros at the end of File.cpp
- removed needless defines that snuck in as part of the lldb-platform-work merge

llvm-svn: 189392
2013-08-27 18:56:27 +00:00
Virgile Bello f02a3c599b Use standard boolean operators.
llvm-svn: 189367
2013-08-27 16:24:58 +00:00
Virgile Bello ee5f7b7438 Rename EmulationStateARM::sd_regs to avoid name clash (MSVC).
llvm-svn: 189366
2013-08-27 16:24:28 +00:00
Virgile Bello 84400ec7bc Remove need of <functional> for CommandObjectCommands.
llvm-svn: 189365
2013-08-27 16:22:29 +00:00
Virgile Bello ae12a3640d Fix MinGW build after lldb-platform-work merge:
- mode_t is defined in <sys/types.h>
- reorganized S_* user rights into win32.h
- Use Host::Kill instead of kill
- Currently #ifdef functions using pread/pwrite.

llvm-svn: 189364
2013-08-27 16:21:49 +00:00
Daniel Malea 3407030d12 Fix missing declaration/includes in freebsd/Host.cpp
Thanks for catching this Ed!

llvm-svn: 189361
2013-08-27 16:03:22 +00:00
Daniel Malea 726df17223 As promised in previous commit, docs for qPlatform_RunCommand.
llvm-svn: 189360
2013-08-27 15:48:54 +00:00
Ashok Thirumurthi 03520b7fc7 Fixed a few typos.
llvm-svn: 189355
2013-08-27 14:56:58 +00:00
Charles Davis 322fc8477c Core: Fix non-Darwin build.
More fallout from my mass-Mach-O-renaming.

llvm-svn: 189323
2013-08-27 06:13:56 +00:00
Charles Davis 510938e528 Fix some names in the wake of my Mach-O changes to LLVM.
llvm-svn: 189317
2013-08-27 05:04:57 +00:00
Charles Davis 237ad9741a Plugins/ObjectFile/PECOFF: Use enums from LLVM, and don't use Mach-O definitions.
Since I renamed most of the LLVM Mach-O enums in r189314, I had to go fix
LLDB to use the new names. While I was here, I decided that a COFF
plugin really shouldn't be using Mach-O enums.

llvm-svn: 189316
2013-08-27 05:04:33 +00:00
Jason Molenda 36d4461836 OptionValueFileSpec::SetValueFromCString() is passed a complete file pathname -- it
should not split up that pathname itself or require quoting to avoid the same.

This fixing a bug where target create -c "core file" or target create -s "symbol file"
will fail with an error message that the paths haven't been properly quoted.  Working
around it required target create -c "core\ file" to survive both attemps at tokenizing.

<rdar://problem/14230629> 

llvm-svn: 189313
2013-08-27 04:58:31 +00:00
Jason Molenda b000e4d758 When ObjectFileMachO::GetModuleSpecifications is getting the ArchSpec
out of a binary, if the Mach-O binary is MH_PRELOAD ("standalone"), don't
let the OS be set to "ios" or "macosx" - there will be no dynamic loader
used when debugging this process.
<rdar://problem/9956443> 

llvm-svn: 189305
2013-08-27 02:22:06 +00:00
Daniel Malea e0f8f574c7 merge lldb-platform-work branch (and assorted fixes) into trunk
Summary:
    This merge brings in the improved 'platform' command that knows how to
    interface with remote machines; that is, query OS/kernel information, push
    and pull files, run shell commands, etc... and implementation for the new
    communication packets that back that interface, at least on Darwin based
    operating systems via the POSIXPlatform class. Linux support is coming soon.

    Verified the test suite runs cleanly on Linux (x86_64), build OK on Mac OS
    X Mountain Lion.

    Additional improvements (not in the source SVN branch 'lldb-platform-work'):
    - cmake build scripts for lldb-platform
    - cleanup test suite
    - documentation stub for qPlatform_RunCommand
    - use log class instead of printf() directly
    - reverted work-in-progress-looking changes from test/types/TestAbstract.py that work towards running the test suite remotely.
    - add new logging category 'platform'

    Reviewers: Matt Kopec, Greg Clayton

    Review: http://llvm-reviews.chandlerc.com/D1493

llvm-svn: 189295
2013-08-26 23:57:52 +00:00
Michael Sartain 0b5e5f438d unused variable, typedef requires name warning cleanup
llvm-svn: 189231
2013-08-26 17:07:34 +00:00
Virgile Bello a4fe3a1259 PECOFF: Add support for export table.
llvm-svn: 189192
2013-08-25 13:27:20 +00:00
Virgile Bello 8452cb5486 Fix DWARF for 0-length CIE (data after the length should not be read if length is 0).
llvm-svn: 189191
2013-08-25 13:24:48 +00:00
Jason Molenda 6c20dde756 Add Host/common/ProcessRunLock.cpp to the xcode project file so TOT sources build with xcode again.
llvm-svn: 189163
2013-08-24 03:42:38 +00:00
Jason Molenda c7e828eef1 Don't recommend using bytearray(buf, 'ascii') for binary data read with
SBProcess::ReadMemory - it will fail for anything with the high bit set.

llvm-svn: 189154
2013-08-24 00:16:19 +00:00
Virgile Bello b2f1fb2943 MingW compilation (windows). Includes various refactoring to improve portability.
llvm-svn: 189107
2013-08-23 12:44:05 +00:00
Jason Molenda a609fe1576 Add link to Darwin iOS arm ABI docs in ABIMacOSX_arm.cpp.
llvm-svn: 189082
2013-08-23 01:31:25 +00:00