Commit Graph

7826 Commits

Author SHA1 Message Date
Jim Ingham fb6fc0dd90 Convert ClangASTType::GetTypeName over to return a ConstString to be consistent with
the other "Get*TypeName" functions.

llvm-svn: 191556
2013-09-27 20:59:37 +00:00
Jim Ingham 6dafc4203d If you erase while iterating, remember to update the iterator. Bug found by Carlo Kok.
llvm-svn: 191555
2013-09-27 20:58:17 +00:00
Jim Ingham f642373cd5 Factor the code that was eliminating redundant breakpoint locations and moving
line breakpoints past the prologue of functions so it can be shared between the
file & line breakpoint resolver, and the source pattern breakpoint resolver,
and then share it.

llvm-svn: 191478
2013-09-27 01:16:58 +00:00
Jim Ingham 2b89a53181 DWARF says line number 0 is a valid line number - used to indicate a source line that should
not have breakpoints set on it inserted into code that does have a valid line number.  So allow
that line number, and the ThreadPlanStepRange should just continue stepping over 0 line ranges
as if they had the same line number as whatever we were previously stepping through.

llvm-svn: 191477
2013-09-27 01:15:46 +00:00
Jim Ingham e4483cf959 Remove unnecessary checks for thread_plan_sp (we check for this at the top of the function.)
llvm-svn: 191476
2013-09-27 01:13:01 +00:00
Matt Kopec ee969f9f27 Mark 32/64-bit tests as expected fail after root causing and referencing bugzilla.
Fix TestFrames.py error to check against a None pc value.

llvm-svn: 191470
2013-09-26 23:30:59 +00:00
Matt Kopec cc64cc1773 Fix the thread jump test case for 32-bit inferiors. A jump was going back to a function call using a source line number. However, the parameters being passed to the function were setup before the instruction we jumped to. In other words, the source line was associated with assembly after the function parameters had been setup for the function to be called.
llvm-svn: 191457
2013-09-26 20:54:17 +00:00
Carlo Kok bb5c5f8289 missed one Close () call in 191446 overload fix for Posix only code.
llvm-svn: 191455
2013-09-26 20:22:28 +00:00
Ben Langmuir edb3b21792 Fix the command name in the syntax text for _regexp-list
llvm-svn: 191454
2013-09-26 20:00:01 +00:00
Ben Langmuir bcf81ea4bf Fix a couple of typos in the help text for disassemble
llvm-svn: 191452
2013-09-26 19:53:03 +00:00
Carlo Kok b1a63bdf55 On Windows MapViewOfFile requires the offset to be aligned on the system dwAllocationGranularity
llvm-svn: 191447
2013-09-26 18:52:08 +00:00
Carlo Kok a46964f1bb On windows a socket and file descriptor aren't the same kind of handle, pass the type to Close so it uses the right api to close it.
llvm-svn: 191446
2013-09-26 18:49:53 +00:00
Ashok Thirumurthi 8b5773053b Fix the partial backtrace in a recursive inferior compiled with -fomit-frame-pointer.
- Removes the block in UnwindLLDB::AddOneMoreFrame that tests for a bad stack setup,
since it is neither correct (tests the FP GPR), complete (doesn't consider multi-frame
cycles), nor reachable (the construction of RegisterContextLLDB will fail in the case 
where either of the two (why just two?) previous frames have the same canonical frame
address as the frame that we propose adding to the stack).

llvm-svn: 191430
2013-09-26 14:35:59 +00:00
Richard Mitton 0d40120615 Changed fuzz tests to not print their values (we only need to test if access to them does not crash).
This fixes the 'No value' string appearing in the dotest results.

llvm-svn: 191399
2013-09-25 20:48:03 +00:00
Richard Mitton d36c8d23a5 Added a simple legend to the unit test 'dots' output, to aid understandability.
llvm-svn: 191398
2013-09-25 20:47:51 +00:00
Daniel Malea 46a72bb3bf Enable tests affected by llvm.org/pr14637
- to verify that r191392 has the desired effect

llvm-svn: 191396
2013-09-25 19:43:18 +00:00
Richard Mitton 25b092835e Fixed a race condition where the prompt would randomly go missing.
el_gets was using fflush to output it's string, but because we have our own filter running on the piped pty output, fflush only causes the prompt to be written into the pipe, and does not cause the filter code to run immediately.

The simplest fix is to manually block and wait for all editline output to be processed.

This fixes PR 14637.

