1""" 2They may be cases where an expression will import SourceLocation and if the 3SourceLocation ends up with a FileID that is a built-in we need to copy that 4buffer over correctly. 5""" 6 7 8import lldb 9from lldbsuite.test.decorators import * 10from lldbsuite.test.lldbtest import * 11from lldbsuite.test import lldbutil 12 13 14class TestImportBuiltinFileID(TestBase): 15 @skipIfDarwinEmbedded 16 @add_test_categories(["gmodules", "objc"]) 17 def test_import_builtin_fileid(self): 18 self.build() 19 20 lldbutil.run_to_source_breakpoint( 21 self, "// break here", lldb.SBFileSpec("main.m", False) 22 ) 23 24 self.expect( 25 "expr int (*DBG_CGImageGetRenderingIntent)(void *) = ((int (*)(void *))CGImageGetRenderingIntent); DBG_CGImageGetRenderingIntent((void *)0x00000000000000);", 26 substrs=["$0 = 0"], 27 ) 28