Re: [lldb-dev] Variable shadowing

2016-06-23 Thread Greg Clayton via lldb-dev
ry. > > Your script seems pretty useful. Maybe you can add it to the python examples. > > -Original Message- > From: Greg Clayton [mailto:gclay...@apple.com] > Sent: Thursday, June 23, 2016 12:00 AM > To: Greg Clayton > Cc: Bogdan Hopulele ; lldb-dev@lists.llvm.org

Re: [lldb-dev] Variable shadowing

2016-06-23 Thread Bogdan Hopulele via lldb-dev
script seems pretty useful. Maybe you can add it to the python examples. -Original Message- From: Greg Clayton [mailto:gclay...@apple.com] Sent: Thursday, June 23, 2016 12:00 AM To: Greg Clayton Cc: Bogdan Hopulele ; lldb-dev@lists.llvm.org Subject: Re: [lldb-dev] Variable shadowing The

Re: [lldb-dev] Variable shadowing

2016-06-22 Thread Greg Clayton via lldb-dev
The logic is a bit wrong in my script, it should first print out the variables we have already found, followed by the one we are currently processing. The fixed script is attached: #!/usr/bin/python import lldb import shlex @lldb.command("check-shadow") def check_shadow_command(debugger, comma

Re: [lldb-dev] Variable shadowing

2016-06-22 Thread Greg Clayton via lldb-dev
You can currently do this by checking for other variables to see if any names match. In python when stopped in the function below you can do use the API: (lldb) script Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D. >>> frame_vars = lldb.frame.GetVariables(True, True