This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Sizes/Limits of Integers etc. in Simulator.
- From: "D.Venkatasubramanian, Noida" <dvenkat at noida dot hcltech dot com>
- To: gdb at sources dot redhat dot com, Kazu Hirata <kazu at cs dot umass dot edu>
- Date: Mon, 23 Dec 2002 11:10:21 +0530
- Subject: Sizes/Limits of Integers etc. in Simulator.
Hi All,
While making changes/additions to the H8 Simulator,
I ran up into a problem, when running the cross-compiler,
h8300-elf-gcc with just the -mh option, the sizeof (int) is
2 bytes, whereas, the sizeof (pointer) is 4 bytes. The same
target h8300h when used with a mint32 option, produces a
4 byte int. In the simulator, I would like to perform certain
tasks, based on the sizeof (int), of the binary. That is, I
have a binary compiled for h8300-elf target with -mh option only.
When GDB/ Simulator loads a binary, it must hold these sizes/ limits
somewhere, could you point me, where and how could I access these, in
the simulator code.
Any help would be very useful. I could give you more specific details
if required.
Thanks and Regards,
Venky