@@ -128,20 +128,20 @@ void init(char* pid_c)
128
128
regmatch_t pm_data_seg [1 ];regmatch_t pm_stop [1 ];
129
129
char f_line [1024 ];
130
130
if (fgets (f_line , 1024 ,fp )){
131
- printf ("%s\nlength:%d\n" , f_line , strlen (f_line ));
131
+ // printf("%s\nlength:%d\n", f_line, strlen(f_line));
132
132
f_line [strlen (f_line )- 1 ] = '\0' ;
133
133
f_line [strlen (f_line )] = '\0' ;
134
134
f_line [strlen (f_line )+ 1 ] = '\0' ;
135
135
//printf("before stop match\n");
136
136
p_stop = regexec (& stop ,f_line ,1 ,pm_stop ,0 );
137
- printf ("\033[44;33mthis is stop ret:%d\033[0m\n" , p_stop );
137
+ // printf("\033[44;33mthis is stop ret:%d\033[0m\n", p_stop);
138
138
if (!p_stop ){
139
139
break ;
140
140
}
141
141
else { //应该只会有一个数据段吧
142
142
//printf("this is before regexec\n");
143
143
p_data_seg = regexec (& data_seg ,f_line ,1 ,pm_data_seg ,0 );
144
- printf ("\033[44;33mthis is data_seg ret:%d\033[0m\n" , p_data_seg );
144
+ // printf("\033[44;33mthis is data_seg ret:%d\033[0m\n", p_data_seg);
145
145
if (!p_data_seg ){
146
146
char start [10 ]; char end [10 ];
147
147
int point = 0 ;
@@ -160,7 +160,7 @@ void init(char* pid_c)
160
160
end [end_p ++ ]= f_line [point ];
161
161
}
162
162
end [end_p ] = '\0' ;
163
- printf ("\033[44;33mstart:%s end:%s\033[0m\n" ,start , end );
163
+ // printf("\033[44;33mstart:%s end:%s\033[0m\n",start, end);
164
164
addr_start = hex_atoi (start ); addr_end = hex_atoi (end );
165
165
printf ("\033[44;33mstart:0x%08x end:0x%08x\033[0m\n" ,addr_start , addr_end );
166
166
}
@@ -171,10 +171,10 @@ void init(char* pid_c)
171
171
}
172
172
int main (int argc , char * argv [])
173
173
{
174
- printf ("\033[42;37mline 140\033[0m\n" );
174
+ // printf("\033[42;37mline 140\033[0m\n");
175
175
for (int i = 0 ; i < argc ; i ++ ) {
176
176
assert (argv [i ]); // specification
177
- printf ("argv[%d] = %s\n" , i , argv [i ]);
177
+ // printf("argv[%d] = %s\n", i, argv[i]);
178
178
}
179
179
assert (!argv [argc ]); // specification
180
180
if (argc == 1 ){
@@ -188,9 +188,9 @@ int main(int argc, char *argv[])
188
188
init (pid_c );
189
189
memset (valid_addr , 0 , sizeof (valid_addr ));
190
190
valid_addr_cnt = 0 ;
191
- printf ("\033[42;37mline 155\033[0m\n" );
191
+ // printf("\033[42;37mline 155\033[0m\n");
192
192
while (fgets (cmd , sizeof (cmd ), stdin )){
193
- printf ("\033[42;31mhahaha \033[0m\n" );
193
+ printf ("\033[42;31m%s \033[0m\n" , cmd );
194
194
if (!strcmp (cmd , "pause" )){
195
195
pause ();
196
196
}
0 commit comments