llvm-project/lldb/examples
Ulrich Weigand 0501eebda6 Miscellaneous fixes for big-endian systems
This patch fixes a bunch of issues that show up on big-endian systems:

- The gnu_libstdcpp.py script doesn't follow the way libstdc++ encodes
  bit vectors: it should identify the enclosing *word* and then access
  the appropriate bit within that word.  Instead, the script simply
  operates on bytes.  This gives the same result on little-endian
  systems, but not on big-endian.

- lldb_private::formatters::WCharSummaryProvider always assumes wchar_t
  is UTF16, even though it could also be UTF8 or UTF32.  This is mostly
  not an issue on little-endian systems, but immediately fails on BE.
  Fixed by checking the size of wchar_t like WCharStringSummaryProvider
  already does.

- ClangASTContext::GetChildCompilerTypeAtIndex uses uint32_t to access
  the virtual base offset stored in the vtable, even though the size
  of this field matches the target pointer size according to the C++
  ABI.  Again, this is mostly not visible on LE, but fails on BE.

- Process::ReadStringFromMemory uses strncmp to search for a terminator
  consisting of multiple zero bytes.  This doesn't work since strncmp
  will stop already at the first zero byte.  Use memcmp instead.

Differential Revision: http://reviews.llvm.org/D18983

llvm-svn: 266313
2016-04-14 14:33:47 +00:00
..
customization Warn about an example script being obsoleted by new native features and just an example 2012-03-16 01:25:01 +00:00
darwin/heap_find Fix typos. 2015-07-22 00:16:02 +00:00
functions Added the ability options to: 2013-06-14 00:30:23 +00:00
interposing/darwin/fd_interposing
lookup Remove unneeded include. 2013-06-13 23:56:47 +00:00
plugins/commands Replace printf with result.Printf, so that the plugin shows its output with any configuration of the LLDB I/O streams (esp. useful in graphic environments such as Xcode) 2012-10-30 18:01:15 +00:00
python Fix typos. 2015-09-22 05:07:56 +00:00
scripting
summaries Py3'ify some of the examples that get run at startup. 2015-10-19 17:35:02 +00:00
synthetic Miscellaneous fixes for big-endian systems 2016-04-14 14:33:47 +00:00
test Modified .lldb-loggings now to direct the lldb log files to the same session directory which also houses the test logs. 2012-08-22 20:25:33 +00:00