Commit Graph

11819 Commits

Author SHA1 Message Date
Bruce Mitchener 0b6ba7c668 Use string::find(char) for single character strings.
Summary: Use string::find(char) for single character strings.

Reviewers: abidh, ki.stfu, clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D10943

llvm-svn: 241390
2015-07-04 05:16:58 +00:00
Ed Maste e164ad8dfb Remove DOS line endings from LLDBStandalone.cmake
llvm-svn: 241361
2015-07-03 16:39:17 +00:00
Bruce Mitchener e86c6fa3dc [lldb-mi] Use size_t where appropriate.
Summary:
Many places should have been using size_t rather than MIuint or
MIint. This is particularly true for code that uses std::string::find(),
std::string::rfind(), std::string::size(), and related methods.

Reviewers: abidh, ki.stfu, domipheus

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D10931

llvm-svn: 241360
2015-07-03 15:40:44 +00:00
Bruce Mitchener 201dec7dc2 [lldb-mi] Remove unnecessary const_cast.
Summary: Remove unnecessary const_cast.

Reviewers: abidh, ki.stfu

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D10928

llvm-svn: 241359
2015-07-03 15:31:32 +00:00
Bruce Mitchener 44519f8608 [lldb-mi] GetVarFormatForChar needn't pass a char by const ref.
Summary: GetVarFormatForChar needn't pass a char by const ref.

Reviewers: ki.stfu, abidh

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D10927

llvm-svn: 241358
2015-07-03 15:30:48 +00:00
Bruce Mitchener 53be30077f [lldb-mi] Remove unnecessary members from MICmdArgContext.
Summary:
Remove unnecessary members from MICmdArgContext.

We don't need constants for these value stored in every instance
of the class.

Reviewers: ki.stfu, abidh

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D10926

llvm-svn: 241357
2015-07-03 15:30:38 +00:00
Bruce Mitchener d0ee89d81a [lldb-mi] Typo fixes
Summary: Some more typo fixes in LLDB-MI.

Reviewers: ki.stfu, abidh

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D10925

llvm-svn: 241351
2015-07-03 14:09:56 +00:00
Bruce Mitchener 3b25b479bf Remove typedefs for MIchar, MIschar, MIuchar.
Summary:
This is a start on bringing lldb-mi more in line with the typical
LLDB coding style. This just removes the usage of the typedefs and
doesn't yet clean up any logic or other issues. (This is to keep
the review simple.)

Reviewers: abidh, ki.stfu, domipheus

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D10917

llvm-svn: 241349
2015-07-03 13:45:34 +00:00
Tamas Berghammer ff7fd90017 Fix aarch64 breakpoint PC offset
llvm-svn: 241347
2015-07-03 12:51:30 +00:00
Tamas Berghammer cec93c355a Fix 128bit register read and user register count on aarch64
llvm-svn: 241340
2015-07-03 11:17:07 +00:00
Tamas Berghammer 1d793622ad Make TestDisassembleBreakpoint arm and aarch64 compatible
llvm-svn: 241338
2015-07-03 10:32:55 +00:00
Tamas Berghammer 9383480524 Enable usage of eh_frame based unwind plan as a fallback
Previously if the instruction emulation based unwind plan failed then
we fall back to the arch default unwind plan. Change it to fall back
to the eh_frame based one even on non call sites if we have eh_frame
as that one tend to be more reliable.

Differential revision: http://reviews.llvm.org/D10902

llvm-svn: 241334
2015-07-03 09:30:22 +00:00
Tamas Berghammer 09839c33b6 Fix qMemoryRegionInfo packet to return current value for address after the last memory region
Differential revision: http://reviews.llvm.org/D10899

llvm-svn: 241333
2015-07-03 09:30:19 +00:00
Tamas Berghammer 623652a0fd Improve DWARF CFI CIE parsing and remove duplicated code
Previously we handled only a few opcode DWARF CFI opcode when we
were parsing the CIE. With this change we use mostly the same code
what we use for parsing the PDE which cover more opcode.

Differential revision: http://reviews.llvm.org/D10866

