All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools/gdbsx: define format strings for aarch64
@ 2014-02-02  8:19 Olaf Hering
  2014-02-02 10:24 ` Ian Campbell
  0 siblings, 1 reply; 7+ messages in thread
From: Olaf Hering @ 2014-02-02  8:19 UTC (permalink / raw)
  To: xen-devel; +Cc: Olaf Hering, Ian.Jackson, Ian.Campbell

gx_main.c: In function '_do_qRcmd_req':
gx_main.c:119:13: error: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'uint64_t' [-Werror=format=]
             sprintf(buf1, "pgd3val set to: "XGF64"\n", pgd3val);
             ^
gx_main.c:121:13: error: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'uint64_t' [-Werror=format=]
             sprintf(buf1, "Invalid  pgd3val "XGF64"\n", pgd3val);

Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
 tools/debugger/gdbsx/xg/xg_public.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/debugger/gdbsx/xg/xg_public.h b/tools/debugger/gdbsx/xg/xg_public.h
index 6236d08..046e21b 100644
--- a/tools/debugger/gdbsx/xg/xg_public.h
+++ b/tools/debugger/gdbsx/xg/xg_public.h
@@ -23,7 +23,7 @@
 #define XGTRC1(...)  \
            do {(xgtrc_on==2) ? (xgtrc(__FUNCTION__,__VA_ARGS__)):0;} while (0)
 
-#if defined(__x86_64__)
+#if defined(__x86_64__) || defined(__aarch64__)
     #define  XGFM64  "%lx"
     #define  XGF64   "%016lx"
 #else

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] tools/gdbsx: define format strings for aarch64
  2014-02-02  8:19 [PATCH] tools/gdbsx: define format strings for aarch64 Olaf Hering
@ 2014-02-02 10:24 ` Ian Campbell
  2014-02-02 10:28   ` Olaf Hering
  0 siblings, 1 reply; 7+ messages in thread
From: Ian Campbell @ 2014-02-02 10:24 UTC (permalink / raw)
  To: Olaf Hering; +Cc: Ian.Jackson, xen-devel

On Sun, 2014-02-02 at 09:19 +0100, Olaf Hering wrote:
> gx_main.c: In function '_do_qRcmd_req':
> gx_main.c:119:13: error: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'uint64_t' [-Werror=format=]
>              sprintf(buf1, "pgd3val set to: "XGF64"\n", pgd3val);
>              ^
> gx_main.c:121:13: error: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'uint64_t' [-Werror=format=]
>              sprintf(buf1, "Invalid  pgd3val "XGF64"\n", pgd3val);
> 
> Signed-off-by: Olaf Hering <olaf@aepfle.de>

I suppose there is no harm in this, but is there any chance that gdbsx
would actually work on arm64 without significant actual work going into
it?

Also, you forgot to CC the gdbsx maintainer.

(why doesn't this code use stdint.h?)

> ---
>  tools/debugger/gdbsx/xg/xg_public.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/debugger/gdbsx/xg/xg_public.h b/tools/debugger/gdbsx/xg/xg_public.h
> index 6236d08..046e21b 100644
> --- a/tools/debugger/gdbsx/xg/xg_public.h
> +++ b/tools/debugger/gdbsx/xg/xg_public.h
> @@ -23,7 +23,7 @@
>  #define XGTRC1(...)  \
>             do {(xgtrc_on==2) ? (xgtrc(__FUNCTION__,__VA_ARGS__)):0;} while (0)
>  
> -#if defined(__x86_64__)
> +#if defined(__x86_64__) || defined(__aarch64__)
>      #define  XGFM64  "%lx"
>      #define  XGF64   "%016lx"
>  #else

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] tools/gdbsx: define format strings for aarch64
  2014-02-02 10:24 ` Ian Campbell
@ 2014-02-02 10:28   ` Olaf Hering
  2014-02-02 10:36     ` Ian Campbell
  0 siblings, 1 reply; 7+ messages in thread
From: Olaf Hering @ 2014-02-02 10:28 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Ian.Jackson, xen-devel

On Sun, Feb 02, Ian Campbell wrote:

> I suppose there is no harm in this, but is there any chance that gdbsx
> would actually work on arm64 without significant actual work going into
> it?

I have no idea. But I just noticed its built only due to this line in
our xen.spec:

make -C tools/debugger/gdbsx

Perhaps this should be guarded by a %ifarch x86_64.

