[Lldb-commits] [PATCH] D21680: Fix the libc++ pretty printers for the android NDK
tberghammer created this revision. tberghammer added reviewers: clayborg, granata.enrico, ovyalov. tberghammer added a subscriber: lldb-commits. Herald added subscribers: danalbert, tberghammer. Fix the libc++ pretty printers for the android NDK The libc++ shipped with the android NDK is shipped using a different internal namespace then the upstream libc++ (__ndk1 vs. __1) to avoid an ODR violation between the platform and the user application. This change fixes our pretty printers to be able to work with the types from the android NDK libc++. http://reviews.llvm.org/D21680 Files: source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp Index: source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp === --- source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp +++ source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp @@ -504,60 +504,68 @@ cpp_category_sp->GetTypeSummariesContainer()->Add(ConstString("std::__1::string"), std_string_summary_sp); +cpp_category_sp->GetTypeSummariesContainer()->Add(ConstString("std::__ndk1::string"), + std_string_summary_sp); cpp_category_sp->GetTypeSummariesContainer()->Add(ConstString("std::__1::basic_string, std::__1::allocator >"), std_string_summary_sp); +cpp_category_sp->GetTypeSummariesContainer()->Add(ConstString("std::__ndk1::basic_string, std::__ndk1::allocator >"), + std_string_summary_sp); cpp_category_sp->GetTypeSummariesContainer()->Add(ConstString("std::__1::wstring"), std_wstring_summary_sp); +cpp_category_sp->GetTypeSummariesContainer()->Add(ConstString("std::__ndk1::wstring"), + std_wstring_summary_sp); cpp_category_sp->GetTypeSummariesContainer()->Add(ConstString("std::__1::basic_string, std::__1::allocator >"), std_wstring_summary_sp); +cpp_category_sp->GetTypeSummariesContainer()->Add(ConstString("std::__ndk1::basic_string, std::__ndk1::allocator >"), + std_wstring_summary_sp); SyntheticChildren::Flags stl_synth_flags; stl_synth_flags.SetCascades(true).SetSkipPointers(false).SetSkipReferences(false); -AddCXXSynthetic(cpp_category_sp, lldb_private::formatters::LibcxxStdVectorSyntheticFrontEndCreator, "libc++ std::vector synthetic children", ConstString("^std::__1::vector<.+>(( )?&)?$"), stl_synth_flags, true); -AddCXXSynthetic(cpp_category_sp, lldb_private::formatters::LibcxxStdListSyntheticFrontEndCreator, "libc++ std::list synthetic children", ConstString("^std::__1::list<.+>(( )?&)?$"), stl_synth_flags, true); -AddCXXSynthetic(cpp_category_sp, lldb_private::formatters::LibcxxStdMapSyntheticFrontEndCreator, "libc++ std::map synthetic children", ConstString("^std::__1::map<.+> >(( )?&)?$"), stl_synth_flags, true); -AddCXXSynthetic(cpp_category_sp, lldb_private::formatters::LibcxxVectorBoolSyntheticFrontEndCreator, "libc++ std::vector synthetic children", ConstString("std::__1::vector >"), stl_synth_flags); -AddCXXSynthetic(cpp_category_sp, lldb_private::formatters::LibcxxVectorBoolSyntheticFrontEndCreator, "libc++ std::vector synthetic children", ConstString("std::__1::vector >"), stl_synth_flags); -AddCXXSynthetic(cpp_category_sp, lldb_private::formatters::LibcxxStdMapSyntheticFrontEndCreator, "libc++ std::set synthetic children", ConstString("^std::__1::set<.+> >(( )?&)?$"), stl_synth_flags, true); -AddCXXSynthetic(cpp_category_sp, lldb_private::formatters::LibcxxStdMapSyntheticFrontEndCreator, "libc++ std::multiset synthetic children", ConstString("^std::__1::multiset<.+> >(( )?&)?$"), stl_synth_flags, true); -AddCXXSynthetic(cpp_category_sp, lldb_private::formatters::LibcxxStdMapSyntheticFrontEndCreator, "libc++ std::multimap synthetic children", ConstString("^std::__1::multimap<.+> >(( )?&)?$"), stl_synth_flags, true); -AddCXXSynthetic(cpp_category_sp, lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEndCreator, "libc++ std::unordered containers synthetic children", ConstString("^(std::__1::)unordered_(multi)?(map|set)<.+> >$"), stl_synth_flags, true); +AddCXXSynthetic(cpp_category_sp, lldb_private::formatters::LibcxxStdVectorSyntheticFrontEndCreator, "libc++ std::vector synthetic children", ConstString("^std::__(ndk)?1::vector<.+>(( )?&)?$"), stl_synth_flags, true); +AddCXXSynthetic(cpp_category_sp, lldb_private::formatters::LibcxxStdListSyntheticFrontEndCreator, "libc++ std::list synthetic children", ConstString("^std::__(ndk)?1::list<.+>(( )?&)?$"), stl_synth_flags, true); +AddCXXSynthetic(cpp_category_
Re: [Lldb-commits] [PATCH] D20464: [LLDB][MIPS] Check if libatomic needs to be specified explicitly.
labath requested changes to this revision. labath added a comment. This revision now requires changes to proceed. In general, the idea sounds reasonable. I think you should be able to achieve the same effect by adding the library to LLDB_SYSTEM_LIBS in LLDBDependencies.cmake. This should be a much cleaner (and definitely more consistent) way of doing things. Repository: rL LLVM http://reviews.llvm.org/D20464 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D21648: Make sure to reset to correct platform after TestImageListMultiArchitecture
fjricci updated this revision to Diff 61803. fjricci added a comment. This revision is now accepted and ready to land. Skip test on remote platforms http://reviews.llvm.org/D21648 Files: packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py Index: packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py === --- packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py +++ packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py @@ -21,6 +21,7 @@ mydir = TestBase.compute_mydir(__file__) @no_debug_info_test +@skipIfRemote def test_image_list_shows_multiple_architectures(self): """Test that image list properly shows the correct architecture for a set of different architecture object files.""" images = { Index: packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py === --- packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py +++ packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py @@ -21,6 +21,7 @@ mydir = TestBase.compute_mydir(__file__) @no_debug_info_test +@skipIfRemote def test_image_list_shows_multiple_architectures(self): """Test that image list properly shows the correct architecture for a set of different architecture object files.""" images = { ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D21648: Don't run TestImageListMultiArchitecture during remote test suite
tfiala accepted this revision. tfiala added a comment. Thanks, looks good! http://reviews.llvm.org/D21648 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D21680: Fix the libc++ pretty printers for the android NDK
granata.enrico accepted this revision. granata.enrico added a comment. This revision is now accepted and ready to land. LGTM http://reviews.llvm.org/D21680 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D21648: Don't run TestImageListMultiArchitecture during remote test suite
clayborg added a comment. Looks good. http://reviews.llvm.org/D21648 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] LLVM buildmaster is not working currently
Hello everyone, LLVM buildmaster is not working currently for not clear reason. I try to restore it ASAP. Builders owners could use our public silent master as temporally solution. Silent buildbot is currently copy of llvm buildbot, but does not sent any notifications. The both have the same set of builders and it's easy to switch a slave between them. To do this please point your slave to silent master: use lab.llvm.org:9994 instead of lab.llvm.org:9990 It's address: http://lab.llvm.org:8014 Thanks Galina ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r273695 - Fix an issue where LLDB would show the key and value of a single entry NSDictionary in the wrong order
Author: enrico Date: Fri Jun 24 12:48:01 2016 New Revision: 273695 URL: http://llvm.org/viewvc/llvm-project?rev=273695&view=rev Log: Fix an issue where LLDB would show the key and value of a single entry NSDictionary in the wrong order Fixes rdar://26478641 Added: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/Makefile lldb/trunk/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py lldb/trunk/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/main.m Modified: lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp Added: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/Makefile URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/Makefile?rev=273695&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/Makefile (added) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/Makefile Fri Jun 24 12:48:01 2016 @@ -0,0 +1,7 @@ +LEVEL = ../../../make + +OBJC_SOURCES := main.m + +include $(LEVEL)/Makefile.rules + +LDFLAGS += -framework Foundation Added: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py?rev=273695&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py (added) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py Fri Jun 24 12:48:01 2016 @@ -0,0 +1,68 @@ +"""Test that we properly vend children for a single entry NSDictionary""" + +from __future__ import print_function + + + +import unittest2 +import os, time +import platform + +from distutils.version import StrictVersion + +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + +class ObjCSingleEntryDictionaryTestCase(TestBase): + +mydir = TestBase.compute_mydir(__file__) + +def setUp(self): +# Call super's setUp(). +TestBase.setUp(self) +# Find the line number to break inside main(). +self.line = line_number('main.m', '// break here') + +@skipUnlessDarwin +def test_single_entry_dict(self): +self.build() +exe = os.path.join(os.getcwd(), "a.out") +self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) + +# Break inside the foo function which takes a bar_ptr argument. +lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, num_expected_locations=1, loc_exact=True) + +self.runCmd("run", RUN_SUCCEEDED) + +# The stop reason of the thread should be breakpoint. +self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT, +substrs = ['stopped', + 'stop reason = breakpoint']) + +# The breakpoint should have a hit count of 1. +self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE, +substrs = [' resolved, hit count = 1']) + +d1 = self.frame().FindVariable("d1") +d1.SetPreferSyntheticValue(True) +d1.SetPreferDynamicValue(lldb.eDynamicCanRunTarget) + +self.assertTrue(d1.GetNumChildren() == 1, "dictionary has != 1 child elements") +pair = d1.GetChildAtIndex(0) +pair.SetPreferSyntheticValue(True) +pair.SetPreferDynamicValue(lldb.eDynamicCanRunTarget) + +self.assertTrue(pair.GetNumChildren() == 2, "pair has != 2 child elements") + +key = pair.GetChildMemberWithName("key") +value = pair.GetChildMemberWithName("value") + +key.SetPreferSyntheticValue(True) +key.SetPreferDynamicValue(lldb.eDynamicCanRunTarget) +value.SetPreferSyntheticValue(True) +value.SetPreferDynamicValue(lldb.eDynamicCanRunTarget) + +self.assertTrue(key.GetSummary() == '@"key"', "key doesn't contain key") +self.assertTrue(value.GetSummary() == '@"value"', "value doesn't contain value") Added: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/main.m URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/main.m?rev=273695&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/main.m (added) +++ lldb/trunk/packages/Python/lldbsuite/test/lang
Re: [Lldb-commits] [PATCH] D21680: Fix the libc++ pretty printers for the android NDK
ovyalov accepted this revision. ovyalov added a comment. LGTM http://reviews.llvm.org/D21680 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] LLVM buildmaster is not working currently
Hello, Master was down per hardware issues. Back to work now. Thanks Galina On Fri, Jun 24, 2016 at 10:35 AM, Galina Kistanova wrote: > Hello everyone, > > LLVM buildmaster is not working currently for not clear reason. > I try to restore it ASAP. > > Builders owners could use our public silent master as temporally solution. > > Silent buildbot is currently copy of llvm buildbot, but does not sent any > notifications. > The both have the same set of builders and it's easy to switch a slave > between them. > To do this please point your slave to silent master: > use lab.llvm.org:9994 instead of lab.llvm.org:9990 > > It's address: > http://lab.llvm.org:8014 > > Thanks > > Galina > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r273718 - Added a test case for bitfield ivars. It currently fails.
Author: spyffe Date: Fri Jun 24 15:41:18 2016 New Revision: 273718 URL: http://llvm.org/viewvc/llvm-project?rev=273718&view=rev Log: Added a test case for bitfield ivars. It currently fails. Added: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/TestBitfieldIvars.py lldb/trunk/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/main.m Added: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/TestBitfieldIvars.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/TestBitfieldIvars.py?rev=273718&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/TestBitfieldIvars.py (added) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/TestBitfieldIvars.py Fri Jun 24 15:41:18 2016 @@ -0,0 +1,4 @@ +from lldbsuite.test import lldbinline +from lldbsuite.test import decorators + +lldbinline.MakeInlineTest(__file__, globals(), [decorators.skipIfFreeBSD,decorators.skipIfLinux,decorators.skipIfWindows, decorators.expectedFailureAll(bugnumber="rdar://problem/17990991")]) Added: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/main.m URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/main.m?rev=273718&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/main.m (added) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/main.m Fri Jun 24 15:41:18 2016 @@ -0,0 +1,52 @@ +//===-- main.m ---*- Objective-C-*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===--===// + +#import + +@interface HasBitfield : NSObject { +@public +unsigned field1 : 1; +unsigned field2 : 1; +}; + +-(id)init; +@end + +@implementation HasBitfield +-(id)init { +self = [super init]; +field1 = 0; +field2 = 1; +return self; +} +@end + +@interface ContainsAHasBitfield : NSObject { +@public +HasBitfield *hb; +}; +-(id)init; +@end + +@implementation ContainsAHasBitfield +-(id)init { +self = [super init]; +hb = [[HasBitfield alloc] init]; +return self; +} + +@end + +int main(int argc, const char * argv[]) { +ContainsAHasBitfield *chb = [[ContainsAHasBitfield alloc] init]; +printf("%d\n", chb->hb->field2); //% self.expect("expression -- chb->hb->field1", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["= 0"]) + //% self.expect("expression -- chb->hb->field2", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["= 1"]) # this must happen second +return 0; +} + ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r273720 - Don't run TestImageListMultiArchitecture during remote test suite
Author: fjricci Date: Fri Jun 24 15:44:23 2016 New Revision: 273720 URL: http://llvm.org/viewvc/llvm-project?rev=273720&view=rev Log: Don't run TestImageListMultiArchitecture during remote test suite Reviewers: zturner, clayborg, tfiala Subscribers: sas, lldb-commits Differential Revision: http://reviews.llvm.org/D21648 Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py?rev=273720&r1=273719&r2=273720&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py Fri Jun 24 15:44:23 2016 @@ -21,6 +21,7 @@ class TestImageListMultiArchitecture(Tes mydir = TestBase.compute_mydir(__file__) @no_debug_info_test +@skipIfRemote def test_image_list_shows_multiple_architectures(self): """Test that image list properly shows the correct architecture for a set of different architecture object files.""" images = { ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r273721 - The Objective-C Class type should not be treated as a potential dynamic type, since it actually doesn't resolve to the type of the class it points to
Author: enrico Date: Fri Jun 24 15:45:08 2016 New Revision: 273721 URL: http://llvm.org/viewvc/llvm-project?rev=273721&view=rev Log: The Objective-C Class type should not be treated as a potential dynamic type, since it actually doesn't resolve to the type of the class it points to Fixes rdar://26535584 Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=273721&r1=273720&r2=273721&view=diff == --- lldb/trunk/source/Symbol/ClangASTContext.cpp (original) +++ lldb/trunk/source/Symbol/ClangASTContext.cpp Fri Jun 24 15:45:08 2016 @@ -3615,6 +3615,14 @@ ClangASTContext::IsPossibleDynamicType ( case clang::Type::ObjCObjectPointer: if (check_objc) { +if (auto objc_pointee_type = qual_type->getPointeeType().getTypePtrOrNull()) +{ +if (auto objc_object_type = llvm::dyn_cast_or_null(objc_pointee_type)) +{ +if (objc_object_type->isObjCClass()) +return false; +} +} if (dynamic_pointee_type) dynamic_pointee_type->SetCompilerType(getASTContext(), llvm::cast(qual_type)->getPointeeType()); return true; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D21648: Don't run TestImageListMultiArchitecture during remote test suite
This revision was automatically updated to reflect the committed changes. Closed by commit rL273720: Don't run TestImageListMultiArchitecture during remote test suite (authored by fjricci). Changed prior to commit: http://reviews.llvm.org/D21648?vs=61803&id=61831#toc Repository: rL LLVM http://reviews.llvm.org/D21648 Files: lldb/trunk/packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py === --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py @@ -21,6 +21,7 @@ mydir = TestBase.compute_mydir(__file__) @no_debug_info_test +@skipIfRemote def test_image_list_shows_multiple_architectures(self): """Test that image list properly shows the correct architecture for a set of different architecture object files.""" images = { Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py === --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py @@ -21,6 +21,7 @@ mydir = TestBase.compute_mydir(__file__) @no_debug_info_test +@skipIfRemote def test_image_list_shows_multiple_architectures(self): """Test that image list properly shows the correct architecture for a set of different architecture object files.""" images = { ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r273749 - Add .i files for SBMemoryRegionInfo and SBMemoryRegionInfoList and also hook up the new calls in SBProcess that give out SBMemoryRegionInfo and SBMemoryRegionInfoList o
Author: gclayton Date: Fri Jun 24 18:40:35 2016 New Revision: 273749 URL: http://llvm.org/viewvc/llvm-project?rev=273749&view=rev Log: Add .i files for SBMemoryRegionInfo and SBMemoryRegionInfoList and also hook up the new calls in SBProcess that give out SBMemoryRegionInfo and SBMemoryRegionInfoList objects. Also make sure the right headers and .i files are included so SWIG can hook everything up. Added: lldb/trunk/scripts/interface/SBMemoryRegionInfo.i lldb/trunk/scripts/interface/SBMemoryRegionInfoList.i Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj lldb/trunk/scripts/Python/python-extensions.swig lldb/trunk/scripts/interface/SBProcess.i lldb/trunk/scripts/lldb.swig Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=273749&r1=273748&r2=273749&view=diff == --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original) +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Fri Jun 24 18:40:35 2016 @@ -150,6 +150,8 @@ 263E949F13661AEA00E7D1CE /* UnwindAssembly-x86.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 263E949D13661AE400E7D1CE /* UnwindAssembly-x86.cpp */; }; 263FDE601A79A01500E68013 /* FormatEntity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 263FDE5F1A79A01500E68013 /* FormatEntity.cpp */; }; 2640E19F15DC78FD00F23B50 /* Property.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2640E19E15DC78FD00F23B50 /* Property.cpp */; }; + 264297571D1DF247003F2BF4 /* SBMemoryRegionInfoList.h in Headers */ = {isa = PBXBuildFile; fileRef = 264297541D1DF209003F2BF4 /* SBMemoryRegionInfoList.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 264297581D1DF250003F2BF4 /* SBMemoryRegionInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 264297531D1DF209003F2BF4 /* SBMemoryRegionInfo.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2642FBAE13D003B400ED6808 /* CommunicationKDP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2642FBA813D003B400ED6808 /* CommunicationKDP.cpp */; }; 2642FBB013D003B400ED6808 /* ProcessKDP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2642FBAA13D003B400ED6808 /* ProcessKDP.cpp */; }; 2642FBB213D003B400ED6808 /* ProcessKDPLog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2642FBAC13D003B400ED6808 /* ProcessKDPLog.cpp */; }; @@ -1461,6 +1463,10 @@ 2640E19E15DC78FD00F23B50 /* Property.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Property.cpp; path = source/Interpreter/Property.cpp; sourceTree = ""; }; 26424E3C125986CB0016D82C /* ValueObjectConstResult.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectConstResult.cpp; path = source/Core/ValueObjectConstResult.cpp; sourceTree = ""; }; 26424E3E125986D30016D82C /* ValueObjectConstResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ValueObjectConstResult.h; path = include/lldb/Core/ValueObjectConstResult.h; sourceTree = ""; }; + 264297531D1DF209003F2BF4 /* SBMemoryRegionInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBMemoryRegionInfo.h; path = include/lldb/API/SBMemoryRegionInfo.h; sourceTree = ""; }; + 264297541D1DF209003F2BF4 /* SBMemoryRegionInfoList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBMemoryRegionInfoList.h; path = include/lldb/API/SBMemoryRegionInfoList.h; sourceTree = ""; }; + 264297591D1DF2AA003F2BF4 /* SBMemoryRegionInfo.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBMemoryRegionInfo.i; sourceTree = ""; }; + 2642975A1D1DF2AA003F2BF4 /* SBMemoryRegionInfoList.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBMemoryRegionInfoList.i; sourceTree = ""; }; 2642FBA813D003B400ED6808 /* CommunicationKDP.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CommunicationKDP.cpp; sourceTree = ""; }; 2642FBA913D003B400ED6808 /* CommunicationKDP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommunicationKDP.h; sourceTree = ""; }; 2642FBAA13D003B400ED6808 /* ProcessKDP.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessKDP.cpp; sourceTree = ""; }; @@ -3492,6 +3498,8 @@ 2611FF03142D83060017FEA3 /* SBInstructionList.i */, 2611FF04142D83060017FEA3 /* SBLineEntry.i */,
[Lldb-commits] [lldb] r273750 - Made templates that have Enumeration values as arguments work correctly.
Author: gclayton Date: Fri Jun 24 18:48:00 2016 New Revision: 273750 URL: http://llvm.org/viewvc/llvm-project?rev=273750&view=rev Log: Made templates that have Enumeration values as arguments work correctly. We were checking for integer types only before this. So I added the ability for CompilerType objects to check for integer and enum types. Then I searched for places that were using the CompilerType::IsIntegerType(...) function. Many of these places also wanted to be checking for enumeration types as well, so I have fixed those places. These are in the ABI plug-ins where we are figuring out which arguments would go in where in regisers/stack when making a function call, or determining where the return value would live. The real fix for this is to use clang to compiler a CGFunctionInfo and then modify the code to be able to take the IR and a calling convention and have the backend answer the questions correctly for us so we don't need to create a really bad copy of the ABI in each plug-in, but that is beyond the scope of this bug fix. Also added a test case to ensure this doesn't regress in the future. Modified: lldb/trunk/include/lldb/Symbol/ClangASTContext.h lldb/trunk/include/lldb/Symbol/CompilerType.h lldb/trunk/include/lldb/Symbol/TypeSystem.h lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/template/TestTemplateIntegerArgs.py lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/template/main.cpp lldb/trunk/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp lldb/trunk/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp lldb/trunk/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp lldb/trunk/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp lldb/trunk/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp lldb/trunk/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp lldb/trunk/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp lldb/trunk/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp lldb/trunk/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.cpp lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp lldb/trunk/source/Symbol/ClangASTContext.cpp lldb/trunk/source/Symbol/CompilerType.cpp Modified: lldb/trunk/include/lldb/Symbol/ClangASTContext.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangASTContext.h?rev=273750&r1=273749&r2=273750&view=diff == --- lldb/trunk/include/lldb/Symbol/ClangASTContext.h (original) +++ lldb/trunk/include/lldb/Symbol/ClangASTContext.h Fri Jun 24 18:48:00 2016 @@ -689,7 +689,10 @@ public: bool IsIntegerType (lldb::opaque_compiler_type_t type, bool &is_signed) override; - + +bool +IsEnumerationType (lldb::opaque_compiler_type_t type, bool &is_signed) override; + static bool IsObjCClassType (const CompilerType& type); Modified: lldb/trunk/include/lldb/Symbol/CompilerType.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/CompilerType.h?rev=273750&r1=273749&r2=273750&view=diff == --- lldb/trunk/include/lldb/Symbol/CompilerType.h (original) +++ lldb/trunk/include/lldb/Symbol/CompilerType.h Fri Jun 24 18:48:00 2016 @@ -153,7 +153,13 @@ public: bool IsIntegerType (bool &is_signed) const; - + +bool +IsEnumerationType (bool &is_signed) const; + +bool +IsIntegerOrEnumerationType (bool &is_signed) const; + bool IsPolymorphicClass () const; Modified: lldb/trunk/include/lldb/Symbol/TypeSystem.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/TypeSystem.h?rev=273750&r1=273749&r2=273750&view=diff == --- lldb/trunk/include/lldb/Symbol/TypeSystem.h (original) +++ lldb/trunk/include/lldb/Symbol/TypeSystem.h Fri Jun 24 18:48:00 2016 @@ -208,7 +208,14 @@ public: virtual bool IsIntegerType (lldb::opaque_compiler_type_t type, bool &is_signed) = 0; - + +virtual bool +IsEnumerationType (lldb::opaque_compiler_type_t type, bool &is_signed) +{ +is_signed = false; +return false; +} + virtual bool IsPossibleDynamicType (lldb::opaque_compiler_type_t type, CompilerType *target_type, // Can pass NULL Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/template/TestTemplateIntegerArgs.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/template/TestTemplateIntegerArgs.py?rev=273750&r1=273749&r2=273750&view=diff == --- lldb/trunk/packages/Pyth