[Lldb-commits] [PATCH] D55991: DWARF: Fix a bug in array size computation

2018-12-21 Thread Pavel Labath via Phabricator via lldb-commits
labath created this revision.
labath added reviewers: aprantl, clayborg.
Herald added a subscriber: JDevlieghere.

r346165 introduced a bug, where we would fail to parse the size of an
array if that size happened to match an existing die offset.

The logic was:
if (DWARFDIE count = die.GetReferencedDie(DW_AT_count))

  num_elements = compute_vla_size(count);

else

  num_elements = die.GetUsigned(DW_AT_count); // a fixed-size array

The problem with this logic was that GetReferencedDie did not take the
form class of the attribute into account, and would happily return a die
reference for any form, if its value happened to match some die.

As this behavior is inconsistent with how llvm's DWARFFormValue class
operates, I chose to fix the problem by making our version of this class
match the llvm behavior. For this to work, I had to add an explicit form
class check to the .apple_XXX tables parsing code, because they do
(incorrectly?) use data forms as die references.


https://reviews.llvm.org/D55991

Files:
  lit/SymbolFile/DWARF/array-sizes.s
  source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
  source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp

Index: source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp
===
--- source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp
+++ source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp
@@ -279,7 +279,9 @@
 switch (header_data.atoms[i].type) {
 case eAtomTypeDIEOffset: // DIE offset, check form for encoding
   hash_data.offset =
-  (dw_offset_t)form_value.Reference(header_data.die_base_offset);
+  DWARFFormValue::IsDataForm(form_value.Form())
+  ? form_value.Unsigned()
+  : form_value.Reference(header_data.die_base_offset);
   break;
 
 case eAtomTypeTag: // DW_TAG value for the DIE
Index: source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
===
--- source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
+++ source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
@@ -613,14 +613,16 @@
   case DW_FORM_ref_udata:
 assert(m_cu); // CU must be valid for DW_FORM_ref forms that are compile
   // unit relative or we will get this wrong
-die_offset += m_cu->GetOffset();
-break;
+return die_offset + m_cu->GetOffset();
+
+  case DW_FORM_ref_addr:
+  case DW_FORM_ref_sig8:
+  case DW_FORM_GNU_ref_alt:
+return die_offset;
 
   default:
-break;
+return DW_INVALID_OFFSET;
   }
-
-  return die_offset;
 }
 
 uint64_t DWARFFormValue::Reference(dw_offset_t base_offset) const {
@@ -631,14 +633,16 @@
   case DW_FORM_ref4:
   case DW_FORM_ref8:
   case DW_FORM_ref_udata:
-die_offset += base_offset;
-break;
+return die_offset + base_offset;
+
+  case DW_FORM_ref_addr:
+  case DW_FORM_ref_sig8:
+  case DW_FORM_GNU_ref_alt:
+return die_offset;
 
   default:
-break;
+return DW_INVALID_OFFSET;
   }
-
-  return die_offset;
 }
 
 const uint8_t *DWARFFormValue::BlockData() const { return m_value.data; }
Index: lit/SymbolFile/DWARF/array-sizes.s
===
--- /dev/null
+++ lit/SymbolFile/DWARF/array-sizes.s
@@ -0,0 +1,147 @@
+# This tests a bug where we would incorrectly parse the size of an array if that
+# size happened to match an existing DIE offset. This happened because we
+# misinterpreted that value as a reference to a DIE specifying the VLA size even
+# though the form was a data form (as it should be).
+
+# REQUIRES: lld
+
+# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o
+# RUN: ld.lld %t.o -o %t
+# RUN: lldb-test symbols %t | FileCheck %s
+
+# CHECK: Variable{0x001e}, name = "X"
+# CHECK-SAME: type = {0033} 0x{{[0-9a-f]*}} (char [56])
+
+
+# Generated from "char X[47];"
+# The array size was modified by hand.
+
+	.text
+	.file	"-"
+	.file	1 "/tmp" ""
+	.type	X,@object   # @X
+	.comm	X,63,16
+	.section	.debug_str,"MS",@progbits,1
+.Linfo_string0:
+	.asciz	"clang version 8.0.0 (trunk 349604) (llvm/trunk 349608)" # string offset=0
+.Linfo_string1:
+	.asciz	"-" # string offset=55
+.Linfo_string2:
+	.asciz	"/tmp"  # string offset=57
+.Linfo_string3:
+	.asciz	"X" # string offset=62
+.Linfo_string4:
+	.asciz	"char"  # string offset=64
+.Linfo_string5:
+	.asciz	"__ARRAY_SIZE_TYPE__"   # string offset=69
+	.section	.debug_abbrev,"",@progbits
+	.byte	1   # Abbreviation Code
+	.byte	17  # DW_TAG_compile_unit
+	.byte	1   # DW_CHILDREN_yes
+	.byte	37  # DW_AT_producer
+	.byte	14  # DW_FORM_strp
+	.byte	19  # DW_AT_language
+	.byte	5   # DW_FORM_data2
+	.byte	3   # DW_AT_name
+	.byte	14  # DW_FORM_strp
+	.byte	16

[Lldb-commits] [PATCH] D55859: noexternal 2/2: symbols.enable-external-lookup=false on all hosts (not just OSX)

2018-12-21 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision.
labath added inline comments.
This revision is now accepted and ready to land.



Comment at: source/Core/ModuleList.cpp:72
  {},
  "Control the use of external tools or libraries to locate symbol files. "
+ "Directories listed in target.debug-file-search-paths and directory of "

My main issue here was with the "tools or libraries" part of this description 
-- we're not using any special tools or libraries when looking in 
/usr/lib/debug.

Maybe just say that this is controls whether we use "external sources" when 
searching for symbols. The rest of the description is fine (though I would just 
drop the ifdefs and print everything everywhere).


Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55859/new/

https://reviews.llvm.org/D55859



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D55318: [Expressions] Add support of expressions evaluation in some object's context

2018-12-21 Thread Aleksandr Urakov via Phabricator via lldb-commits
aleksandr.urakov added a comment.

Ping! What do you think about this?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55318/new/

https://reviews.llvm.org/D55318



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D55995: [lldb] - Fix compilation with MSVS 2015 update 3

2018-12-21 Thread George Rimar via Phabricator via lldb-commits
grimar created this revision.
grimar added reviewers: clayborg, LLDB.

Currently, lldb fails to build with the following errors when MSVS update 3 is 
used:

> fatal error C1001: An internal error has occurred in the compiler.
>  (compiler file 'msc1.cpp', line 1468)
>  To work around this problem, try simplifying or changing the program near 
> the locations listed above.

Seems it is relative with the `constexpr`. This patch simplifies the code a bit 
and allows it to compile and run.


https://reviews.llvm.org/D55995

Files:
  include/lldb/Target/Target.h
  source/Commands/CommandObjectBreakpointCommand.cpp
  source/Commands/CommandObjectCommands.cpp
  source/Commands/CommandObjectExpression.cpp
  source/Commands/CommandObjectTarget.cpp
  source/Commands/CommandObjectThread.cpp
  source/Commands/CommandObjectWatchpointCommand.cpp
  source/Core/Debugger.cpp
  source/Interpreter/OptionGroupWatchpoint.cpp
  source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
  source/Target/Target.cpp

Index: source/Target/Target.cpp
===
--- source/Target/Target.cpp
+++ source/Target/Target.cpp
@@ -63,8 +63,6 @@
 using namespace lldb;
 using namespace lldb_private;
 
-constexpr std::chrono::milliseconds EvaluateExpressionOptions::default_timeout;
-
 Target::Arch::Arch(const ArchSpec &spec)
 : m_spec(spec),
   m_plugin_up(PluginManager::CreateArchitectureInstance(spec)) {}
@@ -3130,7 +3128,7 @@
 //--
 
 // clang-format off
