Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] fix gcc4 error for freebsd target
@ 2005-08-31 19:37 James E Wilson
  2005-08-31 20:08 ` Mark Kettenis
  0 siblings, 1 reply; 3+ messages in thread
From: James E Wilson @ 2005-08-31 19:37 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 730 bytes --]

On an i386-freebsd4.10 machine, using gcc-4.0.1 to compile gdb-6.3, I
get a compiler error.  The same problem still exists on gdb mainline.

../../gdb-6.3/gdb/i386fbsd-tdep.c:48: error: static declaration of
‘i386fbsd_sc_reg_offset’ follows non-static declaration
../../gdb-6.3/gdb/i386-tdep.h:190: error: previous declaration of
‘i386fbsd_sc_reg_offset’ was here

The fix is trivial.  We just need to delete the static keyword from the
i386fbsd_sc_reg_offset definition in i386fbsd-tdep.c.

I've attached the patch for gdb-6.3, which also applies with a small
offset to mainline.  OK for mainline?  Do you want it on the gdb-6.3
branch also perhaps?
-- 
Jim Wilson, GNU Tools Support, http://www.specifix.com

[-- Attachment #2: patch.fbsd.static --]
[-- Type: text/plain, Size: 897 bytes --]

2005-08-31  Jim Wilson  <wilson@specifix.com>

	* i386fbsd-nat.c (i386fbsd_sc_reg_offset): Make it non-static.

Index: i386fbsd-tdep.c
===================================================================
RCS file: /services/cvs/cvsroot/gnusense/gdb/gdb/i386fbsd-tdep.c,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 i386fbsd-tdep.c
*** i386fbsd-tdep.c	8 Jul 2004 13:06:48 -0000	1.1.1.1
--- i386fbsd-tdep.c	31 Aug 2005 18:27:58 -0000
*************** CORE_ADDR i386fbsd_sigtramp_start_addr =
*** 45,51 ****
  CORE_ADDR i386fbsd_sigtramp_end_addr = 0xbfbfdff0;
  
  /* From <machine/signal.h>.  */
! static int i386fbsd_sc_reg_offset[] =
  {
    8 + 14 * 4,			/* %eax */
    8 + 13 * 4,			/* %ecx */
--- 45,51 ----
  CORE_ADDR i386fbsd_sigtramp_end_addr = 0xbfbfdff0;
  
  /* From <machine/signal.h>.  */
! int i386fbsd_sc_reg_offset[] =
  {
    8 + 14 * 4,			/* %eax */
    8 + 13 * 4,			/* %ecx */

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

end of thread, other threads:[~2005-08-31 20:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-31 19:37 [patch] fix gcc4 error for freebsd target James E Wilson
2005-08-31 20:08 ` Mark Kettenis
2005-08-31 20:17   ` James E Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox