DerekSelander / LLDB

A collection of LLDB aliases/regexes and Python scripts to aid in your debugging sessions
GNU General Public License v2.0
1.77k stars 198 forks source link

Xcode 11 / iOS 13 support #19

Closed aaronash closed 4 years ago

aaronash commented 4 years ago

Upon launching a project in Xcode 11 with iOS 13, a bunch of warnings related to this project are dumped:

error: module importing failed: Missing parentheses in call to 'print'. Did you mean print(data.sint64[0])? (ds.py, line 229)
  File "temp.py", line 1, in <module>
  File "/Users/ash/iOS/source/LLDB/lldb_commands/xref.py", line 4, in <module>
    import ds

error: module importing failed: Missing parentheses in call to 'print'. Did you mean print(data.sint64[0])? (ds.py, line 229)
  File "temp.py", line 1, in <module>
  File "/Users/ash/iOS/source/LLDB/lldb_commands/lookup.py", line 25, in <module>
    import ds

error: module importing failed: Missing parentheses in call to 'print'. Did you mean print(data.sint64[0])? (ds.py, line 229)
  File "temp.py", line 1, in <module>
  File "/Users/ash/iOS/source/LLDB/lldb_commands/section.py", line 7, in <module>
    import ds

error: module importing failed: Missing parentheses in call to 'print'. Did you mean print(data.sint64[0])? (ds.py, line 229)
  File "temp.py", line 1, in <module>
  File "/Users/ash/iOS/source/LLDB/lldb_commands/disassemble.py", line 7, in <module>
    import ds

error: module importing failed: Missing parentheses in call to 'print'. Did you mean print(data.sint64[0])? (ds.py, line 229)
  File "temp.py", line 1, in <module>
  File "/Users/ash/iOS/source/LLDB/lldb_commands/msl.py", line 5, in <module>
    import ds

error: module importing failed: Missing parentheses in call to 'print'. Did you mean print(data.sint64[0])? (ds.py, line 229)
  File "temp.py", line 1, in <module>
  File "/Users/ash/iOS/source/LLDB/lldb_commands/dclass.py", line 24, in <module>
    import ds

error: module importing failed: inconsistent use of tabs and spaces in indentation (search.py, line 383)
  File "temp.py", line 1, in <module>

error: module importing failed: Missing parentheses in call to 'print'. Did you mean print(data.sint64[0])? (ds.py, line 229)
  File "temp.py", line 1, in <module>

error: module importing failed: Missing parentheses in call to 'print'. Did you mean print(frame)? (breakifonfunc.py, line 84)
  File "temp.py", line 1, in <module>

error: module importing failed: Missing parentheses in call to 'print'. Did you mean print(data.sint64[0])? (ds.py, line 229)
  File "temp.py", line 1, in <module>
  File "/Users/ash/iOS/source/LLDB/lldb_commands/sbt.py", line 26, in <module>
    import ds

error: module importing failed: Missing parentheses in call to 'print'. Did you mean print('Whoops! You are missing the <' + arg.argName + '> argument.')? (fblldb.py, line 96)
  File "temp.py", line 1, in <module>

It looks like the commands are generally broken as well (dclass specifically, for example). This is an awesome project, would love to see iOS 13 support. Thank you for all the work you've contributed on this project already!

aaronash commented 4 years ago

These turned out to be some super easy fixes. Just do what it suggests and it'll work.

DerekSelander commented 4 years ago

@aaronash I can't replicate on my end, but I don't doubt this isn't an issue. What Python version do you have in Xcode?

(lldb) script sys.version_info
sys.version_info(major=3, minor=7, micro=3, releaselevel='final', serial=0)
aaronash commented 4 years ago

Sorry for slow reply -

(lldb) script sys.version_info
sys.version_info(major=3, minor=7, micro=3, releaselevel='final', serial=0)
rustymagnet3000 commented 4 years ago

hey @aaronash. It sounds like a Python (2.7 vs 3.7) version issue.

Did you download the latest scripts from this repo?

What happens if you?..

(lldb) script print("blah")
blah

Just so you know, it works for me on xCode 11.2.1 and iOS 10-13.

aaronash commented 4 years ago

That works for me as well, same output as above. Anyway, no need to keep this open if nobody else had this problem (that was a super easy fix in the first place).