-static constexpr OptionEnumValueElement g_dynamic_value_types[] = {
+static const OptionEnumValueElement g_dynamic_value_types[] = {
 {eNoDynamicValues, "no-dynamic-values",
  "Don't calculate the dynamic type of values"},
 {eDynamicCanRunTarget, "run-target", "Calculate the dynamic type of values "
@@ -3142,7 +3140,7 @@
   return OptionEnumValues(g_dynamic_value_types);
 }
 
-static constexpr OptionEnumValueElement g_inline_breakpoint_enums[] = {
+static const OptionEnumValueElement g_inline_breakpoint_enums[] = {
 {eInlineBreakpointsNever, "never", "Never look for inline breakpoint "
"locations (fastest). This setting "
"should only be used if you know that "
@@ -3161,16 +3159,16 @@
   eX86DisFlavorATT
 } x86DisassemblyFlavor;
 
-static constexpr OptionEnumValueElement g_x86_dis_flavor_value_types[] = {
+static const OptionEnumValueElement g_x86_dis_flavor_value_types[] = {
 {eX86DisFlavorDefault, "default", "Disassembler default (currently att)."},
 {eX86DisFlavorIntel, "intel", "Intel disassembler flavor."},
 {eX86DisFlavorATT, "att", "AT&T disassembler flavor."} };
 
-static constexpr OptionEnumValueElement g_hex_immediate_style_values[] = {
+static const OptionEnumValueElement g_hex_immediate_style_values[] = {
 {Disassembler::eHexStyleC, "c", "C-style (0x)."},
 {Disassembler::eHexStyleAsm, "asm", "Asm-style (0h)."} };
 
-static constexpr OptionEnumValueElement g_load_script_from_sym_file_values[] = {
+static const OptionEnumValueElement g_load_script_from_sym_file_values[] = {
 {eLoadScriptFromSymFileTrue, "true",
  "Load debug scripts inside symbol files"},
 {eLoadScriptFromSymFileFalse, "false",
@@ -3178,7 +3176,7 @@
 {eLoadScriptFromSymFileWarn, "warn",
  "Warn about debug scripts inside symbol files but do not load them."} };
 
-static constexpr
+static const
 OptionEnumValueElement g_load_current_working_dir_lldbinit_values[] = {
 {eLoadCWDlldbinitTrue, "true",
  "Load .lldbinit files from current directory"},
@@ -3187,7 +3185,7 @@
 {eLoadCWDlldbinitWarn, "warn",
  "Warn about loading .lldbinit files from current directory"} };
 
-static constexpr OptionEnumValueElement g_memory_module_load_level_values[] = {
+static const OptionEnumValueElement g_memory_module_load_level_values[] = {
 {eMemoryModuleLoadLevelMinimal, "minimal",
  "Load minimal information when loading modules from memory. Currently "
  "this setting loads sections only."},
@@ -3198,7 +3196,7 @@
  "Load complete information when loading modules from memory. Currently "
  "this setting loads sections and all symbols."} };
 
-static constexpr PropertyDefinition g_properties[] = {
+static const PropertyDefinition g_properties[] = {
 {"default-arch", OptionValue::eTypeArch, true, 0, nullptr, {},
  "Default architecture to choose, when there's a choice."},
 {"move-to-nearest-code", OptionValue::eTypeBoolean, false, true, nullptr,
@@ -3486,7 +3484,7 @@
 //--
 // TargetProperties
 //--
-static constexpr PropertyDefinition g_experimental_properties[]{
+static const PropertyDefinition g_experimental_properties[]{
 {"inject-local-vars", OptionValue::eTypeBoolea

[Lldb-commits] [PATCH] D55998: ELF: create "container" sections from PT_LOAD segments

2018-12-21 Thread Pavel Labath via Phabricator via lldb-commits
labath created this revision.
labath added reviewers: clayborg, jankratochvil, krytarowski, joerg.
Herald added subscribers: arichardson, emaste.
Herald added a reviewer: espindola.

This is the result of the discussion in D55356 
, where it was suggested
as a solution to representing the addresses that logically belong to a
module in memory, but are not a part of any of its sections.

The ELF PT_LOAD segments are similar to the MachO "load commands",
except that the relationship between them and the object file sections
is a bit weaker. While in the MachO case, the sections belonging to a
specific segment are placed directly inside it in the object file
logical structur, in the ELF case, the sections and segments form two
separate hierarchies. This means that it is in theory possible to create
an elf file where only a part of a section would belong to some segment
(and another part to a different one). However, I am not aware of any
tool which would produce such a file (and most tools will have problems
ingesting them), so this means it is still possible to follow the MachO
model and make sections children of the PT_LOAD segments.

In case we run into (corrupt?) files with overlapping sections, I have
added code (and tests) which adjusts the sizes and/or drops the offending
sections in order to present a reasonable image to the upper layers of
LLDB. This is mostly done for completeness, as I don't anticipate
running into this situation in the real world. However, if we do run
into it, and the current behavior is not suitable for some reason, we
can implement this logic differently.


https://reviews.llvm.org/D55998

Files:
  lit/Modules/ELF/Inputs/PT_LOAD-overlap-section.elf
  lit/Modules/ELF/PT_LOAD-empty.yaml
  lit/Modules/ELF/PT_LOAD-overlap-PT_INTERP.yaml
  lit/Modules/ELF/PT_LOAD-overlap-section.yaml
  lit/Modules/ELF/PT_LOAD-overlap.yaml
  lit/Modules/ELF/PT_LOAD.yaml
  lit/Modules/ELF/section-overlap.yaml
  lit/Modules/ELF/section-permissions.yaml
  lit/Modules/ELF/section-types.yaml
  source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
  source/Plugins/ObjectFile/ELF/ObjectFileELF.h

Index: source/Plugins/ObjectFile/ELF/ObjectFileELF.h
===
--- source/Plugins/ObjectFile/ELF/ObjectFileELF.h
+++ source/Plugins/ObjectFile/ELF/ObjectFileELF.h
@@ -226,6 +226,8 @@
   /// Returns the index of the given section header.
   size_t SectionIndex(const SectionHeaderCollConstIter &I) const;
 
+  lldb::user_id_t SegmentID(size_t PHdrIndex) const { return ~PHdrIndex; }
+
   // Parses the ELF program headers.
   static size_t GetProgramHeaderInfo(ProgramHeaderColl &program_headers,
  lldb_private::DataExtractor &object_data,
Index: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
===
--- source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -30,6 +30,7 @@
 #include "lldb/Utility/Stream.h"
 #include "lldb/Utility/Timer.h"
 
+#include "llvm/ADT/IntervalMap.h"
 #include "llvm/ADT/PointerUnion.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/Object/Decompressor.h"
@@ -824,7 +825,8 @@
 // Iterate through the object file sections to find all of the sections
 // that have SHF_ALLOC in their flag bits.
 SectionSP section_sp(section_list->GetSectionAtIndex(sect_idx));
-if (section_sp && section_sp->Test(SHF_ALLOC)) {
+if (section_sp->Test(SHF_ALLOC) ||
+section_sp->GetType() == eSectionTypeContainer) {
   lldb::addr_t load_addr = section_sp->GetFileAddress();
   // We don't want to update the load address of a section with type
   // eSectionTypeAbsoluteAddress as they already have the absolute load
@@ -1823,74 +1825,188 @@
   return Perm;
 }
 
+static Permissions GetPermissions(const ELFProgramHeader &H) {
+  Permissions Perm = Permissions(0);
+  if (H.p_flags & PF_R)
+Perm |= ePermissionsReadable;
+  if (H.p_flags & PF_W)
+Perm |= ePermissionsWritable;
+  if (H.p_flags & PF_X)
+Perm |= ePermissionsExecutable;
+  return Perm;
+}
+
 namespace {
+
+struct SegmentAddressInfo {
+  addr_t Address;
+  addr_t Size;
+};
+
+struct SectionAddressInfo {
+  SectionSP Segment;
+  addr_t Address;
+  addr_t Size;
+};
+
 // (Unlinked) ELF object files usually have 0 for every section address, meaning
 // we need to compute synthetic addresses in order for "file addresses" from
 // different sections to not overlap. This class handles that logic.
 class VMAddressProvider {
-  bool m_synthesizing;
-  addr_t m_next;
+  using VMMap = llvm::IntervalMap>;
 
-public:
-  VMAddressProvider(ObjectFile::Type Type)
-  : m_synthesizing(Type == ObjectFile::Type::eTypeObjectFile), m_next(0) {}
+  ObjectFile::Type ObjectType;
+  addr_t NextVMAddress = 0;
+  VMMap::Allocator Alloc;
+  VMMap Segments = VMMap(Alloc);
+  VMMap S

[Lldb-commits] [PATCH] D55142: Minidump debugging using the native PDB reader

2018-12-21 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment.

Some interesting ideas here. I like some of them, but I have reservations about 
others. I'm going to go through them one by one.

In D55142#1333077 , @zturner wrote:

> I thought about what my "ideal" design would look like.  I'm not suggesting 
> anyone should actually go off and do this, but since we're brainstorming 
> design anyway, it doesn't hurt to consider what an optimal one should look 
> like (and for the record, there may be things I haven't considered that cuase 
> this design to not work or be suboptimal or not work at all).  Just throwing 
> it out there.
>
> 1. Rename `ObjectFile` to `ModuleFile` to indicate that a) it makes no sense 
> without a Module, and b) it doesn't make sense for symbol-only files.


This is the one I have most problems with, actually, as it goes against my 
"ideal" design. I would actually like to have ObjectFile (or whatever it's 
called) be completely independent of the Module class. The motivation for this 
is, unsurprisingly, lldb-server, which needs to have access to very lightweight 
info about an object file (on the level of: UUID, architecture, maybe entry 
point, etc.), but nothing like the fancy interface the Module class provides. 
So ideally, I'd like for the ObjectFile to live on a completely different 
level, so that it can be used in lldb-server without pulling in Module and 
everything that goes with it. So, I don't agree with your (a) goal here. The 
(b) goal seems completely reasonable though.

> 
> 
> 2. Rename `SymbolVendor` to `SymbolFileLocator`.  Mostly cosmetic, but more 
> clearly differentiates the responsibilities of the two classes.  (e.g. 
> wouldn't you expect SymbolFiles to be able to "vend" symbols)?

+1000. It has always bugged me that SymbolVendor has all these methods that 
don't do anything and just forward their arguments to the SymbolFile (after 
performing a dozen null checks). I think it would be better if the symbol file 
interface was called directly. If some SymbolVendor/SymbolLocator ever wants to 
take an existing SymbolFile and alter its behavior slightly, it can always use 
the composition pattern and return it's own delegating SymbolFile object 
instead.

> 
> 
> 3. `SymbolFileLocator` returns a `unique_ptr`.  Nothing more.  It 
> has no other methods.

That seems to be the logical consequence of the previous item.

> 
> 
> 4. `Target` contains a `vector>` as well as 
> methods `AddSymbolFileLocator(unique_ptr)` and 
> `unique_ptr LocateSymboleFile(Module&)`.  The former gives things 
> like the Platform or Process the ability to customize the behavior.  The 
> latter, when called, will iterate through the list of `SymbolFileLocators`, 
> trying to find one that works.

I am not sure if `Target` is a good receptacle for this functionality, because 
one of lldb's goals (which seems completely reasonable to me) is to be able to 
reuse the same Module instance if the module happens to be loaded in multiple 
targets. If the target is responsible for locating the symbol files, then this 
opens the door for one target to unwittingly alter the symbols of another 
target. One way to get out of this would be to say that targets share a Module 
only if they (independently) choose the same symbol file. This might enable us 
to also solve the current problem, where "target symbols add" executed in one 
debugger, alters the behavior of another debugger instance. Another would be to 
store the list of SymbolLocators in a more global place. This would actually be 
pretty similar to what we have now.

> 
> 
> 5. `Module` contains a `unique_ptr`.  When `GetSymbolFile()` is 
> called for the first time, it calls `Target::LocateSymbolFile(*this)` and 
> updates its member variable.

Nothing to argue about here.

> 
> 
> 6. `ModuleFile` is updated to support "capabilities" much like `SymbolFile` 
> is today.  One of these capabilities can be "has unwind info".  Likewise, 
> "has unwind info is added to `SymbolFile` capabilities as well.  `Module` can 
> then select the best provider of unwind info using this approach.

I don't believe a single bit is enough to describe the suitability of unwind 
info, as the choice of unwind strategy may vary from function to function and 
depend on other circumstances too (e.g., whether we are stopped at a call 
site). Instead, I'd try to have much more granular capabilities. E.g., one of 
those capabilities might be "has function boundaries". Then if either entity 
provides the information about function boundaries, the Module can create an 
InstructionEmulationUnwinder, which uses these boundaries to create emulated 
unwind plans. And even this capability might not be just a "bit", but rather a 
pooling of function boundary information gathered from various sources.

> And finally
> 
> 7. `SymbolFile` now stores a variable `m_module` instead of `m_obj_file` 
> since this is usually what the `SymbolFile` requires anyway, and it also 
> e

[Lldb-commits] [PATCH] D55998: ELF: create "container" sections from PT_LOAD segments

2018-12-21 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added inline comments.



Comment at: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:1841-1844
+struct SegmentAddressInfo {
+  addr_t Address;
+  addr_t Size;
+};

Use existing range code from Range.h?
```
#include "lldb/Utility/Range.h"
typedef Range SegmentAddressInfo;
```




Comment at: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:1846-1850
+struct SectionAddressInfo {
+  SectionSP Segment;
+  addr_t Address;
+  addr_t Size;
+};

Use SegmentAddressInfo using either of:

```
struct SectionAddressInfo : public SegmentAddressInfo {
  SectionSP Segment;
};
```
or 
```
struct SectionAddressInfo {
  SegmentAddressInfo Range;
  SectionSP Segment;
};
```



Comment at: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:1954
+
+ConstString Name(("PT_LOAD" + llvm::Twine(LoadID++)).str());
+uint32_t Log2Align = llvm::Log2_64(std::max(PHdr.p_align, 1));

Maybe add square brackets around section name? "PT_LOAD[0]" "PT_LOAD[1]"? I am 
fine either way, just throwing this out there



Comment at: source/Plugins/ObjectFile/ELF/ObjectFileELF.h:229
 
+  lldb::user_id_t SegmentID(size_t PHdrIndex) const { return ~PHdrIndex; }
+

Make this static and move to ObjectFileElf.cpp? It doesn't need to be a method.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55998/new/

https://reviews.llvm.org/D55998



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D55995: [lldb] - Fix compilation with MSVS 2015 update 3

2018-12-21 Thread Greg Clayton via Phabricator via lldb-commits
clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

The changes from "constexpr" to "const" might introduce global constructors in 
the shared library which is what we were trying to avoid. The less work that 
the LLDB shared library does on load the better. We might need to use a macro 
that expands to "constexpr" for non windows and to "const" for windows in a 
private LLDB header (PropertyDefinition.h?)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55995/new/

https://reviews.llvm.org/D55995



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D55991: DWARF: Fix a bug in array size computation

2018-12-21 Thread Greg Clayton via Phabricator via lldb-commits
clayborg requested changes to this revision.
clayborg added inline comments.
This revision now requires changes to proceed.



Comment at: source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp:619
+  case DW_FORM_ref_addr:
+  case DW_FORM_ref_sig8:
+  case DW_FORM_GNU_ref_alt:

DW_FORM_ref_sig8 is a type signature and shouldn't be returned as a valid DWARF 
DIE reference. In the .debug_types patch, this uses m_cu to get to the debug 
info and uses the type signature to DWARF offset map to return a valid 
.debug_info offset. If the DWARF is older where we have both .debug_info and 
.debug_types. we add the size of the .debug_info to the result since we 
concatenate the .debug_info and .debug_types and treat it as one large DWARF 
section



Comment at: source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp:620
+  case DW_FORM_ref_sig8:
+  case DW_FORM_GNU_ref_alt:
+return die_offset;

Not sure that this is, but if it isn't an absolute .debug_info offset, then we 
shouldn't return it here



Comment at: source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp:639
+  case DW_FORM_ref_addr:
+  case DW_FORM_ref_sig8:
+  case DW_FORM_GNU_ref_alt:

Ditto above



Comment at: source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp:641
+  case DW_FORM_GNU_ref_alt:
+return die_offset;
 

Ditto above


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55991/new/

https://reviews.llvm.org/D55991



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r349926 - Don't duplicate the logic that detects if a section can/should be loaded (NFC)

2018-12-21 Thread Greg Clayton via lldb-commits
Author: gclayton
Date: Fri Dec 21 09:04:18 2018
New Revision: 349926

URL: http://llvm.org/viewvc/llvm-project?rev=349926&view=rev
Log:
Don't duplicate the logic that detects if a section can/should be loaded (NFC)

Prior to this there were 3 places that were duplicating the logic to detect if 
a section can/should be loaded and some were doing things a bit differently. 
Now it is all centralized in one place and it is done correctly.


Modified:
lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h

Modified: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp?rev=349926&r1=349925&r2=349926&view=diff
==
--- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Fri Dec 21 
09:04:18 2018
@@ -958,6 +958,11 @@ const ConstString &ObjectFileMachO::GetS
   return g_section_name_LINKEDIT;
 }
 
+const ConstString &ObjectFileMachO::GetSegmentNameDWARF() {
+  static ConstString g_section_name("__DWARF");
+  return g_section_name;
+}
+
 const ConstString &ObjectFileMachO::GetSectionNameEHFrame() {
   static ConstString g_section_name_eh_frame("__eh_frame");
   return g_section_name_eh_frame;
@@ -5979,51 +5984,52 @@ Section *ObjectFileMachO::GetMachHeaderS
   // the mach-o file which can be subtracted from the vmaddr of the other
   // segments found in memory and added to the load address
   ModuleSP module_sp = GetModule();
-  if (module_sp) {
-SectionList *section_list = GetSectionList();
-if (section_list) {
-  lldb::addr_t mach_base_file_addr = LLDB_INVALID_ADDRESS;
-  const size_t num_sections = section_list->GetSize();
-
-  for (size_t sect_idx = 0; sect_idx < num_sections &&
-mach_base_file_addr == LLDB_INVALID_ADDRESS;
-   ++sect_idx) {
-Section *section = section_list->GetSectionAtIndex(sect_idx).get();
-if (section && section->GetFileSize() > 0 &&
-section->GetFileOffset() == 0 && !section->IsThreadSpecific() &&
-module_sp.get() == section->GetModule().get()) {
-  return section;
-}
-  }
-}
+  if (!module_sp)
+return nullptr;
+  SectionList *section_list = GetSectionList();
+  if (!section_list)
+return nullptr;
+  const size_t num_sections = section_list->GetSize();
+  for (size_t sect_idx = 0; sect_idx < num_sections; ++sect_idx) {
+Section *section = section_list->GetSectionAtIndex(sect_idx).get();
+if (section->GetFileOffset() == 0 && SectionIsLoadable(section))
+  return section;
   }
   return nullptr;
 }
 
+bool ObjectFileMachO::SectionIsLoadable(const Section *section) {
+  if (!section)
+return false;
+  const bool is_dsym = (m_header.filetype == MH_DSYM);
+  if (section->GetFileSize() == 0 && !is_dsym)
+return false;
+  if (section->IsThreadSpecific())
+return false;
+  if (GetModule().get() != section->GetModule().get())
+return false;
+  // Be careful with __LINKEDIT and __DWARF segments
+  if (section->GetName() == GetSegmentNameLINKEDIT() ||
+  section->GetName() == GetSegmentNameDWARF()) {
+// Only map __LINKEDIT and __DWARF if we have an in memory image and
+// this isn't a kernel binary like a kext or mach_kernel.
+const bool is_memory_image = (bool)m_process_wp.lock();
+const Strata strata = GetStrata();
+if (is_memory_image == false || strata == eStrataKernel)
+  return false;
+  }
+  return true;
+}
+
 lldb::addr_t ObjectFileMachO::CalculateSectionLoadAddressForMemoryImage(
-lldb::addr_t mach_header_load_address, const Section *mach_header_section,
+lldb::addr_t header_load_address, const Section *header_section,
 const Section *section) {
   ModuleSP module_sp = GetModule();
-  if (module_sp && mach_header_section && section &&
-  mach_header_load_address != LLDB_INVALID_ADDRESS) {
-lldb::addr_t mach_header_file_addr = mach_header_section->GetFileAddress();
-if (mach_header_file_addr != LLDB_INVALID_ADDRESS) {
-  if (section && section->GetFileSize() > 0 &&
-  !section->IsThreadSpecific() &&
-  module_sp.get() == section->GetModule().get()) {
-// Ignore __LINKEDIT and __DWARF segments
-if (section->GetName() == GetSegmentNameLINKEDIT()) {
-  // Only map __LINKEDIT if we have an in memory image and this isn't a
-  // kernel binary like a kext or mach_kernel.
-  const bool is_memory_image = (bool)m_process_wp.lock();
-  const Strata strata = GetStrata();
-  if (!is_memory_image || strata == eStrataKernel)
-return LLDB_INVALID_ADDRESS;
-}
-return section->GetFileAddress() - mach_header_file_addr +
-   mach_heade

[Lldb-commits] [PATCH] D56010: [NativePDB] Fix setting breakpoint by file and line

2018-12-21 Thread Zachary Turner via Phabricator via lldb-commits
zturner created this revision.
zturner added reviewers: aleksandr.urakov, lemo, labath, amccarth.
Herald added a subscriber: arphaman.

  There were several problems preventing this from working.  The
  first is that when the PDB had an absolute path to the main
  source file, we would construct an invalid path by prepending the
  compilation directory to it anyway.  So we needed to check if the
  path is already absolute first.
  
  Second, LLDB assumes that the zero'th item in the support file list
  is the main compilation unit.  We were respecting this requirement,
  but LLDB *also* requires that file to appear somewhere in the list
  starting from index 1 as well.  So the main compilation file should
  appear in the support file list twice.  And when parsing a line
  table, it expects the LineEntry records to be constructed using
  the 1-based index.  With these two fixes we can now set breakpoints
  by file and line using the native PDB reader.


https://reviews.llvm.org/D56010

Files:
  lldb/lit/SymbolFile/NativePDB/Inputs/break-by-function.lldbinit
  lldb/lit/SymbolFile/NativePDB/Inputs/break-by-line.lldbinit
  lldb/lit/SymbolFile/NativePDB/Inputs/breakpoints.lldbinit
  lldb/lit/SymbolFile/NativePDB/break-by-function.cpp
  lldb/lit/SymbolFile/NativePDB/break-by-line.cpp
  lldb/lit/SymbolFile/NativePDB/simple-breakpoints.cpp
  lldb/source/Plugins/SymbolFile/NativePDB/CompileUnitIndex.cpp
  lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
  lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h

Index: lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
===
--- lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
+++ lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
@@ -104,6 +104,8 @@
   size_t ParseTypes(const SymbolContext &sc) override;
   size_t ParseVariablesForContext(const SymbolContext &sc) override;
 
+  void AddSymbols(Symtab &symtab) override;
+
   CompilerDecl GetDeclForUID(lldb::user_id_t uid) override;
   CompilerDeclContext GetDeclContextForUID(lldb::user_id_t uid) override;
   CompilerDeclContext GetDeclContextContainingUID(lldb::user_id_t uid) override;
@@ -116,6 +118,10 @@
   uint32_t ResolveSymbolContext(const Address &so_addr,
 lldb::SymbolContextItem resolve_scope,
 SymbolContext &sc) override;
+  uint32_t ResolveSymbolContext(const FileSpec &file_spec, uint32_t line,
+bool check_inlines,
+lldb::SymbolContextItem resolve_scope,
+SymbolContextList &sc_list) override;
 
   size_t GetTypes(SymbolContextScope *sc_scope, lldb::TypeClass type_mask,
   TypeList &type_list) override;
Index: lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
===
--- lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
+++ lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
@@ -875,6 +875,8 @@
   return TranslateLanguage(item->m_compile_opts->getLanguage());
 }
 
+void SymbolFileNativePDB::AddSymbols(Symtab &symtab) { return; }
+
 size_t SymbolFileNativePDB::ParseCompileUnitFunctions(const SymbolContext &sc) {
   lldbassert(sc.comp_unit);
   return false;
@@ -949,6 +951,12 @@
   return resolved_flags;
 }
 
+uint32_t SymbolFileNativePDB::ResolveSymbolContext(
+const FileSpec &file_spec, uint32_t line, bool check_inlines,
+lldb::SymbolContextItem resolve_scope, SymbolContextList &sc_list) {
+  return 0;
+}
+
 static void AppendLineEntryToSequence(LineTable &table, LineSequence &sequence,
   const CompilandIndexItem &cci,
   lldb::addr_t base_addr,
@@ -1037,7 +1045,9 @@
   // LLDB wants the index of the file in the list of support files.
   auto fn_iter = llvm::find(cci->m_file_list, *efn);
   lldbassert(fn_iter != cci->m_file_list.end());
-  uint32_t file_index = std::distance(cci->m_file_list.begin(), fn_iter);
+  // LLDB support file indices are 1-based.
+  uint32_t file_index =
+  1 + std::distance(cci->m_file_list.begin(), fn_iter);
 
   std::unique_ptr sequence(
   line_table->CreateLineSequenceContainer());
@@ -1082,6 +1092,13 @@
 support_files.Append(spec);
   }
 
+  llvm::SmallString<64> main_source_file =
+  m_index->compilands().GetMainSourceFile(*cci);
+  FileSpec::Style style = main_source_file.startswith("/")
+  ? FileSpec::Style::posix
+  : FileSpec::Style::windows;
+  FileSpec spec(main_source_file, style);
+  support_files.Insert(0, spec);
   return true;
 }
 
Index: lldb/source/Plugins/SymbolFile/NativePDB/CompileUnitIndex.cpp
===
--- lldb/source/Plu

[Lldb-commits] [PATCH] D55991: DWARF: Fix a bug in array size computation

2018-12-21 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment.

Hm.. I can't say I have given much thought about this beforehand, as I just 
copied this code from llvm. However, now that I did think about it, I believe 
the current implementation makes sense. Nothing about DWARFFormValue::Reference 
(well, except the local variable name, which I guess I should rename) says it 
must return a DIE offset. `DW_FORM_ref_sig8` is not a die offset, but it is 
certainly a DIE reference, albeit one that must be resolved in a more 
complicated way. This is also the view taken by the DWARF 5 spec (section 7.5.5 
"Classes and Forms" lists `DW_FORM_ref_sig8` as a reference form). And I expect 
this is the what the llvm implementation is based on.

So, in order to minimize confusion, I think we should stick to this definition. 
The code for resolving the more complex reference forms can live in some higher 
level code (`DWARFDIE::GetReferencedDie` ?), where it will be in a better 
position to locate and extract the DIE from other sections/object files.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55991/new/

https://reviews.llvm.org/D55991



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D56010: [NativePDB] Fix setting breakpoint by file and line

2018-12-21 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment.

LGTM


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56010/new/

https://reviews.llvm.org/D56010



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D56014: [lldb] - Fix crash when listing the history with the key up.

2018-12-21 Thread George Rimar via Phabricator via lldb-commits
grimar created this revision.
grimar added reviewers: LLDB, clayborg.

This is https://bugs.llvm.org/show_bug.cgi?id=40112,

Currently, lldb crashes after pressing the up arrow key when listing the 
history for expressions.

The patch fixes the mistype that was a reason.


https://reviews.llvm.org/D56014

Files:
  source/Host/common/Editline.cpp


Index: source/Host/common/Editline.cpp
===
--- source/Host/common/Editline.cpp
+++ source/Host/common/Editline.cpp
@@ -443,7 +443,7 @@
 m_live_history_lines = m_input_lines;
 m_in_history = true;
   } else {
-if (history_w(pHistory, &history_event, earlier ? H_NEXT : H_PREV) == -1) {
+if (history_w(pHistory, &history_event, earlier ? H_PREV : H_NEXT) == -1) {
   // Can't move earlier than the earliest entry
   if (earlier)
 return CC_ERROR;


Index: source/Host/common/Editline.cpp
===
--- source/Host/common/Editline.cpp
+++ source/Host/common/Editline.cpp
@@ -443,7 +443,7 @@
 m_live_history_lines = m_input_lines;
 m_in_history = true;
   } else {
-if (history_w(pHistory, &history_event, earlier ? H_NEXT : H_PREV) == -1) {
+if (history_w(pHistory, &history_event, earlier ? H_PREV : H_NEXT) == -1) {
   // Can't move earlier than the earliest entry
   if (earlier)
 return CC_ERROR;
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D55318: [Expressions] Add support of expressions evaluation in some object's context

2018-12-21 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment.

The only reservation I have is that this really ought to work correctly for 
ObjC as well as C++, and there's code to support that, but it isn't tested.  I 
don't have time to write ObjC tests before the new year for sure.  Is it 
possible to rope somebody else into that?  If that's not possible, maybe check 
it in with the ObjC support off and a big FIXME and file a bug to re-enable 
that support with tests.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55318/new/

https://reviews.llvm.org/D55318



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D56014: [lldb] - Fix crash when listing the history with the key up.

2018-12-21 Thread Davide Italiano via Phabricator via lldb-commits
davide added a comment.

testcase?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56014/new/

https://reviews.llvm.org/D56014



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r349946 - [lldbsuite] Skip flakey Windows tests

2018-12-21 Thread Stella Stamenova via lldb-commits
Author: stella.stamenova
Date: Fri Dec 21 12:10:45 2018
New Revision: 349946

URL: http://llvm.org/viewvc/llvm-project?rev=349946&view=rev
Log:
[lldbsuite] Skip flakey Windows tests

Skip a number of tests on Windows that are flakey and will pass/fail 
unexpectedly every dozen or so runs.

Modified:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/memory/cache/TestMemoryCache.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/TestExitDuringStep.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/num_threads/TestNumThreads.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/TestThreadExit.py

lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespaceLookup.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/memory/cache/TestMemoryCache.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/memory/cache/TestMemoryCache.py?rev=349946&r1=349945&r2=349946&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/memory/cache/TestMemoryCache.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/memory/cache/TestMemoryCache.py
 Fri Dec 21 12:10:45 2018
@@ -24,6 +24,7 @@ class MemoryCacheTestCase(TestBase):
 # Find the line number to break inside main().
 self.line = line_number('main.cpp', '// Set break point at this line.')
 
+@skipIfWindows # This is flakey on Windows: llvm.org/pr38373
 def test_memory_cache(self):
 """Test the MemoryCache class with a sequence of 'memory read' and 
'memory write' operations."""
 self.build()

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/TestExitDuringStep.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/TestExitDuringStep.py?rev=349946&r1=349945&r2=349946&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/TestExitDuringStep.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/TestExitDuringStep.py
 Fri Dec 21 12:10:45 2018
@@ -27,6 +27,7 @@ class ExitDuringStepTestCase(TestBase):
 True)
 
 @skipIfFreeBSD  # llvm.org/pr21411: test is hanging
+@skipIfWindows # This is flakey on Windows: llvm.org/pr38373
 def test_step_over(self):
 """Test thread exit during step-over handling."""
 self.build(dictionary=self.getBuildFlags())

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py?rev=349946&r1=349945&r2=349946&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py
 Fri Dec 21 12:10:45 2018
@@ -32,9 +32,7 @@ class MultipleBreakpointTestCase(TestBas
 @expectedFailureAll(
 oslist=["freebsd"],
 bugnumber="llvm.org/pr18190 thread states not properly maintained")
-@expectedFailureAll(
-oslist=["windows"],
-bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
+@skipIfWindows # This is flakey on Windows: llvm.org/pr24668, 
llvm.org/pr38373
 def test(self):
 """Test simultaneous breakpoints in multiple threads."""
 self.build(dictionary=self.getBuildFlags())

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/num_threads/TestNumThreads.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/num_threads/TestNumThreads.py?rev=349946&r1=349945&r2=349946&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/num_threads/TestNumThreads.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/num_threads/TestNumThreads.py
 Fri Dec 21 12:10:45 2018
@@ -64,7 +64,7 @@ class NumberOfThreadsTestCase(TestBase):
 'Number of expected threads and actual threads do not match.')
 
 @skipIfDarwin # rdar://33462362
-@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr37658")
+@skipIfWindows # This is flakey on Windows: llvm.org/pr37658, 
llvm.

[Lldb-commits] [PATCH] D55859: noexternal 2/2: symbols.enable-external-lookup=false on all hosts (not just OSX)

2018-12-21 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil updated this revision to Diff 179349.

Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55859/new/

https://reviews.llvm.org/D55859

Files:
  packages/Python/lldbsuite/test/tools/lldb-mi/lldbmi_testcase.py
  
packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/TestMiStartupOptions.py
  
packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/start_script_error
  source/Core/ModuleList.cpp
  source/Host/common/Symbols.cpp
  source/Target/Target.cpp

Index: source/Target/Target.cpp
===
--- source/Target/Target.cpp
+++ source/Target/Target.cpp
@@ -3232,7 +3232,8 @@
  "whose paths don't match the local file system."},
 {"debug-file-search-paths", OptionValue::eTypeFileSpecList, false, 0,
  nullptr, {},
- "List of directories to be searched when locating debug symbol files."},
+ "List of directories to be searched when locating debug symbol files. "
+ "See also symbols.enable-external-lookup."},
 {"clang-module-search-paths", OptionValue::eTypeFileSpecList, false, 0,
  nullptr, {},
  "List of directories to be searched when locating modules for Clang."},
Index: source/Host/common/Symbols.cpp
===
--- source/Host/common/Symbols.cpp
+++ source/Host/common/Symbols.cpp
@@ -247,6 +247,8 @@
   return result;
 }
 
+// Keep "symbols.enable-external-lookup" description in sync with this function.
+
 FileSpec Symbols::LocateExecutableSymbolFile(const ModuleSpec &module_spec) {
   FileSpec symbol_file_spec = module_spec.GetSymbolFileSpec();
   if (symbol_file_spec.IsAbsolute() &&
@@ -270,30 +272,33 @@
   debug_file_search_paths.AppendIfUnique(file_spec);
 }
 
-// Add current working directory.
-{
-  FileSpec file_spec(".");
-  FileSystem::Instance().Resolve(file_spec);
-  debug_file_search_paths.AppendIfUnique(file_spec);
-}
+if (ModuleList::GetGlobalModuleListProperties().GetEnableExternalLookup()) {
+
+  // Add current working directory.
+  {
+FileSpec file_spec(".");
+FileSystem::Instance().Resolve(file_spec);
+debug_file_search_paths.AppendIfUnique(file_spec);
+  }
 
 #ifndef _WIN32
 #if defined(__NetBSD__)
-// Add /usr/libdata/debug directory.
-{
-  FileSpec file_spec("/usr/libdata/debug");
-  FileSystem::Instance().Resolve(file_spec);
-  debug_file_search_paths.AppendIfUnique(file_spec);
-}
+  // Add /usr/libdata/debug directory.
+  {
+FileSpec file_spec("/usr/libdata/debug");
+FileSystem::Instance().Resolve(file_spec);
+debug_file_search_paths.AppendIfUnique(file_spec);
+  }
 #else
-// Add /usr/lib/debug directory.
-{
-  FileSpec file_spec("/usr/lib/debug");
-  FileSystem::Instance().Resolve(file_spec);
-  debug_file_search_paths.AppendIfUnique(file_spec);
-}
+  // Add /usr/lib/debug directory.
+  {
+FileSpec file_spec("/usr/lib/debug");
+FileSystem::Instance().Resolve(file_spec);
+debug_file_search_paths.AppendIfUnique(file_spec);
+  }
 #endif
 #endif // _WIN32
+}
 
 std::string uuid_str;
 const UUID &module_uuid = module_spec.GetUUID();
Index: source/Core/ModuleList.cpp
===
--- source/Core/ModuleList.cpp
+++ source/Core/ModuleList.cpp
@@ -69,9 +69,16 @@
 static constexpr PropertyDefinition g_properties[] = {
 {"enable-external-lookup", OptionValue::eTypeBoolean, true, true, nullptr,
  {},
- "Control the use of external tools or libraries to locate symbol files. "
- "On macOS, Spotlight is used to locate a matching .dSYM bundle based on "
- "the UUID of the executable."},
+ "Control the use of external sources to locate symbol files. "
+ "Directories listed in target.debug-file-search-paths and directory of "
+ "the executable are always checked first for separate debug info files. "
+ "Then depending on this setting: "
+ "On macOS, Spotlight would be also used to locate a matching .dSYM "
+ "bundle based on the UUID of the executable. "
+ "On NetBSD, directory /usr/libdata/debug would be also searched. "
+ "On platforms other than NetBSD directory /usr/lib/debug would be "
+ "also searched."
+},
 {"clang-modules-cache-path", OptionValue::eTypeFileSpec, true, 0, nullptr,
  {},
  "The path to the clang modules cache directory (-fmodules-cache-path)."}};
Index: packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/start_script_error
===
--- packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/start_script_error
+++ packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/start_script_error
@@ -1,2 +1,3 @@
+settings set symbols.enable-external-lookup false
 -file-exec-and-symbols 

[Lldb-commits] [PATCH] D55859: noexternal 2/2: symbols.enable-external-lookup=false on all hosts (not just OSX)

2018-12-21 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil marked 2 inline comments as done.
jankratochvil added inline comments.



Comment at: source/Core/ModuleList.cpp:72
  {},
  "Control the use of external tools or libraries to locate symbol files. "
+ "Directories listed in target.debug-file-search-paths and directory of "

labath wrote:
> My main issue here was with the "tools or libraries" part of this description 
> -- we're not using any special tools or libraries when looking in 
> /usr/lib/debug.
> 
> Maybe just say that this is controls whether we use "external sources" when 
> searching for symbols. The rest of the description is fine (though I would 
> just drop the ifdefs and print everything everywhere).
The Spotlight on OSX was a bit unclear to me what it really does.  Doesn't it 
use some those "tools or libraries" to access the dSYM files downloaded from 
internet? But I have put there the "sources" word now as you wish.
Also rather added `See also symbols.enable-external-lookup.` to 
`target.debug-file-search-paths`.
I will check it in if there are no more replies in some time. Thanks for the 
approval.



Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55859/new/

https://reviews.llvm.org/D55859



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r349967 - [ExpressionParser] Reserve size before copying over args

2018-12-21 Thread Jonas Devlieghere via lldb-commits
Author: jdevlieghere
Date: Fri Dec 21 14:16:10 2018
New Revision: 349967

URL: http://llvm.org/viewvc/llvm-project?rev=349967&view=rev
Log:
[ExpressionParser] Reserve size before copying over args

We already know the final size here so we might as well reserve it so we
don't have to re-allocate during the loop.

Modified:
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp

Modified: 
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp?rev=349967&r1=349966&r2=349967&view=diff
==
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp 
(original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp 
Fri Dec 21 14:16:10 2018
@@ -608,7 +608,8 @@ ClangModulesDeclVendor::Create(Target &t
  new 
StoringDiagnosticConsumer);
 
   std::vector compiler_invocation_argument_cstrs;
-
+  compiler_invocation_argument_cstrs.reserve(
+  compiler_invocation_arguments.size());
   for (const std::string &arg : compiler_invocation_arguments) {
 compiler_invocation_argument_cstrs.push_back(arg.c_str());
   }


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D56027: [lldb] Fix ObjCExceptionRecognizedStackFrame to populate the list of recognized arguments

2018-12-21 Thread Kuba (Brecka) Mracek via Phabricator via lldb-commits
kubamracek created this revision.
kubamracek added a reviewer: jingham.
kubamracek added a project: LLDB.

Looks like ObjCExceptionRecognizedStackFrame is only vending the recognized 
exception via GetExceptionObject. It should also present it just as a regular 
recognized argument, i.e. populate the m_arguments field. Adding test.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D56027

Files:
  packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py
  source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp


Index: 
source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
===
--- source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -2630,6 +2630,9 @@
 exception = ValueObjectConstResult::Create(frame_sp.get(), value,
ConstString("exception"));
 exception = exception->GetDynamicValue(eDynamicDontRunTarget);
+  
+m_arguments = ValueObjectListSP(new ValueObjectList());
+m_arguments->Append(exception);
   }
 
   ValueObjectSP exception;
Index: packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py
===
--- packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py
+++ packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py
@@ -34,6 +34,17 @@
 'name: "ThrownException" - reason: "SomeReason"',
 ])
 
+target = self.dbg.GetSelectedTarget()
+thread = target.GetProcess().GetSelectedThread()
+frame = thread.GetSelectedFrame()
+
+opts = lldb.SBVariablesOptions()
+opts.SetIncludeRecognizedArguments(True)
+variables = frame.GetVariables(opts)
+
+self.assertEqual(variables.GetSize(), 1)
+self.assertEqual(variables.GetValueAtIndex(0).name, "exception")
+
 lldbutil.run_to_source_breakpoint(self, "// Set break point at this 
line.", lldb.SBFileSpec("main.mm"), launch_info=launch_info)
 
 self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,


Index: source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
===
--- source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -2630,6 +2630,9 @@
 exception = ValueObjectConstResult::Create(frame_sp.get(), value,
ConstString("exception"));
 exception = exception->GetDynamicValue(eDynamicDontRunTarget);
+  
+m_arguments = ValueObjectListSP(new ValueObjectList());
+m_arguments->Append(exception);
   }
 
   ValueObjectSP exception;
Index: packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py
===
--- packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py
+++ packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py
@@ -34,6 +34,17 @@
 'name: "ThrownException" - reason: "SomeReason"',
 ])
 
+target = self.dbg.GetSelectedTarget()
+thread = target.GetProcess().GetSelectedThread()
+frame = thread.GetSelectedFrame()
+
+opts = lldb.SBVariablesOptions()
+opts.SetIncludeRecognizedArguments(True)
+variables = frame.GetVariables(opts)
+
+self.assertEqual(variables.GetSize(), 1)
+self.assertEqual(variables.GetValueAtIndex(0).name, "exception")
+
 lldbutil.run_to_source_breakpoint(self, "// Set break point at this line.", lldb.SBFileSpec("main.mm"), launch_info=launch_info)
 
 self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r349970 - [Scalar] Implement operator!= using operator==.

2018-12-21 Thread Davide Italiano via lldb-commits
Author: davide
Date: Fri Dec 21 14:42:00 2018
New Revision: 349970

URL: http://llvm.org/viewvc/llvm-project?rev=349970&view=rev
Log:
[Scalar] Implement operator!= using operator==.

Summary: Adding some test coverage while I'm around.

Reviewers: JDevlieghere, aprantl, zturner, clayborg, jingham

Differential Revision: https://reviews.llvm.org/D56017

Modified:
lldb/trunk/source/Utility/Scalar.cpp
lldb/trunk/unittests/Utility/ScalarTest.cpp

Modified: lldb/trunk/source/Utility/Scalar.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/Scalar.cpp?rev=349970&r1=349969&r2=349970&view=diff
==
--- lldb/trunk/source/Utility/Scalar.cpp (original)
+++ lldb/trunk/source/Utility/Scalar.cpp Fri Dec 21 14:42:00 2018
@@ -2598,37 +2598,7 @@ bool lldb_private::operator==(const Scal
 }
 
 bool lldb_private::operator!=(const Scalar &lhs, const Scalar &rhs) {
-  // If either entry is void then we can just compare the types
-  if (lhs.m_type == Scalar::e_void || rhs.m_type == Scalar::e_void)
-return lhs.m_type != rhs.m_type;
-
-  Scalar
-  temp_value; // A temp value that might get a copy of either promoted 
value
-  const Scalar *a;
-  const Scalar *b;
-  llvm::APFloat::cmpResult result;
-  switch (PromoteToMaxType(lhs, rhs, temp_value, a, b)) {
-  case Scalar::e_void:
-break;
-  case Scalar::e_sint:
-  case Scalar::e_uint:
-  case Scalar::e_slong:
-  case Scalar::e_ulong:
-  case Scalar::e_slonglong:
-  case Scalar::e_ulonglong:
-  case Scalar::e_sint128:
-  case Scalar::e_uint128:
-  case Scalar::e_sint256:
-  case Scalar::e_uint256:
-return a->m_integer != b->m_integer;
-  case Scalar::e_float:
-  case Scalar::e_double:
-  case Scalar::e_long_double:
-result = a->m_float.compare(b->m_float);
-if (result != llvm::APFloat::cmpEqual)
-  return true;
-  }
-  return true;
+  return !(lhs == rhs);
 }
 
 bool lldb_private::operator<(const Scalar &lhs, const Scalar &rhs) {

Modified: lldb/trunk/unittests/Utility/ScalarTest.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Utility/ScalarTest.cpp?rev=349970&r1=349969&r2=349970&view=diff
==
--- lldb/trunk/unittests/Utility/ScalarTest.cpp (original)
+++ lldb/trunk/unittests/Utility/ScalarTest.cpp Fri Dec 21 14:42:00 2018
@@ -19,6 +19,33 @@
 using namespace lldb_private;
 using namespace llvm;
 
+template 
+bool checkInequality(T c1, T c2) {
+  return (Scalar(c1) != Scalar(c2));
+}
+
+template 
+bool checkEquality(T c1, T c2) {
+  return (Scalar(c1) == Scalar(c2));
+}
+
+TEST(ScalarTest, Equality) {
+  ASSERT_TRUE(checkInequality(23, 24));
+  ASSERT_TRUE(checkEquality(96, 96));
+  ASSERT_TRUE(checkInequality(4.0f, 4.5f));
+  ASSERT_TRUE(checkEquality(4.0f, 4.0f));
+  uint64_t apint1 = 234;
+  uint64_t apint2 = 246;
+  ASSERT_TRUE(checkInequality(APInt(64, apint1), APInt(64, apint2)));
+  ASSERT_TRUE(checkEquality(APInt(64, apint1), APInt(64, apint1)));
+
+  Scalar void1;
+  Scalar void2;
+  float f1 = 2.0;
+  ASSERT_TRUE(void1 == void2);
+  ASSERT_FALSE(void1 == Scalar(f1));
+}
+
 TEST(ScalarTest, RightShiftOperator) {
   int a = 0x1000;
   int b = 0x;


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r349971 - [Scalar] Simplify as Jonas suggested. NFCI.

2018-12-21 Thread Davide Italiano via lldb-commits
Author: davide
Date: Fri Dec 21 14:45:07 2018
New Revision: 349971

URL: http://llvm.org/viewvc/llvm-project?rev=349971&view=rev
Log:
[Scalar] Simplify as Jonas suggested. NFCI.

Modified:
lldb/trunk/unittests/Utility/ScalarTest.cpp

Modified: lldb/trunk/unittests/Utility/ScalarTest.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Utility/ScalarTest.cpp?rev=349971&r1=349970&r2=349971&view=diff
==
--- lldb/trunk/unittests/Utility/ScalarTest.cpp (original)
+++ lldb/trunk/unittests/Utility/ScalarTest.cpp Fri Dec 21 14:45:07 2018
@@ -34,10 +34,11 @@ TEST(ScalarTest, Equality) {
   ASSERT_TRUE(checkEquality(96, 96));
   ASSERT_TRUE(checkInequality(4.0f, 4.5f));
   ASSERT_TRUE(checkEquality(4.0f, 4.0f));
-  uint64_t apint1 = 234;
-  uint64_t apint2 = 246;
-  ASSERT_TRUE(checkInequality(APInt(64, apint1), APInt(64, apint2)));
-  ASSERT_TRUE(checkEquality(APInt(64, apint1), APInt(64, apint1)));
+
+  auto apint1 = APInt(64, 234);
+  auto apint2 = APInt(64, 246);
+  ASSERT_TRUE(checkInequality(apint1, apint2));
+  ASSERT_TRUE(checkEquality(apint1, apint1));
 
   Scalar void1;
   Scalar void2;


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r349972 - [NFC] Replace `compare` with (in)equality operator where applicable.

2018-12-21 Thread Jonas Devlieghere via lldb-commits
Author: jdevlieghere
Date: Fri Dec 21 14:46:10 2018
New Revision: 349972

URL: http://llvm.org/viewvc/llvm-project?rev=349972&view=rev
Log:
[NFC] Replace `compare` with (in)equality operator where applicable.

Using compare is verbose, bug prone and potentially inefficient (because
of early termination). Replace relevant call sites with the (in)equality
operator.

Modified:
lldb/trunk/source/Core/IOHandler.cpp
lldb/trunk/source/Core/Module.cpp
lldb/trunk/source/Host/common/XML.cpp
lldb/trunk/source/Interpreter/CommandAlias.cpp
lldb/trunk/source/Interpreter/CommandInterpreter.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/trunk/source/Symbol/ClangASTContext.cpp
lldb/trunk/source/Symbol/TypeList.cpp
lldb/trunk/source/Symbol/TypeMap.cpp
lldb/trunk/tools/debugserver/source/RNBRemote.cpp
lldb/trunk/tools/lldb-mi/MICmdArgValConsume.cpp
lldb/trunk/tools/lldb-mi/MIDriver.cpp
lldb/trunk/tools/lldb-mi/MIDriverMgr.cpp

Modified: lldb/trunk/source/Core/IOHandler.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/IOHandler.cpp?rev=349972&r1=349971&r2=349972&view=diff
==
--- lldb/trunk/source/Core/IOHandler.cpp (original)
+++ lldb/trunk/source/Core/IOHandler.cpp Fri Dec 21 14:46:10 2018
@@ -1052,7 +1052,7 @@ public:
 Windows::iterator pos, end = m_subwindows.end();
 size_t i = 0;
 for (pos = m_subwindows.begin(); pos != end; ++pos, ++i) {
-  if ((*pos)->m_name.compare(name) == 0)
+  if ((*pos)->m_name == name)
 return *pos;
 }
 return WindowSP();

Modified: lldb/trunk/source/Core/Module.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Module.cpp?rev=349972&r1=349971&r2=349972&view=diff
==
--- lldb/trunk/source/Core/Module.cpp (original)
+++ lldb/trunk/source/Core/Module.cpp Fri Dec 21 14:46:10 2018
@@ -783,7 +783,7 @@ void Module::LookupInfo::Prune(SymbolCon
   qualified_name = cpp_method.GetBasename().str();
 else
   qualified_name = cpp_method.GetScopeQualifiedName();
-if (qualified_name.compare(m_name.GetCString()) != 0) {
+if (qualified_name != m_name.GetCString()) {
   sc_list.RemoveContextAtIndex(i);
   continue;
 }

Modified: lldb/trunk/source/Host/common/XML.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/XML.cpp?rev=349972&r1=349971&r2=349972&view=diff
==
--- lldb/trunk/source/Host/common/XML.cpp (original)
+++ lldb/trunk/source/Host/common/XML.cpp Fri Dec 21 14:46:10 2018
@@ -438,7 +438,7 @@ XMLNode ApplePropertyList::GetValueNode(
 "key", [key, &value_node](const XMLNode &key_node) -> bool {
   std::string key_name;
   if (key_node.GetElementText(key_name)) {
-if (key_name.compare(key) == 0) {
+if (key_name == key) {
   value_node = key_node.GetSibling();
   while (value_node && !value_node.IsElement())
 value_node = value_node.GetSibling();

Modified: lldb/trunk/source/Interpreter/CommandAlias.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandAlias.cpp?rev=349972&r1=349971&r2=349972&view=diff
==
--- lldb/trunk/source/Interpreter/CommandAlias.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandAlias.cpp Fri Dec 21 14:46:10 2018
@@ -158,8 +158,7 @@ void CommandAlias::GetAliasExpansion(Str
   help_string.Printf(" %s", value.c_str());
 } else {
   help_string.Printf(" %s", opt.c_str());
-  if ((value.compare("") != 0) &&
-  (value.compare("http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=349972&r1=349971&r2=349972&view=diff
==
--- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Fri Dec 21 14:46:10 
2018
@@ -1393,7 +1393,7 @@ CommandObject *CommandInterpreter::Build
   alias_cmd_obj = desugared.first.get();
   std::string alias_name_str = alias_name;
   if ((cmd_args.GetArgumentCount() == 0) ||
-  (alias_name_str.compare(cmd_args.GetArgumentAtIndex(0)) != 0))
+  (alias_name_str != cmd_args.GetArgumentAtIndex(0)))
 cmd_args.Unshift(alias_name_str);
 
   result_str.Printf("%s", alias_cmd_obj->GetCommandName().str().c_str());
@@ -1937,7 +1937,7 @@ void CommandInterpreter::BuildAliasComma
 
   // Make sure that the alias name is the 0th element in cmd_args
   std::s

[Lldb-commits] [lldb] r349977 - [cmake] Suppress 'warning C4201: nonstandard extension used: nameless struct/union' on Windows

2018-12-21 Thread Stella Stamenova via lldb-commits
Author: stella.stamenova
Date: Fri Dec 21 15:59:24 2018
New Revision: 349977

URL: http://llvm.org/viewvc/llvm-project?rev=349977&view=rev
Log:
[cmake]  Suppress 'warning C4201: nonstandard extension used: nameless 
struct/union' on Windows

This warning comes up in the ObjC language plugin because of the use of 
nameless structs. This change suppresses the warning.

Modified:
lldb/trunk/cmake/modules/LLDBConfig.cmake

Modified: lldb/trunk/cmake/modules/LLDBConfig.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBConfig.cmake?rev=349977&r1=349976&r2=349977&view=diff
==
--- lldb/trunk/cmake/modules/LLDBConfig.cmake (original)
+++ lldb/trunk/cmake/modules/LLDBConfig.cmake Fri Dec 21 15:59:24 2018
@@ -243,6 +243,7 @@ if( MSVC )
 -wd4018 # Suppress 'warning C4018: '>=' : signed/unsigned mismatch'
 -wd4068 # Suppress 'warning C4068: unknown pragma'
 -wd4150 # Suppress 'warning C4150: deletion of pointer to incomplete type'
+-wd4201 # Suppress 'warning C4201: nonstandard extension used: nameless 
struct/union'
 -wd4251 # Suppress 'warning C4251: T must have dll-interface to be used by 
clients of class U.'
 -wd4521 # Suppress 'warning C4521: 'type' : multiple copy constructors 
specified'
 -wd4530 # Suppress 'warning C4530: C++ exception handler used, but unwind 
semantics are not enabled.'


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits