Lldb on interactive CLI programs - How to set a breakpoint where some output X is passed to stdout, waiting for input from the user

I am inspecting the bash executable with lldb. If I run on my terminal:


It provides a new command prompt like so:


I’d like to set a breakpoint just at the line where the code outputs bash-3.2$ to the terminal, and waits for the user to type some input.

How can I do this?

@lolgrep Can you please help with this when you get a chance? Thank you - much appreciated! :]

Hi @lolgrep, any advice on this?

Hi @lolgrep and @shogunkaramazov, is there an answer to this?

Check out the external functions bash is calling with a nm -u $(which bash)

Are there any functions you see that would stand out to try breakpoints on?

@junxiang99 Do you still have issues with this?