Re: [Lldb-commits] [PATCH] D13334: Preliminary NetBSD support
emaste added inline comments. Comment at: source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp:1 @@ +1,2 @@ +//===-- PlatformNetBSD.cpp -*- C++ -*-===// +// krytarowski wrote: > labath wrote: > > krytarowski wrote: > > > labath wrote: > > > > krytarowski wrote: > > > > > labath wrote: > > > > > > This platform code looks like it was copy-pasted from > > > > > > PlatformFreeBSD. Do you anticipate making significant changes here? > > > > > > > > > > > > If not, it might be a good idea to share this code with FreeBSD in > > > > > > some way (in fact there is a comment here to make this share code > > > > > > with PlatformPOSIX). @emaste, what do you think about this? > > > > > Yes... however I have bad experiences (mostly in Gnome) when we drag > > > > > common code for rotted platforms like BSD4.4, BSD/OS and such in a > > > > > single source tree paralyzing sane platform support. > > > > So which one do you expect to rot first ? > > > > > > > > Joke aside, I agree that this could be an issue, but I think if we put > > > > some thought into the design, we can limit the possible downsides of > > > > this approach. The other alternative, where we copy everything is not > > > > ideal either: we have had cases in the past, where we made a change in > > > > linux code, and then we needed to apply the exact same change in the > > > > freebsd version. So there is definitely some tradeoff to consider > > > > here... > > > > > > > > In any case, I'm not trying to stop your changes because of this, but I > > > > think it's good to open this discussion in the early stages of the > > > > implementation... I don't know if you're aware but there are plans to > > > > move freebsd to the client-server model to follow linux, so if you make > > > > copies of the code, you may find out later that you may need to > > > > duplicate that work as well. > > > I'm strongly for this to design and put common BSD code (for modern BSDs) > > > into single library or module, limiting Free/Net specific pieces to their > > > appropriate modules. > > > > > > My requirement is to name the common parts as BSD, not FreeBSD. NetBSD > > > isn't a variation of FreeBSD (neither e.g. Bitrig, which may come next -- > > > there is already an active interest). > > > > > > I was thinking how to do it, with virtual functions, inheritance, #ifdef > > > magic... To make it clear, I don't use nor have FreeBSD to lonely > > > design/redesign neither touch its platform support, therefor I request > > > for active cooperation from the FreeBSD side. > > >I'm strongly for this to design and put common BSD code (for modern BSDs) > > >into single library or module, limiting Free/Net specific pieces to their > > >appropriate modules. > > > > >My requirement is to name the common parts as BSD, not FreeBSD. NetBSD > > >isn't a variation of FreeBSD (neither e.g. Bitrig, which may come next -- > > >there is already an active interest). > > > > Sounds reasonable to me. > > > > > I was thinking how to do it, with virtual functions, inheritance, #ifdef > > > magic... > > LLDB is a cross-platform tool, we can already remotely debug linux from > > windows and mac machines, etc. It would be great if this would eventually > > work for BSD platforms as well. For this, we need both freebsd and netbsd > > code in a single client binary, so #ifdefs are ruled out (at least in > > client code). But I think inheritance is perfect for this particular case > > of PlatformNetBSD -- just move the code to PlatformBSD and have Free/NetBSD > > inherit from that. > > > > > To make it clear, I don't use nor have FreeBSD to lonely design/redesign > > > neither touch its platform support, therefor I request for active > > > cooperation from the FreeBSD side. > > Let's see what FreeBSD has to say to this. :) > > LLDB is a cross-platform tool, we can already remotely debug linux from > > windows and mac machines, etc. It would be great if this would eventually > > work for BSD platforms as well. > > Sounds great! > > > Let's see what FreeBSD has to say to this. :) > > I opened the offer from my site. The code is already there. I'm waiting for > the feedback. > Joke aside, I agree that this could be an issue, but I think if we put some > thought into the design, we can limit the possible downsides of this > approach. The other alternative, where we copy everything is not ideal > either: we have had cases in the past, where we made a change in linux code, > and then we needed to apply the exact same change in the freebsd version. So > there is definitely some tradeoff to consider here... Yes - the sharing between Linux and FreeBSD was previously a bit of a mess: some Linux functionality existed in base classes, and some derived classes had nearly identical copy pasta. > I don't know if you're aware but there are plans to move freebsd to the > client-server model to follo
Re: [Lldb-commits] [PATCH] D13334: Preliminary NetBSD support
On 1 October 2015 at 23:09, Kamil Rytarowski via lldb-commits wrote: > > Yes, please! Better incomplete support in the source trees then once > almost complete but rotting in a local patch... I agree - I think it's better to get basic support in as soon as possible and we can refactor as appropriate in the tree. Will you be able to get a NetBSD builder after the changes start going in? We recently lost the FreeBSD one and I'm (still) working on a replacement; without buildbot support it's about as easy for FreeBSD/NetBSD support to rot in the tree as out. ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D13334: Preliminary NetBSD support
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 02.10.2015 10:07, Ed Maste wrote: > On 1 October 2015 at 23:09, Kamil Rytarowski via lldb-commits > wrote: >> >> Yes, please! Better incomplete support in the source trees then >> once almost complete but rotting in a local patch... > > I agree - I think it's better to get basic support in as soon as > possible and we can refactor as appropriate in the tree. > Right. There are just few pending patches to make it buildable and runnable: - - ncurses one (already in review D12995), - - platform code (pushed to review within D13334), - - cmake glue for platform code (it will come next), - - autotools glue for platform code (ditto), - - minor glue (swig, ...). When we will get the above in-trees I already have local patches to polish the things up. > Will you be able to get a NetBSD builder after the changes start > going in? I will try to ask for one. Two daily builds (one with CMake and the second one with autotools) should be good enough. -BEGIN PGP SIGNATURE- Version: GnuPG v2 iQIcBAEBCAAGBQJWDllBAAoJEEuzCOmwLnZsimAP/R86mUDXyvOjXWupMZBzQQTM NjvZZOBocm+cWWwesgByFc8B+GSxNSAJStlm+ooLt7/d88ajtE6TOtvuqE97ust7 /O1cVvjTMtSgMycosCc1bF/8BibPBV/LW+ce1JEj7FCXycfGIboK6W55CQhA6/++ DV0Qh3gAtdQjApLcrXVcu5PYvUpY783bIL1YL0vpecz+nLKtjfWjLjFuUUvP9FcB nS8DTsZ+d+j1Y9cQYXa6EUCsTUie/aRinOo6JO00LJ7AVgOTcGYyb1auCldaEXBK 4qRCR42vfe1w0NLRqWqj6tWlzM3iQnP7UFuUOb4+GXTdh5jOdTePOsAzPdRI48JW xNz51T1wFqzex0EQN9q+xb+D66wa7yDpM0DxL8xo4ry7ogz+tCvvn7A8uXjhaDWd gVoP31IcATlfTkmvqinP7WcA8JuUr25gVwBsx7GC9XmmNnsPg9QUJnQs+dhS+rHj NK/7KnRPQ1calP7E5iNq3omuhzLkmkIiCOnbYeGo81yk46DaexUG48LWiFU9PNu7 fwbcL572y07tqr2yCcbrSgpMq8Wf6rmMB7ObjZdsI21ZzogCIGW9WKyH86e/fc8l 4RYNMp9peFRNDqQbfCI9I9N7h+Gp9La1q/Kw0CbcjZ5ZTJJQdouYWWhGDFw0X+Od e1Tanif6uzC4VEAUwUva =giVS -END PGP SIGNATURE- ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D13380: Fix several issues around .ARM.exidx section handling
tberghammer created this revision. tberghammer added a reviewer: labath. tberghammer added a subscriber: lldb-commits. Herald added subscribers: rengolin, aemerson. Fix several issues around .ARM.exidx section handling * Use .ARM.exidx as a fallback unwind plan for non-call site when the instruction emulation based unwind failed. * Work around an old compiler issue where the compiler isn't sort the entries in .ARM.exidx based on their address. * Fix unwind info parsing when the virtual file address >= 0x8000 * Fix bug in unwind info parsing when neither lr nor pc is explicitly restored. http://reviews.llvm.org/D13380 Files: include/lldb/Symbol/ArmUnwindInfo.h source/Plugins/Process/Utility/RegisterContextLLDB.cpp source/Symbol/ArmUnwindInfo.cpp Index: source/Symbol/ArmUnwindInfo.cpp === --- source/Symbol/ArmUnwindInfo.cpp +++ source/Symbol/ArmUnwindInfo.cpp @@ -30,14 +30,26 @@ using namespace lldb; using namespace lldb_private; -namespace +// Converts a prel31 avlue to lldb::addr_t with sign extension +static addr_t +Prel31ToAddr(uint32_t prel31) { -struct ArmExidxEntry -{ -uint32_t address; -uint32_t data; -}; -}; +addr_t res = prel31; +if (prel31 & (1<<30)) +res |= 0x8000ULL; +return res; +} + +ArmUnwindInfo::ArmExidxEntry::ArmExidxEntry(uint32_t f, lldb::addr_t a, uint32_t d) : +file_address(f), address(a), data(d) +{ +} + +bool +ArmUnwindInfo::ArmExidxEntry::operator<(const ArmExidxEntry& other) const +{ +return address < other.address; +} ArmUnwindInfo::ArmUnwindInfo(const ObjectFile& objfile, SectionSP& arm_exidx, @@ -48,6 +60,23 @@ { objfile.ReadSectionData(arm_exidx.get(), m_arm_exidx_data); objfile.ReadSectionData(arm_extab.get(), m_arm_extab_data); + +addr_t exidx_base_addr = m_arm_exidx_sp->GetFileAddress(); + +offset_t offset = 0; +while (m_arm_exidx_data.ValidOffset(offset)) +{ +lldb::addr_t file_addr = exidx_base_addr + offset; +lldb::addr_t addr = exidx_base_addr + +(addr_t)offset + +Prel31ToAddr(m_arm_exidx_data.GetU32(&offset)); +uint32_t data = m_arm_exidx_data.GetU32(&offset); +m_exidx_entries.emplace_back(file_addr, addr, data); +} + +// Sort the entries in the exidx section. The entries should be sorted inside the section but +// some old compiler isn't sorted them. +std::sort(m_exidx_entries.begin(), m_exidx_entries.end()); } ArmUnwindInfo::~ArmUnwindInfo() @@ -85,7 +114,7 @@ bool ArmUnwindInfo::GetUnwindPlan(Target &target, const Address& addr, UnwindPlan& unwind_plan) { -const uint32_t* data = (const uint32_t*)GetExceptionHandlingTableEntry(addr.GetFileAddress()); +const uint32_t* data = (const uint32_t*)GetExceptionHandlingTableEntry(addr); if (data == nullptr) return false; // No unwind information for the function @@ -382,6 +411,8 @@ UnwindPlan::Row::RegisterLocation lr_location; if (row->GetRegisterInfo(dwarf_lr, lr_location)) row->SetRegisterInfo(dwarf_pc, lr_location); +else +row->SetRegisterLocationToRegister(dwarf_pc, dwarf_lr, false); } unwind_plan.AppendRow(row); @@ -396,38 +427,19 @@ const uint8_t* ArmUnwindInfo::GetExceptionHandlingTableEntry(const Address& addr) { -uint32_t file_addr = addr.GetFileAddress(); -uint32_t exidx_base_addr = m_arm_exidx_sp->GetFileAddress(); - -const ArmExidxEntry* exidx_start = (const ArmExidxEntry*)m_arm_exidx_data.GetDataStart(); -uint32_t bs_start = 0, bs_end = m_arm_exidx_data.GetByteSize() / sizeof(ArmExidxEntry); -while (bs_start + 1 < bs_end) -{ -uint32_t mid = (bs_start + bs_end) / 2; -uint32_t mid_addr = exidx_base_addr + exidx_start[mid].address + mid * sizeof(ArmExidxEntry); -mid_addr &= 0x7fff; -if (mid_addr > file_addr) -bs_end = mid; -else -bs_start = mid; -} - -uint32_t exidx_addr = exidx_base_addr + - exidx_start[bs_start].address + - bs_start * sizeof(ArmExidxEntry); -exidx_addr &= 0x7fff; -if (exidx_addr > file_addr) +auto it = std::upper_bound(m_exidx_entries.begin(), + m_exidx_entries.end(), + ArmExidxEntry{0, addr.GetFileAddress(), 0}); +if (it == m_exidx_entries.begin()) return nullptr; +--it; -if (exidx_start[bs_start].data == 0x1) +if (it->data == 0x1) return nullptr; // EXIDX_CANTUNWIND -if (exidx_start[bs_start].data & 0x8000) -return (const uint8_t*)&exidx_start[bs_start].data; +if (it->data & 0x8000) +return (const uint8_t*)&it->data; -uint32_t data_file_addr = exidx_base_addr + -
Re: [Lldb-commits] [PATCH] D13380: Fix several issues around .ARM.exidx section handling
labath accepted this revision. labath added a comment. This revision is now accepted and ready to land. looks good http://reviews.llvm.org/D13380 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D13058: LLDB-MI: Bug when evaluating strings containing characters from non-ascii range
evgeny777 added inline comments. Comment at: tools/lldb-mi/MICmnLLDBUtilSBValue.cpp:372 @@ +371,3 @@ +CMIUtilString +CMICmnLLDBUtilSBValue::GetValueSummary() const +{ granata.enrico wrote: > I might be missing something, but how is this going to work when an SBValue > has a value but no summary (something as simple as int x = 1;)? > > GetSummary() is free to return NULL, and I only see you fetching the value > here when there is a summary. Your logic should be more like > > GetSummary() > if (!summary || summary && DoesPrintValue()) > append value > > A very long-term goal of mine is for all of this logic to exist in the > ValueObjectPrinter and clients to simply be able to ask it to print a > ValueObject according to some specification of theirs, in the middle of an > existing stream. But that is way beyond the scope of your patch, so if you > just clean up the logic here to do the right thing for values without > summaries, I am happy. Short answer: Yes types without summary work, please look at CMICmnLLDBUtilSBValue::GetSimpleValue() function Longer anser: This patch only addresses specific issues - Correct UTF-16/32 handling for characters and strings - Correct handling of composite types, like std::string The patch logic is: if summary is available use it (optionally combined with value). If it is not then fall back to MI default formatting (see ConvertToPrintableASCII for example). For other simple types, like int and float GetValueSummary() is never called (MI calls GetValue() instead) Probably refactoring MI will provide better code, but this looks like to be out of this patch scope http://reviews.llvm.org/D13058 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D13058: LLDB-MI: Bug when evaluating strings containing characters from non-ascii range
evgeny777 added inline comments. Comment at: include/lldb/API/SBTypeSummary.h:125 @@ +124,3 @@ + +bool DoesPrintValue(const lldb::SBValue &value) const; + granata.enrico wrote: > Can you please change this to > > bool > DoesPrintValue (lldb::SBValue value); > > There is no need to pass the SBValue by reference since you're not actually > altering it - and since SBValue wraps a (glorified) pointer to a ValueObject > you're not really copying much data over. I don't see the need to classify > the function as const (only IsValid() seems to be marked thusly in that > file), and definitely no need for the SBValue to be a const Ok. Just curious - why const is bad? http://reviews.llvm.org/D13058 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D13058: LLDB-MI: Bug when evaluating strings containing characters from non-ascii range
evgeny777 updated this revision to Diff 36341. evgeny777 added a comment. Changed DoesPrintValue() function prototype http://reviews.llvm.org/D13058 Files: include/lldb/API/SBTypeSummary.h source/API/SBTypeSummary.cpp test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.py test/tools/lldb-mi/variable/TestMiVar.py test/tools/lldb-mi/variable/main.cpp tools/lldb-mi/MICmnLLDBUtilSBValue.cpp tools/lldb-mi/MICmnLLDBUtilSBValue.h Index: tools/lldb-mi/MICmnLLDBUtilSBValue.h === --- tools/lldb-mi/MICmnLLDBUtilSBValue.h +++ tools/lldb-mi/MICmnLLDBUtilSBValue.h @@ -55,7 +55,7 @@ CMIUtilString GetSimpleValueCStringPointer() const; CMIUtilString GetSimpleValueCStringArray() const; bool GetCompositeValue(const bool vbPrintFieldNames, CMICmnMIValueTuple &vwrMiValueTuple, const MIuint vnDepth = 1) const; - +CMIUtilString GetValueSummary() const; // Statics: private: static bool IsCharBasicType(lldb::BasicType eType); Index: tools/lldb-mi/MICmnLLDBUtilSBValue.cpp === --- tools/lldb-mi/MICmnLLDBUtilSBValue.cpp +++ tools/lldb-mi/MICmnLLDBUtilSBValue.cpp @@ -17,6 +17,7 @@ #include "MICmnMIValueTuple.h" #include "MIUtilString.h" +#include "lldb/API/SBTypeSummary.h" //++ // Details: CMICmnLLDBUtilSBValue constructor. // Type:Method. @@ -165,6 +166,14 @@ return MIstatus::success; } } +else +{ +// Treat composite value which has registered summary +// (for example with AddCXXSummary) as simple value +vwrValue = GetValueSummary(); +if (!vwrValue.empty()) +return MIstatus::success; +} // Composite variable type i.e. struct return MIstatus::failure; @@ -180,6 +189,10 @@ CMIUtilString CMICmnLLDBUtilSBValue::GetSimpleValueChar() const { +const CMIUtilString& summary = GetValueSummary(); +if (!summary.empty()) +return summary; + const uint64_t value = m_rValue.GetValueAsUnsigned(); if (value == 0) { @@ -227,6 +240,10 @@ if (value == nullptr) return m_pUnkwn; +const CMIUtilString& summary = GetValueSummary(); +if (!summary.empty()) +return summary; + lldb::SBValue child = m_rValue.GetChildAtIndex(0); const lldb::BasicType eType = child.GetType().GetBasicType(); switch (eType) @@ -266,6 +283,10 @@ CMIUtilString CMICmnLLDBUtilSBValue::GetSimpleValueCStringArray() const { +const CMIUtilString& summary = GetValueSummary(); +if (!summary.empty()) +return summary; + const MIuint nChildren = m_rValue.GetNumChildren(); lldb::SBValue child = m_rValue.GetChildAtIndex(0); const lldb::BasicType eType = child.GetType().GetBasicType(); @@ -347,6 +368,30 @@ return MIstatus::success; } +CMIUtilString +CMICmnLLDBUtilSBValue::GetValueSummary() const +{ +CMIUtilString valSummary; +if (m_rValue.IsValid()) +{ +const char *c_str = m_rValue.GetSummary(); +if (c_str && c_str[0]) +{ +valSummary = c_str; +lldb::SBTypeSummary summary = m_rValue.GetTypeSummary(); +if (summary.IsValid() && summary.DoesPrintValue(m_rValue)) +{ +c_str = m_rValue.GetValue(); +if (c_str && c_str[0]) +{ +valSummary.insert(0, std::string(c_str) + " "); +} +} +} +} +return valSummary; +} + //++ // Details: Check that basic type is a char type. Char type can be signed or unsigned. // Type:Static. Index: test/tools/lldb-mi/variable/main.cpp === --- test/tools/lldb-mi/variable/main.cpp +++ test/tools/lldb-mi/variable/main.cpp @@ -8,6 +8,7 @@ //===--===// #include +#include struct complex_type { @@ -64,9 +65,21 @@ const char32_t *u32p = U"\t\"hello\"\n"; const char32_t u32a[] = U"\t\"hello\"\n"; +const char16_t* u16p_rus = u"\\Аламо-сквер"; +const char16_t u16a_rus[] = u"\\Бейвью"; +const char32_t* u32p_rus = U"\\Чайнатаун"; +const char32_t u32a_rus[] = U"\\Догпатч"; + // BP_gdb_set_show_print_char_array_as_string_test } +void +cpp_stl_types_test(void) +{ +std::string std_string = "hello"; +// BP_cpp_stl_types_test +} + struct not_str { not_str(char _c, int _f) @@ -105,6 +118,7 @@ var_update_test(); var_list_children_test(); gdb_set_show_print_char_array_as_string_test(); +cpp_stl_types_test(); gdb_set_show_print_expand_aggregates(); gdb_set_show_print_aggregate_field_names(); return 0; // BP_return Inde
[Lldb-commits] [lldb] r249119 - Fix several issues around .ARM.exidx section handling
Author: tberghammer Date: Fri Oct 2 06:58:26 2015 New Revision: 249119 URL: http://llvm.org/viewvc/llvm-project?rev=249119&view=rev Log: Fix several issues around .ARM.exidx section handling * Use .ARM.exidx as a fallback unwind plan for non-call site when the instruction emulation based unwind failed. * Work around an old compiler issue where the compiler isn't sort the entries in .ARM.exidx based on their address. * Fix unwind info parsing when the virtual file address >= 0x8000 * Fix bug in unwind info parsing when neither lr nor pc is explicitly restored. Differential revision: http://reviews.llvm.org/D13380 Modified: lldb/trunk/include/lldb/Symbol/ArmUnwindInfo.h lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp lldb/trunk/source/Symbol/ArmUnwindInfo.cpp Modified: lldb/trunk/include/lldb/Symbol/ArmUnwindInfo.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ArmUnwindInfo.h?rev=249119&r1=249118&r2=249119&view=diff == --- lldb/trunk/include/lldb/Symbol/ArmUnwindInfo.h (original) +++ lldb/trunk/include/lldb/Symbol/ArmUnwindInfo.h Fri Oct 2 06:58:26 2015 @@ -43,6 +43,18 @@ public: GetUnwindPlan(Target &target, const Address& addr, UnwindPlan& unwind_plan); private: +struct ArmExidxEntry +{ +ArmExidxEntry(uint32_t f, lldb::addr_t a, uint32_t d); + +bool +operator<(const ArmExidxEntry& other) const; + +uint32_t file_address; +lldb::addr_t address; +uint32_t data; +}; + const uint8_t* GetExceptionHandlingTableEntry(const Address& addr); @@ -57,6 +69,7 @@ private: lldb::SectionSP m_arm_extab_sp; // .ARM.extab section DataExtractor m_arm_exidx_data; // .ARM.exidx section data DataExtractor m_arm_extab_data; // .ARM.extab section data +std::vector m_exidx_entries; }; } // namespace lldb_private Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp?rev=249119&r1=249118&r2=249119&view=diff == --- lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp (original) +++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp Fri Oct 2 06:58:26 2015 @@ -881,12 +881,12 @@ RegisterContextLLDB::GetFullUnwindPlanFo // then the architecture default plan and for hand written assembly code it is often // written in a way that it valid at all location what helps in the most common // cases when the instruction emulation fails. -UnwindPlanSP eh_frame_unwind_plan = func_unwinders_sp->GetEHFrameUnwindPlan (process->GetTarget(), m_current_offset_backed_up_one); -if (eh_frame_unwind_plan && -eh_frame_unwind_plan.get() != unwind_plan_sp.get() && -eh_frame_unwind_plan->GetSourceName() != unwind_plan_sp->GetSourceName()) +UnwindPlanSP call_site_unwind_plan = func_unwinders_sp->GetUnwindPlanAtCallSite(process->GetTarget(), m_current_offset_backed_up_one); +if (call_site_unwind_plan && +call_site_unwind_plan.get() != unwind_plan_sp.get() && +call_site_unwind_plan->GetSourceName() != unwind_plan_sp->GetSourceName()) { -m_fallback_unwind_plan_sp = eh_frame_unwind_plan; +m_fallback_unwind_plan_sp = call_site_unwind_plan; } else { @@ -926,12 +926,12 @@ RegisterContextLLDB::GetFullUnwindPlanFo // more reliable even on non call sites then the architecture default plan and for hand // written assembly code it is often written in a way that it valid at all location what // helps in the most common cases when the instruction emulation fails. -UnwindPlanSP eh_frame_unwind_plan = func_unwinders_sp->GetEHFrameUnwindPlan (process->GetTarget(), m_current_offset_backed_up_one); -if (eh_frame_unwind_plan && -eh_frame_unwind_plan.get() != unwind_plan_sp.get() && -eh_frame_unwind_plan->GetSourceName() != unwind_plan_sp->GetSourceName()) +UnwindPlanSP call_site_unwind_plan = func_unwinders_sp->GetUnwindPlanAtCallSite(process->GetTarget(), m_current_offset_backed_up_one); +if (call_site_unwind_plan && +call_site_unwind_plan.get() != unwind_plan_sp.get() && +call_site_unwind_plan->GetSourceName() != unwind_plan_sp->GetSourceName()) { -m_fallback_unwind_plan_sp = eh_frame_unwind_plan; +m_fallback_unwind_plan_sp = call_site_unwind_plan; } else { Modified: lldb/trunk/source/Symbol/ArmUnwindInfo.cpp URL: http://
Re: [Lldb-commits] [PATCH] D13380: Fix several issues around .ARM.exidx section handling
This revision was automatically updated to reflect the committed changes. Closed by commit rL249119: Fix several issues around .ARM.exidx section handling (authored by tberghammer). Changed prior to commit: http://reviews.llvm.org/D13380?vs=36338&id=36343#toc Repository: rL LLVM http://reviews.llvm.org/D13380 Files: lldb/trunk/include/lldb/Symbol/ArmUnwindInfo.h lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp lldb/trunk/source/Symbol/ArmUnwindInfo.cpp Index: lldb/trunk/include/lldb/Symbol/ArmUnwindInfo.h === --- lldb/trunk/include/lldb/Symbol/ArmUnwindInfo.h +++ lldb/trunk/include/lldb/Symbol/ArmUnwindInfo.h @@ -43,6 +43,18 @@ GetUnwindPlan(Target &target, const Address& addr, UnwindPlan& unwind_plan); private: +struct ArmExidxEntry +{ +ArmExidxEntry(uint32_t f, lldb::addr_t a, uint32_t d); + +bool +operator<(const ArmExidxEntry& other) const; + +uint32_t file_address; +lldb::addr_t address; +uint32_t data; +}; + const uint8_t* GetExceptionHandlingTableEntry(const Address& addr); @@ -57,6 +69,7 @@ lldb::SectionSP m_arm_extab_sp; // .ARM.extab section DataExtractor m_arm_exidx_data; // .ARM.exidx section data DataExtractor m_arm_extab_data; // .ARM.extab section data +std::vector m_exidx_entries; }; } // namespace lldb_private Index: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp === --- lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp +++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp @@ -881,12 +881,12 @@ // then the architecture default plan and for hand written assembly code it is often // written in a way that it valid at all location what helps in the most common // cases when the instruction emulation fails. -UnwindPlanSP eh_frame_unwind_plan = func_unwinders_sp->GetEHFrameUnwindPlan (process->GetTarget(), m_current_offset_backed_up_one); -if (eh_frame_unwind_plan && -eh_frame_unwind_plan.get() != unwind_plan_sp.get() && -eh_frame_unwind_plan->GetSourceName() != unwind_plan_sp->GetSourceName()) +UnwindPlanSP call_site_unwind_plan = func_unwinders_sp->GetUnwindPlanAtCallSite(process->GetTarget(), m_current_offset_backed_up_one); +if (call_site_unwind_plan && +call_site_unwind_plan.get() != unwind_plan_sp.get() && +call_site_unwind_plan->GetSourceName() != unwind_plan_sp->GetSourceName()) { -m_fallback_unwind_plan_sp = eh_frame_unwind_plan; +m_fallback_unwind_plan_sp = call_site_unwind_plan; } else { @@ -926,12 +926,12 @@ // more reliable even on non call sites then the architecture default plan and for hand // written assembly code it is often written in a way that it valid at all location what // helps in the most common cases when the instruction emulation fails. -UnwindPlanSP eh_frame_unwind_plan = func_unwinders_sp->GetEHFrameUnwindPlan (process->GetTarget(), m_current_offset_backed_up_one); -if (eh_frame_unwind_plan && -eh_frame_unwind_plan.get() != unwind_plan_sp.get() && -eh_frame_unwind_plan->GetSourceName() != unwind_plan_sp->GetSourceName()) +UnwindPlanSP call_site_unwind_plan = func_unwinders_sp->GetUnwindPlanAtCallSite(process->GetTarget(), m_current_offset_backed_up_one); +if (call_site_unwind_plan && +call_site_unwind_plan.get() != unwind_plan_sp.get() && +call_site_unwind_plan->GetSourceName() != unwind_plan_sp->GetSourceName()) { -m_fallback_unwind_plan_sp = eh_frame_unwind_plan; +m_fallback_unwind_plan_sp = call_site_unwind_plan; } else { Index: lldb/trunk/source/Symbol/ArmUnwindInfo.cpp === --- lldb/trunk/source/Symbol/ArmUnwindInfo.cpp +++ lldb/trunk/source/Symbol/ArmUnwindInfo.cpp @@ -30,14 +30,26 @@ using namespace lldb; using namespace lldb_private; -namespace +// Converts a prel31 avlue to lldb::addr_t with sign extension +static addr_t +Prel31ToAddr(uint32_t prel31) { -struct ArmExidxEntry -{ -uint32_t address; -uint32_t data; -}; -}; +addr_t res = prel31; +if (prel31 & (1<<30)) +res |= 0x8000ULL; +return res; +} + +ArmUnwindInfo::ArmExidxEntry::ArmExidxEntry(uint32_t f, lldb::addr_t a, uint32_t d) : +file_address(f), address(a), data(d) +{ +} + +bool +ArmUnwindInfo::ArmExidxEntry::operator<(const ArmExidxEntry& other) const +{ +return address < other.address; +} Ar
[Lldb-commits] [lldb] r249120 - Change expected stop reason in TestInferiorAssert for Android API <= 16
Author: tberghammer Date: Fri Oct 2 07:00:04 2015 New Revision: 249120 URL: http://llvm.org/viewvc/llvm-project?rev=249120&view=rev Log: Change expected stop reason in TestInferiorAssert for Android API <= 16 Modified: lldb/trunk/test/functionalities/inferior-assert/TestInferiorAssert.py Modified: lldb/trunk/test/functionalities/inferior-assert/TestInferiorAssert.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/inferior-assert/TestInferiorAssert.py?rev=249120&r1=249119&r2=249120&view=diff == --- lldb/trunk/test/functionalities/inferior-assert/TestInferiorAssert.py (original) +++ lldb/trunk/test/functionalities/inferior-assert/TestInferiorAssert.py Fri Oct 2 07:00:04 2015 @@ -55,7 +55,11 @@ class AssertingInferiorTestCase(TestBase lldbutil.run_break_set_by_file_and_line (self, "main.c", line, num_expected_locations=1, loc_exact=True) def check_stop_reason(self): -stop_reason = 'stop reason = signal SIGABRT' +if matchAndroid(api_levels=range(1, 16+1))(self): +# On android until API-16 the abort() call ended in a sigsegv instead of in a sigabrt +stop_reason = 'stop reason = signal SIGSEGV' +else: +stop_reason = 'stop reason = signal SIGABRT' # The stop reason of the thread should be an abort signal or exception. self.expect("thread list", STOPPED_DUE_TO_ASSERT, ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D13362: Enhance test runner timeout logic to detect successful completion of spawned process when stdout/stderr are shared to still-existing child processes
labath added a comment. In http://reviews.llvm.org/D13362#258314, @tfiala wrote: > The OS X one seems to be related to load (not terribly surprising). I'm > seeing timeouts as I crank up the --threads. But I don't think that's the > whole story. On the Linux side, I've been cranking down the threads and I'm > still seeing it. > > In light of the more fundamental issue I just filed here: > https://llvm.org/bugs/show_bug.cgi?id=25019 > > I'm going to address that piece first (upstream) before I take this part on > here. That part needs to be straightened out first. The then I'll come back > here. I think that is a reasonable course of action. Having three threads servicing the same process seems wasteful/hard to maintain and has a very big race potential. http://reviews.llvm.org/D13362 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D13362: Enhance test runner timeout logic to detect successful completion of spawned process when stdout/stderr are shared to still-existing child processes
tfiala added a comment. > I think that is a reasonable course of action. Having three threads servicing > the same process seems wasteful/hard to maintain and has a very big race > potential. Yeah I'm not liking how complex this is getting. I'll have more comments once I address the other issue depending on how the solution falls out. http://reviews.llvm.org/D13362 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] LLVM buildnaster will be restarted tonight
Hello everyone, LLVM buildmaster will be restarted after 6 PM Pacific time today. Sorry for the noise. Thanks Galina ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D13058: LLDB-MI: Bug when evaluating strings containing characters from non-ascii range
granata.enrico accepted this revision. granata.enrico added a comment. I am not deeply involved in MI internals, so I am going to assume you ran the test suite, and that you actually verified that types without summaries still work In general, once you opt into data formatters, you get a lot more than simply UTF handling. I understand that this is your rationale for the change, but you may want to make sure that MI still does the right thing if users define formatters for types that have nothing to do with strings (e.g. what if somebody does define a summary for int or float?) With that said, this looks reasonable, and an MI refactoring would be outside of my realm anyway. http://reviews.llvm.org/D13058 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r249167 - Made GetScratchTypeSystemForLanguage return an error if desired.
Author: spyffe Date: Fri Oct 2 13:40:30 2015 New Revision: 249167 URL: http://llvm.org/viewvc/llvm-project?rev=249167&view=rev Log: Made GetScratchTypeSystemForLanguage return an error if desired. Also made it not store nullptrs in its TypeSystemMap, so it will retry to make the AST context if it errored out last time. Modified: lldb/trunk/include/lldb/Target/Target.h lldb/trunk/source/DataFormatters/VectorType.cpp lldb/trunk/source/Expression/ExpressionSourceCode.cpp lldb/trunk/source/Expression/Materializer.cpp lldb/trunk/source/Plugins/Language/ObjC/CoreMedia.cpp lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp lldb/trunk/source/Target/Target.cpp lldb/trunk/source/Target/ThreadPlanTracer.cpp Modified: lldb/trunk/include/lldb/Target/Target.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Target.h?rev=249167&r1=249166&r2=249167&view=diff == --- lldb/trunk/include/lldb/Target/Target.h (original) +++ lldb/trunk/include/lldb/Target/Target.h Fri Oct 2 13:40:30 2015 @@ -1229,7 +1229,7 @@ public: GetImageSearchPathList (); TypeSystem * -GetScratchTypeSystemForLanguage (lldb::LanguageType language, bool create_on_demand = true); +GetScratchTypeSystemForLanguage (Error *error, lldb::LanguageType language, bool create_on_demand = true); PersistentExpressionState * GetPersistentExpressionStateForLanguage (lldb::LanguageType language); @@ -1506,7 +1506,7 @@ public: protected: ClangASTContext * -GetScratchClangASTContextImpl(); +GetScratchClangASTContextImpl(Error *error); //-- // Member variables. Modified: lldb/trunk/source/DataFormatters/VectorType.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/VectorType.cpp?rev=249167&r1=249166&r2=249167&view=diff == --- lldb/trunk/source/DataFormatters/VectorType.cpp (original) +++ lldb/trunk/source/DataFormatters/VectorType.cpp Fri Oct 2 13:40:30 2015 @@ -235,7 +235,7 @@ namespace lldb_private { TargetSP target_sp(m_backend.GetTargetSP()); m_child_type = ::GetCompilerTypeForFormat(m_parent_format, element_type, - target_sp ? target_sp->GetScratchTypeSystemForLanguage(lldb::eLanguageTypeC) : nullptr); + target_sp ? target_sp->GetScratchTypeSystemForLanguage(nullptr, lldb::eLanguageTypeC) : nullptr); m_num_children = ::CalculateNumChildren(parent_type, m_child_type); m_item_format = GetItemFormatForFormat(m_parent_format, Modified: lldb/trunk/source/Expression/ExpressionSourceCode.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ExpressionSourceCode.cpp?rev=249167&r1=249166&r2=249167&view=diff == --- lldb/trunk/source/Expression/ExpressionSourceCode.cpp (original) +++ lldb/trunk/source/Expression/ExpressionSourceCode.cpp Fri Oct 2 13:40:30 2015 @@ -83,7 +83,7 @@ bool ExpressionSourceCode::GetText (std: if (ClangModulesDeclVendor *decl_vendor = target->GetClangModulesDeclVendor()) { -ClangPersistentVariables *persistent_vars = llvm::cast(target->GetScratchTypeSystemForLanguage(lldb::eLanguageTypeC)->GetPersistentExpressionState()); +ClangPersistentVariables *persistent_vars = llvm::cast(target->GetPersistentExpressionStateForLanguage(lldb::eLanguageTypeC)); const ClangModulesDeclVendor::ModuleVector &hand_imported_modules = persistent_vars->GetHandLoadedClangModules(); ClangModulesDeclVendor::ModuleVector modules_for_macros; Modified: lldb/trunk/source/Expression/Materializer.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/Materializer.cpp?rev=249167&r1=249166&r2=249167&view=diff == --- lldb/trunk/source/Expression/Materializer.cpp (original) +++ lldb/trunk/source/Expression/Materializer.cpp Fri Oct 2 13:40:30 2015 @@ -857,11 +857,12 @@ public: return; } -TypeSystem *type_system = target_sp->GetScratchTypeSystemForLanguage(m_type.GetMinimumLanguage()); +Error type_system_error; +TypeSystem *type_system = target_sp->GetScratchTypeSystemForLanguage(&type_system_error, m_type.GetMinimumLanguage()); if (!type_system) { -err.SetErrorString("Couldn't dematerialize a result variable: coul
Re: [Lldb-commits] [PATCH] D13058: LLDB-MI: Bug when evaluating strings containing characters from non-ascii range
dawn added a comment. > You can use clang-format to follow the LLDB coding style, or just do the > following: So we've been telling folks to use clang-format, but it's not working correctly (my version is clang-format version 3.6.0 (217927)). It's turns: bool DoesPrintValue (lldb::SBValue value); into: bool DoesPrintValue (lldb::SBValue value); We have AlwaysBreakAfterDefinitionReturnType set to true, but that only works on function definitions. I see there is a patch for AlwaysBreakAfterDeclarationReturnType at http://reviews.llvm.org/D10370?id=27471, but it's not been accepted yet. So for now, we can't rely on clang-format for function declarations :( http://reviews.llvm.org/D13058 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D13058: LLDB-MI: Bug when evaluating strings containing characters from non-ascii range
dawn added a comment. This patch is good to commit now right? It's not marked "accepted" for some reason. http://reviews.llvm.org/D13058 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D13058: LLDB-MI: Bug when evaluating strings containing characters from non-ascii range
granata.enrico added a comment. I Thought I had marked it as good to go. My bad if I have not. - Enrico http://reviews.llvm.org/D13058 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D13058: LLDB-MI: Bug when evaluating strings containing characters from non-ascii range
I Thought I had marked it as good to go. My bad if I have not. - Enrico Sent from my iPhone > On Oct 2, 2015, at 1:12 PM, Dawn Perchik wrote: > > dawn added a comment. > > This patch is good to commit now right? It's not marked "accepted" for some > reason. > > > http://reviews.llvm.org/D13058 > > > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D13058: LLDB-MI: Bug when evaluating strings containing characters from non-ascii range
evgeny777 added a comment. Thanks for a good point. MI formatting refactoring will likely come soon as a separate review http://reviews.llvm.org/D13058 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D13058: LLDB-MI: Bug when evaluating strings containing characters from non-ascii range
ki.stfu added a comment. In http://reviews.llvm.org/D13058#258903, @dawn wrote: > This patch is good to commit now right? It's not marked "accepted" for some > reason. It's not "accepted" because @clayborg rejected this CL and hasn't changed his decision. But I think he doesn't mind if you will go ahead. http://reviews.llvm.org/D13058 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r249182 - Fix race on subprocess.Popen return values.
Author: tfiala Date: Fri Oct 2 15:51:11 2015 New Revision: 249182 URL: http://llvm.org/viewvc/llvm-project?rev=249182&view=rev Log: Fix race on subprocess.Popen return values. This fixes: https://llvm.org/bugs/show_bug.cgi?id=25019 Modified: lldb/trunk/test/test_runner/lib/process_control.py lldb/trunk/test/test_runner/test/process_control_tests.py Modified: lldb/trunk/test/test_runner/lib/process_control.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/test_runner/lib/process_control.py?rev=249182&r1=249181&r2=249182&view=diff == --- lldb/trunk/test/test_runner/lib/process_control.py (original) +++ lldb/trunk/test/test_runner/lib/process_control.py Fri Oct 2 15:51:11 2015 @@ -611,3 +611,48 @@ class ProcessDriver(object): self.io_thread.output, not completed_normally, self.returncode) + + +def patched_init(self, *args, **kwargs): +self.original_init(*args, **kwargs) +# Initialize our condition variable that protects wait()/poll(). +self.wait_condition = threading.Condition() + + +def patched_wait(self): +self.wait_condition.acquire() +try: +result = self.original_wait() +# The process finished. Signal the condition. +self.wait_condition.notify_all() +return result +finally: +self.wait_condition.release() + + +def patched_poll(self): +self.wait_condition.acquire() +try: +result = self.original_poll() +if self.returncode is not None: +# We did complete, and we have the return value. +# Signal the event to indicate we're done. +self.wait_condition.notify_all() +return result +finally: +self.wait_condition.release() + + +def patch_up_subprocess_popen(): +subprocess.Popen.original_init = subprocess.Popen.__init__ +subprocess.Popen.__init__ = patched_init + +subprocess.Popen.original_wait = subprocess.Popen.wait +subprocess.Popen.wait = patched_wait + +subprocess.Popen.original_poll = subprocess.Popen.poll +subprocess.Popen.poll = patched_poll + +# Replace key subprocess.Popen() threading-unprotected methods with +# threading-protected versions. +patch_up_subprocess_popen() Modified: lldb/trunk/test/test_runner/test/process_control_tests.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/test_runner/test/process_control_tests.py?rev=249182&r1=249181&r2=249182&view=diff == --- lldb/trunk/test/test_runner/test/process_control_tests.py (original) +++ lldb/trunk/test/test_runner/test/process_control_tests.py Fri Oct 2 15:51:11 2015 @@ -202,6 +202,9 @@ class ProcessControlTimeoutTests(Process """inferior exit detected when inferior children are live with shared stdout/stderr handles. """ +# Requires review D13362 or equivalent to be implemented. +self.skipTest("http://reviews.llvm.org/D13362";) + driver = TestInferiorDriver() # Create the inferior (I1), and instruct it to create a child (C1) @@ -220,7 +223,7 @@ class ProcessControlTimeoutTests(Process "process failed to complete") # Ensure we didn't receive a timeout. -self.assertTrue( +self.assertFalse( driver.was_timeout, "inferior should have completed normally") self.assertEqual( ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r249185 - Add hooks that enable NSSet, NSDictionary and NSString formatting to apply to other types beyond the well-known ones
Author: enrico Date: Fri Oct 2 15:59:58 2015 New Revision: 249185 URL: http://llvm.org/viewvc/llvm-project?rev=249185&view=rev Log: Add hooks that enable NSSet, NSDictionary and NSString formatting to apply to other types beyond the well-known ones This is meant to support languages that can do some sort of bridging from<-->to these ObjC types via types that statically vend themselves as Cocoa types, but dynamically have an implementation that does not match any of our well-known types, but where an introspecting formatter can be vended by the bridged language Added: lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.h lldb/trunk/source/Plugins/Language/ObjC/NSSet.h lldb/trunk/source/Plugins/Language/ObjC/NSString.cpp lldb/trunk/source/Plugins/Language/ObjC/NSString.h Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp lldb/trunk/source/Plugins/Language/ObjC/Cocoa.h lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.cpp Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=249185&r1=249184&r2=249185&view=diff == --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original) +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Fri Oct 2 15:59:58 2015 @@ -780,6 +780,7 @@ 94B6385D1B8FB178004FE1E4 /* CPlusPlusLanguage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94B6385B1B8FB174004FE1E4 /* CPlusPlusLanguage.cpp */; }; 94B638631B8FB7F1004FE1E4 /* ObjCPlusPlusLanguage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94B638621B8FB7F1004FE1E4 /* ObjCPlusPlusLanguage.cpp */; }; 94B6E76213D88365005F417F /* ValueObjectSyntheticFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94B6E76113D88362005F417F /* ValueObjectSyntheticFilter.cpp */; }; + 94B9E5121BBF20F4000A48DC /* NSString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94B9E5111BBF20F4000A48DC /* NSString.cpp */; }; 94BA8B6D176F8C9B005A91B5 /* Range.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94BA8B6C176F8C9B005A91B5 /* Range.cpp */; }; 94BA8B70176F97CE005A91B5 /* CommandHistory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94BA8B6F176F97CE005A91B5 /* CommandHistory.cpp */; }; 94CB255C16B069770059775D /* DataVisualization.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94CB255816B069770059775D /* DataVisualization.cpp */; }; @@ -2523,6 +2524,10 @@ 94B638621B8FB7F1004FE1E4 /* ObjCPlusPlusLanguage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ObjCPlusPlusLanguage.cpp; path = Language/ObjCPlusPlus/ObjCPlusPlusLanguage.cpp; sourceTree = ""; }; 94B6E76013D8833C005F417F /* ValueObjectSyntheticFilter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ValueObjectSyntheticFilter.h; path = include/lldb/Core/ValueObjectSyntheticFilter.h; sourceTree = ""; }; 94B6E76113D88362005F417F /* ValueObjectSyntheticFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectSyntheticFilter.cpp; path = source/Core/ValueObjectSyntheticFilter.cpp; sourceTree = ""; }; + 94B9E50E1BBEFDFE000A48DC /* NSDictionary.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NSDictionary.h; path = Language/ObjC/NSDictionary.h; sourceTree = ""; }; + 94B9E50F1BBF0069000A48DC /* NSSet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NSSet.h; path = Language/ObjC/NSSet.h; sourceTree = ""; }; + 94B9E5101BBF20B7000A48DC /* NSString.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NSString.h; path = Language/ObjC/NSString.h; sourceTree = ""; }; + 94B9E5111BBF20F4000A48DC /* NSString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NSString.cpp; path = Language/ObjC/NSString.cpp; sourceTree = ""; }; 94BA8B6C176F8C9B005A91B5 /* Range.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Range.cpp; path = source/Utility/Range.cpp; sourceTree = ""; }; 94BA8B6E176F8CA0005A91B5 /* Range.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Range.h; path = include/lldb/Utility/Range.h; sourceTree = ""; }; 94BA8B6F176F97CE005A91B5 /* CommandHistory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandHistory.cpp; path = source/Interpreter/CommandHistory.cpp; sou
[Lldb-commits] [lldb] r249189 - Fix the CMake build
Author: enrico Date: Fri Oct 2 16:14:38 2015 New Revision: 249189 URL: http://llvm.org/viewvc/llvm-project?rev=249189&view=rev Log: Fix the CMake build Modified: lldb/trunk/source/Plugins/Language/ObjC/CMakeLists.txt Modified: lldb/trunk/source/Plugins/Language/ObjC/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/CMakeLists.txt?rev=249189&r1=249188&r2=249189&view=diff == --- lldb/trunk/source/Plugins/Language/ObjC/CMakeLists.txt (original) +++ lldb/trunk/source/Plugins/Language/ObjC/CMakeLists.txt Fri Oct 2 16:14:38 2015 @@ -7,4 +7,5 @@ add_lldb_library(lldbPluginObjCLanguage NSDictionary.cpp NSIndexPath.cpp NSSet.cpp + NSString.cpp ) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D13362: Enhance test runner timeout logic to detect successful completion of spawned process when stdout/stderr are shared to still-existing child processes
tfiala abandoned this revision. tfiala added a comment. I've fixed: https://llvm.org/bugs/show_bug.cgi?id=25019 I think for now I am not interested in trying to tackle the intent of this change as it unduly complicates the timeout detection logic. I am okay with saying: "If you run a process http://reviews.llvm.org/P1, and that process creates child processes C1..CN, and shares the stdout/stderr file handles from http://reviews.llvm.org/P1 to C1..CN, and if http://reviews.llvm.org/P1 exits, we don't detect the exit until all stdout/stderr handles shared with C1..CN are closed." That's just a bad test if it is leaving children around. It will time out. Addressing that in Python should be possible, as I was working towards here, but I don't see that as being worthwhile. If we didn't time out (as was the case prior to an earlier fix yesterday), that would be an issue. But that's no longer the case. http://reviews.llvm.org/D13362 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D13234: Use the correct Python lib for each build configuration generated by the Visual Studio CMake generator
zturner added a comment. Hi Vadim, when I run CMake with this change I get the following output: [1/1] Re-running CMake... - Warning: Did not find file Compiler/MSVC-ASM - Target triple: i686-pc-win32 - Native target architecture is X86 - Threads enabled. - Doxygen disabled. - Sphinx disabled. - Go bindings disabled. - Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) - OCaml bindings disabled. - Using Debug VC++ CRT: MDd - Found PythonInterp: C:/Python27/python.exe (found version "2.7.8") - Constructing LLVMBuild project information - LLVMHello ignored -- Loadable modules not supported on this platform. - Targeting AArch64 - Targeting AMDGPU - Targeting ARM - Targeting BPF - Targeting CppBackend - Targeting Hexagon - Targeting Mips - Targeting MSP430 - Targeting NVPTX - Targeting PowerPC - Targeting Sparc - Targeting SystemZ - Targeting X86 - Targeting XCore - Clang version: 3.8.0 - SampleAnalyzerPlugin ignored -- Loadable modules not supported on this platform. - PrintFunctionNames ignored -- Loadable modules not supported on this platform. - LLD version: 3.8.0 - *Found PythonLibs: $<$:C:/Python27_LLDB/x86/libs/python27_d.lib>$<$>:C:/Python27_LLDB/x86/libs/python27.lib>* - LLDB version: 3.8.0 - Could NOT find LibXml2 (missing: LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR) - Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) - *Found PythonInterp: $<$:C:/Python27_LLDB/x86/python_d.exe>$<$>:C:/Python27_LLDB/x86/python.exe>* (found version "1.4") This doesn't seem right to me. Can you take a look and fix this? Repository: rL LLVM http://reviews.llvm.org/D13234 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D13028: Merge dsym and dwarf test cases
Hi Tamas, This breaks TestBuiltinTrap on Windows. Do you have any insight about why this might be happening? That test is not modified at all by this patch from what I can tell, but a bisect pinpoints this CL as the reason for the failure. On Thu, Oct 1, 2015 at 1:05 AM Ed Maste wrote: > emaste added a comment. > > > I'm leaving shortly to travel to EuroBSDCon so probably will not be able > to test before Wednesday, but I can investigate and update decorators as > appropriate afterwards. > > > A follow up - the tests look good on FreeBSD after this change. On my > branch with a few updates to FreeBSD expected failure decorators, > > [1/1] Testing LLDB (parallel execution, with a separate subprocess per > test) > Testing: 399 test suites, 8 threads > 399 out of 399 test suites processed - TestMiFile.py > Ran 399 test suites (0 failed) (0.00%) > Ran 322 test cases (0 failed) (0.00%) > > Unexpected Successes (1) > UNEXPECTED SUCCESS: LLDB (suite) :: TestRecursiveInferior.py (FreeBSD > feynman 10.2-STABLE FreeBSD 10.2-STABLE #44 r288174+7644546(stable-10): Thu > Sep 24 14:02:11 EDT 2015 > emaste@feynman:/tank/emaste/obj/tank/emaste/src/git-stable-10/sys/GENERIC > amd64 amd64) > 224.52 real 665.99 user 366.72 sys > > > Repository: > rL LLVM > > http://reviews.llvm.org/D13028 > > > > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D13028: Merge dsym and dwarf test cases
zturner added a comment. Hi Tamas, This breaks TestBuiltinTrap on Windows. Do you have any insight about why this might be happening? That test is not modified at all by this patch from what I can tell, but a bisect pinpoints this CL as the reason for the failure. Repository: rL LLVM http://reviews.llvm.org/D13028 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D13028: Merge dsym and dwarf test cases
zturner added a comment. Actually nevermind, the changed file list was cut off by the email, so I didn't see that it had been modified. It looks like you just didn't copy over the `@skipIfWindows` decorator. I can fix that easily, sorry for the noise. Repository: rL LLVM http://reviews.llvm.org/D13028 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r249203 - Fix TestCompDirSymLink.py - remove existing symlink leftovers if previous test run
Author: ovyalov Date: Fri Oct 2 17:37:55 2015 New Revision: 249203 URL: http://llvm.org/viewvc/llvm-project?rev=249203&view=rev Log: Fix TestCompDirSymLink.py - remove existing symlink leftovers if previous test run was terminated (e.g., due timeout). Modified: lldb/trunk/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py Modified: lldb/trunk/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py?rev=249203&r1=249202&r2=249203&view=diff == --- lldb/trunk/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py (original) +++ lldb/trunk/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py Fri Oct 2 17:37:55 2015 @@ -47,6 +47,8 @@ class CompDirSymLinkTestCase(TestBase): def create_src_symlink(self): pwd_symlink = os.path.join(os.getcwd(), 'pwd_symlink') +if os.path.exists(pwd_symlink): + os.unlink(pwd_symlink) os.symlink(os.getcwd(), pwd_symlink) self.addTearDownHook(lambda: os.remove(pwd_symlink)) return pwd_symlink ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r249207 - Remove instance reference of static member function.
Author: zturner Date: Fri Oct 2 17:47:14 2015 New Revision: 249207 URL: http://llvm.org/viewvc/llvm-project?rev=249207&view=rev Log: Remove instance reference of static member function. Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp?rev=249207&r1=249206&r2=249207&view=diff == --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp (original) +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Fri Oct 2 17:47:14 2015 @@ -1597,15 +1597,14 @@ public: bool Finalize() { -ClangASTContext *ast = llvm::cast(m_class_opaque_type.GetTypeSystem()); -return ast->AddObjCClassProperty (m_class_opaque_type, - m_property_name, - m_property_opaque_type, - m_ivar_decl, - m_property_setter_name, - m_property_getter_name, - m_property_attributes, - m_metadata_ap.get()); +return ClangASTContext::AddObjCClassProperty (m_class_opaque_type, + m_property_name, + m_property_opaque_type, + m_ivar_decl, + m_property_setter_name, + m_property_getter_name, + m_property_attributes, + m_metadata_ap.get()); } private: ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r249209 - Re-disable TestBuiltinTrap on Windows.
Author: zturner Date: Fri Oct 2 17:47:37 2015 New Revision: 249209 URL: http://llvm.org/viewvc/llvm-project?rev=249209&view=rev Log: Re-disable TestBuiltinTrap on Windows. This was inadvertently re-enabled as a in r248883. Modified: lldb/trunk/test/linux/builtin_trap/TestBuiltinTrap.py Modified: lldb/trunk/test/linux/builtin_trap/TestBuiltinTrap.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/linux/builtin_trap/TestBuiltinTrap.py?rev=249209&r1=249208&r2=249209&view=diff == --- lldb/trunk/test/linux/builtin_trap/TestBuiltinTrap.py (original) +++ lldb/trunk/test/linux/builtin_trap/TestBuiltinTrap.py Fri Oct 2 17:47:37 2015 @@ -21,6 +21,7 @@ class BuiltinTrapTestCase(TestBase): @expectedFailureAll("llvm.org/pr15936", compiler="gcc", compiler_version=["<=","4.6"]) @expectedFailureAll(archs="arm", compiler="gcc", triple=".*-android") # gcc generates incorrect linetable +@skipIfWindows def test_with_run_command(self): """Test that LLDB handles a function with __builtin_trap correctly.""" self.build() ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r249208 - Updated xfail / skip status on a few tests.
Author: zturner Date: Fri Oct 2 17:47:28 2015 New Revision: 249208 URL: http://llvm.org/viewvc/llvm-project?rev=249208&view=rev Log: Updated xfail / skip status on a few tests. TestDiamond and TestSBValueCast were due to a bug in clang. That bug has been fixed, so xfail is removed. However fixing that bug exposed another bug in clang, which is not yet fixed. That bug causes one test to start crashing, and another to fail unexpectedly so the status of those tests is updated as well. Modified: lldb/trunk/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py lldb/trunk/test/lang/cpp/diamond/TestDiamond.py lldb/trunk/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py lldb/trunk/test/lang/cpp/wchar_t/TestCxxWCharT.py Modified: lldb/trunk/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py?rev=249208&r1=249207&r2=249208&view=diff == --- lldb/trunk/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py (original) +++ lldb/trunk/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py Fri Oct 2 17:47:28 2015 @@ -11,6 +11,7 @@ class CPPBreakpointCommandsTestCase(Test mydir = TestBase.compute_mydir(__file__) +@expectedFailureWindows def test(self): """Test a sequence of breakpoint command add, list, and delete.""" self.build() Modified: lldb/trunk/test/lang/cpp/diamond/TestDiamond.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/diamond/TestDiamond.py?rev=249208&r1=249207&r2=249208&view=diff == --- lldb/trunk/test/lang/cpp/diamond/TestDiamond.py (original) +++ lldb/trunk/test/lang/cpp/diamond/TestDiamond.py Fri Oct 2 17:47:28 2015 @@ -9,7 +9,6 @@ class CPPTestDiamondInheritance(TestBase mydir = TestBase.compute_mydir(__file__) -@expectedFailureWindows("llvm.org/pr24764") def test_with_run_command(self): """Test that virtual base classes work in when SBValue objects are used to explore the variable value""" self.build() Modified: lldb/trunk/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py?rev=249208&r1=249207&r2=249208&view=diff == --- lldb/trunk/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py (original) +++ lldb/trunk/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py Fri Oct 2 17:47:28 2015 @@ -20,6 +20,7 @@ class TestCppIncompleteTypes(TestBase): self.assertFalse(value_a.GetError().Success(), "'expr a' results in an error, but LLDB does not crash") @skipIfGcc +@skipIfWindows # Clang on Windows asserts in external record layout in this case. def test_partial_limit_debug_info(self): self.build() frame = self.get_test_frame('nolimit') Modified: lldb/trunk/test/lang/cpp/wchar_t/TestCxxWCharT.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/wchar_t/TestCxxWCharT.py?rev=249208&r1=249207&r2=249208&view=diff == --- lldb/trunk/test/lang/cpp/wchar_t/TestCxxWCharT.py (original) +++ lldb/trunk/test/lang/cpp/wchar_t/TestCxxWCharT.py Fri Oct 2 17:47:28 2015 @@ -20,7 +20,6 @@ class CxxWCharTTestCase(TestBase): self.source = 'main.cpp' self.line = line_number(self.source, '// Set break point at this line.') -@expectedFailureWindows("llvm.org/pr24764") def test(self): """Test that C++ supports wchar_t correctly.""" self.build() ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r249206 - Have a clean(er) shutdown when detaching from a process.
Author: zturner Date: Fri Oct 2 17:47:04 2015 New Revision: 249206 URL: http://llvm.org/viewvc/llvm-project?rev=249206&view=rev Log: Have a clean(er) shutdown when detaching from a process. Modified: lldb/trunk/source/Plugins/Process/Windows/Live/DebuggerThread.cpp Modified: lldb/trunk/source/Plugins/Process/Windows/Live/DebuggerThread.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Live/DebuggerThread.cpp?rev=249206&r1=249205&r2=249206&view=diff == --- lldb/trunk/source/Plugins/Process/Windows/Live/DebuggerThread.cpp (original) +++ lldb/trunk/source/Plugins/Process/Windows/Live/DebuggerThread.cpp Fri Oct 2 17:47:04 2015 @@ -304,20 +304,13 @@ DebuggerThread::DebugLoop() { case EXCEPTION_DEBUG_EVENT: { -if (m_is_shutting_down) -{ -// Don't perform any blocking operations while we're shutting down. That will -// cause TerminateProcess -> WaitForSingleObject to time out. -continue_status = DBG_EXCEPTION_NOT_HANDLED; -break; -} - ExceptionResult status = HandleExceptionEvent(dbe.u.Exception, dbe.dwThreadId); if (status == ExceptionResult::MaskException) continue_status = DBG_CONTINUE; else if (status == ExceptionResult::SendToApplication) continue_status = DBG_EXCEPTION_NOT_HANDLED; + break; } case CREATE_THREAD_DEBUG_EVENT: @@ -377,6 +370,24 @@ DebuggerThread::DebugLoop() ExceptionResult DebuggerThread::HandleExceptionEvent(const EXCEPTION_DEBUG_INFO &info, DWORD thread_id) { +if (m_is_shutting_down) +{ +// A breakpoint that occurs while `m_pid_to_detach` is non-zero is a magic exception that +// we use simply to wake up the DebuggerThread so that we can close out the debug loop. +if (m_pid_to_detach != 0 && info.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT) +{ +WINLOG_IFANY(WINDOWS_LOG_EVENT | WINDOWS_LOG_EXCEPTION | WINDOWS_LOG_PROCESS, +"Breakpoint exception is cue to detach from process 0x%x", +m_pid_to_detach); +::DebugActiveProcessStop(m_pid_to_detach); +m_detached = true; +} + +// Don't perform any blocking operations while we're shutting down. That will +// cause TerminateProcess -> WaitForSingleObject to time out. +return ExceptionResult::SendToApplication; +} + bool first_chance = (info.dwFirstChance != 0); m_active_exception.reset(new ExceptionRecord(info.ExceptionRecord, thread_id)); @@ -384,18 +395,6 @@ DebuggerThread::HandleExceptionEvent(con "HandleExceptionEvent encountered %s chance exception 0x%x on thread 0x%x", first_chance ? "first" : "second", info.ExceptionRecord.ExceptionCode, thread_id); -if (m_pid_to_detach != 0 && m_active_exception->GetExceptionCode() == EXCEPTION_BREAKPOINT) { -WINLOG_IFANY(WINDOWS_LOG_EVENT | WINDOWS_LOG_EXCEPTION | WINDOWS_LOG_PROCESS, - "Breakpoint exception is cue to detach from process 0x%x", - m_pid_to_detach); -if (::DebugActiveProcessStop(m_pid_to_detach)) { -m_detached = true; -return ExceptionResult::MaskException; -} else { -WINLOG_IFANY(WINDOWS_LOG_PROCESS, "Failed to detach, treating as a regular breakpoint"); -} -} - ExceptionResult result = m_debug_delegate->OnDebugException(first_chance, *m_active_exception); m_exception_pred.SetValue(result, eBroadcastNever); ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r249210 - Do not attempt to join the remote paths if none exist
Author: enrico Date: Fri Oct 2 17:53:32 2015 New Revision: 249210 URL: http://llvm.org/viewvc/llvm-project?rev=249210&view=rev Log: Do not attempt to join the remote paths if none exist Modified: lldb/trunk/test/lldbtest.py Modified: lldb/trunk/test/lldbtest.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=249210&r1=249209&r2=249210&view=diff == --- lldb/trunk/test/lldbtest.py (original) +++ lldb/trunk/test/lldbtest.py Fri Oct 2 17:53:32 2015 @@ -2407,7 +2407,7 @@ class TestBase(Base): if lldb.pre_flight: lldb.pre_flight(self) -if lldb.remote_platform: +if lldb.remote_platform and lldb.remote_platform_working_dir: remote_test_dir = lldbutil.join_remote_paths( lldb.remote_platform_working_dir, self.getArchitecture(), ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D13404: Teach CMake to find versions of Python != 2.7
zturner created this revision. zturner added a reviewer: enlight. zturner added a subscriber: lldb-commits. Hi Vadim, Would you mind taking a look at this? My CMake-fu is only level 5, so if you have any suggestions on how to improve this, let me know. Note that I'm claiming with this revision that LLDB itself works with Python versions other than 2.7. Only that CMake can set all the variables appropriately if you point it to a different version of CMake http://reviews.llvm.org/D13404 Files: cmake/modules/LLDBConfig.cmake cmake/modules/LLDBStandalone.cmake Index: cmake/modules/LLDBStandalone.cmake === --- cmake/modules/LLDBStandalone.cmake +++ cmake/modules/LLDBStandalone.cmake @@ -50,7 +50,7 @@ # Verify that we can find a Python 2 interpreter. Python 3 is unsupported. if (PYTHON_EXECUTABLE STREQUAL "") -set(Python_ADDITIONAL_VERSIONS 2.7 2.6 2.5) +set(Python_ADDITIONAL_VERSIONS 3.5 3.4 3.3 3.2 3.1 3.0 2.7 2.6 2.5) include(FindPythonInterp) if( NOT PYTHONINTERP_FOUND ) message(FATAL_ERROR Index: cmake/modules/LLDBConfig.cmake === --- cmake/modules/LLDBConfig.cmake +++ cmake/modules/LLDBConfig.cmake @@ -37,6 +37,87 @@ add_definitions( -DLLDB_DISABLE_CURSES ) endif() +# On Windows, we can't use the normal FindPythonLibs module that comes with CMake, +# for a number of reasons. +# 1) Prior to MSVC 2015, it is only possible to embed Python if python itself was +#compiled with an identical version (and build configuration) of MSVC as LLDB. +#The standard algorithm does not take into account the differences between +#a binary release distribution of python and a custom built distribution. +# 2) From MSVC 2015 and onwards, it is only possible to use Python 3.5 or later. +# 3) FindPythonLibs queries the registry to locate Python, and when looking for a +#64-bit version of Python, since cmake.exe is a 32-bit executable, it will see +#a 32-bit view of the registry. As such, it is impossible for FindPythonLibs to +#locate 64-bit Python libraries. +# This function is designed to address those limitations. Currently it only partially +# addresses them, but it can be improved and extended on an as-needed basis. +function(find_python_libs_windows) + if ("${PYTHON_HOME}" STREQUAL "") +message("LLDB embedded Python on Windows requires specifying a value for PYTHON_HOME. Python support disabled.") +set(LLDB_DISABLE_PYTHON 1) +return() + endif() + + file(TO_CMAKE_PATH "${PYTHON_HOME}/Include" PYTHON_INCLUDE_DIR) + + if(EXISTS "${PYTHON_INCLUDE_DIR}/patchlevel.h") +file(STRINGS "${PYTHON_INCLUDE_DIR}/patchlevel.h" python_version_str + REGEX "^#define[ \t]+PY_VERSION[ \t]+\"[^\"]+\"") +string(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"]+)\".*" "\\1" + PYTHONLIBS_VERSION_STRING "${python_version_str}") +message("-- Found Python version ${PYTHONLIBS_VERSION_STRING}") +string(REGEX REPLACE "([0-9]+)[.]([0-9]+)[.][0-9]+" "python\\1\\2" PYTHONLIBS_BASE_NAME "${PYTHONLIBS_VERSION_STRING}") +unset(python_version_str) + else() +message("Unable to find ${PYTHON_INCLUDE_DIR}/patchlevel.h, Python installation is corrupt.") +message("Python support will be disabled for this build.") +set(LLDB_DISABLE_PYTHON 1) +return() + endif() + + file(TO_CMAKE_PATH "${PYTHON_HOME}" PYTHON_HOME) + file(TO_CMAKE_PATH "${PYTHON_HOME}/python_d.exe" PYTHON_DEBUG_EXE) + file(TO_CMAKE_PATH "${PYTHON_HOME}/libs/${PYTHONLIBS_BASE_NAME}_d.lib" PYTHON_DEBUG_LIB) + file(TO_CMAKE_PATH "${PYTHON_HOME}/${PYTHONLIBS_BASE_NAME}_d.dll" PYTHON_DEBUG_DLL) + + file(TO_CMAKE_PATH "${PYTHON_HOME}/python.exe" PYTHON_RELEASE_EXE) + file(TO_CMAKE_PATH "${PYTHON_HOME}/libs/${PYTHONLIBS_BASE_NAME}.lib" PYTHON_RELEASE_LIB) + file(TO_CMAKE_PATH "${PYTHON_HOME}/${PYTHONLIBS_BASE_NAME}.dll" PYTHON_RELEASE_DLL) + + # Generator expressions are evaluated in the context of each build configuration generated + # by CMake. Here we use the $:VALUE logical generator expression to ensure + # that the debug Python library, DLL, and executable are used in the Debug build configuration. + # + # Generator expressions can be difficult to grok at first so here's a breakdown of the one + # used for PYTHON_LIBRARY: + # + # 1. $ evaluates to 1 when the Debug configuration is being generated, + #or 0 in all other cases. + # 2. $<$:${PYTHON_DEBUG_LIB}> expands to ${PYTHON_DEBUG_LIB} when the Debug + #configuration is being generated, or nothing (literally) in all other cases. + # 3. $<$>:${PYTHON_RELEASE_LIB}> expands to ${PYTHON_RELEASE_LIB} when + #any configuration other than Debug is being generated, or nothing in all other cases. + # 4. The conditionals in 2 & 3 are mutually exclusive. + # 5. A logical expression with a conditional that evaluates to 0 yields no val
Re: [Lldb-commits] [PATCH] D13404: Teach CMake to find versions of Python != 2.7
On Fri, Oct 2, 2015 at 5:54 PM Zachary Turner wrote: > > Note that I'm claiming with this revision that LLDB itself works with > Python versions other than 2.7. s/claiming/*not* claiming/ ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D13234: Use the correct Python lib for each build configuration generated by the Visual Studio CMake generator
enlight added a comment. That looks fine to me. CMake prints those messages during the configuration step, at that point the generator expressions haven't been expanded yet. I could prettify those messages a bit to read: `Found PythonLibs: C:/Python27_LLDB/x86/libs/python27_d.lib and C:/Python27_LLDB/x86/libs/python27.lib`. Repository: rL LLVM http://reviews.llvm.org/D13234 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D13234: Use the correct Python lib for each build configuration generated by the Visual Studio CMake generator
Yea that's what I meant. Everything works, but the configuration step is supposed to print out stuff that people can read at a glance. So prettifying it would be desirable. On Fri, Oct 2, 2015 at 10:39 PM Vadim Macagon wrote: > enlight added a comment. > > That looks fine to me. CMake prints those messages during the > configuration step, at that point the generator expressions haven't been > expanded yet. I could prettify those messages a bit to read: `Found > PythonLibs: C:/Python27_LLDB/x86/libs/python27_d.lib and > C:/Python27_LLDB/x86/libs/python27.lib`. > > > Repository: > rL LLVM > > http://reviews.llvm.org/D13234 > > > > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits