Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(53)

Side by Side Diff: common/stabs_to_module.cc

Issue 400002: Mechanical change to allow the co-existance of std::string with a global ::string class (Closed) Base URL: http://google-breakpad.googlecode.com/svn/trunk/src/
Patch Set: Extended the impact of this change to a couple of more files under src/client Created 12 years, 9 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « common/stabs_reader_unittest.cc ('k') | common/stabs_to_module.h » ('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) 2010 Google Inc. 1 // Copyright (c) 2010 Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 21 matching lines...) Expand all
32 // dump_stabs.cc --- implement the StabsToModule class. 32 // dump_stabs.cc --- implement the StabsToModule class.
33 33
34 #include <assert.h> 34 #include <assert.h>
35 #include <cxxabi.h> 35 #include <cxxabi.h>
36 #include <stdarg.h> 36 #include <stdarg.h>
37 #include <stdio.h> 37 #include <stdio.h>
38 38
39 #include <algorithm> 39 #include <algorithm>
40 40
41 #include "common/stabs_to_module.h" 41 #include "common/stabs_to_module.h"
42 #include "common/using_std_string.h"
42 43
43 namespace google_breakpad { 44 namespace google_breakpad {
44 45
45 using std::string;
46
47 // Demangle using abi call. 46 // Demangle using abi call.
48 // Older GCC may not support it. 47 // Older GCC may not support it.
49 static string Demangle(const string &mangled) { 48 static string Demangle(const string &mangled) {
50 int status = 0; 49 int status = 0;
51 char *demangled = abi::__cxa_demangle(mangled.c_str(), NULL, NULL, &status); 50 char *demangled = abi::__cxa_demangle(mangled.c_str(), NULL, NULL, &status);
52 if (status == 0 && demangled != NULL) { 51 if (status == 0 && demangled != NULL) {
53 string str(demangled); 52 string str(demangled);
54 free(demangled); 53 free(demangled);
55 return str; 54 return str;
56 } 55 }
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 last_line->size = (f->address + f->size) - last_line->address; 191 last_line->size = (f->address + f->size) - last_line->address;
193 } 192 }
194 } 193 }
195 // Now that everything has a size, add our functions to the module, and 194 // Now that everything has a size, add our functions to the module, and
196 // dispose of our private list. 195 // dispose of our private list.
197 module_->AddFunctions(functions_.begin(), functions_.end()); 196 module_->AddFunctions(functions_.begin(), functions_.end());
198 functions_.clear(); 197 functions_.clear();
199 } 198 }
200 199
201 } // namespace google_breakpad 200 } // namespace google_breakpad
OLDNEW
« no previous file with comments | « common/stabs_reader_unittest.cc ('k') | common/stabs_to_module.h » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1004:630ec63f810e-tainted