WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

Re: [XenPPC] XenPPC: redundancy definition of __trap_to_gdb with CRASH_D

To: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Subject: Re: [XenPPC] XenPPC: redundancy definition of __trap_to_gdb with CRASH_DEBUG
From: Yi Ge <geyi@xxxxxxxxxx>
Date: Tue, 3 Oct 2006 14:53:02 -0400
Cc: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 03 Oct 2006 11:50:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <B7B09A5A-DF93-4DBB-8322-704CDB4BDA5E@xxxxxxxxxxxxxx>
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx

Here is the error message I got on building xen:

In file included from /home/gy/xenppc-unstable.hg/xen/include/asm/page.h:33,
from /home/gy/xenppc-unstable.hg/xen/include/xen/gdbstub.h:25,
from gdbstub.c:23:
/home/gy/xenppc-unstable.hg/xen/include/asm/debugger.h: In function `debugger_trap_fatal':
/home/gy/xenppc-unstable.hg/xen/include/asm/debugger.h:84: warning: implicit declaration of function `__trap_to_gdb'
In file included from gdbstub.c:23:
/home/gy/xenppc-unstable.hg/xen/include/xen/gdbstub.h: At top level:
/home/gy/xenppc-unstable.hg/xen/include/xen/gdbstub.h:60: warning: redundant redeclaration of '__trap_to_gdb'
/home/gy/xenppc-unstable.hg/xen/include/asm/debugger.h:84: warning: previous implicit declaration of '__trap_to_gdb' was here
make[3]: *** [gdbstub.o] Error 1
make[2]: *** [/home/gy/xenppc-unstable.hg/xen/arch/powerpc/built_in.o] Error 2
make[1]: *** [/home/gy/xenppc-unstable.hg/xen/xen] Error 2
make: *** [build] Error 2

It seems the gcc couldn't find the prototype of __trap_to_gdb when make the function call in debugger_trap_fatal(). So I added an extern prototype here with ifndef macro.

Best Regards,
Yi Ge, PhD
IBM China Research Lab
Tel: (86-10) 58748024
Fax: (86-10) 58748230
E-Mail : geyi@xxxxxxxxxx
Notes Mail: Yi Ge/China/IBM@IBMCN

Building 19 Zhongguancun Software Park,
8 Dongbeiwang WestRoad, Haidian District,
Beijing,P.R.C.100094



Inactive hide details for Jimi Xenidis <jimix@xxxxxxxxxxxxxx>Jimi Xenidis <jimix@xxxxxxxxxxxxxx>


          Jimi Xenidis <jimix@xxxxxxxxxxxxxx>

          2006-10-03 13:19


To

Yi Ge/China/IBM@IBMCN

cc

xen-ppc-devel@xxxxxxxxxxxxxxxxxxx

Subject

Re: [XenPPC] XenPPC: redundancy definition of __trap_to_gdb with CRASH_DEBUG

Not sure what the redundancy is?
I see 2 prototypes and you have added one.
please explain.
-JX
On Oct 3, 2006, at 12:23 PM, Yi Ge wrote:

> It looks like the compiler's problem: it makes a implicit  
> definition of __trap_to_gdb on the <asm/debugger.h>. This will  
> cause the redundancy definition warning and stop the build process  
> in default compiling setting.
>
>
>
> diff -r d1f6d0f820d8 xen/include/asm-powerpc/debugger.h
> --- a/xen/include/asm-powerpc/debugger.h Mon Oct 02 21:43:09 2006  
> -0400
> +++ b/xen/include/asm-powerpc/debugger.h Tue Oct 03 11:49:57 2006  
> -0400
> @@ -74,6 +74,10 @@ extern void __warn(char *file, int line)
>
> #include <xen/gdbstub.h>
>
> +#ifndef TRAP_TO_GDB
> +extern int __trap_to_gdb(struct cpu_user_regs *regs, unsigned long  
> cookie);
> +#define TRAP_TO_GDB
> +#endif
> static inline int debugger_trap_fatal(
> unsigned int vector, struct cpu_user_regs *regs)
> {
> diff -r d1f6d0f820d8 xen/include/xen/gdbstub.h
> --- a/xen/include/xen/gdbstub.h Mon Oct 02 21:43:09 2006 -0400
> +++ b/xen/include/xen/gdbstub.h Tue Oct 03 11:50:50 2006 -0400
> @@ -56,8 +56,10 @@ void gdb_send_reply(const char *buf, str
> void gdb_send_reply(const char *buf, struct gdb_context *ctx);
>
> /* gdb stub trap handler: entry point */
> +#ifndef TRAP_TO_GDB
> int __trap_to_gdb(struct cpu_user_regs *regs, unsigned long cookie);
> -
> +#define TRAP_TO_GDB
> +#endif
> /* arch specific routines */
> u16 gdb_arch_signal_num(
> struct cpu_user_regs *regs, unsigned long cookie);
>
>
> Best Regards,
> Yi Ge
>
>
> _______________________________________________
> Xen-ppc-devel mailing list
> Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
>
http://lists.xensource.com/xen-ppc-devel


GIF image

_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel