Hi Miguelangel,
The error I got was compiling GDB (The debugger) not
GCC (The compiler). GCC compiled with no errors, so I
think Steve has included the patch in CVS. Steve wrote
that he compiled the version 6.0 of GDB, so I tried to
compile that version plus the code from the
gdb-current on CVS, but I got the same error, same
line, though different line number due to the
different version.
Sorry about that, after re-reading your email I found I answered the
wrong question.
Yes there is a similar problem with gdb-5.1.1 (exactly the same problem
as with gcc-3.2.3). It appears that gcc-4 is more pedantic about what
you can have on the left side of an argument, this causes the errors
when compiling under gcc-4.
Once I fixed this problem, I found another compiler error (I assume also
due to gcc-4) which I fixed.
Please find attached a patch to fix both of these problems, to be
applied to the gdb-5.1.1 source tree.
I compiled this under Fedora 4, using gcc-4.0.0
I think it is a Suse specific problem, cause Steve
used Fedora 4
I'm surprised that gcc-3.2.3 compiled under gcc-4.0.2.
I used a rather dirty trick. I copied the source
directories (after make) form Suse 9.3 to Suse 10 and
tiped "su" - "make install" and got a working
msp430-gdb. It was a desperate action, but allowed me
to continue working on mi project after upgrading my
OS.
Yes that should work.
Could someone add the attached patch to the gdb/gdb-5.1.1 sources in the
CVS?
Regards,
--
Peter Jansen
___________________________________________________________________________
Australian Antarctic Division - Commonwealth of Australia
IMPORTANT: This transmission is intended for the addressee only. If you are not
the
intended recipient, you are notified that use or dissemination of this
communication is
strictly prohibited by Commonwealth law. If you have received this transmission
in error,
please notify the sender immediately by e-mail or by telephoning +61 3 6232
3209 and
DELETE the message.
Visit our web site at http://www.aad.gov.au/
___________________________________________________________________________
diff -r -U 3 gdb-5.1.1/gdb/msp430-rom.c gdb-5.1.1-patch/gdb/msp430-rom.c
--- gdb-5.1.1/gdb/msp430-rom.c 2003-06-04 22:55:22.000000000 +1000
+++ gdb-5.1.1-patch/gdb/msp430-rom.c 2006-01-05 10:02:13.000000000 +1100
@@ -66,7 +66,7 @@
}
static int hashmark = 1; /* flag set by "set hash" */
-extern struct monitor_ops msp430_cmds; /* fwd decl */
+static struct monitor_ops msp430_cmds; /* fwd decl */
/* load elf file... no performance crap here. */
diff -r -U 3 gdb-5.1.1/include/obstack.h gdb-5.1.1-patch/include/obstack.h
--- gdb-5.1.1/include/obstack.h 2001-03-14 13:27:43.000000000 +1100
+++ gdb-5.1.1-patch/include/obstack.h 2006-01-05 10:07:24.000000000 +1100
@@ -423,7 +423,8 @@
({ struct obstack *__o = (OBSTACK); \
if (__o->next_free + sizeof (void *) > __o->chunk_limit) \
_obstack_newchunk (__o, sizeof (void *)); \
- *((void **)__o->next_free)++ = ((void *)datum); \
+ *((void **)__o->next_free) = ((void *)datum); \
+ __o->next_free += sizeof(void *); \
(void) 0; })
# define obstack_int_grow(OBSTACK,datum) \