Fwd: sim bug
Mike Stump
mikestump@comcast.net
Sat Aug 6 00:03:00 GMT 2011
I originally sent this onto the binutils people... they directed me here.
I found a nasty sim bug:
Index: binutils/binutils/sim/common/sim-load.c
===================================================================
--- binutils/binutils/sim/common/sim-load.c (revision 1609)
+++ binutils/binutils/sim/common/sim-load.c (working copy)
@@ -30,6 +30,7 @@ along with this program. If not, see <h
#endif
#include <time.h>
+#include "sim-main.h"
#include "sim-basics.h"
#include "bfd.h"
#include "sim-utils.h"
Now, the reason why this is a bug is obscure. SIM_ADDR is defaulted to 32-bits, and in every other file, sim-main.h can define:
#define CORE_ADDR_TYPE unsigned long
but this one file doesn't include that header, so, in this one file SIM_ADDR is 32-bits, and in the rest of the objects it is 64-bit, hence breaking 64-bit ports that use sim-main.h to define CORE_ADDR_TYPE.
If this isn't the right fix, let me know which header these are supposed to go in... Thanks.
More information about the Gdb-patches
mailing list