llvm-svn: 241332
2015-07-03 09:30:17 +00:00
Tamas Berghammer 49dd6d1556 Fix handling of DW_CFA_restore_state
The CFA offset shouldn't be irestored to the saved value in case
of a DW_CFA_restore_state opcode.

Differential revision: http://reviews.llvm.org/D10843

llvm-svn: 241331
2015-07-03 09:30:14 +00:00
Bruce Mitchener 68dc553fda Fix type signature for CMIUtilString::IsAllValidAlphaAndNumeric.
This should take a "const char*" not a "char &".

Summary:
Fix type signature for CMIUtilString::IsAllValidAlphaAndNumeric.

This passes the MI tests on Mac OS X.

Reviewers: ki.stfu, abidh, domipheus

Subscribers: lldb-commits-list

Differential Revision: http://reviews.llvm.org/D10906

llvm-svn: 241322
2015-07-03 07:28:11 +00:00
Bruce Mitchener cb30079f41 Typo fixes.
Summary: Some typo fixes in comments in lldb-mi.

Reviewers: abidh, ki.stfu

Subscribers: lldb-commits-list

Differential Revision: http://reviews.llvm.org/D10912

llvm-svn: 241317
2015-07-03 03:54:17 +00:00
Greg Clayton 374b67144a Improve the packet dumper to be able to read the target.xml so it can dump register values when disassembling the packet log.
llvm-svn: 241307
2015-07-02 22:22:45 +00:00
Bruce Mitchener a868c13c51 Fix typos
Summary: Fixes more typos.

Reviewers: clayborg

Subscribers: lldb-commits-list

Differential Revision: http://reviews.llvm.org/D10898

llvm-svn: 241289
2015-07-02 18:48:40 +00:00
Ed Maste ae9f2b9b24 Move PlatformFreeBSD to its own namespace
Based on r233679

llvm-svn: 241287
2015-07-02 17:35:22 +00:00
Greg Clayton d6171a74f0 Make sure we can lookup re-exported symbols after recent changes to lldb_private::Symbol.
Recently lldb_private::Symbol was changed so the old code:

Address &Symbol::GetAddress();

Is now:

Address Symbol::GetAddress();

And the Address object that is returned will be invalid for non-address based symbols. When we have re-exported symbols this code would now fail:

    const Address sym_address = sym_ctx.symbol->GetAddress();

    if (!sym_address.IsValid())
        continue;

    symbol_load_addr = sym_ctx.symbol->ResolveCallableAddress(*target_sp);

    if (symbol_load_addr == LLDB_INVALID_ADDRESS)
    {
        symbol_load_addr = sym_address.GetLoadAddress(target_sp.get());
    }

It used to return an Address reference to the value of the re-exported symbol that contained no section and a zero value for Address.m_offset (since the original symbol in the symbol table had a value of zero). When a reference was returned, this meant the "sym_address.IsValid()" would return true because the Address.m_offset was not LLDB_INVALID_ADDRESS, it was zero. This was working by mistake.

The Symbol::ResolveCallableAddress(...) actually checks for reexported symbols and whole bunch of other cases and resolves the address correctly, so we should let it do its thing and not cut it off before it can resolve the address with the "if (!sym_address.IsValid()) continue;".

llvm-svn: 241282
2015-07-02 16:43:49 +00:00
Leny Kholodov ca95120f05 Fix linking issue after r241271 (dbghelp.lib was removed from default dependencies on Windows)
llvm-svn: 241278
2015-07-02 15:54:13 +00:00
Chaoren Lin 7755b29108 Remove outdated comment.
llvm-svn: 241276
2015-07-02 15:30:59 +00:00
Tamas Berghammer 3937bc650c Add new bugreport command to lldb
The new command add functionality to print out domain specific
information for reporting a bug. Currently the only supported
domain is stack unwinding (with "bugreport unwind") but adding
new domains is fairly easy.

Differential revision: http://reviews.llvm.org/D10868

llvm-svn: 241252
2015-07-02 10:03:37 +00:00
Chaoren Lin d8923e64d8 Change executable name to a.out.
Summary: The long name causes problems with some shells.

