Commit Graph

198155 Commits

Author SHA1 Message Date
Lorenzo Martignoni 59886f3c1a Differential Revision: http://reviews.llvm.org/D7249
llvm-svn: 234477
2015-04-09 11:42:33 +00:00
Ilia K 58627321f6 Refactor CMICmnLLDBDebuggerHandleEvents/CMICmnLLDBDebugSessionInfo/CMICmnLLDBDebugSessionInfoVarObj (MI)
Summary:
This patch includes the following changes:

# Refactor GetVariableInfo/GetValueStringFormatted/GetValue to use the same code (MI)
Also it expands the variable value format for strings (aka char*):
was:
```
^done,name="v4",numchild="1",value="0x0000000100000f56",type="const char *",thread-id="1",has_more="0"
```
now:
```
^done,name="v4",numchild="1",value="0x0000000100000f56 \"ab\"",type="const char *",thread-id="1",has_more="0"
```

# Expand the variable value format for arrays (according to GDB)
For example:
was:
```
^done,name="v3",numchild="2",value="{...}",type="char [2]",thread-id="1",has_more="0"
```
now:
```
^done,name="v3",numchild="2",value="[2]",type="char [2]",thread-id="1",has_more="0"
```

# Rename MiGdbSetShowTestCase.test_lldbmi_gdb_show_process_stopatentry_default to test_lldbmi_gdb_show_process_stopatentry (MI)

# Fix a comment in MiGdbSetShowTestCase.test_lldbmi_gdb_show_process_stopatentry (MI)

# Refactor CMICmnLLDBUtilSBValue
## Add CMICmnLLDBUtilSBValue::IsPointerType/IsArrayType
## Refactor CMICmnLLDBUtilSBValue::GetValue
## Fix CMICmnLLDBUtilSBValue::IsChildCharType to ignore a number of childs
## Rename CMICmnLLDBUtilSBValue::IsChildCharType to IsFirstChildCharType
## Fix CMICmnLLDBUtilSBValue::GetValueCString to accept char[]

# Minor changes in CMICmnLLDBUtilSBValue::GetValue

# Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormVariableInfo family functions (MI)

# Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo family functions (MI)
## Remove CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo2
## Improve CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo to accept args

# Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo family functions (MI)
## Add vArgInfo arg to CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo
## Move CMICmnLLDBDebugSessionInfo::GetFrameInfo/MIResponseFormFrameInfo to private namespace

# Refactor CMICmnLLDBDebugSessionInfo::GetThreadFrames family functions (MI)
## Remove CMICmnLLDBDebugSessionInfo::GetThreadFrames2
## Improve CMICmnLLDBDebugSessionInfo::GetThreadFrames to accept vnMaxDepth

# Fix vnMaxDepth arg name in CMICmnLLDBDebugSessionInfo::MIResponseFormVariableInfo (MI)

# Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo family functions (MI)
## Merge CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo functions into one

# Don't modify fnName in CMICmnLLDBDebugSessionInfo::GetThreadFrames (MI)

# Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo family functions (MI)
## Remove CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo3
## Improve -CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo to accept vnMaxDepth

# Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo family functions (MI)
## Remove CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo2
## Add CMICmnLLDBDebugSessionInfo::ThreadInfoFormat_e enum to specify thread format
## Improve CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo to accept veThreadInfoFormat
## Remove vnMaxDepth arg in CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo (not needed because veThreadInfoFormat was added)

# Move CMICmnLLDBDebugSessionInfo::GetThreadFrames to private namespace (MI)

# Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo (MI)
## Add CMICmnLLDBDebugSessionInfo::FrameInfoFormat_e enum to specify frame format
## Improve CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo to accept veFrameInfoFormat
## Remove vnMaxDepth arg in CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo (not needed because veFrameInfoFormat was added)

# Remove duplicated level field in CMICmnLLDBDebugSessionInfo::GetThreadFrames (MI)

# Refactor CMICmnLLDBUtilSBValue::GetValue (MI)
## Add CMICmnLLDBUtilSBValue::GetSimpleValue
## Use CMICmnLLDBUtilSBValue::GetSimpleValue in GetVlaue

