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

Side by Side Diff: runtime/vm/native_symbol_macos.cc

Issue 2481873005: clang-format runtime/vm (Closed)
Patch Set: Merge Created 4 years, 1 month 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
« no previous file with comments | « runtime/vm/native_symbol_linux.cc ('k') | runtime/vm/object.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_OS_MACOS) 6 #if defined(TARGET_OS_MACOS)
7 7
8 #include "vm/native_symbol.h" 8 #include "vm/native_symbol.h"
9 9
10 #include <cxxabi.h> // NOLINT 10 #include <cxxabi.h> // NOLINT
11 #include <dlfcn.h> // NOLINT 11 #include <dlfcn.h> // NOLINT
12 12
13 namespace dart { 13 namespace dart {
14 14
15 void NativeSymbolResolver::InitOnce() { 15 void NativeSymbolResolver::InitOnce() {}
16 }
17 16
18 17
19 void NativeSymbolResolver::ShutdownOnce() { 18 void NativeSymbolResolver::ShutdownOnce() {}
20 }
21 19
22 20
23 char* NativeSymbolResolver::LookupSymbolName(uintptr_t pc, uintptr_t* start) { 21 char* NativeSymbolResolver::LookupSymbolName(uintptr_t pc, uintptr_t* start) {
24 Dl_info info; 22 Dl_info info;
25 int r = dladdr(reinterpret_cast<void*>(pc), &info); 23 int r = dladdr(reinterpret_cast<void*>(pc), &info);
26 if (r == 0) { 24 if (r == 0) {
27 return NULL; 25 return NULL;
28 } 26 }
29 if (info.dli_sname == NULL) { 27 if (info.dli_sname == NULL) {
30 return NULL; 28 return NULL;
(...skipping 11 matching lines...) Expand all
42 40
43 41
44 void NativeSymbolResolver::FreeSymbolName(char* name) { 42 void NativeSymbolResolver::FreeSymbolName(char* name) {
45 free(name); 43 free(name);
46 } 44 }
47 45
48 46
49 } // namespace dart 47 } // namespace dart
50 48
51 #endif // defined(TARGET_OS_MACOS) 49 #endif // defined(TARGET_OS_MACOS)
OLDNEW
« no previous file with comments | « runtime/vm/native_symbol_linux.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698