[Lldb-commits] [PATCH] D38394: Fix dumping of characters with non-standard sizes

2017-10-11 Thread Petr Pavlu via Phabricator via lldb-commits
petpav01 added a comment.

Thanks, will commit shortly.


https://reviews.llvm.org/D38394



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r315444 - Fix dumping of characters with non-standard sizes

2017-10-11 Thread Petr Pavlu via lldb-commits
Author: petr.pavlu
Date: Wed Oct 11 01:48:18 2017
New Revision: 315444

URL: http://llvm.org/viewvc/llvm-project?rev=315444&view=rev
Log:
Fix dumping of characters with non-standard sizes

* Prevent dumping of characters in DumpDataExtractor() with
  item_byte_size bigger than 8 bytes. This case is not supported by the
  code and results in a crash because the code calls
  DataExtractor::GetMaxU64Bitfield() -> GetMaxU64() that asserts for
  byte size > 8 bytes.
* Teach DataExtractor::GetMaxU64(), GetMaxU32(), GetMaxS64() and
  GetMaxU64_unchecked() how to handle byte sizes that are not a multiple
  of 2. This allows DumpDataExtractor() to dump characters and booleans
  with item_byte_size in the interval of [1, 8] bytes. Values that are
  not a multiple of 2 would previously result in a crash because they
  were not handled by GetMaxU64().

Modified:
lldb/trunk/include/lldb/Utility/DataExtractor.h
lldb/trunk/source/Core/DumpDataExtractor.cpp
lldb/trunk/source/Utility/DataExtractor.cpp
lldb/trunk/unittests/Core/DataExtractorTest.cpp

Modified: lldb/trunk/include/lldb/Utility/DataExtractor.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/DataExtractor.h?rev=315444&r1=315443&r2=315444&view=diff
==
--- lldb/trunk/include/lldb/Utility/DataExtractor.h (original)
+++ lldb/trunk/include/lldb/Utility/DataExtractor.h Wed Oct 11 01:48:18 2017
@@ -513,10 +513,8 @@ public:
   ///
   /// Extract a single integer value and update the offset pointed to
   /// by \a offset_ptr. The size of the extracted integer is specified
-  /// by the \a byte_size argument. \a byte_size should have a value
-  /// >= 1 and <= 4 since the return value is only 32 bits wide. Any
-  /// \a byte_size values less than 1 or greater than 4 will result in
-  /// nothing being extracted, and zero being returned.
+  /// by the \a byte_size argument. \a byte_size must have a value
+  /// >= 1 and <= 4 since the return value is only 32 bits wide.
   ///
   /// @param[in,out] offset_ptr
   /// A pointer to an offset within the data that will be advanced
@@ -539,11 +537,9 @@ public:
   ///
   /// Extract a single unsigned integer value and update the offset
   /// pointed to by \a offset_ptr. The size of the extracted integer
-  /// is specified by the \a byte_size argument. \a byte_size should
+  /// is specified by the \a byte_size argument. \a byte_size must
   /// have a value greater than or equal to one and less than or equal
-  /// to eight since the return value is 64 bits wide. Any
-  /// \a byte_size values less than 1 or greater than 8 will result in
-  /// nothing being extracted, and zero being returned.
+  /// to eight since the return value is 64 bits wide.
   ///
   /// @param[in,out] offset_ptr
   /// A pointer to an offset within the data that will be advanced
@@ -570,10 +566,9 @@ public:
   /// Extract a single signed integer value (sign extending if required)
   /// and update the offset pointed to by \a offset_ptr. The size of
   /// the extracted integer is specified by the \a byte_size argument.
-  /// \a byte_size should have a value greater than or equal to one
-  /// and less than or equal to eight since the return value is 64
-  /// bits wide. Any \a byte_size values less than 1 or greater than
-  /// 8 will result in nothing being extracted, and zero being returned.
+  /// \a byte_size must have a value greater than or equal to one and
+  /// less than or equal to eight since the return value is 64 bits
+  /// wide.
   ///
   /// @param[in,out] offset_ptr
   /// A pointer to an offset within the data that will be advanced
