Re: [Lldb-commits] [PATCH] D12025: Make LLDB URLs to support hex encoding for special symbols

2015-08-14 Thread Tamas Berghammer via lldb-commits
tberghammer added a comment.

The implementation looks good, but I don't like the approach you try to handle 
the problem.

I think you do far too much work to use UriParser in a case where it isn't 
necessary and isn't make things easier. I think a better (and definitely 
simpler) solution would be to change only ConnectionFileDescriptorPosix.cpp to 
parse the adb addresses with a locally specified regexp or with looking for the 
last colon in the address and split the address to host and port based on that.


http://reviews.llvm.org/D12025



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


Re: [Lldb-commits] [PATCH] D11987: Fix to handle AArch64 watchpoint exception before instruction being watched is executed

2015-08-14 Thread Tamas Berghammer via lldb-commits
tberghammer accepted this revision.
tberghammer added a comment.

LGTM


http://reviews.llvm.org/D11987



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


Re: [Lldb-commits] [PATCH] D12025: Make LLDB URLs to support hex encoding for special symbols

2015-08-14 Thread Oleksiy Vyalov via lldb-commits
ovyalov added a comment.

In http://reviews.llvm.org/D12025#224355, @tberghammer wrote:

> The implementation looks good, but I don't like the approach you try to 
> handle the problem.
>
> I think you do far too much work to use UriParser in a case where it isn't 
> necessary and isn't make things easier. I think a better (and definitely 
> simpler) solution would be to change only ConnectionFileDescriptorPosix.cpp 
> to parse the adb addresses with a locally specified regexp or with looking 
> for the last colon in the address and split the address to host and port 
> based on that.


The problem that connection url goes all way down 
PlatformAndroid::ConnectRemote-> 
PlatformAndroidRemoteGDBServer::ConnectRemote->PlatformRemoteGDBServer::ConnectRemote
 whiles it reaches ConnectionFileDescriptorPosix::Connect. Within each 
ConnectRemote we call UriParser::Parse  - either to verify url correctness or 
fetch device_id from adb url. In this case we may need to have special handling 
for adb protocol inside of UriParser::Parse to pass it through  - I'm not very 
happy to bring protocol-specific knowledge to this class.


http://reviews.llvm.org/D12025



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


[Lldb-commits] [lldb] r244935 - Remove raw_svector_ostream::flush() call following r244928.

2015-08-14 Thread Yaron Keren via lldb-commits
Author: yrnkrn
Date: Thu Aug 13 13:42:29 2015
New Revision: 244935

URL: http://llvm.org/viewvc/llvm-project?rev=244935&view=rev
Log:
Remove raw_svector_ostream::flush() call following r244928.


Modified:
lldb/trunk/source/Host/posix/HostInfoPosix.cpp

