LLDB crashes on "frame variable"

I just upgraded to Mountain Lion. I am getting this error when I try to debug using “frame variable”. I use brew to install python. Let me know if you need more information. This was working fine before the upgrade.

Thank you.
Richard Catlin

SDGL10fd4f1cb:mybuilddirdebug2 rcatlin1$ lldb bin/TPL
Current executable set to ‘bin/TPL’ (x86_64).
(lldb) breakpoint set --line 1877
Breakpoint 1: where = TPL`main + 2497 at tpl.cpp:1877, address = 0x000000010000ab11
(lldb) process launch
Process 66661 launched: ‘/Users/rcatlin1/lldb/mybuilddirdebug2/bin/TPL’ (x86_64)

Process 66661 stopped

  • thread #1: tid = 0x1c03, 0x000000010000ab11 TPLmain + 2497 at tpl.cpp:1877, stop reason = breakpoint 1.1 frame #0: 0x000000010000ab11 TPLmain + 2497 at tpl.cpp:1877
    1874
    1875 // Call block_dep function in libBLOCKDEP
    1876 block_dep bd;
    → 1877 std::liststd::string order2 = bd.execute(map1, edges);
    1878 std::reverse(order2.begin(), order2.end());
    1879 std::liststd::string order;
    1880 for(std::liststd::string::iterator iter(order2.begin()); iter != order2.end(); ++iter) {

(lldb) frame variable

Traceback (most recent call last):
File “/usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py”, line 563, in
main()
File “/usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py”, line 545, in main
known_paths = addusersitepackages(known_paths)
File “/usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py”, line 278, in addusersitepackages
user_site = getusersitepackages()
File “/usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py”, line 253, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File “/usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py”, line 243, in getuserbase
USER_BASE = get_config_var(‘userbase’)
File “/usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py”, line 472, in get_config_var
return get_config_vars().get(name)
File “/usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py”, line 405, in get_config_vars
import re
File “/usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py”, line 105, in
import sre_compile
File “/usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_compile.py”, line 14, in
import sre_parse
File “/usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_parse.py”, line 17, in
from sre_constants import *
File “/usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_constants.py”, line 18, in
from _sre import MAXREPEAT
ImportError: cannot import name MAXREPEAT

This looks like an issue with your “custom” (i.e. non OS-provided) version of Python
Does this work if you redirect to the system-wide Python.framework?
Most probably some of your variables require a Python data formatter, and this is causing the script interpreter to start, and that in turn causes this issue
A workaround is to type

(lldb) type category disable *

but this will disable all data formatters, and might not be what you want given that you are extensively using the STL

My first bet would be to try the same thing with the Python built into OSX and then take it from there

Enrico Granata
:email: egranata@.com
✆ 27683

This looks like you are running your newly built python, but this new python is having trouble finding things that _it_ requires to import. The "from _sre import MAXREPEAT" is failing which is coming from files in your new python install which means somehow your new python is not fully installed correctly.

I would revert to the default python that is installed.

Greg