@@ -589,7 +584,7 @@ public:
   /// The sign extended signed integer value that was extracted,
   /// or zero on failure.
   //--
-  int64_t GetMaxS64(lldb::offset_t *offset_ptr, size_t size) const;
+  int64_t GetMaxS64(lldb::offset_t *offset_ptr, size_t byte_size) const;
 
   //--
   /// Extract an unsigned integer of size \a byte_size from \a
@@ -598,11 +593,9 @@ public:
   ///
   /// Extract a single unsigned integer value and update the offset
   /// pointed to by \a offset_ptr. The size of the extracted integer
-  /// is specified by the \a byte_size argument. \a byte_size should
+  /// is specified by the \a byte_size argument. \a byte_size must
   /// have a value greater than or equal to one and less than or equal
-  /// to 8 since the return value is 64 bits wide. Any
-  /// \a byte_size values less than 1 or greater than 8 will result in
-  /// nothing being extracted, and zero being returned.
+  /// to 8 since the return value is 64 bits wide.
   ///
   /// @param[in,out] offset_ptr
   /// A pointer to an offset within the data that will be advanced
@@ -641,10 +634,9 @@ public:
   /// Extract a single signed integer value (sign ext

[Lldb-commits] [PATCH] D38394: Fix dumping of characters with non-standard sizes

2017-10-11 Thread Petr Pavlu via Phabricator via lldb-commits
petpav01 closed this revision.
petpav01 added a comment.

Landed as r315444 . Closing manually because 
I forgot to include "Differential Revision: ..." in the commit message.


https://reviews.llvm.org/D38394



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r315496 - Remove default case from switch.

2017-10-11 Thread Ted Woodward via lldb-commits
Author: ted
Date: Wed Oct 11 12:38:35 2017
New Revision: 315496

URL: http://llvm.org/viewvc/llvm-project?rev=315496&view=rev
Log:
Remove default case from switch.
Add case to handle new event lldb::eBreakpointEventTypeAutoContinueChanged.


Modified:
lldb/trunk/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp

Modified: lldb/trunk/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp?rev=315496&r1=315495&r2=315496&view=diff
==
--- lldb/trunk/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp Wed Oct 11 
12:38:35 2017
@@ -217,8 +217,6 @@ bool CMICmnLLDBDebuggerHandleEvents::Han
   const lldb::BreakpointEventType eEvent =
   lldb::SBBreakpoint::GetBreakpointEventTypeFromEvent(vEvent);
   switch (eEvent) {
-  default:
-break;
   case lldb::eBreakpointEventTypeThreadChanged:
 pEventType = "eBreakpointEventTypeThreadChanged";
 break;
@@ -264,6 +262,10 @@ bool CMICmnLLDBDebuggerHandleEvents::Han
 pEventType = "eBreakpointEventTypeIgnoreChanged";
 bOk = HandleEventSBBreakpointCmn(vEvent);
 break;
+  case lldb::eBreakpointEventTypeAutoContinueChanged:
+pEventType = "eBreakpointEventTypeAutoContinueChanged";
+bOk = HandleEventSBBreakpointCmn(vEvent);
+break;
   }
   m_pLog->WriteLog(CMIUtilString::Format(
   "# An SB Breakpoint event occurred: %s", pEventType));


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r315524 - Add cases for new type DependentAddressSpace, added in r314649

2017-10-11 Thread Ted Woodward via lldb-commits
Author: ted
Date: Wed Oct 11 15:42:21 2017
New Revision: 315524

URL: http://llvm.org/viewvc/llvm-project?rev=315524&view=rev
Log:
Add cases for new type DependentAddressSpace, added in r314649


Modified:
lldb/trunk/source/Symbol/ClangASTContext.cpp

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=315524&r1=315523&r2=315524&view=diff
==
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Wed Oct 11 15:42:21 2017
@@ -4351,6 +4351,9 @@ ClangASTContext::GetTypeClass(lldb::opaq
 break;
   case clang::Type::ObjCTypeParam:
 break;
+
+  case clang::Type::DependentAddressSpace:
+break;
   }
   // We don't know hot to display this type...
   return lldb::eTypeClassOther;
