Flutter Engine
The Flutter Engine
exe_utils.h
Go to the documentation of this file.
1// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
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.
4
5#ifndef RUNTIME_BIN_EXE_UTILS_H_
6#define RUNTIME_BIN_EXE_UTILS_H_
7
8#include <stdlib.h>
9#include <string.h>
10
11#include "include/dart_api.h"
12#include "platform/globals.h"
13#include "platform/utils.h"
14
15namespace dart {
16namespace bin {
17
18class EXEUtils {
19 public:
20 // Returns the resolved path to the directory the current executable resides
21 // in.
23
24 // Returns the path to the directory the current executable resides
25 // in without following symlinks.
26 //
27 // Returns null if Platform::GetExecutableName() returns null.
29
30#if !defined(DART_HOST_OS_WINDOWS)
31 // Loads a compact symbolization table from "$exepath.sym" that is used by the
32 // VM's profiler and crash stack trace dumper to symbolize C frames.
33 static void LoadDartProfilerSymbols(const char* exepath);
34#endif
35
36 private:
37 DISALLOW_COPY_AND_ASSIGN(EXEUtils);
38};
39
40} // namespace bin
41} // namespace dart
42
43#endif // RUNTIME_BIN_EXE_UTILS_H_
static CStringUniquePtr GetDirectoryPrefixFromResolvedExeName()
Definition: exe_utils.cc:68
static void LoadDartProfilerSymbols(const char *exepath)
Definition: exe_utils.cc:129
static CStringUniquePtr GetDirectoryPrefixFromUnresolvedExeName()
Definition: exe_utils.cc:122
Definition: dart_vm.cc:33