Olaf

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] tools/gdbsx: define format strings for aarch64
  2014-02-02 10:28   ` Olaf Hering
@ 2014-02-02 10:36     ` Ian Campbell
  2014-02-07  1:12       ` Mukesh Rathor
  0 siblings, 1 reply; 7+ messages in thread
From: Ian Campbell @ 2014-02-02 10:36 UTC (permalink / raw)
  To: Olaf Hering; +Cc: Ian.Jackson, xen-devel

On Sun, 2014-02-02 at 11:28 +0100, Olaf Hering wrote:
> On Sun, Feb 02, Ian Campbell wrote:
> 
> > I suppose there is no harm in this, but is there any chance that gdbsx
> > would actually work on arm64 without significant actual work going into
> > it?
> 
> I have no idea. But I just noticed its built only due to this line in
> our xen.spec:
> 
> make -C tools/debugger/gdbsx
> 
> Perhaps this should be guarded by a %ifarch x86_64.

I suspect that right now that this would be wise (maybe i386 too?) --
hopefully Mukesh can advise.

Ian.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] tools/gdbsx: define format strings for aarch64
  2014-02-02 10:36     ` Ian Campbell
@ 2014-02-07  1:12       ` Mukesh Rathor
  2014-02-07  7:54         ` Olaf Hering
  2014-02-07 10:08         ` Ian Campbell
  0 siblings, 2 replies; 7+ messages in thread
From: Mukesh Rathor @ 2014-02-07  1:12 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Olaf Hering, Ian.Jackson, xen-devel

On Sun, 2 Feb 2014 10:36:16 +0000
Ian Campbell <ian.campbell@citrix.com> wrote:

> On Sun, 2014-02-02 at 11:28 +0100, Olaf Hering wrote:
> > On Sun, Feb 02, Ian Campbell wrote:
> > 
> > > I suppose there is no harm in this, but is there any chance that
> > > gdbsx would actually work on arm64 without significant actual
> > > work going into it?
> > 
> > I have no idea. But I just noticed its built only due to this line
> > in our xen.spec:
> > 
> > make -C tools/debugger/gdbsx
> > 
> > Perhaps this should be guarded by a %ifarch x86_64.
> 
> I suspect that right now that this would be wise (maybe i386 too?) --
> hopefully Mukesh can advise.
> 
> Ian.

It should just work if you can quickly implement 
arch/x86/debug.c for arm. If not, you'd need to "arch it out".

thanks
mukesh

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] tools/gdbsx: define format strings for aarch64
  2014-02-07  1:12       ` Mukesh Rathor
@ 2014-02-07  7:54         ` Olaf Hering
  2014-02-07 10:08         ` Ian Campbell
  1 sibling, 0 replies; 7+ messages in thread
From: Olaf Hering @ 2014-02-07  7:54 UTC (permalink / raw)
  To: Mukesh Rathor; +Cc: Ian.Jackson, Ian Campbell, xen-devel

On Thu, Feb 06, Mukesh Rathor wrote:

> It should just work if you can quickly implement 
> arch/x86/debug.c for arm. If not, you'd need to "arch it out".

Some Makefile already has something like SUBDIR-$(ARCH), it was just the
hard "make -C tools/gdbsx" in xen.spec which caused the error.

Olaf

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] tools/gdbsx: define format strings for aarch64
  2014-02-07  1:12       ` Mukesh Rathor
  2014-02-07  7:54         ` Olaf Hering
@ 2014-02-07 10:08         ` Ian Campbell
  1 sibling, 0 replies; 7+ messages in thread
From: Ian Campbell @ 2014-02-07 10:08 UTC (permalink / raw)
  To: Mukesh Rathor; +Cc: Olaf Hering, Ian.Jackson, xen-devel

On Thu, 2014-02-06 at 17:12 -0800, Mukesh Rathor wrote:
> On Sun, 2 Feb 2014 10:36:16 +0000
> Ian Campbell <ian.campbell@citrix.com> wrote:
> 
> > On Sun, 2014-02-02 at 11:28 +0100, Olaf Hering wrote:
> > > On Sun, Feb 02, Ian Campbell wrote:
> > > 
> > > > I suppose there is no harm in this, but is there any chance that
> > > > gdbsx would actually work on arm64 without significant actual
> > > > work going into it?
> > > 
> > > I have no idea. But I just noticed its built only due to this line
> > > in our xen.spec:
> > > 
> > > make -C tools/debugger/gdbsx
> > > 
> > > Perhaps this should be guarded by a %ifarch x86_64.
> > 
> > I suspect that right now that this would be wise (maybe i386 too?) --
> > hopefully Mukesh can advise.
> > 
> > Ian.
> 
> It should just work if you can quickly implement 
> arch/x86/debug.c for arm.

Thanks.

Looks like we'd also need to make a bunch of arch/x86/domctl.c generic
too, or implement the appropriate arm equivalents.

Not a 4.4 thing for sure, if someone wants gdbsx on arm then patches for
4.5 would be welcome as always.

>  If not, you'd need to "arch it out".
> 
> thanks
> mukesh

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-02-07 10:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-02  8:19 [PATCH] tools/gdbsx: define format strings for aarch64 Olaf Hering
2014-02-02 10:24 ` Ian Campbell
2014-02-02 10:28   ` Olaf Hering
2014-02-02 10:36     ` Ian Campbell
2014-02-07  1:12       ` Mukesh Rathor
2014-02-07  7:54         ` Olaf Hering
2014-02-07 10:08         ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.