[LibOS] shim_parser.c: Additionally specify string as "const char*"

The parser logic checks the arguments of syscalls and prints strings in
debug output. Previously, our code base only contained "const char *" as
strings. Recently, we started migration to "const char*" (no-space) style.
This broke the parser logic, so this commit adds an additional check on
what it means for a C type to be a string.
This commit is contained in:
Dmitrii Kuvaiskii
2019-09-18 15:36:11 -07:00
parent 4e1d892891
commit 07f0e25ff2
+2 -2
View File
@@ -441,7 +441,7 @@ static inline void parse_integer_arg(va_list ap) {
static inline void parse_syscall_args(va_list ap) {
const char* arg_type = va_arg(ap, const char*);
if (strcmp_static(arg_type, "const char *"))
if (strcmp_static(arg_type, "const char *") || strcmp_static(arg_type, "const char*"))
parse_string_arg(ap);
else if (is_pointer(arg_type))
parse_pointer_arg(ap);
@@ -452,7 +452,7 @@ static inline void parse_syscall_args(va_list ap) {
static inline void skip_syscall_args(va_list ap) {
const char* arg_type = va_arg(ap, const char*);
if (strcmp_static(arg_type, "const char *"))
if (strcmp_static(arg_type, "const char *") || strcmp_static(arg_type, "const char*"))
va_arg(ap, const char*);
else if (is_pointer(arg_type))
va_arg(ap, void*);