Loading js/src/gdb/moz.build +10 −1 Original line number Diff line number Diff line Loading @@ -25,12 +25,21 @@ UNIFIED_SOURCES += [ 'tests/test-JSString.cpp', 'tests/test-JSSymbol.cpp', 'tests/test-jsval.cpp', 'tests/test-prettyprinters.cpp', 'tests/test-Root.cpp', 'tests/test-unwind.cpp', 'tests/typedef-printers.cpp', ] SOURCES += [ 'tests/test-prettyprinters.cpp' ] if CONFIG['CC_TYPE'] != 'clang-cl': # Test expects to see pre-typedef names of base classes, but the compiler will # normally omit those from the debuginfo. The current clang-cl does not support # this option. SOURCES['tests/test-prettyprinters.cpp'].flags += ['-fno-eliminate-unused-debug-types'] DEFINES['EXPORT_JS_API'] = True LOCAL_INCLUDES += [ Loading js/src/gdb/tests/test-prettyprinters.py +14 −2 Original line number Diff line number Diff line Loading @@ -20,8 +20,20 @@ assert_eq(implemented_type_names('c'), ['C']) assert_eq(implemented_type_names('c_'), ['C_', 'C']) assert_eq(implemented_type_names('e'), ['E', 'C', 'D']) assert_eq(implemented_type_names('e_'), ['E_', 'E', 'C', 'D']) # Some compilers strip trivial typedefs in the debuginfo from classes' base # classes. Sometimes this can be fixed with -fno-eliminate-unused-debug-types, # but not always. Allow this test to pass if the typedefs are stripped. # # It would probably be better to figure out how to make the compiler emit them, # since I think this test is here for a reason. if gdb.lookup_type('F').fields()[0].name == 'C_': # We have the typedef info. assert_eq(implemented_type_names('f'), ['F', 'C_', 'D_', 'C', 'D']) assert_eq(implemented_type_names('h'), ['H', 'F', 'G', 'C_', 'D_', 'C', 'D']) else: assert_eq(implemented_type_names('f'), ['F', 'C', 'D']) assert_eq(implemented_type_names('h'), ['H', 'F', 'G', 'C', 'D']) # Check that our pretty-printers aren't interfering with printing other types. assert_pretty('10', '10') Loading Loading
js/src/gdb/moz.build +10 −1 Original line number Diff line number Diff line Loading @@ -25,12 +25,21 @@ UNIFIED_SOURCES += [ 'tests/test-JSString.cpp', 'tests/test-JSSymbol.cpp', 'tests/test-jsval.cpp', 'tests/test-prettyprinters.cpp', 'tests/test-Root.cpp', 'tests/test-unwind.cpp', 'tests/typedef-printers.cpp', ] SOURCES += [ 'tests/test-prettyprinters.cpp' ] if CONFIG['CC_TYPE'] != 'clang-cl': # Test expects to see pre-typedef names of base classes, but the compiler will # normally omit those from the debuginfo. The current clang-cl does not support # this option. SOURCES['tests/test-prettyprinters.cpp'].flags += ['-fno-eliminate-unused-debug-types'] DEFINES['EXPORT_JS_API'] = True LOCAL_INCLUDES += [ Loading
js/src/gdb/tests/test-prettyprinters.py +14 −2 Original line number Diff line number Diff line Loading @@ -20,8 +20,20 @@ assert_eq(implemented_type_names('c'), ['C']) assert_eq(implemented_type_names('c_'), ['C_', 'C']) assert_eq(implemented_type_names('e'), ['E', 'C', 'D']) assert_eq(implemented_type_names('e_'), ['E_', 'E', 'C', 'D']) # Some compilers strip trivial typedefs in the debuginfo from classes' base # classes. Sometimes this can be fixed with -fno-eliminate-unused-debug-types, # but not always. Allow this test to pass if the typedefs are stripped. # # It would probably be better to figure out how to make the compiler emit them, # since I think this test is here for a reason. if gdb.lookup_type('F').fields()[0].name == 'C_': # We have the typedef info. assert_eq(implemented_type_names('f'), ['F', 'C_', 'D_', 'C', 'D']) assert_eq(implemented_type_names('h'), ['H', 'F', 'G', 'C_', 'D_', 'C', 'D']) else: assert_eq(implemented_type_names('f'), ['F', 'C', 'D']) assert_eq(implemented_type_names('h'), ['H', 'F', 'G', 'C', 'D']) # Check that our pretty-printers aren't interfering with printing other types. assert_pretty('10', '10') Loading