# Fix CMICmnLLDBDebugSessionInfo::GetThreadFrames (MI)
## Add CMICmnLLDBDebugSessionInfo::FrameInfoFormat_e::eFrameInfoFormat_AllArgumentsInSimpleForm which is used to get stack-args in simple form (i.e. show {...} for composite types). It can be done by calling MIResponseFormVariableInfo with vnMaxDepth=0.
## Improve CMICmnLLDBDebugSessionInfo::GetThreadFrames to accept veFrameInfoFormat
## Remove vnMaxDepth from CMICmnLLDBDebugSessionInfo::GetThreadFrames (we should use veFrameInfoFormat instead)

# Refactor CMICmnLLDBUtilSBValue::GetValue to expand composite types (MI)
## Add CMICmnLLDBUtilSBValue::GetCompositeValue to expand composite types
## Add CMICmnLLDBUtilSBValue::m_pComposite to avoid multiple {...} in the code
## Improve CMICmnLLDBUtilSBValue::GetValue to accept vbExpandAggregates option (default=false)
## Clean up CMICmnLLDBDebugSessionInfo::GetVariableInfo to use CMICmnLLDBUtilSBValue::GetValue
## Remove the wrapping into {} in CMICmnLLDBDebugSessionInfo::MIResponseFormVariableInfo
## Fix MiStackTestCase.test_lldbmi_stack_list_locals test to expect result without superfluous space ' ' around the '{' or '}' brackets:
was:
```
{name=\"var_c\",value=\"{var_a = 10,var_b = 97 'a',inner_ = { var_d = 30 }}
```
now:
```
{name=\"var_c\",value=\"{var_a = 10,var_b = 97 'a',inner_ = {var_d = 30}}
```
## Fix vwrValue arg name in CMICmnLLDBUtilSBValue::GetSimpleValue (was vrValue)

# Refactor CMICmnLLDBDebugSessionInfo::GetVariableInfo (MI)
## Remove vnMaxDepth/vbIsChildValue/vnDepth args in CMICmnLLDBDebugSessionInfo::GetVariableInfo
## Improve CMICmnLLDBDebugSessionInfo::GetVariableInfo to accept vwrStrValue
## Remove vwrMiValueList arg in CMICmnLLDBDebugSessionInfo::GetVariableInfo (we should use vwrStrValue instead)
## Fix CMICmnLLDBDebugSessionInfo::MIResponseFormVariableInfo to Escape values
was:
```
{name="p",value="0x0000000000000000 """}
```
now:
```
{name="p",value="0x0000000000000000 \"\""}
```

# Refactor CMICmnLLDBUtilSBValue
## Improve CMICmnLLDBUtilSBValue::GetValue to handle PrintExpandAggregates
## Improve CMICmnLLDBUtilSBValue::GetSimpleValue to handle vbHandleArrayType (use it to specify that array should be represented as simple type, i.e. value="[2]")

# Add spacing between fields in CMICmnLLDBUtilSBValue::GetCompositeValue (MI)
For example:
was:
```
^done,name="var3",numchild="3",value="{i = 3,inner = {l = 3},complex_ptr = 0x00007fff5fbff848}",type="complex_type",thread-id="1",has_more="0"
```
now:
```
^done,name="var3",numchild="3",value="{i = 3, inner = {l = 3}, complex_ptr = 0x00007fff5fbff848}",type="complex_type",thread-id="1",has_more="0"
```

# Fix spacing in MiStackTestCase.test_lldbmi_stack_list_locals test (MI)

Test Plan: ./dotest.py -v --executable $BUILDDIR/bin/lldb tools/lldb-mi/

Reviewers: abidh

Subscribers: lldb-commits, abidh

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

llvm-svn: 234476
2015-04-09 11:17:54 +00:00
Toma Tabacu be218927f8 [mips] Refactor saved-registers bitmask creation in MipsAsmPrinter::printSavedRegsBitmask. NFC.
Summary:
Make the code more readable by fusing the for-loops together and explicitly checking for each register class.

Also, this version is more straightforward because it doesn't assume that FPU registers always come before CPU registers in the CalleeSavedInfo vector.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

