1 /*
2  * Copyright (C) 2012 The Android Open Source Project
3  *
4  * Licensed under the Eclipse Public License, Version 1.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.eclipse.org/org/documents/epl-v10.php
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.ide.eclipse.ndk.internal.launch;
18 
19 import com.android.ide.eclipse.ndk.internal.Activator;
20 import com.android.ide.eclipse.ndk.internal.NdkVariables;
21 
22 public class NdkLaunchConstants {
23     private static final String PREFIX = Activator.PLUGIN_ID + ".ndklaunch.";   //$NON-NLS-1$
24 
25     public static final String ATTR_NDK_GDB = PREFIX + "gdb";                   //$NON-NLS-1$
26     public static final String ATTR_NDK_GDBINIT = PREFIX + "gdbinit";           //$NON-NLS-1$
27     public static final String ATTR_NDK_SOLIB = PREFIX + "solib";               //$NON-NLS-1$
28 
29     public static final String DEFAULT_GDB_PORT = "5039";                       //$NON-NLS-1$
30     public static final String DEFAULT_GDB = getVar(NdkVariables.NDK_GDB);
31     public static final String DEFAULT_GDBINIT = "";                            //$NON-NLS-1$
32     public static final String DEFAULT_PROGRAM =
33             String.format("%1$s/obj/local/%2$s/app_process",                    //$NON-NLS-1$
34                     getVar(NdkVariables.NDK_PROJECT),
35                     getVar(NdkVariables.NDK_COMPAT_ABI));
36     public static final String DEFAULT_SOLIB_PATH =
37             String.format("%1$s/obj/local/%2$s/",                               //$NON-NLS-1$
38                     getVar(NdkVariables.NDK_PROJECT),
39                     getVar(NdkVariables.NDK_COMPAT_ABI));
40 
getVar(String varName)41     private static String getVar(String varName) {
42         return "${" + varName + '}';                                            //$NON-NLS-1$
43     }
44 }
45