Modified: lldb/trunk/source/Host/posix/HostInfoPosix.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/HostInfoPosix.cpp?rev=244935&r1=244934&r2=244935&view=diff
==
--- lldb/trunk/source/Host/posix/HostInfoPosix.cpp (original)
+++ lldb/trunk/source/Host/posix/HostInfoPosix.cpp Thu Aug 13 13:42:29 2015
@@ -217,7 +217,6 @@ HostInfoPosix::ComputePythonDirectory(Fi
 llvm::SmallString<256> python_version_dir;
 llvm::raw_svector_ostream os(python_version_dir);
 os << "/python" << PY_MAJOR_VERSION << '.' << PY_MINOR_VERSION << 
"/site-packages";
-os.flush();
 
 // We may get our string truncated. Should we protect this with an assert?
 ::strncat(raw_path, python_version_dir.c_str(), sizeof(raw_path) - 
strlen(raw_path) - 1);


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


[Lldb-commits] [lldb] r244936 - Remove more uses of raw_svector_ostream::flush() call following r244928.

2015-08-14 Thread Yaron Keren via lldb-commits
Author: yrnkrn
Date: Thu Aug 13 13:48:44 2015
New Revision: 244936

URL: http://llvm.org/viewvc/llvm-project?rev=244936&view=rev
Log:
Remove more uses of raw_svector_ostream::flush() call following r244928.


Modified:
lldb/trunk/source/Host/macosx/HostInfoMacOSX.mm
lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
lldb/trunk/source/Symbol/ClangASTContext.cpp

Modified: lldb/trunk/source/Host/macosx/HostInfoMacOSX.mm
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/HostInfoMacOSX.mm?rev=244936&r1=244935&r2=244936&view=diff
==
--- lldb/trunk/source/Host/macosx/HostInfoMacOSX.mm (original)
+++ lldb/trunk/source/Host/macosx/HostInfoMacOSX.mm Thu Aug 13 13:48:44 2015
@@ -198,7 +198,6 @@ HostInfoMacOSX::ComputePythonDirectory(F
 llvm::SmallString<256> python_version_dir;
 llvm::raw_svector_ostream os(python_version_dir);
 os << "/python" << PY_MAJOR_VERSION << '.' << PY_MINOR_VERSION << 
"/site-packages";
-os.flush();
 
 // We may get our string truncated. Should we protect this with an 
assert?
 raw_path.append(python_version_dir.c_str());

Modified: lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp?rev=244936&r1=244935&r2=244936&view=diff
==
--- lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp (original)
+++ lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp Thu Aug 
13 13:48:44 2015
@@ -518,7 +518,6 @@ DisassemblerLLVMC::LLVMCDisassembler::Pr
 llvm::raw_svector_ostream inst_stream(inst_string);
 m_instr_printer_ap->printInst (&mc_inst, inst_stream, unused_annotations,
*m_subtarget_info_ap);
-inst_stream.flush();
 const size_t output_size = std::min(dst_len - 1, inst_string.size());
 std::memcpy(dst, inst_string.data(), output_size);
 dst[output_size] = '\0';

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=244936&r1=244935&r2=244936&view=diff
==
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Thu Aug 13 13:48:44 2015
@@ -8811,7 +8811,6 @@ ClangASTContext::DumpTypeDescription (vo
 }
 }
 
-llvm_ostrm.flush();
 if (buf.size() > 0)
 {
 s->Write (buf.data(), buf.size());


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


[Lldb-commits] [lldb] r245066 - Update dosep to print unexpected successes at the end.

2015-08-14 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Fri Aug 14 11:45:32 2015
New Revision: 245066

URL: http://llvm.org/viewvc/llvm-project?rev=245066&view=rev
Log:
Update dosep to print unexpected successes at the end.

Modified:
lldb/trunk/test/dosep.py

Modified: lldb/trunk/test/dosep.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dosep.py?rev=245066&r1=245065&r2=245066&view=diff
==
--- lldb/trunk/test/dosep.py (original)
+++ lldb/trunk/test/dosep.py Fri Aug 14 11:45:32 2015
@@ -121,6 +121,7 @@ def update_progress(test_name=""):
 def parse_test_results(output):
 passes = 0
 failures = 0
+unexpected_successes = 0
 for result in output:
 pass_count = re.search("^RESULT:.*([0-9]+) passes",
result, re.MULTILINE)
@@ -128,16 +129,20 @@ def parse_test_results(output):
result, re.MULTILINE)
 error_count = re.search("^RESULT:.*([0-9]+) errors",
 result, re.MULTILINE)
+unexpected_success_count = re.search("^RESULT:.*([0-9]+) unexpected 
successes",
+ result, re.MULTILINE)
 this_fail_count = 0
 this_error_count = 0
 if pass_count is not None:
 passes = passes + int(pass_count.group(1))
 if fail_count is not None:
 failures = failures + int(fail_count.group(1))
+if unexpected_success_count is not None:
+unexpected_successes = unexpected_successes + 
int(unexpected_success_count.group(1))
 if error_count is not None:
 failures = failures + int(error_count.group(1))
 pass
-return passes, failures
+return passes, failures, unexpected_successes
 
 
 def call_with_timeout(command, timeout, name):
@@ -161,14 +166,14 @@ def call_with_timeout(command, timeout,
stderr=subprocess.PIPE)
 output = process.communicate()
 exit_status = process.returncode
-passes, failures = parse_test_results(output)
+passes, failures, unexpected_successes = parse_test_results(output)
 if exit_status == 0:
 # stdout does not have any useful information from 'dotest.py',
 # only stderr does.
 report_test_pass(name, output[1])
 else:
 report_test_failure(name, command, output[1])
-return name, exit_status, passes, failures
+return name, exit_status, passes, failures, unexpected_successes
 
 
 def process_dir(root, files, test_root, dotest_argv):
@@ -187,17 +192,20 @@ def process_dir(root, files, test_root,
 
 results.append(call_with_timeout(command, timeout, name))
 
-# result = (name, status, passes, failures)
-timed_out = [name for name, status, _, _ in results
+# result = (name, status, passes, failures, unexpected_successes)
+timed_out = [name for name, status, _, _, _ in results
  if status == eTimedOut]
-passed = [name for name, status, _, _ in results
+passed = [name for name, status, _, _, _ in results
   if status == ePassed]
-failed = [name for name, status, _, _ in results
+failed = [name for name, status, _, _, _ in results
   if status != ePassed]
+unexpected_passes = [name for name, _, _, _, unexpected_successes in 
results
+ if unexpected_successes > 0]
+
 pass_count = sum([result[2] for result in results])
 fail_count = sum([result[3] for result in results])
 
-return (timed_out, passed, failed, pass_count, fail_count)
+return (timed_out, passed, failed, unexpected_passes, pass_count, 
fail_count)
 
 in_q = None
 out_q = None
@@ -255,14 +263,15 @@ def walk_and_invoke(test_directory, test
 else:
 test_results = map(process_dir_worker, test_work_items)
 
-# result = (timed_out, failed, passed, fail_count, pass_count)
+# result = (timed_out, failed, passed, unexpected_successes, fail_count, 
pass_count)
 timed_out = sum([result[0] for result in test_results], [])
 passed = sum([result[1] for result in test_results], [])
 failed = sum([result[2] for result in test_results], [])
-pass_count = sum([result[3] for result in test_results])
-fail_count = sum([result[4] for result in test_results])
+unexpected_successes = sum([result[3] for result in test_results], [])
+pass_count = sum([result[4] for result in test_results])
+fail_count = sum([result[5] for result in test_results])
 
-return (timed_out, passed, failed, pass_count, fail_count)
+return (timed_out, passed, failed, unexpected_successes, pass_count, 
fail_count)
 
 
 def getExpectedTimeouts(platform_name):
@@ -433,7 +442,7 @@ Run lldb test suite using a separate pro
 num_threads = 1
 
 system_info = " ".join(platform.uname())
-(timed_out, passed, failed, pass_count, fail_count) = walk_and_invoke(
+(timed_out, passed, failed, un

Re: [Lldb-commits] [lldb] r245020 - [MIPS]Handle floating point and aggregate return types in SysV-mips [32 bit] ABI

2015-08-14 Thread Hans Wennborg via lldb-commits
Sure, if Greg approves.

Thanks,
Hans

On Thu, Aug 13, 2015 at 11:25 PM, Bhushan Attarde
 wrote:
> Hi Hans,
>
> Could you please merge this to the release branch?
>
> Thanks
> Bhushan
>
>
> -Original Message-
> From: lldb-commits [mailto:lldb-commits-boun...@lists.llvm.org] On Behalf Of 
> Bhushan D. Attarde via lldb-commits
> Sent: 14 August 2015 09:11
> To: lldb-commits@lists.llvm.org
> Subject: [Lldb-commits] [lldb] r245020 - [MIPS]Handle floating point and 
> aggregate return types in SysV-mips [32 bit] ABI
>
> Author: bhushan.attarde
> Date: Thu Aug 13 22:40:31 2015
> New Revision: 245020
>
> URL: http://llvm.org/viewvc/llvm-project?rev=245020&view=rev
> Log:
> [MIPS]Handle floating point and aggregate return types in SysV-mips [32 bit] 
> ABI
>
> SUMMARY:
> This patch adds support of floating point and aggregate return types in 
> GetReturnValueObjectImpl() for mips32
>
> Reviewers: clayborg
> Subscribers: mohit.bhakkad,  nitesh.jain, sagar, jaydeep, lldb-commits
> Differential Revision: http://reviews.llvm.org/D11930
>
> Modified:
> lldb/trunk/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp
>
> Modified: lldb/trunk/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp
> URL: 
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp?rev=245020&r1=245019&r2=245020&view=diff
> ==
> --- lldb/trunk/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp (original)
> +++ lldb/trunk/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp Thu Aug 13 
> 22:40:31 2015
> @@ -423,15 +423,16 @@ ABISysV_mips::GetReturnValueObjectImpl (
>  if (!reg_ctx)
>  return return_valobj_sp;
>
> -bool is_signed;
> +bool is_signed = false;
> +bool is_complex = false;
> +uint32_t count = 0;
>
>  // In MIPS register "r2" (v0) holds the integer function return values
>  const RegisterInfo *r2_reg_info = reg_ctx->GetRegisterInfoByName("r2", 
> 0);
> +size_t bit_width = return_clang_type.GetBitSize(&thread);
>
>  if (return_clang_type.IsIntegerType (is_signed))
>  {
> -size_t bit_width = return_clang_type.GetBitSize(&thread);
> -
>  switch (bit_width)
>  {
>  default:
> @@ -473,6 +474,52 @@ ABISysV_mips::GetReturnValueObjectImpl (
>  uint32_t ptr = 
> thread.GetRegisterContext()->ReadRegisterAsUnsigned(r2_reg_info, 0) & 
> UINT32_MAX;
>  value.GetScalar() = ptr;
>  }
> +else if (return_clang_type.IsAggregateType ())
> +{
> +// Structure/Vector is always passed in memory and pointer to that 
> memory is passed in r2.
> +uint64_t mem_address = 
> reg_ctx->ReadRegisterAsUnsigned(reg_ctx->GetRegisterInfoByName("r2", 0), 0);
> +// We have got the address. Create a memory object out of it
> +return_valobj_sp = ValueObjectMemory::Create (&thread,
> +  "",
> +  Address (mem_address, 
> NULL),
> +  return_clang_type);
> +return return_valobj_sp;
> +}
> +else if (return_clang_type.IsFloatingPointType (count, is_complex))
> +{
> +const RegisterInfo *f0_info = reg_ctx->GetRegisterInfoByName("f0", 
> 0);
> +const RegisterInfo *f1_info = reg_ctx->GetRegisterInfoByName("f1", 
> 0);
> +
> +if (count == 1 && !is_complex)
> +{
> +switch (bit_width)
> +{
> +default:
> +return return_valobj_sp;
> +case 64:
> +{
> +static_assert(sizeof(double) == sizeof(uint64_t), "");
> +uint64_t raw_value;
> +raw_value = reg_ctx->ReadRegisterAsUnsigned(f0_info, 0) 
> & UINT32_MAX;
> +raw_value |= 
> ((uint64_t)(reg_ctx->ReadRegisterAsUnsigned(f1_info, 0) & UINT32_MAX)) << 32;
> +value.GetScalar() = 
> *reinterpret_cast(&raw_value);
> +break;
> +}
> +case 32:
> +{
> +static_assert(sizeof(float) == sizeof(uint32_t), "");
> +uint32_t raw_value = 
> reg_ctx->ReadRegisterAsUnsigned(f0_info, 0) & UINT32_MAX;
> +value.GetScalar() = 
> *reinterpret_cast(&raw_value);
> +break;
> +}
> +}
> +}
> +else
> +{
> +// not handled yet
> +return return_valobj_sp;
> +}
> +}
>  else
>  {
>  // not handled yet
>
>
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists

[Lldb-commits] [lldb] r245078 - Don't test the output of "target modules dump symfile a.out" as this isn't something we should be testing for. This makes this test pass again.

2015-08-14 Thread Greg Clayton via lldb-commits
Author: gclayton
Date: Fri Aug 14 13:18:07 2015
New Revision: 245078

URL: http://llvm.org/viewvc/llvm-project?rev=245078&view=rev
Log:
Don't test the output of "target modules dump symfile a.out" as this isn't 
something we should be testing for. This makes this test pass again.


Modified:
lldb/trunk/test/lang/c/bitfields/TestBitfields.py

Modified: lldb/trunk/test/lang/c/bitfields/TestBitfields.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/bitfields/TestBitfields.py?rev=245078&r1=245077&r2=245078&view=diff
==
--- lldb/trunk/test/lang/c/bitfields/TestBitfields.py (original)
+++ lldb/trunk/test/lang/c/bitfields/TestBitfields.py Fri Aug 14 13:18:07 2015
@@ -120,10 +120,6 @@ class BitfieldsTestCase(TestBase):
 self.expect("expr (more_bits.d)", VARIABLES_DISPLAYED_CORRECTLY,
 substrs = ['uint8_t', '\\0'])
 
-self.expect("target modules dump symfile a.out", 
VARIABLES_DISPLAYED_CORRECTLY,
-substrs = ['Bits', 'uint32_t b3 : 3',
-   'MoreBits', 'uint32_t a : 3'])
-
 def bitfields_variable_python(self):
 """Use Python APIs to inspect a bitfields variable."""
 exe = os.path.join(os.getcwd(), "a.out")


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


Re: [Lldb-commits] [PATCH] D11790: Fix ObjC++ types Class and id being defined in C and C++ expressions.

2015-08-14 Thread Dawn Perchik via lldb-commits
dawn added a comment.

Hi Sean,

In http://reviews.llvm.org/D11790#221730, @spyffe wrote:

> Ooh, I'm reading the patch at the beginning of ClangUserExpression::Evaluate 
> again and it does look like this patch sets language based on the language of 
> the containing frame, and that affects what language the expression is parsed 
> in.


Yep - and I agree that this is a good thing.

> I don't think it's appropriate to force the expression parser out of 
> Objective-C or C++ mode in non-ObjC frames ...


But the parsing of ObjC conflicts with other languages.  This is a real problem.

> For the same reason I think the idea of a target-level language isn't the 
> right approach.


I agree here.

> Rather, I think there should be a setting that says "force all expressions to 
> this language by default" that the user can set if they're debugging a 
> process that prefers a particular language.


We have such a setting with target.language.

> By default, this setting would be Objective-C++


I disagree here - the default is (and should be) unknown.

In http://reviews.llvm.org/D11790#221770, @paulherman wrote:

> The idea is that, as I user, I do not expect the identifiers "Class" and "id" 
> to not be available - I don't think I've seen a warning or notice about that 
> when evaluating expressions.
>
> I believe that setting the language based on the current frame is a good 
> guess. I think evaluating something in the language of the current frame is 
> more common than evaluating something that is in ObjC++ and the current frame 
> is C++.


I'm totally with Paul on this, and we've discussed this same issue in 
http://reviews.llvm.org/D11482, http://reviews.llvm.org/D11173 and 
http://reviews.llvm.org/D11102.  It was Jim's belief that you would be in favor 
of using the frame too, but here it sounds like you *do* want to always be able 
to eval ObjC, which contradicts Jim and Greg.  I believe the approach I took in 
http://reviews.llvm.org/D11102 is exactly what was requested from Greg and Jim. 
 If you disagree, please talk to them, because Paul and I are stuck between two 
conflicting desires here, and we can't move forward.  Note that my patch at 
http://reviews.llvm.org/D11102 still awaits your review.

Thanks,
-Dawn


http://reviews.llvm.org/D11790



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


Re: [Lldb-commits] [PATCH] D11790: Fix ObjC++ types Class and id being defined in C and C++ expressions.

2015-08-14 Thread Dawn Perchik via lldb-commits
dawn added a comment.

Hi Paul,

Some background...  I basically tried the same thing in my original 
http://reviews.llvm.org/D11102 and http://reviews.llvm.org/D11173.  In light of 
Sean's objections in http://reviews.llvm.org/D11173, I created  
http://reviews.llvm.org/D11482 which used an option to control this behavior, 
but Greg and Jim objected to that, so I took their comments and revised 
http://reviews.llvm.org/D11102 to what I believed the consensus was.

You should read the comments in http://reviews.llvm.org/D11482 as they apply 
here as well.

My revision of http://reviews.llvm.org/D11102 is what I believe the consensus 
was, so perhaps you would like to abandon this patch in favor of that one?

Thanks,
-Dawn


http://reviews.llvm.org/D11790



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


Re: [Lldb-commits] [PATCH] D11790: Fix ObjC++ types Class and id being defined in C and C++ expressions.

2015-08-14 Thread Zachary Turner via lldb-commits
Is Objective C++ even a thing on non-Apple platforms?  I dont' think we
should be forcing a default *anything* to a language that only exists on a
subset of supported platforms.  But even ignoring that, I don't think
preferential treatment should be given to any particular language.

If there is going to be a setting, then perhaps the setting should be
something like:

lldb.expression-eval-mode = {ObjC++, C++, current-frame}

and the default value of the setting should be "current-frame".

On Fri, Aug 14, 2015 at 12:49 PM Dawn Perchik via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> dawn added a comment.
>
> Hi Paul,
>
> Some background...  I basically tried the same thing in my original
> http://reviews.llvm.org/D11102 and http://reviews.llvm.org/D11173.  In
> light of Sean's objections in http://reviews.llvm.org/D11173, I created
> http://reviews.llvm.org/D11482 which used an option to control this
> behavior, but Greg and Jim objected to that, so I took their comments and
> revised http://reviews.llvm.org/D11102 to what I believed the consensus
> was.
>
> You should read the comments in http://reviews.llvm.org/D11482 as they
> apply here as well.
>
> My revision of http://reviews.llvm.org/D11102 is what I believe the
> consensus was, so perhaps you would like to abandon this patch in favor of
> that one?
>
> Thanks,
> -Dawn
>
>
> http://reviews.llvm.org/D11790
>
>
>
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D11790: Fix ObjC++ types Class and id being defined in C and C++ expressions.

2015-08-14 Thread Sean Callanan via lldb-commits
spyffe added a subscriber: spyffe.
spyffe added a comment.

I totally agree that Objective-C shouldn’t be part of the default on non-Apple 
platforms.
The way I imagine this working is that your current frame’s language gets 
“upgraded” – for the Clang expression parser, at least to something that 
supports C++, but for other languages perhaps something else.
So, supposing e.g. Go gets its own expression parser:

[on Apple]

(current frame -> expression language)
C -> ObjC++
C++ -> ObjC++
ObjC -> ObjC++
Go -> Go)

[on Linux]
C -> C++
C++ -> C++
ObjC -> ObjC++
Go -> Go

The dependency of the Clang expression parser on C++ is an implementation 
detail, so we should upgrade C/ObjC to C++/ObjC++ internally.
The only settable preference here is whether Objective-C is globally desirable. 
 Maybe it would be best to just have a simple global setting:

lldb.force-objc-in-clang-expressions = true (on Apple), false (elsewhere)

Sean


http://reviews.llvm.org/D11790



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


Re: [Lldb-commits] [PATCH] D11790: Fix ObjC++ types Class and id being defined in C and C++ expressions.

2015-08-14 Thread Paul Herman via lldb-commits
paulherman added a comment.

This patch does exactly that. It detects the language of the frame and upgrades 
it according to the rules you said (I think I might've missed ObjC -> ObjC++, 
but that can be added).

Regarding the global setting of ObjC, I believe it is not helpful. What I mean 
is, when debugging something in ObjC the frame is probably already ObjC.

Paul


http://reviews.llvm.org/D11790



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


[Lldb-commits] [PATCH] D12039: Make @skipUnlessArch actually skip instead of XFAIL

2015-08-14 Thread Zachary Turner via lldb-commits
zturner created this revision.
zturner added a reviewer: chaoren.
zturner added a subscriber: lldb-commits.

http://reviews.llvm.org/D12039

Files:
  test/lldbtest.py

Index: test/lldbtest.py
===
--- test/lldbtest.py
+++ test/lldbtest.py
@@ -664,11 +664,6 @@
 return arch in self.getArchitecture()
 return expectedFailure(fn, bugnumber)
 
-def skipUnlessArch(arch):
-def fn(self):
-return not self.getArchitecture() in arch 
-return expectedFailure(fn, None)
-
 def expectedFailurei386(bugnumber=None):
 return expectedFailureArch('i386', bugnumber)
 
@@ -945,6 +940,23 @@
 return unittest2.skipUnless(getHostPlatform() in oslist,
 "requires on of %s" % (", ".join(oslist)))
 
+def skipUnlessArch(archlist):
+def myImpl(func):
+if isinstance(func, type) and issubclass(func, unittest2.TestCase):
+raise Exception("@skipUnlessArch can only be used to decorate a 
test method")
+
+@wraps(func)
+def wrapper(*args, **kwargs):
+self = args[0]
+if self.getArchitecture() not in archlist:
+self.skipTest("skipping for architecture %s (requires one of 
%s)" % 
+(self.getArchitecture(), ", ".join(archlist)))
+else:
+func(*args, **kwargs)
+return wrapper
+
+return myImpl
+
 def skipIfPlatform(oslist):
 """Decorate the item to skip tests if running on one of the listed 
platforms."""
 return unittest2.skipIf(getPlatform() in oslist,


Index: test/lldbtest.py
===
--- test/lldbtest.py
+++ test/lldbtest.py
@@ -664,11 +664,6 @@
 return arch in self.getArchitecture()
 return expectedFailure(fn, bugnumber)
 
-def skipUnlessArch(arch):
-def fn(self):
-return not self.getArchitecture() in arch 
-return expectedFailure(fn, None)
-
 def expectedFailurei386(bugnumber=None):
 return expectedFailureArch('i386', bugnumber)
 
@@ -945,6 +940,23 @@
 return unittest2.skipUnless(getHostPlatform() in oslist,
 "requires on of %s" % (", ".join(oslist)))
 
+def skipUnlessArch(archlist):
+def myImpl(func):
+if isinstance(func, type) and issubclass(func, unittest2.TestCase):
+raise Exception("@skipUnlessArch can only be used to decorate a test method")
+
+@wraps(func)
+def wrapper(*args, **kwargs):
+self = args[0]
+if self.getArchitecture() not in archlist:
+self.skipTest("skipping for architecture %s (requires one of %s)" % 
+(self.getArchitecture(), ", ".join(archlist)))
+else:
+func(*args, **kwargs)
+return wrapper
+
+return myImpl
+
 def skipIfPlatform(oslist):
 """Decorate the item to skip tests if running on one of the listed platforms."""
 return unittest2.skipIf(getPlatform() in oslist,
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r245100 - Fix Linux build after r245090.

2015-08-14 Thread Oleksiy Vyalov via lldb-commits
Author: ovyalov
Date: Fri Aug 14 16:16:00 2015
New Revision: 245100

URL: http://llvm.org/viewvc/llvm-project?rev=245100&view=rev
Log:
Fix Linux build after r245090.

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=245100&r1=245099&r2=245100&view=diff
==
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Fri Aug 14 16:16:00 2015
@@ -8831,15 +8831,15 @@ ClangASTContext::DumpTypeDescription (vo
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Symbol/TypeList.h"
 
-#include "plugins/SymbolFile/DWARF/DWARFCompileUnit.h"
-#include "plugins/SymbolFile/DWARF/DWARFDebugInfo.h"
-#include "plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h"
-#include "plugins/SymbolFile/DWARF/DWARFDeclContext.h"
-#include "plugins/SymbolFile/DWARF/DWARFDefines.h"
-#include "plugins/SymbolFile/DWARF/DWARFDIECollection.h"
-#include "plugins/SymbolFile/DWARF/SymbolFileDWARF.h"
-#include "plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h"
-#include "plugins/SymbolFile/DWARF/UniqueDWARFASTType.h"
+#include "Plugins/SymbolFile/DWARF/DWARFCompileUnit.h"
+#include "Plugins/SymbolFile/DWARF/DWARFDebugInfo.h"
+#include "Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h"
+#include "Plugins/SymbolFile/DWARF/DWARFDeclContext.h"
+#include "Plugins/SymbolFile/DWARF/DWARFDefines.h"
+#include "Plugins/SymbolFile/DWARF/DWARFDIECollection.h"
+#include "Plugins/SymbolFile/DWARF/SymbolFileDWARF.h"
+#include "Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h"
+#include "Plugins/SymbolFile/DWARF/UniqueDWARFASTType.h"
 
 
 class ClangASTContext::DelayedAddObjCClassProperty


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


Re: [Lldb-commits] [PATCH] D12039: Make @skipUnlessArch actually skip instead of XFAIL

2015-08-14 Thread Chaoren Lin via lldb-commits
chaoren added inline comments.


Comment at: test/lldbtest.py:943
@@ -947,1 +942,3 @@
 
+def skipUnlessArch(archlist):
+def myImpl(func):

Is there a reason
```
return unittest2.skipUnless(getArchitecture() in archlist, ...)
```
is not sufficient?

Also, please add a doc string, like the other skip{If,Unless} methods.


http://reviews.llvm.org/D12039



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


Re: [Lldb-commits] [PATCH] D12039: Make @skipUnlessArch actually skip instead of XFAIL

2015-08-14 Thread Zachary Turner via lldb-commits
zturner added inline comments.


Comment at: test/lldbtest.py:943
@@ -947,1 +942,3 @@
 
+def skipUnlessArch(archlist):
+def myImpl(func):

chaoren wrote:
> Is there a reason
> ```
> return unittest2.skipUnless(getArchitecture() in archlist, ...)
> ```
> is not sufficient?
> 
> Also, please add a doc string, like the other skip{If,Unless} methods.
`getArchitecture()` is a member of `self`, which is not defined here.  TBH this 
stuff is beyond my Python level, I tried simpler versions but this is how I 
ultimately got it working after seeing what some of the other decorators did.


http://reviews.llvm.org/D12039



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


[Lldb-commits] [PATCH] D12043: Convert all use of pthreads in test executables to std threads

2015-08-14 Thread Zachary Turner via lldb-commits
zturner created this revision.
zturner added reviewers: clayborg, jingham.
zturner added a subscriber: lldb-commits.

This eliminates portability issues among platforms that don't have a pthreads 
implementation.

There was one situation in TestTlsGlobals.py where it seems the intention is to 
compile the executable with C.  In that case I left it alone, and we will need 
to eventually provide a windows-based implementation of that test.  But for 
tests which don't explicitly require pure C for the test, I don't see a good 
reason not to use std threads across the board.

http://reviews.llvm.org/D12043

Files:
  test/functionalities/expr-doesnt-deadlock/Makefile
  test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py
  test/functionalities/expr-doesnt-deadlock/locking.c
  test/functionalities/expr-doesnt-deadlock/locking.cpp
  test/functionalities/thread/create_during_step/main.cpp
  test/functionalities/thread/exit_during_break/main.cpp
  test/functionalities/thread/exit_during_step/main.cpp
  test/functionalities/thread/multi_break/main.cpp
  test/functionalities/thread/step_out/main.cpp
  test/functionalities/thread/thread_exit/main.cpp
  test/functionalities/thread/thread_specific_break/Makefile
  
test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py
  test/functionalities/thread/thread_specific_break/main.c
  test/functionalities/thread/thread_specific_break/main.cpp
  test/lang/c/tls_globals/TestTlsGlobals.py

Index: test/lang/c/tls_globals/TestTlsGlobals.py
===
--- test/lang/c/tls_globals/TestTlsGlobals.py
+++ test/lang/c/tls_globals/TestTlsGlobals.py
@@ -1,4 +1,4 @@
-"""Test that thread-local storage can be read correctly."""
+"""Test that thread-local storage can be read correctly."""
 
 import os, time
 import unittest2
Index: test/functionalities/thread/thread_specific_break/main.cpp
===
--- /dev/null
+++ test/functionalities/thread/thread_specific_break/main.cpp
@@ -0,0 +1,39 @@
+#include 
+#include 
+#include 
+
+void *
+thread_function (void *thread_marker)
+{
+int keep_going = 1; 
+int my_value = *((int *)thread_marker);
+int counter = 0;
+
+while (counter < 20)
+{
+counter++; // Break here in thread body.
+std::this_thread::sleep_for(std::chrono::microseconds(10));
+}
+return NULL;
+}
+
+
+int 
+main ()
+{
+std::vector threads;
+
+int thread_value = 0;
+int i;
+
+for (i = 0; i < 10; i++)
+{
+thread_value += 1;
+threads.push_back(std::thread(thread_function, &thread_value));
+}
+
+for (i = 0; i < 10; i++)
+threads[i].join();
+
+return 0;
+}
Index: test/functionalities/thread/thread_specific_break/main.c
===
--- test/functionalities/thread/thread_specific_break/main.c
+++ /dev/null
@@ -1,39 +0,0 @@
-#include 
-#include 
-
-void *
-thread_function (void *thread_marker)
-{
-  int keep_going = 1; 
-  int my_value = *((int *)thread_marker);
-  int counter = 0;
-
-  while (counter < 20)
-{
-  counter++; // Break here in thread body.
-  usleep (10);
-}
-  return NULL;
-}
-
-
-int 
-main ()
-{
-
-  pthread_t threads[10];
-
-  int thread_value = 0;
-  int i;
-
-  for (i = 0; i < 10; i++)
-{
-  thread_value += 1;
-  pthread_create (&threads[i], NULL, &thread_function, &thread_value);
-}
-
-  for (i = 0; i < 10; i++)
-pthread_join (threads[i], NULL);
-
-  return 0;
-}
Index: test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py
===
--- test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py
+++ test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py
@@ -1,4 +1,4 @@
-"""
+"""
 Test that we obey thread conditioned breakpoints.
 """
 
@@ -37,7 +37,7 @@
 target = self.dbg.CreateTarget(exe)
 self.assertTrue(target, VALID_TARGET)
 
-main_source_spec = lldb.SBFileSpec ("main.c")
+main_source_spec = lldb.SBFileSpec ("main.cpp")
 
 # Set a breakpoint in the thread body, and make it active for only the first thread.
 break_thread_body = target.BreakpointCreateBySourceRegex ("Break here in thread body.", main_source_spec)
Index: test/functionalities/thread/thread_specific_break/Makefile
===
--- test/functionalities/thread/thread_specific_break/Makefile
+++ test/functionalities/thread/thread_specific_break/Makefile
@@ -1,6 +1,6 @@
 LEVEL = ../../../make
 
-C_SOURCES := main.c
+CXX_SOURCES := main.cpp
 ENABLE_THREADS := YES
 
 include $(LEVEL)/Makefile.rules
Index: test/functionalities/thread/thread_exit/main.cpp
===
--- test/functionalit

Re: [Lldb-commits] [PATCH] D12043: Convert all use of pthreads in test executables to std threads

2015-08-14 Thread Zachary Turner via lldb-commits
zturner updated this revision to Diff 32195.
zturner added a comment.

Remove unicode byte-order-marks from python files


http://reviews.llvm.org/D12043

Files:
  test/functionalities/expr-doesnt-deadlock/Makefile
  test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py
  test/functionalities/expr-doesnt-deadlock/locking.c
  test/functionalities/expr-doesnt-deadlock/locking.cpp
  test/functionalities/thread/create_during_step/main.cpp
  test/functionalities/thread/exit_during_break/main.cpp
  test/functionalities/thread/exit_during_step/main.cpp
  test/functionalities/thread/multi_break/main.cpp
  test/functionalities/thread/step_out/main.cpp
  test/functionalities/thread/thread_exit/main.cpp
  test/functionalities/thread/thread_specific_break/Makefile
  
test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py
  test/functionalities/thread/thread_specific_break/main.c
  test/functionalities/thread/thread_specific_break/main.cpp

Index: test/functionalities/thread/thread_specific_break/main.cpp
===
--- /dev/null
+++ test/functionalities/thread/thread_specific_break/main.cpp
@@ -0,0 +1,39 @@
+#include 
+#include 
+#include 
+
+void *
+thread_function (void *thread_marker)
+{
+int keep_going = 1; 
+int my_value = *((int *)thread_marker);
+int counter = 0;
+
+while (counter < 20)
+{
+counter++; // Break here in thread body.
+std::this_thread::sleep_for(std::chrono::microseconds(10));
+}
+return NULL;
+}
+
+
+int 
+main ()
+{
+std::vector threads;
+
+int thread_value = 0;
+int i;
+
+for (i = 0; i < 10; i++)
+{
+thread_value += 1;
+threads.push_back(std::thread(thread_function, &thread_value));
+}
+
+for (i = 0; i < 10; i++)
+threads[i].join();
+
+return 0;
+}
Index: test/functionalities/thread/thread_specific_break/main.c
===
--- test/functionalities/thread/thread_specific_break/main.c
+++ /dev/null
@@ -1,39 +0,0 @@
-#include 
-#include 
-
-void *
-thread_function (void *thread_marker)
-{
-  int keep_going = 1; 
-  int my_value = *((int *)thread_marker);
-  int counter = 0;
-
-  while (counter < 20)
-{
-  counter++; // Break here in thread body.
-  usleep (10);
-}
-  return NULL;
-}
-
-
-int 
-main ()
-{
-
-  pthread_t threads[10];
-
-  int thread_value = 0;
-  int i;
-
-  for (i = 0; i < 10; i++)
-{
-  thread_value += 1;
-  pthread_create (&threads[i], NULL, &thread_function, &thread_value);
-}
-
-  for (i = 0; i < 10; i++)
-pthread_join (threads[i], NULL);
-
-  return 0;
-}
Index: test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py
===
--- test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py
+++ test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py
@@ -37,7 +37,7 @@
 target = self.dbg.CreateTarget(exe)
 self.assertTrue(target, VALID_TARGET)
 
-main_source_spec = lldb.SBFileSpec ("main.c")
+main_source_spec = lldb.SBFileSpec ("main.cpp")
 
 # Set a breakpoint in the thread body, and make it active for only the first thread.
 break_thread_body = target.BreakpointCreateBySourceRegex ("Break here in thread body.", main_source_spec)
Index: test/functionalities/thread/thread_specific_break/Makefile
===
--- test/functionalities/thread/thread_specific_break/Makefile
+++ test/functionalities/thread/thread_specific_break/Makefile
@@ -1,6 +1,6 @@
 LEVEL = ../../../make
 
-C_SOURCES := main.c
+CXX_SOURCES := main.cpp
 ENABLE_THREADS := YES
 
 include $(LEVEL)/Makefile.rules
Index: test/functionalities/thread/thread_exit/main.cpp
===
--- test/functionalities/thread/thread_exit/main.cpp
+++ test/functionalities/thread/thread_exit/main.cpp
@@ -9,8 +9,8 @@
 
 // This test verifies the correct handling of child thread exits.
 
-#include 
 #include 
+#include 
 
 // Note that although hogging the CPU while waiting for a variable to change
 // would be terrible in production code, it's great for testing since it
@@ -29,7 +29,7 @@
 std::atomic_int g_barrier3;
 
 void *
-thread1 (void *input)
+thread1 ()
 {
 // Synchronize with the main thread.
 pseudo_barrier_wait(g_barrier1);
@@ -42,7 +42,7 @@
 }
 
 void *
-thread2 (void *input)
+thread2 ()
 {
 // Synchronize with thread1 and the main thread.
 pseudo_barrier_wait(g_barrier2);
@@ -56,34 +56,30 @@
 
 int main ()
 {
-pthread_t thread_1;
-pthread_t thread_2;
-pthread_t thread_3;
-
 pseudo_barrier_init(g_barrier1, 2);
 pseudo_barrier_init(g_barrier2, 3);
 pseudo_barrier_init(g_barrier3, 2);
 
 // Create a thread.
-pthre

Re: [Lldb-commits] [PATCH] D12043: Convert all use of pthreads in test executables to std threads

2015-08-14 Thread Greg Clayton via lldb-commits
clayborg accepted this revision.
clayborg added a comment.
This revision is now accepted and ready to land.

Looks good.


http://reviews.llvm.org/D12043



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


[Lldb-commits] [lldb] r245121 - Don't crash if we don't have a type system for a language.

2015-08-14 Thread Greg Clayton via lldb-commits
Author: gclayton
Date: Fri Aug 14 18:15:48 2015
New Revision: 245121

URL: http://llvm.org/viewvc/llvm-project?rev=245121&view=rev
Log:
Don't crash if we don't have a type system for a language.


Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=245121&r1=245120&r2=245121&view=diff
==
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Fri Aug 14 
18:15:48 2015
@@ -598,7 +598,7 @@ SymbolFileDWARF::GetTypeSystemForLanguag
 {
 TypeSystem *type_system = 
m_obj_file->GetModule()->GetTypeSystemForLanguage (language);
 
-if (type_system->AsClangASTContext())
+if (type_system && type_system->AsClangASTContext())
 {
 // Get the ClangAST so that we register the ClangExternalASTSource 
callbacks if needed...
 GetClangASTContext();


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


[Lldb-commits] [lldb] r245122 - Unbreak the windows and linux buildbots.

2015-08-14 Thread Greg Clayton via lldb-commits
Author: gclayton
Date: Fri Aug 14 18:16:12 2015
New Revision: 245122

URL: http://llvm.org/viewvc/llvm-project?rev=245122&view=rev
Log:
Unbreak the windows and linux buildbots.


Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h?rev=245122&r1=245121&r2=245122&view=diff
==
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h Fri Aug 14 
18:16:12 2015
@@ -69,7 +69,7 @@ public:
 friend class SymbolFileDWARFDebugMap;
 friend class DebugMapModule;
 friend class DWARFCompileUnit;
-friend class ClangASTContext;
+friend class lldb_private::ClangASTContext;
 //--
 // Static Functions
 //--
@@ -136,8 +136,8 @@ public:
   uint32_t type_mask,
   lldb_private::TypeList &type_list) 
override;
 
-virtual lldb_private::ClangASTContext &
-GetClangASTContext ();
+lldb_private::ClangASTContext &
+GetClangASTContext () override;
 
 lldb_private::TypeSystem *
 GetTypeSystemForLanguage (lldb::LanguageType 
language) override;


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


Re: [Lldb-commits] [PATCH] D12039: Make @skipUnlessArch actually skip instead of XFAIL

2015-08-14 Thread Chaoren Lin via lldb-commits
chaoren accepted this revision.
This revision is now accepted and ready to land.


Comment at: test/lldbtest.py:943
@@ -947,1 +942,3 @@
 
+def skipUnlessArch(archlist):
+def myImpl(func):

zturner wrote:
> chaoren wrote:
> > Is there a reason
> > ```
> > return unittest2.skipUnless(getArchitecture() in archlist, ...)
> > ```
> > is not sufficient?
> > 
> > Also, please add a doc string, like the other skip{If,Unless} methods.
> `getArchitecture()` is a member of `self`, which is not defined here.  TBH 
> this stuff is beyond my Python level, I tried simpler versions but this is 
> how I ultimately got it working after seeing what some of the other 
> decorators did.
Okay. I see what you mean. LGTM for now (if it works), I'll add a change later 
to unittest2.skip* to allow a callback that takes a test_item, instead of just 
a condition.


http://reviews.llvm.org/D12039



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


[Lldb-commits] [lldb] r245125 - Disable libstdc++ and libcxx data formatter tests on Windows.

2015-08-14 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Fri Aug 14 18:28:49 2015
New Revision: 245125

URL: http://llvm.org/viewvc/llvm-project?rev=245125&view=rev
Log:
Disable libstdc++ and libcxx data formatter tests on Windows.

Neither of these libraries has been ported to Windows.  Eventually
if they are ever ported we can re-enable these tests.  But more
immediately what we need to do is add new data formatters for
MSVC's STL implementation.  This is tracked in
http://llvm.org/pr24460.

Modified:

lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py

lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py

lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py

lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py

lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py

lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py

lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py

lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py

Modified: 
lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py?rev=245125&r1=245124&r2=245125&view=diff
==
--- 
lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py
 (original)
+++ 
lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py
 Fri Aug 14 18:28:49 2015
@@ -20,6 +20,7 @@ class LibcxxUnorderedDataFormatterTestCa
 self.data_formatter_commands()
 
 @dwarf_test
+@skipIfWindows # libc++ not ported to Windows yet
 @skipIfGcc
 def test_with_dwarf_and_run_command(self):
 """Test data formatter commands."""

Modified: 
lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py?rev=245125&r1=245124&r2=245125&view=diff
==
--- 
lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py
 (original)
+++ 
lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py
 Fri Aug 14 18:28:49 2015
@@ -20,7 +20,7 @@ class LibcxxVBoolDataFormatterTestCase(T
 self.data_formatter_commands()
 
 @skipIfGcc
-@skipIfWindows # http://llvm.org/pr21800
+@skipIfWindows # libc++ not ported to Windows.
 @dwarf_test
 def test_with_dwarf_and_run_command(self):
 """Test data formatter commands."""

Modified: 
lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py?rev=245125&r1=245124&r2=245125&view=diff
==
--- 
lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py
 (original)
+++ 
lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py
 Fri Aug 14 18:28:49 2015
@@ -20,6 +20,7 @@ class StdIteratorDataFormatterTestCase(T
 self.data_formatter_commands()
 
 @dwarf_test
+@skipIfWindows # libstdcpp not ported to Windows
 @expectedFailureFreeBSD("llvm.org/pr20548") # fails to build on 
lab.llvm.org buildbot
 @expectedFailureIcc # llvm.org/pr15301 LLDB prints incorrect sizes of STL 
containers
 def test_with_dwarf_and_run_command(self):

Modified: 
lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py?rev=245125&r1=245124&r2=245125&view=diff
==
--- 
lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py
 (original)
+++ 
lldb/trunk/test/functionalit

[Lldb-commits] [lldb] r245126 - XFAIL some data formatter tests on Windows.

2015-08-14 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Fri Aug 14 18:29:17 2015
New Revision: 245126

URL: http://llvm.org/viewvc/llvm-project?rev=245126&view=rev
Log:
XFAIL some data formatter tests on Windows.

Fixing these bugs is tracked by http://llvm.org/pr24462.

Modified:

lldb/trunk/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py

lldb/trunk/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py

lldb/trunk/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py

lldb/trunk/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py

lldb/trunk/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py

Modified: 
lldb/trunk/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py?rev=245126&r1=245125&r2=245126&view=diff
==
--- 
lldb/trunk/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
 (original)
+++ 
lldb/trunk/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
 Fri Aug 14 18:29:17 2015
@@ -20,6 +20,7 @@ class CppDataFormatterTestCase(TestBase)
 self.data_formatter_commands()
 
 @dwarf_test
+@expectedFailureWindows("llvm.org/pr24462") # Data formatters have 
problems on Windows
 def test_with_dwarf_and_run_command(self):
 """Test data formatter commands."""
 self.buildDwarf()

Modified: 
lldb/trunk/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py?rev=245126&r1=245125&r2=245126&view=diff
==
--- 
lldb/trunk/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py
 (original)
+++ 
lldb/trunk/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py
 Fri Aug 14 18:29:17 2015
@@ -20,6 +20,7 @@ class DataFormatterDisablingTestCase(Tes
 self.data_formatter_commands()
 
 @dwarf_test
+@expectedFailureWindows("llvm.org/pr24462") # Data formatters have 
problems on Windows
 def test_with_dwarf_and_run_command(self):
 """Test data formatter commands."""
 self.buildDwarf()

Modified: 
lldb/trunk/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py?rev=245126&r1=245125&r2=245126&view=diff
==
--- 
lldb/trunk/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py
 (original)
+++ 
lldb/trunk/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py
 Fri Aug 14 18:29:17 2015
@@ -20,6 +20,7 @@ class SkipSummaryDataFormatterTestCase(T
 self.data_formatter_commands()
 
 @expectedFailureFreeBSD("llvm.org/pr20548") # fails to build on 
lab.llvm.org buildbot
+@expectedFailureWindows("llvm.org/pr24462") # Data formatters have 
problems on Windows
 @dwarf_test
 def test_with_dwarf_and_run_command(self):
 """Test data formatter commands."""

Modified: 
lldb/trunk/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py?rev=245126&r1=245125&r2=245126&view=diff
==
--- 
lldb/trunk/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py
 (original)
+++ 
lldb/trunk/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py
 Fri Aug 14 18:29:17 2015
@@ -20,6 +20,7 @@ class SmartArrayDataFormatterTestCase(Te
 self.data_formatter_commands()
 
 @dwarf_test
+@expectedFailureWindows("llvm.org/pr24462") # Data formatters have 
problems on Windows
 def test_with_dwarf_and_run_command(self):
 """Test data formatter commands."""
 self.buildDwarf()

Modified: 
lldb/trunk/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py?rev=245126&r1=245125&r2=245126&view=diff
==

[Lldb-commits] [lldb] r245127 - Make skipUnlessArch decorator actually skip instead of XFAIL.

2015-08-14 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Fri Aug 14 18:29:24 2015
New Revision: 245127

URL: http://llvm.org/viewvc/llvm-project?rev=245127&view=rev
Log:
Make skipUnlessArch decorator actually skip instead of XFAIL.

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=245127&r1=245126&r2=245127&view=diff
==
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Fri Aug 14 18:29:24 2015
@@ -664,11 +664,6 @@ def expectedFailureArch(arch, bugnumber=
 return arch in self.getArchitecture()
 return expectedFailure(fn, bugnumber)
 
-def skipUnlessArch(arch):
-def fn(self):
-return not self.getArchitecture() in arch 
-return expectedFailure(fn, None)
-
 def expectedFailurei386(bugnumber=None):
 return expectedFailureArch('i386', bugnumber)
 
@@ -945,6 +940,24 @@ def skipUnlessHostPlatform(oslist):
 return unittest2.skipUnless(getHostPlatform() in oslist,
 "requires on of %s" % (", ".join(oslist)))
 
+def skipUnlessArch(archlist):
+"""Decorate the item to skip tests unless running on one of the listed 
architectures."""
+def myImpl(func):
+if isinstance(func, type) and issubclass(func, unittest2.TestCase):
+raise Exception("@skipUnlessArch can only be used to decorate a 
test method")
+
+@wraps(func)
+def wrapper(*args, **kwargs):
+self = args[0]
+if self.getArchitecture() not in archlist:
+self.skipTest("skipping for architecture %s (requires one of 
%s)" % 
+(self.getArchitecture(), ", ".join(archlist)))
+else:
+func(*args, **kwargs)
+return wrapper
+
+return myImpl
+
 def skipIfPlatform(oslist):
 """Decorate the item to skip tests if running on one of the listed 
platforms."""
 return unittest2.skipIf(getPlatform() in oslist,


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


[Lldb-commits] [lldb] r245128 - Enable settings test for i686 as well as i386.

2015-08-14 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Fri Aug 14 18:29:32 2015
New Revision: 245128

URL: http://llvm.org/viewvc/llvm-project?rev=245128&view=rev
Log:
Enable settings test for i686 as well as i386.

Modified:
lldb/trunk/test/settings/TestSettings.py

Modified: lldb/trunk/test/settings/TestSettings.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/settings/TestSettings.py?rev=245128&r1=245127&r2=245128&view=diff
==
--- lldb/trunk/test/settings/TestSettings.py (original)
+++ lldb/trunk/test/settings/TestSettings.py Fri Aug 14 18:29:32 2015
@@ -165,7 +165,7 @@ class SettingsCommandTestCase(TestBase):
 self.expect("settings show auto-confirm", SETTING_MSG("auto-confirm"),
 startstr = "auto-confirm (boolean) = false")
 
-@skipUnlessArch(['x86-64', 'i386'])
+@skipUnlessArch(['x86-64', 'i386', 'i686'])
 def test_disassembler_settings(self):
 """Test that user options for the disassembler take effect."""
 self.buildDefault()


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


[Lldb-commits] [PATCH] D12044: Fix resolution conflict between global and class static variables in C/C++.

2015-08-14 Thread Paul Herman via lldb-commits
paulherman created this revision.
paulherman added reviewers: clayborg, sivachandra, spyffe.
paulherman added a subscriber: lldb-commits.

Consider having a global variable 'a' and a static variable with the same name 
inside a class. This resolves the arbitrary choice when resolving the name 'a'.

http://reviews.llvm.org/D12044

Files:
  source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
  source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
  test/lang/cpp/scope/Makefile
  test/lang/cpp/scope/TestCppScope.py
  test/lang/cpp/scope/main.cpp

Index: test/lang/cpp/scope/main.cpp
===
--- /dev/null
+++ test/lang/cpp/scope/main.cpp
@@ -0,0 +1,25 @@
+class A {
+public:
+static int a;
+int b;
+};
+
+class B {
+public:
+static int a;
+int b;
+};
+
+struct C {
+static int a;
+};
+
+int A::a = ;
+int B::a = ;
+int C::a = ;
+int a = ;
+
+int main() // break here
+{
+return 0;
+}
Index: test/lang/cpp/scope/TestCppScope.py
===
--- /dev/null
+++ test/lang/cpp/scope/TestCppScope.py
@@ -0,0 +1,76 @@
+"""
+Test scopes in C++.
+"""
+import lldb
+from lldbtest import *
+import lldbutil
+
+class TestCppScopes(TestBase):
+
+mydir = TestBase.compute_mydir(__file__)
+
+@skipUnlessDarwin
+@dsym_test
+def test_with_dsym_and_run_command(self):
+self.buildDsym()
+self.check()
+
+@dwarf_test
+def test_with_dwarf_and_run_command(self):
+self.buildDwarf()
+self.check()
+
+def setUp(self):
+TestBase.setUp(self)
+
+def check(self):
+# Get main source file
+src_file = "main.cpp"
+src_file_spec = lldb.SBFileSpec(src_file)
+self.assertTrue(src_file_spec.IsValid(), "Main source file")
+
+# Get the path of the executable
+cwd = os.getcwd() 
+exe_file = "a.out"
+exe_path  = os.path.join(cwd, exe_file)
+
+# Load the executable
+target = self.dbg.CreateTarget(exe_path)
+self.assertTrue(target.IsValid(), VALID_TARGET)
+
+# Break on main function
+main_breakpoint = target.BreakpointCreateBySourceRegex("// break here", src_file_spec)
+self.assertTrue(main_breakpoint.IsValid() and main_breakpoint.GetNumLocations() >= 1, VALID_BREAKPOINT)
+
+# Launch the process
+args = None
+env = None
+process = target.LaunchSimple(args, env, cwd)
+self.assertTrue(process.IsValid(), PROCESS_IS_VALID)
+
+# Get the thread of the process
+self.assertTrue(process.GetState() == lldb.eStateStopped, PROCESS_STOPPED)
+thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+
+# Get current fream of the thread at the breakpoint 
+frame = thread.GetSelectedFrame()
+
+# Test result for scopes of variables 
+test_result = frame.EvaluateExpression("A::a")
+self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == , "A::a = ")
+
+test_result = frame.EvaluateExpression("B::a")
+self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == , "B::a = ")
+
+test_result = frame.EvaluateExpression("C::a")
+self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == , "C::a = ")
+
+test_result = frame.EvaluateExpression("a")
+self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == , "a = ")
+
+
+if __name__ == '__main__':
+import atexit
+lldb.SBDebugger.Initialize()
+atexit.register(lambda: lldb.SBDebugger.Terminate())
+unittest2.main()
Index: test/lang/cpp/scope/Makefile
===
--- /dev/null
+++ test/lang/cpp/scope/Makefile
@@ -0,0 +1,5 @@
+LEVEL = ../../../make
+
+CXX_SOURCES := main.cpp
+
+include $(LEVEL)/Makefile.rules
Index: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
===
--- source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
+++ source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
@@ -322,6 +322,12 @@
 const DWARFDebugInfoEntry *die,
 const lldb::addr_t func_low_pc);
 
+lldb::VariableSPParseGlobalVariableDIE(
+const lldb_private::SymbolContext& sc,
+DWARFCompileUnit* dwarf_cu,
+const DWARFDebugInfoEntry *die,
+const lldb::addr_t func_low_pc);
+
 size_t  ParseVariables(
 const lldb_private::SymbolContext& sc,
 DWARFCompileUnit* dwarf_cu,
Index: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
==

[Lldb-commits] [lldb] r245129 - Fix Android build.

2015-08-14 Thread Oleksiy Vyalov via lldb-commits
Author: ovyalov
Date: Fri Aug 14 18:57:15 2015
New Revision: 245129

URL: http://llvm.org/viewvc/llvm-project?rev=245129&view=rev
Log:
Fix Android build.


Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h?rev=245129&r1=245128&r2=245129&view=diff
==
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h 
(original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h Fri 
Aug 14 18:57:15 2015
@@ -128,7 +128,7 @@ protected:
 friend class DWARFCompileUnit;
 friend class SymbolFileDWARF;
 friend class DebugMapModule;
-friend class ClangASTContext;
+friend class lldb_private::ClangASTContext;
 struct OSOInfo
 {
 lldb::ModuleSP module_sp;


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


[Lldb-commits] [lldb] r245130 - There is no such thing as gdb_arm_f8, this register set is f0-f7.

2015-08-14 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Fri Aug 14 19:09:23 2015
New Revision: 245130

URL: http://llvm.org/viewvc/llvm-project?rev=245130&view=rev
Log:
There is no such thing as gdb_arm_f8, this register set is f0-f7.
Remove this entry and adjust the numbering for the rest of the arm
register definitions.


Modified:
lldb/trunk/source/Utility/ARM_GCC_Registers.h

Modified: lldb/trunk/source/Utility/ARM_GCC_Registers.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/ARM_GCC_Registers.h?rev=245130&r1=245129&r2=245130&view=diff
==
--- lldb/trunk/source/Utility/ARM_GCC_Registers.h (original)
+++ lldb/trunk/source/Utility/ARM_GCC_Registers.h Fri Aug 14 19:09:23 2015
@@ -58,89 +58,88 @@ enum
 gdb_arm_f5  =  21, // 21124  12 _arm_ext_littlebyte_bigword
 gdb_arm_f6  =  22, // 22136  12 _arm_ext_littlebyte_bigword
 gdb_arm_f7  =  23, // 23148  12 _arm_ext_littlebyte_bigword
-gdb_arm_f8  =  24, // 24160  12 _arm_ext_littlebyte_bigword
-gdb_arm_cpsr=  25, // 25172   4 int32_t
-gdb_arm_s0  =  26, // 26176   4 _ieee_single_little
-gdb_arm_s1  =  27, // 27180   4 _ieee_single_little
-gdb_arm_s2  =  28, // 28184   4 _ieee_single_little
-gdb_arm_s3  =  29, // 29188   4 _ieee_single_little
-gdb_arm_s4  =  30, // 30192   4 _ieee_single_little
-gdb_arm_s5  =  31, // 31196   4 _ieee_single_little
-gdb_arm_s6  =  32, // 32200   4 _ieee_single_little
-gdb_arm_s7  =  33, // 33204   4 _ieee_single_little
-gdb_arm_s8  =  34, // 34208   4 _ieee_single_little
-gdb_arm_s9  =  35, // 35212   4 _ieee_single_little
-gdb_arm_s10 =  36, // 36216   4 _ieee_single_little
-gdb_arm_s11 =  37, // 37220   4 _ieee_single_little
-gdb_arm_s12 =  38, // 38224   4 _ieee_single_little
-gdb_arm_s13 =  39, // 39228   4 _ieee_single_little
-gdb_arm_s14 =  40, // 40232   4 _ieee_single_little
-gdb_arm_s15 =  41, // 41236   4 _ieee_single_little
-gdb_arm_s16 =  42, // 42240   4 _ieee_single_little
-gdb_arm_s17 =  43, // 43244   4 _ieee_single_little
-gdb_arm_s18 =  44, // 44248   4 _ieee_single_little
-gdb_arm_s19 =  45, // 45252   4 _ieee_single_little
-gdb_arm_s20 =  46, // 46256   4 _ieee_single_little
-gdb_arm_s21 =  47, // 47260   4 _ieee_single_little
-gdb_arm_s22 =  48, // 48264   4 _ieee_single_little
-gdb_arm_s23 =  49, // 49268   4 _ieee_single_little
-gdb_arm_s24 =  50, // 50272   4 _ieee_single_little
-gdb_arm_s25 =  51, // 51276   4 _ieee_single_little
-gdb_arm_s26 =  52, // 52280   4 _ieee_single_little
-gdb_arm_s27 =  53, // 53284   4 _ieee_single_little
-gdb_arm_s28 =  54, // 54288   4 _ieee_single_little
-gdb_arm_s29 =  55, // 55292   4 _ieee_single_little
-gdb_arm_s30 =  56, // 56296   4 _ieee_single_little
-gdb_arm_s31 =  57, // 57300   4 _ieee_single_little
-gdb_arm_fpscr   =  58, // 58304   4 int32_t
-gdb_arm_d16 =  59, // 59308   8 _ieee_double_little
-gdb_arm_d17 =  60, // 60316   8 _ieee_double_little
-gdb_arm_d18 =  61, // 61324   8 _ieee_double_little
-gdb_arm_d19 =  62, // 62332   8 _ieee_double_little
-gdb_arm_d20 =  63, // 63340   8 _ieee_double_little
-gdb_arm_d21 =  64, // 64348   8 _ieee_double_little
-gdb_arm_d22 =  65, // 65356   8 _ieee_double_little
-gdb_arm_d23 =  66, // 66364   8 _ieee_double_little
-gdb_arm_d24 =  67, // 67372   8 _ieee_double_little
-gdb_arm_d25 =  68, // 68380   8 _ieee_double_little
-gdb_arm_d26 =  69, // 69388   8 _ieee_double_little
-gdb_arm_d27 =  70, // 70396   8 _ieee_double_little
-gdb_arm_d28 =  71, // 71404   8 _ieee_double_little
-gdb_arm_d29 =  72, // 72412   8 _ieee_double_little
-gdb_arm_d30 =  73, // 73420   8 _ieee_double_little
-gdb_arm_d31 =  74, // 74428   8 _ieee_double_little
-gdb_arm_d0  =  75, //  0436   8 _ieee_double_little
-gdb_arm_d1  =  76, //  1444   8 _ieee_double_little
-gdb_arm_d2  =  77, //  2452   8 _ieee_double_little
-gdb_arm_d3  =  78, //  3460   

Re: [Lldb-commits] [PATCH] D11790: Fix ObjC++ types Class and id being defined in C and C++ expressions.

2015-08-14 Thread Dawn Perchik via lldb-commits
dawn added a comment.

See inline comments.



Comment at: source/Commands/CommandObjectExpression.cpp:308
@@ -307,3 @@
-else
-options.SetLanguage(target->GetLanguage());
-

Why was this removed?  Doesn't this break the intent of the target.language 
setting?  That is:
if expression --language option is set, use it,
else if target.language option is set, use it,
else default to the language of the frame.

Please keep this or preserve the above behavior another way.


Comment at: source/Expression/ClangUserExpression.cpp:1063
@@ +1062,3 @@
+if (c_langs.find(language) != c_langs.end())
+language = eLanguageTypeC_plus_plus_11;
+

If the user explicitly wanted the language to be C (either by expression 
--language or target.language settings), we should not give them C++11.


http://reviews.llvm.org/D11790



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


[Lldb-commits] [lldb] r245141 - A messy bit of cleanup: Move towards more descriptive names

2015-08-14 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Fri Aug 14 20:21:01 2015
New Revision: 245141

URL: http://llvm.org/viewvc/llvm-project?rev=245141&view=rev
Log:
A messy bit of cleanup: Move towards more descriptive names
for eh_frame and stabs register numberings.  This is not
complete but it's a step in the right direction.  It's almost
entirely mechanical.

lldb informally uses "gcc register numbering" to mean eh_frame.
Why?  Probably because there's a notorious bug with gcc on i386
darwin where the register numbers in eh_frame were incorrect.
In all other cases, eh_frame register numbering is identical to
dwarf.

lldb informally uses "gdb register numbering" to mean stabs.
There are no official definitions of stabs register numbers
for different architectures, so the implementations of gdb
and gcc are the de facto reference source.

There were some incorrect uses of these register number types
in lldb already.  I fixed the ones that I saw as I made
this change.

This commit changes all references to "gcc" and "gdb" register
numbers in lldb to "eh_frame" and "stabs" to make it clear 
what is actually being represented.

lldb cannot parse the stabs debug format, and given that no
one is using stabs any more, it is unlikely that it ever will.
A more comprehensive cleanup would remove the stabs register
numbers altogether - it's unnecessary cruft / complication to
all of our register structures.

In ProcessGDBRemote, when we get register definitions from
the gdb-remote stub, we expect to see "gcc:" (qRegisterInfo)
or "gcc_regnum" (qXfer:features:read: packet to get xml payload).
This patch changes ProcessGDBRemote to also accept "ehframe:"
and "ehframe_regnum" from these remotes.

I did not change GDBRemoteCommunicationServerLLGS or debugserver
to send these new packets.  I don't know what kind of interoperability
constraints we might be working under.  At some point in the future
we should transition to using the more descriptive names.

Throughout lldb we're still using enum names like "gcc_r0" and "gdb_r0",
for eh_frame and stabs register numberings.  These should be cleaned
up eventually too.

The sources link cleanly on macosx native with xcode build.  I
don't think we'll see problems on other platforms but please let
me know if I broke anyone.

Added:
lldb/trunk/source/Utility/ARM64_Stabs_Registers.h
  - copied, changed from r244435, 
lldb/trunk/source/Utility/ARM64_GCC_Registers.h
lldb/trunk/source/Utility/ARM_Stabs_Registers.h
  - copied, changed from r245130, 
lldb/trunk/source/Utility/ARM_GCC_Registers.h
Removed:
lldb/trunk/source/Utility/ARM64_GCC_Registers.h
lldb/trunk/source/Utility/ARM_GCC_Registers.h
Modified:
lldb/trunk/include/lldb/Target/RegisterContext.h
lldb/trunk/include/lldb/lldb-enumerations.h
lldb/trunk/lldb.xcodeproj/project.pbxproj
lldb/trunk/source/Core/EmulateInstruction.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-x86_64/ABISysV_x86_64.cpp
lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextDummy.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextHistory.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_mips64.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContext_mips64.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContext_powerpc.h
lldb/trunk/source/Plugins/Process/Utility/RegisterContext_x86.h
lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_arm.h
lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_arm64.h
lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_i386.h
lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_mips.h
lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_mips64.h
lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_powerpc.h
lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_x86_64.h

lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
lldb/trunk/source/Plugins/Process/gdb-

[Lldb-commits] [lldb] r245151 - Update DynamicRegisterInfo::SetRegisterInfo to accept eh_frame register

2015-08-14 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Fri Aug 14 21:59:42 2015
New Revision: 245151

URL: http://llvm.org/viewvc/llvm-project?rev=245151&view=rev
Log:
Update DynamicRegisterInfo::SetRegisterInfo to accept eh_frame register
numbers in the key name "ehframe" or "eh_frame" in addition to the deprecated
"gcc" name (e.g. from a plugin.process.gdb-remote.target-definition-file
python file).

Modified:
lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp

Modified: lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp?rev=245151&r1=245150&r2=245151&view=diff
==
--- lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp Fri Aug 
14 21:59:42 2015
@@ -326,7 +326,13 @@ DynamicRegisterInfo::SetRegisterInfo(con
 // Fill in the register numbers
 reg_info.kinds[lldb::eRegisterKindLLDB] = i;
 reg_info.kinds[lldb::eRegisterKindStabs] = i;
-reg_info_dict->GetValueForKeyAsInteger("gcc", 
reg_info.kinds[lldb::eRegisterKindEHFrame], LLDB_INVALID_REGNUM);
+uint32_t eh_frame_regno = LLDB_INVALID_REGNUM;
+reg_info_dict->GetValueForKeyAsInteger("gcc", eh_frame_regno, 
LLDB_INVALID_REGNUM);
+if (eh_frame_regno == LLDB_INVALID_REGNUM);
+reg_info_dict->GetValueForKeyAsInteger("ehframe", eh_frame_regno, 
LLDB_INVALID_REGNUM);
+if (eh_frame_regno == LLDB_INVALID_REGNUM);
+reg_info_dict->GetValueForKeyAsInteger("eh_frame", eh_frame_regno, 
LLDB_INVALID_REGNUM);
+reg_info.kinds[lldb::eRegisterKindEHFrame] = eh_frame_regno;
 reg_info_dict->GetValueForKeyAsInteger("dwarf", 
reg_info.kinds[lldb::eRegisterKindDWARF], LLDB_INVALID_REGNUM);
 std::string generic_str;
 if (reg_info_dict->GetValueForKeyAsString("generic", generic_str))


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