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

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

Issue 2754233002: Revert "DWARF and unwind support for AOT assembly output." (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « runtime/vm/native_symbol.h ('k') | runtime/vm/native_symbol_fuchsia.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) 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 "platform/globals.h" 5 #include "platform/globals.h"
6 #if defined(HOST_OS_ANDROID) 6 #if defined(HOST_OS_ANDROID)
7 7
8 #include "vm/native_symbol.h" 8 #include "vm/native_symbol.h"
9 9
10 #include <dlfcn.h> // NOLINT 10 #include <dlfcn.h> // NOLINT
(...skipping 20 matching lines...) Expand all
31 } 31 }
32 return strdup(info.dli_sname); 32 return strdup(info.dli_sname);
33 } 33 }
34 34
35 35
36 void NativeSymbolResolver::FreeSymbolName(char* name) { 36 void NativeSymbolResolver::FreeSymbolName(char* name) {
37 free(name); 37 free(name);
38 } 38 }
39 39
40 40
41 bool NativeSymbolResolver::LookupSharedObject(uword pc,
42 uword* dso_base,
43 char** dso_name) {
44 Dl_info info;
45 int r = dladdr(reinterpret_cast<void*>(pc), &info);
46 if (r == 0) {
47 return false;
48 }
49 *dso_base = reinterpret_cast<uword>(info.dli_fbase);
50 *dso_name = strdup(info.dli_fname);
51 return true;
52 }
53
54 } // namespace dart 41 } // namespace dart
55 42
56 #endif // defined(HOST_OS_ANDROID) 43 #endif // defined(HOST_OS_ANDROID)
OLDNEW
« no previous file with comments | « runtime/vm/native_symbol.h ('k') | runtime/vm/native_symbol_fuchsia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698