LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 37950 - ExecutionContext::GetByteOrder() always returns endian::InlHostByteOrder()
Summary: ExecutionContext::GetByteOrder() always returns endian::InlHostByteOrder()
Status: RESOLVED FIXED
Alias: None
Product: lldb
Classification: Unclassified
Component: All Bugs (show other bugs)
Version: unspecified
Hardware: PC Linux
: P normal
Assignee: LLDB commit list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-27 03:46 PDT by Venkata Ramanaiah Nalamothu
Modified: 2019-08-07 09:22 PDT (History)
4 users (show)

See Also:
Fixed By Commit(s):


Attachments
Patch (580 bytes, patch)
2018-06-27 03:46 PDT, Venkata Ramanaiah Nalamothu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Venkata Ramanaiah Nalamothu 2018-06-27 03:46:11 PDT
Created attachment 20471 [details]
Patch

lldb::ByteOrder ExecutionContext::GetByteOrder() const {
  if (m_target_sp && m_target_sp->GetArchitecture().IsValid())
    m_target_sp->GetArchitecture().GetByteOrder();
  if (m_process_sp)
    m_process_sp->GetByteOrder();
  return endian::InlHostByteOrder();
}

As can be seen from the above piece of code, the byte order returned is always endian::InlHostByteOrder(), which is not wrong.
Comment 1 Venkata Ramanaiah Nalamothu 2018-06-27 03:48:56 PDT
> As can be seen from the above piece of code, the byte order returned is
> always endian::InlHostByteOrder(), which is not wrong.

always endian::InlHostByteOrder(), which is wrong. :)
Comment 2 Davide Italiano 2018-06-27 07:39:03 PDT
can you please upload this patch on Phabricator?

Thanks.
Comment 3 Venkata Ramanaiah Nalamothu 2018-06-27 21:52:50 PDT
Created https://reviews.llvm.org/D48704
Comment 4 Venkata Ramanaiah Nalamothu 2018-07-03 02:15:14 PDT
I have never run LLDB test suite myself so far and working on getting that up for writing a test case to close the review https://reviews.llvm.org/D48704.
Comment 5 Jonas Devlieghere 2019-08-07 09:22:47 PDT
Fixed in r368181