michael@0: # Test printing roots that refer to NULL pointers. michael@0: michael@0: # Since mozilla.prettyprinters.Pointer declines to create pretty-printers michael@0: # for null pointers, GDB built-in printing code ends up handling them. But michael@0: # as of 2012-11, GDB suppresses printing pointers in replacement values: michael@0: # see: http://sourceware.org/ml/gdb/2012-11/msg00055.html michael@0: # michael@0: # Thus, if the pretty-printer for JS::Rooted simply returns the referent as michael@0: # a replacement value (which seems reasonable enough, if you want the michael@0: # pretty-printer to be completely transparent), and the referent is a null michael@0: # pointer, it prints as nothing at all. michael@0: # michael@0: # This test ensures that the JS::Rooted pretty-printer doesn't make that michael@0: # mistake. michael@0: michael@0: gdb.execute('set print address on') michael@0: michael@0: run_fragment('Root.null') michael@0: michael@0: assert_pretty('null', '0x0')