| OLD | NEW |
| 1 #!/usr/bin/python | |
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 5 | 4 |
| 6 """GDB support for Chrome types. | 5 """GDB support for Chrome types. |
| 7 | 6 |
| 8 Add this to your gdb by amending your ~/.gdbinit as follows: | 7 Add this to your gdb by amending your ~/.gdbinit as follows: |
| 9 python | 8 python |
| 10 import sys | 9 import sys |
| 11 sys.path.insert(0, "/path/to/tools/gdb/") | 10 sys.path.insert(0, "/path/to/tools/gdb/") |
| (...skipping 28 matching lines...) Expand all Loading... |
| 40 'GURL': GURLPrinter, | 39 'GURL': GURLPrinter, |
| 41 'FilePath': FilePathPrinter, | 40 'FilePath': FilePathPrinter, |
| 42 } | 41 } |
| 43 | 42 |
| 44 printer = type_to_printer.get(str(val.type), None) | 43 printer = type_to_printer.get(str(val.type), None) |
| 45 if printer: | 44 if printer: |
| 46 return printer(val) | 45 return printer(val) |
| 47 return None | 46 return None |
| 48 | 47 |
| 49 gdb.pretty_printers.append(lookup_function) | 48 gdb.pretty_printers.append(lookup_function) |
| OLD | NEW |