llvm-svn: 234475
2015-04-09 10:54:16 +00:00
Denis Protivensky 455e44b0e4 [ARM] clang-format ARM sources
llvm-svn: 234474
2015-04-09 10:17:22 +00:00
Denis Protivensky 6b3a33ff00 [ARM] Add mapping symbols to veneers
This required splitting up veneer atoms into pieces,
where every piece is paired with mapping atom of
the corresponding type.

llvm-svn: 234473
2015-04-09 09:59:18 +00:00
Kuba Brecka 2aa8c8fd17 [Sanitizer] Get rid of PlatformGetListOfModules
Moving the implementation of several functions from sanitizer_symbolizer.cc into sanitizer_symbolizer_libcdep.cc.

Reviewed at http://reviews.llvm.org/D8858

llvm-svn: 234472
2015-04-09 09:37:46 +00:00
Kristof Beyls 17cb8982f4 [AArch64] Add support for dynamic stack alignment
Differential Revision: http://reviews.llvm.org/D8876

llvm-svn: 234471
2015-04-09 08:49:47 +00:00
Yury Gribov 8e49b47e0a [ASan] Only include rpc headers if they are available.
Reviewed at http://reviews.llvm.org/D8698

llvm-svn: 234470
2015-04-09 08:06:49 +00:00
Mohit K. Bhakkad 2c2acf9602 [LLDB][MIPS] Add LinuxSignals for mips64 and change trap opcode for mips64el.
Patch by Sagar Thakur

- Added LinuxSignals for MIPS64.
- Changed software trap opcode for mips64el.

Reviewers: clayborg, tberghammer.

Subscribers: emaste, jaydeep, bhushan, mohit.bhakkad, llvm-commits.

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

llvm-svn: 234469
2015-04-09 07:12:15 +00:00
Mohit K. Bhakkad 0eccfdc655 [Compiler-rt][MIPS] Fix for asan test suite build on mips64/mips64el
Patch by Sagar Thakur

Reviewers: dsanders
llvm-svn: 234468
2015-04-09 06:58:32 +00:00
Lang Hames 522bf13b83 [AArch64] Remove redundant -march option. Also fix a think-o from r234462.
llvm-svn: 234467
2015-04-09 05:34:57 +00:00
Nick Lewycky d65d3d7b8b Not all triples put _ before function names. Specify a triple to make this test pass on Linux.
llvm-svn: 234466
2015-04-09 05:31:32 +00:00
Craig Topper 8b88cc284f Use SmallVector instead of std::vector for uniquing X86 disassembler operand sets. The number of operands is a small fixed size.
llvm-svn: 234465
2015-04-09 04:08:48 +00:00
Craig Topper 34136874fd Simplify some printing code by combining new lines onto previous strings. Don't work so hard not to print a comma on the last entry of an array.
llvm-svn: 234464
2015-04-09 04:08:46 +00:00
Craig Topper d434e39557 Don't convert enum to strings just to put them in the uniquing map. Use the enum directly. Only convert to a string for printing.
llvm-svn: 234463
2015-04-09 04:08:42 +00:00
Lang Hames 903338511b [AArch64] Teach AArch64TargetLowering::getOptimalMemOpType to consider alignment
restrictions when choosing a type for small-memcpy inlining in
SelectionDAGBuilder.

This ensures that the loads and stores output for the memcpy won't be further
expanded during legalization, which would cause the total number of instructions
for the memcpy to exceed (often significantly) the inlining thresholds.

<rdar://problem/17829180>

llvm-svn: 234462
2015-04-09 03:40:33 +00:00
Rafael Espindola 132381f981 Use the cast machinery to remove dummy uses of formatted_raw_ostream.
If we know we are producing an object, we don't need to wrap the stream
in a formatted_raw_ostream anymore.

llvm-svn: 234461
2015-04-09 02:28:12 +00:00
Rafael Espindola 0a261a3dda Add classof implementations to the raw_ostream classes.
More uses to follow in a another patch.

llvm-svn: 234460
2015-04-09 02:10:28 +00:00
Rafael Espindola 622be5793d Delete unused constructor.
llvm-svn: 234459
2015-04-09 01:11:26 +00:00
Eric Christopher bc91e908f4 Update comment to refer to software floating point rather than
a local variable.

