1
static bool handleJdwpOption(const char* name, const char* value)
2
{
3
if (
strcmp(name,
"transport") ==
0) {
4
5
if (
strcmp(value,
"dt_socket") ==
0) {
6 gDvm.jdwpTransport = kJdwpTransportSocket;
7 }
else
if (
strcmp(value,
"dt_android_adb") ==
0) {
8 gDvm.jdwpTransport = kJdwpTransportAndroidAdb;
9 }
else {
10 LOGE(
"JDWP transport '%s' not supported", value);
11
return
false;
12 }
13
14 }
else
if (
strcmp(name,
"server") ==
0) {
15
if (*value ==
'n')
16 gDvm.jdwpServer =
false;
17
else
if (*value ==
'y')
18 gDvm.jdwpServer =
true;
19
else {
20 LOGE(
"JDWP option 'server' must be 'y' or 'n'");
21
return
false;
22 }
23
24 }
else
if (
strcmp(name,
"suspend") ==
0) {
25
if (*value ==
'n')
26 gDvm.jdwpSuspend =
false;
27
else
if (*value ==
'y')
28 gDvm.jdwpSuspend =
true;
29
else {
30 LOGE(
"JDWP option 'suspend' must be 'y' or 'n'");
31
return
false;
32 }
33
34 }
else
if (
strcmp(name,
"address") ==
0) {
35 ......
36}