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


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.

GDB doesn't have limitations, just bugs. Something, in conjunction with changes to value_arg_coerce, should be added to the architecture vector.


One idea would be to break off much of the big bad switch into an architecture method (leave the pointer munging behind):
struct type *coerce_arg_type(arch, arg_type, param_type)
with a default (that switch) of:
trad_coerce_arg_type()
and then use that to figure out the type conversion (your implementation could call trad_coerce_arg_type() for the non-char/short case).


Andrew




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