llvm-svn: 234457
2015-04-09 00:14:49 +00:00
Greg Clayton 7965e5457a Missed moving a variable during my previous revision 234455.
llvm-svn: 234456
2015-04-09 00:12:33 +00:00
Greg Clayton 29aac9a56c Darwin read()/pread()/fread() and write()/pwrite()/fwrite() calls can only write INT_MAX bytes at a time.
Modify all read/write calls to allow any system to define MAX_READ_SIZE or MAX_WRITE_SIZE so large reads and writes can be divided up correctly.

<rdar://problem/20471411>

llvm-svn: 234455
2015-04-09 00:06:44 +00:00
Rui Ueyama 2effbd6b68 AtomVector: Reorder member orders to use template alias in AtomRange.
llvm-svn: 234453
2015-04-08 23:12:48 +00:00
Rui Ueyama de40bd4cf9 Rename atom_collection -> AtomVector.
Type names should start with an uppercase letter in the LLVM coding style.

llvm-svn: 234452
2015-04-08 23:05:59 +00:00
Akira Hatanaka 4cb3d064ce Use option -march instead of -mtriple to avoid overconditionalizing the test.
This fixes r234439, which was committed to fix the test failures caused by
r234430.

llvm-svn: 234451
2015-04-08 23:02:45 +00:00
Rui Ueyama b0db07bf90 Separate atom_collection type into two different types. NFC.
atom_collection is basically a wrapper for std::vector. The class
provides begin and end member functions, so that it "hides" the
other member functions provided by std::vector. However, you can
still directly access _atoms member since the member is not
protected.

We cannot simply make the member private because we need that member
when we are constructing atom vectors.

This patch splits atom_collection into two types: std::vector<Atom *>
and AtomRange. When we are constructing atom vectors, we use the
former class. We return instances of the latter class from File
objects so that callers cannot add or remove atoms from the lists.

std::vector<Atom *> is automatically converted to AtomRange.

llvm-svn: 234450
2015-04-08 23:02:11 +00:00
Hans Wennborg 7a2e5c260c clang-cl: Support the /fp options (PR23112)
This hooks up the /fp options as aliases for -f[no-]fast-math and
-f[no]-trapping-math. It probably doesn't match cl.exe's behaviour
completely (e.g. LLVM is currently never as precise as /fp:precise),
but it's close enough.

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

llvm-svn: 234449
2015-04-08 22:55:09 +00:00
Reid Kleckner e5b064205a [WinEH] Don't wrap cleanups in terminate actions
_CxxFrameHandler3 calls terminate if a cleanup action throws, regardless
of what bits you put in the xdata tables. There's no need to model this
in the IR, since we just have to take it out later.

llvm-svn: 234448
2015-04-08 22:48:50 +00:00
Reid Kleckner 31a1bb0c14 Reland "[SEH] Implement filter capturing in CodeGen"
The test should be fixed. It was failing in NDEBUG builds due to a
missing '*' character in a regex. In asserts builds, the pattern matched
a single digit value, which became a double digit value in NDEBUG
builds. Go figure.

This reverts commit r234261.

llvm-svn: 234447
2015-04-08 22:23:48 +00:00
Manman Ren ed6b5fc4b0 [LTO] do not run internalize pass from compileOptimized.
The input to compileOptimized is already optimized and internalized, so remove
internalize pass from compileOptimized.

rdar://20227235

llvm-svn: 234446
2015-04-08 22:02:11 +00:00
Rui Ueyama 42a3dfb22c Add begin() and end() to atom_collection that returns non-const iterators.
llvm-svn: 234445
2015-04-08 21:59:08 +00:00
Rui Ueyama ae0299f040 Replace atom_iterator with a template alias.
llvm-svn: 234444
2015-04-08 21:59:06 +00:00
Rui Ueyama 1a6ec93616 Merge atom_collection_vector with atom_collection.
atom_collection_vector is the only derived class of atom_collection.
This patch merges the two.

llvm-svn: 234443
2015-04-08 21:59:04 +00:00
Rui Ueyama 2f05640409 Remove atom_collection_empty class.
llvm-svn: 234442
2015-04-08 21:59:00 +00:00
Stephane Sezer 9901e9c6c8 Fix resolution of certain recursive types.
Summary:
If a struct type S has a member T that has a member that is a function that
returns a typedef of S* the respective field would be duplicated, which caused
an assert down the line in RecordLayoutBuilder. This patch adds a check that
removes the possibility of trying to resolve the same type twice within the
same callstack.

