Commit Graph

8448 Commits

Author SHA1 Message Date
Ed Maste dc97e23b02 Disable breakpoint sites upon detach on FreeBSD
llvm.org/pr18894

llvm-svn: 201724
2014-02-19 22:12:57 +00:00
Enrico Granata 8a2a0dfba5 Restore the ability of SBFrame::FindValue() to look for file global variables
This should clean up the new test failures caused by r201614

llvm-svn: 201710
2014-02-19 19:35:13 +00:00
Ed Maste c30e764942 Treat 'amd64' as 'x86_64' as done for other tests
And add a decorator for llvm.org/pr18200

Patch by John Wolfe.

llvm-svn: 201708
2014-02-19 18:55:39 +00:00
Ed Maste a4be2c5dcd FreeBSD hardware watchpoint implementation
Implement x86_64 debug register read/write in support of hardware
watchpoints. Hoist LinuxThread::TraceNotify code back into
POSIXThread::TraceNotify()

Patch by John Wolfe.

We still need to rework this later to avoid the #ifdef FreeBSD.

llvm-reviews.chandlerc.com/D2572
llvm.org/pr16706

llvm-svn: 201706
2014-02-19 18:34:06 +00:00
Ed Maste 01fd1c60cd Update decorator for test that still fails with FreeBSD Watchpoint support
llvm.org/pr18832

llvm-svn: 201705
2014-02-19 18:26:48 +00:00
Ed Maste 954e4b9259 Track Clang virtualFileSystem change (r201618)
Clang now requires calling CompilerInstance::createVirtualFileSystem
before CompilerInstance::createFileManager.

llvm-svn: 201671
2014-02-19 13:00:08 +00:00
Deepak Panickal 6d3df420d2 Initial patch for supporting Hexagon DSP
llvm-svn: 201665
2014-02-19 11:16:46 +00:00
Jason Molenda 9c37cbdb86 Re-apply r201292. We're not going to enforce proper stack frame alignment on i386/x86_64
because there are too many trap handlers that will have an improperly aligned caller sp 
and this will cause the unwinder to stop too early.  

llvm-svn: 201637
2014-02-19 03:42:19 +00:00
Enrico Granata bdab3dee8f <rdar://problem/15906684>
The way in which we were determining whether a python module had already been imported in the current session stopped working due to the IOHandler changes
As a result, importing in a new debug session a module which had been imported in a previous session did not work
This commit restores that functionality by checking for the module's presence in the session dictionary (which should be more correct anyway)

llvm-svn: 201623
2014-02-19 01:45:22 +00:00
Enrico Granata 08a04327a9 <rdar://problem/15960553>
Fix a bug where calling SBFrame::FindValue() would cause a copy of all variables in the block to be inserted in the frame's variable list, regardless of whether those same variables were there or not - which means one could end up with a frame with lots of duplicate copies of the same variables

llvm-svn: 201614
2014-02-18 23:48:11 +00:00
Jason Molenda 7b535d5453 Also recognize interrupt as a possible trap handler name.
llvm-svn: 201611
2014-02-18 22:48:27 +00:00
Jason Molenda 33489c1678 Add two additional trap handler names for PlatformDarwinKernel.
<rdar://problem/15246793> 

llvm-svn: 201609
2014-02-18 22:35:38 +00:00
Ed Maste 63f358baad Eliminate kernel warning when running tests on FreeBSD
pexpect had a hack to work around some old buggy platforms, and as a
result of the hack running the tests on FreeBSD produced a stream of
kernel warnings in the system log:

  Feb 5 17:19:11 feynman kernel: WARNING pid 11323 (python2.7):
    ioctl sign-extension ioctl ffffffff80087467

The hack has now been removed upstream, so remove it here too.

llvm.org/pr18749

llvm-svn: 201603
2014-02-18 21:33:10 +00:00
Enrico Granata 9422fd0c14 Make sure we don't try to print the SystemExit exception, or we will cause the containing process to exit() from under us
llvm-svn: 201600
2014-02-18 20:00:20 +00:00
Jim Ingham 1e9947a56d Move the libpanel dependency into the Libraries project folder.
llvm-svn: 201596
2014-02-18 19:22:13 +00:00
Jim Ingham a524a46fde Convert to codesigning by hand to work around bugs in Xcode cert verification.
llvm-svn: 201595
2014-02-18 19:11:49 +00:00
Ed Maste 330fd535f8 elf-core: support 32- and 64-bit x86 registers
This way the same RegisterContext class can support i386 and
amd64/x86_64 core files.

With some further refinement we should be able to merge all of the
processor-specific RegisterContextPOSIX_* classes into a single shared
one.

llvm-svn: 201577
2014-02-18 15:12:35 +00:00
Sean Callanan 11e32d3db4 Properly report when a struct is anonymous.
<rdar://problem/16071066>

