This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA]: Compile some gdb.base tests with -mshort for HC11/HC12
- From: Stephane Carrez <stcarrez at nerim dot fr>
- To: Andrew Cagney <ac131313 at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Tue, 25 Feb 2003 21:26:26 +0100
- Subject: Re: [RFA]: Compile some gdb.base tests with -mshort for HC11/HC12
- References: <3E595678.6030805@nerim.fr> <3E5B94D6.30005@redhat.com>
Hi!
Andrew Cagney wrote:
Hi!
Some gdb.base tests must be compiled with -mshort for HC11/HC12 because
otherwise they either don't compile/link (remote.c, call-ar-st.c), or
they
fail due to gdb expecting a different behavior when passing a char as
parameter
(they are passed as 16-bit whatever the size of int).
Stephane, what exactly is the failure mode? This might be a testsuite
bug but it is also sounding like a limitation (i.e., bug) in core GDB.
Andrew
remote.c: when compiled with 32-bit int, the define INT_MAX is 2^32-1 and
the remote array defined in the test is too large for the hc11
(48K). The prog compiles but does not link due to this large array.
call-ar-st.c:
the resulting program is too large when compiled with 32-bit int.
It compiles but the link fails.
callfuncs.c:
this one is probably a limitation of gdb. When a char is passed
as parameter, it is passed as a 16-bit value (for HC11/HC12 gcc port).
Gdb assumes that it is passed as an int, which is 32-bit without gcc -mshort
option.
Stephane
-----------------------------------------------------------------------
Home Office
E-mail: stcarrez at nerim dot fr Stephane dot Carrez at solsoft dot fr
WWW: http://stcarrez.nerim.net http://www.solsoft.com
Free the Software! Visual Security Policy Management