> compile NEMU

221220000 张三
Linux zzy 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
 18:06:44 up 13:19,  1 user,  load average: 0.21, 0.09, 0.11
This commit is contained in:
tracer-ics2023
2024-09-04 18:06:45 +08:00
committed by zzy
parent 700565306c
commit 74ec2acb0f
5 changed files with 22 additions and 4 deletions

View File

@ -42,6 +42,19 @@ int vsnprintf(char *out, size_t n, const char *fmt, va_list ap) {
}
static int rvsnprintf(char* out, size_t n, const char* fmt, va_list ap) {
while (n) {
switch (*fmt)
{
case '%':
break;
default:
*out = *fmt;
out ++;
fmt ++;
n --;
break;
}
}
return 0;
}

View File

@ -12,6 +12,9 @@ menu "NEMU Configuration Options"
default n
help
Say Y here if you want to enable match rules Log
config CONFIG_TEST_EXPR
bool "Enable test expr program"
default n
endmenu
choice

View File

@ -265,6 +265,8 @@ void init_sdb() {
init_wp_pool();
}
#ifdef CONFIG_CONFIG_TEXT_EXPR
void _test_expr() {
uint32_t expect, res;
char buf[65536] = {0};
@ -296,4 +298,6 @@ int test_expr(int argc, char *argv[]) {
_test_expr();
}
return 0;
}
}
#endif

View File

@ -44,8 +44,6 @@ void init_wp_pool() {
free_ = wp_pool;
}
/* TODO: Implement the functionality of watchpoint */
bool wp_check_hit(void) {
bool res = false;
for (WP* tmp = head; tmp != NULL; tmp = tmp->next) {

View File

@ -21,7 +21,7 @@ void engine_start();
int is_exit_status_bad();
int main(int argc, char *argv[]) {
#ifdef _TEST_EXPR_
#ifdef CONFIG_CONFIG_TEST_EXPR
init_monitor(0, NULL);
int test_expr(int argc, char *argv[]);
return test_expr(argc, argv);