llvm-svn: 191392
2013-09-25 18:45:59 +00:00
Joerg Sonnenberger 1d073feee0 When using va_list, include cstdarg/stdarg.h.
llvm-svn: 191390
2013-09-25 17:58:23 +00:00
Joerg Sonnenberger e5545ce577 editline headers are under readline/ for NetBSD.
llvm-svn: 191389
2013-09-25 17:57:20 +00:00
Joerg Sonnenberger ca965885e5 si_errno and friends are macros on NetBSD, so #undef them first.
llvm-svn: 191388
2013-09-25 17:56:48 +00:00
Joerg Sonnenberger 34ea0f8a34 NetBSD also has a size field in socket addresses.
llvm-svn: 191387
2013-09-25 17:56:00 +00:00
Joerg Sonnenberger 1e0621cea2 arpa/inet.h is the canonical source of htons and friends.
At least on NetBSD, none of the already included headers pulls it in.

llvm-svn: 191386
2013-09-25 17:53:34 +00:00
Joerg Sonnenberger c75987637b Handle ePathTypePythonDir even in the case of LLDB_DISABLE_PYTHON,
otherwise -Werror builds may fail.

llvm-svn: 191385
2013-09-25 17:52:18 +00:00
Matt Kopec 7663b3a9d0 Add support for TestPluginComands on Linux. Also, rework makefile dsym target.
llvm-svn: 191383
2013-09-25 17:44:00 +00:00
Ashok Thirumurthi bb82b84c34 Cache and restore the frame-format, so that test_set_frame_format doesn't modify the default, as required for TestInferiorAssert.py.
- Also fixes this test case to set/verify a non-default frame-format and explain the intent.

llvm-svn: 191378
2013-09-25 15:30:14 +00:00
Joerg Sonnenberger 340a17595e Convert to UNIX line endings.
llvm-svn: 191367
2013-09-25 10:37:32 +00:00
Enrico Granata 5d5f60c391 Target::m_suppress_synthetic_value was a hack required to disable synthetic values while passing an SBValue to a synthetic child provider, or incur an endless recursion
Now that SBValues can be setup to ignore synthetic values, this is no longer necessary, and so m_suppress_synthetic_value can go away

Another Hack Bites the Dust

llvm-svn: 191338
2013-09-24 22:58:37 +00:00
Ashok Thirumurthi 5e644d9737 Fix an xpass on the buildbots by relaxing a test for PC location in the disassembly.
llvm-svn: 191321
2013-09-24 18:03:57 +00:00
Ashok Thirumurthi 35729bb1f8 Adds an option to resolve a symbol from an address that can be used
to build out the symbol table as addresses are used, and implements
the mechanism for ELF to add stripped symbols from eh_frame.

Uses this mechanism to allow disassembly for addresses corresponding
to stripped symbols for ELF, and provide hooks to implement this for
PE COFF.

Also removes eSymbolContextTailCall in favor of an option for
ResolveSymbolContextForAddress for consistency with the documentation
for eSymbolContextEverything.  Essentially, this is just an option for
interpreting the so_addr.
                  

llvm-svn: 191307
2013-09-24 15:34:13 +00:00
Jason Molenda 378a462c1a Fix a bug where the x86 assembly instruction profiler would not correctly adjust
the CFA instructions when it was profiling an -fomit-frame-pointer function
and a "volatile" register was saved on the stack (e.g. an argument register).
<rdar://problem/15036546>

llvm-svn: 191267
2013-09-24 03:28:54 +00:00
Jason Molenda 2cd21b87cd Update RegisterContextLLDB::GetFullUnwindPlanForFrame() to use the architectural-
default-at-first-instruction UnwindPlan if we're at the beginning of a function and
the ABI can provide us with an UnwindPlan to get out of there before falling back
to the generic architectural default UnwindPlan (which usually assumes that the stack
has already been set up.)

Update the FuncUnwinders methods to gracefully handle the case where an assembly
profiler may not be available.

Fix a bug where FuncUnwinders::GetUnwindPlanArchitectureDefaultAtFunctionEntry was
returning the wrong UnwindPlan to its caller.

llvm-svn: 191262
2013-09-24 02:42:54 +00:00
Han Ming Ong d60982a01b <rdar://problem/14701270>
When logged in as root, just launch debugserver regularly.

