Re: [lldb-dev] [RFC]The future of pexpect

2019-01-30 Thread Alex Langford via lldb-dev
+1

Thanks for bringing this up. I'd like to see this happen!

- Alex

On 1/30/19, 5:33 PM, "lldb-dev on behalf of Davide Italiano via lldb-dev" 
 wrote:

As you probably know (I didn’t), lldb embeds its own version of
`pexpect-2.4`, which doesn’t support python3.
This is the (relatively short) list of tests relying on pyexpect:

testcases/tools/lldb-mi/syntax/TestMiSyntax.py:import pexpect
# 7 (EOF)
testcases/tools/lldb-mi/lldbmi_testcase.py:import pexpect
testcases/tools/lldb-mi/signal/TestMiSignal.py:import pexpect
testcases/tools/lldb-mi/signal/TestMiSignal.py:import pexpect
testcases/lldbtest.py:import pexpect
testcases/driver/batch_mode/TestBatchMode.py:import pexpect
testcases/driver/batch_mode/TestBatchMode.py:import pexpect
testcases/driver/batch_mode/TestBatchMode.py:import pexpect
testcases/driver/batch_mode/TestBatchMode.py:import pexpect
testcases/lldbpexpect.py:import pexpect
testcases/terminal/TestSTTYBeforeAndAfter.py:import pexpect
testcases/darwin_log.py:import pexpect
testcases/macosx/nslog/TestDarwinNSLogOutput.py:import pexpect
testcases/benchmarks/stepping/TestSteppingSpeed.py:import pexpect
testcases/benchmarks/frame_variable/TestFrameVariableResponse.py:
  import pexpect
testcases/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py:
   import pexpect
testcases/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py:
   import pexpect
testcases/benchmarks/expression/TestExpressionCmd.py:import pexpect
testcases/benchmarks/expression/TestRepeatedExprs.py:import pexpect
testcases/benchmarks/expression/TestRepeatedExprs.py:import pexpect
testcases/benchmarks/startup/TestStartupDelays.py:import pexpect
testcases/functionalities/command_regex/TestCommandRegex.py:
import pexpect

testcases/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py:
   import pexpect
testcases/functionalities/format/TestFormats.py:import pexpect

(I count 14, but there might be something else).