Reviewers: sivachandra

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D10888

llvm-svn: 241222
2015-07-02 01:26:39 +00:00
Jim Ingham a2baa0d9d8 Another slightly less goofy example of scripted steps.
llvm-svn: 241216
2015-07-02 00:24:17 +00:00
Sean Callanan 05834cd2ad Reversed r238363, because the message is inconsistent
with all the other assertion messages.

llvm-svn: 241212
2015-07-01 23:56:30 +00:00
Greg Clayton 14cd13c513 Check to make sure we have a valid N_GSYM symbol name before we use it for anything.
llvm-svn: 241210
2015-07-01 23:29:06 +00:00
Greg Clayton e521457db3 Fix indentation.
llvm-svn: 241209
2015-07-01 23:28:31 +00:00
Siva Chandra b88703c037 [Python] Allow PyLong values in integer lists (when converting to C lists)
Test Plan: dotest.py -p TestSBData

Reviewers: clayborg, granata.enrico

Reviewed By: clayborg, granata.enrico

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D10821

llvm-svn: 241208
2015-07-01 23:27:32 +00:00
Ying Chen 9b5eca903b Mark test_sb_api_listener_event_process_state as flakey
llvm-svn: 241203
2015-07-01 22:50:28 +00:00
Ying Chen 0a7202bb5d Run teardown and setup before retry for expectedFlakey tests
Summary:
If test is decorated with expectedFlakey*, run teardown and setup before retry
Don't run retry if the test is already decorated with xfail or skip

Test Plan:
Mark TestMultithreaded.test_sb_api_listener_event_process_state as expectedFlakey
Run ./dotest.py -p TestMultithreaded.py -A x86_64 -C gcc4.9.2

Reviewers: vharron, tberghammer

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D10830

llvm-svn: 241202
2015-07-01 22:44:27 +00:00
Enrico Granata d4cb1dddeb When I introduced hard-coded formatters, I made them non-cacheable
This is because - in theory - the formatter could match on not just the type, but also other properties of a ValueObject, so a per-type caching would not be a good thing
On the other hand, that is not always true - sometimes the matching truly is per-type

So, introduce a non-cacheable attribute on formatters that decides whether a formatter should or should not be cached. That way, the few formatters that don't want themselves cached can do so, but most formatters (including most hard-coded ones) can cache themselves just fine

llvm-svn: 241184
2015-07-01 20:06:40 +00:00
Jim Ingham 5673eef85a Add a missing space.
llvm-svn: 241181
2015-07-01 19:27:08 +00:00
Dawn Perchik 508f040994 Fix typo in comment.
llvm-svn: 241173
2015-07-01 17:41:02 +00:00
Dawn Perchik 53f34c8736 Rename ClangUserExpression members to avoid confusion with language.
The new names clarify that the members have to do with the execution
context and not the language.  For example, m_cplusplus was renamed to
m_in_cplusplus_method.

llvm-svn: 241132
2015-07-01 00:54:02 +00:00
Pavel Labath 4a9babb26e [NativeProcessLinux] Refactor PtraceWrapper
Summary:
This changes PtraceWrapper to return an Error, while the actual result is in an pointer parameter
(instead of the other way around). Also made a couple of PtraceWrapper arguments default to zero.
This arrangement makes a lot of the code much simpler.

Test Plan: Tests pass on linux. It compiles on android arm64/mips64.

Reviewers: chaoren, mohit.bhakkad

Subscribers: tberghammer, aemerson, lldb-commits

Differential Revision: http://reviews.llvm.org/D10808

llvm-svn: 241079
2015-06-30 17:04:49 +00:00
Ewan Crawford 184d4df4d7 Fix windows build.
Windows build was broken in either r240983 or r240978 in the changes to FileSpec.cpp

llvm-svn: 241071
2015-06-30 15:03:31 +00:00
Ewan Crawford 0c996a9a06 Change search order of target definition files.
Make the python target definition file have highest priority so that we can set 
the remote stub breakpoint pc offset using it.

Reviewers: clayborg
Subscribers: ted, deepak2427, lldb-commits 