This commit also adds unit tests for these failures.

Fixes https://llvm.org/bugs/show_bug.cgi?id=20486.

Patch by Cristian Hancila.

Test Plan: Run unit tests.

Reviewers: clayborg spyffe

Subscribers: lldb-commits

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

llvm-svn: 234441
2015-04-08 21:52:45 +00:00
Fariborz Jahanian 576ff12839 [Objective-C Sema] Use canonical type of properties when comparing
redeclaration of property in class extension and to avoid
bogus error. rdar://20469452

llvm-svn: 234440
2015-04-08 21:34:04 +00:00
Akira Hatanaka bda7aa5938 Pass -mtriple to llc to appease buildbot.
This fixes the test case I committed in r234430.

llvm-svn: 234439
2015-04-08 21:30:48 +00:00
Andrew Kaylor e104d89c8f Formmatting correction
llvm-svn: 234438
2015-04-08 21:22:46 +00:00
Chaoren Lin 7c4f6c4116 Fix segfault when doing `thread info` on a thread without stop info.
Summary:
E.g., if thread 1 hits a breakpoint, then a `thread info` on thread 2 will cause
a segfault, since thread 2 will have no stop info (intended behavior?).

Reviewers: kubabrecka, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits

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

llvm-svn: 234437
2015-04-08 21:19:12 +00:00
Rui Ueyama 5d6ff3d2ee vec.data() and vec.data() + vec.size() are both safe even if the vector is empty.
llvm-svn: 234436
2015-04-08 21:13:23 +00:00
Rui Ueyama 1e67707a66 YAML: Remove blank class using alias template.
llvm-svn: 234435
2015-04-08 21:05:45 +00:00
Rui Ueyama df666170ae Native: Remove AtomArray and use atom_collection_vector instead.
llvm-svn: 234434
2015-04-08 21:00:33 +00:00
Andrew Kaylor 67d3c0359d [WinEH] Minor bug fixes.
Fixed insert point for allocas created for demoted values.
Clear the nested landing pad list after it has been processed.

llvm-svn: 234433
2015-04-08 20:57:22 +00:00
Rui Ueyama d3165af756 Native: Use tempalte to remove duplicate code. NFC.
llvm-svn: 234432
2015-04-08 20:40:46 +00:00
Rui Ueyama 0d69284bec Native: Simplify expressions. NFC.
llvm-svn: 234431
2015-04-08 20:40:45 +00:00
Akira Hatanaka c6fab80536 [DAGCombine] Fix a bug in MergeConsecutiveStores.
The bug manifests when there are two loads and two stores chained as follows in
a DAG,

(ld v3f32) -> (st f32) -> (ld v3f32) -> (st f32)

and the stores' values are extracted from the preceding vector loads.

MergeConsecutiveStores would replace the first store in the chain with the
merged vector store, which would create a cycle between the merged store node
and the last load node that appears in the chain.

This commits fixes the bug by replacing the last store in the chain instead.

rdar://problem/20275084

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

llvm-svn: 234430
2015-04-08 20:34:53 +00:00
David Blaikie 129b839d71 Fix -Wformat-pedantic warnings
llvm-svn: 234429
2015-04-08 20:23:52 +00:00
Peter Collingbourne 0b9c7bb9fc Go bindings: make various DIBuilder arguments optional.
r234262 changed some code in DIBuilderBindings.cpp to use the unwrap function
to unwrap debug metadata. The problem with this is that unwrap asserts that
its argument is non-null, which is not what we want in a number of places
in DIBuilder where the argument is optional. This change makes certain
arguments optional by adding null checks in places where it is required,
fixing the llgo build.

llvm-svn: 234428
2015-04-08 20:18:57 +00:00
Rafael Espindola e70edce22b Don't repeat names in comments.
llvm-svn: 234427
2015-04-08 20:16:23 +00:00
Rafael Espindola 9a07495d6d Remove unused variable.
llvm-svn: 234426
2015-04-08 20:04:20 +00:00