@@ -5161,6 +5164,9 @@ lldb::Encoding ClangASTContext::GetEncod
 break;
   case clang::Type::ObjCTypeParam:
 break;
+
+  case clang::Type::DependentAddressSpace:
+break;
   }
   count = 0;
   return lldb::eEncodingInvalid;
@@ -5311,6 +5317,9 @@ lldb::Format ClangASTContext::GetFormat(
 break;
   case clang::Type::ObjCTypeParam:
 break;
+
+  case clang::Type::DependentAddressSpace:
+break;
   }
   // We don't know hot to display this type...
   return lldb::eFormatBytes;


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] Buildbot numbers for the last week of 10/1/2017 - 10/7/2017

2017-10-11 Thread Galina Kistanova via lldb-commits
Hello everyone,

Below are some buildbot numbers for the last week of 10/1/2017 - 10/7/2017.

Please see the same data in attached csv files:

The longest time each builder was red during the week;
"Status change ratio" by active builder (percent of builds that changed the
builder status from greed to red or from red to green);
Count of commits by project;
Number of completed builds, failed builds and average build time for
successful builds per active builder;
Average waiting time for a revision to get build result per active builder
(response time).

Thanks

Galina


The longest time each builder was red during the week:

  buildername  | was_red
---+-
 sanitizer-x86_64-linux-bootstrap  | 78:03:54
 lld-x86_64-win7   | 69:09:59
 clang-cmake-armv7-a15-selfhost-neon   | 65:44:08
 sanitizer-x86_64-linux| 25:13:47
 clang-with-thin-lto-windows   | 24:59:05
 clang-with-thin-lto-ubuntu| 24:44:08
 libcxx-libcxxabi-libunwind-aarch64-linux-noexceptions | 22:13:47
 sanitizer-windows | 21:25:59
 sanitizer-x86_64-linux-fast   | 21:20:26
 aosp-O3-polly-before-vectorizer-unprofitable  | 20:57:27
 lldb-windows7-android | 20:28:12
 lldb-x86_64-darwin-13.4   | 20:27:12
 clang-cmake-aarch64-global-isel   | 18:09:29
 clang-cmake-aarch64-quick | 18:05:17
 libcxx-libcxxabi-x86_64-linux-debian-noexceptions | 17:57:43
 clang-cmake-aarch64-full  | 16:48:25
 clang-x86-windows-msvc2015| 16:17:39
 clang-cmake-aarch64-lld   | 16:03:10
 llvm-clang-x86_64-expensive-checks-win| 09:54:55
 clang-x64-ninja-win7  | 09:13:33
 polly-amd64-linux | 07:54:18
 clang-cmake-thumbv7-a15-full-sh   | 07:53:35
 clang-with-lto-ubuntu | 07:33:01
 lld-x86_64-darwin13   | 07:27:15
 lld-x86_64-freebsd| 07:26:10
 clang-hexagon-elf | 07:00:34
 sanitizer-ppc64be-linux   | 06:22:26
 clang-ppc64be-linux-multistage| 06:06:20
 clang-x86_64-linux-abi-test   | 05:59:22
 clang-cuda-build  | 05:53:47
 clang-cmake-thumbv7-a15   | 05:44:44
 clang-cmake-armv7-a15 | 05:44:10
 clang-ppc64le-linux-lnt   | 05:37:15
 clang-cmake-armv7-a15-full| 05:35:23
 lldb-x86_64-ubuntu-14.04-cmake| 05:33:30
 clang-ppc64le-linux-multistage| 05:30:27
 llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast  | 05:23:50
 clang-ppc64le-linux   | 05:22:18
 clang-cmake-armv7-a15-selfhost| 05:16:07
 llvm-clang-lld-x86_64-debian-fast | 05:05:30
 clang-native-arm-lnt  | 04:51:41
 llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast| 04:46:18
 clang-cmake-x86_64-sde-avx512-linux   | 04:18:33
 llvm-hexagon-elf  | 04:00:23
 llvm-mips-linux   | 03:51:35
 clang-cmake-x86_64-avx2-linux | 03:51:09
 clang-x86_64-linux-selfhost-modules-2 | 03:46:35
 clang-s390x-linux-lnt | 03:44:31
 clang-s390x-linux-multistage  | 03:43:19
 clang-s390x-linux | 03:33:10
 clang-ppc64be-linux-lnt   | 03:32:53
 clang-x86_64-debian-fast  | 03:23:13
 clang-ppc64be-linux   | 03:22:15
 lldb-x86-windows-msvc2015 | 03:15:31
 clang-x86_64-linux-selfhost-modules   | 03:14:30
 ubuntu-gcc7.1-werror  | 02:40:31
 clang-cmake-x86_64-avx2-linux-perf| 02:24:35
 sanitizer-x86_64-linux-android| 02:11:09
 sanitizer-x86_64-linux-autoconf   | 01:59:25
 clang-atom-d525-fedora-rel| 01:49:06
 lldb-amd64-ninja-netbsd8  | 01:25:40
 lldb-x86_64-ubuntu-14.04-buildserver  | 01:03:47
 libcxx-libcxxabi-libunwind-aarch64-linux  | 00:57:23
 lldb-x86_64-ubuntu-14.04-android  | 00:32:28
 sanitizer-x

