extern STARTUP_OPTION startup_option;
static char logfile[256] = { 0, };
-
+static char debugchfile[256] = {0, };
static inline int interlocked_xchg_add( int *dest, int incr )
{
int ret;
return; /* already initialized */
nb_debug_options = 0;
+ strcpy(debugchfile, get_etc_path());
+ strcat(debugchfile, "/DEBUGCH");
- fp= fopen("./DEBUGCH", "r");
+ fp= fopen(debugchfile, "r");
if( fp == NULL){
debug = getenv("DEBUGCH");
}else{
extern STARTUP_OPTION startup_option;
static char logfile[256] = { 0, };
+static char debugchfile[256] = {0, };
static inline int interlocked_xchg_add( int *dest, int incr )
{
int ret;
return; /* already initialized */
nb_debug_options = 0;
+ strcpy(debugchfile, get_etc_path());
+ strcat(debugchfile, "/DEBUGCH");
- fp= fopen("./DEBUGCH", "r");
+ fp= fopen(debugchfile, "r");
if( fp == NULL){
debug = getenv("DEBUGCH");
}else{
#!/bin/sh
-gdb --args ./emulator-x86 --vtm default --disk x86/VMs/default/emulimg-default.x86 \
- -- -net nic,model=virtio -soundhw all -usb -usbdevice wacom-tablet -vga tizen -bios bios.bin -L x86/data/pc-bios -kernel x86/data/kernel-img/bzImage -usbdevice keyboard -rtc base=utc -net user --enable-kvm -redir tcp:1202:10.0.2.16:22
+CURDIR=`pwd`
+
+gdb --args $CURDIR/emulator-x86 --vtm default --disk $CURDIR/../x86/VMs/default/emulimg-default.x86 \
+ -- -net nic,model=virtio -soundhw all -usb -usbdevice wacom-tablet -vga tizen -bios bios.bin -L $CURDIR/../x86/data/pc-bios -kernel $CURDIR/../x86/data/kernel-img/bzImage -usbdevice keyboard -rtc base=utc -net user --enable-kvm -redir tcp:1202:10.0.2.16:22
return path;
}
+/* get_etc_path = "~/tizen_sdk/simulator/etc" */
+const gchar *get_etc_path(void)
+{
+ const char etcsubdir[] = "/etc";
+ const char *path;
+ static char *etc_path;
+
+ if (etc_path)
+ return etc_path;
+
+ path = get_root_path();
+ etc_path = malloc(strlen(path) + sizeof etcsubdir);
+ if (!etc_path) {
+ ERR( "%s - %d: memory allocation failed!\n", __FILE__, __LINE__);
+ exit(1);
+ }
+
+ strcpy(etc_path, path);
+ strcat(etc_path, etcsubdir);
+
+ if (g_file_test(etc_path, G_FILE_TEST_IS_DIR) == FALSE) {
+ ERR( "no etc directory at %s\n", etc_path);
+ }
+
+ return etc_path;
+}
+
+
+
/* get_skin_path = "~/tizen_sdk/simulator/skins" */
const gchar *get_skin_path(void)
{
}
-/* get_data_path = "~/tizen_sdk/Emulator/data" */
+/* get_data_path = "x86/data"
+* = "arm/data" */
const gchar *get_data_path(void)
{
static const char suffix[] = "/data";
return data_path;
}
-/* get_data_path = "~/tizen_sdk/Emulator/data" */
+/* get_data_path = "~/tizen_sdk/Emulator/x86/data"
+ * = "~/tizen_sdk/Emulator/x86/data" */
const gchar *get_data_abs_path(void)
{
static const char suffix[] = "/data";
const gchar *get_vms_abs_path(void);
const gchar *get_conf_abs_path(void);
const gchar *get_baseimg_abs_path(void);
+const gchar *get_etc_path(void);
gchar *get_targetlist_abs_filepath(void);
gchar *get_virtual_target_path(gchar *virtual_target_name);
gchar *get_virtual_target_abs_path(gchar *virtual_target_name);