llvm-svn: 201539
2014-02-18 00:31:38 +00:00
Deepak Panickal ff4ac8a6e7 Replaced custom variable arguments to standard library for correcting 64 bit Windows build
llvm-svn: 201523
2014-02-17 17:52:22 +00:00
Deepak Panickal 94667bcf70 Fix Windows build, broken by the inclusion of sys/ioctl.h and isatty()
llvm-svn: 201522
2014-02-17 17:43:39 +00:00
Deepak Panickal 0db9d32ff7 Fix the LLDB prompt for older Editline versions, specifically running on Ubuntu 12.04
llvm-svn: 201521
2014-02-17 17:42:25 +00:00
Deepak Panickal f275d09a34 Remove nativecodegen as it forces the native target libraries to be linked in regardless of whether the target was specified in LLVM_TARGETS_TO_BUILD
llvm-svn: 201519
2014-02-17 17:39:27 +00:00
Ed Maste ff8e5f2587 elf-core: Plug latent memory leak
ProcessElfCore::ParseThreadContextsFromNoteSegment was leaking
ThreadData for each ELF note found in core file.  We now allocate it
only once and use std::unique_ptr to ensure it is always being freed.

While at it make ParseFreeBSDThrMisc and ParseFreeBSDPrStatus take
ThreadData by reference, rather than pointer, since those arguments are
not optional.

Patch by Piotr Rak.

http://llvm-reviews.chandlerc.com/D2813

llvm-svn: 201473
2014-02-16 04:01:54 +00:00
Ed Maste 8b5e46a159 Simplify core file register context handling
This seems like a more straightforward approach for instantiating the
appropriate RegisterContext* class, made possible by Michael Sartain's
cleanup of the POSIX RegisterContext class hierarchy in r190647.

Better (user-facing) error handling is still needed.

llvm-svn: 201457
2014-02-15 02:31:22 +00:00
Enrico Granata 465f4bc287 <rdar://problem/16006373>
Revert the spirit of r199857 - a convincing case can be made that overriding a summary's format markers behind its back is not the right thing to do
This commit reverts the behavior of the code to the previous model, and changes the test case to validate the opposite of what it was validating before

llvm-svn: 201455
2014-02-15 01:24:44 +00:00
Jason Molenda 2a6c252df2 Add some additional logging to the Mac OS X SystemRuntime. Fix a bug where lldb could free an inferior's vm_page.
llvm-svn: 201447
2014-02-15 00:20:40 +00:00
Ed Maste 92b1f7e4f9 Allow FreeBSD/i386 core files to be loaded
llvm-svn: 201435
2014-02-14 21:57:27 +00:00
Ed Maste 8b4a283234 Correct offset calculation for FreeBSD i386 core NT_PRSTATUS
llvm-svn: 201434
2014-02-14 21:29:05 +00:00
Ed Maste 96d7f449b1 Adjust logging test case after r201372
The final "HandleCommand, command succeeded" for "log disable lldb"
doesn't make it to the log file before the command takes effect.

llvm-svn: 201422
2014-02-14 16:06:35 +00:00
Ed Maste 96430645eb Update decorators for tests that still fail with FreeBSD Watchpoint support
llvm.org/pr18832

Reported by John Wolfe

llvm-svn: 201418
2014-02-14 14:52:10 +00:00
Jason Molenda 026f389117 Fix minor build warning on Mac OS X x86_64.
llvm-svn: 201387
2014-02-14 05:16:17 +00:00
Jason Molenda a4bea72ee7 Add a new target setting, trap-handler-names, where a user can
specify a list of functions which should be treated as trap handlers.
This will be primarily useful to people working in non-user-level
process debugging - kernels and other standalone environments.
For most people, the trap handler functions provided by the Platform
plugin will be sufficient.

<rdar://problem/15835846>, <rdar://problem/15982682> 

llvm-svn: 201386
2014-02-14 05:06:49 +00:00
Greg Clayton e98008cc58 Fixed deadlocks that could occur when using python for breakpoints, operating system plugins, and other async python usage.
<rdar://problem/16054348>
<rdar://problem/16040833>

llvm-svn: 201372
2014-02-13 23:34:38 +00:00
Jason Molenda abba74b4ee Revert r201292 which relaxed the stack frame alignment requirements.
This was primarily working around problems where we weren't able
to identify trap handlers for different environments -- but instead,
I'm working to make it easier to specify those trap handler function
names.

llvm-svn: 201366
2014-02-13 23:29:36 +00:00
Jason Molenda 2094dbf4e7 Change the way the m_trap_handlers Platform base class ivar is initialized;
add a new pure virtual CalculateTrapHandlerSymbolNames() that Platform 
subclasses must implement which fills in the function name list with any
trap handlers that are expected on that platform.

