Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: tools/gdb/gdb_chrome.py

Issue 111373008: Update some uses of char16 to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sandbox/win/src/sandbox_policy_base.cc ('k') | ui/base/clipboard/clipboard_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 class StringPrinter(Printer): 53 class StringPrinter(Printer):
54 def display_hint(self): 54 def display_hint(self):
55 return 'string' 55 return 'string'
56 56
57 57
58 class String16Printer(StringPrinter): 58 class String16Printer(StringPrinter):
59 def to_string(self): 59 def to_string(self):
60 return webkit.ustring_to_string(self.val['_M_dataplus']['_M_p']) 60 return webkit.ustring_to_string(self.val['_M_dataplus']['_M_p'])
61 pp_set.add_printer( 61 pp_set.add_printer(
62 'string16', 62 'string16',
63 '^string16|std::basic_string<(unsigned short|char16|base::char16).*>$', 63 '^string16|std::basic_string<(unsigned short|base::char16).*>$',
64 String16Printer); 64 String16Printer);
65 65
66 66
67 class GURLPrinter(StringPrinter): 67 class GURLPrinter(StringPrinter):
68 def to_string(self): 68 def to_string(self):
69 return self.val['spec_'] 69 return self.val['spec_']
70 pp_set.add_printer('GURL', '^GURL$', GURLPrinter) 70 pp_set.add_printer('GURL', '^GURL$', GURLPrinter)
71 71
72 72
73 class FilePathPrinter(StringPrinter): 73 class FilePathPrinter(StringPrinter):
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 yield ('sudden_termination_allowed_', 288 yield ('sudden_termination_allowed_',
289 self.val['sudden_termination_allowed_']) 289 self.val['sudden_termination_allowed_'])
290 yield ('ignore_input_events_', self.val['ignore_input_events_']) 290 yield ('ignore_input_events_', self.val['ignore_input_events_'])
291 yield ('is_guest_', self.val['is_guest_']) 291 yield ('is_guest_', self.val['is_guest_'])
292 pp_set.add_printer('content::RenderProcessHostImpl', 292 pp_set.add_printer('content::RenderProcessHostImpl',
293 '^content::RenderProcessHostImpl$', 293 '^content::RenderProcessHostImpl$',
294 RenderProcessHostImplPrinter) 294 RenderProcessHostImplPrinter)
295 295
296 296
297 gdb.printing.register_pretty_printer(gdb, pp_set, replace=_DEBUGGING) 297 gdb.printing.register_pretty_printer(gdb, pp_set, replace=_DEBUGGING)
OLDNEW
« no previous file with comments | « sandbox/win/src/sandbox_policy_base.cc ('k') | ui/base/clipboard/clipboard_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698