diff options
Diffstat (limited to 'gprofng/src/Experiment.cc')
-rw-r--r-- | gprofng/src/Experiment.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gprofng/src/Experiment.cc b/gprofng/src/Experiment.cc index 45550e8..4cbb7f6 100644 --- a/gprofng/src/Experiment.cc +++ b/gprofng/src/Experiment.cc @@ -541,10 +541,14 @@ Experiment::ExperimentHandler::startElement (char*, char*, char *qName, Attribut exp->platform = RISCV; else exp->platform = Sparc; - exp->need_swap_endian = (DbeSession::platform == Sparc) ? - (exp->platform != Sparc) : (exp->platform == Sparc); exp->architecture = xstrdup (str); } + str = attrs->getValue (NTXT ("bigendian")); + if (str != NULL) + { + exp->bigendian = *str == '1'; + exp->need_swap_endian = DbeSession::is_bigendian () != exp->bigendian; + } str = attrs->getValue (NTXT ("pagesz")); if (str != NULL) exp->page_size = atoi (str); @@ -1314,6 +1318,7 @@ Experiment::Experiment () exp_maj_version = 0; exp_min_version = 0; platform = Unknown; + bigendian = DbeSession::is_bigendian(); // can be changed in log.xml reading wsize = Wnone; page_size = 4096; npages = 0; |