[Lldb-commits] Buildbot numbers for the week of 09/24/2017 - 09/30/2017

2017-10-11 Thread Galina Kistanova via lldb-commits
Hello everyone,

Below are some buildbot numbers for the week of 09/24/2017 - 09/30/2017.

Please see the same data in attached csv files:

The longest time each builder was red during the week;
"Status change ratio" by active builder (percent of builds that changed the
builder status from greed to red or from red to green);
Count of commits by project;
Number of completed builds, failed builds and average build time for
successful builds per active builder;
Average waiting time for a revision to get build result per active builder
(response time).

Thanks

Galina


The longest time each builder was red during the week:

  buildername  |  was_red
---+--
 clang-cmake-mipsel| 118:41:58
 lldb-windows7-android | 113:06:23
 llvm-clang-x86_64-expensive-checks-win| 111:13:05
 clang-cmake-thumbv7-a15-full-sh   | 88:17:13
 clang-cmake-armv7-a15-full| 85:32:13
 libcxx-libcxxabi-libunwind-aarch64-linux-noexceptions | 43:27:02
 clang-x64-ninja-win7  | 25:28:49
 ubuntu-gcc7.1-werror  | 21:44:21
 clang-with-thin-lto-ubuntu| 13:50:57
 sanitizer-x86_64-linux-bootstrap  | 13:42:38
 sanitizer-x86_64-linux| 13:09:18
 clang-x86_64-linux-abi-test   | 12:47:56
 clang-lld-x86_64-2stage   | 12:38:40
 llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast  | 12:00:36
 polly-amd64-linux | 11:50:34
 clang-x86-windows-msvc2015| 11:40:45
 clang-ppc64le-linux-multistage| 11:32:27
 sanitizer-x86_64-linux-fast   | 11:17:27
 polly-arm-linux   | 10:29:45
 libcxx-libcxxabi-libunwind-aarch64-linux  | 09:46:05
 lldb-x86_64-ubuntu-14.04-cmake| 09:20:13
 sanitizer-x86_64-linux-autoconf   | 08:38:21
 clang-with-lto-ubuntu | 08:20:55
 clang-atom-d525-fedora-rel| 08:04:52
 clang-x86_64-linux-selfhost-modules   | 07:48:15
 lldb-x86-windows-msvc2015 | 07:42:51
 clang-x86_64-linux-selfhost-modules-2 | 07:32:46
 lldb-x86_64-ubuntu-14.04-buildserver  | 07:31:06
 lldb-amd64-ninja-netbsd8  | 07:26:02
 sanitizer-x86_64-linux-fuzzer | 07:25:18
 clang-cuda-build  | 07:21:59
 llvm-clang-lld-x86_64-debian-fast | 07:16:39
 lldb-amd64-ninja-freebsd11| 07:06:53
 llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast| 07:06:15
 clang-cmake-armv7-a15-selfhost| 06:55:20
 sanitizer-ppc64be-linux   | 05:47:20
 clang-cmake-armv7-a15-selfhost-neon   | 05:41:54
 clang-cmake-aarch64-full  | 04:33:11
 clang-s390x-linux-multistage  | 04:33:10
 sanitizer-x86_64-linux-android| 04:30:42
 clang-ppc64be-linux-multistage| 03:59:02
 clang-x86_64-debian-fast  | 03:46:40
 clang-cmake-aarch64-lld   | 03:20:36
 clang-cmake-aarch64-global-isel   | 03:16:37
 clang-ppc64be-linux-lnt   | 03:15:28
 clang-ppc64be-linux   | 03:06:10
 clang-cmake-x86_64-avx2-linux | 03:01:35
 clang-cmake-armv7-a15 | 02:55:51
 clang-cmake-thumbv7-a15   | 02:55:30
 lld-x86_64-darwin13   | 02:50:47
 clang-ppc64le-linux-lnt   | 02:50:12
 clang-with-thin-lto-windows   | 02:48:35
 clang-ppc64le-linux   | 02:48:02
 clang-native-arm-lnt  | 02:43:56
 clang-s390x-linux-lnt | 02:38:37
 clang-s390x-linux | 02:30:33
 clang-hexagon-elf | 02:19:10
 clang-cmake-x86_64-sde-avx512-linux   | 02:15:00
 sanitizer-windows | 01:34:52
 clang-cmake-x86_64-avx2-linux-perf| 01:31:02
 lld-x86_64-freebsd| 01:25:51
 clang-cmake-aarch64-quick | 01:18:44
 lld-x86_64-win7   | 00:36:33
 lldb-x86_64-ubuntu-14.04-android  | 00:30:49