llvm-svn: 191230
2013-09-23 22:09:17 +00:00
Virgile Bello 6957195ae5 Various small changes for build of LLDB on Visual Studio 2013 RC (MSVC12)
llvm-svn: 191116
2013-09-20 22:35:22 +00:00
Virgile Bello 1fd7ec75fc Add backslash as path separator for Win32.
llvm-svn: 191115
2013-09-20 22:31:10 +00:00
Virgile Bello 3036a8517f Remove unused friend class forward definitions (causing problem with MSVC anyway).
llvm-svn: 191114
2013-09-20 22:28:42 +00:00
Matt Kopec 2f98353099 Change posix thread so that it creates a breakpoint stop reason if the breakpoint isn't valid for the current thread but specify should stop to false. Also remove selecting a thread on a breakpoint hit.
llvm-svn: 191110
2013-09-20 21:28:39 +00:00
Ashok Thirumurthi 2568f45939 Fix lldb regressions due to r190812 in the case where debug info is present.
Specifically, allows the unwinder to handle the case where sc.function
gets resolved with a pc that is one past the address range of the function
(consistent with a tail call).  However, there is no matching symbol.

Adds eSymbolContextTailCall to provide callers with control over the scope
of symbol resolution and to allow ResolveSymbolContextForAddress to handle
tail calls since this routine is common to unwind and disassembly.

llvm-svn: 191102
2013-09-20 19:05:10 +00:00
Ashok Thirumurthi b742879c35 Add an xfail test as 'expr myfloat' can add digits consistent
with the closest available 32-bit floating point representation.

llvm-svn: 191101
2013-09-20 19:01:20 +00:00
Sylvestre Ledru f56b5b52ff Make install on lldb was not installing the header files (probably because the file was copied from clang and not updated)
llvm-svn: 191089
2013-09-20 13:22:45 +00:00
Daniel Malea e106cded61 Disable TestInferiorAssert (due to llvm.org/pr17276)
- last remaining failure on the clang buildbot

llvm-svn: 191047
2013-09-19 22:41:36 +00:00
Daniel Malea 105b2a4bc3 Make threading tests not depend on the currently selected thread
- tests are now anostic to the currently selected thread, as that is a frontend (i.e. driver) decision
- this is in preparation to a fix to POSIXThread::BreakNotify that will be committed shortly

Reviewed by: Matt Kopec

llvm-svn: 191041
2013-09-19 22:00:07 +00:00
Sylvestre Ledru 88483a3130 Fix build failures under GNU/Linux running on mips
llvm-svn: 191027
2013-09-19 19:06:57 +00:00
Ed Maste 7c0f2ce467 Assert that only reg- or word-sized values are byte swapped
Targets and hosts today are little-endian (arm, x86), so this change
should be a no-op as they will not encounter the byte swapping cases.

Byte swapping  will happen when cross debugging of big endian-targets
(e.g. MIPS, PPC) on a little-endian host (x86).  Register- or word-
sized data copies need to be swapped, but calls to ExtractBytes or
CopyByteOrderedData that would invoke the swapping case are presumably
in error.

llvm-svn: 191005
2013-09-19 15:12:36 +00:00
Sean Callanan c370a8a2f0 Made SymbolFileDWARF not crash if a function doesn't
have a type.  It does warn, though.

llvm-svn: 190968
2013-09-18 22:59:55 +00:00
Greg Clayton edfaae3956 Fixed a logic error in Module::ResolveSymbolContextForAddress(). Asking an address if its offet is greater than zero doesn't actually correctly tell us wether the address is section offset or not. A symbol could be the first symbol in a section and its offset can be zero. Also, a non-section offset lldb_private::Address can have a NULL section and calling GetOffset() will return the absolute address. To really test if an address is section offset clients should use Address::IsSectionOffset(). Also simplified the code that backs the address up by one to use the Address::Slide() function.
llvm-svn: 190955
2013-09-18 20:03:31 +00:00
Ed Maste 756e1ff676 Apply ProcessMonitor changes from r190820 to FreeBSD
llvm-svn: 190954
2013-09-18 19:34:08 +00:00
Daniel Malea 82066ed0fb SymbolVendor/ELF is actually referenced by default by lib/Makefile on all
platforms and called in lldb.cpp while it is built only on some, excluding OSX.
There is no reason to not build it then by default on all platforms.

This fixes build on OSX using llvm configure & make scripts.

Patch (2 of 2) by Adam Strzelecki!

llvm-svn: 190945
2013-09-18 16:33:12 +00:00
Daniel Malea 15832bc7a1 Respect SDKROOT in lldb Makefile
- If it is not defined (empty) everything remain as it was before.

Patch (1 of 2) by Adam Strzelecki!

llvm-svn: 190944
2013-09-18 16:32:28 +00:00
Michael Sartain c258b3010f Warning cleanup.
llvm-svn: 190942
2013-09-18 15:32:06 +00:00
Virgile Bello 90ec1643ad Added new Host/Atomic.h to replace use of <atomic> in LLDB headers.
llvm-svn: 190927
2013-09-18 09:11:16 +00:00