llvm-svn: 201364
2014-02-13 23:11:45 +00:00
Todd Fiala 6bb55ba42b Re-enable TestAbbreviations.py on Linux after test fix.
See http://llvm.org/bugs/show_bug.cgi?id=18816.

llvm-svn: 201357
2014-02-13 19:21:13 +00:00
Greg Clayton 8b963bbd07 Fixed a test suite failure on Darwin due to logging issues.
llvm-svn: 201356
2014-02-13 18:30:23 +00:00
Ed Maste 800e12ac81 Avoid undesired variable shadowing
Michael Sartain refactored RegisterContextPOSIX_* in r192332, and I must
have missed the now-shadowed variable when I rebased the FreeBSD MIPS64
register context after that.

llvm-svn: 201334
2014-02-13 15:12:57 +00:00
Jason Molenda 6223db2778 The Platform base class now maintains a list of trap handlers
aka asynchronous signal handlers, which subclasses should fill
in as appropriate.  For most Unix user process environments,
the one entry in this list is _sigtramp.  For bare-board and
kernel environments, there will be different sets of trap 
handlers.

The unwinder needs to know when a frame is a trap handler 
because the rules it enforces for the frame "above" the
trap handler is different from most middle-of-the-stack frames.

<rdar://problem/15835846> 

llvm-svn: 201300
2014-02-13 07:11:08 +00:00
Jason Molenda 9098f1d3d9 Change the ABI CallFrameAddressIsValid methods for i386 and x86_64.
They were enforcing 16-byte alignment on stack frames for Darwin x86 programs.
But we've found that trap handlers typically don't have the stack pointer
aligned correctly when a trap happens and lldb wasn't backtracing all
the way through.  This method is only used as a safety guard to prevent
lldb's unwinder from using a bogus address as a stack frame - we'll still
enforce word-size alignment on stack frames so that should be fine.

Also rolled back akaylor's changes from August 2013 in r188952 which changed
the i386 ABI plugin to relax the CallFrameAddressIsValid offsets for non-Darwin
targets where only 4-byte alignment is enforced.  Now Darwin is the same as
those environments.

<rdar://problem/15982682> 

llvm-svn: 201292
2014-02-13 04:19:32 +00:00
Ed Maste 2a798d9c05 Remove decorator for fixed test
llvm.org/pr18805 fixed by r201270

llvm-svn: 201284
2014-02-13 01:10:20 +00:00
Greg Clayton c7d8885be4 Fixed the TestLogging test.
llvm-svn: 201273
2014-02-12 23:46:08 +00:00
Greg Clayton fdde7ccf37 Fixed the functionalities/abbreviation/TestAbbreviations.py test case.
llvm-svn: 201270
2014-02-12 23:40:31 +00:00
Greg Clayton 7a1bd0baa1 Add support for DW_OP_piece and DW_OP_bit_piece.
llvm-svn: 201268
2014-02-12 23:16:19 +00:00
Todd Fiala 027baff8a0 Change TestAbbreviations test to expected failure on Linux.
See http://llvm.org/bugs/show_bug.cgi?id=18816.
Likely the same issue as http://llvm.org/bugs/show_bug.cgi?id=18805.

llvm-svn: 201244
2014-02-12 17:50:26 +00:00
Todd Fiala 729c001ec3 Fix elf core file VMA-contiguous region collapsing.
Elf core files were collapsing core segments when the virtual memory
addresses were contiguous without checking if the core-file-backed
memory region was the same size as the segment's VMA region. Without
this extra check, any time regions were collapsed but the core-backed
region was smaller (and thus had a zero-filled hole at the end), the
collapse operation would break VMA to core file lookups for subsequent
collapsed regions.

This change fixes the following bug:
http://llvm.org/bugs/show_bug.cgi?id=18769

llvm-svn: 201214
2014-02-12 07:29:44 +00:00
Enrico Granata 67530b694c Avoid leaking namebuf in case of an early exit
llvm-svn: 201206
2014-02-12 03:37:33 +00:00
Filipe Cabecinhas 89372e99ba Fix cmake compilation on Mac OS X.
llvm-svn: 201200
2014-02-12 00:57:20 +00:00
Greg Clayton b6892508a6 When a multiline expression produces output, the multi-line help message is printed twice.
<rdar://problem/16031890> 

llvm-svn: 201171
2014-02-11 19:11:11 +00:00
Ed Maste 197305e916 Remove decorator for llvm.org/pr17233
This test was skipped as it used to segfault on FreeBSD.  It seems
the original issue has since been fixed, so have the test run again.

llvm-svn: 201169
2014-02-11 18:55:19 +00:00