This is the mail archive of the gdb-patches@sourceware.org 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]

Fwd: sim bug


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.


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