def webkit_root_dir(): return stbwku.search_wk_top_dir(os.getcwd())
webkit_root_dir_var = None def webkit_root_dir(): return stbwku.search_wk_top_dir(os.getcwd()) def webkit_add_extra_lib_dir (lib_dir): if os.path.exists(lib_dir): ld_library_path = os.getenv("LD_LIBRARY_PATH") if ld_library_path == None or len(ld_library_path) == 0: gdb.execute("set env LD_LIBRARY_PATH=%s" % (lib_dir)) else: gdb.execute("set env LD_LIBRARY_PATH=%s:%s" % (lib_dir, ld_library_path)) print "Added '%s' to LD_LIBRARY_PATH" % (lib_dir) # MBXT: Add lib dir for libwebkit mbxt_root_dir_var = stb.mbxt.u.search_top_dir() webkit_root_dir_var = stbwku.search_wk_top_dir() if mbxt_root_dir_var: print "Inside of a MBXT workspace." if os.path.exists("../webkit/lib"): webkit_add_extra_lib_dir("../webkit/lib") if not webkit_root_dir_var: webkit_root_dir_var = stbwku.search_wk_top_dir(os.path.join(mbxt_root_dir_var, "webkit")) if webkit_root_dir_var: print "Inside of a WebKit workspace. Loading Tools/gdb/webkit.py..." if os.path.exists(os.path.join(webkit_root_dir_var, "Tools/gdb")): # This works for the new directory hierarchy... sys.path.insert(0, os.path.join(webkit_root_dir_var, "Tools/gdb")) elif os.path.exists(os.path.join(webkit_root_dir_var, "WebKitTools/gdb")): # This works for the old directory hierarchy... sys.path.insert(0, os.path.join(webkit_root_dir_var, "WebKitTools/gdb"))