[Lldb-commits] [PATCH] D68541: Implement 'up' and 'down' shortcuts in lldb gui

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 15 11:45:32 PDT 2019


clayborg requested changes to this revision.
clayborg added inline comments.
This revision now requires changes to proceed.


================
Comment at: lldb/packages/Python/lldbsuite/test/commands/gui/basicdebug/TestGuiBasicDebug.py:32
+        self.child.send("s") # step
+        self.child.expect_exact("return 1; // In function")
+        self.child.expect_exact("Thread 1: step in")
----------------
Just checking for the source is probably not enough here. We need to check for the source _and_ the stop reason and ensure they are on the same line. If the output to the screen was:

```
return 1; // In function
other code here;  <<< Thread 1: step in
```

We would want this to fail (it will currently succeed), but we want it to succeed if we get it all on one line:

```
return 1; // In function           <<< Thread 1: step in
```

This applies to all expect_exact calls below as well.

So this should probably be something that uses a regex like:

```
self.child.expect("return 1; // In function[^\r\n]+<<< Thread 1: step in")
```





Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68541/new/

https://reviews.llvm.org/D68541





More information about the lldb-commits mailing list