[Pal] introduce pal_vprintf() for debug

This will be used later.

Signed-off-by: Isaku Yamahata <isaku.yamahata@gmail.com>
This commit is contained in:
Isaku Yamahata
2019-07-27 02:17:02 -07:00
parent 3f6159623b
commit d12bef5a71
7 changed files with 10 additions and 7 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ PAL {
DkMemoryAvailableQuota;
# Debugging ABIs
pal_printf; DkDebugAttachBinary; DkDebugDetachBinary;
pal_printf; pal_vprintf; DkDebugAttachBinary; DkDebugDetachBinary;
# Control block
pal_control_addr; pal_sec;
+1 -1
View File
@@ -44,7 +44,7 @@ PAL {
DkCpuIdRetrieve; # retrieve CPUID
# Debugging ABIs
pal_printf; pal_snprintf; DkDebugAttachBinary; DkDebugDetachBinary;
pal_printf; pal_vprintf; pal_snprintf; DkDebugAttachBinary; DkDebugDetachBinary;
# Control block
pal_control; pal_control_addr;
+3 -3
View File
@@ -45,8 +45,8 @@ fputch(void * f, int ch, struct printbuf * b)
return 0;
}
static int
vprintf(const char * fmt, va_list ap)
int
pal_vprintf(const char * fmt, va_list ap)
{
struct printbuf b;
@@ -65,7 +65,7 @@ pal_printf(const char * fmt, ...)
int cnt;
va_start(ap, fmt);
cnt = vprintf(fmt, ap);
cnt = pal_vprintf(fmt, ap);
va_end(ap);
return cnt;
+1 -1
View File
@@ -41,7 +41,7 @@ PAL {
DkMemoryAvailableQuota;
# Debugging ABIs
pal_printf; DkDebugAttachBinary; DkDebugDetachBinary;
pal_printf; pal_vprintf; DkDebugAttachBinary; DkDebugDetachBinary;
# Control block
pal_control_addr; pal_sec;
+1 -1
View File
@@ -40,7 +40,7 @@ PAL {
DkMemoryAvailableQuota;
# Debugging ABIs
pal_printf; DkDebugAttachBinary; DkDebugDetachBinary;
pal_printf; pal_vprintf; DkDebugAttachBinary; DkDebugDetachBinary;
# Control block
pal_control_addr; pal_sec;
+2
View File
@@ -25,8 +25,10 @@
#include "pal.h"
#include <assert.h>
#include <stdarg.h>
int pal_printf (const char *fmt, ...) __attribute__((format(printf, 1, 2)));
int pal_vprintf (const char *fmt, va_list ap) __attribute__((format(printf, 1, 0)));
void DkDebugAttachBinary (PAL_STR uri, PAL_PTR start_addr);
void DkDebugDetachBinary (PAL_PTR start_addr);
+1
View File
@@ -59,6 +59,7 @@ vprintf(const char * fmt, va_list ap)
return b.cnt;
}
EXTERN_ALIAS(vprintf);
int
printf(const char * fmt, ...)