Merge pull request #3514 from glennw/gdb-helper

Fix gdb helper for Au printer

Reviewed-by: metajack
This commit is contained in:
bors-servo 2014-09-28 18:09:30 -06:00
commit 18b35faffe

View file

@ -28,7 +28,7 @@ class AuPrinter:
def to_string(self): def to_string(self):
i32_type = gdb.lookup_type("i32") i32_type = gdb.lookup_type("i32")
au = self.val.cast(i32_type); au = self.val.cast(i32_type);
return "{0}px ({1} au)".format(au / 60.0, au) return "{0}px".format(au / 60.0)
# Print a U8 bitfield as binary # Print a U8 bitfield as binary
class BitFieldU8Printer: class BitFieldU8Printer:
@ -120,7 +120,7 @@ class TestPrinter:
return "[UNKNOWN - type = {0}]".format(str(self.val.type)) return "[UNKNOWN - type = {0}]".format(str(self.val.type))
type_map = [ type_map = [
('Au', AuPrinter), ('struct Au', AuPrinter),
('FlowFlags', BitFieldU8Printer), ('FlowFlags', BitFieldU8Printer),
('IntrinsicWidths', ChildPrinter), ('IntrinsicWidths', ChildPrinter),
('PlacementInfo', ChildPrinter), ('PlacementInfo', ChildPrinter),