I audited all of them and from what I see they’re almost all testing the 
driver.
I had a chat with my coworkers and we agreed it's reasonable to
replace them with lit tests (as they're just running commands).
This would allow us to get rid of an external dependency, which
happened to be cause of trouble in the past.

Are there any objections?

Thanks,

--
Davide
___
lldb-dev mailing list
lldb-dev@lists.llvm.org

https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_lldb-2Ddev=DwIGaQ=5VD0RTtNlTh3ycd41b3MUw=plcBe-Lvb3GcVnji0z26DNJmyn6uNsBq7AW-IQ7KAQQ=oo0_7ONGQhEkwtwF6DG8I6sVC2lUR-vlmka8pm4v1k0=zp1B92i8MPZxGtbFYUADj5J4GqHwpC1-g_x3fIN1hq0=


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


Re: [lldb-dev] [CMake] LLDB framework / shared library

2018-11-09 Thread Alex Langford via lldb-dev
cc lldb-dev since the original message cc'd it.

On 11/9/18, 12:31 PM, "Alex Langford"  wrote:

Hi Stefan,

Thanks for taking the time to improve LLDB's CMake infrastructure!

(1) I don't entirely remember the reason I had separated them out into 
separate targets. A post-build step would be fine, so feel free to merge these.
(2) I have no problems with this. If I remember correctly, I wanted to put 
everything into LLDBFramework.cmake originally and include it if 
LLDB_BUILD_FRAMEWORK got set, but that proved more difficult than I realized. I 
think what you are suggesting is better than what I ended up doing. Feel free 
to make that change.
(3) I think this is a good idea. I found this confusing as well.
(4) If that is the case, I think I agree that the Xcode behavior is better. 
(5) I'm not sure that this is going to actually simplify things. I don't 
think it's possible to do in source/API/CMakeLists.txt because the tools 
haven't been added as targets yet. With the current CMake logic, you could pull 
this logic into its own section that happens after the tools are added as 
targets. I don't find this any better than what we have now.
(6) I'm not sure why this is the case actually. I believe this was added by 
beanz originally, I just moved this check to be closer to the beginning of the 
build. If it works with CMake versions less than 3.7 then I have no issues with 
removing it.

Let me know if something is unclear or you have further questions/concerns.

Alex


On 11/9/18, 9:38 AM, "sgraen...@apple.com on behalf of Stefan Gränitz" 
 wrote:

Hello Alex, hello Pavel

I spent some time creating/streamlining our CMake infrastructure 
downstream of LLDB and learned a few things about bundles, versions, 
code-signing etc. (mostly on the Darwin side of things). I am currently sorting 
out what can be upstreamed and prepare reviews.

Some work is still todo for the LLDB shared library/framework (for 
simplicity I will call it LLDB.framework). It would be great to know, if you 
have concerns or comments on the following points:

(1) The liblldb target builds the actual LLDB.framework, while the 
lldb-framework target adds headers, symlinks, etc. What is the reason for this 
separation? Can I merge that into one target with post-build steps?

(2) In previous reviews there was an effort to centralize the code for 
building LLDB.framework, which makes sense to me. With the current 
LLDBFramework.cmake approach, however, it’s spread over at least 3 different 
files (lldb/CMakeLists.txt for init and lldb/source/API/CMakeLists.txt for 
actual definition). In a similar case downstream, I did all that in a single 
CMakeLists.txt in the source folder. While I see that LLDBFramework affects the 
whole project, I don’t see why we need a separate LLDBFramework.cmake (BTW 
upstream it’s included only once). Do you think I can move things to 
lldb/source/API/CMakeLists.txt where possible?

(3) Currently the build directory for LLDB.framework is determined from 
LLDB_FRAMEWORK_INSTALL_DIR, which I think is a little confusing. Can I clean 
this up? (e.g. having a LLDB_FRAMEWORK_BUILD_DIR)

(4) With Xcode, executables are emitted in bin and copied to 
LLDB.framework where necessary. CMake emits them into LLDB.framework directly 
and creates symlinks to bin. With LLVM_EXTERNALIZE_DEBUGINFO on Darwin, this 
has the effect, that by default their dSYMs will end up in LLDB.framework. 
Thus, I would prefer the Xcode behaviour here.

(5) Couldn’t (4) also simplify the INCLUDE_IN_SUITE logic? I would 
consider it to be LLDB.framework’s responsibility to set dependencies and 
adjust RPATHs for all required artefacts. The tools wouldn’t need to care about 
that (though, they could still check LLDB_BUILD_FRAMEWORK). The RPATH-login for 
case ARG_INCLUDE_IN_SUITE && LLDB_BUILD_FRAMEWORK is quite complicated though 
and I wonder if there are strong reasons not to do that. What do you think?

(6) Just out of interest: why is LLDB_BUILD_FRAMEWORK is not supported 
on CMake < 3.7?

Best
Stefan







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


[lldb-dev] Patch to fix a segfault while printing in LLDB

2017-04-25 Thread Alex Langford via lldb-dev
Hello,

I probably should have sent this email before trying to work on this and before 
submitting a diff, but better late than never.

Recently I encountered a segfault while using LLDB. I tracked down the issue in 
source/Host/common/Editline.cpp, and have uploaded a diff with what I believe 
is the correct fix. I originally have added reviewers based on people who 
committed to the same file in the past few months, but I’m unsure of who might 
be best to review this. If you are familiar with this portion of the codebase 
and have some time, I would appreciate a review. The relevant details 
(reproduction, justification of my fix, etc) are in the summary of the diff.

The diff in question is here: https://reviews.llvm.org/D32421


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