diff mbox series

[for,6.2,45/49] bsd-user: Make guest_base an unsigned long

Message ID 20210807214242.82385-46-imp@bsdimp.com (mailing list archive)
State New, archived
Headers show
Series bsd-user updates to run hello world | expand

Commit Message

Warner Losh Aug. 7, 2021, 9:42 p.m. UTC
From: Warner Losh <imp@FreeBSD.org>

Make the guest_base a plan, uneigned long rather than a uintptr_t. It
isn't really a pointer.

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
---
 bsd-user/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Richard Henderson Aug. 10, 2021, 5:58 p.m. UTC | #1
On 8/7/21 11:42 AM, Warner Losh wrote:
> From: Warner Losh <imp@FreeBSD.org>
> 
> Make the guest_base a plan, uneigned long rather than a uintptr_t. It
> isn't really a pointer.

NACK: 5ca870b9f6c.  It most certainly is a host pointer.


r~
Warner Losh Aug. 10, 2021, 6:04 p.m. UTC | #2
On Tue, Aug 10, 2021 at 11:58 AM Richard Henderson <
richard.henderson@linaro.org> wrote:

> On 8/7/21 11:42 AM, Warner Losh wrote:
> > From: Warner Losh <imp@FreeBSD.org>
> >
> > Make the guest_base a plan, uneigned long rather than a uintptr_t. It
> > isn't really a pointer.
>
> NACK: 5ca870b9f6c.  It most certainly is a host pointer.
>

OK. I'll drop this one and redo in our other branch. Shouldn't be hard.
diff mbox series

Patch

diff --git a/bsd-user/main.c b/bsd-user/main.c
index 08f88d9668..c8fafa78d0 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -49,9 +49,9 @@ 
 #include "target_arch_cpu.h"
 
 int singlestep;
-uintptr_t guest_base;
 static const char *cpu_model;
 static const char *cpu_type;
+unsigned long guest_base;
 bool have_guest_base;
 #if (TARGET_LONG_BITS == 32) && (HOST_LONG_BITS == 64)
 /*
@@ -440,7 +440,7 @@  int main(int argc, char **argv)
     g_free(target_environ);
 
     if (qemu_loglevel_mask(CPU_LOG_PAGE)) {
-        qemu_log("guest_base  %p\n", (void *)guest_base);
+        qemu_log("guest_base  0x%lx\n", guest_base);
         log_page_dump("binary load");
 
         qemu_log("start_brk   0x" TARGET_ABI_FMT_lx "\n", info->start_brk);