(64 rows)

[Lldb-commits] [lldb] r315549 - The save_crashlog command was still looking at lldb.target and

2017-10-11 Thread Jim Ingham via lldb-commits
Author: jingham
Date: Wed Oct 11 19:21:41 2017
New Revision: 315549

URL: http://llvm.org/viewvc/llvm-project?rev=315549&view=rev
Log:
The save_crashlog command was still looking at lldb.target and
lldb.process.  That hasn't worked for a long time.  Convert it
to the form that takes an SBExecutionContext and use that instead.

Modified:
lldb/trunk/examples/python/crashlog.py

Modified: lldb/trunk/examples/python/crashlog.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/examples/python/crashlog.py?rev=315549&r1=315548&r2=315549&view=diff
==
--- lldb/trunk/examples/python/crashlog.py (original)
+++ lldb/trunk/examples/python/crashlog.py Wed Oct 11 19:21:41 2017
@@ -680,7 +680,7 @@ def interactive_crashlogs(options, args)
 interpreter.cmdloop()
 
 
-def save_crashlog(debugger, command, result, dict):
+def save_crashlog(debugger, command, exe_ctx, result, dict):
 usage = "usage: %prog [options] "
 description = '''Export the state of current target into a crashlog file'''
 parser = optparse.OptionParser(
@@ -709,11 +709,12 @@ def save_crashlog(debugger, command, res
 "error: failed to open file '%s' for writing...",
 args[0])
 return
-target = debugger.GetSelectedTarget()
+target = exe_ctx.target
 if target:
 identifier = target.executable.basename
-if lldb.process:
-pid = lldb.process.id
+process = exe_ctx.process
+if process:
+pid = process.id
 if pid != lldb.LLDB_INVALID_PROCESS_ID:
 out_file.write(
 'Process: %s [%u]\n' %
@@ -726,8 +727,8 @@ def save_crashlog(debugger, command, res
 'OS Version:  Mac OS X %s (%s)\n' %
 (platform.mac_ver()[0], commands.getoutput('sysctl -n 
kern.osversion')))
 out_file.write('Report Version:  9\n')
-for thread_idx in range(lldb.process.num_threads):
-thread = lldb.process.thread[thread_idx]
+for thread_idx in range(process.num_threads):
+thread = process.thread[thread_idx]
 out_file.write('\nThread %u:\n' % (thread_idx))
 for (frame_idx, frame) in enumerate(thread.frames):
 frame_pc = frame.pc


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits