gedatsu217 updated this revision to Diff 283686.
gedatsu217 added a comment.
add comments.
revise a test(add self.quit()).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81001/new/
https://reviews.llvm.org/D81001
Files:
lldb/include/lldb/Core/Debugger.h
lldb/include/lldb/Core/IOHan
gedatsu217 updated this revision to Diff 283590.
gedatsu217 added a comment.
Simplify the code.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81001/new/
https://reviews.llvm.org/D81001
Files:
lldb/include/lldb/Core/Debugger.h
lldb/include/lldb/Core/IOHandler.h
lldb/include/lldb/H
gedatsu217 added a comment.
> Are there any other problems with the current state of the patch that haven't
> been resolved? (I went over the comments, but it's hard to say what has and
> hasn't been fixed until now).
Yes, I have solved all the problems.
CHANGES SINCE LAST ACTION
https://re
gedatsu217 added a comment.
> So, if I would type "b" and then press tab, the autosuggestion would briefly
> disappear until I type the next character?
Yes. Indeed, it may not be good. I'll think of other ways.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81001/new/
https://reviews.
gedatsu217 added a comment.
> So the way the issue with the single space is now solved is by doing
> CC_REDISPLAY when we're only adding the single space? Isn't that also
> deleting the whole autosuggestion?
Yes. CC_REDISPLAY can delete all the gray characters left.
Comment
gedatsu217 updated this revision to Diff 282961.
gedatsu217 added a comment.
Add test.
Delete gray character if autosuggestion has the only one character. (e.g. "b")
(Editline::TabCommand)
Simplify the code.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81001/new/
https://reviews.llv
gedatsu217 added a comment.
@teemperor I understand what you say just now. Indeed, your method is more
efficient than mine. I'm fixing the code now.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81001/new/
https://reviews.llvm.org/D81001
___
gedatsu217 added a comment.
>>> I don't think the value of m_previous_autosuggestion_size should only grow
>>> (which is what this if is doing), as this way we just keep printing a
>>> longer and longer space buffer over time. Just printing enough to clear the
>>> buffer of the previous complet
gedatsu217 added a comment.
@skipIfAsan
@skipIfEditlineSupportMissing
def test_hidden_autosuggestion(self):
@skipIfAsan
@skipIfEditlineSupportMissing
def test_autosuggestion(self):
self.launch(extra_args=["-o", "settings set show-autosuggestion true",
"-o", "settings set use-col
gedatsu217 updated this revision to Diff 282430.
gedatsu217 added a comment.
Add spaces when a character is typed.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81001/new/
https://reviews.llvm.org/D81001
Files:
lldb/include/lldb/Core/Debugger.h
lldb/include/lldb/Core/IOHandler.h
gedatsu217 added a comment.
> Also could you rebase the diff here when you have time (e.g., regenerate the
> diff from you changes on top of the latest master commit)? It no longer
> applies at the moment without having to manually resolve a conflict.
Does this mean that I should generate diff
gedatsu217 added a comment.
Although I thought of how to clear all the following characters, I did not come
up with it. So, I will try to fill the space. Should I add how many spaces? If
I add too many spaces, sequences will be two lines, but if I add a few spaces,
I can't handle some of the c
gedatsu217 updated this revision to Diff 281686.
gedatsu217 added a comment.
Sorry, I mistakenly uploaded a different file. This is the correct file.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81001/new/
https://reviews.llvm.org/D81001
Files:
lldb/include/lldb/Core/Debugger.h
ll
gedatsu217 updated this revision to Diff 281677.
gedatsu217 added a comment.
Fix the cursor position. (Editline::TypedCharacter)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81001/new/
https://reviews.llvm.org/D81001
Files:
lldb/include/lldb/Core/Debugger.h
lldb/include/lldb/Core/
gedatsu217 added a comment.
For example, I execute "help frame variable" and save it as command history.
Then, when I type "hel", "helhelp [me variable]" (gray characters are in []) is
displayed, probably because of cursor position or CC_NORM.
I am trying to solve this problem, but I have not c
gedatsu217 added a comment.
Sorry, I found the bug. Please do not check this yet.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81001/new/
https://reviews.llvm.org/D81001
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists
gedatsu217 updated this revision to Diff 281247.
gedatsu217 added a comment.
Editline::TypedCharacter is called when delete is pressed. (This probably fix
the above bug.)
Revise the test.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81001/new/
https://reviews.llvm.org/D81001
Files:
gedatsu217 updated this revision to Diff 281017.
gedatsu217 added a comment.
Revise Editline::ApplyAutosuggestCommand. (Change the return value.)
Revise IOHandlerEditline::IOHandlerEditline (Disable to use autosuggestion if
debugger.GetUseColor() is false.)
Fix the test.
CHANGES SINCE LAST AC
gedatsu217 added a comment.
> Could you create a patch to change the definition of ANSI_UNFAINT ? (might be
> worth taking a quick look at git history if there is no good reason for why
> it uses the color code that it uses)
Sure. Should I create another patch? (In short, should I create it sep
gedatsu217 added a comment.
I do not intend for this feature to work with colors disabled.
I found that pexpect output the below sequence, and this passed the test.
self.child.expect_exact("\x1b[" + str(len("(lldb) he") + 1) + "G" + "l" +
"\x1b[2m" + "p frame" + "\x1b[0m\x1b[1G" + "l" + "\x1b
gedatsu217 added a comment.
Yes, I'm testing it on Mac.
By the way, I checked its output on the error message. When the test failed,
the characters, `buffer (last 100 chars) : ~~~`, are displayed as an error
message. I thought it was pexpect's output, possibly it is not that output?
CHANGES
gedatsu217 added a comment.
> That said, are you sure this is the right sequence? \x1b[1Gl seems like it
> should print the l at column one, which does not sound right...
I thought it did not add up too, but pexpect probably actually outputs these
characters.
> The sequence I got in this test
gedatsu217 added a comment.
I checked what's the sequence that actually gets output, and it was like below.
h\x1b[2melp frame\x1b[0m\x1b[1Ghe\x1b[2mlp frame\x1b[0m\x1b[1Gel\x1b[2mp
frame\x1b[0m\x1b[1Gl
Is it not good to check these characters in `expect_exact`?
CHANGES SINCE LAST ACTION
h
gedatsu217 updated this revision to Diff 279906.
gedatsu217 added a comment.
Add the test content.
Change return from void to llvm::Optional in several functions to
make the code cleaner.
Revise the details.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81001/new/
https://reviews.llv
gedatsu217 added a comment.
In addition to it, I tried the below code, but it did not go well. ("\x1b[nD"
moves the cursor n steps to the left.)
self.child.send("hel")
self.child.expect_exact(faint_color + "p frame" + reset + "\x1b[" +
str(len("p frame")) + "D")
In the first place, the bel
gedatsu217 marked an inline comment as done.
gedatsu217 added inline comments.
Comment at: lldb/source/Core/IOHandler.cpp:204
+ .GetAutoSuggestionForCommand(line))
+result = res.getValue();
+}
labath wrote:
> gedatsu217 wrote:
> > labath w
gedatsu217 marked an inline comment as done.
gedatsu217 added a comment.
> help help frame should not have an autosuggestion to help frame. You can just
> try to get the autosuggestion for help help frame and check for the error for
> an invalid command.
Sorry, I do not know what this means. No
gedatsu217 updated this revision to Diff 278580.
gedatsu217 added a comment.
Remove extra parts in Editline::TabCommand in Editline.cpp.
Add a test for the autosuggestion.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81001/new/
https://reviews.llvm.org/D81001
Files:
lldb/include/ll
gedatsu217 marked an inline comment as done.
gedatsu217 added inline comments.
Comment at: lldb/source/Host/common/Editline.cpp:1017
+ el_insertstr(m_editline, to_add.c_str());
+ return CC_REFRESH;
+}
teemperor wrote:
> gedatsu217 wrote:
gedatsu217 marked an inline comment as done.
gedatsu217 added inline comments.
Comment at: lldb/source/Host/common/Editline.cpp:1017
+ el_insertstr(m_editline, to_add.c_str());
+ return CC_REFRESH;
+}
teemperor wrote:
> gedatsu217 wrote:
gedatsu217 updated this revision to Diff 276468.
gedatsu217 added a comment.
I fixed the code according to your advice.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81001/new/
https://reviews.llvm.org/D81001
Files:
lldb/include/lldb/Core/Debugger.h
lldb/include/lldb/Core/IOHandler
gedatsu217 marked an inline comment as done.
gedatsu217 added inline comments.
Comment at: lldb/source/Host/common/Editline.cpp:1017
+ el_insertstr(m_editline, to_add.c_str());
+ return CC_REFRESH;
+}
teemperor wrote:
> If I understand t
gedatsu217 updated this revision to Diff 273349.
gedatsu217 added a comment.
I revised the code according to your advice.
In addition, llvm::Optional was originally returned in
CommandInterpreter::GetAutoSuggestionForCommand, but it seems to useless that
converting llvm::Optional to std::string
gedatsu217 added a comment.
I understood what you said. Sorry, I misunderstood it. Indeed,
m_current_autosuggestion is not good for the future.
I will get the current user input every time calling ApplyCompleteCommand
instead of using m_current_autosuggestion.
By the way, when I use llvm::Opti
gedatsu217 added inline comments.
Comment at: lldb/source/Interpreter/CommandInterpreter.cpp:1875-1878
+if (entry.startswith(line)) {
+ llvm::StringRef res = entry.substr(line.size());
+ result = res.str();
+ return result;
labath wrote:
> ```
gedatsu217 updated this revision to Diff 272479.
gedatsu217 added a comment.
Change the name and return of the function( bool UseAutosuggestion() -> void
SetShowAutosuggestion (bool) ) (ll. 1447 in Editline.cpp and ll.194 in
Editline.h).
int -> size_t (ll. 1009 in Editline.cpp).
Fix for normal s
gedatsu217 updated this revision to Diff 271146.
gedatsu217 added a comment.
Implementation all ascii characters for TypedCharacter.
Making m_use_autosuggestion in Editline.cpp. (I did not know a way to pass the
bool value of IOHandlerEditline to Editline constructor, so I made a function,
Editl
gedatsu217 updated this revision to Diff 270454.
gedatsu217 added a comment.
I updated my codes according to your advice:
Add if(GetUseAutosuggestion()) in IOHandlerSuggestion in IOHandler.cpp. (Is
this not enough?)
Add more keybinds for TypedCharacter.
Return llvm::Optional in HandleSuggestion
gedatsu217 added inline comments.
Comment at: lldb/source/Host/common/Editline.cpp:1244
+llvm::StringRef indent_chars =
+"abcdefghijklmnopqrstuvwxzyABCDEFGHIJKLMNOPQRSTUVWXZY1234567890 ";
+for (char c : indent_chars) {
teemperor wrote:
> `.-/()[]{
gedatsu217 added inline comments.
Comment at: lldb/source/Core/Debugger.cpp:349
+bool Debugger::GetUseAutosuggestion() const {
+ const uint32_t idx = ePropertyShowAutosuggestion;
teemperor wrote:
> You declared the function, but you don't use it anywhere. You
gedatsu217 created this revision.
gedatsu217 added reviewers: teemperor, JDevlieghere.
gedatsu217 added a project: LLDB.
Herald added a subscriber: lldb-commits.
I implemented autosuggestion if there is one possible suggestion.
I set the keybinds for every character. When a character is typed,
Ed
gedatsu217 added a comment.
I performed a factory reset for OS upgrade and rebuild LLDB, and solved this
problem. Thanks.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76906/new/
https://reviews.llvm.org/D76906
_
gedatsu217 added a comment.
[39/575] Linking CXX shared library lib/libc++abi.1.0.dylib
FAILED: lib/libc++abi.1.0.dylib
: && /Library/Developer/CommandLineTools/usr/bin/c++ -fPIC
-fvisibility-inlines-hidden -Werror=date-time
-Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-par
43 matches
Mail list logo