FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
daScript/src/misc/sysos.cpp at master · rburkholder/daScript · GitHub
rburkholder
/
daScript
Public
forked from
GaijinEntertainment/daScript
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
daScript
/
src
/
misc
/
sysos.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
485 lines (456 loc) · 18.8 KB
Breadcrumbs
daScript
/
src
/
misc
/
sysos.cpp
Copy path
File metadata and controls
485 lines (456 loc) · 18.8 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
#
include
"
daScript/misc/platform.h
"
#
include
"
daScript/misc/sysos.h
"
#
if
defined(_MSC_VER) && !defined(_GAMING_XBOX) && !defined(_DURANGO)
#
define
WIN32_LEAN_AND_MEAN
#
include
<
windows.h
>
namespace
das
{
__forceinline
void
setBits
(
DWORD64
& dw,
int
lowBit,
int
bits,
int
newValue ) {
DWORD64
mask = (
DWORD64
(
1
) << bits) -
1
;
dw = (dw & ~(mask << lowBit)) | (
DWORD64
(newValue) << lowBit);
}
__forceinline
void
setBits
(
DWORD
& dw,
int
lowBit,
int
bits,
int
newValue ) {
DWORD
mask = (
DWORD
(
1
) << bits) -
1
;
dw = (dw & ~(mask << lowBit)) | (
DWORD
(newValue) << lowBit);
}
bool
g_isVHSet =
false
;
void
( * g_HwBpHandler ) (
int
,
void
* ) =
nullptr
;
LONG
NTAPI
VEH_handler
(
struct
_EXCEPTION_POINTERS
* ExceptionInfo ) {
if
( ExceptionInfo->
ContextRecord
->
Dr6
&
0x0f
) {
if
( g_HwBpHandler ) {
if
( ExceptionInfo->
ContextRecord
->
Dr6
&
1
)
g_HwBpHandler
(
0
, (
void
*) ExceptionInfo->
ContextRecord
->
Dr0
);
if
( ExceptionInfo->
ContextRecord
->
Dr6
&
2
)
g_HwBpHandler
(
1
, (
void
*) ExceptionInfo->
ContextRecord
->
Dr1
);
if
( ExceptionInfo->
ContextRecord
->
Dr6
&
4
)
g_HwBpHandler
(
2
, (
void
*) ExceptionInfo->
ContextRecord
->
Dr2
);
if
( ExceptionInfo->
ContextRecord
->
Dr6
&
8
)
g_HwBpHandler
(
3
, (
void
*) ExceptionInfo->
ContextRecord
->
Dr3
);
}
return
EXCEPTION_CONTINUE_EXECUTION
;
}
return
EXCEPTION_CONTINUE_SEARCH
;
}
void
hwSetBreakpointHandler
(
void
(* handler ) (
int
,
void
* ) ) {
g_HwBpHandler = handler;
}
int
hwBreakpointSet
(
void
* address,
int
len,
int
when ) {
if
( !g_isVHSet ) {
g_isVHSet =
true
;
AddVectoredExceptionHandler
(
1
, VEH_handler);
}
CONTEXT
cxt;
HANDLE
thisThread =
GetCurrentThread
();
cxt.
ContextFlags
=
CONTEXT_DEBUG_REGISTERS
;
if
( !
GetThreadContext
(thisThread, &cxt) )
return
-
1
;
int
bp_index =
0
;
for
( bp_index=
0
; bp_index!=
4
; ++bp_index ) {
uint32_t
mask =
uint32_t
(
1
) << (bp_index*
2
);
if
( (
uint32_t
(cxt.
Dr7
) & mask) ==
0u
) {
break
;
}
}
switch
( bp_index ) {
case
0
: cxt.
Dr0
=
intptr_t
(address);
break
;
case
1
: cxt.
Dr1
=
intptr_t
(address);
break
;
case
2
: cxt.
Dr2
=
intptr_t
(address);
break
;
case
3
: cxt.
Dr3
=
intptr_t
(address);
break
;
default
:
return
-
1
;
}
setBits
(cxt.
Dr7
,
16
+ (bp_index*
4
),
2
, when);
setBits
(cxt.
Dr7
,
18
+ (bp_index*
4
),
2
, len);
setBits
(cxt.
Dr7
, bp_index*
2
,
1
,
1
);
if
( !
SetThreadContext
(thisThread, &cxt) )
return
-
1
;
return
bp_index;
}
bool
hwBreakpointClear
(
int
bp_index ) {
if
( bp_index==-
1
)
return
false
;
CONTEXT
cxt;
HANDLE
thisThread =
GetCurrentThread
();
cxt.
ContextFlags
=
CONTEXT_DEBUG_REGISTERS
;
if
(!
GetThreadContext
(thisThread, &cxt))
return
false
;
setBits
(cxt.
Dr7
, bp_index*
2
,
1
,
0
);
if
(!
SetThreadContext
(thisThread, &cxt))
return
false
;
return
true
;
}
size_t
getExecutablePathName
(
char
* pathName,
size_t
pathNameCapacity) {
return
GetModuleFileNameA
(
NULL
, pathName, (
DWORD
)pathNameCapacity);
}
void
*
loadDynamicLibrary
(
const
char
* fileName ) {
return
LoadLibraryA
(fileName);
}
void
*
getFunctionAddress
(
void
*
module
,
const
char
* func ) {
return
GetProcAddress
(
HMODULE
(
module
),func);
}
void
*
getLibraryHandle
(
const
char
* moduleName ) {
return
GetModuleHandleA
(moduleName);
}
string
normalizeFileName
(
const
char
* fileName ) {
char
buffer[
MAX_PATH
];
auto
ret =
GetFullPathNameA
(fileName,
MAX_PATH
,buffer,
nullptr
);
return
ret ? buffer :
"
"
;
}
}
#
elif
defined(__linux__) || defined(_EMSCRIPTEN_VER)
#
include
<
unistd.h
>
#
include
<
dlfcn.h
>
namespace
das
{
void
hwSetBreakpointHandler
(
void
(*) (
int
,
void
* ) ) { }
int
hwBreakpointSet
(
void
*,
int
,
int
) {
return
-
1
;
}
bool
hwBreakpointClear
(
int
) {
return
false
;
}
size_t
getExecutablePathName
(
char
* pathName,
size_t
pathNameCapacity) {
size_t
pathNameSize =
readlink
(
"
/proc/self/exe
"
, pathName, pathNameCapacity -
1
);
pathName[pathNameSize] =
'
\0
'
;
return
pathNameSize;
}
void
*
loadDynamicLibrary
(
const
char
* lib ) {
return
dlopen
(lib,
RTLD_LAZY
);
}
void
*
getFunctionAddress
(
void
* lib,
const
char
* name ) {
return
lib ?
dlsym
(lib, name) :
nullptr
;
}
void
*
getLibraryHandle
(
const
char
* lib ) {
return
dlopen
(lib,
RTLD_LAZY
);
}
string
normalizeFileName
(
const
char
* fileName ) {
//
TODO: implement
return
"
"
;
}
}
#
elif
defined(__APPLE__)
#
include
<
mach-o/dyld.h
>
#
include
<
mach/mach_types.h
>
#
include
<
mach/mach_init.h
>
#
include
<
mach/thread_act.h
>
#
include
<
pthread.h
>
#
include
<
limits.h
>
#
include
<
signal.h
>
#
include
<
dlfcn.h
>
#
include
<
inttypes.h
>
namespace
das
{
/*
// ARM64 debug registers
__uint64_t __bvr[16];
__uint64_t __bcr[16];
__uint64_t __wvr[16];
__uint64_t __wcr[16];
__uint64_t __mdscr_el1;
*/
__forceinline
void
setBits
(
uint64_t
& dw,
int
lowBit,
int
bits,
int
newValue ) {
uint64_t
mask = (
uint64_t
(
1
) << bits) -
1
;
dw = (dw & ~(mask << lowBit)) | (
uint64_t
(newValue) << lowBit);
}
static
bool
g_isHandlerSet =
false
;
static
void
( * g_HwBpHandler ) (
int
,
void
* ) = nullptr;
#
if
defined(__arm64__)
#
define
ARM64_NUM_WP
16
static
uint64_t
g_HwBpAddress =
0
;
static
int
g_HwBpMask =
0
;
__forceinline
int
fls
(
int
x) {
return
x ?
sizeof
(x) *
8
-
__builtin_clz
(x) :
0
;
}
__forceinline
int
ffs
(
int
x) {
return
__builtin_ffs
(x);
}
uint64_t
get_distance_from_watchpoint
(
uint64_t
addr,
uint64_t
val,
int
len ) {
uint64_t
wp_low, wp_high;
uint32_t
lens, lene;
lens =
ffs
(len);
lene =
fls
(len);
wp_low = val + lens;
wp_high = val + lene;
if
(addr < wp_low)
return
wp_low - addr;
else
if
(addr > wp_high)
return
addr - wp_high;
else
return
0
;
}
uint64_t
encode_ctrl_reg
( HwBpSize len, HwBpType type,
bool
enabled ) {
uint64_t
val =
0
;
if
( enabled ) val |=
0x1ul
;
switch
( len ) {
case
HwBp_1: val |= (
0x01
) <<
5
;
break
;
case
HwBp_2: val |= (
0x03
) <<
5
;
break
;
case
HwBp_4: val |= (
0x0f
) <<
5
;
break
;
case
HwBp_8: val |= (
0xff
) <<
5
;
break
;
}
switch
( type ) {
case
HwBp_Execute: val |= (
4
)<<
3
;
break
;
case
HwBp_Write: val |= (
2
)<<
3
;
break
;
//
write=2
case
HwBp_ReadWrite: val |= (
1
|
2
)<<
3
;
break
;
//
read=1
}
uint64_t
priv =
0
;
val |= priv <<
1
;
return
val;
}
#
endif
void
sigTrapHandler
(
int
sig,
siginfo_t
* siginfo,
void
* ptr) {
thread_t
mythread =
mach_thread_self
();
#
if
defined(__x86_64__)
struct
x86_debug_state
dr;
mach_msg_type_number_t
dr_count = x86_DEBUG_STATE_COUNT;
thread_get_state
(mythread, x86_DEBUG_STATE, (
thread_state_t
) &dr, &dr_count);
if
( dr.
uds
.
ds64
.
__dr6
&
0x0f
) {
if
( g_HwBpHandler ) {
if
( dr.
uds
.
ds64
.
__dr6
&
1
)
g_HwBpHandler
(
0
, (
void
*) dr.
uds
.
ds64
.
__dr0
);
if
( dr.
uds
.
ds64
.
__dr6
&
2
)
g_HwBpHandler
(
1
, (
void
*) dr.
uds
.
ds64
.
__dr1
);
if
( dr.
uds
.
ds64
.
__dr6
&
4
)
g_HwBpHandler
(
2
, (
void
*) dr.
uds
.
ds64
.
__dr2
);
if
( dr.
uds
.
ds64
.
__dr6
&
8
)
g_HwBpHandler
(
3
, (
void
*) dr.
uds
.
ds64
.
__dr3
);
}
}
#
elif
defined(__arm64__)
arm_debug_state64_t
dr;
mach_msg_type_number_t
dr_count =
ARM_DEBUG_STATE64_COUNT
;
thread_get_state
(mythread,
ARM_DEBUG_STATE64
, (
thread_state_t
) &dr, &dr_count);
uint64_t
min_dist = -
1ul
, dist;
int
closest_match =
0
;
ucontext_t
* ucontext = (
ucontext_t
*) ptr;
if
( g_HwBpAddress ) {
//
if we are in single step mode
//
drop hw bp mode mode
g_HwBpAddress =
0
;
auto
hw_bp_index =
0
;
dr.
__bcr
[hw_bp_index] =
0
;
//
re-enable breakpoints
for
(
int
i=
0
; i!=
ARM64_NUM_WP
; ++i ) {
if
( g_HwBpMask & (
1
<<i) ) {
dr.
__wcr
[i] |=
1
;
}
}
//
and done
thread_set_state
(mythread,
ARM_DEBUG_STATE64
, (
thread_state_t
) &dr, dr_count);
}
else
{
//
find which breakpoint caused it
uint64_t
addr = ucontext->
uc_mcontext
->
__es
.
__far
;
for
(
int
wpi=
0
; wpi!=
ARM64_NUM_WP
; ++wpi ) {
uint64_t
val = dr.
__wvr
[wpi];
uint64_t
ctrl_reg = dr.
__wcr
[wpi];
bool
enabled = ctrl_reg &
1
;
int
len = (ctrl_reg>>
5
) &
0xff
;
if
( enabled ) {
dist =
get_distance_from_watchpoint
(addr, val, len);
if
(dist < min_dist) {
min_dist = dist;
closest_match = wpi;
}
if
( dist==
0
)
break
;
}
}
//
call handler of that breakpoint
g_HwBpHandler
(closest_match, (
void
*)addr);
//
save hw breakpoints in the mask, disable all hw breakpoints
g_HwBpMask =
0
;
for
(
int
i=
0
; i!=
ARM64_NUM_WP
; ++i ) {
if
( dr.
__wcr
[i] &
1
) {
g_HwBpMask |=
1
<<i;
dr.
__wcr
[i] &= ~
1ul
;
}
}
//
set hw breakpoint on next instruction
uint32_t
control_value = (
0xfu
<<
5
) |
7
;
g_HwBpAddress = ( ucontext->
uc_mcontext
->
__ss
.
__pc
+
4
) & ~
0x3ul
;
auto
hw_bp_index =
0
;
if
( dr.
__bcr
[hw_bp_index] &
0x1ul
) {
DAS_VERIFYF
(
false
,
"
hw bp already set
"
);
}
else
{
dr.
__bcr
[hw_bp_index] = control_value;
dr.
__bvr
[hw_bp_index] = g_HwBpAddress;
}
//
and done
thread_set_state
(mythread,
ARM_DEBUG_STATE64
, (
thread_state_t
) &dr, dr_count);
}
#
endif
}
void
hwSetBreakpointHandler
(
void
(* handler ) (
int
,
void
* ) ) {
g_HwBpHandler = handler;
}
int
hwBreakpointSet
(
void
* address,
int
len,
int
when ) {
if
( !g_isHandlerSet ) {
g_isHandlerSet =
true
;
struct
sigaction
act;
memset
(&act,
0
,
sizeof
(act));
act.
sa_sigaction
= sigTrapHandler;
act.
sa_flags
=
SA_SIGINFO
|
SA_ONSTACK
;
if
(
sigaction
(
SIGTRAP
, &act,
0
)!=
0
) {
g_isHandlerSet =
false
;
return
-
1
;
}
if
(
sigaction
(
SIGINT
, &act,
0
)!=
0
) {
g_isHandlerSet =
false
;
return
-
1
;
}
}
#
if
defined(__x86_64__)
thread_t
mythread =
mach_thread_self
();
struct
x86_debug_state
dr;
mach_msg_type_number_t
dr_count = x86_DEBUG_STATE_COUNT;
thread_get_state
(mythread, x86_DEBUG_STATE, (
thread_state_t
) &dr, &dr_count);
int
bp_index =
0
;
for
( bp_index=
0
; bp_index!=
4
; ++bp_index ) {
uint32_t
mask =
uint32_t
(
1
) << (bp_index*
2
);
if
( (
uint32_t
(dr.
uds
.
ds64
.
__dr7
) & mask) ==
0u
) {
break
;
}
}
switch
( bp_index ) {
case
0
: dr.
uds
.
ds64
.
__dr0
=
intptr_t
(address);
break
;
case
1
: dr.
uds
.
ds64
.
__dr1
=
intptr_t
(address);
break
;
case
2
: dr.
uds
.
ds64
.
__dr2
=
intptr_t
(address);
break
;
case
3
: dr.
uds
.
ds64
.
__dr3
=
intptr_t
(address);
break
;
default
:
return
-
1
;
}
setBits
(dr.
uds
.
ds64
.
__dr7
,
16
+ (bp_index*
4
),
2
, when);
setBits
(dr.
uds
.
ds64
.
__dr7
,
18
+ (bp_index*
4
),
2
, len);
setBits
(dr.
uds
.
ds64
.
__dr7
, bp_index*
2
,
1
,
1
);
dr_count = x86_DEBUG_STATE_COUNT;
thread_set_state
(mythread, x86_DEBUG_STATE, (
thread_state_t
) &dr, dr_count);
return
bp_index;
#
elif
defined(__arm64__)
thread_t
mythread =
mach_thread_self
();
arm_debug_state64_t
dr;
mach_msg_type_number_t
dr_count =
ARM_DEBUG_STATE64_COUNT
;
thread_get_state
(mythread,
ARM_DEBUG_STATE64
, (
thread_state_t
) &dr, &dr_count);
int
bp_index =
0
;
for
( bp_index=
0
; bp_index!=
ARM64_NUM_WP
; ++bp_index ) {
uint64_t
ctrl_reg = dr.
__wcr
[bp_index];
bool
enabled = ctrl_reg &
1
;
if
( !enabled ) {
break
;
}
}
if
( bp_index<
0
|| bp_index>=
ARM64_NUM_WP
)
return
-
1
;
dr.
__wvr
[bp_index] =
intptr_t
(address);
dr.
__wcr
[bp_index] =
encode_ctrl_reg
(
HwBpSize
(len),
HwBpType
(when),
true
);
thread_set_state
(mythread,
ARM_DEBUG_STATE64
, (
thread_state_t
) &dr, dr_count);
return
bp_index;
#
else
return
-
1
;
#
endif
}
bool
hwBreakpointClear
(
int
bp_index ) {
if
( bp_index==-
1
)
return
false
;
#
if
defined(__x86_64__)
thread_t
mythread =
mach_thread_self
();
struct
x86_debug_state
dr;
mach_msg_type_number_t
dr_count = x86_DEBUG_STATE_COUNT;
thread_get_state
(mythread, x86_DEBUG_STATE, (
thread_state_t
) &dr, &dr_count);
setBits
(dr.
uds
.
ds64
.
__dr7
, bp_index*
2
,
1
,
0
);
dr_count = x86_DEBUG_STATE_COUNT;
thread_set_state
(mythread, x86_DEBUG_STATE, (
thread_state_t
) &dr, dr_count);
return
true
;
#
elif
defined(__arm64__)
thread_t
mythread =
mach_thread_self
();
arm_debug_state64_t
dr;
mach_msg_type_number_t
dr_count =
ARM_DEBUG_STATE64_COUNT
;
thread_get_state
(mythread,
ARM_DEBUG_STATE64
, (
thread_state_t
) &dr, &dr_count);
dr.
__wcr
[bp_index] =
encode_ctrl_reg
(HwBp_1,HwBp_ReadWrite,
false
);
thread_set_state
(mythread,
ARM_DEBUG_STATE64
, (
thread_state_t
) &dr, dr_count);
#
endif
return
false
;
}
size_t
getExecutablePathName
(
char
* pathName,
size_t
pathNameCapacity) {
uint32_t
pathNameSize =
0
;
_NSGetExecutablePath
(
NULL
, &pathNameSize);
if
(pathNameSize > pathNameCapacity)
pathNameSize = pathNameCapacity;
if
(!
_NSGetExecutablePath
(pathName, &pathNameSize)) {
char
real[
PATH_MAX
];
if
(
realpath
(pathName, real) !=
NULL
) {
pathNameSize =
strlen
(real);
memcpy
(pathName, real, pathNameSize+
1
);
}
return
pathNameSize;
}
return
0
;
}
void
*
loadDynamicLibrary
(
const
char
* lib ) {
return
dlopen
(lib,
RTLD_LAZY
);
}
void
*
getFunctionAddress
(
void
* lib,
const
char
* name ) {
return
lib ?
dlsym
(lib, name) :
nullptr
;
}
void
*
getLibraryHandle
(
const
char
* lib ) {
return
dlopen
(lib,
RTLD_LAZY
);
}
string
normalizeFileName
(
const
char
* fileName ) {
//
TODO: implement
return
"
"
;
}
}
#
else
namespace
das
{
void
hwSetBreakpointHandler
(
void
(*) (
int
,
void
* ) ) { }
int
hwBreakpointSet
(
void
*,
int
,
int
) {
return
-
1
;
}
bool
hwBreakpointClear
(
int
) {
return
false
;
}
size_t
getExecutablePathName
(
char
*,
size_t
) {
DAS_FATAL_ERROR
(
"
platforms without getExecutablePathName should not use default getDasRoot
"
);
return
0
;
}
void
*
loadDynamicLibrary
(
const
char
* ) {
//
TODO: implement
return
nullptr
;
}
void
*
getFunctionAddress
(
void
*,
const
char
* ) {
//
TODO: implement
return
nullptr
;
}
void
*
getLibraryHandle
(
const
char
* ) {
//
TODO: implement
return
nullptr
;
}
string
normalizeFileName
(
const
char
* fileName ) {
//
TODO: implement
return
"
"
;
}
}
#
endif
namespace
das
{
string
getExecutableFileName
(
void
) {
char
buffer[
1024
];
return
getExecutablePathName
(buffer,
1024
) ? buffer :
"
"
;
}
string
get_prefix
(
const
string & req ) {
auto
np = req.
find_last_of
(
"
\\
/
"
);
if
( np != string::npos ) {
return
req.
substr
(
0
,np);
}
else
{
return
req;
}
}
string
get_suffix
(
const
string & req ) {
auto
np = req.
find_last_of
(
"
\\
/
"
);
if
( np != string::npos ) {
return
req.
substr
(np+
1
);
}
else
{
return
req;
}
}
string g_dasRoot;
void
setDasRoot
(
const
string & dr ) {
g_dasRoot = dr;
}
string
getDasRoot
(
void
) {
if
( g_dasRoot.
empty
() ) {
string efp =
getExecutableFileName
();
//
?/bin/debug/binary.exe
auto
np = efp.
find_last_of
(
"
\\
/
"
);
if
( np != string::npos ) {
auto
ep =
get_prefix
(efp);
//
remove file name
auto
suffix =
get_suffix
(ep);
if
( suffix !=
"
bin
"
) {
ep =
get_prefix
(ep);
//
remove debug
}
if
(
get_suffix
(ep)!=
"
bin
"
) {
g_dasRoot =
"
.
"
;
}
else
{
g_dasRoot =
get_prefix
(ep);
//
remove bin
}
}
else
{
g_dasRoot =
"
.
"
;
}
}
return
g_dasRoot;
}
}
Back
|
FazBrowse Home
|
New Git URL