This is the mail archive of the gdb@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: GDB broken on MIPS targets with unmarked binaries


The expansion appears to be:
tdep->mips_fp_register_double = (((((38) >= 38 && (38) < 38 +32) ?
	builtin_type_float : ((38) == 32 ) ?
        builtin_type_uint32 : ((38) >= 70 && (38) <= 89) ?
	builtin_type_uint32 :
        builtin_type_int))->main_type->length == 8);

I can't see any reason for it to crash; I haven't reproduced this
locally yet, although I'm working on it.  The above expansion came from
the second person to mention this to me.

I believe you're right about the patch at fault, though I don't know
what to do about it.  This makes builtin_type_int == NULL during
evaluation of that expression, along with all the others.
The patch isn't `at fault' - it is detecting a fault in mips_tdep.c :-) builtin_type_float would have contained a value from the previously selected ISA.

That code is trying to reverse engineer the header files to figure out what the default should be for the given target.

I think better would be to is set mips_fp_register_double=-1 and then change FP_REGISTER_DOUBLE to a real function (gdb multi-arch can now be assumed) that, when -1, apply the above logic (and even update the result).

enjoy,
Andrew




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