This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA]: Compile some gdb.base tests with -mshort for HC11/HC12


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]