Differential revision: http://reviews.llvm.org/D10775

llvm-svn: 241063
2015-06-30 13:08:44 +00:00
Tamas Berghammer f256184693 Fix [vdso] handling on Android (x86 and aarch64)
* Add in-memory object file handling to the core dynamic loader
* Fix in memory object file handling in ObjectFileELF (previously
  only part of the file was loaded before parsing)
* Fix load address setting in ObjectFileELF for 32-bit targets
  when the load bias is negative
* Change hack in DYLDRendezvous.cpp to be more specific and not to
  interfere with object files with fixed load address

Differential revision: http://reviews.llvm.org/D10800

llvm-svn: 241057
2015-06-30 10:41:23 +00:00
Pavel Labath cd4994e925 Add a missing header
llvm-svn: 241056
2015-06-30 10:20:52 +00:00
Tamas Berghammer f366af309a Ignore "push/pop {sp}" in emulation based unwinding
These instructions confusing the unwind code because in case of a
push it assumes that the original valu of a register is pushed to
the stack what is not neccessarily true in case of SP. The same is
true for the pop (in the opposite way).

Differential revision: http://reviews.llvm.org/D10806

llvm-svn: 241051
2015-06-30 09:35:46 +00:00
Tamas Berghammer 0b736f1ed0 Fix LLDB build after r241035
llvm-svn: 241050
2015-06-30 09:26:52 +00:00
Mohit K. Bhakkad e0d8c422a0 [LLDB][MIPS] Getting correct flags for MIPS
Patch by Nitesh Jain

Reviewers: clayborg, ovyalov, emaste.
Subscribers: jaydeep, bhushan, dsanders, mohit.bhakkad, sagar, labath, tberghammer, lldb-commits.
Differential Revision: http://reviews.llvm.org/D10685

llvm-svn: 241045
2015-06-30 06:29:12 +00:00
Ying Chen 401a6f9c60 Revert "Mark test_sb_api_listener_event_process_state as flakey"
This reverts commit a4f5f4da7e164b7ac358a75f2e4254c25718ad4b.
This test fails 100% with gcc4.9.2, revert it first. Will find out why xfail is overruled by xflaky.

llvm-svn: 241014
2015-06-29 22:40:33 +00:00
Keno Fischer 121c1c54bf Add -lpthread to LLDB shared lib link line unconditionally
Usually -lpthread is included due to LLVM link options,
but when LLVM threading is disabled, this does not happen.
pthread is still needed however because LLDB uses threading
regardless of whether LLVM is built with threading support or not.

Differential Revision: http://reviews.llvm.org/D5431

llvm-svn: 241006
2015-06-29 21:52:45 +00:00
Greg Clayton 63cacd7b79 Make sure that SharingPtr.h appears in the LLDB.framework by making it a public header in the LLDB framework target.
This fixes test issues with building lldb/test/api/multithreaded and a few other tests that build against the LLDB.framework in our build directory.

llvm-svn: 240993
2015-06-29 20:42:28 +00:00
Greg Clayton 2e59d4fffe More packet reduction when debugging with GDB server.
- Avoid sending the qfThreadInfo, qsThreadInfo packets if we have a stop reply packet with the threads already (save 2 round trip packets)
- Include the qname, qserial and qkind in the JSON info
- Report the qname, qserial and qkind to the thread so it can cache it to avoid many packets on MacOSX and iOS
- Don't clear all discoverable settings when we exec, just the ones we need to saves 1-5 packets for each exec.

llvm-svn: 240988
2015-06-29 20:08:51 +00:00
Chaoren Lin 0246b6ff2e Rewrite FileSpec::EnumerateDirectory to avoid code duplication.
Reviewers: clayborg

Reviewed By: clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D10811

llvm-svn: 240983
2015-06-29 19:07:35 +00:00
Greg Clayton db9875f1b8 Fix buildbot failures for:
http://lab.llvm.org:8011/builders/lldb-x86-win7-msvc/builds/6152
http://lab.llvm.org:8011/builders/lldb-x86-windows-msvc/builds/7422

llvm-svn: 240979
2015-06-29 18:42:02 +00:00