OLD | NEW |
---|---|
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 # 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 |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """GDB support for Chrome types. | 5 """GDB support for Chrome types. |
6 | 6 |
7 Add this to your gdb by amending your ~/.gdbinit as follows: | 7 Add this to your gdb by amending your ~/.gdbinit as follows: |
8 python | 8 python |
9 import sys | 9 import sys |
10 sys.path.insert(0, "/path/to/tools/gdb/") | 10 sys.path.insert(0, "/path/to/tools/gdb/") |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
276 return 'SiteInstanceImpl@%s for %s' % ( | 276 return 'SiteInstanceImpl@%s for %s' % ( |
277 self.val.address, self.val['site_']) | 277 self.val.address, self.val['site_']) |
278 | 278 |
279 def children(self): | 279 def children(self): |
280 yield ('id_', self.val['id_']) | 280 yield ('id_', self.val['id_']) |
281 yield ('has_site_', self.val['has_site_']) | 281 yield ('has_site_', self.val['has_site_']) |
282 if self.val['browsing_instance_']['ptr_']: | 282 if self.val['browsing_instance_']['ptr_']: |
283 yield ('browsing_instance_', self.val['browsing_instance_']['ptr_']) | 283 yield ('browsing_instance_', self.val['browsing_instance_']['ptr_']) |
284 if self.val['process_']: | 284 if self.val['process_']: |
285 yield ('process_', typed_ptr(self.val['process_'])) | 285 yield ('process_', typed_ptr(self.val['process_'])) |
286 if self.val['render_process_host_factory_']: | 286 if self.val['g_render_process_host_factory_']: |
Jeffrey Yasskin
2015/01/14 00:41:45
Since this is static, it might make more sense jus
lfg
2015/01/14 23:31:59
Done.
| |
287 yield ('render_process_host_factory_', | 287 yield ('g_render_process_host_factory_', |
288 self.val['render_process_host_factory_']) | 288 self.val['g_render_process_host_factory_']) |
289 pp_set.add_printer('content::SiteInstanceImpl', '^content::SiteInstanceImpl$', | 289 pp_set.add_printer('content::SiteInstanceImpl', '^content::SiteInstanceImpl$', |
290 SiteInstanceImplPrinter) | 290 SiteInstanceImplPrinter) |
291 | 291 |
292 | 292 |
293 class RenderProcessHostImplPrinter(object): | 293 class RenderProcessHostImplPrinter(object): |
294 def __init__(self, val): | 294 def __init__(self, val): |
295 self.val = val.cast(val.dynamic_type) | 295 self.val = val.cast(val.dynamic_type) |
296 | 296 |
297 def to_string(self): | 297 def to_string(self): |
298 pid = '' | 298 pid = '' |
(...skipping 26 matching lines...) Expand all Loading... | |
325 yield ('sudden_termination_allowed_', | 325 yield ('sudden_termination_allowed_', |
326 self.val['sudden_termination_allowed_']) | 326 self.val['sudden_termination_allowed_']) |
327 yield ('ignore_input_events_', self.val['ignore_input_events_']) | 327 yield ('ignore_input_events_', self.val['ignore_input_events_']) |
328 yield ('is_guest_', self.val['is_guest_']) | 328 yield ('is_guest_', self.val['is_guest_']) |
329 pp_set.add_printer('content::RenderProcessHostImpl', | 329 pp_set.add_printer('content::RenderProcessHostImpl', |
330 '^content::RenderProcessHostImpl$', | 330 '^content::RenderProcessHostImpl$', |
331 RenderProcessHostImplPrinter) | 331 RenderProcessHostImplPrinter) |
332 | 332 |
333 | 333 |
334 gdb.printing.register_pretty_printer(gdb, pp_set, replace=_DEBUGGING) | 334 gdb.printing.register_pretty_printer(gdb, pp_set, replace=_DEBUGGING) |
OLD | NEW |