diff options
author | Yao Qi <yao@codesourcery.com> | 2013-03-20 02:54:22 +0000 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2013-03-20 02:54:22 +0000 |
commit | 8249a5a9e2a886aeb3b7142a5dc5a8b4f1b4665b (patch) | |
tree | f1dd71a146605184e44d02b323329c103dd402e9 /gdb/ctf.c | |
parent | 75c8d84d74c6c361a7f0c6371e94eb14ff7651d5 (diff) | |
download | gdb-8249a5a9e2a886aeb3b7142a5dc5a8b4f1b4665b.zip gdb-8249a5a9e2a886aeb3b7142a5dc5a8b4f1b4665b.tar.gz gdb-8249a5a9e2a886aeb3b7142a5dc5a8b4f1b4665b.tar.bz2 |
gdb/
* ctf.c (ctf_save_metadata_header): Define macro HOST_ENDIANNESS
and write it to CTF metadata.
Diffstat (limited to 'gdb/ctf.c')
-rw-r--r-- | gdb/ctf.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -218,9 +218,17 @@ ctf_save_metadata_header (struct trace_write_handler *handler) " := uint64_t;\n"); ctf_save_write_metadata (handler, "\n"); + /* Get the byte order of the host and write CTF data in this byte + order. */ +#if WORDS_BIGENDIAN +#define HOST_ENDIANNESS "be" +#else +#define HOST_ENDIANNESS "le" +#endif + ctf_save_write_metadata (handler, metadata_fmt, CTF_SAVE_MAJOR, CTF_SAVE_MINOR, - BYTE_ORDER == LITTLE_ENDIAN ? "le" : "be"); + HOST_ENDIANNESS); ctf_save_write_metadata (handler, "\n"); } |